
        function caralert()
        {
            alert('To quote more than 5 vehicles, please contact us at 1-800-922-4050.');
            return;
        }

        function verify(func) 
        {
            
		    var msg;
            var empty_fields = "";
            errors = "";
            if (document.getElementById('cboVehicles') != null) {
                if (document.getElementById('cboVehicles').selectedIndex > 4)
                {
                    caralert();
                    errors = "true";
                } 
            }
            if (errors != "true") {
                if (document.getElementById('getquote1_cboStates') != null) {
                    if (document.getElementById('getquote1_cboStates').selectedIndex == 0) 
                    {

				        empty_fields += "\n          Where is your vehicle registered?";
			        }			    
			    }

			    if (document.getElementById('getquote1_cboZip') != null) {
                    if (document.getElementById('getquote1_cboZip').value == "") 
                    {

				        empty_fields += "\n          Zip Code";
			        }			    
			    }

		        //Audits complete if there were no errors return true				
			    if (!empty_fields) {                    
			            redirect (func);
			    } 
    			
			    else {	  
			                    
			        //Display errors
			        msg  = "The form was not submitted because of the following error(s).\n";
			        msg += "Please correct these error(s) and re-submit.\n";
			        
			        if (empty_fields) 
			        {
				        msg += "- The following required field(s) are empty:" + empty_fields + "\n";
        				
				        if (errors) 
				        {
					        msg += "\n";
				        }
			        }

			        msg += errors;
			        alert(msg);

			        //Errors found return false (validation failed)
			     }
			  }
         }

//        function redirect( func ) {
//            var location = 'http://<%=Request.ServerVariables["SERVER_NAME"] %>/product/pub/network_login.aspx';
//            var account = '<%=account %>';
//            if (func === 'QUOTE') {
//                var vehIndex = document.getElementById('cboVehicles').selectedIndex;
//                var veh = document.getElementById('cboVehicles')[vehIndex].value;
//                var stateIndex = document.getElementById('<%=cboStates.ClientID %>').selectedIndex;
//                var state = document.getElementById('<%=cboStates.ClientID %>')[stateIndex].text;
//                var redir = location + '?Vehicles=' + veh + '&State=' + state + "&Function=" + func;
//                    redir += '&Account=' + account;

//                window.location.replace(redir);
//            } else if (func === 'PREVAPP') {
//                window.location.replace(location + '?Function=' + func + '&Account=' + account);
//            }
//        }

function hideddls(obj) {   
    //detect for ie6
    if (/msie|MSIE 6/.test(navigator.userAgent)){
    //hide drop-down lists for get a quote if parentnode = Insurance
        if((obj.title.toUpperCase() == "INSURANCE") ||
        (obj.parentNode.parentNode.getAttribute("title").toUpperCase() == "INSURANCE") ||
        (obj.parentNode.parentNode.parentNode.parentNode.getAttribute("title").toUpperCase() == "INSURANCE"))
            {
                if (document.getElementById("cboVehicles") != null)
                    document.getElementById("cboVehicles").style.visibility = 'hidden';
                if (document.getElementById("getquote1_cboStates") != null)
                    document.getElementById("getquote1_cboStates").style.visibility = 'hidden';
                if (document.getElementById("cboZip") != null)
                    document.getElementById("cboZip").style.visibility = 'hidden';
            }
        else
            {
                if (document.getElementById("cboVehicles") != null)
                    document.getElementById("cboVehicles").style.visibility = 'visible';
                if (document.getElementById("getquote1_cboStates") != null)
                    document.getElementById("getquote1_cboStates").style.visibility = 'visible';
                if (document.getElementById("cboZip") != null)
                    document.getElementById("cboZip").style.visibility = 'visible';
            }
     }
  //   if((obj.title.toUpperCase() == "INSURANCE") ||
    //    (obj.parentNode.parentNode.getAttribute("title").toUpperCase() == "INSURANCE") ||
      //  (obj.parentNode.parentNode.parentNode.parentNode.getAttribute("title").toUpperCase() == "INSURANCE"))
        //    {
    // document.getElementById("e9c1eb436_222_224_submenu_items").style.visibility = 'visible';
    // document.getElementById("e9c1eb436_222_224_button").className = 'ekflexmenu_button_selected';
   //  }
}
    
function showddls() {
    if (/msie|MSIE 6/.test(navigator.userAgent)){
            if (document.getElementById("cboVehicles") != null)
                document.getElementById("cboVehicles").style.visibility = 'visible';
            if (document.getElementById("getquote1_cboStates") != null)
                document.getElementById("getquote1_cboStates").style.visibility = 'visible';
            if (document.getElementById("cboZip") != null)
                document.getElementById("cboZip").style.visibility = 'visible';
        //changed ekflexmenu.js line 2132's settimeout from 500 to 0 ms.
        } 
    //  document.getElementById("e9c1eb436_222_224_submenu_items").style.visibility = 'hidden';
   // document.getElementById("e9c1eb436_222_224_button").className = 'ekflexmenu_button';
} 


// This is a mask for the zip code
	    //browser detection
			var strUserAgent = navigator.userAgent.toLowerCase(); 
			var isIE = strUserAgent.indexOf("msie") > -1; 
		
			//regular expressions
			var reValidChars = /[a-zA-Z!@~#$%&()_\*\^\+=\/\-]/;
		
			//mask function
			function maskKeyPress(objEvent) {
			
				var iKeyCode, strKey;  
				if (isIE) {
				    iKeyCode = objEvent.keyCode;
				} else {
				    iKeyCode = objEvent.which;
				}
				
				strKey = String.fromCharCode(iKeyCode);
		
				if (reValidChars.test(strKey)) {
					return false;
				}
			}
			
		function postingBack(obj,pback) {
		    if (obj.value.length == 5) __doPostBack(pback,'');
		}