// form script

function DisableSubmit() {

    var theMessage = "The following fields are required:    "
    var noErrors = theMessage

	// make sure field is not blank
	if (document.quick_form.First_Name.value=="") {
	theMessage = theMessage + "\n  - Your First Name";
	}

	if (document.quick_form.Address_1.value=="") {
	theMessage = theMessage + "\n  - Your Address";
	}

	if (document.quick_form.City.value=="") {
	theMessage = theMessage + "\n  - Your City";
	}
	
	if (document.quick_form.Post_Code.value=="") {
	theMessage = theMessage + "\n  - Your Post Code";
	}
	
	if (document.quick_form.Day_Phone.value=="") {
	theMessage = theMessage + "\n  - Your Phone";
	}

	// validate an e-mail address
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.quick_form.Email.value)){
	theMessage = theMessage + "\n  - Enter a valid e-mail address";
	}

    // Make sure a selection list is used
    var listCheck = document.quick_form.Area.selectedIndex;
    if (document.quick_form.Area.options[listCheck].value=="none") {
    theMessage = theMessage + "\n  - Please state the area of interest";
    }

	if (document.quick_form.Details.value=="Please enter your enquiry details..." || document.quick_form.Details.value=="")  {
	theMessage = theMessage + "\n  - Please enter your enquiry details...";
	}

    // If no errors, submit the form
    if (theMessage == noErrors) {

	document.quick_form.Submit.disabled = true;
	document.quick_form.Submit2.disabled = true;
	document.quick_form.submit();


    } else {

    // If errors were found, show alert message
    alert(theMessage);
    return false;
    }

}

function clearText(thefield)
				{
					if (thefield.defaultValue == thefield.value)
									thefield.value = ""
     				//else thefield.value = thefield.defaultValue
				} 

// end form script