function checkfield(loginform)
{

     var validate=document.loginform.validation.value;
	 var chek=validate.toUpperCase();
	ok=true
	var test=document.getElementById("validatecode").value;
	if(loginform.name.value=="")
	{
		alert("Please Enter Your Name.")
		loginform.name.focus()
		ok=false
	}
	else if(loginform.address.value=="")
	{
		alert("Please Enter address.")
		loginform.address.focus()
		ok=false
	}
	else if(loginform.city.value=="")
	{
		alert("Please Enter City or Town Name.")
		loginform.city.focus()
		ok=false
	}
	else if(loginform.phone.value=="")
	{
		alert("Please Enter Phone No.")
		loginform.phone.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.requirement.value == "")
	{
		alert("Please specify your requirements.");
		loginform.requirement.focus();
		ok=false
	}
	else if (loginform.validation.value=="")
	{
		alert("Please Enter The validation code.")
		loginform.validation.focus();
		ok=false
	}
	else if (chek!=test)
	{
		alert("Please Enter The Correct validation code.")
		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 get_random() {
	var xx=null;
	var yy='XYZ';
	xx=Math.floor(Math.random()*9)
	return xx;
}
function lockcode() {
	var number=new Array();
	number[0]='WORK';
	number[1]='4HM8';
	number[2]='56H8';
	number[3]='EAPN';
	number[4]='JUMP';
	number[5]='NFAS';
	number[6]='PJBT';
	number[7]='SH8E';
	number[8]='ULKT';	
	
	var xx=get_random();
	document.write("<input type='hidden' id='validatecode' name='validatecode' value='"+number[xx]+"' >");
	document.write('<img border="0" src=../images/'+number[xx]+'.gif />');
}
function checkfield(loginform)
{
     var validate =document.loginform.validation.value;
	 var chek =validate.toUpperCase();
	ok=true
	var xx=document.getElementById("validatecode").value;
	if(loginform.name.value=="")
	{
		alert("Please Enter Your Name.")
		loginform.name.focus()
		ok=false
	}
	else if(loginform.country.value=="")
	{
		alert("Please Enter Country Name.")
		loginform.country.focus()
		ok=false
	}
	else if(loginform.phone.value=="")
	{
		alert("Please Enter Phone Number.")
		loginform.phone.focus()
		ok=false
	}
	else if (loginform.email.value == "")
	{
		alert("Please enter a value for the email.");
		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.no_of_days.value == "")
	{
		alert("Please enter a value for the Duration of Travel in India.");
		loginform.no_of_days.focus();
		ok=false
	}
	else if (loginform.intended_month_year_of_visit.value == "")
	{
		alert("Please specify Intended Month &amp; Year of Visit.");
		loginform.intended_month_year_of_visit.focus();
		ok=false
	}
		else if (loginform.adults.value == "")
	{
		alert("Please specify Number of People Travelling.");
		loginform.adults.focus();
		ok=false
	}
	else if (loginform.details_of_services.value == "")
	{
		alert("Please specify your requirements.");
		loginform.details_of_services.focus();
		ok=false
	}
		else if(loginform.validation.value=="")
	{
		alert("Please Enter The Validation code.")
		loginform.validation.focus()
		ok=false
	}
	else if(chek!=xx)
	{
		alert("Please Enter The 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 checkfield(loginform)
{
	var validate =document.loginform.validation.value;
	var chek=validate.toUpperCase();
	ok=true
	var xx=document.getElementById("validatecode").value;
	if(loginform.websiteurl.value=="")
	{
		alert("Please Enter Your Website Url.");
		loginform.websiteurl.focus();
		ok=false
	}

	else if(loginform.websitetitle.value=="")
	{
		alert("Please specify Your Website Title.");
		loginform.websitetitle.focus();
		ok=false
	}
	else if(loginform.name.value=="")
	{
		alert("Please Enter  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 a complete email address in the form: yourname@yourdomain.com");
		loginform.email.focus();
		ok=false
	}
	else if (loginform.address.value=="")
	{
		alert("Please Enter the Correct Address.");
		loginform.address.focus();
		ok=false
	}
		else if(loginform.linkurl.value=="")
	{
		alert("Please Enter Link Url.");
		loginform.linkurl.focus();
		ok=false
	}
	
	else if(loginform.website_des.value=="")
	{
		alert("Please Enter Website Description.");
		loginform.website_des.focus();
		ok=false
	}
	else if(loginform.webcat.value=="")
	{
		alert("Please Select The Cateogary of website.");
		loginform.webcat.focus();
		ok=false
	}
    else if(loginform.comments.value=="")
	{
		alert("Please Enter The Comments.");
		loginform.comments.focus();
		ok=false
	}
	else if(loginform.validation.value=="")
	{
		alert("please enter validation code");
		loginform.validation.focus();
		ok=false;
	}
	else if(chek!=xx)
	{
		alert("please enter correct validation code");
		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 get_random()
	{
	var xx=null;
	var yy='XYZ';
	xx=Math.floor(Math.random()*9)
	return xx;
		}
function lockcode()
{
var number=new Array();
number[0]='WORK';
number[1]='4HM8';
number[2]='56H8';
number[3]='EAPN';
number[4]='JUMP';
number[5]='NFAS';
number[6]='PJBT';
number[7]='SH8E';
number[8]='ULKT';	

            var xx=get_random();
			document.write('<input type=hidden id=validatecode name=validatecode value='+number[xx]+'>');
			document.write('<img border=0 src=images/'+number[xx]+'.gif />');
			}
function checkfield(loginform)
{
	ok=true
	if(loginform.name.value=="")
	{
		alert("Please Enter Your Name.")
		loginform.name.focus()
		ok=false
	}
	else if(loginform.address.value=="")
	{
		alert("Please Enter Address.")
		loginform.address.focus()
		ok=false
	}
	else if(loginform.tel_no.value=="")
	{
		alert("Please Enter Phone Number.")
		loginform.tel_no.focus()
		ok=false
	}
	else if(loginform.country.value=="")
	{
		alert("Please Enter Country Name.")
		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.details_of_services.value == "")
	{
		alert("Please specify your requirements.");
		loginform.details_of_services.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;
}

