//====================================================================================================
//	Function Name	:	PWRecovery_Form
//----------------------------------------------------------------------------------------------------
function PWRecovery_Form(frm)
{
	with(frm)
    {
		if(!IsEmpty(user_login_id, 'Please enter Username.'))
		{
			return false;
		}

        return true;
    }
}

//====================================================================================================
//	Function Name	:	UNRecovery_Form
//----------------------------------------------------------------------------------------------------
function UNRecovery_Form(frm)
{
	with(frm)
    {
    	if(!IsEmpty(email_id, 'Please enter Email Address.'))
        {
			return false;
        }
		else if(!IsEmail(email_id, 'Oppsss!!! Invalid Email Address specified!'))
		{
			return false;
		}
		
        return true;
    }
}

//====================================================================================================
//	Function Name	:	ChangePassword_Form
//----------------------------------------------------------------------------------------------------
function ChangePassword_Form(frm)
{
	with(frm)
    {
		if(!IsEmpty(user_old_password, 'Please enter Old Password.'))
        {
			return false;
        }
		
		if(!IsEmpty(user_new_password, 'Please enter New Password.'))
        {
			return false;
        }
		else if(!IsLen(user_new_password, 6, 15, 'Password must be at least 6 characters long, \nand should not exceed more than 15 characters.'))
		{
			return false;
		}
		
		if(!IsEmpty(retype_password, 'Please retype New Password'))
        {
			return false;
        }
		else if(user_new_password.value != retype_password.value)
        {
			alert('Password confirmation does not match');
			return false;
        }
		
        return true;
    }
}