/*****************************************************************************************************************************************
  Language & version : JavaScript, 1.2
  Unit         :
  FormName     :
  Heirarchy    :
  Tables used  :
  Done by      :   Deep Kumar                              Dt. : 10-06-04
  Reviewed by : 		       Dt :
  Description  : This script file stores the function to validate the contact form.
  Attention : .	will work only if the form name is 'contact'.		 			

  Modifications...
  Done by     :                                Dt. :		Req.No :
  Description :
*******************************************************************************************************************************************/

/*****************************************************************************************************************************************
Name        : validateForm
Done by     :  Deep Kumar                              Dt. : 10-06-04
Description :  will check whether the name & email contains valid values. 
Visiblity (Private\Protected\Public) : Public
Parameters: email_string, a string.
ReturnValue(if relevant) : True, if the email string is valid & name string contains a valid value; False otherwise
Attention :

Modifications...
  Done by     :                                Dt. :		Req.No :
  Description :

*******************************************************************************************************************************************/

function validateForm()
{
	document.contact.name.value = trim_spaces(document.contact.name.value); // removing the spaces	
	if(document.contact.name.value.length <= 0) //check for null value
	{ 
		alert("Please enter your name");
		document.contact.name.focus();
		return false;
	}
	document.contact.email.value = trim_spaces(document.contact.email.value); // removing the spaces
	if(document.contact.email.value <= 0) //check for null value
	{ 
		alert("Please enter your email");
		document.contact.email.focus();
		return false;	
	}
	if(!check_email(document.contact.email.value)) 
	{
		document.contact.email.focus();
		return false;
	}
	document.contact.hidVal.value = "submit";
}