<!--
/////////////////////////////////////////////////////////////////////////////////////////////
//  
// Procedure:	frmContact_onSubmit(objForm)
// Purpose: 	Validates the Contact form.
// Programmer:  the king
// Date:        march/2004
// inputs:      objForm. A form object.
// outputs:     True or false value depending whether there is no validation errors.
//
/////////////////////////////////////////////////////////////////////////////////////////////
function frmContact_onSubmit(objForm) {

	var strMissingInfo = "";
			
		if (objForm.txtName.value == '') {
			strMissingInfo += '\n     -  Your name';
			objForm.txtName.className = 'texterror';
		} else {
			objForm.txtName.className = 'text';
		}
		if (objForm.txtEmail.value.search("@") == -1 || objForm.txtEmail.value.search("[.*]") == -1) {
			strMissingInfo += '\n     -  Your email';
			objForm.txtEmail.className = 'texterror';
		} else {
			objForm.txtEmail.className = 'text';
		}
				
		if (objForm.txtMessage.value == '') {
			strMissingInfo += '\n     -  Your message';
			objForm.txtMessage.className = 'textareaerror';
		} else {
			objForm.txtMessage.className = 'textarea';
		}
	if (strMissingInfo != "") 
	{
		strMissingInfo = "To send your message, you must enter:\n" +
						   "_____________________________________\n" +
		strMissingInfo + "\n_____________________________________" +
		"\n\nPlease re-enter and submit again!";
		alert(strMissingInfo);
		return false;
	}
	else {
		objForm.cmdSubmit.disabled = true;
		return true;
	}
}	

/////////////////////////////////////////////////////////////////////////////////////////////
//  
// Procedure:	frmBrochure_onSubmit(objForm)
// Purpose: 	Validates the Contact form.
// Programmer:  the king
// Date:        march/2004
// inputs:      objForm. A form object.
// outputs:     True or false value depending whether there is no validation errors.
//
/////////////////////////////////////////////////////////////////////////////////////////////
function frmBrochure_onSubmit(objForm) {

	var strMissingInfo = "";
			
		if (objForm.txtName.value == '') {
			strMissingInfo += '\n     -  Your name';
			objForm.txtName.className = 'texterror';
		} else {
			objForm.txtName.className = 'text';
		}
			
		if (objForm.txtAddress.value == '') {
			strMissingInfo += '\n     -  Your address';
			objForm.txtAddress.className = 'texterror';
		} else {
			objForm.txtAddress.className = 'text';
		}
		if (objForm.txtTown.value == '') {
			strMissingInfo += '\n     -  Your town/suburb';
			objForm.txtTown.className = 'texterror';
		} else {
			objForm.txtTown.className = 'text';
		}
		if (objForm.txtPostcode.value == '') {
			strMissingInfo += '\n     -  Your postcode';
			objForm.txtPostcode.className = 'texterror';
		} else {
			objForm.txtPostcode.className = 'text';
		}
		if (objForm.txtEmail.value.search("@") == -1 || objForm.txtEmail.value.search("[.*]") == -1) {
			strMissingInfo += '\n     -  Your email';
			objForm.txtEmail.className = 'texterror';
		} else {
			objForm.txtEmail.className = 'text';
		}
				


	if (strMissingInfo != "") 
	{
		strMissingInfo = "To order our brochure, you must enter:\n" +
						   "_____________________________________\n" +
		strMissingInfo + "\n_____________________________________" +
		"\n\nPlease re-enter and submit again!";
		alert(strMissingInfo);
		return false;
	}
	else {
		objForm.cmdSubmit.disabled = true;
		return true;
	}
}	

function frmContactWinery_onSubmit(objForm) {

	var strMissingInfo = "";
			
		if (objForm.txtName.value == '') {
			strMissingInfo += '\n     -  Your name';
			objForm.txtName.className = 'texterror';
		} else {
			objForm.txtName.className = 'text';
		}
		if (objForm.txtTelephone.value == '') {
			strMissingInfo += '\n     -  Your telephone';
			objForm.txtTelephone.className = 'texterror';
		} else {
			objForm.txtTelephone.className = 'text';
		}
		if (objForm.txtEmail.value.search("@") == -1 || objForm.txtEmail.value.search("[.*]") == -1) {
			strMissingInfo += '\n     -  Your email';
			objForm.txtEmail.className = 'texterror';
		} else {
			objForm.txtEmail.className = 'text';
		}
				
		if (objForm.txtMessage.value == '') {
			strMissingInfo += '\n     -  Your message';
			objForm.txtMessage.className = 'textareaerror';
		} else {
			objForm.txtMessage.className = 'textarea';
		}
	if (strMissingInfo != "") 
	{
		strMissingInfo = "To send your message, you must enter:\n" +
						   "_____________________________________\n" +
		strMissingInfo + "\n_____________________________________" +
		"\n\nPlease re-enter and submit again!";
		alert(strMissingInfo);
		return false;
	}
	else {
		objForm.cmdSubmit.disabled = true;
		return true;
	}
}			

//-->


	<!--
	/////////////////////////////////////////////////////////////////////////////////////////////
	//  
	// Procedure:	frmSubscribe_onSubmit(objForm)
	// Purpose: 	Validates the subscribe form.
	// Programmer:  Gavin Bruce
	// Date:        march/2004
	// inputs:      objForm. A form object.
	// outputs:     True or false value depending whether there is no validation errors.
	//
	/////////////////////////////////////////////////////////////////////////////////////////////
	function frmSubscribe_onSubmit(objForm, blnRightPanel) {

		var strMissingInfo = "";
			

		if (objForm.txtName.value == '' || objForm.txtName.value == 'name') {
			strMissingInfo += '\n     -  Your name';
			if (blnRightPanel)
				objForm.txtName.className = 'subscribetexterror';
			else
				objForm.txtName.className = 'texterror';
		} else {
			if (blnRightPanel)
				objForm.txtName.className = 'subscribe';
			else
				objForm.txtName.className = 'text';
		}
		if (objForm.txtEmail.value.search("@") == -1 || objForm.txtEmail.value.search("[.*]") == -1 || objForm.txtEmail.value == 'email') {
			strMissingInfo += '\n     -  Your email';
			if (blnRightPanel)
				objForm.txtEmail.className = 'subscribetexterror';
			else
				objForm.txtEmail.className = 'texterror';
		} else {
			if (blnRightPanel)
				objForm.txtEmail.className = 'subscribe';
			else
				objForm.txtEmail.className = 'text';
		}

		if (strMissingInfo != "") 
		{
			strMissingInfo = "To subscribe to the newsletter, you must enter:\n" +
							   "_____________________________________\n" +
			strMissingInfo + "\n_____________________________________" +
			"\n\nPlease re-enter and submit again!";
			alert(strMissingInfo);
			return false;
		}
		else {
			objForm.cmdSubmit.disabled = true;
			return true;
		}
	}	
	
	function GB_formEl_onMouseUp(objFormEl, strDefaultTxt) {
		if (objFormEl.value == strDefaultTxt) {objFormEl.value = '';}
	}		
	function GB_formEl_onBlur(objFormEl, strDefaultTxt) {
		if (objFormEl.value == '') {objFormEl.value = strDefaultTxt;}
	}		
	//-->


	<!--
	/////////////////////////////////////////////////////////////////////////////////////////////
	//  
	// Procedure:	frmSearch_onSubmit(objForm)
	// Purpose: 	Validates the search form.
	// Programmer:  Gavin Bruce
	// Date:        march/2004
	// inputs:      objForm. A form object.
	// outputs:     True or false value depending whether there is no validation errors.
	//
	/////////////////////////////////////////////////////////////////////////////////////////////
	function frmSearch_onSubmit(objForm) {

		var strMissingInfo = "";
			

		if (objForm.txtKeywords.value == '' || objForm.txtKeywords.value == 'Search') {
			strMissingInfo += '\n     -  Search entry';
			objForm.txtKeywords.className = 'subscribetexterror';
		} else {
			objForm.txtKeywords.className = 'subscribe';
		}
		
		if (strMissingInfo != "") 
		{
			strMissingInfo = "To search, you must enter:\n" +
							   "_____________________________________\n" +
			strMissingInfo + "\n_____________________________________" +
			"\n\nPlease re-enter and submit again!";
			alert(strMissingInfo);
			return false;
		}
		else {
			objForm.cmdSubmit.disabled = true;
			return true;
		}
	}	
	
	function GB_formEl_onMouseUp(objFormEl, strDefaultTxt) {
		if (objFormEl.value == strDefaultTxt) {objFormEl.value = '';}
	}		
	function GB_formEl_onBlur(objFormEl, strDefaultTxt) {
		if (objFormEl.value == '') {objFormEl.value = strDefaultTxt;}
	}	
	function GB_statusMsg(strIn) {
	status = strIn;
}	
	//-->