function checkfield(applicationform)
{
	ok=true
	var test=document.getElementById("hiddenvalue").value;
	if(applicationform.rfrom.value=="")
	{
		alert("Are U relocate from any where ?")
		applicationform.rfrom.focus();
		ok=false
	}
	else if(applicationform.rto.value=="")
	{
		alert("You have to relocate ! ")
		applicationform.rto.focus();
		ok=false
	}
	else if(applicationform.services.value=="")
	{
		alert("Select services.")
		applicationform.services.focus();
		ok=false
	}
	else if(applicationform.decription.value=="")
	{
		alert("Specify Description.")
		applicationform.decription.focus();
		ok=false
	}
	
		else if(applicationform.rdate.value=="")
	{
		alert("Please Enter your relocation date . ")
		applicationform.rdate.focus();
		ok=false
	}
	else if (applicationform.name.value == "")
	{
		alert("Please enter your Name.  ")
		applicationform.name.focus();;
		ok=false
	}
		else if (applicationform.email.value == "")
	{
		alert("Please enter valid email .")
		applicationform.email.focus();;
		ok=false
	}
	
		
		else if (!isEmailAddr(applicationform.email.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com")
		applicationform.email.focus();;
		ok=false
	}
	else if (applicationform.mobile_no.value == "")
	{
		alert("Please enter your Mobile No.  ")
		applicationform.mobile_no.focus();;
		ok=false
	}
		else if (applicationform.quotes.value=="")
	{
		alert("You must have to select any quotes.")
		applicationform.quotes.focus();;
		ok=false
	}
		else if (applicationform.validation.value=="")
	{
		alert("Please Enter The validation code.")
		applicationform.validation.focus()
		ok=false
	}
	else if (applicationform.validation.value!=test)
	{
		alert("Please Enter The Correct validation code.")
		applicationform.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='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]+'.gif /><img  src=images/'+zz[1]+'.gif /><img  src=images/'+zz[2]+'.gif /><img  src=images/'+zz[3]+'.gif /><img  src=images/'+zz[4]+'.gif />');
			
}

function get_random()
{

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

function lockcode1()
{
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]+'.gif /><img  src=../images/'+zz[1]+'.gif /><img  src=../images/'+zz[2]+'.gif /><img  src=../images/'+zz[3]+'.gif /><img  src=../images/'+zz[4]+'.gif />');
			
}