// JavaScript Document
function emailCheck() 
  	{
  	  	var emailPat=/^(.+)@(.+)$/
  	  	
  	  	var emailStr = document.frmcareer.email.value;   	  	
  	  	
  	  	if(emailStr.length > 1)
  	  	{  	  	
			var matchArray = emailStr.match(emailPat);

			if (matchArray == null) 
			{
				alert("Please Enter Correct Email Address"); 
                    document.frmcareer.email.focus();
				return false;
			}	
			else{
				return true;
			}  		
  		}
  	  	
    }
	
  function checkform(){
	var i,bval;
	mandFieldName=new Array(20);
	mandField=new Array(20);
	mandFieldName[0]="Name ";
	mandFieldName[1]="Email ";

	mandField[0]=document.frmcareer.name.value;
	mandField[1]=document.frmcareer.email.value;

	bval=true;
	for (i=0;i<=1;i++){
		if (mandField[i]=="" && bval==true){
			alert("Please fill " + mandFieldName[i] + " field.");
			bval=false;
			if(i==0)
			   document.frmcareer.name.focus();
			else
			   document.frmcareer.email.focus();
			break;
		}
	}
	if(bval){
		bval=emailCheck();
	}

	return bval;
  }