// JavaScript Document


	function frmvalidation()
	{
		
		
		var x=document.frm;
		str =x.email.value;
		var at="@"
		var dot="."
		var lat=str.indexOf(at);
		var lstr=str.length;
		
		if(document.frm.name.value=="") 
		{
			alert("Please Enter the name");
			x.name.focus();
			return false;	
		}
		
		
		if(x.email.value=="")	//Email Validation Start			
		{ 
			alert("Please Enter Email id");
			x.email.focus(); 
			return false;
		}	
		else
		{
						//### Email validation  ###		

				if (str.indexOf(at)==-1)
				{
				   alert("Invalid E-mail ID")
				   x.email.focus();
				   return false
				}

				if
				 (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
				   alert("Invalid E-mail ID")
				   x.email.focus();
				   return false
				}

				if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
				    alert("Invalid E-mail ID")
				    x.email.focus();
				    return false
				}

				 if (str.indexOf(at,(lat+1))!=-1){
				    alert("Invalid E-mail ID")
				    x.email.focus();
				    return false
				 }

				 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
				    alert("Invalid E-mail ID")
				    x.email.focus();
				    return false
				 }

				 if (str.indexOf(dot,(lat+2))==-1){
				    alert("Invalid E-mail ID")
				    x.email.focus();
				    return false
				 }
						
				if (str.indexOf(" ")!=-1){
				   alert("Invalid E-mail ID")
				   x.email.focus();
				   return false
				}				//Email Validation End			
			
		//if(document.frm.date.value==-1)
//		{
//			alert("Select Your Date Of The Birth");
//			document.frm.date.focus();
//			return false;
//		}
//		
//		if(document.frm.month.value==-1)
//		{
//			alert("Select Your Month Of The Birth");
//			document.frm.month.focus();
//			return false;
//		}
//		
//			if(document.frm.year.value==-1)
//		{
//			alert("Select Your Year Of The Birth");
//			document.frm.year.focus();
//			return false;
//		}
//		
		
		
		//if(document.frm.designation.value=="")
//		{
//			alert("Enter Your Designation.");
//			document.frm.designation.focus();
//			return false;
//		}
//		
			if(document.frm.interest.value=="")
		{
			alert("Please Select Your Interest.");
			document.frm.interest.focus();
			return false;
		}
		if(document.frm.mob.value=="")
		{
			alert("Please Enter Mobile Number.");
			document.frm.mob.focus();
			return false;
		}
		
		if(document.frm.company.value=="")
		{
			alert("Please Enter Your Company Name");
			document.frm.company.focus();
			return false;
		}
		
			if(document.frm.country.value=="")
		{
			alert("Please Select Country");
			document.frm.country.focus();
			return false;
		}
		
//			if(document.frm.city.value=="")
//		{
//			alert("Enter City.");
//			document.frm.city.focus();
//			return false;
//		}
//		
//			if(document.frm.area.value=="")
//		{
//			alert("Enter Area Code.");
//			document.frm.area.focus();
//			return false;
//		}
//		
//				if(document.frm.tel.value=="")
//		{
//			alert("Enter Telephone Number.");
//			document.frm.tel.focus();
//			return false;
//		}
		
	
		
		if(document.frm.city.value=="")
		{
			alert("Please Enter Your City Name.");
			document.frm.city.focus();
			return false;
		}
		
		
		}			
		
		
		
		//if(document.frm.prefered.value=="")
//		{
//			alert("Enter Your Prefered Time Of Contact..");
//			document.frm.prefered.focus();
//			return false;
//		}

	return true;
	}

