function onLoad(){
	with (document){
		var search = location.search;
		if (search.length != 0){
			forms["mail"].style.display = "none";
			if (search.length > "sent=".length){
				var td = getElementById("tdMessage");
				if (search.substr("sent=".length + 1) == 1)
					td.innerHTML = "Email has been successfully sent.";
				else
					td.innerHTML = "<span style='color:red'>Unable to send email. Please use the links provided.</span>";
			}
		}
	}
}
function trim(s){
	var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
	return (m == null) ? "" : m[1];
}
function validateForm(){
	var	msg = "";
	var ctl = null;
	with (document.forms["mail"]){
		if (trim(txtName.value) == ""){
			msg = "Please provide your name.";
			ctl = txtName;
		} else if (trim(txtCompany.value) == ""){
			msg = "Please provide your company name.";
			ctl = txtCompany;
		}
	}
	if (msg != ""){
		alert(msg);
		if (ctl != null){
			ctl.focus();
			ctl.select();
		}
		return false;
	} else
		return true;
}