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 Validate1()
        {
		   var phonec=window.document.frmregistration.phone_country.value;
		   var invalid=" ";
		   
		   if(isNaN(phonec)||phonec.indexOf(" ")!=-1)
           {
              alert("Enter Only number in Phone Country code")
              return false; 
           }
		     return true;
        }
		function Validate2()
        {
		   var phonea=window.document.frmregistration.phone_area.value;

           if(isNaN(phonea)||phonea.indexOf(" ")!=-1)
           {
              alert("Enter Only Number in Phone Area code")
              return false; 
           }
            return true;
        }
		function Validate3()
        {
		   var phoneno=window.document.frmregistration.phone_no.value;

           if(isNaN(phoneno)||phoneno.indexOf(" ")!=-1)
           {
              alert("Enter Only Number in Phone No")
              return false; 
           }
            return true;
        }	
		function Validate4()
        {
		   var mobilec=window.document.frmregistration.mobile_country.value;

           if(isNaN(mobilec)||mobilec.indexOf(" ")!=-1)
           {
              alert("Enter Only number in Mobile No")
              return false; 
           }
            return true;
        }
		function Validate5()
        {
		   var mobileno1=window.document.frmregistration.mobile_no1.value;

           if(isNaN(mobileno1)||mobileno1.indexOf(" ")!=-1)
           {
              alert("Enter Only Number in Mobile No")
              return false; 
           }
            return true;
        }
		function Validate6()
        {
		   var mobileno2=window.document.frmregistration.mobile_no2.value;

           if(isNaN(mobileno2)||mobileno2.indexOf(" ")!=-1)
           {
              alert("Enter Only Number in Mobile No")
              return false; 
           }
            return true;
        }	
*/		function Validate7()
        {
		   var zip=window.document.frmregistration.zip.value;

           if(isNaN(zip)||zip.indexOf(" ")!=-1)
           {
              alert("Enter Only Number in PIN/ZIP Code")
              return false; 
           }
            return true;
        }	
		/*function space1()
		{
			var invalid=" ";
			if (document.frmregistration.first_name.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}*/
		/*function space2()
		{
			var invalid=" ";
			if (document.frmregistration.address1.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space3()
		{
			var invalid=" ";
			if (document.frmregistration.city.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space4()
		{
			var invalid=" ";
			if (document.frmregistration.state.value.indexOf(invalid) > -1) {
			alert("Sorry, spaces are not allowed.");
			return false;
}
return true;
		}
		function space5()
		{
			var invalid=" ";
			if (document.frmregistration.country.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space6()
		{
			var invalid=" ";
			if (document.frmregistration.zip.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space7()
		{
			var invalid=" ";
			if (document.frmregistration.phone_country.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space8()
		{
			var invalid=" ";
			if (document.frmregistration.phone_area.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space9()
		{
			var invalid=" ";
			if (document.frmregistration.phone_no.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space10()
		{
			var invalid=" ";
			if (document.frmregistration.mobile_country.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space11()
		{
			var invalid=" ";
			if (document.frmregistration.mobile_no1.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space12()
		{
			var invalid=" ";
			if (document.frmregistration.mobile_no2.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}
		function space13()
		{
			var invalid=" ";
			if (document.frmregistration.eduquali.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
return true;
		}*/
function sturegform()
{
//	var uname=window.document.frmregistration.username.value;
//	var pword=window.document.frmregistration.upassword.value;
	var name=window.document.frmregistration.first_name.value;
	var mailid=window.document.frmregistration.spemail.value;
	var address=window.document.frmregistration.address1.value;
	var city=window.document.frmregistration.city.value;
	var state=window.document.frmregistration.state.value;
	var country=window.document.frmregistration.country.value;
	var zip=window.document.frmregistration.zip.value;
	var phonec=window.document.frmregistration.phone_country.value;
	var phonea=window.document.frmregistration.phone_area.value;
	var phoneno=window.document.frmregistration.phone_no.value;
	var mobilec=window.document.frmregistration.mobile_country.value;
	var mobileno1=window.document.frmregistration.mobile_no1.value;
	var mobileno2=window.document.frmregistration.mobile_no2.value;
    var grade=window.document.frmregistration.eduquali.value;
//	var course=window.document.frmregistration.course.value;
	if(name=="")
	{
		alert("Please Enter Your Name");
		window.document.frmregistration.first_name.focus();
		return false;
	}
	/*if(!space1(name))
	{
		window.document.frmregistration.first_name.focus();
		return false;
	}*/
	if(mailid=="")
	{
		alert("Please Enter Your Mail-ID");
		window.document.frmregistration.spemail.focus();
		return false;
	}
	if(!echeck(mailid))
				{
					 window.document.frmregistration.spemail.value="";
					 window.document.frmregistration.spemail.focus();
					  return false;
				}
	if(address=="")
	{
		alert("Please Enter Your Address");
		window.document.frmregistration.address1.focus();
		return false;
	}
	/*if(!space2(address))
	{
		window.document.frmregistration.address1.focus();
		return false;
	}*/
	if(city=="")
	{
		alert("Please Enter Your City");
		window.document.frmregistration.city.focus();
		return false;
	}
	/*if(!space3(city))
	{
		window.document.frmregistration.city.focus();
		return false;
	}*/
	if(state=="")
	{
		alert("Please Enter Your State");
		window.document.frmregistration.state.focus();
		return false;
	}
	/*if(!space4(state))
	{
		window.document.frmregistration.state.focus();
		return false;
	}*/
	if(country=="")
	{
		alert("Please Enter Your Country");
		window.document.frmregistration.country.focus();
		return false;
	}	
	/*if(!space5(country))
	{
		window.document.frmregistration.country.focus();
		return false;
	}*/
	if(zip=="")
	{
		alert("Please Enter Your Zip/Pin");
		window.document.frmregistration.zip.focus();
		return false;
	}
	/*if(!space6(zip))
	{
		window.document.frmregistration.zip.focus();
		return false;
	}*/
	if(!Validate7(zip))
	{
		window.document.frmregistration.zip.value="";
		window.document.frmregistration.zip.focus();
		return false;
		
	}
	if(phonec=="")
	{
		alert("Please Enter Your Phone Country Code");
		window.document.frmregistration.phone_country.focus();
		return false;
	}
	/*if(!space7(phonec))
	{
		window.document.frmregistration.phone_country.focus();
		return false;
	}
		if(!Validate1(phonec))
	{
		window.document.frmregistration.phone_country.value="";
		window.document.frmregistration.phone_country.focus();
		return false;
		
	} */
	if(phonea=="")
	{
		alert("Please Enter Your Phone Area Code");
		window.document.frmregistration.phone_area.focus();
		return false;
	}
	/*if(!space8(phonea))
	{
		window.document.frmregistration.phone_area.focus();
		return false;
	}
	if(!Validate2(phonea))
	{
		window.document.frmregistration.phone_area.value="";
		window.document.frmregistration.phone_area.focus();
		return false;
		
	}*/
	if(phoneno=="")
	{
		alert("Please Enter Your Phone Number");
		window.document.frmregistration.phone_no.focus();
		return false;
	}
	/*if(!space9(phoneno))
	{
		window.document.frmregistration.phone_no.focus();
		return false;
	}
	if(!Validate3(phoneno))
	{
		window.document.frmregistration.phone_no.value="";
		window.document.frmregistration.phone_no.focus();
		return false;
		
	}*/
	if(mobilec=="")
	{
		alert("Please Enter First Three Digit Mobile Number");
		window.document.frmregistration.mobile_country.focus();
		return false;
	}
	/*if(!space10(mobilec))
	{
		window.document.frmregistration.mobile_country.focus();
		return false;
	}
	if(!Validate4(mobilec))
	{
		window.document.frmregistration.mobile_country.value="";
		window.document.frmregistration.mobile_country.focus();
		return false;
		
	}*/
	if(mobileno1=="")
	{
		alert("Please Enter Middle Three Digit Mobile Number");
		window.document.frmregistration.mobile_no1.focus();
		return false;
	}
	/*if(!space11(mobileno1))
	{
		window.document.frmregistration.mobile_no1.focus();
		return false;
	}
	if(!Validate5(mobileno1))
	{
		window.document.frmregistration.mobile_no1.value="";
		window.document.frmregistration.mobile_no1.focus();
		return false;
		
	}*/
	if(mobileno2=="")
	{
		alert("Please Enter Last Four Digit Mobile Number");
		window.document.frmregistration.mobile_no2.focus();
		return false;
	}
	/*if(!space12(mobileno2))
	{
		window.document.frmregistration.mobile_no2.focus();
		return false;
	}
	if(!Validate6(mobileno2))
	{
		window.document.frmregistration.mobile_no2.value="";
		window.document.frmregistration.mobile_no2.focus();
		return false;
		
	}*/
	if(grade=="")
	{
		alert("Please Enter Your Grade");
		window.document.frmregistration.eduquali.focus();
		return false;
	}
	/*if(!space13(grade))
	{
		window.document.frmregistration.eduquali.focus();
		return false;
	}*/
		return true;
}

