function callEmpSend()
 {
 		var userEmail=document.getElementById('txtEmployeerName').value;
		
		
		if(userEmail!="")
		{
			
			
			var flag = isEmail(userEmail);
				if(flag != true)
				{
				alert("Invalid UserName... must be an Email Address.");
				document.txtUserName.focus();
				}
				else
				{
					window.location="code/email.php?eemail="+userEmail+"";
					
				}
		}
		else
		{
			alert('UserName Field Empty');
		}

 }
  function isEmail (theStr) 
	{
 		var atIndex = theStr.indexOf('@');
	  var dotIndex = theStr.indexOf('.', atIndex);
	  var flag = true;
	  theSub = theStr.substring(0, dotIndex+1)
	  if ((atIndex < 1)||(atIndex != theStr.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(theStr.length <= theSub.length)) 
	  {  
	   flag = false; 
	  }
	  else 
	 { 
	   flag = true; 
	 }
  return(flag);
}
