// form script

function DisableSubmit() {

    var theMessage = "The following fields are required:         "
    var noErrors = theMessage

	// make sure field is not blank
	if (document.Information_Form.Title.value=="") {
	theMessage = theMessage + "\n  - Title";
	}

	if (document.Information_Form.First_Name.value=="") {
	theMessage = theMessage + "\n  - First Name";
	}

	if (document.Information_Form.Surname.value=="") {
	theMessage = theMessage + "\n  - Surname";
	}

	if (document.Information_Form.Address_1.value=="") {
	theMessage = theMessage + "\n  - Address";
	}

	if (document.Information_Form.City.value=="") {
	theMessage = theMessage + "\n  - City";
	}
	
	if (document.Information_Form.Post_Code.value=="") {
	theMessage = theMessage + "\n  - Post Code";
	}
	

    // Make sure a selection list is used
    var listCheck = document.Information_Form.Country.selectedIndex;
    if (document.Information_Form.Country.options[listCheck].value=="none") {
    theMessage = theMessage + "\n  - Please select your country";
    }

/*	if (document.Information_Form.Country.value=="" || document.Information_Form.Country.value=="United States of America" || document.Information_Form.Country.value=="Canada" || document.Information_Form.Country.value=="Lithuania" || document.Information_Form.Country.value=="Brazil" || document.Information_Form.Country.value=="Hungary") {
	theMessage = theMessage + "\n --> Your Country";
	}	
*/

	if (document.Information_Form.Day_Phone.value=="") {
	theMessage = theMessage + "\n  - Your Phone";
	}

	// validate an e-mail address
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.Information_Form.Email.value)){
	theMessage = theMessage + "\n  - Enter a valid e-mail address";
	}

    // Make sure a selection list is used
    var listCheck = document.Information_Form.Area.selectedIndex;
    if (document.Information_Form.Area.options[listCheck].value=="none" || document.Information_Form.Area.options[listCheck].value=="null") {
    theMessage = theMessage + "\n  - Please state the area of interest";
    }

	if (document.Information_Form.Details.value=="Please enter your enquiry details..." || document.Information_Form.Details.value=="")  {
	theMessage = theMessage + "\n  - Please enter your enquiry details...";
	}

    // If no errors, submit the form
    if (theMessage == noErrors) {

	document.Information_Form.Submit.disabled = true;
	document.Information_Form.Submit2.disabled = true;
	document.Information_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