function addToFavorites() 
{
	if (window.sidebar) 
		window.sidebar.addPanel(document.title,location.href,"");
	else
		window.external.AddFavorite(location.href,document.title);
}

function getURLParam(psParamName){
  var lsParamValue = "";
  var lsHref = window.location.href;
  if ( lsHref.indexOf("?") > -1 )
  {
    var lsQueryString = lsHref.substr(lsHref.indexOf("?"));
    var aQueryString = lsQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
    {
      if (aQueryString[iParam].indexOf(psParamName + "=") > -1 )
      {
        var aParam = aQueryString[iParam].split("=");
        lsParamValue = aParam[1];
        break;
      }
    }
  }
  return lsParamValue;
}

function opacity(id, opacStart, opacEnd, millisec) { 
	//NOTE: div width must be specified to avoid ie bug !!!
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 

function showPopup(psHref)
{
	window.open(psHref,"W_POP", 'resizable=yes, location=no, width=745, height=440, menubar=no, status=yes, scrollbars=yes, menubar=no');	
}

function showAddPopup()
{
	window.open('adm_popup_fileUpload.php', 'fUp', 'resizable=no, location=no, width=600, height=140, menubar=no, status=yes, scrollbars=no, menubar=no');	
}

function UCase(poItem)
{
	poItem.value=poItem.value.toUpperCase();
}
