function getViewSizeWithoutScrollbar() {
return {
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight
}
}
function getViewSizeWithScrollbar() {
return window.innerWidth ? {
width: window.innerWidth,
height: window.innerHeight
} : document.documentElement.offsetWidth == document.documentElement.clientWidth ? {
width: document.documentElement.offsetWidth,
height: document.documentElement.offsetHeight
} : {
width: document.documentElement.clientWidth + getScrollWith(),
height: document.documentElement.clientHeight + getScrollWith()
}
}
function getScrollWith() {
var n = setAttributes(document.createElement("div"), {
style: {
width: "200px",
height: "200px",
overflow: "auto",
position: "absolute",
visibility: "hidden"
}
}), t = setAttributes(document.createElement("div"), {
style: {
width: "100px",
height: "2000px"
}
}), i;
return document.body.appendChild(n),
n.appendChild(t),
i = n.offsetWidth - n.clientWidth,
document.body.removeChild(n),
n = null,
t = null,
i
}
function setAttributes(n, t) {
for (var i in t)
typeof t[i] == "string" ? n[i] = t[i] : (n[i] || (n[i] = {}),
setAttributes(n[i], t[i]));
return n
}
function getEvent() {
var t, n;
if (window.event)
return window.event;
for (t = getEvent.caller; t != null; ) {
if (n = t.arguments[0],
n && (n.constructor == Event || n.constructor == MouseEvent || typeof n == "object" && n.preventDefault && n.stopPropagation))
return n;
t = t.caller
}
return null
}
function getElement(n) {
if (n)
return n.target || n.srcElement;
throw "Event is undefined!";
}
function stopPropagation(n) {
n && n.stopPropagation ? n.stopPropagation() : window.event.cancelBubble = !0
}
function preventDefault(n) {
return n && n.preventDefault ? n.preventDefault() : window.event.returnValue = !1,
!1
}
function requestFullScreen() {
var n = document.documentElement;
n.requestFullscreen ? n.requestFullscreen() : n.mozRequestFullScreen ? n.mozRequestFullScreen() : n.webkitRequestFullScreen && n.webkitRequestFullScreen()
}
function cancelFullscreen() {
var n = document;
n.exitFullscreen ? n.exitFullscreen() : n.mozCancelFullScreen ? n.mozCancelFullScreen() : n.webkitCancelFullScreen && n.webkitCancelFullScreen()
}
function obj$(n) {
return document.getElementById(n)
}
function val$(n) {
var t = document.getElementById(n);
return t !== null ? t.value : null
}
$(function() {
$("a[id^=changeskin]").on("click", function(n) {
var r = $(this), t, i;
n.preventDefault();
n.stopPropagation();
t = r.attr("id");
i = t.match(/\d+/)[0];
$.post("/PageSetting/set_pageskin_cookie", {
skinNum: i
}, function() {
top.document.location.reload()
}).error(function(n) {
alert(n)
})
});
var n = new RegExp("^/|([a-z]+:)|#","i");
$("a").each(function() {
$(this).attr("href") && !n.test($(this).attr("href")) && window.console && window.console.log && console.log($(this).get(0))
})
}),
function(n) {
n.extend({
format: function(n) {
var t, r, u, i, f;
if (arguments.length > 1) {
if (t = arguments[0],
arguments.length == 2 && typeof arguments[0] == "string" && typeof arguments[1] == "object") {
r = arguments[1];
for (u in r)
r[u] != undefined && (f = new RegExp("({ *" + u + " *})","g"),
t = t.replace(f, r[u]))
} else
for (i = 1; i < arguments.length; i++)
arguments[i] != undefined && (f = new RegExp("({ *[" + (i - 1) + "] *})","g"),
t = t.replace(f, arguments[i]));
return t
}
return n
},
startWith: function(n) {
n = n.replace(/([\(\)\[\]\{\}\.\+\*\^\$])/g, "\\$1");
var t = new RegExp("^" + n);
return t.test(this)
},
genaralGuid: function() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gi, function(n) {
var t = Math.random() * 16 | 0
, i = n == "x" ? t : t & 3 | 8;
return i.toString(16)
})
},
convertGB2312ToUnicode: {
toUnicode: function(n) {
return escape(n).toLocaleLowerCase().replace(/%u/gi, "\\u")
},
toGB2312: function(n) {
return unescape(n.replace(/\\u/gi, "%u"))
}
}
});
n.fn.newGuid = function() {
var t = n.genaralGuid();
return arguments[0] && (t = t.toUpperCase()),
this.val(t),
this
}
;
n.fn.goTop = function() {
var t = this
, i = function() {
(document.documentElement.scrollTop || document.body.scrollTop) > 0 ? (n(".g-hd").css("opacity", ".95"),
t.show()) : (n(".g-hd").css("opacity", "1"),
t.hide())
};
return this && (window.onscroll = function() {
i()
}
,
window.onresize = function() {
i()
}
),
this.click(function(t) {
t.preventDefault();
var i = document.body.scrollTop || 300;
i > 300 && (i = 300);
n("body,html").animate({
scrollTop: 0
}, 2 * i)
}),
this
}
}(jQuery),
function(n) {
n.fn.helptips = function() {
return this.each(function() {
var i, n, t;
$(this).find("img").length == 0 && $(this).append($(''));
$(this).find(".tips-cinfo-show").length == 0 && $(this).append($('