(function () { var l = { container: "quickQuery_container", resultNumBox: "quickQuery_resultNum_box", contentBox: "quickQuery_content_box", pageBox: "quickQuery_page_box", ieContentFrame: "quickQuery_frame_forIE", ieContentBox: "quickQuery_content_box_forIE" }; var m = { exprElem: "quickQuery$focus", currentContent: "quickQuery_currentContent", currentPage: "quickQuery_currentPage", title: "quickQuery_title" }; var n = document.all ? true : false; var o = { 'isSubVal': false, 'isPage': true, 'subSign': "-", 'buttonNum': 5, 'viewContentNum': 15 }; var p = { 'subval': 0, 'hz': 1, 'py': 2 }; var q = null; var r = 1; var s = o['buttonNum']; var t = 1; var u = []; var v = []; String.prototype.trim = function () { return this.replace(/^\s*|\s*$/g, '') }; var $ = function (a) { return document.getElementById(a) }; var w = window.$quickQuery = function (b, c) { var d = [], e = [], f = null, g = null, h = true, j = null; if (b) { if (c) setConfig(c); if (b.length) { f = 0; d = getElemArray(); e = b } else { f = 1; for (var k in b) { if ($(k)) { d.push($(k)); e.push(b[k]) } } } d.each(function (i) { var a = this; a.onfocus = a.onclick = function () { h = false; a.value = ""; if (a != g) { r = 1; s = o['buttonNum']; t = 1 } getQueryPanel(a); callDifferentModel(f, a, e, i); a.focus(); g = a }; a.onkeyup = function () { r = 1, s = o['buttonNum'], t = 1; callDifferentModel(f, a, e, i) }; a.onblur = function () { h = true }; document.onclick = function () { clearTimeout(j); j = setTimeout(function () { if (h) closeQueryPanel() }, 10) } }) } }; function callDifferentModel(a, b, c, i) { if (a == 0) { bindDataAndGetHtml(b, c) } else if (a == 1) { bindDataAndGetHtml(b, c[i]) } }; function bindDataAndGetHtml(a, b) { putDataIntoArray(a.value.trim(), b); bindDataIntoElements(function () { if (n) { $(l.ieContentFrame).style.width = $(l.ieContentBox).offsetWidth + "px"; $(l.ieContentFrame).style.height = $(l.ieContentBox).offsetHeight + "px" } }) }; function setConfig(a) { for (var b in a) { o[b] = a[b] } }; Array.prototype.each = function (a) { for (var i = 0; i < this.length; i++)a.call(this[i], i) }; function getQueryPanel(a) { q = a; if (!$(l.container)) { var b = document.createElement("div"); b.id = l.container; q.parentNode.appendChild(b); var c = '
'; var d = ''; var e = ''; if (!n) { b.innerHTML = c + d + e } else { var f = ''; var g = '