/*
#################################################################################################### 
# File Name: forgot_password.js
# File Version: v 1.0
# Created By: Sarvesh Borkar	
# Created On: 4 Feb 2008
# Last Modified By:
# Last modified On:
# This file carries the javascript for forgot password module
#====================================================================================================
*/


/*
#====================================================================================================
#  Function Name    :    checkForgotPassword()
#  Created By: Sarvesh Borkar
#  Created On: 4 Feb 2008
#  Last Modified By: 
#  Last modified On: 
#  Purpose : check the forgot password form
#  Parameters: frm : Form Object
#----------------------------------------------------------------------------------------------------
*/
function checkForgotPassword(frm)
{
    with(frm)
    {
        if(!IsEmpty(txtEmail, translate('enter_email_address')))
        {
            return false;
        }
        if(!IsEmail(txtEmail, translate('enter_valid_email_address')))
        {
            return false;
        }	
		
        hdMode.value = "forgot_password";
		action = "forgot_password.php";	
		fnDisableButtonOnSubmit(frm); //disable buttons on submit
    }        
}

/*====================================================================================================
#    Function Name    :    clickCancel()
#    Created By: Sarvesh Borkar
#    Created On: 4 Feb 2008
#    Last Modified By:
#    Last modified On:
#    Purpose : to go back to login page
#----------------------------------------------------------------------------------------------------
*/
function clickCancel()
{
    window.location.href = "index.php";
}
