

function checkfield(loginform)

{

	ok=true

	var xx=document.getElementById("hiddenvalue").value;

	

           if(loginform.Name.value=="")

	{

		alert("Please Enter Your Name.")

		loginform.name.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 your email-id without any white space character");

		loginform.email.focus();

		ok=false

	}

	else if(loginform.Phone.value=="")

	{

		alert("Please Enter Telephone No.")

		loginform.phone.focus()

		ok=false

	}



	

	else if(loginform.Adults.value=="")

	{

		alert("Please Select The Adults.")

		loginform.Adults.focus()

		ok=false

	}

    else if(loginform.children.value=="")

	{

		alert("Please Select The Children.")

		loginform.children.focus()

		ok=false

	}
  else if(loginform.package.value=="")

	{

		alert("Please Select Package.")

		loginform.package.focus()

		ok=false

	}

       	 else if(loginform.Country.value=="")

	{

		alert("Please Select Country.")

		loginform.Country.focus()

		ok=false

	}





       	 else if(loginform.Travel_date.value=="")

	{

		alert("Please Enter Travel date.")

		loginform.Travel_date.focus()

		ok=false

	}

else if(loginform.Description.value=="")

	{

		alert("Please Enter Your Requirement.")

		loginform.Description.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 Correct Validation code as shown in the Left.")

		loginform.validation.focus()

		ok=false

	}







	return ok

}

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;

}



function ValidateNum(input,event){

			var keyCode = event.which ? event.which : event.keyCode;

			if(parseInt(keyCode)>=48 && parseInt(keyCode)<=57){

				return true;

			}

			return false;

		}

///////////////////////////////////////////



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();

			 zz[4]=get_random(); 

                     

			var xx=""+zz[0]+zz[1]+zz[2]+zz[3]+zz[4];

			

			document.write('<input type=hidden  name=hiddenvalue id=hiddenvalue value='+xx+' />');

			document.write('<img  src=images/'+zz[0]+'.png /><img  src=images/'+zz[1]+'.png /><img  src=images/'+zz[2]+'.png /><img  src=images/'+zz[3]+'.png /><img  src=images/'+zz[4]+'.png />');

			

}


