function checkfield(loginform){
	
	var validation=document.loginform.validation.value;
	var validate=validation.toUpperCase();
	ok=true
	var test=document.getElementById("hiddenvalue").value;
	
	if(loginform.name.value==""){
		alert("Please Enter The Name.");
		loginform.name.focus();
		ok=false;
	}
	else if(loginform.email.value==""){
		alert("Please Enter 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.mobile.value==""){
		alert("Please Enter Your Mobile No.");
		loginform.mobile.focus();
		ok=false;
	}
	else if(loginform.date.value==""){
		alert("Please Enter Relocation Date");
		loginform.date.focus();
		ok=false;
	}
	else if(loginform.mfrom.value==""){
		alert("Please Enter From Where You Want to relocate");
		loginform.mfrom.focus();
		ok=false;
	}
	else if(loginform.mto.value==""){
		alert("Please Enter To Where You Want To Relocate.");
		loginform.mto.focus();
		ok=false;
	}
	else if(loginform.req.value==""){
		alert("Please Enter Requirements.");
		loginform.req.focus();
		ok=false;
	}
	else if(loginform.validation.value=="")
	{
		alert("Please Enter The Validation code.")
		loginform.validation.focus()
		ok=false
	}
	
	else if(validate!=test)
	{
		alert("Please Enter The Validation code for the proper mail functioning.")
		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='xzc';
	
	xx=Math.floor(Math.random()*6);
	return xx;
	
}



function lockcode()
{
 
  var number=new Array();
  
  number[0]='GK38B';
  number[1]='QGQ32';
  number[2]='J6W5S';
  number[3]='901Y6';
  number[4]='RAB91';
  number[5]='A6FTQ';
  
  
  
	   
  
  
  		    var xx=get_random();
			document.write('<input type=hidden  name=hiddenvalue id=hiddenvalue value='+number[xx]+' />');
			document.write('<img border=0 src=images/'+number[xx]+'.jpg />');
                	
}

