

		// This script simply imports the correct CSS for Netscape.
		// All other browsers use the standard, MSIE-compliant CSS.

		// ------------- The Script --------------

		// First, create a variable to hold the browser type.

		var brsr = navigator.appName

		// Next, create a function that tells the browser which
		// style-sheet to import.  Netscape is the only browser
		// which currently has its own style-sheet, but this
		// architecture would allow any browser to have one.  
		// You could also parse the version, if necessary.

		function checkWhich() {
			if (brsr == "Netscape") { 
				whichStyle = "<link rel='STYLESHEET' type='text/css' href='../style/lhief_ns.css'>";
				document.write(whichStyle);
			} else {
				whichStyle = "<link rel='STYLESHEET' type='text/css' href='../style/lhief.css'>"
				document.write(whichStyle);
			}	

		}

		// Finally, call the function.

		checkWhich()


		// ------------- End Script --------------

		// Note, browsers with JavaScript disabled will not
		// import any style-sheet whatsoever.





		function validValue(val, label, req) {
			var retVal = "";
			if ((val == "") && (req)) {
				retVal += label.toUpperCase() + " is required.\n";
			}
			
			return retVal;
		}
		
		function validRequiredCheckbox(el, label) {
			var retVal = "";
			if (!el.checked) {
				retVal += "The " + label.toUpperCase() + " box must be checked in order to proceed.\n\n";
			}
			return retVal;
		}
			
		function validSelect(el, label, req) {
			var retVal = "";
			if ((el.selectedIndex < 1) && (req)) {
				retVal += label.toUpperCase() + " is required.\n";
			}		
			return retVal;
		}	
			
		function validDate(val, label, req) {
			var datePattern = "^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$";
			var retVal = "";
			if ((val != "") && (val != "MM/DD/YYYY")) {
				if (!val.match(datePattern)) {
					retVal += label.toUpperCase() + " must be in a valid format.\n"; 
				}
			} else {
				if (req) {
					retVal += label.toUpperCase() + " is required.\n";
				}
			}
			return retVal;
		}
		
		function validEmail(val, label, req) {
			var emailPattern = "^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$"; 
			var retVal = "";
			if (val != "") {
				if (!val.match(emailPattern)) {
					retVal += label.toUpperCase() + "  must be a valid address (e.g., \"user@domain.com\").\n"; 
				}
			} else {
				if (req) {
					retVal += label.toUpperCase() + " is required.\n";
				}
			}
			return retVal;
		}
		
		function validPhone(val, label, req) {
			
			var phonePattern = /^(\d{3}-\d{3}-\d{4}|\(\d{3}\)\d{3}-\d{4})$/;
			var retVal = "";
						
			if (val != "") {
				// for now, let anything that has an extension through...
				if (!hasExt(val)) { 
					if (!val.match(phonePattern)) {
						retVal += label.toUpperCase() + " must be in a valid format.\n";
					}
				}
			} else {
				if (req) {
					retVal += label.toUpperCase() + " is required.\n";
				}
			}
			
			//retVal = validValue(val, label, req);
			return retVal;
		}

		function clearDateField(fld) {
			if (fld.value == "MM/DD/YYYY") {
				fld.value = "";
			}
		}


		function hasExt(p) {
			var retVal = false;
			var phone = p.toLowerCase();
			if (phone.indexOf("ext") != -1) {
				retVal = true;
			} else if (phone.indexOf("x") != -1) {
				retVal = true;
			}
			return retVal;
		}		