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 del_reg()
{

/*
if ( ( document.all.check1.checked == false ) && ( document.all.check2.checked == false ) )
	{
 alert("Please enter your initials");
		 document.all.check1.focus();
         return false; 
	}

*/
if(document.all.name.value =="")
	{
	     alert("Please enter your firstname");
		 document.all.name.focus();
         return false; 
	
	}
	if(document.forms[0].name.value !="")
	{
     if(!isNaN(document.forms[0].name.value))
		{
		 alert("firstname should not be numeric");
		 document.forms[0].name.focus();
         return false; 
		}
	
	}
	if(document.all.name2.value =="")
	{
	     alert("Please enter your lastname");
		 document.all.name2.focus();
         return false; 
	
	}
	if(document.forms[0].name2.value !="")
	{
     if(!isNaN(document.forms[0].name2.value))
		{
		 alert("lastname should not be numeric");
		 document.forms[0].name2.focus();
         return false; 
		}
	
	}
	if(document.all.desi.value =="")
	{
	     alert("Please enter your designation");
		 document.all.desi.focus();
         return false; 
	
	}
	if(document.all.org.value =="")
	{
	     alert("Please enter your orgination");
		 document.all.org.focus();
         return false; 
	
	}
	if(document.all.email.value =="")
	{
    	 alert("Please enter your Email ID");
		 document.all.email.focus();
         document.all.email.select();
         return false; 
	}
if(document.all.email.value !="")
	{
     if(echeck(document.all.email.value)==false)
		{
		 document.all.email.focus();
         document.all.email.select();
         return false; 
		}
       
		 }
 if(document.all.phone.value =="")
	{
	 alert("Please enter the Phone number ");
		 document.all.phone.focus();
         document.all.phone.select();
         return false; 
	}
	
	
	/*
	if ( ( document.all.radio1.checked == false ) && ( document.all.radio2.checked == false ) && ( document.all.radio3.checked == false ) )
	{
 alert("Please enter your registration city");
		 document.all.check1.focus();
         return false; 
	}
	*/
	return true;
}