src/org/openbravo/erpCommon/security/Login.html
author David Baz Fayos <david.baz@openbravo.com>
Tue, 01 Feb 2011 01:20:17 +0100
changeset 10269 44d5aae0602b
parent 10246 bc0167ea077c
child 10290 75aea1c8d887
permissions -rw-r--r--
[login] Changes in code structure and supported/recommended browsers list
asier@8910
     1
<!--
asier@8910
     2
 *************************************************************************
asier@8910
     3
 * The contents of this file are subject to the Openbravo  Public  License
priya@9072
     4
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
asier@8910
     5
 * Version 1.1  with a permitted attribution clause; you may not  use this
asier@8910
     6
 * file except in compliance with the License. You  may  obtain  a copy of
asier@8910
     7
 * the License at http://www.openbravo.com/legal/license.html 
asier@8910
     8
 * Software distributed under the License  is  distributed  on  an "AS IS"
asier@8910
     9
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
asier@8910
    10
 * License for the specific  language  governing  rights  and  limitations
asier@8910
    11
 * under the License. 
asier@8910
    12
 * The Original Code is Openbravo ERP. 
asier@8910
    13
 * The Initial Developer of the Original Code is Openbravo SLU 
asier@10033
    14
 * All portions are Copyright (C) 2010-2011 Openbravo SLU 
asier@8910
    15
 * All Rights Reserved. 
asier@8910
    16
 * Contributor(s):  ______________________________________.
asier@8910
    17
 ************************************************************************
asier@8910
    18
-->
asier@8910
    19
david@8918
    20
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
david@8918
    21
<head>
asier@8910
    22
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
asier@8910
    23
<title>Openbravo</title>
asier@8910
    24
<link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" id="favicon" />
asier@8910
    25
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS" />
david@8918
    26
<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
asier@8910
    27
<script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
david@8931
    28
<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
asier@8920
    29
<script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
asier@8920
    30
<script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
asier@8923
    31
<script language="JavaScript" src="../utility/CheckCleanCache.js?cache=true" type="text/javascript"></script>
asier@8923
    32
<script language="JavaScript" src="../utility/CheckCleanCache.js?cache=false" type="text/javascript"></script>
david@8941
    33
<script language="JavaScript" type="text/javascript" id="visualPrefs">var showCompanyLogo = true, showSupportLogo = true, showForgeLogo = true, urlCompany = 'http://www.openbravo.com/', urlSupport = 'http://support.openbravo.com/';/* Parameters retreived from Login.java */</script>
david@8939
    34
<script language="JavaScript" type="text/javascript">var urlForge = 'http://forge.openbravo.com/';</script>
david@8931
    35
<script language="JavaScript" type="text/javascript" id="cacheMsg">var cacheMsg = 'xx';</script>
david@10246
    36
<script language="JavaScript" type="text/javascript" id="validBrowserMsg">var validBrowserMsg = 'xx';</script>
david@10269
    37
<script language="JavaScript" type="text/javascript" id="validBrowserMsgOrHigher">var validBrowserMsgOrHigher = 'xx';</script>
david@10246
    38
<script language="JavaScript" type="text/javascript" id="recBrowserMsgTitle">var recBrowserMsgTitle = 'xx';</script>
david@10246
    39
<script language="JavaScript" type="text/javascript" id="recBrowserMsgText">var recBrowserMsgText = 'xx';</script>
asier@8923
    40
david@10269
    41
<script language="JavaScript" type="text/javascript">
david@10269
    42
var validBrowserFirefox = '3.6.0.0';
david@10269
    43
var validBrowserChrome = '8.0.0.0';
david@10269
    44
var validBrowserExplorer = '7.0.0.0';
david@10269
    45
var validBrowserSafari = '5.0.0.0';
david@10269
    46
david@10269
    47
var recBrowserFirefox = '4.0.0.0';
david@10269
    48
var recBrowserChrome = '8.0.0.0';
david@10269
    49
var recBrowserExplorer = '9.0.0.0';
david@10269
    50
</script>
david@10269
    51
asier@8910
    52
<script type="text/javascript">
asier@8910
    53
  function redirectWhenPopup() {
asier@8910
    54
    var permission = false;
asier@8910
    55
    try {
asier@8910
    56
      if (top.opener.parent.frames['appFrame']) {
asier@8910
    57
        permission = true;
asier@8910
    58
      }
asier@8910
    59
    }
asier@8910
    60
    catch (e) {}
asier@8910
    61
    if (permission && top.opener) {
asier@8910
    62
      top.opener.parent.location.href = top.document.location.href;
asier@8910
    63
      top.window.close();
asier@8910
    64
    }
asier@8910
    65
  }
asier@8910
    66
asier@8910
    67
  function redirectWhenInsideMDI() {
asier@8910
    68
    if (typeof isWindowInMDIPage !== 'undefined' && isWindowInMDIPage) {
david@8918
    69
      var LayoutMDI = null;
david@8918
    70
      if (isWindowInMDIPopup && parent.opener) {
david@8918
    71
        LayoutMDI = parent.opener.getFrame('LayoutMDI'); // Since getFrame('LayoutMDI') function frameset checks equals the current opened Login_FS.html modal popup
david@8918
    72
      } else {
david@8918
    73
        LayoutMDI = getFrame('LayoutMDI');
david@8918
    74
      }
asier@8910
    75
      if (LayoutMDI && typeof parent.document.getElementById('framesetMenu') === 'object') {
asier@8910
    76
        LayoutMDI.location.href = parent.window.location.href;
asier@8910
    77
      }
asier@8910
    78
    }
asier@8910
    79
  }
asier@8910
    80
asier@8910
    81
  function hideMenuFrame() {
asier@8910
    82
    if (parent.document.getElementById('framesetMenu')) {
asier@8910
    83
      parent.document.getElementById('framesetMenu').cols = parent.document.getElementById('framesetMenu').cols.replace(parent.menuWidth, '0%');
asier@8910
    84
    }
asier@8910
    85
  }
david@8918
    86
</script>
david@8918
    87
<script type="text/javascript">
david@8958
    88
  function setLoginMessage(type, title, text) {
david@8931
    89
    if (type === 'Error') {
david@8918
    90
      var msgContainer = document.getElementById('errorMsg');
david@8958
    91
      var msgContainerTitle = document.getElementById('errorMsgTitle');
david@8958
    92
      var msgContainerContent = document.getElementById('errorMsgContent');
david@8958
    93
      if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@8958
    94
        msgContainerTitle.innerHTML = title.replace(/\n/g, '<br>').replace(/\\n/g, '<br>');
david@8958
    95
      } else {
david@8958
    96
        msgContainerTitle.innerHTML = '';
david@8958
    97
      }
david@8958
    98
      if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@8958
    99
        msgContainerContent.innerHTML = text.replace(/\n/g, '<br>').replace(/\\n/g, '<br>');
david@8958
   100
      } else {
david@8958
   101
        msgContainerContent.innerHTML = '';
david@8958
   102
      }
david@8931
   103
      msgContainer.style.display = '';
david@10269
   104
      isRecBrowserMsgShown = false;
david@8931
   105
    } else if (type === 'Warning') {
david@8958
   106
      var alertText = '';
david@8958
   107
      if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@8958
   108
        alertText += title.replace(/<br>/g, '\n') + '\n';
david@8958
   109
      }
david@8958
   110
      if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@8958
   111
        alertText += text.replace(/<br>/g, '\n')
david@8958
   112
      }
david@8958
   113
      alert(alertText);
asier@8910
   114
    }
asier@8910
   115
  }
asier@8921
   116
david@10269
   117
  var isRecBrowserMsgShown = false;
david@10246
   118
  function setRecommendedBrowserMessage(title, text) {
david@10246
   119
    var msgContainer = document.getElementById('errorMsg');
david@10246
   120
    var msgContainerTitle = document.getElementById('errorMsgTitle');
david@10246
   121
    var msgContainerContent = document.getElementById('errorMsgContent');
david@10246
   122
    msgContainerTitle.innerHTML = '';
david@10246
   123
    if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@10246
   124
      msgContainerContent.innerHTML = '<span class="Login_RecBrowserMsg_Title">' + title.replace(/\n/g, '<br>').replace(/\\n/g, '<br>') + ': ' + '</span>';
david@10246
   125
    } else {
david@10246
   126
      msgContainerContent.innerHTML = '';
david@10246
   127
    }
david@10246
   128
    if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@10246
   129
      msgContainerContent.innerHTML = msgContainerContent.innerHTML + '<span class="Login_RecBrowserMsg_Content">' + text.replace(/\n/g, '<br>').replace(/\\n/g, '<br>') + '</span>';
david@10246
   130
    }
david@10246
   131
    msgContainer.style.display = '';
david@10269
   132
    isRecBrowserMsgShown = true;
david@10246
   133
  }
david@10246
   134
david@8973
   135
  function resetLoginMessage() {
asier@8921
   136
    var msgContainer = document.getElementById('errorMsg');
david@8958
   137
    var msgContainerTitle = document.getElementById('errorMsgTitle');
david@8958
   138
    var msgContainerContent = document.getElementById('errorMsgContent');
david@8958
   139
    msgContainerTitle.innerHTML = '';
david@8958
   140
    msgContainerContent.innerHTML = '';
david@8931
   141
    msgContainer.style.display = 'none';
david@10269
   142
    isRecBrowserMsgShown = false;
asier@8921
   143
  }
david@8973
   144
david@8973
   145
  function addInputChangeCheck(input) {
david@8973
   146
    setObjAttribute(input, 'onkeypress', 'checkInputKeyDown(this); return true;');
david@8973
   147
    setObjAttribute(input, 'oncut', 'checkInputKeyDown(this); return true;');
david@8973
   148
    setObjAttribute(input, 'oncopy', 'checkInputKeyDown(this); return true;');
david@8973
   149
    setObjAttribute(input, 'onpaste', 'checkInputKeyDown(this); return true;');
david@8973
   150
  }
david@8973
   151
david@8973
   152
  function checkInputKeyDown(input, valueLength) {
david@8973
   153
    var msgContainer = document.getElementById('errorMsg');
david@10269
   154
    if (msgContainer.style.display !== 'none' && typeof input === 'object') {
david@10269
   155
      if (typeof valueLength === 'undefined' || valueLength === null) {
david@8973
   156
        valueLength = input.value.length;
david@8973
   157
        setTimeout(function() { checkInputKeyDown(input, valueLength); }, 100);
david@8973
   158
      } else {
david@10269
   159
        if (valueLength !== input.value.length && !isRecBrowserMsgShown) {
david@8973
   160
          resetLoginMessage();
david@8973
   161
        }
david@8973
   162
      }
david@8973
   163
    }
david@8973
   164
    return true;
david@8973
   165
  }
david@8918
   166
</script>
david@8918
   167
<script type="text/javascript">
david@8918
   168
  function buttonOK_click() {
david@8939
   169
    if (focusedWindowElement.id === 'user' && document.getElementById('user').value === '') {
david@8934
   170
      return true;
david@8939
   171
    } else if (focusedWindowElement.id === 'user' && document.getElementById('password').value === '') {
david@8937
   172
      setTimeout(function() { // To manage browser autocomplete feature if it is active
david@8939
   173
       if (focusedWindowElement.id === 'user' && document.getElementById('password').value === '') {
david@8934
   174
         setWindowElementFocus(document.getElementById('password')) 
david@8934
   175
       } else {
david@8934
   176
         return true;
david@8934
   177
       }
david@8934
   178
      }, 10);
david@8939
   179
    } else if (focusedWindowElement.id === 'password' && document.getElementById('password').value === '') {
david@8934
   180
      return true;
david@8939
   181
    } else if (focusedWindowElement.id === 'password' && document.getElementById('user').value === '') {
david@8934
   182
      setWindowElementFocus(document.getElementById('user'))
david@8934
   183
    } else {
david@8934
   184
      disableButton('buttonOK');
david@8934
   185
      submitXmlHttpRequest(loginResult, document.frmIdentificacion, 'DEFAULT', '../secureApp/LoginHandler.html', false, null, null);
david@8934
   186
    }
david@8918
   187
    return false;
david@8918
   188
  }
asier@8919
   189
asier@8919
   190
  function loginResult(paramXMLParticular, XMLHttpRequestObj) {
david@8931
   191
     var strText = '';
david@8931
   192
     if (getReadyStateHandler(XMLHttpRequestObj, null, false)) {
asier@8919
   193
       if (XMLHttpRequestObj.responseText) {
asier@8919
   194
         strText = XMLHttpRequestObj.responseText;
asier@8919
   195
       }
asier@8919
   196
       strText = strText.toString();
david@8931
   197
       var result = eval('('+strText+')');
asier@8919
   198
       processResult(result);
asier@8919
   199
     }
asier@8919
   200
  }
asier@8919
   201
asier@8919
   202
  function processResult(result){
asier@8919
   203
    if (result.showMessage) {
david@8958
   204
      setLoginMessage(result.messageType, result.messageTitle, result.messageText);
david@8934
   205
      document.getElementById('password').value = '';
asier@8919
   206
    }
asier@8919
   207
david@8931
   208
    if (!result.showMessage || result.messageType === 'Warning') {
david@8931
   209
      var target;
asier@8936
   210
      try {
asier@8936
   211
        if (parent.frameMenu) {
asier@8936
   212
          target = '_parent';
asier@8936
   213
        } else {
asier@8936
   214
          target = '_self';
asier@8936
   215
        }
asier@8936
   216
      } catch (e) {
asier@8936
   217
        target = '_self';
david@8931
   218
      }
asier@8935
   219
      submitCommandForm('DEFAULT', false, null, result.target, target, true);
asier@8923
   220
    } else {
david@8931
   221
      enableButton('buttonOK');
david@8966
   222
      setWindowElementFocus('password', 'id');
asier@8923
   223
    }
asier@8919
   224
  }
david@8918
   225
</script>
david@8918
   226
<script type="text/javascript">
david@8937
   227
  function manageVisualPreferences() {
david@8937
   228
    var bottomLogos = document.getElementById('BottomLogos_Container');
david@8939
   229
    if (showSupportLogo && showForgeLogo) {
david@8939
   230
      bottomLogos.className = 'Login_BottomLogos_Container_Support_Forge';
david@8937
   231
    } else if (showSupportLogo) {
david@8939
   232
      bottomLogos.className = 'Login_BottomLogos_Container_Support';
david@8939
   233
    } else if (showForgeLogo) {
david@8939
   234
      bottomLogos.className = 'Login_BottomLogos_Container_Forge';
david@8937
   235
    } else {
david@8939
   236
      bottomLogos.className = 'Login_BottomLogos_Container_None';
david@8937
   237
    }
david@8937
   238
david@8939
   239
    if (showCompanyLogo && urlCompany !== '') {
david@8971
   240
      document.getElementById('CompanyLogo_Container').innerHTML = '<a href="' + urlCompany + '" target="_blank" class="Login_Img_Link">' + document.getElementById('CompanyLogo_Container').innerHTML + '</a>';
david@8937
   241
    }
david@8937
   242
david@8939
   243
    if (showSupportLogo && urlSupport !== '') {
david@8971
   244
      document.getElementById('SupportLogo_Container').innerHTML = '<a href="' + urlSupport + '" target="_blank" class="Login_Img_Link">' + document.getElementById('SupportLogo_Container').innerHTML + '</a>';
david@8937
   245
    }
david@8937
   246
david@8939
   247
    if (showForgeLogo && urlForge !== '') {
david@8971
   248
      document.getElementById('ForgeLogo_Container').innerHTML = '<a href="' + urlForge + '" target="_blank" class="Login_Img_Link">' + document.getElementById('ForgeLogo_Container').innerHTML + '</a>';
david@8937
   249
    }
david@8937
   250
david@8937
   251
    if (showCompanyLogo) {
david@8939
   252
      document.getElementById('CompanyLogo_Container').style.display = ''
david@8937
   253
    }
david@8939
   254
    bottomLogos.style.display = '';
david@8958
   255
david@8958
   256
    var msgContainer = document.getElementById('errorMsg');
david@8958
   257
    msgContainer.innerHTML = '<span id="errorMsgTitle" class="Login_ErrorMsg_Title">xx</span><br><span id="errorMsgContent" class="Login_ErrorMsg_Content">xx</span>';
david@8937
   258
  }
david@9005
   259
david@9005
   260
  function maskLoginWindow(errorMsg) {
david@9005
   261
    var client = document.getElementById('client');
david@9005
   262
    var blocker = document.getElementById('blocker');
david@9005
   263
    blocker.innerHTML = '<div class="Login_Home_Logo_Icon" style="position: relative; padding: 50px 0px 0px 0px; margin: 0 auto;"></div><div class="LabelText" style="position: relative; text-align: center; color: red; font-size: 11pt; padding: 10px 0px 0px 0px; width: 608px; margin: 0 auto;">' + errorMsg + '</div>';
david@9005
   264
    blocker.style.display = '';
david@9005
   265
    client.style.display = 'none';
david@9005
   266
  }
david@8937
   267
</script>
david@8937
   268
<script type="text/javascript">
david@10269
   269
  function browserVersionToFloat(versionNum) {
david@10269
   270
    while (versionNum.indexOf('.') !== versionNum.lastIndexOf('.')) {
david@10269
   271
      versionNum = versionNum.substring(0, versionNum.lastIndexOf('.')) + versionNum.substring(versionNum.lastIndexOf('.')+1, versionNum.length);
david@10269
   272
    }
david@10269
   273
    versionNum = parseFloat(versionNum, 10);
david@10269
   274
    return versionNum;
david@10269
   275
  }
david@10269
   276
david@10269
   277
  function browserVersionTrim(versionNum) {
david@10269
   278
    while (versionNum.substring(versionNum.length-1, versionNum.length) === '0' || versionNum.substring(versionNum.length-1, versionNum.length) === '.') {
david@10269
   279
      versionNum = versionNum.substring(0, versionNum.length-1);
david@10269
   280
    }
david@10269
   281
    return versionNum;
david@10269
   282
  }
david@10269
   283
david@10269
   284
  /**
david@10269
   285
  * Checks if the browser is a supported one. Just for 2.50
david@10269
   286
  */
david@10269
   287
  function checkBrowserCompatibility() {
david@10269
   288
    var browserName = getBrowserInfo('name');
david@10269
   289
    var browserVersion = getBrowserInfo('version');
david@10269
   290
    var browserMajorVersion = getBrowserInfo('majorVersion');
david@10269
   291
    var isValid = false;
david@10269
   292
    if (browserName.toUpperCase().indexOf('FIREFOX') != -1 || browserName.toUpperCase().indexOf('ICEWEASEL') != -1) {
david@10269
   293
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserFirefox)) {
david@10269
   294
        isValid = true;
david@10269
   295
      }
david@10269
   296
    } else if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
david@10269
   297
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserExplorer)) {
david@10269
   298
        isValid = true;
david@10269
   299
      }
david@10269
   300
    } else if (browserName.toUpperCase().indexOf('GOOGLE CHROME') != -1) {
david@10269
   301
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserChrome)) {
david@10269
   302
        isValid = true;
david@10269
   303
      }
david@10269
   304
    } else if (browserName.toUpperCase().indexOf('APPLE SAFARI') != -1) {
david@10269
   305
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserSafari)) {
david@10269
   306
        isValid = true;
david@10269
   307
      }
david@10269
   308
    }
david@10269
   309
    return isValid;
david@10269
   310
  }
david@10269
   311
david@10269
   312
  /**
david@10269
   313
  * Checks if the browser is a recommended one
david@10269
   314
  */
david@10269
   315
  function checkRecommendedBrowser() {
david@10269
   316
    var browserName = getBrowserInfo('name');
david@10269
   317
    var browserVersion = getBrowserInfo('version');
david@10269
   318
    var browserMajorVersion = getBrowserInfo('majorVersion');
david@10269
   319
    var isRecommended = false;
david@10269
   320
    if (browserName.toUpperCase().indexOf('FIREFOX') != -1 || browserName.toUpperCase().indexOf('ICEWEASEL') != -1) {
david@10269
   321
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserFirefox)) {
david@10269
   322
        isRecommended = true;
david@10269
   323
      }
david@10269
   324
    } else if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
david@10269
   325
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserExplorer)) {
david@10269
   326
        isRecommended = true;
david@10269
   327
      }
david@10269
   328
    } else if (browserName.toUpperCase().indexOf('GOOGLE CHROME') != -1) {
david@10269
   329
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserChrome)) {
david@10269
   330
        isRecommended = true;
david@10269
   331
      }
david@10269
   332
    }
david@10269
   333
    return isRecommended;
david@10269
   334
  }
david@10269
   335
david@10269
   336
  function buildValidBrowserMsg() {
david@10269
   337
    var displayValidBrowserMsg = validBrowserMsg;
david@10269
   338
    displayValidBrowserMsg = displayValidBrowserMsg
david@10269
   339
      + '<br>' + ' * Mozilla Firefox ' + browserVersionTrim(validBrowserFirefox) + ' ' + validBrowserMsgOrHigher
david@10269
   340
      + '<br>' + ' * Google Chrome ' + browserVersionTrim(validBrowserChrome) + ' ' + validBrowserMsgOrHigher
david@10269
   341
      + '<br>' + ' * Microsoft Internet Explorer ' + browserVersionTrim(validBrowserExplorer) + ' ' + validBrowserMsgOrHigher
david@10269
   342
      + '<br>' + ' * Apple Safari ' + browserVersionTrim(validBrowserSafari) + ' ' + validBrowserMsgOrHigher;
david@10269
   343
    return displayValidBrowserMsg;
david@10269
   344
  }
david@10269
   345
david@10269
   346
  function buildRecBrowserMsgText() {
david@10269
   347
    var displayRecBrowserMsgText = recBrowserMsgText;
david@10269
   348
    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('XX', 'Google Chrome ' + browserVersionTrim(recBrowserChrome) + ', Mozilla Firefox ' + browserVersionTrim(recBrowserFirefox));
david@10269
   349
    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('YY', 'Internet Explorer ' + browserVersionTrim(recBrowserExplorer) + '');
david@10269
   350
    return displayRecBrowserMsgText;
david@10269
   351
  }
david@10269
   352
</script>
david@10269
   353
<script type="text/javascript">
asier@8910
   354
  function beforeLoadDo() {
asier@8910
   355
    redirectWhenPopup();
asier@8910
   356
    redirectWhenInsideMDI();
asier@8910
   357
    hideMenuFrame();
asier@8910
   358
  }
asier@8910
   359
asier@8910
   360
  function onLoadDo() {
david@9002
   361
    try { // To avoid in a release upgrade, that a change in code depending on these functions cause revisionControl message not being displayed
david@9002
   362
      manageVisualPreferences();
david@9002
   363
      addInputChangeCheck(document.getElementById('user'));
david@9002
   364
      addInputChangeCheck(document.getElementById('password'));
david@9002
   365
      this.windowTables = new Array(
david@9002
   366
        new windowTableId('client', 'buttonOK')
david@9002
   367
      );
david@9002
   368
      setWindowTableParentElement();
david@9002
   369
      enableShortcuts('edition');
david@9002
   370
      setWindowElementFocus('user', 'id');
david@9002
   371
    }
david@9002
   372
    catch (e) { }
asier@8923
   373
david@10269
   374
    if ((!revisionControl('10269')) || (isOpsInstance() != isOpsInstanceCached())) {
david@9005
   375
      maskLoginWindow(cacheMsg);
david@8958
   376
      setLoginMessage('Warning', '', cacheMsg);
asier@8923
   377
    }
asier@8923
   378
asier@8923
   379
    if (!checkBrowserCompatibility()) {
david@10269
   380
      var displayValidBrowserMsg = buildValidBrowserMsg();
david@10269
   381
      setLoginMessage('Warning', '', displayValidBrowserMsg);
david@10246
   382
    }
david@10246
   383
    if (!checkRecommendedBrowser()) {
david@10269
   384
      var displayRecBrowserMsgText = buildRecBrowserMsgText();
david@10269
   385
      setRecommendedBrowserMessage(recBrowserMsgTitle, displayRecBrowserMsgText);
asier@8923
   386
    }
asier@8910
   387
  }
asier@8910
   388
</script>
david@8918
   389
<script type="text/javascript">
david@8918
   390
  beforeLoadDo();
david@8918
   391
</script>
asier@8910
   392
</head>
david@8918
   393
<body onload="onLoadDo();">
david@9005
   394
  <div style="display: none; width: 100%; height: 100%; position: absolute; vertical-align: middle; padding: 0px; text-align: center;" id="blocker"></div>
asier@8910
   395
david@8918
   396
  <div class="Login_Main" id="client">
asier@8910
   397
david@8937
   398
    <div class="Login_Container">
asier@8910
   399
david@8937
   400
      <div class="Login_LogForm">
david@8918
   401
        <form method="post" action="../secureApp/LoginHandler.html" name="frmIdentificacion" id="frmFormulario" autocomplete="off">
asier@8935
   402
            <input type="hidden" name="Command" value="" />
david@8937
   403
david@8937
   404
            <div class="Login_LogForm_CompanyLogo_Container">
david@8937
   405
              <div class="Login_LogForm_CompanyLogo" id="CompanyLogo_Container" style="display: none;"><img class="Login_Logo_Company" src="../../../../../web/images/blank.gif" /></div>
david@8918
   406
            </div>
david@8937
   407
            <div class="Login_LogForm_Input_Container">
david@8918
   408
              <dl>
david@8918
   409
                <dt>
david@8967
   410
                  <label for="user" class="LabelText Login_LabelText">User Name</label>
david@8918
   411
                </dt>
david@8918
   412
                <dd>
david@8973
   413
                  <input class="dojoValidateValid Login_TextBox" type="text" maxlength="60" name="user" id="user"/>
david@8918
   414
                </dd>
david@8918
   415
                <dt>
david@8918
   416
                  <label for="password" class="LabelText Login_LabelText">Password</label>
david@8918
   417
                </dt>
david@8918
   418
                <dd>
david@8973
   419
                  <input class="dojoValidateValid Login_TextBox" type="password" maxlength="40" name="password" id="password"/>
david@8918
   420
                </dd>
david@8918
   421
              </dl>
david@8958
   422
              <div id="errorMsg" class="LabelText Login_ErrorMsg_Container" style="display: none"><!-- xxChild tags developed in javascript --></div>
david@8918
   423
            </div>
david@8937
   424
            <div class="Login_LogForm_Button_Container">
david@8937
   425
              <div class="Login_LogForm_Button">
david@8918
   426
                <button type="button" 
david@8918
   427
                  id="buttonOK" 
david@8918
   428
                  class="ButtonLink" 
david@8918
   429
                  onclick="buttonOK_click();" 
david@8918
   430
                  onfocus="buttonEvent('onfocus', this); window.status='Login'; return true;" 
david@8918
   431
                  onblur="buttonEvent('onblur', this);" 
david@8918
   432
                  onkeyup="buttonEvent('onkeyup', this);" 
david@8918
   433
                  onkeydown="buttonEvent('onkeydown', this);" 
david@8918
   434
                  onkeypress="buttonEvent('onkeypress', this);" 
david@8918
   435
                  onmouseup="buttonEvent('onmouseup', this);" 
david@8918
   436
                  onmousedown="buttonEvent('onmousedown', this);" 
david@8918
   437
                  onmouseover="buttonEvent('onmouseover', this); window.status='Login'; return true;" 
david@8918
   438
                  onmouseout="buttonEvent('onmouseout', this);">
david@8918
   439
                  <table class="Button" id="fieldTable">
david@8918
   440
                    <tr>
david@8918
   441
                      <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="Login" title="Login" src="../../../../../web/images/blank.gif" border="0" id="fieldButton" /></td>
david@8937
   442
                      <td class="Button_text Button_width">Log in</td>
david@8918
   443
                      <td class="Button_right"></td>
david@8918
   444
                    </tr>
david@8918
   445
                  </table>
david@8918
   446
                </button>
david@8918
   447
              </div>
david@8918
   448
            </div>
david@8918
   449
david@8918
   450
        </form>
david@8918
   451
      </div>
david@8918
   452
          
david@8937
   453
      <div class="Login_TopLogos_Container">
david@8918
   454
        <div>
asier@8944
   455
          <img class="Main_NavBar_logo" src="../../../../../web/images/blank.gif" onclick="openNewBrowser('http://www.openbravo.com', 'Openbravo');return false;" />
david@8937
   456
          <span class="Login_TopLogos_VersionNumber">3.0</span>
asier@8910
   457
        </div>
david@8937
   458
        <span class="Login_TopLogos_CopyrightText">&copy; Copyright Openbravo <br />
david@8918
   459
        2001-2010</span>
david@8918
   460
      </div>
david@8918
   461
david@8939
   462
      <div class="Login_BottomLogos_Container_Support_Forge" id="BottomLogos_Container" style="display: none;">
david@8937
   463
        <div class="Login_BottomLogos_SupportLogo_Container">
david@8937
   464
          <div class="LabelText Login_LabelText Login_BottomLogos_SupportLogo_Text">For support, contact:</div>
david@8937
   465
          <div class="Login_BottomLogos_SupportLogo_Logo_Container" id="SupportLogo_Container"><img class="Login_Logo_Support" src="../../../../../web/images/blank.gif" /></div>
asier@8910
   466
        </div>
david@8939
   467
        <div class="Login_BottomLogos_ForgeLogo_Container">
david@8939
   468
          <div class="LabelText Login_LabelText Login_BottomLogos_ForgeLogo_Text">Project hosted at:</div>
david@8939
   469
          <div class="Login_BottomLogos_ForgeLogo_Logo_Container" id="ForgeLogo_Container"><img class="Login_Logo_Forge" src="../../../../../web/images/blank.gif" /></div>
david@8918
   470
        </div>
david@8918
   471
      </div>
david@8918
   472
    </div>
asier@8910
   473
david@8918
   474
  </div>
asier@8910
   475
david@8918
   476
</body>
david@8918
   477
</html>