
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
function JSFX_FloatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
	el.flt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.flt()", 40);
	}
	return el;
}
JSFX_FloatDiv("divBottomRight", -165, 500).flt();


function Validate2()
{	
	
	var errMSG1='Please provide valid values for\n\n';
		var errMSG='';
		var ValidMSG='';	
		var ValidMSG2='';		
		
		errMSG += addValidation("req","st_customer_name1","Name.");
		errMSG += addValidation("req","st_phone_no1","Phone No.");
		errMSG += addValidation("req","st_email1","Email ID.");
		errMSG += addValidation("req","st_query1","Enquiry.");
		errMSG += addValidation("req","security_code","Security Code.");
	
		
	if(errMSG.length>0)
	{
		alert(errMSG1+errMSG);
		return false;
	}
	else
	{
		ValidMSG += addValidation("valid_name","st_customer_name1","Please enter valid  Name.");
		ValidMSG += addValidation("valid_custom_phone","st_phone_no1","Please enter valid  Phone No.");
		ValidMSG += addValidation("email","st_email1","Please enter valid  Email.");
		
		
		if(ValidMSG!='')
		{
			alert(ValidMSG);
			return false;
		}		
		else
		{	
			
				return true;

		}
	}	
}


function checkInt(e){
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=9){
		if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
			if (unicode<48||unicode>57) //if not a number
				return false //disable key press
		
		}
	}
}
function popMe(){
	
	//document.getElementById('floatdiv').style.display='block';
	
	//document.getElementById("light").style.left=(document.getElementById('MouseX').value-300)+"px";
	/*if(document.getElementById('light').style.display=='block'){
		document.getElementById('light').style.display='none';
	}
	document.getElementById("light").style.left=350+"px";
	document.getElementById("light").style.top=(parseInt(document.getElementById('MouseY').value) -450)+"px";
	document.getElementById('light').style.display='block';
	document.getElementById('st_customer_name1').value='';
	document.getElementById('st_phone_no1').value='';
	document.getElementById('st_email1').value='';
	document.getElementById('st_query1').value='';
	document.getElementById('security_code').value='';*/
	location.href = 'get-a-quote.html';
	document.getElementById('imgGT').style.display='none';
	
}
function closeMe(){
	
	//document.getElementById('mainpopup').style.display='none';
	document.getElementById('light').style.display='none';
	//document.getElementById('fade').style.display='none'
}
$('.captcha_refresh_popup').parent().find('img:first').attr('src', $('.captcha_refresh_popup').parent().find('img:first').attr('src')+Math.random());

