src/org/openbravo/erpCommon/security/Login.html
author David Baz Fayos <david.baz@openbravo.com>
Tue, 21 Jun 2011 16:28:10 +0200
changeset 12919 27b33caf9328
parent 12918 de468d5fff7a
child 13342 de5d084560bb
permissions -rw-r--r--
Updated recommended browsers list - part2
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@12918
    48
var recBrowserChrome = '9.0.0.0';
david@10269
    49
var recBrowserExplorer = '9.0.0.0';
david@12918
    50
var recBrowserSafari = '5.0.0.0';
david@10269
    51
</script>
david@10269
    52
asier@8910
    53
<script type="text/javascript">
asier@8910
    54
  function redirectWhenPopup() {
asier@8910
    55
    var permission = false;
asier@8910
    56
    try {
asier@8910
    57
      if (top.opener.parent.frames['appFrame']) {
asier@8910
    58
        permission = true;
asier@8910
    59
      }
asier@8910
    60
    }
asier@8910
    61
    catch (e) {}
asier@8910
    62
    if (permission && top.opener) {
asier@8910
    63
      top.opener.parent.location.href = top.document.location.href;
asier@8910
    64
      top.window.close();
asier@8910
    65
    }
asier@8910
    66
  }
asier@8910
    67
asier@8910
    68
  function redirectWhenInsideMDI() {
asier@8910
    69
    if (typeof isWindowInMDIPage !== 'undefined' && isWindowInMDIPage) {
david@8918
    70
      var LayoutMDI = null;
david@8918
    71
      if (isWindowInMDIPopup && parent.opener) {
david@8918
    72
        LayoutMDI = parent.opener.getFrame('LayoutMDI'); // Since getFrame('LayoutMDI') function frameset checks equals the current opened Login_FS.html modal popup
david@8918
    73
      } else {
david@8918
    74
        LayoutMDI = getFrame('LayoutMDI');
david@8918
    75
      }
asier@8910
    76
      if (LayoutMDI && typeof parent.document.getElementById('framesetMenu') === 'object') {
asier@8910
    77
        LayoutMDI.location.href = parent.window.location.href;
asier@8910
    78
      }
asier@8910
    79
    }
asier@8910
    80
  }
asier@8910
    81
asier@8910
    82
  function hideMenuFrame() {
asier@8910
    83
    if (parent.document.getElementById('framesetMenu')) {
asier@8910
    84
      parent.document.getElementById('framesetMenu').cols = parent.document.getElementById('framesetMenu').cols.replace(parent.menuWidth, '0%');
asier@8910
    85
    }
asier@8910
    86
  }
david@8918
    87
</script>
david@8918
    88
<script type="text/javascript">
david@8958
    89
  function setLoginMessage(type, title, text) {
david@8931
    90
    if (type === 'Error') {
david@8918
    91
      var msgContainer = document.getElementById('errorMsg');
david@8958
    92
      var msgContainerTitle = document.getElementById('errorMsgTitle');
david@8958
    93
      var msgContainerContent = document.getElementById('errorMsgContent');
david@8958
    94
      if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@8958
    95
        msgContainerTitle.innerHTML = title.replace(/\n/g, '<br>').replace(/\\n/g, '<br>');
david@8958
    96
      } else {
david@8958
    97
        msgContainerTitle.innerHTML = '';
david@8958
    98
      }
david@8958
    99
      if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@8958
   100
        msgContainerContent.innerHTML = text.replace(/\n/g, '<br>').replace(/\\n/g, '<br>');
david@8958
   101
      } else {
david@8958
   102
        msgContainerContent.innerHTML = '';
david@8958
   103
      }
david@8931
   104
      msgContainer.style.display = '';
david@10269
   105
      isRecBrowserMsgShown = false;
david@8931
   106
    } else if (type === 'Warning') {
david@8958
   107
      var alertText = '';
david@8958
   108
      if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@8958
   109
        alertText += title.replace(/<br>/g, '\n') + '\n';
david@8958
   110
      }
david@8958
   111
      if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@8958
   112
        alertText += text.replace(/<br>/g, '\n')
david@8958
   113
      }
david@8958
   114
      alert(alertText);
asier@8910
   115
    }
asier@8910
   116
  }
asier@8921
   117
david@10269
   118
  var isRecBrowserMsgShown = false;
david@10246
   119
  function setRecommendedBrowserMessage(title, text) {
david@10246
   120
    var msgContainer = document.getElementById('errorMsg');
david@10246
   121
    var msgContainerTitle = document.getElementById('errorMsgTitle');
david@10246
   122
    var msgContainerContent = document.getElementById('errorMsgContent');
david@10246
   123
    msgContainerTitle.innerHTML = '';
david@10246
   124
    if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@10246
   125
      msgContainerContent.innerHTML = '<span class="Login_RecBrowserMsg_Title">' + title.replace(/\n/g, '<br>').replace(/\\n/g, '<br>') + ': ' + '</span>';
david@10246
   126
    } else {
david@10246
   127
      msgContainerContent.innerHTML = '';
david@10246
   128
    }
david@10246
   129
    if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@10246
   130
      msgContainerContent.innerHTML = msgContainerContent.innerHTML + '<span class="Login_RecBrowserMsg_Content">' + text.replace(/\n/g, '<br>').replace(/\\n/g, '<br>') + '</span>';
david@10246
   131
    }
david@10246
   132
    msgContainer.style.display = '';
david@10269
   133
    isRecBrowserMsgShown = true;
david@10246
   134
  }
david@10246
   135
david@8973
   136
  function resetLoginMessage() {
asier@8921
   137
    var msgContainer = document.getElementById('errorMsg');
david@8958
   138
    var msgContainerTitle = document.getElementById('errorMsgTitle');
david@8958
   139
    var msgContainerContent = document.getElementById('errorMsgContent');
david@8958
   140
    msgContainerTitle.innerHTML = '';
david@8958
   141
    msgContainerContent.innerHTML = '';
david@8931
   142
    msgContainer.style.display = 'none';
david@10269
   143
    isRecBrowserMsgShown = false;
asier@8921
   144
  }
david@8973
   145
david@8973
   146
  function addInputChangeCheck(input) {
david@8973
   147
    setObjAttribute(input, 'onkeypress', 'checkInputKeyDown(this); return true;');
david@8973
   148
    setObjAttribute(input, 'oncut', 'checkInputKeyDown(this); return true;');
david@8973
   149
    setObjAttribute(input, 'oncopy', 'checkInputKeyDown(this); return true;');
david@8973
   150
    setObjAttribute(input, 'onpaste', 'checkInputKeyDown(this); return true;');
david@8973
   151
  }
david@8973
   152
david@8973
   153
  function checkInputKeyDown(input, valueLength) {
david@8973
   154
    var msgContainer = document.getElementById('errorMsg');
david@10269
   155
    if (msgContainer.style.display !== 'none' && typeof input === 'object') {
david@10269
   156
      if (typeof valueLength === 'undefined' || valueLength === null) {
david@8973
   157
        valueLength = input.value.length;
david@8973
   158
        setTimeout(function() { checkInputKeyDown(input, valueLength); }, 100);
david@8973
   159
      } else {
david@10269
   160
        if (valueLength !== input.value.length && !isRecBrowserMsgShown) {
david@8973
   161
          resetLoginMessage();
david@8973
   162
        }
david@8973
   163
      }
david@8973
   164
    }
david@8973
   165
    return true;
david@8973
   166
  }
david@8918
   167
</script>
david@8918
   168
<script type="text/javascript">
david@8918
   169
  function buttonOK_click() {
david@8939
   170
    if (focusedWindowElement.id === 'user' && document.getElementById('user').value === '') {
david@8934
   171
      return true;
david@8939
   172
    } else if (focusedWindowElement.id === 'user' && document.getElementById('password').value === '') {
david@8937
   173
      setTimeout(function() { // To manage browser autocomplete feature if it is active
david@8939
   174
       if (focusedWindowElement.id === 'user' && document.getElementById('password').value === '') {
david@8934
   175
         setWindowElementFocus(document.getElementById('password')) 
david@8934
   176
       } else {
david@8934
   177
         return true;
david@8934
   178
       }
david@8934
   179
      }, 10);
david@8939
   180
    } else if (focusedWindowElement.id === 'password' && document.getElementById('password').value === '') {
david@8934
   181
      return true;
david@8939
   182
    } else if (focusedWindowElement.id === 'password' && document.getElementById('user').value === '') {
david@8934
   183
      setWindowElementFocus(document.getElementById('user'))
david@8934
   184
    } else {
david@8934
   185
      disableButton('buttonOK');
david@8934
   186
      submitXmlHttpRequest(loginResult, document.frmIdentificacion, 'DEFAULT', '../secureApp/LoginHandler.html', false, null, null);
david@8934
   187
    }
david@8918
   188
    return false;
david@8918
   189
  }
asier@8919
   190
asier@8919
   191
  function loginResult(paramXMLParticular, XMLHttpRequestObj) {
david@8931
   192
     var strText = '';
david@8931
   193
     if (getReadyStateHandler(XMLHttpRequestObj, null, false)) {
asier@8919
   194
       if (XMLHttpRequestObj.responseText) {
asier@8919
   195
         strText = XMLHttpRequestObj.responseText;
asier@8919
   196
       }
asier@8919
   197
       strText = strText.toString();
david@8931
   198
       var result = eval('('+strText+')');
asier@8919
   199
       processResult(result);
asier@8919
   200
     }
asier@8919
   201
  }
asier@8919
   202
asier@8919
   203
  function processResult(result){
asier@8919
   204
    if (result.showMessage) {
david@8958
   205
      setLoginMessage(result.messageType, result.messageTitle, result.messageText);
david@8934
   206
      document.getElementById('password').value = '';
asier@8919
   207
    }
asier@8919
   208
david@8931
   209
    if (!result.showMessage || result.messageType === 'Warning') {
david@8931
   210
      var target;
asier@8936
   211
      try {
asier@8936
   212
        if (parent.frameMenu) {
asier@8936
   213
          target = '_parent';
asier@8936
   214
        } else {
asier@8936
   215
          target = '_self';
asier@8936
   216
        }
asier@8936
   217
      } catch (e) {
asier@8936
   218
        target = '_self';
david@8931
   219
      }
asier@8935
   220
      submitCommandForm('DEFAULT', false, null, result.target, target, true);
asier@8923
   221
    } else {
david@8931
   222
      enableButton('buttonOK');
david@8966
   223
      setWindowElementFocus('password', 'id');
asier@8923
   224
    }
asier@8919
   225
  }
david@8918
   226
</script>
david@8918
   227
<script type="text/javascript">
david@8937
   228
  function manageVisualPreferences() {
david@10723
   229
    var topLogos = document.getElementById('TopLogos_Container');
david@8937
   230
    var bottomLogos = document.getElementById('BottomLogos_Container');
david@8939
   231
    if (showSupportLogo && showForgeLogo) {
david@10723
   232
      topLogos.className = 'Login_TopLogos_Container_Support_Forge';
david@8937
   233
    } else if (showSupportLogo) {
david@10723
   234
      topLogos.className = 'Login_TopLogos_Container_Support';
david@8939
   235
    } else if (showForgeLogo) {
david@10723
   236
      topLogos.className = 'Login_TopLogos_Container_Forge';
david@8937
   237
    } else {
david@10723
   238
      topLogos.className = 'Login_TopLogos_Container_None';
david@8937
   239
    }
david@8937
   240
david@8939
   241
    if (showCompanyLogo && urlCompany !== '') {
david@8971
   242
      document.getElementById('CompanyLogo_Container').innerHTML = '<a href="' + urlCompany + '" target="_blank" class="Login_Img_Link">' + document.getElementById('CompanyLogo_Container').innerHTML + '</a>';
david@8937
   243
    }
david@8937
   244
david@8939
   245
    if (showSupportLogo && urlSupport !== '') {
david@8971
   246
      document.getElementById('SupportLogo_Container').innerHTML = '<a href="' + urlSupport + '" target="_blank" class="Login_Img_Link">' + document.getElementById('SupportLogo_Container').innerHTML + '</a>';
david@8937
   247
    }
david@8937
   248
david@8939
   249
    if (showForgeLogo && urlForge !== '') {
david@8971
   250
      document.getElementById('ForgeLogo_Container').innerHTML = '<a href="' + urlForge + '" target="_blank" class="Login_Img_Link">' + document.getElementById('ForgeLogo_Container').innerHTML + '</a>';
david@8937
   251
    }
david@8937
   252
david@8937
   253
    if (showCompanyLogo) {
david@8939
   254
      document.getElementById('CompanyLogo_Container').style.display = ''
david@8937
   255
    }
david@10723
   256
    topLogos.style.display = '';
david@8939
   257
    bottomLogos.style.display = '';
david@8958
   258
david@8958
   259
    var msgContainer = document.getElementById('errorMsg');
david@8958
   260
    msgContainer.innerHTML = '<span id="errorMsgTitle" class="Login_ErrorMsg_Title">xx</span><br><span id="errorMsgContent" class="Login_ErrorMsg_Content">xx</span>';
david@8937
   261
  }
david@9005
   262
david@9005
   263
  function maskLoginWindow(errorMsg) {
david@9005
   264
    var client = document.getElementById('client');
david@9005
   265
    var blocker = document.getElementById('blocker');
david@9005
   266
    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
   267
    blocker.style.display = '';
david@9005
   268
    client.style.display = 'none';
david@9005
   269
  }
david@8937
   270
</script>
david@8937
   271
<script type="text/javascript">
david@10269
   272
  function browserVersionToFloat(versionNum) {
david@10269
   273
    while (versionNum.indexOf('.') !== versionNum.lastIndexOf('.')) {
david@10269
   274
      versionNum = versionNum.substring(0, versionNum.lastIndexOf('.')) + versionNum.substring(versionNum.lastIndexOf('.')+1, versionNum.length);
david@10269
   275
    }
david@10269
   276
    versionNum = parseFloat(versionNum, 10);
david@10269
   277
    return versionNum;
david@10269
   278
  }
david@10269
   279
david@10269
   280
  function browserVersionTrim(versionNum) {
david@12919
   281
    while ((versionNum.substring(versionNum.length-1, versionNum.length) === '0' && versionNum.indexOf('.') !== -1) || versionNum.substring(versionNum.length-1, versionNum.length) === '.') {
david@12919
   282
      versionNum = versionNum.substring(0, versionNum.length-1);
david@10269
   283
    }
david@10269
   284
    return versionNum;
david@10269
   285
  }
david@10269
   286
david@10269
   287
  /**
david@10269
   288
  * Checks if the browser is a supported one. Just for 2.50
david@10269
   289
  */
david@10269
   290
  function checkBrowserCompatibility() {
david@10269
   291
    var browserName = getBrowserInfo('name');
david@10269
   292
    var browserVersion = getBrowserInfo('version');
david@10269
   293
    var browserMajorVersion = getBrowserInfo('majorVersion');
david@10269
   294
    var isValid = false;
david@10269
   295
    if (browserName.toUpperCase().indexOf('FIREFOX') != -1 || browserName.toUpperCase().indexOf('ICEWEASEL') != -1) {
david@10269
   296
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserFirefox)) {
david@10269
   297
        isValid = true;
david@10269
   298
      }
david@10269
   299
    } else if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
david@10269
   300
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserExplorer)) {
david@10269
   301
        isValid = true;
david@10269
   302
      }
david@10269
   303
    } else if (browserName.toUpperCase().indexOf('GOOGLE CHROME') != -1) {
david@10269
   304
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserChrome)) {
david@10269
   305
        isValid = true;
david@10269
   306
      }
david@10269
   307
    } else if (browserName.toUpperCase().indexOf('APPLE SAFARI') != -1) {
david@10269
   308
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserSafari)) {
david@10269
   309
        isValid = true;
david@10269
   310
      }
david@10269
   311
    }
david@10269
   312
    return isValid;
david@10269
   313
  }
david@10269
   314
david@10269
   315
  /**
david@10269
   316
  * Checks if the browser is a recommended one
david@10269
   317
  */
david@10269
   318
  function checkRecommendedBrowser() {
david@10269
   319
    var browserName = getBrowserInfo('name');
david@10269
   320
    var browserVersion = getBrowserInfo('version');
david@10269
   321
    var browserMajorVersion = getBrowserInfo('majorVersion');
david@10269
   322
    var isRecommended = false;
david@10269
   323
    if (browserName.toUpperCase().indexOf('FIREFOX') != -1 || browserName.toUpperCase().indexOf('ICEWEASEL') != -1) {
david@10269
   324
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserFirefox)) {
david@10269
   325
        isRecommended = true;
david@10269
   326
      }
david@10269
   327
    } else if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
david@10269
   328
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserExplorer)) {
david@10269
   329
        isRecommended = true;
david@10269
   330
      }
david@10269
   331
    } else if (browserName.toUpperCase().indexOf('GOOGLE CHROME') != -1) {
david@10269
   332
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserChrome)) {
david@10269
   333
        isRecommended = true;
david@10269
   334
      }
david@12918
   335
    } else if (browserName.toUpperCase().indexOf('APPLE SAFARI') != -1) {
david@12918
   336
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserSafari)) {
david@12918
   337
        isRecommended = true;
david@12918
   338
      }
david@10269
   339
    }
david@10269
   340
    return isRecommended;
david@10269
   341
  }
david@10269
   342
david@10269
   343
  function buildValidBrowserMsg() {
david@10269
   344
    var displayValidBrowserMsg = validBrowserMsg;
david@10269
   345
    displayValidBrowserMsg = displayValidBrowserMsg
david@10269
   346
      + '<br>' + ' * Mozilla Firefox ' + browserVersionTrim(validBrowserFirefox) + ' ' + validBrowserMsgOrHigher
david@10269
   347
      + '<br>' + ' * Google Chrome ' + browserVersionTrim(validBrowserChrome) + ' ' + validBrowserMsgOrHigher
david@10269
   348
      + '<br>' + ' * Microsoft Internet Explorer ' + browserVersionTrim(validBrowserExplorer) + ' ' + validBrowserMsgOrHigher
david@10269
   349
      + '<br>' + ' * Apple Safari ' + browserVersionTrim(validBrowserSafari) + ' ' + validBrowserMsgOrHigher;
david@10269
   350
    return displayValidBrowserMsg;
david@10269
   351
  }
david@10269
   352
david@10269
   353
  function buildRecBrowserMsgText() {
david@10269
   354
    var displayRecBrowserMsgText = recBrowserMsgText;
david@12918
   355
    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('XX', 'Google Chrome ' + browserVersionTrim(recBrowserChrome) + ', Mozilla Firefox ' + browserVersionTrim(recBrowserFirefox) + ', Internet Explorer ' + browserVersionTrim(recBrowserExplorer));
david@12918
   356
    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('YY', 'Apple Safari ' + browserVersionTrim(recBrowserSafari) + '');
david@10269
   357
    return displayRecBrowserMsgText;
david@10269
   358
  }
david@10269
   359
</script>
david@10269
   360
<script type="text/javascript">
asier@8910
   361
  function beforeLoadDo() {
asier@8910
   362
    redirectWhenPopup();
asier@8910
   363
    redirectWhenInsideMDI();
asier@8910
   364
    hideMenuFrame();
asier@8910
   365
  }
asier@8910
   366
asier@8910
   367
  function onLoadDo() {
david@9002
   368
    try { // To avoid in a release upgrade, that a change in code depending on these functions cause revisionControl message not being displayed
david@9002
   369
      manageVisualPreferences();
david@9002
   370
      addInputChangeCheck(document.getElementById('user'));
david@9002
   371
      addInputChangeCheck(document.getElementById('password'));
david@9002
   372
      this.windowTables = new Array(
david@9002
   373
        new windowTableId('client', 'buttonOK')
david@9002
   374
      );
david@9002
   375
      setWindowTableParentElement();
david@9002
   376
      enableShortcuts('edition');
david@9002
   377
      setWindowElementFocus('user', 'id');
david@9002
   378
    }
david@9002
   379
    catch (e) { }
asier@8923
   380
david@12665
   381
    if ((!revisionControl('11665')) || (isOpsInstance() != isOpsInstanceCached())) {
david@9005
   382
      maskLoginWindow(cacheMsg);
david@8958
   383
      setLoginMessage('Warning', '', cacheMsg);
asier@8923
   384
    }
asier@8923
   385
asier@8923
   386
    if (!checkBrowserCompatibility()) {
david@10269
   387
      var displayValidBrowserMsg = buildValidBrowserMsg();
david@10269
   388
      setLoginMessage('Warning', '', displayValidBrowserMsg);
david@10246
   389
    }
david@10246
   390
    if (!checkRecommendedBrowser()) {
david@10269
   391
      var displayRecBrowserMsgText = buildRecBrowserMsgText();
david@10269
   392
      setRecommendedBrowserMessage(recBrowserMsgTitle, displayRecBrowserMsgText);
asier@8923
   393
    }
asier@8910
   394
  }
asier@8910
   395
</script>
david@8918
   396
<script type="text/javascript">
david@8918
   397
  beforeLoadDo();
david@8918
   398
</script>
asier@8910
   399
</head>
david@8918
   400
<body onload="onLoadDo();">
david@9005
   401
  <div style="display: none; width: 100%; height: 100%; position: absolute; vertical-align: middle; padding: 0px; text-align: center;" id="blocker"></div>
asier@8910
   402
david@8918
   403
  <div class="Login_Main" id="client">
asier@8910
   404
david@8937
   405
    <div class="Login_Container">
asier@8910
   406
david@8937
   407
      <div class="Login_LogForm">
david@8918
   408
        <form method="post" action="../secureApp/LoginHandler.html" name="frmIdentificacion" id="frmFormulario" autocomplete="off">
asier@8935
   409
            <input type="hidden" name="Command" value="" />
david@8937
   410
david@8937
   411
            <div class="Login_LogForm_CompanyLogo_Container">
david@8937
   412
              <div class="Login_LogForm_CompanyLogo" id="CompanyLogo_Container" style="display: none;"><img class="Login_Logo_Company" src="../../../../../web/images/blank.gif" /></div>
david@8918
   413
            </div>
david@8937
   414
            <div class="Login_LogForm_Input_Container">
david@8918
   415
              <dl>
david@8918
   416
                <dt>
david@8967
   417
                  <label for="user" class="LabelText Login_LabelText">User Name</label>
david@8918
   418
                </dt>
david@8918
   419
                <dd>
david@8973
   420
                  <input class="dojoValidateValid Login_TextBox" type="text" maxlength="60" name="user" id="user"/>
david@8918
   421
                </dd>
david@8918
   422
                <dt>
david@8918
   423
                  <label for="password" class="LabelText Login_LabelText">Password</label>
david@8918
   424
                </dt>
david@8918
   425
                <dd>
david@8973
   426
                  <input class="dojoValidateValid Login_TextBox" type="password" maxlength="40" name="password" id="password"/>
david@8918
   427
                </dd>
david@8918
   428
              </dl>
david@8958
   429
              <div id="errorMsg" class="LabelText Login_ErrorMsg_Container" style="display: none"><!-- xxChild tags developed in javascript --></div>
david@8918
   430
            </div>
david@8937
   431
            <div class="Login_LogForm_Button_Container">
david@8937
   432
              <div class="Login_LogForm_Button">
david@8918
   433
                <button type="button" 
david@8918
   434
                  id="buttonOK" 
david@8918
   435
                  class="ButtonLink" 
david@8918
   436
                  onclick="buttonOK_click();" 
david@8918
   437
                  onfocus="buttonEvent('onfocus', this); window.status='Login'; return true;" 
david@8918
   438
                  onblur="buttonEvent('onblur', this);" 
david@8918
   439
                  onkeyup="buttonEvent('onkeyup', this);" 
david@8918
   440
                  onkeydown="buttonEvent('onkeydown', this);" 
david@8918
   441
                  onkeypress="buttonEvent('onkeypress', this);" 
david@8918
   442
                  onmouseup="buttonEvent('onmouseup', this);" 
david@8918
   443
                  onmousedown="buttonEvent('onmousedown', this);" 
david@8918
   444
                  onmouseover="buttonEvent('onmouseover', this); window.status='Login'; return true;" 
david@8918
   445
                  onmouseout="buttonEvent('onmouseout', this);">
david@8918
   446
                  <table class="Button" id="fieldTable">
david@8918
   447
                    <tr>
david@8918
   448
                      <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
   449
                      <td class="Button_text Button_width">Log in</td>
david@8918
   450
                      <td class="Button_right"></td>
david@8918
   451
                    </tr>
david@8918
   452
                  </table>
david@8918
   453
                </button>
david@8918
   454
              </div>
david@8918
   455
            </div>
david@8918
   456
david@8918
   457
        </form>
david@8918
   458
      </div>
david@10723
   459
david@10723
   460
      <div class="Login_TopLogos_Container_Support_Forge" id="TopLogos_Container" style="display: none;">
david@10723
   461
        <div style="height: 1px; width: 1px; font-size: 1"></div>
david@10723
   462
        <div class="Login_TopLogos_ForgeLogo_Container">
david@10723
   463
          <div class="LabelText Login_LabelText Login_TopLogos_ForgeLogo_Text">Project hosted at:</div>
david@10723
   464
          <div class="Login_TopLogos_ForgeLogo_Logo_Container" id="ForgeLogo_Container"><img class="Login_Logo_Forge" src="../../../../../web/images/blank.gif" /></div>
asier@8910
   465
        </div>
david@10723
   466
        <div class="Login_TopLogos_SupportLogo_Container">
david@10723
   467
          <div class="LabelText Login_LabelText Login_TopLogos_SupportLogo_Text">For support, contact:</div>
david@10723
   468
          <div class="Login_TopLogos_SupportLogo_Logo_Container" id="SupportLogo_Container"><img class="Login_Logo_Support" src="../../../../../web/images/blank.gif" /></div>
david@10723
   469
        </div>
david@8918
   470
      </div>
david@8918
   471
david@10723
   472
      <div class="Login_BottomLogos_Container" id="BottomLogos_Container" style="display: none;">
david@10723
   473
        <div class="Login_BottomLogos_Openbravo_Logo_Container" id="OpenbravoLogo_Container"><img class="Login_Logo_Openbravo" src="../../../../../web/images/blank.gif" /></div>
david@10723
   474
        <div class="Login_BottomLogos_CopyrightText_Container"><span class="Login_BottomLogos_CopyrightText">&copy; Copyright Openbravo <br />
david@10723
   475
        2001-2011</span></div>
david@8918
   476
      </div>
david@8918
   477
    </div>
asier@8910
   478
david@8918
   479
  </div>
asier@8910
   480
david@8918
   481
</body>
david@8918
   482
</html>