<!--
	function checkmail() {
		check_ok = true;
		
		function validEmail(email) {
			validData = "ABCDEFGHIJKLMNOPQRSTUVWXYZ, 1234567890" + " and -!@#$^*()[]_{}:;/+|'~."
			invalidData = " ()<>,;:/\"[]"
			for (i=0; i<invalidData.length; i++) {
				badData = invalidData.charAt(i)
				if (email.indexOf(badData,0) > -1) { return false }
			}
			atPos = email.indexOf("@",1)
			if (atPos == -1) { return false }
			if (email.indexOf("@",atPos+1) != -1) { return false }
			period = email.indexOf(".", atPos)
			if (period == -1) { return false }
			if (period+3 > email.length) { return false }
			return true
		}
		if (document.getElementById('T1').value == "") {
			alert ("Please Enter Your Name")
			document.getElementById('T1').focus()
			check_ok = false
			
		}
		else if (document.getElementById('T3').value == "") {
			alert ("Please Enter Your Email Address So That We May Contact You")
			document.getElementById('T3').focus()
			check_ok = false
		}
		else if (!validEmail(document.getElementById('T3').value)) {
			alert ("Please enter a Completet Email Address with Valid Characters\n\t(Invalid Characters -  ()<>,;:/\"[])")
			document.getElementById('T3').focus()
			check_ok = false
		}
		else if (check_ok = true) {
			fireemail();
		}
	}
	function fireemail() {
		name = document.getElementById('T1').value;
		company = document.getElementById('T2').value;
		email = document.getElementById('T3').value;
		message = document.getElementById('T4').value;
		companyid = document.getElementById('compID').value;
		
		name = escape(name);
		company = escape(company);
		email = escape(email);
		message = escape(message);
		companyid = escape(companyid);
		
		
		document.getElementById('avail').innerHTML = "<span style=\"font-weight: bold; font-family: arial, verdana; font-size: 20px; background-color: #FFFF00\"><img src=\"img/spinner.gif\" alt=\"Working!\" />&nbsp;Sending Email...</span>";
		var url = '/FHISS/inc/mail.php';
		var parms = '?name=' + name +
			'&company=' + company +
			'&email=' + email +
			'&message=' + message +
			'&companyid=' + companyid;
			
		var myAjax = new Ajax.Request( url, { method: 'GET', parameters: parms, onComplete: showResponse });
	}
	function showResponse(originalRequest) {
		document.getElementById('avail').innerHTML = originalRequest.responseText;
		document.getElementById('T1').value = "";
		document.getElementById('T2').value = "";
		document.getElementById('T3').value = "";
		document.getElementById('T4').value = "";
	}
// -->
