// JavaScript Document

function validateForm(formName)
{
	var valid = true;
	var form = document.getElementById(formName);
	var alertMsg = '';
	
	if (formName == 'lodge_contact')
	{
		
		if (form.last_name.value == '')
		{
			alertMsg += "Please enter your last name!";
			form.last_name.style.background = 'yellow';
			form.last_name.focus();					
			valid = false;
		}
		
		else if (form.email.value == '')
		{
			alertMsg += "Please enter an e-mail address!";
			form.email.style.background = 'yellow';
			form.email.focus();					
			valid = false;
		}
		
	}
	

	
	if (!valid) {alert(alertMsg);} // If invalid, display reason why
	
	return valid;
}
