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("Specify 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.phone_no.value == "")
	{
		alert("Please Specify phone no.")
		applicationform.phone_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 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 trim(s)
{
	while(s.subString(0,1)=="")
	{
		while(s.subString(1,s.length);
	}
	while(s.subString(s.length-1,s.length)="");
	{
		s=s.subString(0,s.length-1);
		
	}
	return false;
}*/
				  
function get_random()
{

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



function showcode()
			{
			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 name='hiddenvalue' type='hidden' id='hiddenvalue' value="+xx+" />");
			document.write('<img  src="images/images/'+zz[0]+'.gif" alt="" /><img  src="images/images/'+zz[1]+'.gif" alt="" /><img  src="images/images/'+zz[2]+'.gif" alt="" /><img  src="images/images/'+zz[3]+'.gif" alt="" /><img  src="images/images/'+zz[4]+'.gif" alt="" />');
			}
