// JavaScript Document 

function show(divName)
 {
   var divObject=document.getElementById(divName);
   divObject.style.display="block";
   
  // alert(firstname);
   
 }
 function hide(divName)
 {
   var divObject=document.getElementById(divName);
   divObject.style.display="none";
 }
 
 
 function chagePage(url)
{
  parent.Mainv.location.href=url;
}
function checkindate()
{
	var indate=document.getElementById("arriveDate").value;
	if(indate<1||indate>31||isNaN(indate)){
		alert("Please enter the check-in date");
		document.form4.arriveDate.focus();
		}
	return   false;
}
function checkchildren()
{
		var children=document.getElementById("children").value;
		if(isNaN (children)){
		alert("Must enter the number");
		document.form4.children.focus();
		}
	return   false;
}
function checkinmon()
{
		var inmon=document.getElementById("arriveMonth").value;
		if(inmon<1||inmon>12||isNaN(inmon)){
		alert("Please enter the check-in month");
		document.form4.arriveMonth.focus();
		}
	return   false;	
}
function checkinyear()
{
		var inyear=document.getElementById("arriveYear").value;
		if(inyear<10||inyear>12||isNaN(inyear)){
		alert("Please enter the check-in year");
		document.form4.arriveYear.focus();
		}
	return   false;
}
function checkadults()
{
		var adults=document.getElementById("adults").value;
		if(isNaN(adults)){
		alert("Must enter the number");
		document.form4.adults.focus();
		}
		return   false;
}
function checkoutdate()
{
		var outday=document.getElementById("departDate").value;
		if(outday<1||outday>31||isNaN(outday)){
		alert("Please enter the check-out date");
		document.form4.departDate.focus();
		}
		return   false;
}
function checkoutmon()
{
		var outmon=document.getElementById("departMonth").value;
		if(outmon<1||outmon>12||isNaN(outmon)){
		alert("Please enter the check-out month");
		document.form4.arriveDate.focus();
		}
		return   false;
}
function checkoutyear()
{
		var outyear=document.getElementById("departYear").value;
		if(outyear<10||outyear>12||isNaN(outyear)){
		alert("Please enter the check-out year");
		document.form4.departMonth.focus();
		}
		
		return   false;
}
<!--------------------------------------------------------------------------------------------------------->

 function check_formcon(){
   if(document.form3.firstname2.value == ''||document.form3.firstname2.value == 'First Name'){
   alert('Please enter your firstname');
   document.form3.firstname2.focus();
   return false;
  }
  if(document.form3.lastname2.value == ''||document.form3.lastname2.value == 'Last Name'){
   alert('Please enter your lastname');
   document.form3.lastname2.focus();
   return false;
  }
    if(document.form3.phone2.value == ''||isNaN(document.form3.phone2.value)){
   alert('Telephone input error');
   document.form3.phone2.focus();
   return false;
  }
  if(document.form3.adress2.value.length!=0)
  {
	 if (document.form3.adress2.value.charAt(0)=="." ||        
		document.form3.adress2.value.charAt(0)=="@"||      
		document.form3.adress2.value.indexOf('@', 0) == -1 ||
		document.form3.adress2.value.indexOf('.', 0) == -1 ||
		document.form3.adress2.value.lastIndexOf("@")==document.form3.adress2.value.length-1 ||
		document.form3.adress2.value.lastIndexOf(".")==document.form3.adress2.value.length-1)
		{
		alert("email address format is incorrect!");
		document.form3.adress2.focus();
		return false;
		}
  }
	 else
		{
		alert("Please enter the e-mail!");
		document.form3.adress2.focus();
		return false;}
		
    if(document.form3.subject2.value == ''||document.form3.subject2.value == 'Request Subject'){
   alert('Please enter the subject');
   document.form3.subject2.focus();
   return false;
  } 
     return true;
 }
 
 <!--------------------------------------------------------------------------------------------------------->

 function check_formcomment(){
   if(document.form2.name.value == ''||document.form2.name.value == 'Your Name'){
   alert('Please enter your name');
   document.form2.name.focus();
   return false;
  }
  if(document.form2.address.value.length!=0)
  {
	 if (document.form2.address.value.charAt(0)=="." ||        
		document.form2.address.value.charAt(0)=="@"||      
		document.form2.address.value.indexOf('@', 0) == -1 ||
		document.form2.address.value.indexOf('.', 0) == -1 ||
		document.form2.address.value.lastIndexOf("@")==document.form2.address.value.length-1 ||
		document.form2.address.value.lastIndexOf(".")==document.form2.address.value.length-1)
		{
		alert("email address format is incorrect!");
		document.form2.address.focus();
		return false;
		}
  }
	 else
		{
		alert("Please enter the e-mail!");
		document.form2.address.focus();
		return false;}
		
    if(document.form2.subject.value == ''||document.form2.subject.value == 'Subject'){
   alert('Please enter the subject');
   document.form2.subject.focus();
   return false;
  } 
     return true;
 }
 <!-------------------------------------------------------------------------------------------------------------->
 function check_form7(){
   if(document.form2.firstname.value == ''||document.form2.firstname.value == 'First Name'){
   alert('Please enter your firstname');
   document.form2.firstname.focus();
   return false;
  }
  if(document.form2.lastname.value == ''||document.form2.lastname.value == 'Last Name'){
   alert('Please enter your lastname');
   document.form2.lastname.focus();
   return false;
  }
    if(document.form2.phone.value == ''||isNaN(document.form2.phone.value)){
   alert('Telephone input error');
   document.form2.phone.focus();
   return false;
  }
  if(document.form2.email.value.length!=0)
  {
	 if (document.form2.email.value.charAt(0)=="." ||        
		document.form2.email.value.charAt(0)=="@"||      
		document.form2.email.value.indexOf('@', 0) == -1 ||
		document.form2.email.value.indexOf('.', 0) == -1 ||
		document.form2.email.value.lastIndexOf("@")==document.form2.email.value.length-1 ||
		document.form2.email.value.lastIndexOf(".")==document.form2.email.value.length-1)
		{
		alert("email address format is incorrect!");
		document.form2.email.focus();
		return false;
		}
  }
	 else
		{
		alert("Please enter the e-mail!");
		document.form2.email.focus();
		return false;}
     return true;
 }
 
