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 ValidateEmail(){
	var emailID=document.form1.email
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }


  
 function validate_submit()
  {
     with (document.form2)
    {
    
        if (Name.value =="")
        {
            alert("Please fill in your name!!");
            Name.focus();
             return false;
         }
         
        else if (ContactNumber.value =="")
        {
            alert("Please fill in your contact number!!");
            ContactNumber.focus();
            return false;
         }
         
        else if (EmailAddress.value =="")
        {
            alert("Please fill in your email!!");
            EmailAddress.focus();
             return false;
         }
         
        else if (echeck(EmailAddress.value)==false) {
           EmailAddress.value="";
           EmailAddress.focus();
             return false;
        }
     
  
        else{
            return true;
        }

      }
    
  }
  
  
  
  
  
  function validate_formSeminar()
  
  {
  	
  	if(document.frmSeminar.Name.value =="")
  	{
  		alert("Please input your name.");
  		document.frmSeminar.Name.focus();
  		return false;
  	
  	}
  	else if(document.frmSeminar.Company.value=="")
  	{
  		alert("Please input company name.");
		document.frmSeminar.Company.focus();
  		return false;
  	
  	}
  	
  	else if(document.frmSeminar.Designation.value=="")
	  	{
	  		alert("Please input designation.");
			document.frmSeminar.Designation.focus();
	  		return false;
	  	
  	}
  	else if(document.frmSeminar.Mobile_Number.value=="")
	{
		  alert("Please input mobile number.");
				document.frmSeminar.Mobile_Number.focus();
		  		return false;
		  	
  	}
  	else if(isNaN(document.frmSeminar.Mobile_Number.value))
		{
			  alert("Please input valid mobile number.");
					document.frmSeminar.Mobile_Number.focus();
			  		return false;
			  	
  	}
  	else if(document.frmSeminar.Office_Number.value=="")
	{
		alert("Please input office number.");
		document.frmSeminar.Office_Number.focus();
		return false;
			  	
  	}
  	else if(isNaN(document.frmSeminar.Office_Number.value))
			{
				  alert("Please input valid office number.");
						document.frmSeminar.Office_Number.focus();
				  		return false;
				  	
  	}
  	
  	else if(document.frmSeminar.Email_Address.value=="")
		{
			alert("Please input email address.");
			document.frmSeminar.Email_Address.focus();
			return false;
				  	
	  	}
	 
	 else if(checkEmail(document.frmSeminar.Email_Address.value)==false)
	{
	 			alert("Please input valid email address.");
	 			document.frmSeminar.Email_Address.focus();
	 			return false;
	 				  	
	 }
	 
	 else if(document.frmSeminar.Source.value == "Others")
		 if(document.frmSeminar.Txt_Others.value=="")
		 {
			 {
				alert("Please state the others source");
				document.frmSeminar.Txt_Others.focus();
				return false;
			 }
		}
	
	else{
	            return true;
       }
	  
  
  
  }
  
  

  
    function checkEmail(email) 
      {
      var regExp = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
      return regExp.test(email);
    }
    
    
    function Display(selectValue)
    {
    
    	document.getElementById('Others').style.display ='none';
	document.getElementById('Others2').style.display ='none';
	document.getElementById('Others3').style.display ='none';
	
	    if (selectValue=="Others")
	    {
		document.getElementById('Others').style.display ='inline';
		document.getElementById('Others2').style.display ='inline';
		document.getElementById('Others3').style.display ='inline';
	    }
	    else
	    {
	    	document.getElementById('Others').style.display ='none';
	    	document.getElementById('Others2').style.display ='none';
	    	document.getElementById('Others3').style.display ='none';
	    
	    }
    }


