var DOM = new Object(); DOM.getId = function (x) {return document.getElementById(x);} DOM.getName = function (x, y) {return y == null ? document.getElementsByName(x) : y.getElementsByName(x);} DOM.getTag = function (x, y) {return y == null ? document.getElementsByTagName(x) : y.getElementsByTagName(x);} DOM.create = function (x, y) {return y == null ? document.createElement(x) : y.createElement(x);} DOM.append = function (x, y) {return y == null ? document.appendChild(x) : y.appendChild(x);} var $ = window.document, $_ID = []; var isFF = /Firefox/g.test(navigator.userAgent); var isIE = /MSIE/g.test(navigator.userAgent); $.id = function(x) {return document.getElementById(x);} $.name = function(x) {return document.getElementsByName(x);} $.tag = function(x) {return document.getElementsByTagName(x);} Function.prototype.toString = function () { return '程序内容由“昊玄”编写完成,有事请与他联系(QQ:57659930)!'; } window.onload = function () { ID_ini(); del_a_area_box(); if (typeof(autorun) == 'function') autorun(); } function page(x) { try { with (document.forms['list']) { if (! CurrentPage.length) return; var MIN, MAX, Pages = CurrentPage.length ? parseInt(CurrentPage.value, 10) : 0; MAX = CurrentPage.length ? parseInt(CurrentPage[CurrentPage.length - 1].value, 10) : 0; MIN = CurrentPage.length ? parseInt(CurrentPage[0].value, 10) : 0; switch (x) { case 1: Pages = MIN; break; case 2: Pages++; break; case 3: Pages--; break; case 4: Pages = MAX; break; } if (Pages < MIN || Pages > MAX) return; for (var i = 0; CurrentPage.length; i++) { if (CurrentPage[i].value == Pages.toString()) {CurrentPage[i].selected = true; break;} } submit(); } } catch (e) {} } function ID_ini() { var i = j = 0, input = document.getElementsByTagName('input'); if (! input.length) return; if (! $_ID.length) { for (; i < input.length; i++) { if ((input[i].name == 'ID' || input[i].name == 'ID[]') && input[i].type == 'checkbox') $_ID[j++] = input[i]; } var click = function () { for (var i = 0, logic = true; i < $_ID.length; i++) { if (! $_ID[i].checked) {logic = false; break;} } $.id('sAll').checked = logic; }; for (i = 0; i < $_ID.length; i++) { if (isIE) $_ID[i].attachEvent('onclick', click); else $_ID[i].addEventListener('click', click, false); } } } function All() { if (! $_ID.length) return; var i = 0, sign = ! $.id('sAll').checked; for (; i < $_ID.length; i++) $_ID[i].checked = sign; } function Close() { if (isIE) { var ua = navigator.userAgent; var version = parseFloat(ua.substring(ua.indexOf('MSIE ') + 5, ua.indexOf(';', ua.indexOf('MSIE '))), 10); if (version < 5.5) { var obj = '\r\n'; obj += ' \r\n'; document.body.insertAdjacentHTML('beforeEnd', obj); document.getElementById('jmClose').Click(); } else {window.opener = null; window.close();} } else window.close(); } function del_a_area_box() { var a = document.getElementsByTagName('a'), i = 0; var area = document.getElementsByTagName('area'); if (isIE) { for (i = 0; i < a.length; i++) a[i].onfocus = function () {this.blur();} for (i = 0; i < area.length; i++) area[i].onfocus = function () {this.blur();} } }