/**
* Copyright Fluent2.com 2007
**/


var MailingListFORM = eval("document.MailingListForm");

function ProcessMailingList(){
	MailingListFORM.Title.style.backgroundColor="#FFF";
	MailingListFORM.Forename.style.backgroundColor="#FFF";
	MailingListFORM.Surname.style.backgroundColor="#FFF";
	MailingListFORM.eMail.style.backgroundColor="#FFF";
	MailingListFORM.Address.style.backgroundColor="#FFF";
	MailingListFORM.Postcode.style.backgroundColor="#FFF";
	MailingListFORM.MobilePhone.style.backgroundColor="#FFF";
	MailingListFORM.HomePhone.style.backgroundColor="#FFF";
	MailingListFORM.PropertyType.style.backgroundColor="#FFF";

	if(!MailingListFORM.Title.value.length){
		MailingListFORM.Title.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYou did not select your Title.");
		return false;
	}
	if(MailingListFORM.Forename.value.length < 2){
		MailingListFORM.Forename.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYour Forename is too short.");
		return false;
	}
	if(MailingListFORM.Surname.value.length < 2){
		MailingListFORM.Surname.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYour Surname is too short.");
		return false;
	}
	if(ValidateeMail(MailingListFORM.eMail.value) == false){
		MailingListFORM.eMail.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYour eMail address is incorrect.");
		return false;
	}

	if(MailingListFORM.Address.value.length < 8){
		MailingListFORM.Address.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYour Address is too short.");
		return false;
	}
	if(MailingListFORM.Postcode.value.length < 2){
		MailingListFORM.Postcode.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYour Post Code is too short.");
		return false;
	}
	if(MailingListFORM.MobilePhone.value.length < 10){
		MailingListFORM.MobilePhone.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYour Phone Number is too short.");
		return false;
	}
	if(!MailingListFORM.PropertyType.value.length){
		MailingListFORM.PropertyType.style.backgroundColor="#FA9E9E";
		alert("ERROR\n\nYou did not select your Property Type.");
		return false;
	}
	MailingListFORM.target="iFrame";
	MailingListFORM.method="post";
	MailingListFORM.action="PROCESS_MailingList.php";
	MailingListFORM.Action.value="MailingList";
	MailingListFORM.Button1.value="PLEASE WAIT";
	MailingListFORM.Button1.disabled=true;
	MailingListFORM.Button1.className="ButtonProcessing"
	setTimeout("document.MailingListForm.submit();", 1000);
}
