 function validate()
  	{
  	
      var bln_validate=false;
      var strmssg1="Fields marked with asterisk cannot be left blank.";
      var strmssg2=""; 
      var objerrdiv=document.getElementById('errdiv1'); 
      var shareamt=document.forms[0].txtsharecapital.value;     
      
      
      if(trim(document.forms[0].txtyourname.value)=="")
      {            
            bln_validate=true;  
            document.forms[0].txtyourname.focus();            
      }
	  else if(trim(document.forms[0].txtyourphoneno.value)=="")
      {            
            bln_validate=true;  
            document.forms[0].txtyourphoneno.focus();            
      }
      else if(trim(document.forms[0].txtfirstname.value)=="")
      {           
            bln_validate=true;  
            document.forms[0].txtfirstname.focus();           
             
      } 
	  else if(
			  ((trim(document.forms[0].txtthirdname.value)!="") && ((document.forms[0].txtthirdname.value)	==	(document.forms[0].txtfirstname.value)))||
              ((trim(document.forms[0].txtsecondname.value)!="") && ((document.forms[0].txtsecondname.value)	==	(document.forms[0].txtfirstname.value)))||
              ((trim(document.forms[0].txtsecondname.value)!="") && ((document.forms[0].txtsecondname.value)	==	(document.forms[0].txtthirdname.value)))   
              )
	  {
      
             bln_validate=true;  
             strmssg1="";
             strmssg2=" First , Second and Third Choice must be different.";             
             document.forms[0].txtsecondname.focus();   
      }else if(trim(document.forms[0].txtsharecapital.value)=="")
      {            
            bln_validate=true;  
            document.forms[0].txtsharecapital.focus();            
      }else if(shareamt<1000){
             bln_validate=true;  
             strmssg1="";
             strmssg2=" Share Capital must be greater than equal to 1000.";             
             document.forms[0].txtaddress.focus();        
      }else if(trim(document.forms[0].txtaddress.value)=="")
      {            
            bln_validate=true;  
            document.forms[0].txtaddress.focus();            
      }else if(trim(document.forms[0].txtemail.value)=="")
      {            
            bln_validate=true;  
            document.forms[0].txtemail.focus();                     
      }else if(!CheckEmail(document.getElementById('txtemail').value)){ 
             bln_validate=true;  
             var strmssg1="";
             var strmssg2="Please specify a valid Email !";
             document.forms[0].txtemail.focus();      
      }else if(trim(document.forms[0].txtbusinessactivity.value)=="")
      {            
            bln_validate=true;  
            document.forms[0].txtbusinessactivity.focus();            
      }else if(document.forms[0].chkbusiness.checked==false)
      {            
            bln_validate=true;  
            document.forms[0].chkbusiness.focus();            
      }else if(document.forms[0].chkactivities.checked==false) 
      {            
            bln_validate=true;  
            document.forms[0].chkactivities.focus();
     
      }else if(document.forms[0].chkregulations.checked==false) 
      {            
            bln_validate=true;  
            document.forms[0].chkregulations.focus();
     
      }
      
       if(!bln_validate){  
               //check if email id is unique            
          return true;        
       }else{
          if(navigator.appName=='Microsoft Internet Explorer'){
            objerrdiv.innerText=strmssg1+strmssg2;
          }else if(navigator.appName=='Netscape'){
            objerrdiv.textContent=strmssg1+strmssg2;     
          }  
          return false;
  	
        
  	}
    
    }// end validate
