var PostUrl = window.encodeURI("http://cms.msdi.cn:8060/CMS/Article/FrontArticleNew?id=#catalogid#");
// var loginLink = window.encodeURI("http://zny.msdi.cn/SignOnServlet?FromUrl=" + window.location.href);
// var logoutLink = window.encodeURI("http://zny.msdi.cn/logout?redirectTo=" + window.location.href);
var loginLink = window.encodeURI("http://cms.msdi.cn/Login.aspx?FromUrl=" + encodeURIComponent(window.location.href));
var logoutLink = "http://cms.msdi.cn/PowerChinaSsoLogout.aspx?redirectTo=" + encodeURIComponent(window.location.pathname);
var host = window.encodeURI("https://www.msdi.cn/main/");
var MsdiSubmissionUrl = window.encodeURI("http://cms.msdi.cn:8060/CMS/Article/MsdiSubmission?id=#catalogid#");
var selfInfoLink = window.encodeURI("http://yrz.msdi.cn/apphub/");
var portalLink = window.encodeURI("http://oa.msdi.cn/?s=jcmh");
var mailLink = window.encodeURI("http://oa.msdi.cn/QYWeChat/MailSso");
//var PostUrl = window.encodeURI("http://test.oac.znsw.com.cn/CMS/Article/FrontArticleNew?id=#catalogid#");
//var loginLink = window.encodeURI("http://r1soa.msdi.cn:9080/r1/SignOnServlet?FromUrl=" + window.location.href);
//var logoutLink = window.encodeURI("http://r1soa.msdi.cn:9080/r1/logout?redirectTo=" + window.location.href);
//var host = window.encodeURI("https://www.msdi.cn/main/");
var cfgSiteDomain
if (document.domain.match(/.+\.(com|net|gov|org)\.(cn|hk|us|jp)$/)) {
cfgSiteDomain = document.domain.replace(/^.*?([^\.]+\.[^\.]+\.[^.]+)$/g, "$1")
} else {
cfgSiteDomain = document.domain.replace(/^.*?([^\.]+\.[^.]+)$/g, "$1")
}
var cfgAjaxProxy = "/_system/process.ashx"
//-------------------------------------- 浏览器检测 --------------------------------------------
var Browser = {
isIE: (navigator.appVersion.indexOf("MSIE") != -1),
isIE6: (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE"), 10).replace(/[^\d.]/g, "").indexOf("6.") != -1),
isIE7: (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE"), 10).replace(/[^\d.]/g, "").indexOf("7.") != -1),
isIE8: (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE"), 10).replace(/[^\d.]/g, "").indexOf("8.") != -1),
isIE9: (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE"), 10).replace(/[^\d.]/g, "").indexOf("9.") != -1),
isOpera: navigator.userAgent.indexOf("Opera") != -1,
isSafari: navigator.appVersion.indexOf("Safari") != -1 && navigator.userAgent.indexOf("Chrome") == -1,
isFirefox: navigator.userAgent.indexOf("Firefox") != -1,
isCamino: navigator.userAgent.indexOf("Camino") != -1,
isChrome: navigator.userAgent.indexOf("Chrome") != -1,
isMozilla: navigator.userAgent.indexOf("Gecko/") != -1
}
if (Browser.isIE6) document.execCommand("BackgroundImageCache", false, true)
if (Browser.isIE) {
(function () {
if (! /*@cc_on!@*/ 0) return;
var e = "abbr,article,aside,audio,canvas,datalist,details,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),
i = e.length;
while (i--) {
document.createElement(e[i])
}
})()
}
//--------------------------------------- 扩展对象 ---------------------------------------------
String.prototype.toTrim = function () {
return this.replace(/^\s+|\s+$/g, "")
}
String.prototype.toNumber = function () {
var n = this.match(/\d+/)
if (n) return parseInt(n, 10)
else return 0
}
String.prototype.toDate = function () {
var d = this.split(/\D+/)
if (d[1]) d[1]--
d = eval("new Date(" + d.join(",") + ")")
if (isNaN(d)) d = new Date()
return d
}
String.prototype.toHTML = function () {
return this.htmlFilter().replace(/\r\n|\r|\n/g, "
").replace(/\s/g, " ")
}
String.prototype.toAttribute = function () {
return this.htmlFilter().replace(/\r\n|\r|\n/g, "
").replace(/\s/g, " ")
}
String.prototype.removeBlank = function () {
return this.replace(/^[\s ]*/mg, "").replace(/[\s ]*$/mg, "").replace(/^[\s ]*$/mg, "")
}
String.prototype.toContent = function () {
return this.removeBlank().htmlFilter().replace(/^([^\r\n]+)/mg, "
$1
").replace(/\r\n|\r|\n/g, "").replace(/\s/g, " ") } String.prototype.htmlFilter = function () { return this.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """) } String.prototype.toURL = function () { return encodeURIComponent(this) } String.prototype.fromURL = function () { return decodeURIComponent(this) } String.prototype.toURLAnsi = function () { return escape(this) } String.prototype.toSafeString = function () { return this.replace(/\\/g, "\\\\").replace(/\r\n|\r|\n/g, "\\r\\n").replace(/"/g, "\\\"").replace(/'/g, "\\'").replace(/\bscript\b/ig, "\\x73cript") } String.prototype.toSafeContent = function () { return this.replace(/<\/*a[^>]*>/ig, "").replace(/