<!--
//------------------------------------------------------------------------------------------------------------------------------------------------
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
		

//------------------------------------------------------------------------------------------------------------------------------------------------
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
		

//------------------------------------------------------------------------------------------------------------------------------------------------
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
		

//------------------------------------------------------------------------------------------------------------------------------------------------
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
		

//------------------------------------------------------------------------------------------------------------------------------------------------
function OpenWindow(url, pvarWidth, pvarHeight) {
	popupWin = window.open(url, 'Win', 'scrollbars=yes, resizable=yes, width=' + pvarWidth + ', height=' + pvarHeight);
	window.name = 'opener';
	popupWin.focus()
}


//------------------------------------------------------------------------------------------------------------------------------------------------
function Trim(inputString) {//Trim all leading/trailing spaces from string
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") {
	  retValue = retValue.substring(1, retValue.length);
	  ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") {
	  retValue = retValue.substring(0, retValue.length-1);
	  ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) {
	  retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length);
   }
   return retValue;
}


//------------------------------------------------------------------------------------------------------------------------------------------------
function Navigate(where){
	if(where != "?"){
		window.location = where;
	}
}


//------------------------------------------------------------------------------------------------------------------------------------------------
function hover(pintRowID, pstrMouseAction, pstrColor){
	if(pstrMouseAction == "MouseOut"){
		document.getElementById(pintRowID).style.backgroundColor = pstrColor;
	}
	else{
		document.getElementById(pintRowID).style.backgroundColor = "#C0C0C0";
	}
}


//------------------------------------------------------------------------------------------------------------------------------------
function ToggleDisplay(id){
	if(document.getElementById(id).style.display == "block"){
		document.getElementById(id).style.display = "none";
	}
	else{
		document.getElementById(id).style.display = "block";
	}
}

//------------------------------------------------------------------------------------------------------------------------------------
function Show(id){
	document.getElementById(id).style.display = "block";
}


//------------------------------------------------------------------------------------------------------------------------------------
function Hide(id){
	document.getElementById(id).style.display = "none";
}


//------------------------------------------------------------------------------------------------------------------------------------
function FormatNumber(num, decimalNum, bolLeadingZero, bolParens, bolCommas)
    /**********************************************************************
	    IN:
		    NUM - the number to format
		    decimalNum - the number of decimal places to format the number to
		    bolLeadingZero - true / false - display a leading zero for
										    numbers between -1 and 1
		    bolParens - true / false - use parenthesis around negative numbers
		    bolCommas - put commas as number separators.
     
	    RETVAL:
		    The formatted number!
     **********************************************************************/
    { 
        if (isNaN(parseInt(num))) return "#N/A";

	var tmpNum = num;
	var iSign = num < 0 ? -1 : 1;		// Get sign of number
	
	// Adjust number so only the specified number of numbers after
	// the decimal point are shown.
	tmpNum *= Math.pow(10, decimalNum);
	tmpNum = Math.round(Math.abs(tmpNum))
	tmpNum /= Math.pow(10, decimalNum);
	tmpNum *= iSign;					// Readjust for sign
	tmpNum = tmpNum.toFixed(decimalNum);
	
	// Create a string object to do our formatting on
	var tmpNumStr = new String(tmpNum);

	// See if we need to strip out the leading zero or not.
	if (!bolLeadingZero && num < 1 && num > -1 && num != 0)
		if (num > 0)
			tmpNumStr = tmpNumStr.substring(1, tmpNumStr.length);
		else
			tmpNumStr = "-" + tmpNumStr.substring(2, tmpNumStr.length);
		
	// See if we need to put in the commas
	if (bolCommas && (num >= 1000 || num <= -1000)) {
		var iStart = tmpNumStr.indexOf(".");
		if (iStart < 0)
			iStart = tmpNumStr.length;

		iStart -= 3;
		while (iStart >= 1) {
			tmpNumStr = tmpNumStr.substring(0, iStart) + "," + tmpNumStr.substring(iStart, tmpNumStr.length)
			iStart -= 3;
		}		
	}

	// See if we need to use parenthesis
	if (bolParens && num < 0)
		tmpNumStr = "(" + tmpNumStr.substring(1, tmpNumStr.length) + ")";

	return tmpNumStr;		// Return our formatted string!
}


//------------------------------------------------------------------------------------------------------------------------------------
function FormatCurrency(num,decimalNum,bolLeadingZero,bolParens,bolCommas)
/**********************************************************************
	IN:
		NUM - the number to format
		decimalNum - the number of decimal places to format the number to
		bolLeadingZero - true / false - display a leading zero for
										numbers between -1 and 1
		bolParens - true / false - use parenthesis around negative numbers
		bolCommas - put commas as number separators.										
 
	RETVAL:
		The formatted number!		
 **********************************************************************/
{
	var tmpStr = new String(FormatNumber(num,decimalNum,bolLeadingZero,bolParens,bolCommas));

	if (tmpStr.indexOf("(") != -1 || tmpStr.indexOf("-") != -1) {
		// We know we have a negative number, so place '$' inside of '(' / after '-'
		if (tmpStr.charAt(0) == "(")
			tmpStr = "($"  + tmpStr.substring(1,tmpStr.length);
		else if (tmpStr.charAt(0) == "-")
			tmpStr = "-$" + tmpStr.substring(1,tmpStr.length);
			
		return tmpStr;
	}
	else
		return "$" + tmpStr;		// Return formatted string!
}


//-->