function submit_accom_form()
{
   document.form1.submit();
}
/*************** (mailing list) subscription validation *******************************/
function validate_subscription()
{ 
	
	if(document.getElementById("first_name").value=="")
	{
		alert("Please Enter Your First Name!");
	    document.getElementById("first_name").focus(); 
	    return false;
	}
	
	if(document.getElementById("last_name").value=="")
	{
		alert("Please Enter Your Last Name!");
	    document.getElementById("last_name").focus(); 
	    return false;
	}
	if(document.getElementById("occupation").value=="")
	{
		alert("Please Enter Your Occupation!");
	    document.getElementById("occupation").focus(); 
	    return false;
	}
	if(document.getElementById("email_id").value=="")
	{
		alert("Please Enter Your Email Address!");
	    document.getElementById("email_id").focus(); 
	    return false;
	}
	if(document.getElementById("email_id").value!="")
	{
		var str = document.getElementById("email_id").value;
		if(emailValidat(str,"email_id")==false)
		  return false; 
	}
	
}
/*************** end for postcard validation ********************************/
/* function email validation */
function emailValidat(str,email)
{ 
	var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID");
		   document.getElementById(email).value="";
		   document.getElementById(email).focus();
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID");
		   document.getElementById(email).value="";
		   document.getElementById(email).focus();
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID");
		    document.getElementById(email).value="";
		    document.getElementById(email).focus();
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID");
			document.getElementById(email).value="";
			document.getElementById(email).focus();
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID");
		    document.getElementById(email).value="";
			document.getElementById(email).focus();
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID");
		    document.getElementById(email).value="";
			document.getElementById(email).focus();
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID");
		    document.getElementById(email).value="";
			document.getElementById(email).focus();
		    return false;
		 }
}
/************ end for email validation funtion **************/
/************** inquiry validation **************************/
function validate_inquiry()
{ 
	if(document.getElementById("name").value=="")
	{
		alert("Please Enter Your Name!");
	    document.getElementById("name").focus(); 
	    return false;
	}
	if(document.getElementById("email_id").value=="")
	{
		alert("Please Enter Your Email Address!");
	    document.getElementById("email_id").focus(); 
	    return false;
	}
	if(document.getElementById("email_id").value!="")
	{
		var str = document.getElementById("email_id").value;
		if(emailValidat(str,"email_id")==false)
		  return false; 
	}
	
	if(document.getElementById("phone").value=="")
	{
		alert("Please Enter Your Phone Number!");
	    document.getElementById("phone").focus(); 
	    return false;
	}
	if(document.getElementById("arrival_date").value=="")
	{
		alert("Select arrival date!");
	    document.getElementById("arrival_date").focus(); 
	    return false;
	}
	if(document.getElementById("nights").value=="")
	{
		alert("Please Enter No of Nights!");
	    document.getElementById("nights").focus(); 
	    return false;
	}
	if(document.getElementById("adults").value=="")
	{
		alert("Please Enter How many adults!");
	    document.getElementById("adults").focus(); 
	    return false;
	}
	if(document.getElementById("children").value=="")
	{
		alert("Please Enter How many children!");
	    document.getElementById("children").focus(); 
	    return false;
	}
	if(document.getElementById("inquiry_txt").value=="")
	{
		alert("Please Enter Inquiry Detail!");
	    document.getElementById("inquiry_txt").focus(); 
	    return false;
	}
	
}
/************** end inquiry validation ***********************/
