function isEmail(s)
{
	var i = 1,Length = s.length,result;

	while((i<Length) && (s.charAt(i) != '@')) i++;
	
	if ((i == Length) || (s.charAt(i) != '@'))
	{
		alert("Email address don\'t have the character @ after the login name.");
		return false;
	}
	
	i+=2;
	
	while((i<Length) && (s.charAt(i) != '.')) i++;

	if ((i == Length) || (s.charAt(i) != '.'))
	{
		alert("Email address don\'t have the character . after the domain name.");
		return false;
	}

	if (i+1 >= Length)
	{
		alert("Email address should have atleast one character after . ");
		return false;
	}
	
	return true;
}
//-->

/*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){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

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

 		 return true					
	}*/


function checkalphanumeric(str)
{
	
	var x=str.value;
	//var filter="^[a-zA-Z0-9]+$";
	var filter= /^([a-z A-Z \s 0-9 /]*)$/;
	if(!filter.test(x))
	{
		
		alert('Type Alpha Numeric Values Only');
		str.value="";
		str.focus();
		}
		else
		{
			//return false;
			return true;
			}
	}
	
	function checkalpha(str)
{
	
	var x=str.value;
	var filter= /^([a-z A-Z \s ]*)$/;
	if(!filter.test(x))
	{
		
		alert('Type Alphabets Only');
		str.value="";
		str.focus();
		}
		else
		{
			//return false;
			return true;
			}
	}
	
	function checknumeric(str)
{
	
	var x=str.value;
	var filter= /^([0-9\s]*)$/;
	if(!filter.test(x))
	{
		
		alert('Type Digits values Only');
		str.value="";
		str.focus();
		}
		else
		{
			//return false;
			return true;
			}
	}
	function checkfloat(str)
{
	
	var x=str.value;
	var filter= /^([0-9 . \s]*)$/;
	if(!filter.test(x))
	{
		
		alert('Type Numbers Only');
		str.value="";
		str.focus();
		}
		else
		{
			//return false;
			return true;
			}
	}
