/* Function to validate the contact form*/
function validateContact()
{
	trimFields();
	with(obj)
	{
		if(contact_name.value == '')
		{
			alert('Please enter Name');
			contact_name.focus();
			return false;
		}
		if(contact_email.value == '')
		{
			alert('Please enter Email Address');
			contact_email.focus();
			return false;
		}
		if(!chkEmail(contact_email.value))
		{
			alert('Please enter a valid Email Address');
			contact_email.select();
			contact_email.focus();
			return false;
		}
		if(message.value == '')
		{
			alert('Please enter Message');
			message.focus();
			return false;
		}
		if(captcha.value == '')
		{
			alert('Please enter the security code');
			captcha.focus();
			return false;
		}
		action = 'contact_us.html';
		submit();
	}
}
function cancelContact()
{
	var confMsg = 'Are you sure you want to Cancel?';
	if(confirm(confMsg))
	{
		self.location = 'index.html';
	}
}
