/*-----------------------------------------------------------------------
Created by: Gaurab
Created date: 31st Dec 2007
File description: Admin Setting - Validation
Special instructions-notes:Java script Validation
Tables used:None
Stored procedures:None
Triggers used:None
-----------------------------------------------------------------------*/

function validate_email(theForm)
{
	if(isWhitespace(theForm.email.value))
	{
		alert("Please provide email.");
		theForm.email.focus();
		return false;
	}
	if(!isEmail(theForm.email.value))
	{
		alert("Please provide valid email address.")
		theForm.email.focus();
		return false;
	}
}

function validate_username(theForm)
{
	if(isWhitespace(theForm.username.value))
	{
		alert("Please provide username.");
		theForm.username.focus();
		return false;
	}
	/*if(!isEmail(theForm.email.value))
	{
		alert("Please provide valid email address.")
		theForm.email.focus();
		return false;
	}*/
}

function validate_answer(theForm)
{
	if(isWhitespace(theForm.answer.value))
	{
		alert("Please provide answer.");
		theForm.answer.focus();
		return false;
	}
}
