// form script

function checkForm() {

    var theMessage = "The following fields are required:    "
    var noErrors = theMessage

	// make sure field is not blank
	if (document.quick_form.name.value=="") {
	theMessage = theMessage + "\n  - Full Name";
	}

	if (document.quick_form.telephone.value=="") {
	theMessage = theMessage + "\n  - Contact Phone";
	}

	// validate an e-mail address
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.quick_form.email.value)){
	theMessage = theMessage + "\n  - E-mail address must be valid";
	}

	if (document.quick_form.enquiry.value=="Please enter your enquiry details..." || document.quick_form.enquiry.value=="")  {
	theMessage = theMessage + "\n  - Please detail your enquiry";
	}

    // If no errors, submit the form
    if (theMessage == noErrors) {

	document.quick_form.send.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 = ""

				} 

// end form script
