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 spon_reg()
{
//var isOneChecked =false;
//var isOneChecked1 =false;
//alert(document.form1.check1.length);
/*for(var i=0;i<document.form1.check1.length;i++)
	{

if (document.form1.check1[i].checked)
{
isOneChecked =true;
break;
}
if (!isOneChecked) {
        alert('You must enter your Initials.');
         return false;
    }
	}*/


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.all.radio1.value == "" ) 
	{
 alert("Please enter your registration city");
 document.all.radio1.focus();
 return false; 
	}*/
/*	function checkForm(form1) { 
for (var i=0; i<form.radio1.length; i++) { 
if (form1.radio1.checked == false) { 
alert("you have to choose a button"); 
return false; 
} 
} 
alert("this is not working"); 
} 


	var btn=valButton(form1.radio1);
	if(btn==null)
	{
		alert("enter  your registration city");
	document.all.radio1.focus();
    return false; 
	}*/

	return true;
}