

	// is browser sufficiently advanced for true W3C DOM scripting ?
	if (document.getElementById && document.createElement && document.childNodes)
		W3CDOM = true;
	else
		W3CDOM = false;


	function ResetFocus()
	{
		if (W3CDOM)
		{
			// focus on Text Box using the W3C DOM
			document.getElementById("txtName").focus()
		}
	}


	function CheckForm()
	{
		if (W3CDOM)
		{
			txtName = document.getElementById("txtName").value;
			txtPhone = document.getElementById("txtPhone").value;
			txtEmail = document.getElementById("txtEmail").value;
			txtMessage = document.getElementById("txtEnquiry").value;

			if ((txtName != "") && ((txtPhone != "") || (txtEmail != "")))
			{
				return true;
			}
			else
			{
				if (txtName == "") document.getElementById("txtName").focus();
				if (txtPhone == "") document.getElementById("txtPhone").focus();
				if (txtMessage == "") document.getElementById("txtEnquiry").focus();
				strMsg = 'Please tell us your Name and your Telephone No. or Email address ...\n\n'
				strMsg += 'If you do not leave us a valid Telephone number or email address,\n';
				strMsg += 'we will not be able to contact you about your enquiry...';
				alert(strMsg);
				return false;
			}
		}
	}
