// JavaScript Document
function checkfield(loginform)
{
	ok=true
	var xx=document.getElementById("hiddenvalue").value;

	  if(loginform.name.value=="")
	{
		alert("Please Enter The Name.")
		loginform.name.focus()
		ok=false
	}
	 	else if (loginform.country.value == "")
	{
		alert("Please Select your Country.");
		loginform.country.focus();
		ok=false
	} 
    else if (loginform.email.value == "")
	{
		alert("Please enter a value for the Email field.");
		loginform.email.focus();
		ok=false
	}
	else if (!isEmailAddr(loginform.email.value))
	{
		alert("Please enter a complete Email address in the form: yourname@yourdomain.com");
		loginform.email.focus();
		ok=false
	}
	 else if(loginform.mobile.value=="")
	{
		alert("Please Enter The Contact No.")
		loginform.mobile.focus()
		ok=false
	}
   
    else if(loginform.date.value=="")
	{
		alert("Please Enter Date .")
		loginform.date.focus()
		ok=false
	}
	
	
		else if (loginform.Adults.value == "")
	{
		alert("Please Enter Adults.");
		loginform.Adults.focus();
		ok=false
	}	else if (loginform.Childs.value == "")
	{
		alert("Please Enter Children.");
		loginform.Childs.focus();
		ok=false
	}
	
		else if (loginform.Pay_mode.value == "")
	{
		alert("Please Select the Pay Mode.");
		loginform.Pay_mode.focus();
		ok=false
	}
		else if (loginform.request.value == "")
	{
		alert("Please specify your Request.");
		loginform.request.focus();
		ok=false
	}
		else if(loginform.validation.value=="")
	{
		alert("Please Enter The Validation code.")
		loginform.validation.focus()
		ok=false
	}
	else if(loginform.validation.value!=xx)
	{
		alert("Please Enter The Validation code as shown in the Left.")
		loginform.validation.focus()
		ok=false
	}
	return ok
}

function ValidateNum(input,event){
			var keyCode = event.which ? event.which : event.keyCode;
			if(parseInt(keyCode)>=48 && parseInt(keyCode)<=57){
				return true;
			}
			return false;
		}
function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
	var pindex = theStr.indexOf(".",index);
	if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}// JavaScript Document
function get_random()
{

    var xx=null;
	var yy='xzc';
	
	xx=Math.floor(Math.random()*9);
	return xx;
	
}

function lockcode()
{
var zz=new Array();
			
			 zz[0]=get_random();
			 zz[1]=get_random();
			 zz[2]=get_random();
			 zz[3]=get_random();
			
			var xx=""+zz[0]+zz[1]+zz[2]+zz[3];
			
			document.write('<input type=hidden  name=hiddenvalue id=hiddenvalue value='+xx+' />');
			document.write('<img  src=/image/'+zz[0]+'.png /><img  src=/image/'+zz[1]+'.png /><img  src=/image/'+zz[2]+'.png /><img  src=/image/'+zz[3]+'.png />');
			
}


