function checkEmail(email) 
{
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)){
		return (true)
		}
		//Please enter E-mail address!
		alert("Please Enter Valid E-mail address!");
		return (false);
}


function validateEnquiry()
{	
	var cname = document.qry.cname.value;
	if(cname=="")
	{
		alert("Please Enter your Name.");
		document.qry.cname.focus();
		return false;
	}	
	
	var cemail = document.qry.cemail.value;
	if(cemail=="")
	{
		alert("Please Enter your email.");
		document.qry.cemail.focus();
		return false;
	}
	
	if(!checkEmail(document.qry.cemail.value))
	{
		document.qry.cemail.focus();
		return false;
	}
	return true;
}


function PopupCenter(pageURL, title,w,h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
targetWin.focus();
}
