function CreateCacheSpace(a, c) {
var b = new CacheSpace(a,c);
return b
}
function CacheSpace(a, b) {
if (!isNaN(a)) {
a = parseInt(a);
if (a > 0) {
a = a
}
} else {
a = 20
}
this.size = a;
this.list = new Array();
this.length = 0;
this.pointer = 0;
this.type = b
}
CacheSpace.prototype = {
find: function(a, c) {
var b = this.length;
var d = this.defaultFind;
if (typeof c == "function") {
d = c
}
while (b--) {
if (d(this.list[b], a)) {
return b
}
}
return -1
},
defaultFind: function(c, d) {
return c == d
},
enterSpace: function(a) {
if (typeof a != "undefined") {
if (this.type == 0) {
if (this.pointer >= this.size) {
this.pointer = 0
}
this.list[this.pointer] = a;
this.pointer++
} else {
if (this.pointer >= this.size) {
var b = this.list[0].time;
var d = 0;
for (var c = 1; c < this.size; c++) {
if (this.list[c].time < b) {
b = this.list[c].time;
d = c
}
}
this.list[d] = a
} else {
this.list[this.pointer] = a;
this.pointer++
}
}
if (this.length < this.size) {
this.length++
}
return true
}
return false
},
popSpace: function() {
if (this.length > 0) {
var a = this.list[this.pointer];
this.list--;
this.length--;
return a
}
return null
},
clearSpace: function() {
this.length = 0;
this.pointer = 0
},
isEmpty: function() {
if (this.length == 0) {
return true
} else {
return false
}
}
};
CacheSpace.prototype.exfind = function(a) {
return this.find(a, function(b) {
return b.key == a
})
}
;
CacheSpace.prototype.pushSpace = function(b, a) {
if (b && a) {
this.enterSpace({
key: b,
value: a,
time: 1
})
}
}
;
CacheSpace.prototype.getExData = function(a) {
var b = this.getEle(a);
if (b) {
b.time++;
return b.value
}
return ""
}
;
CacheSpace.prototype.getEle = function(a) {
var b = this.find(a, function(d, c) {
if (d) {
return d.key == c
}
return false
});
if (b >= 0 && b < this.length) {
return this.list[b]
}
return null
}
;
$.ajaxWebServiceGlobalFalse = function(b, c, a) {
$.ajax({
type: "POST",
contentType: "application/json",
url: b,
data: c,
dataType: "json",
global: false,
success: a
})
}
;
$.ajaxWebService = function(b, c, a) {
$.ajax({
type: "POST",
contentType: "application/json",
url: b,
data: c,
dataType: "json",
success: a
})
}
;
$.ajaxWebServiceFalse = function(b, c, a) {
$.ajax({
type: "POST",
contentType: "application/json",
url: b,
data: c,
dataType: "json",
async: false,
success: a
})
}
;
$.fn.loadUserControl = function(b, a) {
var c = this;
if (a == "" || a == null) {
a = location.pathname.replace("/", "")
}
a += "/RenderUserControl";
$.ajaxWebService(a, "{control:'" + b + "'}", function(d) {
c.html(d.d)
})
}
;
jQuery.fn.pagination = function(b, a) {
a = jQuery.extend({
items_per_page: 10,
num_display_entries: 10,
current_page: 0,
num_edge_entries: 0,
link_to: "#",
prev_text: "Prev",
next_text: "Next",
ellipse_text: "...",
prev_show_always: true,
next_show_always: true,
page_show_always: false,
callback: function() {
return false
}
}, a || {});
return this.each(function() {
function c() {
return Math.ceil(b / a.items_per_page)
}
function d() {
var l = Math.ceil(a.num_display_entries / 2);
var m = c();
var j = m - a.num_display_entries;
var i = g > l ? Math.max(Math.min(g - l, j), 0) : 0;
var k = g > l ? Math.min(g + l, m) : Math.min(a.num_display_entries, m);
return [i, k]
}
function f(k, j) {
g = k;
h();
var i = a.callback(k, e);
if (!i) {
if (j.stopPropagation) {
j.stopPropagation()
} else {
j.cancelBubble = true
}
}
return i
}
function h() {
e.empty();
var m = d();
var o = c();
if (o == 1 && !a.page_show_always) {
return
}
var j = function(i) {
return function(q) {
return f(i, q)
}
};
var k = function(q, i) {
q = q < 0 ? 0 : (q < o ? q : o - 1);
i = jQuery.extend({
text: q + 1,
classes: ""
}, i || {});
if (q == g) {
var r = jQuery("" + (i.text) + "")
} else {
var r = jQuery("" + (i.text) + "").bind("click", j(q)).attr("href", a.link_to.replace(/__id__/, q))
}
if (i.classes) {
r.addClass(i.classes)
}
e.append(r)
};
if (a.prev_text && (g > 0 || a.prev_show_always)) {
k(g - 1, {
text: a.prev_text,
classes: "prev"
})
}
if (m[0] > 0 && a.num_edge_entries > 0) {
var p = Math.min(a.num_edge_entries, m[0]);
for (var n = 0; n < p; n++) {
k(n)
}
if (a.num_edge_entries < m[0] && a.ellipse_text) {
jQuery("" + a.ellipse_text + "").appendTo(e)
}
}
for (var n = m[0]; n < m[1]; n++) {
k(n)
}
if (m[1] < o && a.num_edge_entries > 0) {
if (o - a.num_edge_entries > m[1] && a.ellipse_text) {
jQuery("" + a.ellipse_text + "").appendTo(e)
}
var l = Math.max(o - a.num_edge_entries, m[1]);
for (var n = l; n < o; n++) {
k(n)
}
}
if (a.next_text && (g < o - 1 || a.next_show_always)) {
k(g + 1, {
text: a.next_text,
classes: "next"
})
}
}
var g = a.current_page;
b = (!b || b < 0) ? 1 : b;
a.items_per_page = (!a.items_per_page || a.items_per_page < 0) ? 1 : a.items_per_page;
var e = jQuery(this);
this.selectPage = function(i) {
f(i)
}
;
this.prevPage = function() {
if (g > 0) {
f(g - 1);
return true
} else {
return false
}
}
;
this.nextPage = function() {
if (g < c() - 1) {
f(g + 1);
return true
} else {
return false
}
}
;
h();
a.callback(g, this)
})
}
;
(function($) {
jQuery.fn.extend({
showTip: function(settings) {
$(this).each(function() {
var options = jQuery.extend({
flagCss: "tip",
flagWidth: $(this).outerWidth(),
flagInfo: $(this).attr("title"),
isAnimate: false
}, settings);
if (!options.flagInfo) {
return
}
$(this).removeAttr("title");
$(this).hover(function() {
options.flagWidth = (parseInt(options.flagWidth) < 100) ? 200 : parseInt(options.flagWidth);
var oTip = $("");
var oPointer = $("");
var oTipInfo = $("" + options.flagInfo + "").attr("class", options.flagCss).css("width", options.flagWidth + "px");
var oToolTip = $(oTip).append(oTipInfo).append(oPointer);
if (options.isAnimate) {
$(oToolTip).fadeIn("slow")
}
$(this).after(oToolTip);
var position = $(this).position();
var oTipTop = eval(position.top - $(oTip).outerHeight() - 8);
var oTipLeft = position.left - 22;
$(oToolTip).css("top", oTipTop + "px").css("left", oTipLeft + "px")
}, function() {
$("#mytooptip").remove()
})
});
return this
}
})
})(jQuery);
function GetSingleContent(ID, basePath, mark) {
if (mark == "read" && !isLogin) {
if (typeof loginState == "undefined" || loginState < 0) {
window.open("/" + basePath + "/LoginDigital.aspx?contentId=" + encodeURIComponent(ID));
return
} else {
if (loginState == 1) {
window.open("/" + basePath + "/detail/detail.aspx?recid=" + encodeURIComponent(ID) + "&dbCode=CRDD");
return
}
}
}
var sjson = "{'id': '" + escape(ID) + "'}";
$.ajaxWebService("/" + basePath + "/Request/WebService.aspx/GetSingleContent", sjson, function(result) {
if (result.d && result.d != "") {
var restult = unescape(eval(result.d)[0].content);
if (restult != "") {
var loginState = $("#LoginState").attr("value");
if (isLogin || loginState == 0) {
$("#" + ID + "_1").attr("style", "display:none")
}
$("#" + ID + "_2").attr("style", "display:none");
$("#" + ID).attr("style", "display:block");
$("#" + ID).html(unescape(eval(result.d)[0].content));
SetFrameHeight()
}
}
})
}
;var resAsyn = {};
resAsyn.popId = "div_sel";
resAsyn.ifmId = "ifm_low";
resAsyn.popCss = "selBox";
resAsyn.ifmCss = "ifmBox";
resAsyn.url = "../request/resultAsync.aspx";
resAsyn.iptId1 = "sel_org";
resAsyn.iptId2 = "sel_area";
resAsyn.iptId3 = "sel_typ";
resAsyn.srcA = "../images/gb/01.gif";
resAsyn.srcR = "../images/gb/02.gif";
resAsyn.create = function() {
var b = document.getElementById(resAsyn.ifmId);
if (b == null || b == undefined) {
b = document.createElement("iframe");
b.id = resAsyn.ifmId;
b.className = resAsyn.ifmCss;
document.body.appendChild(b)
}
b.style.display = "inline";
var a = document.getElementById(resAsyn.popId);
if (a == null || a == undefined) {
a = document.createElement("div");
a.id = resAsyn.popId;
a.className = resAsyn.popCss;
document.body.appendChild(a);
$(a).bind("click", function(c) {
resAsyn.stopBubble(c)
})
}
a.style.display = "inline";
return a
}
;
resAsyn.pop = function(g, c, d, f) {
var a = resAsyn.create();
var b = {
htp: "1",
type: c,
lvl: d
};
jQuery.ajax({
type: "POST",
url: resAsyn.url,
data: b,
cache: false,
success: function(e) {
a.innerHTML = e;
resAsyn.imgHide();
resAsyn.resetIfm()
}
});
resAsyn.postion(g, a);
resAsyn.stopBubble(f)
}
;
resAsyn.expd = function(a, f, g, d, h) {
var c = $(a).children("img");
var i = c.attr("src");
if (i.length > resAsyn.srcA.length) {
i = "../" + i.slice(0 - (resAsyn.srcA.length - 3))
}
var j = $(a).parents("tr").next(".listChild");
resAsyn.resImg(a);
if (i == resAsyn.srcA) {
var k = parseInt(d) + 1;
var b = {
htp: "2",
type: g,
lvl: k,
code: f
};
jQuery.ajax({
type: "POST",
url: resAsyn.url,
data: b,
cache: true,
success: function(e) {
j.children("td").html(e);
resAsyn.imgHide();
resAsyn.resetIfm()
}
});
i = resAsyn.srcR;
j.show();
$(a).next().addClass("active")
} else {
if (i == resAsyn.srcR) {
i = resAsyn.srcA;
j.hide();
resAsyn.resetIfm()
}
}
c.attr("src", i);
resAsyn.stopBubble(h)
}
;
resAsyn.postion = function(f, a) {
var c = $("#" + resAsyn.popId);
var d = $("#" + resAsyn.ifmId);
var e = $(f).offset().left;
var b = $(f).offset().top;
c.css("left", 450);
c.css("top", b + 10);
d.css("left", 450);
d.css("top", b + 10)
}
;
resAsyn.sel = function(d, a, b) {
if (d && b) {
var c = null;
if (b == 1) {
c = resAsyn.iptId1
} else {
if (b == 2) {
c = resAsyn.iptId2
} else {
if (b == 3) {
c = resAsyn.iptId3
}
}
}
document.getElementById(c).value = d.innerHTML;
document.getElementById("ipt_" + c).value = a + "?";
resAsyn.hide()
}
}
;
resAsyn.hide = function() {
var a = document.getElementById(resAsyn.popId);
if (a && a.style.display != "none") {
a.style.display = "none"
}
var b = document.getElementById(resAsyn.ifmId);
if (b && b.style.display != "none") {
b.style.display = "none"
}
}
;
resAsyn.imgHide = function() {
$("#" + resAsyn.popId).find("img").each(function(b, a) {
if ($(this).attr("src") == "" || $(this).attr("src") == undefined) {
$(this).hide()
}
})
}
;
resAsyn.resImg = function(a) {
$(a).parents("tr:eq(0)").find("img").each(function() {
if ($(this).attr("src") == resAsyn.srcR) {
$(this).attr("src", resAsyn.srcA)
}
});
$(a).parents("tr:eq(0)").children("td").each(function() {
$(this).find("a").removeClass("active")
})
}
;
if (document.onclick) {
var tmpFun = document.onclick;
document.onclick = function() {
if (typeof (tmpFun) == "function") {
tmpFun()
}
resAsyn.hide()
}
} else {
document.onclick = resAsyn.hide
}
resAsyn.stopBubble = function(a) {
if (a && a.stopPropagation) {
a.stopPropagation()
} else {
window.event.cancelBubble = true
}
}
;
resAsyn.resetIfm = function() {
var a = $("#" + resAsyn.popId);
var b = $("#" + resAsyn.ifmId);
b.height(a.height() + 7);
b.width(a.width() + 7)
}
;
resAsyn.clear = function(d, a, b) {
if (d && b) {
var c = null;
if (b == 1) {
c = resAsyn.iptId1
} else {
if (b == 2) {
c = resAsyn.iptId2
} else {
if (b == 3) {
c = resAsyn.iptId3
}
}
}
document.getElementById(c).value = "";
document.getElementById("ipt_" + c).value = "";
resAsyn.hide()
}
}
;
$.fn.autoWidth = function() {
var o = $(this).find("ul").width();
var l = parseInt($(this).find("ul").children().eq(0).css("margin-right"));
var c = 0;
var a = -1;
$(this).find("ul").children().each(function() {
a++;
c = c + $(this).width() + l;
if (c >= o) {
return false
}
});
var d = a;
var n = Math.ceil($(this).find("ul").children().length / a);
var g = this;
var f = h(g, d, n, l);
while (f > o) {
d--;
n = Math.ceil($(this).find("ul").children().length / d);
f = h(g, d, n, l)
}
var e = new Array();
for (a = 0; a <= d - 1; a++) {
e[a] = 0
}
for (var b = 0; b <= d - 1; b++) {
for (var m = 0; m <= n - 1; m++) {
if ($(this).find("ul").children().eq(b + m * d).width() >= e[b]) {
e[b] = $(this).find("ul").children().eq(b + m * d).width()
}
}
}
for (b = 0; b <= d - 1; b++) {
for (m = 0; m <= n - 1; m++) {
$(this).find("ul").children().eq(b + m * d).css("width", e[b])
}
}
function h(t, s, x, v) {
var r = new Array();
for (var p = 0; p <= s - 1; p++) {
r[p] = $(t).find("ul").children().eq(p).width()
}
var u = 0;
for (var q = 0; q <= s - 1; q++) {
for (var w = 0; w <= x - 1; w++) {
if ($(t).find("ul").children().eq(q + w * s).width() >= r[q]) {
r[q] = $(t).find("ul").children().eq(q + w * s).width()
}
}
}
for (p = 0; p <= s - 1; p++) {
u += r[p];
u += v
}
return u
}
}
;
var LanguageEncode = "GB";
var message = {
mostInput: "您最多只能输入",
keyNum: "个字",
key: "个",
searchTooLongError: "检索式超长,请减少检索条件再检",
reSearch: "未检索到结果,请检查检索条件!",
searchWaiting: "正在查询,请稍等...",
noContainRelative: "下级不包含相关检索内容",
inputSearchWord1: "请输入检索词!",
unLimit: "不限",
papers: "系列论文集",
meetings: "系列会议",
mostSelect: "最多只能选择",
loading: "正在加载数据,请稍等....",
dataError1: "开始日期大于或者等于结束日期,请重新输入!",
dataError2: "开始日期输入有误,请重新输入!",
dataError3: "结束日期输入有误,请重新输入!",
dataError4: "日期输入有误,请重新输入!",
selectOneDB1: "请至少选择一个数据库!",
noMoreDB: "不能超过15个数据库!",
singleDBSelect: "只选中一个库,将进入单库导航页面!",
selectNavigate: "请选择导航!",
rssMessage1: "RSS文件地址已经复制到剪贴板中,您可以直接打开RSS客户端阅读软件,右键粘贴,增加频道",
rssMessage2: "被浏览器拒绝!\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'",
inputTurnPage: "请输入跳转的页数",
numOnly: "只能输入数字",
dingzhiMessage1: "请选择需要定制的记录!",
recordOne: "只能选择一条记录!",
tougaoMessage: "请选择需要投稿的记录!",
navigating: "正在导航,请稍等...",
zhuanyeGuan: "一次最多定制20个专业馆,请重新选择",
navigate: "导航",
pageError1: "页面超时,请刷新后重新操作!",
leaf: "页",
selectItem: "请选择项目",
noKeyWord1: "没有此主题词!",
searchError1: "检索出错!",
CNKeyWordNum: "中文主题词 模糊查询结果:共",
prePage: "上一页",
nextPage: "下一页",
knowledgeMessage: "知识网络中心窗口未打开,请临时关闭您的上网助手等工具。",
noKeyWord2: "很抱歉,没有找到相关的文献。",
serverError: "很抱歉,服务器暂时不能提供服务,请稍后再试。",
totalRecorde: "共有记录",
tiao: "条",
qizhong: "其中",
dbSelect: "数据库切换:",
oneNavigateSelect: "请您至少选择一个导航条件",
twoKeyWord: "同句/同段检索需要输入两个检索词",
inputSearchFormula: "请输入检索式名称",
inputQiKanNum: "请输入正确的期刊数",
inputParms: "请输入正确的参数",
inputParmsError: "您输入的参数存在非法字符,请重新输入!",
reInputSearchItem: "请重新配置检索项!",
groupSelect: "您可以按如下文献分组排序方式选择文献:",
moreGroup: "分组只对前4万条记录分组,排序只在800万条记录以内有效",
inputDate: "点击输入日期",
inputISSN: "输入期刊名称,ISSN,CN均可",
inputSource: "输入来源名称",
inputFun1: "输入基金名称",
inputAuthor1: "输入作者姓名",
inputAll: "输入作者单位,全称、简称、曾用名均可",
inputSearchWord2: "输入检索词:",
selectOneDB2: "请您至少选择一个数据库!",
noSource: "此库没有文献来源",
noKeyWord: "还没有检索词,请稍后再用。",
oneKeyWord: "请先输入一个词!",
yourNeedKeyWord: "请输入您所需的检索词",
changing: "切换中,请耐心等待……",
pleaseInput: "请输入",
mustSelect: "最多只能选择",
noCloseWin: "系统不能弹出新页面进一步选择,请关闭您的窗口拦截功能。",
noNull: "不能为空!",
search: "直接检索",
fontType: "宋体",
searchError2: "检索项中不能输入; ' \" < > 等字符!",
searchError3: "检索项不允许输入:' ; \" < > 等字符!",
noInput: "不能输入",
more: "更多",
revert: "还原",
loadingData: "正在加载数据,请稍候...",
sunday: "日",
one: "一",
two: "二",
three: "三",
four: "四",
five: "五",
six: "六",
Jan: "一月",
Feb: "二月",
Mar: "三月",
Apr: "四月",
May: "五月",
Jun: "六月",
Jul: "七月",
Aug: "八月",
Sep: "九月",
Oct: "十月",
Nov: "十一月",
Dec: "十二月",
searchingLoad: "正在检索,请稍候...",
pre1949: "1949以前",
selectSelect: "请勾选选择对象前的复选框!",
lookTxt: "查看本文在",
year: "年的",
knowledgeResult1: "知网节保存结果",
knowledgeResult2: "知网节下载功能不能正常工作,请您暂时关闭上网助手等拦截窗口的软件。",
clickInput: "点击输入",
inputAuthor2: "输入作者",
allSubDB: "全部子库",
allXueKe: "全部学科",
allSource: "全部资源",
allLayer: "全部研究层次",
inputFun2: "输入基金",
inputUnit1: "输入作者单位",
inputUnit2: "输入主办单位名称",
inputUnit3: "请输入学位授予单位名称",
inputUnit4: "输入出版单位名称",
inputUnit5: "输入单位",
inputNaming1: "输入会议名称",
inputNaming2: "输入年鉴名称",
inputNaming3: "输入报纸名称",
inputNaming4: "输入主编或作者",
inputNaming5: "输入期刊名称",
noInputWord1: "不能输入:' \" ; 等字符!",
noInputWord2: "不能输入:'、\"; 等字符!",
atless: "请选择至少一条记录!",
noBack: "未找到返回点! 请重新选择。",
txting: "【全文快照】",
snapSearching: "全文快照搜索",
selectTime: "请选择时间!",
checkFile: "请检查配置文件是否存在!",
inputPage: "请输入页码!",
inputPageEmsg: "请输入正确的页码!",
fiveSlect: "最多选择50项",
noHistory: "没有检索历史",
noNullaccount: "帐号不能为空!",
noNullPW: "密码不能为空!",
inputUserName: "请输入用户名称",
searchError4: "检索错误或记录集失效,请重新检索!",
dingzhiMessage2: "请选择要定制的项",
loadinging: "正在加载...",
inputSearchWord3: "输入检索词",
saveSelectMsg: "没有选择任何字段!",
txtingError: "很抱歉,本节点文献的全文中没有您要检索的内容。",
postFormTip1: "输入缺期线索的详细内容太多,应在350字以内!",
postFormTip2: "上传文件不能大于4M!",
postFormTip3: "请上传原刊电子版,或者输入缺期线索的详细内容!",
postFormTip4: "年、期不能为空!",
postFormTip5: "提交失败!",
postFormTip6: "已有此文件,请您改名重新上传!",
postFormTip7: "不可上传此种格式的文件!",
postFormTip8: "提交成功,谢谢您的参与!",
PageTurnTip: "键盘的“← →”可以实现快速翻页"
};
var waitingTip = " ";
var ISIE = navigator.userAgent.indexOf("MSIE") != -1 && !window.opera;
try {
if (window.HTMLElement) {
var outerHTMLFun1 = function(c) {
var a = this.ownerDocument.createRange();
a.setStartBefore(this);
var b = a.createContextualFragment(c);
this.parentNode.replaceChild(b, this);
return c
};
var outerHTMLFun2 = function() {
var d;
var a = this.attributes;
var b = "<" + this.tagName.toLowerCase();
for (var c = 0; c < a.length; c++) {
d = a[c];
if (d.specified) {
b += " " + d.name + '="' + d.value + '"'
}
}
if (!this.canHaveChildren) {
return b + ">"
}
return b + ">" + this.innerHTML + "" + this.tagName.toLowerCase() + ">"
};
var outerHTMLFun3 = function() {
switch (this.tagName.toLowerCase()) {
case "area":
case "base":
case "basefont":
case "col":
case "frame":
case "hr":
case "img":
case "br":
case "input":
case "isindex":
case "link":
case "meta":
case "param":
return false
}
return true
};
if (HTMLElement.prototype.__defineSetter__) {
HTMLElement.prototype.__defineSetter__("outerHTML", outerHTMLFun1);
HTMLElement.prototype.__defineGetter__("outerHTML", outerHTMLFun2);
HTMLElement.prototype.__defineGetter__("canHaveChildren", outerHTMLFun3)
} else {
Object.defineProperty(HTMLElement, "outerHTML", outerHTMLFun1);
Object.defineProperty(HTMLElement, "outerHTML", outerHTMLFun2);
Object.defineProperty(HTMLElement, "canHaveChildren", outerHTMLFun3)
}
}
} catch (e) {}
function getBasePath() {
var f = window.document.location.href;
var c = window.document.location.pathname;
var d = f.indexOf(c);
var a = f.substring(0, d);
var b = c.substring(0, c.substr(1).indexOf("/") + 1);
return ( a + b)
}
String.prototype.format = function() {
var a = arguments;
return this.replace(/\{(\d+)\}/g, function(b, c) {
return a[c]
})
}
;
String.prototype.Trim = function() {
return this.replace(/(^\s*)|(\s*$)/g, "")
}
;
String.prototype.LTrim = function() {
return this.replace(/(^\s*)/g, "")
}
;
String.prototype.RTrim = function() {
return this.replace(/(\s*$)/g, "")
}
;
function OpenWindow(c, a, b) {
if (c == undefined || c == null || c == "") {
return
}
if (b == undefined || b == null || b == "") {
if (a == undefined || a == null || a == "") {
window.open(c)
} else {
window.open(c, a)
}
} else {
try {
window.open(c, a, b)
} catch (d) {
window.open(c, a)
}
}
}
function ge(a) {
return document.getElementById(a)
}
function GetQueryStringByName(c, a) {
if ("[object String]" == Object.prototype.toString.call(c) && "[object String]" == Object.prototype.toString.call(a)) {
var b = c.match(new RegExp("[?&]" + a + "=([^&]+)","i"));
if (b == null || b.length < 1) {
return ""
}
return b[1]
}
return ""
}
function SetQueryStringByName(f, a, b) {
if ("[object String]" == Object.prototype.toString.call(f)) {
var c = f.match(new RegExp("([?&]+)" + a + "=[^&]*","i"));
var d = f;
if (c != null) {
d = f.replace(c[0], c[1] + a + "=" + encodeURI(b))
} else {
d = f + "&" + a + "=" + b
}
return d
}
return ""
}
function getElementsByClassName(g, h, k, j) {
h = h || "*";
if (!j) {
if (k) {
k = document.getElementById(k)
} else {
k = k || document
}
}
if (!k) {
return false
}
var f = (h == "*" && k.all) ? k.all : k.getElementsByTagName(h);
var d = new Array();
g = g.replace(/\-/g, "\\-");
var m = new RegExp("(^|\\s)" + g + "(\\s|$)");
var b;
for (var a = 0, c = f.length; a < c; a++) {
b = f[a];
if (m.test(b.className)) {
d.push(b)
}
}
return d
}
function SetDisplayValue(b, a) {
var c = ge(b);
if (c) {
if (c.style) {
c.style.display = a
}
}
}
function FillValue(c, a) {
var b = ge(c);
if (b) {
b.value = a
}
}
function getEmValue(b) {
var a = ge(b);
if (a) {
return a.value
}
return ""
}
function GetInputValue(a) {
return getEmValue(a)
}
function LoadScript(a, c) {
var b = document.createElement("script");
b.type = "text/javascript";
b.src = a;
document.getElementsByTagName("head")[0].appendChild(b);
if (b.readyState) {
b.onreadystatechange = function() {
if (b.readyState == "loaded" || b.readyState == "complete") {
b.onreadystatechange = null;
if (c) {
c()
}
}
}
} else {
b.onload = function() {
if (c) {
c()
}
}
}
}
function J(a) {
return document.createElement(a)
}
function O(a, b, c) {
if (ISIE) {
if (b == "load") {
a.onreadystatechange = function() {
if (this.readyState == "loaded") {
c()
}
}
} else {
a.attachEvent("on" + b, (function(d) {
return function() {
c.call(d)
}
})(a))
}
} else {
a.addEventListener(b, c, false)
}
}
function CoreDomainLoadJson() {
this.C;
this.J = J;
this.O = O;
this.Load = function(d, a, b) {
var c = document.getElementById(b);
if (c) {
document.body.removeChild(c)
}
this.C = J("SCRIPT");
this.C.type = "text/javascript";
if (typeof b == "string" && b.length > 0) {
this.C.id = b
} else {
this.C.id = "callScriptE"
}
this.C.src = d + "&td=" + (new Date()).getTime();
this.C.charset = "utf-8";
document.body.appendChild(this.C);
O(this.C, "load", a)
}
}
function GetLoginStatus(c) {
var d = document.getElementById("divlogin");
if (d != null && d != undefined && d != "undefined") {
var b = "/kns/Request/login.aspx?";
if (c) {
b += c
}
var a = new CoreDomainLoadJson();
a.Load(b, function() {
if (typeof oJson != "undefined") {
try {
var f = oJson.LoginUserHTML;
if (typeof f != "undefined" && f != "") {
d.innerHTML = f
}
} catch (g) {}
}
GetUserCenter($("#hid_uid").val())
}, "loginstatus_JS")
}
}
function SubScription(h, b, a, d) {
var g = getCookie("cnkiUserKey");
var c = "../Request/SubScription.aspx";
var f = ge("subScriptionForm");
if (f) {
document.body.removeChild(f)
}
f = document.createElement("form");
f.id = "subScriptionForm";
f.name = "subScriptionForm";
f.method = "post";
f.setAttribute("target", "_blank");
f.action = c;
AppendElement(f, GetIntpuElement("SubT", h));
AppendElement(f, GetIntpuElement("SubC", b));
AppendElement(f, GetIntpuElement("SubD", a));
AppendElement(f, GetIntpuElement("cnkiuserkey", g));
AppendElement(f, GetIntpuElement("SubP", d));
document.body.appendChild(f);
f.submit();
document.body.removeChild(f)
}
function AppendElement(b, a) {
if (b && a) {
b.appendChild(a)
}
}
function GetIntpuElement(a, c) {
var b = document.createElement("input");
b.setAttribute("name", a);
b.setAttribute("value", c);
return b
}
function AddFavorites(d, b) {
var f = {};
var g = navigator.userAgent.toLowerCase();
var a;
(a = g.match(/msie ([\d.]+)/)) ? f.ie = a[1] : (a = g.match(/firefox\/([\d.]+)/)) ? f.firefox = a[1] : (a = g.match(/chrome\/([\d.]+)/)) ? f.chrome = a[1] : (a = g.match(/opera.([\d.]+)/)) ? f.opera = a[1] : (a = g.match(/version\/([\d.]+).*safari/)) ? f.safari = a[1] : 0;
var c = d;
if (document.getElementsByName(d)[0]) {
c = document.getElementsByName(d)[0].href
}
if (f.chrome) {
window.open("http://www.google.com/bookmarks/mark?op=edit&bkmk=" + c + "&title=" + b, "谷歌书签");
return
}
if (f.firefox) {
window.sidebar.addPanel(b, c, "")
}
if (f.ie) {
window.external.addFavorite(c, b)
}
}
function SetFrameHeight() {
function b(j) {
var i = 300;
if (j < i) {
return i
}
return j
}
function c(i) {
if ((i.contentWindow.document == document) || (i.contentWindow.document.frames.name == document.frames.name)) {
i.style.height = b(document.body.scrollHeight) + "px"
}
}
function f(i) {
if (i.contentWindow.document == document) {
if (document.body.offsetHeight == 0 && document.body.scrollHeight != 0) {
i.style.height = b(document.body.scrollHeight) + "px"
} else {
i.style.height = b(document.body.offsetHeight) + "px"
}
}
}
function a(i) {
if (document.all) {
a = c
} else {
a = f
}
a(i)
}
if (parent) {
var d = new Array();
d = parent.document.getElementsByTagName("iframe");
var h = d.length;
for (var g = 0; g < h; g++) {
a(d[g])
}
}
}
function getCookie(a, c) {
if (window.localStorage || window.sessionStorage) {
if (c == "2") {
return window.sessionStorage.getItem(a)
}
return window.localStorage.getItem(a)
}
var b = a + "=";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(b);
if (offset != -1) {
offset += b.length;
end = document.cookie.indexOf(";", offset);
if (end == -1) {
end = document.cookie.length
}
return unescape(document.cookie.substring(offset, end))
}
}
}
function GetWebUserIP() {
var g = window.sessionStorage ? window.sessionStorage.getItem("curUserIP") : "";
var f = function(h) {
var d = ge("footerrightdiv");
if (d) {
if (d.innerHTML.indexOf("您当前IP") < 0) {
d.innerHTML += "
您当前IP:" + h
}
}
};
if (!g || g.length <= 0) {
var c = new Date;
var b = "/kns/Request/getuserip.ashx?t=" + c.getTime();
var a = new CoreDomainLoadJson();
a.Load(b, function() {
if (typeof ipinfo != "undefined") {
try {
if (ipinfo.ip && ipinfo.ip.length > 0) {
if (window.sessionStorage) {
window.sessionStorage.setItem("curUserIP", ipinfo.ip)
}
f(ipinfo.ip)
}
} catch (d) {}
}
}, "getuserip_JS")
} else {
f(g)
}
}
function IsWideScreen() {
if (window.screen.width >= 1280) {
return true
} else {
return false
}
}
function getFocusElementId() {
if (!document.activeElement) {
document.activeElement = null;
var b = document.getElementsByTagName("*");
var c = b.length;
for (var a = 0; a < c; a++) {
b[a].onfocus = function() {
document.activeElement = this;
return this.id
}
}
} else {
return document.activeElement.id
}
}
function OnclickForHideMoredo() {
var b = $("#flagShowHide").val();
var a = getFocusElementId();
if (a != "moredo") {
if (b != "true") {
$("#dbother_div").hide()
}
}
}
function setflag(a) {
$("#flagShowHide").val(a)
}
;function _getXmlHttp() {
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
var progids=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]
for (i in progids) {
try { return new ActiveXObject(progids[i]) }
catch (e) {}
}
@end @*/
try {
return new XMLHttpRequest()
} catch (e2) {
return null
}
}
function CachedResponse(a) {
this.readyState = ReadyState.Complete;
this.status = HttpStatus.OK;
this.responseText = a
}
ReadyState = {
Uninitialized: 0,
Loading: 1,
Loaded: 2,
Interactive: 3,
Complete: 4
};
HttpStatus = {
OK: 200,
NotFound: 404
};
function Request_from_cache(c, b) {
var a = this._cache[c];
if (a != null) {
var d = new CachedResponse(a);
b(d);
return true
} else {
return false
}
}
function Request_cached_get(b, a) {
if (!this.FromCache(b, a)) {
var c = this;
this.Get(b, function(d) {
if ((d.readyState == ReadyState.Complete) && (d.status == HttpStatus.OK)) {
c._cache[b] = d.responseText
}
a(d)
}, "GET")
}
}
function Request_get(c, b, a) {
if (!this._get) {
return
}
if (a == null) {
a = "GET"
}
if (this._get.readyState != ReadyState.Uninitialized) {
this._get.abort()
}
if (a && a == "POST") {
var d = c.split("?");
if (d) {
this._get.open(a, d[0], true)
} else {
this._get.open(a, c, true)
}
this._get.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
if (b != null) {
var e = this._get;
this._get.onreadystatechange = function() {
b(e)
}
}
if (d) {
this._get.send(d[1])
} else {
this._get.send(c)
}
} else {
this._get.open(a, c, true);
if (b != null) {
var e = this._get;
this._get.onreadystatechange = function() {
b(e)
}
}
this._get.send(null)
}
}
function Request_get_no_cache(d, c, a) {
var e = (-1 < d.indexOf("?")) ? "&" : "?";
var b = d + e + "__=" + encodeURIComponent((new Date()).toString());
return this.Get(b, c, a)
}
function Request() {
this.Get = Request_get;
this.GetNoCache = Request_get_no_cache;
this.CachedGet = Request_cached_get;
this.FromCache = Request_from_cache;
this.Use = function() {
return this._get != null
}
;
this.Cancel = function() {
if (this._get) {
this._get.abort()
}
}
;
this._cache = new Object();
this._get = _getXmlHttp();
if (this._get == null) {
return
}
}
var waitDiv;
var waitElement;
var scrollX, scrollY = -1;
function MoveWaitElement(d) {
var c, a;
if (!waitElement) {
CreateWaitElement()
}
if (window.pageYOffset && typeof (window.pageYOffset) == "number") {
c = window.pageYOffset;
a = window.pageXOffset
} else {
if (document.body && document.documentElement && document.documentElement.scrollTop) {
c = document.documentElement.scrollTop;
a = document.body.scrollLeft
} else {
if (document.body && typeof (document.body.scrollTop) == "number") {
c = document.body.scrollTop;
a = document.body.scrollLeft
}
}
}
if (scrollX != a || scrollY != c) {
scrollX = a;
scrollY = c;
if (d == "center") {
var b = document.body.clientWidth;
waitElement.style.top = 280 + document.documentElement.scrollTop + "px";
waitElement.style.left = (document.body.offsetWidth - 200) / 2 + "px"
} else {
waitElement.style.top = c + "px";
waitElement.style.right = -a + "px"
}
}
}
function CreateWaitElement() {
var a = document.getElementById("Ajax__Waiting");
if (!a) {
a = document.createElement("div");
a.id = "Ajax__Waiting";
a.style.position = "absolute";
a.style.height = 16;
a.style.width = 150;
a.style.paddingLeft = "3px";
a.style.paddingRight = "3px";
a.style.fontSize = "10px";
a.style.fontFamily = "Arial, Verdana, Tahoma";
a.style.border = "#000000 1px solid";
a.style.backgroundColor = "#000000";
a.style.color = "#ffffff";
a.innerHTML = "
" + message.searchingLoad;
a.style.visibility = "hidden";
document.body.insertBefore(a, document.body.firstChild)
}
waitElement = a
}
function MovewaitDiv(d) {
var c, a;
if (!waitDiv) {
CreatewaitDiv()
}
if (document.all) {
if (window.pageYOffset && typeof (window.pageYOffset) == "number") {
c = window.pageYOffset;
a = window.pageXOffset
} else {
if (document.body && document.documentElement && document.documentElement.scrollTop) {
c = document.documentElement.scrollTop;
a = document.body.scrollLeft
} else {
if (document.body && typeof (document.body.scrollTop) == "number") {
c = document.body.scrollTop;
a = document.body.scrollLeft
}
}
}
}
if (scrollX != a || scrollY != c) {
scrollX = a;
scrollY = c;
if (d == "center") {
var b = document.body.clientWidth;
waitDiv.style.top = 280 + document.documentElement.scrollTop + "px";
waitDiv.style.left = (document.body.offsetWidth) / 2 - 8 + "px"
} else {
waitDiv.style.top = c + "px";
waitDiv.style.right = -a + "px"
}
}
}
function CreatewaitDiv(a) {
var b = document.getElementById("Search__Waiting");
if (!b) {
b = document.createElement("div");
b.id = "Search__Waiting";
b.style.position = "absolute";
b.style.height = 20;
b.style.width = 180;
b.style.paddingLeft = "3px";
b.style.paddingRight = "3px";
b.style.fontSize = "12px";
b.style.fontFamily = "Arial, Verdana, Tahoma";
b.style.backgroundColor = "";
b.style.color = "#ffffff";
b.style.zIndex = 300;
b.innerHTML = "
" + a + "";
b.style.display = "none";
document.body.insertBefore(b, document.body.firstChild)
}
waitDiv = b
}
function HideWaitDiv() {
if (waitDiv) {
if (waitDiv.style.display == "") {
waitDiv.style.display = "none"
}
}
if (typeof ispost != "undefined") {
if (ispost) {
ispost = false
}
}
}
function ShowWaitDiv() {
if (waitDiv) {
waitDiv.style.display = "";
MovewaitDiv("center")
}
setTimeout("HideWaitDiv()", 15000)
}
function CommonDeal(b, f, i, a, c, e) {
CreatewaitDiv(c);
if (waitDiv) {
if (c != null && c != "") {
var g = document.getElementById("divsearchtip");
if (g) {
g.innerHTML = c
}
ShowWaitDiv()
}
}
var h = new Request();
var d = f + "?action=" + b + i;
h.GetNoCache(d, a, e)
}
function CommonDealNoDiv(b, f, h, a, c, e) {
var g = new Request();
var d = f + "?action=" + b + h;
g.GetNoCache(d, a, e)
}
;function SearchBar() {
this.SelID = "txt_1_sel";
this.TxtBoxID = "txt_1_value1";
this.expertValueID = "expertvalue";
this.operoValueID = "txt_1_special1";
this.TipDivID = "SearchHisTip";
this.FieldText = "";
this.SearchParam = "";
this.Key = "";
this.Opero = "";
this.FieldValue = "";
this.TipItem = "";
this.ConditionItem = "";
this.SearchTipArray = new Array();
this.ConditionArray = new Array();
this.FieldArray = new Array()
}
SearchBar.prototype.SetSearchHisTip = function(a) {
if (a != undefined) {
this.SearchParam = a
}
this.SetVar();
this.QueryClear();
if (this.Key == "") {
$("#" + this.TipDivID).html("")
} else {
this.QueryPush()
}
this.SetExpertValue();
$("#" + this.TipDivID).html(this.GetHisTipByQuery())
}
;
SearchBar.prototype.SetReSearchHisTip = function(a) {
if (a != undefined) {
this.SearchParam = a
}
this.SetVar();
if (this.Key == "") {
return
}
this.QueryPush();
this.SetExpertValue();
$("#" + this.TipDivID).html(this.GetHisTipByQuery())
}
;
SearchBar.prototype.TipItemClick = function(a) {
this.RestoreSearchHis(a, 1)
}
;
SearchBar.prototype.TipItemDel = function(a) {
this.RestoreSearchHis(a)
}
;
SearchBar.prototype.GetHisTipByQuery = function() {
if (this.SearchTipArray.length == 0) {
return ""
}
var c = "";
var a = "";
var d = ' ';
var b = "";
for (var e = 0; e < this.SearchTipArray.length; e++) {
a = " x';
if (this.SearchTipArray.length - 1 == e) {
c = this.SearchTipArray[e] + a
} else {
c = "" + this.SearchTipArray[e] + "";
c += d
}
b += c
}
return b
}
;
SearchBar.prototype.SetCurSearchBarByQuery = function() {
if (this.SearchTipArray.length == 0) {
this.ClearCurSearch();
return
}
$("#" + this.SelID).val(this.FieldArray[this.FieldArray.length - 1]);
$("#" + this.TxtBoxID).val(this.SearchTipArray[this.SearchTipArray.length - 1].split(":")[1]);
this.SetVar()
}
;
SearchBar.prototype.RestoreSearchHis = function(a, b) {
if (b != undefined) {
this.QueryPop(a, 1)
} else {
this.QueryPop(a)
}
this.SetExpertValue();
this.SetCurSearchBarByQuery();
SubmitForm("", this.SearchParam);
$("#" + this.TipDivID).html(this.GetHisTipByQuery())
}
;
SearchBar.prototype.ClearCurSearch = function() {
$("#" + this.TxtBoxID).val("")
}
;
SearchBar.prototype.SetVar = function() {
this.FieldText = $("#" + this.SelID).find("option:selected").text();
this.Key = $.trim($("#" + this.TxtBoxID).val());
this.FieldValue = $("#" + this.SelID).val();
var d = this.FieldValue;
this.Opero = "";
if (this.FieldValue && this.FieldValue.indexOf("$") >= 0) {
this.Opero = this.FieldValue.split("$")[1];
d = this.FieldValue.split("$")[0];
if (this.Opero.indexOf("|") >= 0) {
var c = this.Opero;
var b = c.split("|")[1];
this.Opero = c.split("|")[0];
switch (b) {
case "?":
this.Key = this.Key + "?";
break;
case "??":
this.Key = "?" + this.Key;
break;
case "*":
this.Key = this.Key + "*";
break;
case "**":
this.Key = "*" + this.Key;
break;
default:
break
}
}
} else {
this.Opero = $.trim($("#" + this.operoValueID).val())
}
this.TipItem = this.Key;
if (this.FieldText != "") {
this.TipItem = this.FieldText + ":" + this.Key
}
if (d == undefined || d == "") {
return
}
if (d.indexOf(",") >= 0) {
var a = d.split(",");
for (var e = 0; e < a.length; e++) {
this.ConditionItem += a[e] + this.Opero + "'" + this.Key + "'";
if (a.length - 1 != e) {
this.ConditionItem += " and "
}
}
} else {
this.ConditionItem = d + this.Opero + "'" + this.Key + "'"
}
}
;
SearchBar.prototype.QueryClear = function() {
this.SearchTipArray.length = 0;
this.ConditionArray.length = 0;
this.FieldArray.length = 0
}
;
Array.prototype.contains = function(a) {
for (var b = 0; b < this.length; b++) {
if (this[b] == a) {
return true
}
}
return false
}
;
SearchBar.prototype.QueryPush = function() {
if (this.SearchTipArray.contains(this.TipItem)) {
return
}
this.SearchTipArray.push(this.TipItem);
this.ConditionArray.push(this.ConditionItem);
this.FieldArray.push(this.FieldValue)
}
;
SearchBar.prototype.QueryPop = function(a, b) {
if (a != undefined) {
if (b == 1) {
this.SearchTipArray.splice(a + 1, this.SearchTipArray.length - 1 - a);
this.ConditionArray.splice(a + 1, this.ConditionArray.length - 1 - a);
this.FieldArray.splice(a + 1, this.FieldArray.length - 1 - a)
} else {
this.SearchTipArray.splice(a, 1);
this.ConditionArray.splice(a, 1);
this.FieldArray.splice(a, 1)
}
} else {
this.SearchTipArray.pop();
this.ConditionArray.pop();
this.FieldArray.pop()
}
}
;
SearchBar.prototype.SetExpertValue = function() {
if (this.ConditionArray.length <= 1) {
$("#" + this.expertValueID).val("");
return
}
var a = this.ConditionArray.slice(0, this.ConditionArray.length - 1).join(" and ");
$("#" + this.expertValueID).val(a)
}
;
var searchBarer = new SearchBar();
var displayTagCount = 11;
var isShowAllProductBTN = true;
function CheckDBTag(e, a, d, c, b) {
if (b && e.className == "recur") {
return
}
$("#isTagSearch").val("1");
CheckOutTag(e, d, a)
}
function SetOutTag(a, f, d) {
if (f) {
var g = ge("dbTag");
if (g) {
g.style.display = "none";
var c = g.getElementsByTagName("li");
if (c.length > 0) {
for (i = 0; i < c.length; i++) {
c[i].className = ""
}
}
a.className = "recur";
g.style.display = "";
FillSearchSelect(f)
}
}
if (document.getElementById("MoreLi")) {
document.getElementById("MoreLi").className = "more"
}
var b = a.id.toLowerCase();
if (a.id.toLowerCase() != "scdb") {
SetDisplayValue("selectlable", "none");
ClearDBCheck()
} else {
SetDisplayValue("selectlable", "")
}
var e = document.getElementById("literSelectBtn");
var h = document.getElementById("literSelectFolder");
if (e) {
if ("|cidx|crpd|crdd|crfd|crmd|gxdb_section|chcf|orgd|fund".indexOf(b) > 0 && b != "gxdb") {
e.style.display = "none";
h.style.display = "none"
} else {
e.style.display = "block"
}
}
FillValue("singleDB", a.id);
FillValue("singleDBName", d);
ChangeToAdvance(f)
}
function CheckOutTag(c, a, b) {
SetOutTag(c, a, b);
showorhideDBList();
SetCurDBCheck(a);
DoSearch()
}
function DoSearch() {
var a = ge("txt_1_value1");
if (a && a.value != "") {
CollectDBList();
recommender.getRecommendTip();
SubmitForm("", "&ua=1.12");
searchBarer.SetSearchHisTip("&ua=1.12")
}
}
function FillSearchSelect(f) {
var h = $("#txt_1_sel option:selected").text();
var k = "";
var c = ge("txt_1_sel");
if (c) {
if (typeof fieldJson != "undefined" && fieldJson) {
var d = null;
for (var a = 0; a < fieldJson.length; a++) {
if (fieldJson[a].key == f) {
d = fieldJson[a];
break
}
}
var g = function(m, j) {
var l = ge(m);
if (l) {
l.value = j
}
};
if (d) {
k = d.value[0].key;
$(c).empty();
var e = d.value.length;
for (var b = 0; b < e; b++) {
addOptionToSelect(c, d.value[b].value, d.value[b].key, b)
}
SetOptionSelected(c, h);
if (typeof d.xls != "undefined") {
g("txt_1_extension", "xls")
} else {
g("txt_1_extension", "")
}
}
}
}
SetSelect()
}
function SetOptionSelected(a, c) {
var b = false;
var e = document.getElementById("txt_1_sel");
for (var d = 0; d < e.length; d++) {
if (e[d].text == c) {
a.options[d].setAttribute("selected", "true");
b = true;
break
}
}
if (!b) {
a.options[0].setAttribute("selected", "true")
}
}
function CreateLiInnerHTML(a, b) {
return '' + a + ""
}
function getCboxListFromcoreContent() {
var a = ge("coreContent");
if (!a) {
return null
}
return a.getElementsByTagName("input")
}
function SetCurDBCheck(b) {
if (!b) {
b = "XXXX"
}
if (b.toUpperCase() == "SCDB") {
var a = $("#db_codes").val();
if (!a || a.length <= 0) {
var c = new dbJsonFac();
a = c.getDefaultSelDB()
}
selectCoreDB(a)
} else {
$("#coreContent input[type='checkbox']").each(function() {
$(this).attr("checked", false)
})
}
SetSelect()
}
function ClearDBCheck() {
var a = getCboxListFromcoreContent();
if (a && a.length > 0) {
for (var b = 0; b < a.length; b++) {
a[b].checked = false
}
}
}
function SelectChDB(c, a) {
if (!c) {
return
}
var b = getCboxListFromcoreContent();
if (b && b.length > 0) {
for (var d = 0; d < b.length; d++) {
if (c.indexOf(b[d].id) >= 0 && c.length == b[d].id.length) {
setSelectState(b[d], a)
}
}
}
}
function setSelectState(b, a) {
if (b) {
b.checked = a
}
}
var dbJson;
var curDB;
function getSelectText(a) {
var b = ge(a);
if (b) {
return b.options[b.selectedIndex].text
}
return ""
}
var isRegulateNavi = false;
function SwichNaviTag(b, a) {
if (b && !a) {
a = GetTagNameFromDBJson(b)
}
SetMoreTag(ge(b), a, b);
SetOutTag(ge(b), b, a);
ChangeToAdvance(b)
}
function GetCurTagName() {
var a = getElementsByClassName("recur", "li", "dbTag");
if (a && a.length > 0) {
var b = a[0].getElementsByTagName("a");
if (b && b.length > 0) {
return b.innerHTML
}
}
return ""
}
function BasePath() {
var a = "";
if (ge("basePath")) {
a = ge("basePath").value
}
return a
}
function ChangeToAdvance(b) {
var a = ge("advacneId");
if (a == undefined) {
return
}
if (b == "CIDX") {
a.style.display = "none"
} else {
a.style.display = ""
}
var c = BasePath();
if (b == "SCDB") {
a.href = c + "/brief/result.aspx?dbprefix=scdb"
} else {
a.href = c + "/brief/result.aspx?dbprefix=" + b
}
}
function SetSelect() {
var a = ge("txt_1_sel");
if (a == undefined) {
return
}
if (a.options.length > 0 && a.options[0].text == "") {
if (ge("typeSelect")) {
ge("typeSelect").style.display = "none"
}
a.style.display = "";
a.style.display = "none";
$("#txt_1_value1").addClass("txtLong")
} else {
if (ge("typeSelect")) {
ge("typeSelect").style.display = ""
}
a.style.display = "";
$("#txt_1_value1").removeClass("txtLong")
}
}
function GetNewDBjson(c, f) {
var d = dbJson.dbinfo;
var b;
var g = 0;
var e = false;
var h = 0;
for (var a = 0; a < d.length; a++) {
if (!e && (d[a].yk == "1")) {
g++;
if (g >= displayTagCount) {
e = true
}
h = a
}
if (d[a].code == c && d[a].tagname == f && a > e) {
b = d[h];
d[h] = d[a];
d[a] = b;
break
}
}
return dbJson
}
function CollectDBList() {}
function CreateFloatNavi() {
var d = $("#rehidenavlist");
if (d.length < 1) {
return
}
var c = "";
var b = $("
");
for (var a = 0; a < json_category.length; a++) {
if (json_category[a].code == "*") {
c = "";
continue
}
b.append(WriteOneGradeHTML(json_category[a]))
}
d.append($(c)).append(b)
}
function WriteOneGradeHTML(f) {
var b = "";
var d = "";
if (f && f.code && f.code.length > 0) {
var c = f.code;
var a = f.name;
b += "" + a + "";
b += "";
var e = $("#" + c + "layer");
d = $("").append($(b)).hover(function() {
if ($.trim(e.html()).length == 0) {
CreateSecondChild(c)
}
$(this).addClass("current")
}, function() {
$(this).removeClass("current")
})
}
return d
}
function CreateSecondChild(c) {
if (c) {
var e = $("#" + c + "layer");
if ($.trim(e.html()).length > 0) {
return
}
var f = null;
for (var d = 0; d < json_category.length; d++) {
if (json_category[d] && json_category[d].code == c) {
f = json_category[d];
break
}
}
if (f.child && f.child.length > 0) {
var a = f.child.length;
for (var b = 0; b < a; b++) {
$(e).append(WriteSecondGradeHTML(f.child[b]))
}
}
}
}
function WriteSecondGradeHTML(e) {
var b = "";
if (e && e.code && e.code.length > 0) {
b = "" + e.name + "";
var a = e.child;
if (a && a.length > 0) {
var d = "";
for (var c = 0; c < a.length; c++) {
if (a[c] && a[c].code && a[c].code.length > 0) {
d += "" + a[c].name + ""
}
}
b += d
} else {
b += " "
}
b += "
"
}
return $(b)
}
function getJSvoid() {
return "javascript:void(0);"
}
var isFirst = false;
function categoryClick(b, a) {
if (!b || !a) {
return
}
if (ge("hiddenNavi")) {
ge("hiddenNavi").innerHTML = SpecilNavi(b, a)
}
CollectDBList();
searchBarer.SetSearchHisTip();
if (isFirst) {
SubmitForm("", "&ua=1.15");
return
} else {
ClickNode(b, a, "&ua=1.15")
}
SetNaviLocation(b, a)
}
function SetNaviLocation(code, name, iss) {
var tmpObj = ge("checkcatalog");
var tipName = "";
if (code != "*") {
var tmpJsonstr = searchClassByCode(code);
if (!tmpJsonstr || tmpJsonstr.length <= 0) {
tmpJsonstr = "[{'code':'" + code + "','name':'" + name + "'}]"
}
var tempJson = eval("(" + tmpJsonstr + ")");
var tempStr = "";
var naviS = ' ';
if (tempJson && tempJson.length > 0) {
for (var j = 0; j < tempJson.length; j++) {
if (j == tempJson.length - 1) {
tempStr += tempJson[j].name
} else {
tempStr += "" + tempJson[j].name + "" + naviS
}
}
if (tempJson.length > 1) {
tempStr += "x"
} else {
tempStr += "x"
}
}
tipName = tempStr
}
if (tmpObj) {
tmpObj.innerHTML = tipName
}
tmpObj = ge("rehidenavlist");
if (tmpObj) {
try {
tmpObj.style.display = "none"
} catch (e) {}
}
if (iss) {
SubmitForm("", "&ua=1.15")
}
return
}
function clearCheckNavi(b) {
var a = ge("checkcatalog");
if (b != "*") {
a.innerHTML = "";
if (ge("hiddenNavi")) {
ge("hiddenNavi").innerHTML = SpecilNavi("*", "")
}
}
a = ge("rehidenavlist");
if (a) {
try {
a.style.display = "none"
} catch (c) {}
}
}
function SpecilNavi(c, a) {
var b = " ";
b += "";
b += "";
if ($("#catalogName").length > 0) {
$("catalogName").val("ZJCLS")
} else {
b += ""
}
return b
}
function DefaultClickNavi(b, a) {
if (b == "undefined") {
b = ""
}
if (a == "undefined") {
a = ""
}
if (!b) {
return
}
FillValue("selectbox", b);
FillValue("selecteboxname", a);
SetNaviLocation(b, a, true)
}
function searchClassByCode(c) {
var a = "";
if (!c) {
return a
}
if (json_category) {
a = "[";
var b = function(f, e) {
for (var g = 0; g < e.length; g++) {
if (!e) {
return ""
}
if (c.indexOf(e[g].code) == 0) {
if (c == e[g].code) {
return "{'code':'" + e[g].code + "','name':'" + e[g].name + "'},"
}
return "{'code':'" + e[g].code + "','name':'" + e[g].name + "'}," + b(f, e[g].child)
}
}
};
var d = b(c, json_category);
if (d && d.length > 0) {
d = d.substring(0, d.length - 1)
}
a += d;
a += "]"
}
return a
}
function uniencode(d) {
d = escape(d.toString()).replace(/\+/g, "%2B");
var b = d.match(/(%([0-9A-F]{2}))/gi);
if (b) {
for (var c = 0; c < b.length; c++) {
var a = b[c].substring(1, 3);
if (parseInt(a, 16) >= 128) {
d = d.replace(b[c], "%u00" + a)
}
}
}
d = d.replace("%25", "%u0025");
return d
}
function OpenWin(a, b) {
var c = window.open(b);
if (c != null) {
c.focus()
}
}
function DBSwich(d, g, b) {
if (d && d != "") {
d = d.toUpperCase();
var a = document.getElementById(d);
if (a) {
a.onclick()
} else {
dblistclick(ge(d), "", d);
var a = document.getElementById(d);
if (a) {
a.onclick()
}
}
}
var e = function(l, j) {
var k = function(q) {
var o = document.getElementById("txt_1_sel");
if (o) {
try {
var n = o.options;
var m = n.length;
m--;
while (m >= 0) {
if (n[m].value == q) {
return q
} else {
if (n[m].text == q) {
return n[m].value
}
}
m--
}
} catch (p) {}
}
return ""
};
var c = function(n) {
if (n) {
var m = document.getElementById("txt_1_sel");
if (m) {
m.value = n
}
}
};
if (j && j != "") {
j = decodeURIComponent(j);
FillValue("txt_1_value1", j);
var h = function() {
var f = document.getElementById("btnSearch");
if (f) {
f.onclick()
}
};
if (l && l != "") {
l = decodeURIComponent(l);
c(k(l))
}
h()
}
};
e(g, b)
}
function handlerRedirect() {
var e = window.location.search;
var d = GetQueryStringByName(e, "dbprefix");
if (!d || d == "") {
d = GetQueryStringByName(e, "code")
}
var b = GetQueryStringByName(e, "f");
var a = GetQueryStringByName(e, "kw");
DBSwich(d, b, a)
}
var isIE6 = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE6.0");
function ShowAllChannel(g, e, b, c, f) {
var a = ge(e);
var d = a.innerHTML.Trim();
if (d == "") {
a.innerHTML = "
"
}
a.style.display = "block"
}
function SetIframe(c, a) {
if (!isIE6) {
return
}
if (a == undefined || typeof a != "string") {
a = "ie6iframe"
}
var b = document.getElementById(a);
var d = document.getElementById(c);
if (!d || !b) {
return
}
if (d.style.display == "none") {
b.style.display = "none"
} else {
b.style.display = "";
if (d.clientHeight) {
b.height = d.clientHeight + "px"
}
}
}
function initDBselect() {
initCoreList();
recoverDBSelect()
}
function initCoreList() {
var a = new dbJsonFac();
drawDBList(a.getDBarray());
selectCoreDB(a.getDefaultSelDB());
showorhideDBList()
}
function recoverDBSelect() {
var a = /[\u4e00-\u9fa5]/gi;
var d = $("#db_opt").val();
if (d && d != "" && !a.test(d)) {
d += ",";
var c = 0;
var b = 0;
$("#coreContent input[type='checkbox']").each(function() {
if (d.indexOf($(this).val() + ",") >= 0) {
$(this).attr("checked", true);
c++
} else {
$(this).attr("checked", false)
}
b++
});
if (c != b) {
$("#allselectdblistbtn em").html("({0})".format(c.toString()))
}
}
}
function showorhideDBList() {
var a = false;
if ($("#singleDB").length <= 0) {
a = $("#dbPrefix").val() == "SCDB" ? true : false
} else {
a = $("#singleDB").val() == "SCDB" ? true : false
}
setDBlistEvet(a)
}
function setDBlistEvet(a) {
$("#allselectdblistbtn em").html("");
if (!a) {
$("#allselectdblistbtn").hide();
$("#coreContent").hide();
$("#coreContent").unbind("mouseover")
} else {
$("#allselectdblistbtn").show();
if (!$("#allselectdblistbtn").data("events") || !$("#allselectdblistbtn").data("events")["click"]) {
$("#allselectdblistbtn").bind("click", function() {
if ($("#coreContent").css("display") == "none") {
$("#coreContent").show();
$("#coreContent").unbind("mouseleave");
$("#coreContent").bind("mouseleave", function() {
$(this).hide();
$("#txt_1_value1").focus();
return false
})
} else {
$("#coreContent").hide()
}
setDBListIframe();
return false
})
}
}
}
function dbJsonFac() {
this.DBArray = new Array();
this.Defaultseldb = "";
this.Constructor()
}
dbJsonFac.prototype.Constructor = function() {
if (!dbJson) {
this.CreateDBJson()
}
if (dbJson) {
if (dbJson.dbinfo) {
this.DBArray = dbJson.dbinfo
}
if (dbJson.defaultseldb) {
this.Defaultseldb = dbJson.defaultseldb
}
}
}
;
dbJsonFac.prototype.CreateDBJson = function() {
var coreJsonObj = ge("coreJson");
if (coreJsonObj) {
dbJson = eval("(" + coreJsonObj.value + ")")
}
}
;
dbJsonFac.prototype.getDBarray = function() {
return this.DBArray
}
;
dbJsonFac.prototype.getDefaultSelDB = function() {
return this.Defaultseldb
}
;
var coreDBListCount = -1;
function drawDBList(a) {
if ($("#coreContent").length <= 0) {
return
}
var b = "input[id^=txt_],input[id^=buttom_],input[id^=au_],input[id^=base],input[id^=magazine_]";
$(b).live("focus", function() {
$("#coreContent").css("display", "none")
});
$("#coreContent input[type='checkbox']").bind("click", function() {
var d = $("#coreContent input[type='checkbox']:checked").get().length;
$("#allselectdblistbtn em").html("({0})".format(d.toString()))
});
$("#allSelectBtn").bind("click", function() {
$("#coreContent input[type='checkbox']").each(function() {
$(this).attr("checked", true)
});
$("#allselectdblistbtn em").html("({0})".format($("#coreContent input[type='checkbox']").length))
});
$("#clearSelectBtn").bind("click", function() {
$("#coreContent input[type='checkbox']").each(function() {
$(this).attr("checked", false)
});
$("#allselectdblistbtn em").html("(0)")
})
}
function selectCoreDB(d) {
if (d && d.length > 0) {
var a = d + ",";
var c = 0;
var b = 0;
$("#coreContent input[type='checkbox']").each(function() {
if (a.indexOf($(this).val() + ",") >= 0) {
$(this).attr("checked", true);
c++
} else {
$(this).attr("checked", false)
}
b++
});
if (c != b) {
$("#allselectdblistbtn em").html("({0})".format(c.toString()))
}
}
}
function collectSelectDB() {
var a = true;
var c = $("#singleDB").val();
if (c == undefined) {
c = $("#dbPrefix").val()
}
var b = false;
var e = window.location.href;
if (e.indexOf("/brief/index_result.aspx") > -1) {
if (c == "ZYZK" || c == "CFED" || c == "WWJD" || c == "WWDB") {
b = true
}
}
if (c == "SCDB" || b) {
var d = $("#coreContent input[type='checkbox']:checked").map(function() {
return $(this).val()
}).get().join(",");
if (!d || d == "") {
d = "SCDB";
a = false
}
$("#db_opt").val(d)
} else {
$("#db_opt").val(c)
}
return a
}
function createCoreDBTitle() {
$("#headDBSwitchDiv").after("")
}
function setDBListIframe() {
SetIframe("coreContent", "ie6CoreDBListiframe")
}
function expertCoreSearchInit() {
var b = $("#singleDB").val() ? $("#singleDB").val() : $("#dbPrefix").val();
var a = b == "SCDB" ? true : false;
if (a) {
if ($("#coreContent").length <= 0) {
createCoreDBTitle()
}
var d = new dbJsonFac();
if (a) {
var c = function(e) {
if (e) {
$("#allselectdblistbtn").removeClass();
$("#allselectdblistbtn").addClass("recoresear recoresearCur")
} else {
$("#allselectdblistbtn").removeClass();
$("#allselectdblistbtn").addClass("recoresear")
}
};
if (!$("#allselectdblistbtn").data("events") || !$("#allselectdblistbtn").data("events")["click"]) {
$("#allselectdblistbtn").bind("click", function() {
if ($("#coreContent").css("display") == "none") {
c(true);
$("#coreContent").show();
$("#coreContent").unbind("mouseleave");
setDBListIframe();
$("#coreContent").bind("mouseleave", function() {
c(false);
$(this).hide();
$("#txt_1_value1").focus();
setDBListIframe();
return false
})
} else {
c(false);
$("#coreContent").hide();
setDBListIframe()
}
return false
})
}
}
}
}
function GetTagNameFromDBJson(a) {
if (a && typeof dbJson != "undefined") {
var c = dbJson.dbinfo;
var b = 0;
while (b < c.length) {
if (c[b].code == a) {
if (c[b].tagname) {
return c[b].tagname
}
return c[b].name
}
b++
}
}
return ""
}
var IsLoadedDBInfo = false;
var IsLoadedFieldInfo = false;
var intMark;
function loadPageJsonInfo(b) {
addWideScreenDB();
initDBselect();
loadDBInfo();
loadDBFieldInfo();
var a = 0;
intMark = window.setInterval(function() {
if (a > 20) {
window.clearInterval(intMark)
}
if (IsLoadedDBInfo && IsLoadedFieldInfo) {
if (typeof b == "function") {
b()
}
handlerRedirect();
window.clearInterval(intMark)
}
a++
}, 50);
loadYiKuangProductList()
}
function defaultLoadPageJsonInfo(a) {
defaultLoadPageJson([addWideScreenDB, initDBselect, fillField = function() {
var b = GetInputValue("singleDB");
if (b != "SCDB") {
FillSearchSelect(b)
}
}
], a)
}
function resultLoadPageJsonInfo(a) {
resultAddWideScreenDB();
initDBselect()
}
function defaultLoadPageJson(e, a, d) {
if (Object.prototype.toString.call(e) == "[object Array]") {
var c = 0
, b = e.length;
while (c < b) {
if (typeof e[c] == "function") {
e[c]()
}
c++
}
}
loadDBFieldInfo(a);
if (d != false) {
loadYiKuangProductList()
}
}
function loadDBInfo() {
asynUrlLoad("dblist", function() {
if (typeof attachDBJson != "undefined") {
try {
dbJson = attachDBJson;
IsLoadedDBInfo = true
} catch (a) {}
}
}, "dbJsonScript")
}
function loadDBFieldInfo(a) {
asynUrlLoad("ykf", function() {
if (typeof attachFieldJson != "undefined") {
try {
fieldJson = attachFieldJson;
IsLoadedFieldInfo = true;
if (typeof a == "function") {
a()
}
} catch (b) {}
}
}, "fieldScript")
}
function asynUrlLoad(a, b) {
asynLoad("/kns/request/GetHeadDBJson.ashx?action=" + a, b)
}
function loadYiKuangProductList() {
asynLoad("/kns/request/GetHeadParam.ashx?action=ls", function() {
if (typeof dblistJson != "undefined") {
try {
var a = unescape(dblistJson.value);
var b = ge("dbother_div");
if (b) {
b.innerHTML = b.innerHTML + a
}
ge("rehidemore").innerHTML = ""
} catch (c) {}
}
}, "dblistJsonScript")
}
function asynLoad(b, d, c) {
if (b) {
var a = new CoreDomainLoadJson();
a.Load(b, d, c)
}
}
function dblistclick(d, a, b) {
if (!b) {
return
}
if (!a) {
a = GetTagNameFromDBJson(b)
}
SetMoreTag(d, a, b);
CheckDBTag(ge(b), a, b, false);
try {
document.getElementById("dbother_div").style.display = "none"
} catch (c) {}
}
function SetMoreTag(a, b, e) {
if (a && a.className == "recur") {
return
}
var d = document.getElementById("dbTag").getElementsByTagName("li");
for (var g = 0; g < d.length; g++) {
if (d[g].id == e) {
return
}
}
var j = d.length;
var h = j - 2;
if (h < 0) {
h = 0
}
if (isRemoveDBTag(b, j)) {
RemoveDBTag(d, [h]);
h--
}
var c = 0;
if (isReStoreDBTag(b, d)) {
c = reStoreDBTag(d, e);
h += c
}
if (c == 2) {
d = document.getElementById("dbTag").getElementsByTagName("li");
RemoveDBTag(d, [d.length - 2]);
return
}
var f = d[h];
f.innerHTML = CreateLiInnerHTML(b, e);
f.onclick = function() {
CheckDBTag(this, b, e, true);
return false
}
;
f.id = e
}
function isRemoveDBTag(a, c) {
var b = isLong(a);
var d = displayTagCount;
d += IsWideScreen() ? 1 : 0;
if (d + 1 == c && b) {
return true
}
return false
}
function isReStoreDBTag(b, e) {
var c = e.length;
if (c - 2 > 0) {
var d = $(e[c - 2]).find("a").html();
var f = isLong(d);
var a = isLong(b);
return f && !a
}
return false
}
function reStoreDBTag(g, d) {
var k = getDBInfoArray();
if (!k || k.length <= 0) {
return
}
var a = 0
, e = k.length
, f = 0;
var h = g.length;
var c = h - 2;
var j = 0
, b = 0;
if (c < 0) {
return
}
while (a < e) {
if (k[a].yk == "1") {
if (f == c) {
j = a
}
if (f == c + 1) {
b = a;
break
}
f++
}
a++
}
var l = "";
if (j > 0 && j <= e) {
if (d == k[j].code) {
l = "recur"
}
}
$(g[c]).before(getDBLi(k[j].code, k[j].tagname, l));
if (l == "recur" && b > 0 && b <= e) {
$(g[c + 1]).before(getDBLi(k[b].code, k[b].tagname), "");
return 2
}
return 1
}
function getDBLi(d, a, e, b) {
if (d && a) {
if (!e) {
e = ""
}
if (b == 1) {
return '{1} '.format(d, a, e, BasePath())
}
return "{1} ".format(d, a, e)
}
return ""
}
function RemoveDBTag(c, a) {
if (c) {
var b = c.length;
for (var d = 0; d < a.length; d++) {
if (a[d] < b) {
$(c[a[d]]).remove()
}
}
}
}
function isLong(b) {
if (b) {
var a = strlen(b);
if (a > 12) {
return true
}
}
return false
}
function strlen(b) {
var a = 0;
for (var c = 0; c < b.length; c++) {
if (b.charAt(c).match(/[\u0391-\uFFE5]/)) {
a += 2
} else {
a++
}
}
return a
}
function setNaviDBSwitch() {
if ($("#resultDBSwitchIsEmpty").val() == "0") {
$("#rDBSwitchDiv").hide()
}
}
function getDBInfoArray() {
var a;
if (!dbJson) {
var b = new dbJsonFac();
a = b.getDBarray()
} else {
a = dbJson.dbinfo
}
return a
}
function resultAddWideScreenDB() {
if (IsWideScreen()) {
var f = $(".recur").attr("id");
var h = getDBInfoArray();
if (!h || h.length <= 0) {
return
}
var j = {
L: 1,
M: 2,
R: 3
};
cnki_WideScreenDB.initInfo();
var g = j.L;
if (cnki_WideScreenDB.miDBInfo.code == f) {
g = j.M
} else {
var e = displayTagCount;
var a = 0
, b = h.length;
var c = a;
if (e < b) {
while (a < b) {
if (h[a].yk == "1") {
if (c < e) {
if (h[a].code == f) {
g = j.L;
break
}
c++
} else {
g = j.R;
break
}
}
a++
}
}
}
var d = null;
if (g == j.M || g == j.R) {
d = cnki_WideScreenDB.leDBInfo;
$(".recur").before(getDBLi(d.code, d.tagname, "", 1))
} else {
$("#DbotherLi").before(getDBLi(cnki_WideScreenDB.miDBInfo.code, cnki_WideScreenDB.miDBInfo.tagname, "", 1))
}
}
}
function addWideScreenDB() {
if (IsWideScreen()) {
cnki_WideScreenDB.initInfo();
if (cnki_WideScreenDB.miDBInfo) {
$("#DbotherLi").before(getDBLi(cnki_WideScreenDB.miDBInfo.code, cnki_WideScreenDB.miDBInfo.tagname))
}
}
}
var cnki_WideScreenDB = {
dbInfoArray: [],
isError: false,
ykLen: 11,
insertDelFun: function() {},
miDBInfo: null,
leDBInfo: null,
riDBInfo: null,
initInfo: function() {
dbInfoArray = getDBInfoArray();
if (!dbInfoArray || dbInfoArray.length <= 0) {
return
}
var c = displayTagCount;
var b = 0
, a = dbInfoArray.length;
var d = b;
if (c < a) {
while (b < a) {
if (dbInfoArray[b].yk == "1") {
if (d < c) {
d++
} else {
break
}
}
b++
}
}
if (d == c) {
if (b - 1 >= 0) {
this.leDBInfo = dbInfoArray[b - 1]
}
this.miDBInfo = dbInfoArray[b];
if (b + 1 < a) {
this.riDBInfo = dbInfoArray[b + 1]
}
}
}
};
var RelatedWords = ["QW", "FT", "SU", "TI", "KY", "AB", "RF", "XF"];
function ykSelChangeEvent(d) {
var b = function(e) {
var f = RelatedWords.length;
while (f--) {
if (e == RelatedWords[f]) {
return true
}
}
return false
};
var c = function(e) {
if (e) {
$("#CKB_extension").val("TYC")
} else {
$("#CKB_extension").val("")
}
};
if (d) {
var a = d.value;
if (a.indexOf("$") > 0) {
a = a.substring(0, a.indexOf("$"));
if (a && a.length > 0) {
if (b(a)) {
c(true);
return
}
}
}
}
c(false)
}
;function RecommendTip() {}
RecommendTip.prototype.recommandSearch = function() {
var a = $("#txt_1_value1").val();
$("#txt_1_value1").val("");
$("#expertvalue").val($("#recommandcondition").val());
SubmitForm("", "&ua=1.17");
$("#txt_1_value1").val(a);
$("#recommandconLink").css({
background: "#FF6600",
color: "#fff"
})
}
;
RecommendTip.prototype.getRecommendTip = function(e) {
$("#recommandconLink").removeAttr("style");
$("#expertvalue").val("");
if (e == "" || e == null) {
e = ge("txt_1_value1").value
}
if (e == "") {
this.setTipsNone();
return
}
var c = "/kns/Request/GetAptitude_searchHandler.ashx";
var g = ge("txt_1_sel");
var h = g.options.length;
var d = "";
var j = null;
var f = ge("singleDB").value;
if ("CRFD|CRPD|CRDD|CRMD|IMAGE|CRLD|CIDX".indexOf(f.toUpperCase()) > 0) {
this.setTipsNone();
return
}
var b = "";
for (var a = 0; a < h; a++) {
b += g[a].value + ","
}
for (var a = 0; a < h; a++) {
if (g[a].selected == true) {
j = g[a].text;
break
}
}
CommonDealNoDiv("Recommend_tip", c, "&kw=" + encodeURIComponent(e) + "&dbcode=" + f + "&selectedField=" + encodeURIComponent(j) + "&valueFiled=" + encodeURIComponent(b), this.ShowRecommendTip, "")
}
;
RecommendTip.prototype.ShowRecommendTip = function(a) {
if (a.readyState != ReadyState.Complete) {
return
}
if (a.status == HttpStatus.OK) {
$("#RecommendTip").html(a.responseText)
}
}
;
RecommendTip.prototype.setTipsNone = function() {
$("#RecommendTip").html("")
}
;
RecommendTip.prototype.getrecommendtips = function(a) {
var b = "";
if (a == null || a == "" || a.length == 0) {
return ""
}
for (i = 0; i < a.length; i++) {
b += a[i].split(":")[1] + " "
}
return b
}
;
function HistoryOperat() {
this.IshaveNewSeeCookie = 0;
this.IshaveNewDownCookie = 0
}
HistoryOperat.prototype.IsSupHTML5 = (function() {
return window.localStorage ? true : false
}
);
HistoryOperat.prototype.newsetCookie = function(b, e) {
if (e == "输入检索词") {
return
}
var d = 7;
var a = new Date();
a.setTime(a.getTime() + d * 24 * 60 * 60 * 1000);
var c = "";
if (this.newgetCookie(b) != null) {
c = this.newgetCookie(b)
}
if (c != null && c != "" && c != "<#>") {
if (!this.IsIndexOfTheValue(c, $.trim(e))) {
if (this.IsSupHTML5()) {
localStorage.setItem(b, e + "<#>" + c)
} else {
document.cookie = b + "=" + escape(e + "<#>" + c) + ";expires=" + a.toGMTString() + ";path=/"
}
}
} else {
if (this.IsSupHTML5()) {
localStorage.setItem(b, e + "<#>")
} else {
document.cookie = b + "=" + escape(e + "<#>") + ";expires=" + a.toGMTString() + ";path=/"
}
}
this.setCookieNew15(b)
}
;
HistoryOperat.prototype.setCookieNew15 = function(b) {
var f = 7;
var a = new Date();
a.setTime(a.getTime() + f * 24 * 60 * 60 * 1000);
var d = "";
var e = this.newgetCookie(b);
var c = e.split("<#>");
if (c.length > 15) {
for (i = 0; i <= 15; i++) {
d += c[i] + "<#>"
}
if (this.IsSupHTML5()) {
localStorage.setItem(b, d)
} else {
document.cookie = b + "=" + escape(d) + ";expires=" + a.toGMTString() + ";path=/"
}
}
}
;
HistoryOperat.prototype.IsIndexOfTheValue = function(d, a) {
var e = false;
var f = "";
var c = d.split("<#>");
for (var b = 0; b < c.length; b++) {
if (c[b].toString() == a) {
e = true
}
}
return e
}
;
HistoryOperat.prototype.newgetCookie = function(a) {
var d = "";
if (this.IsSupHTML5()) {
d = localStorage.getItem(a)
} else {
var b, c = new RegExp("(^| )" + a + "=([^;]*)(;|$)");
if (b = document.cookie.match(c)) {
d = unescape(b[2])
}
}
if (d == null) {
d = ""
}
return d
}
;
HistoryOperat.prototype.newdelCookie = function(b, c) {
if (this.IsSupHTML5()) {
localStorage.removeItem(b)
} else {
var a = new Date();
a.setTime(a.getTime() - 1);
var d = getCookie(b);
if (d != null) {
document.cookie = b + "=| ;expires=" + a.toGMTString() + ";path=/"
}
}
$("#" + c).html("");
if (b.indexOf("UserInputs") > -1) {
$("#history_js").hide();
$("#newsearchhis").hide();
this.hisresult_ForInputs()
} else {
if (b == "UserSees") {
$("#history_ll").hide();
$("#newsearchhis1").hide()
} else {
if (b == "UserDownLoads") {
$("#history_xz").hide();
$("#newsearchhis2").hide()
}
}
}
}
;
HistoryOperat.prototype.hisresult_SeeAndDown = function() {
var b;
var c = this.newgetCookie("UserSees");
var d = this.newgetCookie("UserDownLoads");
if (this.IsSupHTML5()) {
this.getHisResultByLocStog("UserSees", c, "listSpan1", "newsearchhis1", "history_ll");
this.getHisResultByLocStog("UserDownLoads", d, "listSpan2", "newsearchhis2", "history_xz")
} else {
var a = "&UserSees=" + escape(c) + "&UserDownLoads=" + escape(d);
$.getJSON("../request/GetUserHistory.ashx", a, function(e) {
if (e) {
if (e.UserSees && e.UserSees.indexOf("clearspan") > -1) {
$("#newsearchhis1").html(unescape(e.UserSees));
$("#history_ll").show();
$("#newsearchhis1").show()
}
if (e.UserDownLoads && e.UserDownLoads.indexOf("clearspan") > -1) {
$("#newsearchhis2").html(unescape(e.UserDownLoads));
SetDisplayValue("history_xz", "");
SetDisplayValue("newsearchhis2", "")
}
}
})
}
}
;
HistoryOperat.prototype.hisresult_ForSeeAndDown = function(b, e) {
var a = "&" + b + "=" + this.newgetCookie(b);
var c = e;
var d = function(g) {
if (g.readyState != ReadyState.Complete) {
return
}
if (g.status == HttpStatus.OK) {
if (g.responseText != "" && g.responseText.indexOf("clearspan") > -1) {
if (g.responseText.indexOf("UserSees") > -1) {
$("#newsearchhis1").html(g.responseText);
$("#history_ll").show();
$("#newsearchhis1").show();
if (c) {
$("#cookichistory1").show();
var f = $("#s_jiantoull").attr("src");
var h = f.replace("s_jiantou01", "s_jiantou");
$("#s_jiantoull").attr("src", h)
}
} else {
if (ge("newsearchhis2") != null) {
ge("newsearchhis2").innerHTML = g.responseText;
SetDisplayValue("history_xz", "");
SetDisplayValue("newsearchhis2", "");
if (c) {
$("#cookichistory2").show();
var f = $("#s_jiantoudown").attr("src");
var h = f.replace("s_jiantou01", "s_jiantou");
$("#s_jiantoudown").attr("src", h)
}
}
}
}
}
};
if (b == "UserSees") {
CommonDealNoDiv(b + "&", "../request/GetUserSeesHandler.ashx", a, d, null, "GET")
} else {
if (b == "UserDownLoads") {
CommonDealNoDiv(b + "&", "../request/GetUserDownLoadsHandler.ashx", a, d, null, "GET")
}
}
}
;
HistoryOperat.prototype.hisresult_ForInputs = function() {
CommonDealNoDiv("UserInputs&", "../request/GetUserInputsHandler.ashx", null, null, null, "GET")
}
;
HistoryOperat.prototype.hisresult_new = function(e, o, d, p) {
var q;
var r;
if (e && e.indexOf("UserInputs") > -1) {
r = this.newgetCookie(e)
}
var m = 0;
if (r != null && r.length > 1) {
q = "";
var g = "";
var c = "";
var h = r.split("<#>");
var j = 0;
for (var a = 0, b = h.length - 1; a < b; a++) {
if (!h[a]) {
continue
}
var k = "";
if (e == "UserInputsN") {
k = "- " + h[a] + "
"
} else {
k = "- " + h[a] + "
"
}
if (j < 5) {
q += k
} else {
if (j < 15) {
g += k
}
}
j++
}
q += "
";
if (g != "") {
q += " "
}
if (j > 0) {
var n = "清空";
var f = "检索痕迹";
if (e == "UserInputs") {
q += '' + f + " " + n + "
"
} else {
q += '' + n + "
"
}
}
if (ge(d) != null) {
ge(d).innerHTML = q;
SetDisplayValue(p, "");
SetDisplayValue(d, "")
}
}
}
;
HistoryOperat.prototype.getHisResultByLocStog = function(o, g, m, c, n) {
var d;
if (g != null && g.length > 1) {
d = "";
var e = "";
var b = g.split("<#>");
var f = 0;
var p;
for (var a = 0, j = b.length - 1; a < j; a++) {
if (!b[a]) {
continue
}
p = b[a].split("");
if (p.length != 3) {
continue
}
if (!p[2] || !p[1]) {
continue
}
var h = "- " + p[1] + "
";
if (f < 5) {
d += h
} else {
if (f < 15) {
e += h
}
}
f++
}
d += "
";
if (e != "") {
d += " "
}
if (f > 0) {
var k = "清空";
d += '' + k + "
"
}
if (ge(c) != null) {
ge(c).innerHTML = d;
SetDisplayValue(n, "");
SetDisplayValue(c, "")
}
}
}
;
HistoryOperat.prototype.getCookieParams = function(c) {
var e = "";
if (c && c.length > 0) {
var b = "";
var f = "";
var a = "";
var d = decodeURI(c);
b = this.getValueFromQuery(d, "dbcode");
f = this.getValueFromQuery(d, "dbname");
a = this.getValueFromQuery(d, "filename");
if (a == "") {
a = this.getValueFromQuery(d, "file")
}
e = a + "!" + b + "!" + f
}
return e
}
;
HistoryOperat.prototype.getValueFromQuery = function(c, b) {
var a = "";
if (Object.prototype.toString.call(c) == "[object String]" && c.length > 0 && Object.prototype.toString.call(b) == "[object String]" && b.length > 0) {
var d = new RegExp("[?&]" + b + "=([^&]+)","ig");
if (d.test(c)) {
a = RegExp.$1
}
}
return a
}
;
HistoryOperat.prototype.getCookieParams_Sees = function(c) {
if (!c || !c.href) {
return ""
}
var b = this.getCookieParams(c.href);
if (this.IsSupHTML5()) {
var a = (c.innerText && c.innerText != undefined) ? c.innerText : c.text;
b = b + "" + a + "" + c.href
}
return b
}
;
HistoryOperat.prototype.getCookieParams_DownsL = function(g) {
var e = "";
var d;
if (window.attachEvent) {
d = g.parentNode.parentNode.parentNode
} else {
d = g.parentNode
}
var c = getElementsByClassName("fz14", "a", d, true)[0];
if (c) {
e = this.getCookieParams(c.href);
if (this.IsSupHTML5()) {
var f = (c.innerText && c.innerText != undefined) ? c.innerText : c.text;
e = e + "" + f + "" + c.href
}
}
return e
}
;
HistoryOperat.prototype.getCookieParams_DownsD = function(h) {
var e = "";
var d = h.parentNode.parentNode.parentNode.parentNode;
var g = getElementsByClassName("GridTitleDiv", "div", d, true)[0];
if (typeof g == "undefined") {
return
}
var c = $(g).children().find("a");
if (c) {
for (var f = 0; f < c.length; f++) {
var a = c[f].href;
a = a.toLowerCase();
if (a.indexOf("filename") > 0 || a.indexOf("file") > 0) {
e = this.getCookieParams(a);
continue
}
}
if (this.IsSupHTML5()) {
e = e + "" + c.text() + "" + c.attr("href")
}
}
return e
}
;
HistoryOperat.prototype.IsContinsTheValue = function(b, d) {
var a = this.newgetCookie(b);
var c = false;
if (a) {
if (a.indexOf(d) > -1) {
c = true
}
}
return c
}
;
HistoryOperat.prototype.IsIndexOfTheValueForDown = function(f, e) {
var g = this.newgetCookie(f);
var d = false;
var j = "";
if (g != null) {
for (var a = 0; a < g.length; a++) {
if (g[a] != "|") {
j += g[a]
} else {
var c = /\")
}
}
}
function MoreInfoSearch(d, e) {
var c = "../RedirectPage.aspx?action=indexpage&code={0}&kw={1}&korder=0";
var b = d;
if (b == "CRFD") {
b = "CRPD"
}
if (b == "IMG") {
b = "IMAGE"
}
if (b == "CLKL") {
b = "CLKD"
}
if (b == "SCSD") {
b = "CISD"
}
if (b == "SCPD") {
b = "SCOD"
}
var a = encodeURI(e);
c = c.replace("{0}", b).replace("{1}", a);
if (a != "") {
window.open(c)
}
}
function WriteLog(a) {
CommonDealNoDiv("CRRS&", "../request/SearchHandler.ashx", "ua=" + a, null, null)
}
function RemoveRecDiv() {
$("#recInfoTitle").remove();
$("#crfdinfodiv").remove();
$("#imginfodiv").remove();
$("#scsdinfodiv").remove();
$("#scpdinfodiv").remove();
$("#clklinfodiv").remove();
$("#capjinfodiv").remove()
}
function GetFlagTI(a) {
if (a == "" || a == "null" || a == null) {
return ""
} else {
a = a.replace(/\$@\#/g, '');
a = a.replace(/\#@\$/g, "");
if (a.length > 180) {
a = a.substring(0, 180) + "..."
}
return a
}
}
function GetFlagAU(a) {
if (a == "" || a == "null" || a == null) {
return ""
} else {
a = a.replace(/\;;/g, "; ");
if (a.length > 60) {
a = a.substring(0, 60) + "..."
}
return a
}
}
;var searchBarer = typeof SearchBar == "function" ? new SearchBar() : {};
var recommender = typeof RecommendTip == "function" ? new RecommendTip() : {};
var historyoperater = typeof HistoryOperat == "function" ? new HistoryOperat() : {};
var recResource = typeof RecResource == "function" ? new RecResource() : {};
var yxyzValue = "";
var PageStates = {
searchInfo: {
content: new Array(),
add: function(c, a) {
if (typeof c == "string" && c != "" && typeof a == "string" && a != "") {
var b = this.find(c);
if (b < 0) {
this.content.push(this.getJson(c, a))
} else {
this.content[b] = this.getJson(c, a)
}
$("#selectCount").html($("#selectCount").html() + "_OK");
return true
}
return false
},
getJson: function(k, v) {
return eval("({'k':'" + k + "','v':'" + v + "'})")
},
remove: function(b) {
var a = this.find(b);
if (a >= 0) {
this.content = this.content.slice(0, a).concat(this.content.slice(++a))
}
},
clear: function() {
this.content = new Array()
},
find: function(b) {
var a = this.content.length;
while (a--) {
if (this.content[a] && this.content[a].k == b) {
return a
}
}
return -1
},
get: function(b) {
var a = this.find(b);
if (a >= 0) {
return this.content[a]["v"]
}
return ""
}
}
};
PageStates.SearchKey = "";
PageStates.OporationType = 1;
PageStates.CurOrderBy = "";
PageStates.CurRSCount = 0;
PageStates.SetOporationType = function(a) {
switch (a) {
case "检索":
PageStates.OporationType = 1;
break;
case "翻页":
PageStates.OporationType = 2;
break;
case "分组":
PageStates.OporationType = 3;
break;
case "排序":
PageStates.OporationType = 4;
break;
case "切换显示":
PageStates.OporationType = 5;
break
}
}
;
var isresult = false;
var isresult2 = false;
var ispost = false;
function LoadUC(a, c, g, f) {
var e = new Request();
var b = GetQueryStringByName(location.search, "dbPrefix");
if (b == "") {
b = getEmValue("dbPrefix")
}
if (b != "") {
b = "&dbPrefix=" + b
}
b += "&rel=" + encodeURIComponent(location);
var d = f + "/request/getucHandler.ashx?action=getuc&uc=" + encodeURIComponent(c) + b;
e.GetNoCache(d, function(h) {
if (h.readyState != ReadyState.Complete) {
return
}
if (h.status == HttpStatus.OK && h.responseText != "") {
$("#" + a).html(h.responseText);
if (g && typeof (g) == "function") {
g()
}
}
})
}
function InitHistory() {
historyoperater.hisresult_new("UserInputs", "cookichistory", "newsearchhis", "history_js");
historyoperater.hisresult_SeeAndDown()
}
function trim(a) {
var b = new RegExp("(" + message.inputSearchWord3 + ")|(^s*)|(s*$)","g");
return a.replace(b, "")
}
function gtv(a) {
return trim(getEmValue(a))
}
function SetDisplayModel(b) {
var a = GetQueryStringByName(b, "dbprefix");
var c = GetDisplayModelCookie(a);
if (c != "") {
b = SetQueryStringByName(b, "DisplayMode", c)
}
return b
}
function SetDisplayModelCookie(b) {
var c = 30;
var a = new Date();
a.setTime(a.getTime() + c * 24 * 60 * 60 * 1000);
document.cookie = "KNS_DisplayModel=" + escape(b) + ";expires=" + a.toGMTString() + ";path=/"
}
function GetDisplayModelCookie(b) {
try {
if (!b) {
return ""
}
var a = getValueFromCookie("KNS_DisplayModel");
if (a != "") {
var c = a.split("@");
if (b.toLowerCase() == c[1].toLowerCase()) {
return c[0]
}
}
} catch (d) {
return ""
}
return ""
}
function GetSubmitPath() {
return getEmValue("submitpath")
}
function verPublishDate(a) {
if (a) {
a = a.toUpperCase();
if (a == "CPFD" || a == "CIPD" || a == "IPFD") {
return checkPublishDate("confertime")
} else {
if (a == "SCPD") {
return checkPublishDate("date_gkr")
}
}
}
return true
}
function checkElExpert() {
var a = ge("expertValue");
if (a && a.value.length > 500) {
alert(message.mostInput + "500" + message.keyNum);
a.focus();
return false
}
return true
}
function handleFundCode(a) {
if (a) {
if (/hidFundCode=[^&]+/.test(a)) {
a = a.replace(/&?base_value1=[^&]*/, "");
a = a.replace(/&?basevalue=[^&]*/, "")
}
}
return a
}
function handleMagezineCode(a) {
if (a) {
if (/hidMagezineCode=[^&]+/.test(a)) {
a = a.replace(/&?magazine_value1=[^&]*/, "")
}
}
return a
}
function IndexSearchOnclick(a) {
if (!oneBoxCheck()) {
return false
}
recommender.getRecommendTip();
recAddToPage();
searchOnclick(a)
}
function oneBoxCheck(a) {
var b = GetInputValue("txt_1_value1");
if (typeof b == "string") {
b = b.Trim();
if (b == "") {
if (typeof a == "function") {
a()
} else {
alert("请输入检索词!")
}
return false
}
return true
}
return false
}
function delCollectCoreDB() {
if (typeof collectSelectDB == "function") {
if (!collectSelectDB()) {
alert(message.selectOneDB2);
return false
}
}
return true
}
function expertCoreSearch(a) {
SingleSearchOnclick(a)
}
function cnkiIndexSearchOnclick(a) {
searchOnclick(a)
}
function searchOnclick(a) {
CollectDBList();
setTimeout(function() {
SubmitForm("", a);
searchBarer.SetSearchHisTip()
}, 1000)
}
function SingleSearchOnclick(a) {
SubmitForm("", a)
}
function SubmitForm(q, p) {
if (("undefined" != typeof (Visualization)) && "undefined" != typeof (Visualization.pop) && "undefined" != typeof (Visualization.pop.clearCache)) {
Visualization.pop.clearCache()
}
if (!delCollectCoreDB()) {
return
}
var f = GetQueryStringByName(p, "ua");
var d = GetQueryStringByName(p, "resultSearch");
var o = GetQueryStringByName(p, "formDefaultResult");
FillValue("ua", f);
var l = ge("LeftGroupContent");
if (l) {
l.innerHTML = ""
}
isresult = false;
var u = "";
var m = getEmValue("basePath");
if (m == "") {
m = ".."
}
var x = GetSubmitPath();
if (!x || x.length <= 0) {
x = m + "/request/SearchHandler.ashx"
}
var s = ["publishdate", "date_gkr", "implementdate"];
for (var n = 0; n < s.length; n++) {
if (!checkPublishDate(s[n])) {
return
}
}
var y = ge("action");
if ((q == null || q == "") && y != null) {
q = y.value
}
var h = getEmValue("curdbcode");
if (!verPublishDate(h)) {
return
}
var w;
if ($("#txt_1_value1").val()) {
$("#recommandconLink").removeAttr("style");
w = $("#txt_1_value1").val();
var j = new RegExp("[\\|/]","g");
w = w.replace(j, " ");
if (ge("cookichistoryN")) {
historyoperater.newsetCookie("UserInputsN", w)
} else {
historyoperater.newsetCookie("UserInputs", w)
}
}
u = p + SearchParam() + "&his=0";
var v = getEmValue("singleDB");
if (v != "") {
u = ReplaceUrlParmValue(u, '/(DbPrefix=)([^&"]*)/gi', "DbPrefix=" + v);
if (h != "") {
u += "&parentdb=" + h
}
SetSubTheme(v);
SetCharContentVisible(v)
} else {
SetSubTheme(h);
SetCharContentVisible(h)
}
u = handleFundCode(u);
u = handleMagezineCode(u);
var r = NaviParam();
var c = ge("issue_1_value1_2");
if (c && !c.disabled) {
if (!isNumber(c)) {
return
}
}
var e = "";
var z = ge("sen");
if (z != null && z.style.display != "none") {
if (ge("sen_1_value1")) {
if ((gtv("sen_1_value1") != "" && gtv("sen_1_value2") == "") || (gtv("sen_1_value2") != "" && gtv("sen_1_value1") == "")) {
alert(message.twoKeyWord);
return
}
}
if (ge("sen_2_value1")) {
if ((gtv("sen_2_value1") != "" && gtv("sen_2_value2") == "") || (gtv("sen_2_value2") != "" && gtv("sen_2_value1") == "")) {
alert(message.twoKeyWord);
return
}
}
if (ge("sen_1_value1") && ge("sen_2_value1")) {
if ((gtv("sen_1_value2") == "" && gtv("sen_1_value1") == "") && (gtv("sen_2_value2") == "" && gtv("sen_2_value1") == "")) {
alert(message.twoKeyWord);
return
}
}
e = "&issen=1"
}
u = r + u + e;
if (!checkElExpert()) {
return
}
u = u.replace("undefined", "");
if (!SiftSpicWord(u)) {
return
}
if (q == "scdbsearch") {
var b = document.getElementsByName("chbDBList");
var t = "";
for (var g = 0; g < b.length; g++) {
if (b[g].checked == true) {
t += b[g].value + ","
}
}
if (t != "") {
t = t.substr(0, t.length - 1)
}
document.forms.searchForm.submit();
return
}
if (window.screen.width >= 1280) {
if (v == "CIDX") {
$("#iframeResult").width(1200);
$("#searchrelevent").width(1200);
$("#relevantExpertDiv").width(1200)
} else {
$("#iframeResult").width(974)
}
}
var a = ge("divresult");
if (a) {
a.style.display = ""
}
if (zhiShuJumpSet(v)) {
return
}
historyoperater.hisresult_new("UserInputs", "cookichistory", "newsearchhis", "history_js");
CommonDeal(q, x, u, searchresult, waitingTip, "GET");
if (o == "formDefaultResult") {
LoadGroup(u)
}
if ($("#defaultResultGroup").val() == "defaultResultGroup") {
if (d != "1") {
if ($("#isTagSearch").val() == "1") {
$("#isTagSearch").val("0");
LoadGroup(u)
} else {
if (f == 1.11 && $("#isTagSearch").val() == "0") {
$("#group").html("")
}
}
}
} else {
if ($("#resultGroup").val() == "resultGroup") {
if ($("#isShowGroup").val() == "0" || $("#webGroup").html().trim() == "") {
$("#isShowGroup").val("1");
LoadGroup(u)
} else {
$("#group").html("")
}
} else {
$("#group").html("")
}
}
if (typeof extraParam != undefined && typeof extraParam != "undefined" && e) {
if (!(extraParam.indexOf(e) >= 0)) {
extraParam += e
}
}
leftGroupCallBackFun = function() {
WebGroupCall(function() {
$("#webGroup span input[id^='Tag']").val("");
arrGroupResult = new Array();
arrGroupShowData0 = new Array();
ExGroupExpand()
});
WriteLeftGroup(u)
}
;
hideGroupFun = function() {}
;
backToTopFun = function() {
ge("HeaderDiv").scrollIntoView()
}
;
ispost = true;
SetSearchResultPage(v);
HideRecommendInfo()
}
function HideRecommendInfo() {
$("#recommendTitle").hide();
$("#recommendContent").hide()
}
function LoadGroup(a) {
isWebGroupOK = false;
ClearWebGrouop();
SetDisplayValue("resultFilter", "");
SetDisplayValue("webGroup", "");
CommonDealNoDiv("webGroup&", "../request/GetWebGroupHandler.ashx", a, groupresult, waitingTip)
}
var briefGroupFun;
var leftGroupCallBackFun;
var hideGroupFun;
var backToTopFun;
function groupresult(a) {
if (a.readyState != ReadyState.Complete) {
return
}
if (a.status == HttpStatus.OK) {
if (a.responseText == "") {
SetDisplayValue("webGroup", "none");
var c = ge("CustomizeSearch");
if (c && c.style.display != "none") {
var d = ge("resultFilter");
if (d) {
d.style.height = "22px"
}
}
return
} else {
var d = ge("resultFilter");
if (d) {
d.style.height = ""
}
}
try {
fillInnerHTML("webGroup", a.responseText);
if (a.responseText) {
var e = getJavaScript(a.responseText);
evalJavaScript(e)
}
return
} catch (b) {}
}
}
function ReplaceUrlParmValue(url, regExp, replaceValue) {
var ReturnUrl = url;
regobj = eval(regExp);
var r = ReturnUrl.match(regobj);
if (r != null) {
ReturnUrl = ReturnUrl.replace(r, replaceValue)
}
return ReturnUrl
}
function isNumber(a) {
if (!/\d*/.test(a.value)) {
alert(message.inputQiKanNum);
a.focus();
return false
}
return true
}
function IsIndexOrSingle() {
var c = "";
var d = window.location.href;
var b = "";
if (d.indexOf("?") > 0) {
b = window.location.search
}
var a = d.replace(b, "");
a = a.toLowerCase();
if (a.indexOf("/brief/default_result.aspx") > -1) {
c = "INDEX"
} else {
if (a.indexOf("/brief/result.aspx") > -1) {
c = "SINGLE"
}
}
return c
}
function SearchSimilar(a, d) {
var c = "";
if (IsIndexOrSingle() == "INDEX") {
FillValue("txt_1_value1", decodeURIComponent(a));
if (d == "his") {
c = "&ua=1.13"
}
if (d == "sim") {
c = "&ua=1.14"
}
IndexSearchOnclick(c)
} else {
var b = "txt_1_value1";
if (ge("txt_1_value1")) {
FillValue("txt_1_value1", decodeURIComponent(a))
} else {
if (ge("expertvalue")) {
FillValue("expertvalue", decodeURIComponent("SU='" + a) + "'")
} else {
if (ge("au_1_value1")) {
FillValue("au_1_value1", decodeURIComponent(a))
} else {
if (ge("base_value1")) {
FillValue("base_value1", decodeURIComponent(a))
} else {
if (ge("sen_1_value1")) {
FillValue("sen_1_value1", decodeURIComponent(a));
FillValue("sen_1_value2", decodeURIComponent(a))
} else {
if (ge("magazine_value1")) {
FillValue("magazine_value1", decodeURIComponent(a))
}
}
}
}
}
}
if (d == "his") {
c = "&ua=1.23"
}
if (d == "sim") {
c = "&ua=1.24"
}
SingleSearchOnclick(c)
}
scroll(0, 0)
}
function InSearchSimilar(a, b) {
FillValue("txt_1_value1", decodeURIComponent(a));
if (b == "sim") {
ua_p = "&ua=1.14"
}
CollectDBList();
SubmitForm();
scroll(0, 0)
}
function SubmitResult(c, d) {
if (!delCollectCoreDB()) {
return
}
isresult = true;
var a = "";
var g = "../request/searchHandler.ashx";
if (!checkPublishDate("publishdate")) {
return
}
var e = getEmValue("curdbcode");
if (!verPublishDate(e)) {
return
}
var f = NaviParam();
a = f + SearchParam() + d + "&research=on";
a = a.replace("undefined", "");
a = handleFundCode(a);
a = handleMagezineCode(a);
if (!checkElExpert()) {
return
}
var b = ge("sen");
if (b != null && b.style.display != "none") {
a += "&issen=1"
}
a = a.replace("undefined", "");
if (!SiftSpicWord(a)) {
return
}
CommonDeal(c, g, a, searchresult, waitingTip, "GET");
contractGroup()
}
function contractGroup() {
var a = getElementsByClassName("GroupButtonOn", "a", ge("webGroup"), true);
if (a && a.length > 0) {
a[0].className = ""
}
SetDisplayValue("group", "none")
}
function SaveQuery() {
var c = ge("qryname");
if (c == null) {
return
}
if (c.value.length == 0) {
alert(message.inputSearchFormula);
c.focus();
return
}
var a = "";
var b = "../request/search.aspx";
a = SearchParam() + "&qryname=" + escape(c.value);
CommonDeal("save", b, a, saveresult, waitingTip)
}
function fillInnerHTML(c, a) {
var b = ge(c);
if (b) {
b.innerHTML = a
}
}
function isBaiKeClass(a) {
return ( a == "CRDD" || a == "CRPD" || a == "CRMD")
}
function searchresult(g) {
if (g.readyState != ReadyState.Complete) {
return
}
if (g.status == HttpStatus.OK && g.responseText != "") {
var t = g.responseText;
var s = /dbPrefix/i;
if (!s.test(t)) {
alert(message.reSearch);
return
}
var f = "";
var g = t.match(new RegExp("[?&]dbPrefix=([^&]+)","i"));
if (g != null && g.length > 1) {
f = g[1]
}
if (typeof leftGroupCallBackFun == "function" && !isBaiKeClass(f)) {
leftGroupCallBackFun()
}
SetDisplayValue("divresult", "");
var p = new Date;
var m = getEmValue("txt_1_value1");
var j = "pagename=" + t + "&t=" + p.getTime() + "&keyValue=" + encodeURIComponent(m) + "&S=1";
SubmitBrief("brief.aspx", j);
try {
arrGroupResult = new Array();
FillValue("qryname", "");
HideDiv("divqry")
} catch (l) {}
if (!isresult2) {
var b = GetFristSearchWord();
if (b != "") {
SetDisplayValue("divSRE", "");
j += "&" + b;
var h = getEmValue("dbPrefix");
h = h.toUpperCase();
if (h == "SCDB" && ge("db_value") != null) {
j += "&db_value=" + encodeURIComponent(ge("db_value").value)
}
try {
var o = ge("txt_1_sel");
var n = o.options.length;
var a = "";
var k = null;
var c = ge("singleDB").value;
if ("CRFD|CRPD|CRDD|CRMD|IMAGE|CRLD|CIDX".indexOf(c.toUpperCase()) > 0) {
this.setTipsNone();
return
}
var r = "";
for (var q = 0; q < n; q++) {
r += o[q].value + ","
}
for (var q = 0; q < n; q++) {
if (o[q].selected == true) {
k = o[q].text;
break
}
}
CommonDealNoDiv("relevant&", "../request/NewGetRelavantHandler.ashx", j + "&dbcode=" + c + "&selectedField=" + encodeURIComponent(k) + "&valueFiled=" + encodeURIComponent(r), NewRelevantresult, waitingTip)
} catch (l) {}
try {} catch (l) {}
} else {
SetDisplayValue("divSRE", "none");
fillInnerHTML("searchrelevent", "");
fillInnerHTML("relevantExpertDiv", "")
}
}
return
}
}
function NewRelevantresult(c) {
if (c.readyState != ReadyState.Complete) {
return
}
var d = "";
var b = "";
if (c.status == HttpStatus.OK && c.responseText != "") {
var a = JSON.parse(c.responseText);
if (a) {
d = a.keyWordJson;
RenderReleventHtml(d);
if (typeof sugpath != "undefined" && sugpath) {
GetSugWords(sugpath)
}
b = a.expertJson;
if (b == "") {
SetDisplayValue("relevantExpertDiv", "none");
return
}
RenderRelevantExpertHTML(b)
}
}
}
function ShowHistory(a) {
a += "&t=" + new Date().getTime();
isresult = true;
CommonDeal("his2&", "../request/otherHandler.ashx", a, hisresult, waitingTip)
}
function hisresult(a) {
if (a.readyState != ReadyState.Complete) {
return
}
if (a.status == HttpStatus.OK && a.responseText != "") {
try {
if (isresult == false) {
fillInnerHTML("searchhis1", a.responseText);
fillInnerHTML("searchhis2", "")
} else {
fillInnerHTML("searchhis2", a.responseText)
}
return
} catch (b) {}
}
}
function saveresult(a) {
if (a.readyState != ReadyState.Complete) {
return
}
if (a.status == HttpStatus.OK && a.responseText != "") {
if (a.responseText.indexOf("用户尚未登录") != -1) {
window.open("../LoginDigital.aspx")
} else {
alert(a.responseText)
}
return
}
}
function SubmitBrief(c, b) {
var a = c + "?" + b;
a = SetDisplayModel(a);
setIframeSrc(GetResultFrame(), a)
}
function setIframeSrc(a, b) {
if (a) {
a.src = b
}
}
function SubmitHis(c, b, a) {
var e = getEmValue("txt_1_value1");
var d = "brief.aspx?" + c + "=" + b + "&keyValue=" + encodeURIComponent(e) + "&S=1";
if (a != null) {
d += a
}
setIframeSrc(GetResultFrame(), d)
}
function NaviParam() {
var o = "";
try {
var j = document.forms[0];
var l = j.selectbox;
if (l == null || l.length == 0) {
var c = ge("navicode");
if (c == null) {
return ""
}
if (c.value.length == 0) {
var d = document.getElementsByTagName("input");
var g = d.length;
for (var a = 0; a < g; a++) {
if (d[a].type == "checkbox" && d[a].id == "selectbox") {
o += d[a].value + ","
}
}
if (o.length > 0) {
return o.substring(0, o.length - 1)
}
}
return c.value
}
var p = "";
if (l.length == null) {
return ""
} else {
var b = false;
for (a = 0; a < l.length; a++) {
if (l[a].checked == true) {
p += l[a].value + ",";
b = true
}
}
if (!b) {
var c = ge("navicode");
if (c == null) {
return ""
}
o = "&NaviCode=" + c.value;
return o
}
}
var n = p.substring(p.length - 1, p.length);
if (n == ",") {
p = p.substring(0, p.length - 1)
}
var k = ge("AllFirstFloorNaviCode");
if (k) {
if (p == k.value) {
p = "*"
}
}
o = "&NaviCode=" + encodeURIComponent(p);
var m = ge("catalogName");
if (m != null && m != "undefined") {
o += "&catalogName=" + m.value
}
} catch (h) {}
return o
}
var bFirstSearched = false;
function SetSearchResultPage(a) {
try {
SetDisplayValue("history", "none");
ChangeImgSrc("history", "s_jiantou1", "../images/" + LanguageEncode + "/s_jiantou01.gif", "../images/" + LanguageEncode + "/s_jiantou.gif");
if (ge("isHiddenBookBtn") && ge("isHiddenBookBtn").value.toLowerCase() == "false") {
if (a == "CRFD") {
SetDisplayValue("CustomizeSearch", "none")
}
if (a == "IMAGE") {
SetDisplayValue("CustomizeSearch", "none")
} else {
SetDisplayValue("group", "");
SetDisplayValue("resultFilter", "");
SetDisplayValue("CustomizeSearch", "")
}
}
} catch (b) {}
}
function SubmitCustomizeSearch(b) {
var a;
var d = window.frames.iframeResult.ge("SqlValue");
if (d) {
a = d.value;
var c = b;
c += "&SearchUrl=" + window.location.href;
ge("param").value = a;
document.forms.CustomizeForm.action = c;
document.forms.CustomizeForm.target = "CustomizeSearchExp_Page";
document.forms.CustomizeForm.submit()
}
}
function GetCustomizeSearch_New(d) {
if (ge("param")) {
var b;
var c;
var g = ge("Text1");
var h = window.frames.iframeResult.ge("SqlValue");
if (g && h) {
b = g.value;
var j = doValidate(b);
if (!j) {
return false
}
c = h.value;
var a = d;
var e = a.toLowerCase().indexOf("code");
if (e < 0) {
a += "&Code=" + escape(b)
} else {
a = a.substring(0, e - 1);
a += "&Code=" + escape(trim(b))
}
a += "&SearchUrl=" + window.location.href;
ge("param").value = c;
document.forms[0].action = a;
document.forms[0].target = "_blank";
document.forms[0].submit()
}
} else {
var f = ge("aLinkCustomize");
if (f) {
GetCustomizeSearch(f)
}
}
}
function GetCustomizeSearch(e) {
var b;
var c;
var f = ge("Text1");
var g = window.frames.iframeResult.ge("SqlValue");
if (f && g) {
b = f.value;
var h = doValidate(b);
if (!h) {
return false
}
c = g.value;
var a = e.href;
var d = a.toLowerCase().indexOf("code");
if (d < 0) {
a += "&Code=" + b + "¶m=" + c
} else {
a = a.substring(0, d - 1);
a += "&Code=" + b + "¶m=" + c
}
a += "&SearchUrl=" + window.location.href;
e.href = a
}
}
function similarresult(a) {
if (a.readyState != ReadyState.Complete) {
return
}
if (a.status == HttpStatus.OK && a.responseText != "") {
try {
if (ge("searchsimilar")) {
ge("searchsimilar").innerHTML = a.responseText
}
SetDisplayValue("similarword", "");
ChangeImgSrc("similarword", "s_jiantou3", "../images/" + LanguageEncode + "/s_jiantou01.gif", "../images/" + LanguageEncode + "/s_jiantou.gif");
return
} catch (b) {}
}
}
function relevantresult(a) {
var b = "";
if (a.readyState != ReadyState.Complete) {
return
}
if (a.status == HttpStatus.OK && a.responseText != "") {
try {
var c = a.responseText;
b = c
} catch (d) {}
}
RenderReleventHtml(b);
if (typeof sugpath != "undefined" && sugpath) {
GetSugWords(sugpath)
}
}
function RenderReleventHtml(c) {
if (c == "") {
SetDisplayValue("searchrelevent", "none");
return
}
var a = '相关搜索:{0}';
var e = "";
var b = "";
var d = c.split("|");
for (i = 0; i < d.length; i++) {
if (i < 15) {
e += b.format(d[i])
}
}
a = a.format(e);
if (ge("searchrelevent")) {
ge("searchrelevent").innerHTML = a
}
SetDisplayValue("searchrelevent", "")
}
function RenderRelevantInfoHTML(a, e, d, c) {
var b = '{1}:{3}';
return b.format(a, e, d, c)
}
function RequestRelevantExpert(a) {
var b = "";
CommonDealNoDiv("expert&", "../request/GetRelevantExpertHandler.ashx", a, function(d) {
if (d.readyState != ReadyState.Complete) {
return
}
if (d.status == HttpStatus.OK) {
if (d.responseText == "") {
SetDisplayValue("relevantExpertDiv", "none");
return
}
evalJavaScript("var expertInfoJson = " + d.responseText);
var c = window.setInterval(function() {
if (expertInfoJson) {
RenderRelevantExpertHTML(expertInfoJson);
window.clearInterval(c)
}
}, 10)
}
}, waitingTip)
}
function RenderRelevantExpertHTML(b) {
if (b && b.data && b.data.length > 0 && typeof b.link == "string") {
var a = RenderRelevantInfoHTML("relevantExpertDiv", "知名专家", "expertContainer", (function() {
var c = b.data.length;
var d = "";
for (var e = 0; e < c; e++) {
d += "".format(unescape(b.link).format(b.code, encodeURI(b.data[e].n), b.data[e].c), b.data[e].n)
}
return d
})());
document.getElementById("relevantExpertDiv").innerHTML = a
}
}
function GetSugWords(f) {
var c = $("#relevanttbl1").find("a").length;
var d = $("#relevanttbl1").html();
var b = "";
var e = GetFristSearchWord();
var a = e.substring(e.indexOf("&spvalue=") + 9, e.length);
var g = f + "/sug/su.ashx?action=getsmarttips&kw=" + a;
var h = "";
cnki_sug.request(f, "", decodeURIComponent(a), function() {
if (typeof oJson != "undefined") {
var j = "";
if (Object.prototype.toString.call(oJson) == "[object Array]") {
j = oJson.join(";")
} else {
if (typeof oJson.sug != "undefined") {
j = oJson.sug
}
}
if (j != null && j != "") {
j = j.replace("||", "");
var m = j.split(";");
var l = 0;
var k = "";
for (i = 0; i < m.length; i++) {
if (c + l < 14) {
if (d) {
k = m[i].replace(/\#([\\\d|,]*?)\#$/i, "");
if (d.indexOf(k) < 0) {
b += h.format(k);
l = l + 1
}
}
}
}
$("#relevanttbl1").append(b)
}
}
}, "GetSugWords_JS")
}
function Setisresult2() {
isresult2 = true
}
function doValidate(a) {
var b = /^[^`~!@#$%^&*()+=|\\\][\]\{\}:;'\,.<>/?]{1}[^`~!@$%^&()+=|\\\][\]\{\}:;'\,.<>?]{0,20}$/;
if (a == null || a == "") {
alert(message.inputParms);
return false
}
if (!b.test(a)) {
alert(message.inputParmsError);
return false
}
return true
}
function SetSelectJingQueOrMoHu(a, b) {
var d = ge(a);
if (d) {
for (var c = 0; c < d.length; c++) {
if (d[c].value == b) {
d[c].selected = true
} else {
d[c].selected = false
}
}
}
}
function SetDisabled(a) {
var b = ge(a);
if (b) {
b.disabled = "disabled"
}
}
function ClearDisabled(a) {
var b = ge(a);
if (b) {
b.disabled = ""
}
}
function ShowSimilarWords(a, b, e) {
for (i = 1; i <= a; i++) {
var d = e + i;
var c = ge(d);
if (c) {
if (i == b) {
c.style.display = ""
} else {
c.style.display = "none"
}
}
}
}
function SetChValue(a, b) {
var c = document.getElementById(a);
if (c) {
if (c.checked == true) {
c.value = b
} else {
c.value = ""
}
}
}
function recAddToPage() {
if (ge("txt_1_value1").value != "") {
if (window.location.href.toLowerCase().indexOf("default_result.aspx") > 0) {
recResource.GetResourceInfoToIDH(ge("txt_1_value1").value, "LeftGroupContent", 1, true)
}
}
}
function SubmitKey() {
if (ge("txt_1_value1") != null) {
var c = ge("txt_1_value1").value;
var b = new RegExp("[\\|/]","g");
c = c.replace(b, " ")
}
var a = ge("btnSearch");
if (a && ispost == false) {
a.click()
}
}
function checkCEExtension(b) {
var a = "";
if (b.checked == true) {
a = "xls"
}
for (i = 1; 10 > i; i++) {
FillValue("txt_" + i + "_extension", a)
}
}
function checkCEExtensionR(b) {
SetCEExtension(b);
var a = "";
if (b.checked == true) {
a = b.value
}
FillValue("CKB_extension", a);
FillValue("txt_1_extension", a)
}
function SetCEExtension(a) {
if (a.checked == true) {
if (a.id == "txt_extensionCKB") {
ge("txt_extensionCKB_R").checked = false
} else {
ge("txt_extensionCKB").checked = false
}
}
}
function clearAllMarks(a) {
if (!a) {
a = document.forms[0]
}
if (a) {
var b = a.elements;
for (i = 0; i < b.length; i++) {
if (b[i].type == "checkbox" && b[i].name == "FileNameS") {
b[i].checked = false
}
}
}
setCookie("FileNameS", "cnki:")
}
function selectall() {
var e = document.forms[0];
var g = e.selectbox;
clearall();
var c = ge("AllFirstFloorNaviCode");
var b = "";
for (var d = 0; d < g.length; d++) {
if (g[d].className == "navi_firstfloor") {
g[d].checked = true;
if (c) {
b += g[d].value + ","
}
}
}
if (b.length > 0) {
var a = b.substring(b.length - 1, b.length);
if (a == ",") {
b = b.substring(0, b.length - 1)
}
c.value = b
}
}
function clearall() {
var b = document.forms[0];
var c = b.selectbox;
for (var a = 0; a < c.length; a++) {
c[a].checked = false
}
}
function GetResultFrame() {
return ge("iframeResult")
}
var iframeids = ["iframeResult"];
var iframehide = "no";
function dyniframesize(b) {
var a = new Array();
for (i = 0; i < iframeids.length; i++) {
if (document.getElementById) {
a[a.length] = ge(iframeids[i]);
if (a[i] && !window.opera) {
a[i].style.display = "block";
a[i].height = b
}
}
if ((document.all || document.getElementById) && iframehide == "no") {
var c = document.all ? document.all[iframeids[i]] : ge(iframeids[i]);
if (c) {
c.style.display = "block"
}
}
}
}
function getJavaScript(d) {
var c, b;
b = [];
var a = /