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 eve_reg()
{
if(document.form1.name.value =="")
	{
	     alert("Please enter your firstname");
		 document.form1.name.focus();
         return false; 
	
	}
	if(document.form1.name.value !="")
	{
     if(!isNaN(document.form1.name.value))
		{
		 alert("firstname should not be numeric");
		 document.form1.name.focus();
         return false; 
		}
	
	}
	if(document.form1.name2.value =="")
	{
	     alert("Please enter your lastname");
		 document.form1.name2.focus();
         return false; 
	
	}
	if(document.form1.name2.value !="")
	{
     if(!isNaN(document.form1.name2.value))
		{
		 alert("lastname should not be numeric");
		 document.form1.name2.focus();
         return false; 
		}
	
	}
	if(document.form1.desi.value =="")
	{
	     alert("Please enter your designation");
		 document.form1.desi.focus();
         return false; 
	
	}
	if(document.form1.org.value =="")
	{
	     alert("Please enter your orgination");
		 document.form1.org.focus();
         return false; 
	
	}
	if(document.form1.email.value =="")
	{
    	 alert("Please enter your Email ID");
		 document.form1.email.focus();
         document.form1.email.select();
         return false; 
	}
if(document.form1.email.value !="")
	{
     if(echeck(document.form1.email.value)==false)
		{
		 document.form1.email.focus();
         document.form1.email.select();
         return false; 
		}
       
		 }
 if(document.form1.phone.value =="")
	{
	 alert("Please enter the Phone number ");
		 document.form1.phone.focus();
         document.form1.phone.select();
         return false; 
	}
	
	/*
	if  ( document.form1.check3.checked == false &&
	document.form1.check4.checked == false &&
	document.form1.check5.checked == false &&
	document.form1.check6.checked == false &&
	document.form1.check7.checked == false &&
	document.form1.check8.checked == false &&
    document.form1.check9.checked == false &&
	document.form1.check10.checked == false &&
	document.form1.check11.checked == false &&
	document.form1.check12.checked == false 
	) 


	{
 alert("Please enter atlest one special event");
		
         return false; 
	}
	
*/


var chkd=0;
for(i=6;i<15;i++)
	{
	if(document.form1.elements[i].checked)
		{
		chkd=1;
		}
	}
	if(chkd==0)
	{
		alert("Please select type of events");
		return false
	}
	return true;
}