

	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 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 "NaN";
	
		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
		
		// Create a string object to do our formatting on
		var tmpNumStr = new String(tmpNum);

		dec = tmpNumStr.indexOf(".");
		if (dec==-1) tmpNumStr += ".00";
		cents = ((dec > 0) ? tmpNumStr.substring(dec,tmpNumStr.length) : ".00");
		switch(cents.length) {
			case 0:
				tmpNumStr += "00"
				break
			case 2:
				tmpNumStr += "0"
				break
		}
	
		// 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;
	
				tmpNumStr = tmpNumStr.replace(".",".");
	
			iStart -= 3;
			while (iStart >= 1) {
				tmpNumStr = tmpNumStr.substring(0,iStart) + bolCommas + tmpNumStr.substring(iStart,tmpNumStr.length)
				iStart -= 3;
			}		
		}
	
		// See if we need to use parenthesis
		if (bolParens && num < 0)
			tmpNumStr = "(" + tmpNumStr.substring(1,tmpNumStr.length) + ")";
	
tmpNumStr = "$" + tmpNumStr;
	
		return tmpNumStr;		// Return our formatted string!
	}
	
	function ScrollProgressiveTickers(id,prId){
		var objstr = MM_findObj(id);
		var obj = eval(objstr);
		if (obj) {
			JP[prId] += (Inc[prId]);
			obj.innerHTML = FormatNumber(JP[prId]/100,2,false,false,",");
		}
		window.setTimeout( "ScrollProgressiveTickers('"+id+"', "+prId+")", 1000);
	}
	
	function ScrollProgressiveTickerTotals(id) {
		var objstr = MM_findObj(id);
		var obj = eval(objstr);
		if (obj) {
			var itotal = 0;
			for(i=1;i<=NumberOfProgr;i++) {
				JP[i] += (Inc[i]);
				itotal += JP[i];
			}
			objstr.innerHTML = FormatNumber(itotal/100,2,false,false,",");
		}
		window.setTimeout("ScrollProgressiveTickerTotals('"+id+"')",1000); 
	}
