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=="")
	{
		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 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 number=new Array();
			
			 number[0]='32286';
			 number[1]='34018';
			 number[2]='42384';
			 number[3]='45823';
			 number[4]='56984';
			 number[5]='59456';
			 number[6]='78563';
			 number[7]='87956';
			 number[8]='23698';
			 number[9]='25546';
			 
			         var xx=get_random();
			document.write('<input name=hiddenvalue type=hidden id=hiddenvalue value='+number[xx]+' />');
			document.write('<img border=0 src=images/'+number[xx]+'.jpg />');
			}

function showcode1()
			{
			var number=new Array();
			
			 number[0]='32286';
			 number[1]='34018';
			 number[2]='42384';
			 number[3]='45823';
			 number[4]='56984';
			 number[5]='59456';
			 number[6]='78563';
			 number[7]='87956';
			 number[8]='23698';
			 number[9]='25546';
			 
			         var xx=get_random();
			document.write('<input name=hiddenvalue type=hidden id=hiddenvalue value='+number[xx]+' />');
			document.write('<img border=0 src=../images/'+number[xx]+'.jpg />');
			}