/*-----------------------------------------------------------------------
Created by: Kalpesh
Created date: 4th March 2008
File description: Contact Us - Validation
Special instructions-notes:Java script Validation
Tables used:None
Stored procedures:None
Triggers used:None
-----------------------------------------------------------------------*/

function ValidateContact(theForm)
{	
	if (isWhitespace(theForm.custname.value))
	{
		alert("Please provide Customer Name.");
		theForm.custname.focus();
		return false;
	}	
	if (isWhitespace(theForm.subject.value))
	{
		alert("Please enter the Subject.");
		theForm.subject.focus();
		return false;
	}
	if (isWhitespace(theForm.question.value))
	{
		alert("Please enter your Question.");
		theForm.question.focus();
		return false;
	}
	if (isWhitespace(theForm.email.value))
	{
		alert("Please provide your Email Address.");
		theForm.email.focus();
		return false;
	}
	if(!isEmail(theForm.email.value))
	{
		alert("Please provide valid Email Address.")
		theForm.email.focus();
		return false;
	}
	if(isWhitespace(theForm.confirmemail.value))
	{
		alert("Please fill Confirm Email.")
		theForm.confirmemail.focus();
		return false;
	}
	if(!isEmail(theForm.confirmemail.value))
	{
		alert("Please provide valid Confirm Email.")
		theForm.confirmemail.focus();
		return false;
	}
	if(theForm.email.value!=theForm.confirmemail.value)
	{
		alert("Email Address and Confirm Email does not match.");	
		theForm.email.focus();
		return false;
	}

}