Number.prototype.adalby=function(){
	return String(this.toFixed(2)).replace(/(\d+)(\d{3})/, "$1,$2");
}

function clearCo(amt){var amt=amt.replace(/,/g, "");return 	amt/1;}
function cleanAmt(amt){
	var amt	=	(amt/1).numberFormat("0,0.00");
	var loca=amt.indexOf('0');
	if (loca==0){
		var amt=amt.substring(1);
	}
	return amt;
}
function viewCertify(){window.location	=	"https://seal.starfieldtech.com/verifySeal?sealID=2847673480166019921011f6e3f108067d739425306190223649803451";}//end of if
function hideLoad(x){
	var enjs	=	navigator.javaEnabled();
	if(enjs==false){
		window.location="enableJs";
	}else{
		if(x==1){
			refreshGeniune();
		}//end of if
		resizebdy();
		document.getElementById("isPageLoaded").style.display = "none";	
	}//end of if
}//end of if
function rand ( n )
{
  return ( Math.floor ( Math.random ( ) * n + 1 ) );
}
function resizebdy(){
	var objY	=	document.getElementById("godwn");
	var h		=	objY.offsetTop;
	if (h<450){
		var d	=	200;
		var brsr	=	navigator.appName;
		if(brsr=="Netscape"){
			document.getElementById("godwn").style.marginTop	= d+"px";
		}else{
			document.getElementById("godwn").style.marginTop	= d;
		}//end of if
	}//end of if
}//end of if
function refreshGeniune(){
	document.getElementById("imgid").innerHTML	=	"Loading...";
	document.getElementById("geniune").value	=	"";	
	var req 	= 	Inint_AJAX();
	req.onreadystatechange = function () { 
		if (req.readyState==4) {
			if (req.status==200) {
				var str=req.responseText;
				document.getElementById("imgid").innerHTML			=	str;
			}//end of if
		}//end of if
	};//end of function () Ajax
	req.open("GET", "codea/getGeniune.php?xyz="+rand(10000));
	req.send(null);		
}//end of if
function validateGen(fun){
	prog(0,0,"");
	geniuneField	=	document.getElementById("geniune").value;
	geniuneId		=	document.getElementById("geniunei").innerHTML;
	var req 	= 	Inint_AJAX();
	req.onreadystatechange = function () { 
		if (req.readyState==4) {
			if (req.status==200) {
				var str=req.responseText;
				if (str==1){
					prog(1,2000,"Invalid Verification Code");
					refreshGeniune();
				}else{
					fun();
				}//end of if
			}//end of if
		}//end of if
	};//end of function () Ajax
	req.open("GET", "codea/validateGen.php?fun="+fun+"&gf="+geniuneField+"&gi="+geniuneId+"&xz="+rand(100000));
	req.send(null);		
}//end of if
function validateGena(fun){
	geniuneField	=	document.getElementById("geniune").value;
	geniuneId		=	document.getElementById("geniunei").innerHTML;
	var req 	= 	Inint_AJAX();
	req.onreadystatechange = function () { 
		if (req.readyState==4) {
			if (req.status==200) {
				var str=req.responseText;
				if (str==1){
					refreshGeniune();
				}else{
					fun();
				}//end of if
			}//end of if
		}//end of if
	};//end of function () Ajax
	req.open("GET", "codea/validateGen.php?fun="+fun+"&gf="+geniuneField+"&gi="+geniuneId);
	req.send(null);		
}//end of if
function hideBeta(){document.getElementById("betaComments").style.display = "none";}//end of if
function showBeta(){document.getElementById("betaComments").style.display = "block";}//end of if
function popitup(url) {newwindow=window.open(url,'name','scrollbars=1,height=550,width=940');if (window.focus) {newwindow.focus()}return false;}
function popitupa(url) {newwindow=window.open(url,'name','scrollbars=1,height=550,width=650');if (window.focus) {newwindow.focus()}return false;}
function viewPara(x){if(x.length>0){document.getElementById(x).style.display = "block";}}
function hidePara(x){document.getElementById(x).style.display = "none";}
function showTip(n,event){var posy = event.screenY;var posx = event.screenX;document.getElementById("tip").style.display	=	"block";document.getElementById("tip").innerHTML = n;document.getElementById("tip").style.left = posx+"px";document.getElementById("tip").style.top	= posy+"px";}
function hideTip(){document.getElementById("tip").style.display	= "none";}
function getScrollHeight(){
	var h	=	document.getElementById("utbut").offsetTop;
	return h;
}
function prog(a,tm,msg){
	var	cck	=	document.getElementById("okkcancel").innerHTML;
	if (cck==0){
		document.getElementById("processingMain").style.display		=	"block";	
		document.getElementById("processingMain").style.height		=	getScrollHeight();
		document.getElementById("classicProcess").style.display		=	"block";	
		if (a==1){
			progBar(1,tm,msg);
		}//end of if-else
	}//end of if
}//end of function
function progBar(s,tm,msg){
	document.getElementById("okkcancel").innerHTML	=	1;
	document.body.style.cursor 	=	"progress";
	if (s==1){
		setTimeout("showNote("+tm+",'"+msg+"');",tm);
	}//end of if
}//end of function
function showNote(tm,msg){
	if (msg.length<=0){
		msg	=	" ";
	}//end of if
	document.getElementById("classicProcess").style.display		=	"none";	
	document.getElementById("processMsg").style.display		=	"block";	
	document.getElementById("processMsg").innerHTML			=	msg;	
	setTimeout("cancelProgrss();",tm);
}//end of if
function cancelProgrss(){
	document.getElementById("processMsg").innerHTML			=	"";
	document.getElementById("processMsg").style.display		=	"none";	
	document.getElementById("processingMain").style.display		=	"none";	
	document.getElementById("okkcancel").innerHTML				=	0;
	document.body.style.cursor 									=	"default";
	resizebdy();
}//end of function
function Inint_AJAX() {try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}try { return new XMLHttpRequest(); } catch(e) {}alert("XMLHttpRequest not supported");return null;};
