// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

//-->

function check()
	{
	    var chkemail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z])+$/;
		if(document.frm.toa.value=="")
		{
		alert("Select type of accomodation");
		document.frm.toa.focus();
		return false;
		}
		if(document.frm.roomno.value=="")
		{
		alert("Enter No. Of rooms");
		document.frm.roomno.focus();
		return false;
		}
		if(document.frm.adult.value=="")
		{
		alert("Enter No. Of Adults");
		document.frm.adult.focus();
		return false;
		}
		if(document.frm.cinday.value=="" || document.frm.cinmonth.value=="" || document.frm.cinyear.value=="")
		{
		alert("Enter Check in date");
		document.frm.cinday.focus();
		return false;
		}
		if(document.frm.coutday.value=="" || document.frm.coutmonth.value=="" || document.frm.coutyear.value=="")
		{
		alert("Enter Check out date");
		document.frm.coutday.focus();
		return false;
		}
		if(document.frm.name.value=="")
		{
		alert("Enter your Name");
		document.frm.name.focus();
		return false;
		}
		if(document.frm.email.value=="")
		{
		alert("Enter Email Id");
		document.frm.email.focus();
		return false;
		}
	    else if(!chkemail.test(document.frm.email.value))
        {
        alert('Please Enter a Valid Email Id');
        document.frm.email.focus();
        return false;
        }
		if(document.frm.city.value=="")
		{
		alert("Enter the city");
		document.frm.city.focus();
		return false;
		}
		if(document.frm.telephone.value=="")
		{
		alert("Enter Telephone No.");
		document.frm.telephone.focus();
		return false;
		}
		if(document.frm.telephone2.value=="")
		{
		alert("Enter Mobile No.");
		document.frm.telephone2.focus();
		return false;
		}
		return true;
	}
	
	function numbersonly(e){
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
	if (unicode<48||unicode>57) //if not a number
	if (unicode!=44)
	if (unicode!=43)
	if (unicode!=45)
	if (unicode!=32)
	if (unicode!=46)
	if (unicode!=9)
	return false //disable key press
	}
}

