/**
 * This file contains proprietary information of Cardiff Software.
 * Copying or reproduction without prior written approval is prohibited.
 * Copyright (c) 1999-2004 Cardiff Software, Inc. All rights reserved.
 *
 * This file contains JavaScript functions for the login dialog JSP page.
 *
 * @author Igor Shulika
 * @version 1.0
 * @see jsp/login.jsp
 * @since LiquidOffice 3.0
 */

/**
 * Sets focus to the form's USERID field.
 * @param frm (HTML Object Form)
 */
function init( frm ){
  if(frm.DFS__UserID && !frm.DFS__UserID.disabled){
    frm.DFS__UserID.focus();
  }
}

/**
 * Validates the HTML form for login.jsp page
 * @param  frm ( HTML Object Form )
 * @return true if if a username is provided in the form's USERID field.
 */
function validateLogin( frm ) {
  if (frm.DFS__UserID && frm.DFS__UserID.value=="") {
    alert( Alert1 );
    frm.DFS__UserID.focus();
    return false;
  }
  frm.action = servletPath;
  if( frm.DFS__TZ ){
    frm.DFS__TZ.value = getTimeZone();
  }
  return true;
}

/**
 * Gets License.
 * @return false, to prevent the calling ahref
 */
function getLicense() {
  app_window = IntermediateWindow ( servletPath + "?DFS__Action=LicenseGetInfo&DFS__Client=JSP" , 480 , 375 , "no" , "no" );
  return false;
}
