<!--

	function openPopup(url, width, height) {
	  popupWin = window.open(url, 'remote', 'scrollbars=yes,resizable=no,width='+width+',height='+height)
	}

  function trim(inputString) {
        if (typeof inputString != "string") { return inputString; }
             var retValue = inputString;
            var ch = retValue.substring(0, 1);
        while (ch == " ") {
             retValue = retValue.substring(1, retValue.length);
            ch = retValue.substring(0, 1);
        }
        ch = retValue.substring(retValue.length-1, retValue.length);
        while (ch == " ") {
            retValue = retValue.substring(0, retValue.length-1);
            ch = retValue.substring(retValue.length-1, retValue.length);
        }
        while (retValue.indexOf("  ") != -1) {
          retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.su
       }
       return retValue; // Return the trimmed string back to the user
     }

    function isBlank(field) {
        if (trim(field).length == 0) {
            return true;
        }
        return false
    }

        function check_access(form) {
		var error = "";
			if (form._address_zip) {
                if (isBlank(form._address_zip.value)) {
                	if (isBlank(form._address_state.value))
					error += "You can search by Zip Code or by City and State.\n";
				}
			}

			if (form._address_city) {
                if (isBlank(form._address_zip.value)) {
					if (form._address_state.length > 0) {
						if (isBlank(form._address_city.value))
							error += "You must enter a City when searching by State.\n";
					}
				}
			}
			
			if (form._last_name) {
                if (isBlank(form._last_name.value)) 
					error += "Last name is required for a name search.\n"; 
				if (isBlank(form._address_state.value)) 
					error += "State is required for a name search.\n";
			}
			
			if (form._international_country) {
                if (isBlank(form._international_country.value)) 
					error += "A Country is required for international searches.\n"; 
			}
			
		if (isBlank(error))
			return true;
		alert(error);
			return false;
        }

//-->
