<!--
function init_form()
{
	document.forms[0].email_address.focus();
	
	new_validation_image();
}

function new_validation_image()
{
	if(document.getElementById)
	{
		document.getElementById("validation_image").src = "./securimage_show.php?" + Math.random();
	} else {
		alert("Your browser does not support reloading the image this way.\nSubmit the form and a new image will be loaded.");
	}
}


function checkemail(strng)
{
	var temp = new String(strng);
	var index = temp.indexOf("@");

	if (index > 0) {
		var pindex = temp.indexOf(".",index);

		if ((pindex > index + 1) && (temp.length > pindex + 1)) {
			return true;
		}
	}
	
	return false;
}

function validate_form(form)
{
	if (form.email_address.value == "" || checkemail(form.email_address.value) == false) {
		alert("You did not enter a valid e-mail address. \n \nPlease enter a valid e-mail address. eg, yourname@yourdomain.com");
		form.email_address.focus();
		return false;
	}
	
	if (form.email_address.value.length > 255) {
		alert("The e-mail address you have entered is too long. \n \nPlease use less than 255 characters.");
		form.email_address.focus();
		return false;
	}
	
	if (form.subject.value == "") {
		alert("You did not enter a subject. \n\nPlease enter a subject.");
		form.subject.focus();
		return false;
	}
	
	if (form.message.value == "") {
		alert("You did not enter a message. \n\nPlease enter a message.");
		form.message.focus();
		return false;
	}
	
	if (form.validation_word.value.length != 7) {
		alert("The validation word must be 7 characters. \n \nPlease enter the correct validation word.");
		form.validation_word.focus();
		return false;
	}
	
	return true;
}
//-->
