/* Function to validate the contact form*/
function validateContact()
{
	trimFields();
	if(obj.name.value == '')
	{
		alert('Please enter your Name.');
		obj.name.focus();
		return;
	}
	if(obj.address.value == '')
	{
		alert('Please enter your Address.');
		obj.address.focus();
		return;
	}

	if(obj.email.value == '')
	{
		alert('Please enter Email Address.');
		obj.email.focus();
		return;
	}
	if(!chkEmail(obj.email.value))
	{
		alert('Please enter a valid Email Address.');
		obj.email.select();
		obj.email.focus();
		return;
	}
	if(obj.message.value == '')
	{
		alert('Please enter Message.');
		obj.message.focus();
		return;
	}
	if(obj.captcha.value == '')
	{
		alert('Please enter the security code.');
		obj.captcha.focus();
		return;
	}
	obj.action = 'contact.php';
	obj.submit();
}
function cancelContact()
{
	var confMsg = 'Are you sure you want to Cancel?';
	if(confirm(confMsg))
	{
		self.location = 'index.php';
	}
}
