// JavaScript Document var cookieName_id = "last_login_user_id"; var cookieName_name = "last_login_user_name"; var cookieTools = new CookieTools(); var showUserName = false; function isIE6(){ if (navigator.appName.indexOf("Microsoft") == -1 || parseInt(navigator.appVersion.charAt(22)) < 6){ window.location.reload(_baseURL + "login/download/download.jsp"); } } function savePassword(){ if(document.all.namestorage.checked) cookieTools.setNeverOverdueCookie("savepass_"+document.all.user.value , document.all.password_input.value); else cookieTools.deleteCookie("savepass_"+document.all.user.value); } function login() { window.document.loginForm.action = "LoginServlet"; window.document.loginForm.submit(); } function setup() { var aa = screen.width; var bb = screen.height; if(aa<1024||bb<768) { alert("您现在的屏幕分辨率是"+aa+"x"+bb+",建议您调整到最佳分辨率:1024x768"); } var cc = navigator.appName; if(cc!="Microsoft Internet Explorer") { alert("您使用的浏览器不是IE,建议您使用IE浏览器。"); } if(cc=="Microsoft Internet Explorer") { var versionFull=navigator.appVersion; var version=versionFull.substring(versionFull.indexOf(';')+7,versionFull.lastIndexOf(';')); //alert(versionFull); //alert(version); if(parseInt(version)<6) { alert("您现在使用的IE版本不是6.0,建议您将IE版本升级到6.0或以上"); } // windows98 var windowsVersion = versionFull.substring(versionFull.indexOf(';')+20,versionFull.indexOf(';')+22); //alert(windowsVersion); if(windowsVersion=="98") { alert("您使用的是windows 98系统,可能会在操作过程中出现问题,请使用win2000以上操作系统!"); } //linus var systemType = versionFull.substring(versionFull.indexOf(';')+12,versionFull.indexOf(';')+19); //alert(systemType); if(systemType!="Windows") { alert("您使用的不是windows系统,可能会在操作过程中出现问题,请使用win2000以上操作系统!"); } } var arg = window.dialogArguments; //如果当前窗口是模态窗口 if(arg != null) { if(typeof(arg) == "object"){ var originalWindow = arg._originalWindow; if(typeof(originalWindow) == "object"){ originalWindow.location = window.location; } var historyModalDialog = arg._historyModalDialog; if(typeof(historyModalDialog) == "object"){ for(var i = 0, len = historyModalDialog.length; i < len; i++){ if(typeof(historyModalDialog[i]) == "object" && typeof(historyModalDialog[i].close) == "object"){ historyModalDialog[i].close(); } } } }else{ if(typeof(_alert) == "function"){ _alert("打开此模态窗口时传递的参数不符合系统规定:参数必须以对象的方式传递![系统错误!来源:login.js]"); }else{ alert("调用login.js文件的页面没有调用public.js文件![系统错误!来源:login.js]"); } return; } window.close(); return; } if(top.window.location != window.location){ window.open(window.location.href,"","scrollbars=yes,titlebar=yes,status=yes,toolbar=yes,location=yes,menubar=yes,resizable=yes"); window.close(); top.window.close(); return; } var loginName = cookieTools.getCookie(cookieName_id); var userName = cookieTools.getCookie(cookieName_name); var userpass = cookieTools.getCookie("savepass_"+userName); if(loginName != null && userName != null) { // document.all.loginName.value = loginName; document.all.username.value = userName; showUserName = true; if(userpass){ document.all.password.value = userpass; } document.all.loginName.focus(); }else { document.all.loginName.focus(); } isIE6(); } function queryUserName(loginName) { if(showUserName || loginName == null || loginName == "") { return; } showUserName = true; window.document.loginForm.action = "login/queryUserName.do"; window.document.loginForm.submit(); } function saveCooks(){ cookieTools.setNeverOverdueCookie(cookieName_id, document.all.loginName.value); cookieTools.setNeverOverdueCookie(cookieName_name, document.all.username.value); } function changeUser() { showUserName = false; }