/*
#################################################################################################### 
# File Name: login.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 login module
#====================================================================================================\


/*
#====================================================================================================
#  Function Name    :    checkLogin()
#  Created By: Sarvesh Borkar
#  Created On: 4 Feb 2008
#  Last Modified By: 
#  Last modified On: 
#  Purpose : check the login form
#  Parameters: frm : Form Object
#----------------------------------------------------------------------------------------------------
*/
function checkLogin(frm)
{
    with(frm)
    {
        if(!IsEmpty(txtEmail, translate('enter_email_address')))
        {
            return false;
        }
		
        if(!IsEmail(txtEmail, translate('enter_valid_email_address')))
        {
            return false;
        }
		
		if(txtPassword.value=="")
		{
		  alert(translate('enter_the_password'));
		  return false;
		}		
       	
        hdMode.value = "login";
        action =hdBaseFileName.value;
		fnDisableButtonOnSubmit(frm); //disable buttons on submit
    }        
}
	
	function updateFp(FlashCookieVal,isNewCookie,FPvalue){
		 document.getElementById('cookieval').value = FlashCookieVal;
		 document.getElementById('isNewCookie').value = isNewCookie;
	}