
/*
 * Create email adresses
 * Used instead of mailto: for preventing spam
 */
 
sendMail = function(user,domain) {
	try {
		locationstring = "mailto:" + user + "@" + domain; 
		window.location = locationstring; 
	}
	catch(error) {
		errorMessage(error, "There was an error when trying to send mail to:\n\n"+user+"@"+domain);
		return false;
	}
}



//////////////////////////////////////////////////

// Form Field checker - Contact


function Validate(objForm)

{
	
	if (objForm.ddTitle.value == "")
	{
		window.alert("Title is a required Field");
		objForm.ddTitle.focus();
		return false;
	}
	
	if (objForm.txtFirstName.value == "")
	{
		window.alert("First Name is a required Field");
		objForm.txtFirstName.focus();
		return false;
	}
	
		if (objForm.txtSurname.value == "")
	{
		window.alert("Surname is a required Field");
		objForm.txtSurname.focus();
		return false;
	}
	
	
	if (objForm.txtEmail.value == "")
	{
		window.alert("Email Address is a required Field");
		objForm.txtEmail.focus();
		return false;
	}

	if (objForm.txtEmail.value.indexOf("@", 0) == -1 || (objForm.txtEmail.value.indexOf("@", 0) != objForm.txtEmail.value.lastIndexOf("@", (objForm.txtEmail.value.length - 1))) || objForm.txtEmail.value.indexOf(".", 0) == -1)
	{
		window.alert("Email Address must be a valid Email Address");
		objForm.txtEmail.focus();
		return false;
	}

	return true;
}

//////////////////////////////////////////////////

function RotCap()
{
var t = new Date();
document.getElementById('capt').src='aspcaptcha.asp?t=' + t.valueOf();
}

//////////////////////////////////////////////////
