function validateME(userList){
				var frm1=document.frm;	
                if(frm1.company_name.value==""){
                    frm1.company_name.focus();
                    alert("Please enter Company Name!");                    
                    return false;
					exit;

                    }
				


					  if(frm1.Address.value==""){
                     alert("Please enter Address!"); 
					frm1.Address.focus();
                                      
                    return false;
                    }
			if(frm1.primary_contact_name.value==0){
                    alert("Please enter the Primary Contact Name!");                    
					frm1.primary_contact_name.focus();
                    return false;
                    }
					
				if(frm1.Email.value==0){
                    alert("Please enter the email!");                    
					frm1.Email.focus();
                    return false;
                    }
					
				if(frm1.Email.value !="" && validateEmail(frm1.Email.value)==false){
					frm1.Email.focus();
					frm1.Email.value="";
					return false;
					}
					
				if(frm1.PhNo1.value==0)
					{
                    frm1.PhNo1.focus();
                    alert("Please enter your phone code!");                    
                    return false;
                    }
					
				if(frm1.PhNo1.value!="" && isNum(frm1.PhNo1.value)==true)
					{
					frm1.PhNo1.focus();
					frm1.PhNo1.value="";
					alert("Please Enter a Numeric value for the Phone code Field!");
					return false;
					}
					
				if(frm1.PhNo2.value==0)
					{
                    frm1.PhNo2.focus();
                    alert("Please enter the phone number!");                    
                    return false;
                    }
					
				if(frm1.PhNo2.value!="" && isNum(frm1.PhNo2.value)==true)
					{
					frm1.PhNo2.focus();
					frm1.PhNo2.value="";
					alert("Please Enter a Numeric value for the Contact Phone No. Field!");
					return false;
					}  
						if(document.frm1.txtCaptcha.value=="")
		{
			alert("Please Enter Security Code!");
			document.frm1.txtCaptcha.focus();
			return false;
		}
					
                    return true;
            }
			
		function isNum(str)
{
	// Return false if characters are not '0-9' or '.' .
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if ((ch < "0" || "9" < ch))
		{
			return 1;
		}
	}
	return 0; 
}
			


function validateEmail(str){

		//var str=frm1.Email.value;
		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;					
	}


        ie = (document.all) ? 1 : 0;
        n = !ie;
        specialChar = false;
        onlyNum=false;
        onlyChar=false;


        function Go(){
            document.onkeypress = keyDown;
            if (n) {
                document.captureEvents(Event.KEYPRESS);
            }
        }

        function keyDown(key) {
            var keycode;
            if (window.event) keycode = window.event.keyCode;
            else if (key) keycode = key.which;
            else return true;
            if (specialChar) {

                if ((keycode < 48 || keycode > 57)&&(keycode < 65 || keycode > 90)&&(keycode < 97 || keycode > 122)&&(keycode < 13 || keycode > 13))
                {
                 return false;
                } 
            }
            
            else if (onlyNum)  {
                
                if ((keycode < 48 || keycode > 57))
                {
                    return false;
                }
            }
            
            else if (onlyChar)  {
                
                if ((keycode > 48 || keycode < 57)&&(keycode < 65 || keycode > 90)&&(keycode < 97 || keycode > 122)&&(keycode < 45 || keycode > 46)&&(keycode < 95 || keycode > 95)&&(keycode < 32 || keycode > 32)&&(keycode < 13 || keycode > 13))
                {
                    return false;
                }
            }
            else return true;
        } 

