
//====================================================================================================
//	File Name		:	login.js
//----------------------------------------------------------------------------------------------------
//	Purpose			:	Client side validation in JavaScript.
//
//====================================================================================================

//====================================================================================================
//	Function Name	:	Form_Submit()
//	Purpose			:	This function will executed when user submits a form. It checks validity of 
//						every field in the form.
//	Parameters		:	frm  - form name
//	Return			:	true or false
//----------------------------------------------------------------------------------------------------
function Form_Submit(frm)
{
	with(frm)
    {
    	if(!IsEmpty(username, 'Please, enter Username.'))
        {
			return false;
        }
    	if(!IsEmpty(password, 'Please, enter Password.'))
        {
			return false;
        }
        return true;
    }
}
function Forgot_Click()
{
	with(document.frmforgot)
	{
		submit();
	}
}
function Check_Email()
{
	
	with(document.frmemail)
    {
    	if(!IsEmpty(email, 'Please, Enter Email Address.'))
        {
			return false;
        }
    	if(!IsEmail(email, 'Please, Enter Valid Email Address.'))
        {
			return false;
        }
        return true;
    }

}