function checkfield(applicationform)
{
	ok=true
	var xx=document.getElementById("hiddenvalue").value;
	if(applicationform.fromname.value=="")
	{
		alert("Please Enter Your Name.")
		applicationform.fromname.focus();;
		ok=false
	}
	else if(applicationform.age.value=="")
	{
		alert("Please Enter your Age")
		applicationform.age.focus();;
		ok=false
	}
		else if(applicationform.postapplied.value=="Select Any One")
	{
		alert("Please Position Value your Applied")
		applicationform.postapplied.focus();
		ok=false
	}	
		else if(applicationform.tel_no.value=="")
	{
		alert("Please Enter your contact no.")
		applicationform.tel_no.focus();
		ok=false
	}
		else if (applicationform.fromemail.value == "")
	{
		alert("Please enter a Correct value for the fromemail field.")
		applicationform.fromemail.focus()
		ok=false
	}
	else if (!isEmailAddr(applicationform.fromemail.value))
	{
		alert("Please enter a complete fromemail address in the form: yourname@yourdomain.com")
		applicationform.fromemail.focus();;
		ok=false
	}
		else if (applicationform.e_salary.value == "")
	{
		alert("Please enter your Salary Expected ")
		applicationform.e_salary.focus();;
		ok=false
	}
		
		else if (applicationform.resume.value == "")
	{
		alert("Please Paste your Resume Here ")
		applicationform.resume.focus()
		ok=false
	}
		else if (applicationform.validation.value == "")
	{
		alert("Please Enter The Validation code.")
		applicationform.validation.focus()
		ok=false
	}
		else if (applicationform.validation.value!=xx)
	{
		alert("Please Enter The Validation code as shown in the Left.")
		applicationform.validation.focus()
		ok=false
	}
	return ok
}
function isEmailAddr(fromemail)
{
  var result = false
  var theStr = new String(fromemail)
  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 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]+'.png /><img  src=images/'+zz[1]+'.png /><img  src=images/'+zz[2]+'.png /><img  src=images/'+zz[3]+'.png /><img  src=images/'+zz[4]+'.png />');
			
}