function bodyLoad() 
{
	document.frmcareer.fname.focus();

}
	
	//-----------------Code added by imtiyaz-------------------------
	function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
			return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		      return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		      return false
		 }

 		 return true					
	}

	//---------------- end of Code added by imtiyaz------------------

	var digits = "0123456789";
	var phoneNumberDelimiters = "()- ";
	var validWorldPhoneChars = phoneNumberDelimiters + "+";
	var minDigitsInIPhoneNumber = 14;
	
	function isInteger(s)
	{  
		var i;
		for (i = 0; i < s.length; i++)
		{   
			// Check that current character is number.
			var c = s.charAt(i);
			if (((c < "0") || (c > "9"))) return false;
		}
		// All characters are numbers.
		return true;
	}
	
	function trim(s)
	{   var i;
		var returnString = "";
		// Search through string's characters one by one.
		// If character is not a whitespace, append to returnString.
		for (i = 0; i < s.length; i++)
		{   
			// Check that current character isn't whitespace.
			var c = s.charAt(i);
			if (c != " ") returnString += c;
		}
		return returnString;
	}
	
	function stripCharsInBag(s, bag)
	{   var i;
		var returnString = "";
		// Search through string's characters one by one.
		// If character is not in bag, append to returnString.
		for (i = 0; i < s.length; i++)
		{   
			// Check that current character isn't whitespace.
			var c = s.charAt(i);
			if (bag.indexOf(c) == -1) returnString += c;
		}
		return returnString;
	}
	
function chkcareerform()
{
		var position = document.frmcareer.position_type;
        var fname = document.frmcareer.fname;	
		var mobile = document.frmcareer.mobile;
		var experience = document.frmcareer.experience;
		var email = document.frmcareer.email;
		var country = document.frmcareer.country;
		var resume = document.frmcareer.resume;
		
		var aRateVal 	= email.value.indexOf("@");
		var aDotVal 	= email.value.indexOf(".");
		
		if(position.value == '')	
		{
			alert("Please Enter the Position for Application");
			fname.focus();
			return false;
		}
		
		if(fname.value == '')	
		{
			alert("Please Enter First name.");
			fname.focus();
			return false;
		}	
		
		if(email.value == '')	
		{
			alert("Please Enter Email Address.");
			email.focus();
			return false;
		}
		
		if (echeck(email.value)==false)
		{
			alert("Please Enter the valid email")
			//emailID.value=""
			email.focus();
			return false
		}
		
		if(experience.value == '')	
		{
			alert("Please Enter Experience");
			email.focus();
			return false;
		}
		
		if(country.value == '')	
		{
			alert("Please Select Country.");
			country.focus();
			return false;
		}
		if(mobile.value == '')	
		{
			alert("Please Enter Contact Number");
			email.focus();
			return false;
		}
		if(resume.value == '')	
		{
			alert("Please Upload your Resume");
			email.focus();
			return false;
		}
		
 }
