function geto(idx){ return document.getElementById(idx); }
function iso(o) { var chk=(o == null || o == undefined)?0:1; return chk;}
function removeAllChildNodes(node) {
  if (node && node.hasChildNodes && node.removeChild) {
    while (node.hasChildNodes()) {node.removeChild(node.firstChild);}
  }
}
function addLoadQueue(fn){
	if (typeof window.addEventListener != 'undefined'){
		window.addEventListener('load', fn, false);
	} else if (typeof document.addEventListener != 'undefined'){
		document.addEventListener('load', fn, false);
	} else if (typeof window.attachEvent != 'undefined'){
		window.attachEvent('onload', fn);
	} else {
		var oldfn = window.onload;
		if (typeof window.onload != 'function'){
			window.onload = fn;
		} else {
			window.onload = function(){
				oldfn();
				fn();
			};
		}
	}
}
function pfloat(o){ 
  var i = parseFloat(o.value); 
	if(isNaN(i)) { i = 0; } 
	else {
		i = Math.round(i*100)/100;
	}
	return i;
}

function pfloatOLD (y){
	  y=y.value;
    max_length=12;                         //max_length= length of text input
    //spacing="$               ";
		spacing='';
    x=Math.floor(y);
    xx=y-x;
    xx=xx+"00.00"                 //xx=the cents only (with zeroes).
    a=xx.indexOf(".");
    q=x+xx.substring(a,a+3);
    ql= (q.length<max_length)?(max_length-q.length):0;   
    r=(y)?spacing.substring(0,ql)+q:"";
    return (r);
}
