#1 JavaScript::Eval (size: 47725) - SHA256: 9e6b561b37b3ab69819c94c1bfcf4a9cd899ab75433e79a59103e9a38d0ec8e0
(function() {
var e = window.K;
this._win = window;
this._doc = document;
this.slice = Array.prototype.slice;
this._head = document.getElementsByTagName("head")[0];
var g = this.K = this._K = this.Koala = function(l) {
if (g.C.isKdom(l)) {
return l
}
if (g.C.isfun(l)) {
g.ready(l);
return
}
var m = g.C.node(arguments.length > 0 ? l : _win);
if (m) {
var k = new f(m);
k.toString = function() {
return "Kdom"
};
return k
}
return new h(l)
};
(function(k) {
var m = this.KK = function() {
var n = l(arguments).join(", ");
return g.Selector.select(n, document)
};
var l = this.KA = function(p) {
if (!p) {
return []
}
if ("toArray" in Object(p)) {
return p.toArray()
}
var o = p.length || 0,
n = new Array(o);
while (o--) {
n[o] = p[o]
}
return n
};
m.doms = function(p, q, o) {
if (arguments.length > 1) {
a = arguments
} else {
if (g.C.isKdoms(p)) {
return p
} else {
if (g.C.isarr(p) || g.C.isDoms(p)) {
a = p
} else {
if (g.C.isstr(p)) {
a = /^n:(\w+)$/.test(p) ? _doc.getElementsByName(RegExp.$1) : _doc.getElementsByTagName(p)
}
}
}
}
if (p && p.length > 0) {
var n = new b(a, q);
if (n.len == 1) {
return g(n.item(0))
} else {
return n
}
}
return new h(o)
};
g.id = function(n) {
return document.getElementById(n)
};
g.noConflict = function() {
if (g.id) {
window.K = e
}
return _K
};
(function() {
var x = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
y = 0,
B = Object.prototype.toString,
s = false,
r = true,
z = /\\/g,
G = /\W/;
[0, 0].sort(function() {
r = false;
return 0
});
var p = function(M, H, P, Q) {
P = P || [];
H = H || document;
var S = H;
if (H.nodeType !== 1 && H.nodeType !== 9) {
return []
}
if (!M || typeof M !== "string") {
return P
}
var J, U, X, I, T, W, V, O, L = true,
K = p.isXML(H),
N = [],
R = M;
do {
x.exec("");
J = x.exec(R);
if (J) {
R = J[3];
N.push(J[1]);
if (J[2]) {
I = J[3];
break
}
}
} while (J);
if (N.length > 1 && t.exec(M)) {
if (N.length === 2 && u.relative[N[0]]) {
U = C(N[0] + N[1], H)
} else {
U = u.relative[N[0]] ? [H] : p(N.shift(), H);
while (N.length) {
M = N.shift();
if (u.relative[M]) {
M += N.shift()
}
U = C(M, U)
}
}
} else {
if (!Q && N.length > 1 && H.nodeType === 9 && !K && u.match.ID.test(N[0]) && !u.match.ID.test(N[N.length - 1])) {
T = p.find(N.shift(), H, K);
H = T.expr ? p.filter(T.expr, T.set)[0] : T.set[0]
}
if (H) {
T = Q ? {
expr: N.pop(),
set: v(Q)
} : p.find(N.pop(), N.length === 1 && (N[0] === "~" || N[0] === "+") && H.parentNode ? H.parentNode : H, K);
U = T.expr ? p.filter(T.expr, T.set) : T.set;
if (N.length > 0) {
X = v(U)
} else {
L = false
}
while (N.length) {
W = N.pop();
V = W;
if (!u.relative[W]) {
W = ""
} else {
V = N.pop()
}
if (V == null) {
V = H
}
u.relative[W](X, V, K)
}
} else {
X = N = []
}
}
if (!X) {
X = U
}
if (!X) {
p.error(W || M)
}
if (B.call(X) === "[object Array]") {
if (!L) {
P.push.apply(P, X)
} else {
if (H && H.nodeType === 1) {
for (O = 0; X[O] != null; O++) {
if (X[O] && (X[O] === true || X[O].nodeType === 1 && p.contains(H, X[O]))) {
P.push(U[O])
}
}
} else {
for (O = 0; X[O] != null; O++) {
if (X[O] && X[O].nodeType === 1) {
P.push(U[O])
}
}
}
}
} else {
v(X, P)
}
if (I) {
p(I, S, P, Q);
p.uniqueSort(P)
}
return P
};
p.uniqueSort = function(I) {
if (A) {
s = r;
I.sort(A);
if (s) {
for (var H = 1; H < I.length; H++) {
if (I[H] === I[H - 1]) {
I.splice(H--, 1)
}
}
}
}
return I
};
p.matches = function(H, I) {
return p(H, null, null, I)
};
p.matchesSelector = function(H, I) {
return p(I, null, null, [H]).length > 0
};
p.find = function(O, H, P) {
var N;
if (!O) {
return []
}
for (var K = 0, J = u.order.length; K < J; K++) {
var L, M = u.order[K];
if ((L = u.leftMatch[M].exec(O))) {
var I = L[1];
L.splice(1, 1);
if (I.substr(I.length - 1) !== "\\") {
L[1] = (L[1] || "").replace(z, "");
N = u.find[M](L, H, P);
if (N != null) {
O = O.replace(u.match[M], "");
break
}
}
}
}
if (!N) {
N = typeof H.getElementsByTagName !== "undefined" ? H.getElementsByTagName("*") : []
}
return {set: N,
expr: O
}
};
p.filter = function(S, R, V, L) {
var N, H, J = S,
X = [],
P = R,
O = R && R[0] && p.isXML(R[0]);
while (S && R.length) {
for (var Q in u.filter) {
if ((N = u.leftMatch[Q].exec(S)) != null && N[2]) {
var W, U, I = u.filter[Q],
K = N[1];
H = false;
N.splice(1, 1);
if (K.substr(K.length - 1) === "\\") {
continue
}
if (P === X) {
X = []
}
if (u.preFilter[Q]) {
N = u.preFilter[Q](N, P, V, X, L, O);
if (!N) {
H = W = true
} else {
if (N === true) {
continue
}
}
}
if (N) {
for (var M = 0;
(U = P[M]) != null; M++) {
if (U) {
W = I(U, N, M, P);
var T = L ^ !!W;
if (V && W != null) {
if (T) {
H = true
} else {
P[M] = false
}
} else {
if (T) {
X.push(U);
H = true
}
}
}
}
}
if (W !== undefined) {
if (!V) {
P = X
}
S = S.replace(u.match[Q], "");
if (!H) {
return []
}
break
}
}
}
if (S === J) {
if (H == null) {
p.error(S)
} else {
break
}
}
J = S
}
return P
};
p.error = function(H) {
throw "Syntax error, unrecognized expression: " + H
};
var u = p.selectors = {
order: ["ID", "NAME", "TAG"],
match: {
ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
leftMatch: {},
attrMap: {
"class": "className",
"for": "htmlFor"
},
attrHandle: {
href: function(H) {
return H.getAttribute("href")
},
type: function(H) {
return H.getAttribute("type")
}
},
relative: {
"+": function(N, I) {
var K = typeof I === "string",
M = K && !G.test(I),
O = K && !M;
if (M) {
I = I.toLowerCase()
}
for (var J = 0, H = N.length, L; J < H; J++) {
if ((L = N[J])) {
while ((L = L.previousSibling) && L.nodeType !== 1) {}
N[J] = O || L && L.nodeName.toLowerCase() === I ? L || false : L === I
}
}
if (O) {
p.filter(I, N, true)
}
},
">": function(N, I) {
var M, L = typeof I === "string",
J = 0,
H = N.length;
if (L && !G.test(I)) {
I = I.toLowerCase();
for (; J < H; J++) {
M = N[J];
if (M) {
var K = M.parentNode;
N[J] = K.nodeName.toLowerCase() === I ? K : false
}
}
} else {
for (; J < H; J++) {
M = N[J];
if (M) {
N[J] = L ? M.parentNode : M.parentNode === I
}
}
if (L) {
p.filter(I, N, true)
}
}
},
"": function(K, I, M) {
var L, J = y++,
H = D;
if (typeof I === "string" && !G.test(I)) {
I = I.toLowerCase();
L = I;
H = n
}
H("parentNode", I, J, K, L, M)
},
"~": function(K, I, M) {
var L, J = y++,
H = D;
if (typeof I === "string" && !G.test(I)) {
I = I.toLowerCase();
L = I;
H = n
}
H("previousSibling", I, J, K, L, M)
}
},
find: {
ID: function(I, J, K) {
if (typeof J.getElementById !== "undefined" && !K) {
var H = J.getElementById(I[1]);
return H && H.parentNode ? [H] : []
}
},
NAME: function(J, M) {
if (typeof M.getElementsByName !== "undefined") {
var I = [],
L = M.getElementsByName(J[1]);
for (var K = 0, H = L.length; K < H; K++) {
if (L[K].getAttribute("name") === J[1]) {
I.push(L[K])
}
}
return I.length === 0 ? null : I
}
},
TAG: function(H, I) {
if (typeof I.getElementsByTagName !== "undefined") {
return I.getElementsByTagName(H[1])
}
}
},
preFilter: {
CLASS: function(K, I, J, H, N, O) {
K = " " + K[1].replace(z, "") + " ";
if (O) {
return K
}
for (var L = 0, M;
(M = I[L]) != null; L++) {
if (M) {
if (N ^ (M.className && (" " + M.className + " ").replace(/[\t\n\r]/g, " ").indexOf(K) >= 0)) {
if (!J) {
H.push(M)
}
} else {
if (J) {
I[L] = false
}
}
}
}
return false
},
ID: function(H) {
return H[1].replace(z, "")
},
TAG: function(I, H) {
return I[1].replace(z, "").toLowerCase()
},
CHILD: function(H) {
if (H[1] === "nth") {
if (!H[2]) {
p.error(H[0])
}
H[2] = H[2].replace(/^\+|\s*/g, "");
var I = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(H[2] === "even" && "2n" || H[2] === "odd" && "2n+1" || !/\D/.test(H[2]) && "0n+" + H[2] || H[2]);
H[2] = (I[1] + (I[2] || 1)) - 0;
H[3] = I[3] - 0
} else {
if (H[2]) {
p.error(H[0])
}
}
H[0] = y++;
return H
},
ATTR: function(L, I, J, H, M, N) {
var K = L[1] = L[1].replace(z, "");
if (!N && u.attrMap[K]) {
L[1] = u.attrMap[K]
}
L[4] = (L[4] || L[5] || "").replace(z, "");
if (L[2] === "~=") {
L[4] = " " + L[4] + " "
}
return L
},
PSEUDO: function(L, I, J, H, M) {
if (L[1] === "not") {
if ((x.exec(L[3]) || "").length > 1 || /^\w/.test(L[3])) {
L[3] = p(L[3], null, null, I)
} else {
var K = p.filter(L[3], I, J, true ^ M);
if (!J) {
H.push.apply(H, K)
}
return false
}
} else {
if (u.match.POS.test(L[0]) || u.match.CHILD.test(L[0])) {
return true
}
}
return L
},
POS: function(H) {
H.unshift(true);
return H
}
},
filters: {
enabled: function(H) {
return H.disabled === false && H.type !== "hidden"
},
disabled: function(H) {
return H.disabled === true
},
checked: function(H) {
return H.checked === true
},
selected: function(H) {
if (H.parentNode) {
H.parentNode.selectedIndex
}
return H.selected === true
},
parent: function(H) {
return !!H.firstChild
},
empty: function(H) {
return !H.firstChild
},
has: function(J, I, H) {
return !!p(H[3], J).length
},
header: function(H) {
return (/h\d/i).test(H.nodeName)
},
text: function(J) {
var H = J.getAttribute("type"),
I = J.type;
return J.nodeName.toLowerCase() === "input" && "text" === I && (H === I || H === null)
},
radio: function(H) {
return H.nodeName.toLowerCase() === "input" && "radio" === H.type
},
checkbox: function(H) {
return H.nodeName.toLowerCase() === "input" && "checkbox" === H.type
},
file: function(H) {
return H.nodeName.toLowerCase() === "input" && "file" === H.type
},
password: function(H) {
return H.nodeName.toLowerCase() === "input" && "password" === H.type
},
submit: function(I) {
var H = I.nodeName.toLowerCase();
return (H === "input" || H === "button") && "submit" === I.type
},
image: function(H) {
return H.nodeName.toLowerCase() === "input" && "image" === H.type
},
reset: function(I) {
var H = I.nodeName.toLowerCase();
return (H === "input" || H === "button") && "reset" === I.type
},
button: function(I) {
var H = I.nodeName.toLowerCase();
return H === "input" && "button" === I.type || H === "button"
},
input: function(H) {
return (/input|select|textarea|button/i).test(H.nodeName)
},
focus: function(H) {
return H === H.ownerDocument.activeElement
}
},
setFilters: {
first: function(I, H) {
return H === 0
},
last: function(J, I, H, K) {
return I === K.length - 1
},
even: function(I, H) {
return H % 2 === 0
},
odd: function(I, H) {
return H % 2 === 1
},
lt: function(J, I, H) {
return I < H[3] - 0
},
gt: function(J, I, H) {
return I > H[3] - 0
},
nth: function(J, I, H) {
return H[3] - 0 === I
},
eq: function(J, I, H) {
return H[3] - 0 === I
}
},
filter: {
PSEUDO: function(J, O, N, P) {
var H = O[1],
I = u.filters[H];
if (I) {
return I(J, N, O, P)
} else {
if (H === "contains") {
return (J.textContent || J.innerText || p.getText([J]) || "").indexOf(O[3]) >= 0
} else {
if (H === "not") {
var K = O[3];
for (var M = 0, L = K.length; M < L; M++) {
if (K[M] === J) {
return false
}
}
return true
} else {
p.error(H)
}
}
}
},
CHILD: function(H, K) {
var N = K[1],
I = H;
switch (N) {
case "only":
case "first":
while ((I = I.previousSibling)) {
if (I.nodeType === 1) {
return false
}
}
if (N === "first") {
return true
}
I = H;
case "last":
while ((I = I.nextSibling)) {
if (I.nodeType === 1) {
return false
}
}
return true;
case "nth":
var J = K[2],
Q = K[3];
if (J === 1 && Q === 0) {
return true
}
var M = K[0],
P = H.parentNode;
if (P && (P.sizcache !== M || !H.nodeIndex)) {
var L = 0;
for (I = P.firstChild; I; I = I.nextSibling) {
if (I.nodeType === 1) {
I.nodeIndex = ++L
}
}
P.sizcache = M
}
var O = H.nodeIndex - Q;
if (J === 0) {
return O === 0
} else {
return (O % J === 0 && O / J >= 0)
}
}
},
ID: function(I, H) {
return I.nodeType === 1 && I.getAttribute("id") === H
},
TAG: function(I, H) {
return (H === "*" && I.nodeType === 1) || I.nodeName.toLowerCase() === H
},
CLASS: function(I, H) {
return (" " + (I.className || I.getAttribute("class")) + " ").indexOf(H) > -1
},
ATTR: function(M, K) {
var J = K[1],
H = u.attrHandle[J] ? u.attrHandle[J](M) : M[J] != null ? M[J] : M.getAttribute(J),
N = H + "",
L = K[2],
I = K[4];
return H == null ? L === "!=" : L === "=" ? N === I : L === "*=" ? N.indexOf(I) >= 0 : L === "~=" ? (" " + N + " ").indexOf(I) >= 0 : !I ? N && H !== false : L === "!=" ? N !== I : L === "^=" ? N.indexOf(I) === 0 : L === "$=" ? N.substr(N.length - I.length) === I : L === "|=" ? N === I || N.substr(0, I.length + 1) === I + "-" : false
},
POS: function(L, I, J, M) {
var H = I[2],
K = u.setFilters[H];
if (K) {
return K(L, J, I, M)
}
}
}
};
var t = u.match.POS,
o = function(I, H) {
return "\\" + (H - 0 + 1)
};
for (var q in u.match) {
u.match[q] = new RegExp(u.match[q].source + (/(?![^\[]*\])(?![^\(]*\))/.source));
u.leftMatch[q] = new RegExp(/(^(?:.|\r|\n)*?)/.source + u.match[q].source.replace(/\\(\d+)/g, o))
}
var v = function(I, H) {
I = Array.prototype.slice.call(I, 0);
if (H) {
H.push.apply(H, I);
return H
}
return I
};
try {
Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType
} catch (E) {
v = function(L, K) {
var J = 0,
I = K || [];
if (B.call(L) === "[object Array]") {
Array.prototype.push.apply(I, L)
} else {
if (typeof L.length === "number") {
for (var H = L.length; J < H; J++) {
I.push(L[J])
}
} else {
for (; L[J]; J++) {
I.push(L[J])
}
}
}
return I
}
}
var A, w;
if (document.documentElement.compareDocumentPosition) {
A = function(I, H) {
if (I === H) {
s = true;
return 0
}
if (!I.compareDocumentPosition || !H.compareDocumentPosition) {
return I.compareDocumentPosition ? -1 : 1
}
return I.compareDocumentPosition(H) & 4 ? -1 : 1
}
} else {
A = function(P, O) {
if (P === O) {
s = true;
return 0
} else {
if (P.sourceIndex && O.sourceIndex) {
return P.sourceIndex - O.sourceIndex
}
}
var M, I, J = [],
H = [],
L = P.parentNode,
N = O.parentNode,
Q = L;
if (L === N) {
return w(P, O)
} else {
if (!L) {
return -1
} else {
if (!N) {
return 1
}
}
}
while (Q) {
J.unshift(Q);
Q = Q.parentNode
}
Q = N;
while (Q) {
H.unshift(Q);
Q = Q.parentNode
}
M = J.length;
I = H.length;
for (var K = 0; K < M && K < I; K++) {
if (J[K] !== H[K]) {
return w(J[K], H[K])
}
}
return K === M ? w(P, H[K], -1) : w(J[K], O, 1)
};
w = function(I, H, J) {
if (I === H) {
return J
}
var K = I.nextSibling;
while (K) {
if (K === H) {
return -1
}
K = K.nextSibling
}
return 1
}
}
p.getText = function(H) {
var I = "",
K;
for (var J = 0; H[J]; J++) {
K = H[J];
if (K.nodeType === 3 || K.nodeType === 4) {
I += K.nodeValue
} else {
if (K.nodeType !== 8) {
I += p.getText(K.childNodes)
}
}
}
return I
};
(function() {
var I = document.createElement("div"),
J = "script" + (new Date()).getTime(),
H = document.documentElement;
I.innerHTML = "<a name='" + J + "'/>";
H.insertBefore(I, H.firstChild);
if (document.getElementById(J)) {
u.find.ID = function(L, M, N) {
if (typeof M.getElementById !== "undefined" && !N) {
var K = M.getElementById(L[1]);
return K ? K.id === L[1] || typeof K.getAttributeNode !== "undefined" && K.getAttributeNode("id").nodeValue === L[1] ? [K] : undefined : []
}
};
u.filter.ID = function(M, K) {
var L = typeof M.getAttributeNode !== "undefined" && M.getAttributeNode("id");
return M.nodeType === 1 && L && L.nodeValue === K
}
}
H.removeChild(I);
H = I = null
})();
(function() {
var H = document.createElement("div");
H.appendChild(document.createComment(""));
if (H.getElementsByTagName("*").length > 0) {
u.find.TAG = function(I, M) {
var L = M.getElementsByTagName(I[1]);
if (I[1] === "*") {
var K = [];
for (var J = 0; L[J]; J++) {
if (L[J].nodeType === 1) {
K.push(L[J])
}
}
L = K
}
return L
}
}
H.innerHTML = "<a href='#'></a>";
if (H.firstChild && typeof H.firstChild.getAttribute !== "undefined" && H.firstChild.getAttribute("href") !== "#") {
u.attrHandle.href = function(I) {
return I.getAttribute("href", 2)
}
}
H = null
})();
if (document.querySelectorAll) {
(function() {
var H = p,
K = document.createElement("div"),
J = "__sizzle__";
K.innerHTML = "<p class='TEST'></p>";
if (K.querySelectorAll && K.querySelectorAll(".TEST").length === 0) {
return
}
p = function(V, M, Q, U) {
M = M || document;
if (!U && !p.isXML(M)) {
var T = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(V);
if (T && (M.nodeType === 1 || M.nodeType === 9)) {
if (T[1]) {
return v(M.getElementsByTagName(V), Q)
} else {
if (T[2] && u.find.CLASS && M.getElementsByClassName) {
return v(M.getElementsByClassName(T[2]), Q)
}
}
}
if (M.nodeType === 9) {
if (V === "body" && M.body) {
return v([M.body], Q)
} else {
if (T && T[3]) {
var P = M.getElementById(T[3]);
if (P && P.parentNode) {
if (P.id === T[3]) {
return v([P], Q)
}
} else {
return v([], Q)
}
}
}
try {
return v(M.querySelectorAll(V), Q)
} catch (R) {}
} else {
if (M.nodeType === 1 && M.nodeName.toLowerCase() !== "object") {
var N = M,
O = M.getAttribute("id"),
L = O || J,
X = M.parentNode,
W = /^\s*[+~]/.test(V);
if (!O) {
M.setAttribute("id", L)
} else {
L = L.replace(/'/g, "\\$&")
}
if (W && X) {
M = M.parentNode
}
try {
if (!W || X) {
return v(M.querySelectorAll("[id='" + L + "'] " + V), Q)
}
} catch (S) {} finally {
if (!O) {
N.removeAttribute("id")
}
}
}
}
}
return H(V, M, Q, U)
};
for (var I in H) {
p[I] = H[I]
}
K = null
})()
}(function() {
var H = document.documentElement,
J = H.matchesSelector || H.mozMatchesSelector || H.webkitMatchesSelector || H.msMatchesSelector;
if (J) {
var L = !J.call(document.createElement("div"), "div"),
I = false;
try {
J.call(document.documentElement, "[test!='']:sizzle")
} catch (K) {
I = true
}
p.matchesSelector = function(N, P) {
P = P.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if (!p.isXML(N)) {
try {
if (I || !u.match.PSEUDO.test(P) && !/!=/.test(P)) {
var M = J.call(N, P);
if (M || !L || N.document && N.document.nodeType !== 11) {
return M
}
}
} catch (O) {}
}
return p(P, null, null, [N]).length > 0
}
}
})();
(function() {
var H = document.createElement("div");
H.innerHTML = "<div class='test e'></div><div class='test'></div>";
if (!H.getElementsByClassName || H.getElementsByClassName("e").length === 0) {
return
}
H.lastChild.className = "e";
if (H.getElementsByClassName("e").length === 1) {
return
}
u.order.splice(1, 0, "CLASS");
u.find.CLASS = function(I, J, K) {
if (typeof J.getElementsByClassName !== "undefined" && !K) {
return J.getElementsByClassName(I[1])
}
};
H = null
})();
function n(I, N, M, Q, O, P) {
for (var K = 0, J = Q.length; K < J; K++) {
var H = Q[K];
if (H) {
var L = false;
H = H[I];
while (H) {
if (H.sizcache === M) {
L = Q[H.sizset];
break
}
if (H.nodeType === 1 && !P) {
H.sizcache = M;
H.sizset = K
}
if (H.nodeName.toLowerCase() === N) {
L = H;
break
}
H = H[I]
}
Q[K] = L
}
}
}
function D(I, N, M, Q, O, P) {
for (var K = 0, J = Q.length; K < J; K++) {
var H = Q[K];
if (H) {
var L = false;
H = H[I];
while (H) {
if (H.sizcache === M) {
L = Q[H.sizset];
break
}
if (H.nodeType === 1) {
if (!P) {
H.sizcache = M;
H.sizset = K
}
if (typeof N !== "string") {
if (H === N) {
L = true;
break
}
} else {
if (p.filter(N, [H]).length > 0) {
L = H;
break
}
}
}
H = H[I]
}
Q[K] = L
}
}
}
if (document.documentElement.contains) {
p.contains = function(I, H) {
return I !== H && (I.contains ? I.contains(H) : true)
}
} else {
if (document.documentElement.compareDocumentPosition) {
p.contains = function(I, H) {
return !!(I.compareDocumentPosition(H) & 16)
}
} else {
p.contains = function() {
return false
}
}
}
p.isXML = function(H) {
var I = (H ? H.ownerDocument || H : 0).documentElement;
return I ? I.nodeName !== "HTML" : false
};
var C = function(H, O) {
var M, K = [],
L = "",
J = O.nodeType ? [O] : O;
while ((M = u.match.PSEUDO.exec(H))) {
L += M[0];
H = H.replace(u.match.PSEUDO, "")
}
H = u.relative[H] ? H + "*" : H;
for (var N = 0, I = J.length; N < I; N++) {
p(H, J[N], K)
}
return p.filter(L, K)
};
window.Sizzle = p;
return
})();
g._original_property = this.Sizzle;
g.Selector = (function(p) {
function q(w, x, t) {
t = t || 0;
var s = g.Selector.match,
v = w.length,
r = 0,
u;
for (u = 0; u < v; u++) {
if (s(w[u], x) && t == r++) {
return g(w[u])
}
}
}
function n(r, s, t) {
return m.doms(p(r, s || document), t, r)
}
function o(s, r) {
return p.matches(r, [s]).length == 1
}
return {
select: n,
match: o,
find: q
}
})(Sizzle);
this.Sizzle = g._original_property;
delete g._original_property
})();
(function() {
var s = g.typeOf = function(w) {
if (w == null) {
return "null"
}
if (typeof w) {
if (w.Kfamily) {
return w.Kfamily()
}
}
if (w.nodeName) {
if (w.nodeType == 1) {
return "element"
}
if (w.nodeType == 3) {
return (/\S/).test(w.nodeValue) ? "textnode" : "whitespace"
}
} else {
if (typeof w.length == "number") {
if (w.callee) {
return "arguments"
}
if ("item" in w) {
return "collection"
}
}
}
return typeof w
};
var m = g.instanceOf = function(y, w) {
if (y == null) {
return false
}
var x = y.$constructor || y.constructor;
while (x) {
if (x === w) {
return true
}
x = x.parent
}
return y instanceof w
};
var l = this.Function;
var t = true;
for (var n in {
toString: 1
}) {
t = null
}
if (t) {
t = ["hasOwnProperty", "valueOf", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "constructor"]
}
l.prototype.KoverloadSetter = function(x) {
var w = this;
return function(z, y) {
if (z == null) {
return this
}
if (x || typeof z != "string") {
for (var A in z) {
w.call(this, A, z[A])
}
if (t) {
for (var B = t.length; B--;) {
A = t[B];
if (z.hasOwnProperty(A)) {
w.call(this, A, z[A])
}
}
}
} else {
w.call(this, z, y)
}
return this
}
};
l.prototype.Kextend = function(w, x) {
this[w] = x
}.KoverloadSetter();
l.prototype.Kimplement = function(w, x) {
this.prototype[w] = x
}.KoverloadSetter();
l.from = function(w) {
return (s(w) == "function") ? w : function() {
return w
}
};
var q = Array.prototype.slice;
l.Kimplement({
Khide: function() {
this.$hidden = true;
return this
},
Kprotect: function() {
this.$protected = true;
return this
}
});
var o = g.Type = function(z, y) {
if (z) {
var x = z.toLowerCase();
var w = function(A) {
return (s(A) == x)
};
o["is" + z] = w;
if (y != null) {
y.prototype.Kfamily = (function() {
return x
}).Khide();
y.type = w
}
}
if (y == null) {
return null
}
y.Kextend(this);
y.$constructor = o;
y.prototype.$constructor = y;
return y
};
var k = Object.prototype.toString;
o.isEnumerable = function(w) {
return (w != null && typeof w.length == "number" && k.call(w) != "[object Function]")
};
var u = {};
var v = function(w) {
var x = s(w.prototype);
return u[x] || (u[x] = [])
};
var r = function(x, B) {
if (B && B.$hidden) {
return
}
var w = v(this);
for (var y = 0; y < w.length; y++) {
var A = w[y];
if (s(A) == "type") {
r.call(A, x, B)
} else {
A.call(this, x, B)
}
}
var z = this.prototype[x];
if (z == null || !z.$protected) {
this.prototype[x] = B
}
if (this[x] == null && s(B) == "function") {
p.call(this, x, function(C) {
return B.apply(C, q.call(arguments, 1))
})
}
};
var p = function(w, y) {
if (y && y.$hidden) {
return
}
var x = this[w];
if (x == null || !x.$protected) {
this[w] = y
}
};
o.Kimplement({
Kimplement: r.KoverloadSetter(),
extend: p.KoverloadSetter(),
alias: function(w, x) {
r.call(this, w, this.prototype[x])
}.KoverloadSetter(),
mirror: function(w) {
v(this).push(w);
return this
}
});
new o("KType", o);
RegExp.prototype.Kfamily = function() {
return "regexp"
};
Date.prototype.Kfamily = function() {
return "date"
}
})();
var d = this.KClass = g.fn = (function() {
var n = (function() {
for (var o in {
toString: 1
}) {
if (o === "toString") {
return false
}
}
return true
})();
function k() {}
function l() {
var r = null,
q = KA(arguments);
if (g.C.isFunction(q[0])) {
r = q.shift()
}
function o() {
this.init.apply(this, arguments)
}
o.prototype.Kfamily = function() {
return "KClass"
};
g.C.Kextend(o, d.Methods);
o.superclass = r;
o.subclasses = [];
if (r) {
k.prototype = r.prototype;
o.prototype = new k;
r.subclasses.push(o)
}
for (var p = 0, s = q.length; p < s; p++) {
o.addMethods(q[p])
}
if (!o.prototype.init) {
o.prototype.init = function() {}
}
o.prototype.constructor = o;
return o
}
function m(u) {
var q = this.superclass && this.superclass.prototype,
p = g.C.keys(u);
if (n) {
if (u.toString != Object.prototype.toString) {
p.push("toString")
}
if (u.valueOf != Object.prototype.valueOf) {
p.push("valueOf")
}
}
for (var o = 0, r = p.length; o < r; o++) {
var t = p[o],
s = u[t];
if (q && g.C.isFunction(s) && s.KargumentNames()[0] == "Ksuper") {
var v = s;
s = (function(w) {
return function() {
return q[w].apply(this, arguments)
}
})(t).Kwrap(v);
s.valueOf = v.valueOf.Kbind(v);
s.toString = v.toString.Kbind(v)
}
this.prototype[t] = s
}
return this
}
return {
create: l,
Methods: {
addMethods: m
}
}
})();
(function() {
g.C = g.O = {};
var J = Object.prototype.toString,
L = "Null",
N = "Undefined",
Y = "Boolean",
G = "Number",
E = "String",
X = "Object",
q = "[object Function]",
l = "[object Boolean]",
r = "[object Number]",
m = "[object String]",
k = "[object Array]",
U = "[object Date]";
function o(aa, Z) {
var ac = typeof(aa) == "object" && aa != null;
if (ac && V(Z)) {
for (var ab in obj) {
return !!Z
}
}
return ac
}
function V(Z) {
return Z !== undefined
}
function M(Z) {
return Z === undefined
}
function u(Z) {
return o(Z) && Z.nodeType === 1 && !!Z.nodeName
}
function n(Z) {
return u(Z) || Z == _win || Z == _doc
}
function I(Z) {
return o(Z) && Z.isKdom === true
}
function D(Z) {
return o(Z) && Z.isKdoms === true
}
function P(Z) {
return o(Z) && V(Z.length)
}
function W(Z) {
return o(Z) && V(Z.length) && Z.length > 0 && u(Z[0])
}
function K(Z) {
return n(Z) ? Z : p(Z) ? (_doc.getElementById(Z) || _doc.getElementsByName(Z)[0]) : null
}
function z(Z) {
return A({}, Z)
}
function R(Z) {
return !!(Z && Z.nodeType == 1)
}
function C(Z) {
return J.call(Z) === k
}
function v(Z) {
return J.call(Z) === q
}
function p(Z) {
return J.call(Z) === m
}
function w(Z) {
return Z && Z.toHTML ? Z.toHTML() : g.S.interpret(Z)
}
function T(Z) {
return J.call(Z) === r
}
function B(Z) {
return J.call(Z) === U
}
function x(Z) {
return typeof Z === "undefined"
}
function y(Z) {
return Z instanceof i
}
function H(Z) {
if (Q(Z) !== X) {
throw new TypeError()
}
var aa = [];
for (var ab in Z) {
if (Z.hasOwnProperty(ab)) {
aa.push(ab)
}
}
return aa
}
function t(Z, ab) {
for (var aa in Z) {
if (hasOwnProperty.call(Z, aa) && Z[aa] === ab) {
return aa
}
}
return null
}
function Q(aa) {
switch (aa) {
case null:
return L;
case (void 0):
return N
}
var Z = typeof aa;
switch (Z) {
case "boolean":
return Y;
case "number":
return G;
case "string":
return E
}
return X
}
function s(Z) {
try {
if (x(Z)) {
return "undefined"
}
if (Z === null) {
return "null"
}
return Z.inspect ? Z.inspect() : String(Z)
} catch (aa) {
if (aa instanceof RangeError) {
return "error"
}
throw aa
}
}
function A(Z, ab) {
for (var aa in ab) {
Z[aa] = ab[aa]
}
return Z
}
function S(Z) {
return p(Z) ? new Function("a", "b", "c", "return " + Z) : Z
}
function O(Z) {
return (new g.H(Z)).toQueryString()
}
A(g.C, {
_Type: Q,
isObj: o,
isset: V,
unset: M,
isnode: u,
isDom: n,
isKdom: I,
isKdoms: D,
iscollect: P,
isDoms: W,
node: K,
Kextend: A,
clone: z,
toHTML: w,
inspect: s,
isElement: R,
isArray: C,
isarr: C,
isHash: y,
isFunction: v,
isfun: v,
isString: p,
isstr: p,
isNumber: T,
isnum: T,
isDate: B,
keys: H,
keyOf: t,
isUndefined: x,
lambda: S,
toQueryString: O
})
})();
g.C.Kextend(Function.prototype, (function() {
var p = Array.prototype.slice;
function o(x, w) {
var u = p.call(arguments, 2);
var v = w;
var t = x;
if (g.C.isfun(w)) {
v = x;
t = w
} else {
if (g.C.isstr(w)) {
v = x;
t = v[w]
}
}
return function() {
return t.apply(v, u.concat([].slice.call(arguments)))
}
}
function s() {
var t = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, "").replace(/\s+/g, "").split(",");
return t.length == 1 && !t[0] ? [] : t
}
function l(v) {
if (arguments.length < 2 && g.C.isUndefined(arguments[0])) {
return this
}
var t = this,
u = p.call(arguments, 1);
return function() {
var w = r(u, arguments);
return t.apply(v, w)
}
}
function n(u) {
var t = this;
return function() {
var v = k([t.Kbind(this)], arguments);
return u.apply(this, v)
}
}
function q() {
if (!arguments.length) {
return this
}
var t = this,
u = p.call(arguments, 0);
return function() {
var v = r(u, arguments);
return t.apply(this, v)
}
}
function k(w, t) {
var v = w.length,
u = t.length;
while (u--) {
w[v + u] = t[u]
}
return w
}
function r(u, t) {
u = p.call(u, 0);
return k(u, t)
}
function m(v) {
var t = this,
u = p.call(arguments, 1);
v = v * 1000;
return window.setTimeout(function() {
return t.apply(t, u)
}, v)
}
return {
Kproxy: o,
KargumentNames: s,
KargNames: s,
Kbind: l,
Kwrap: n,
Kcurry: q,
Kdelay: m
}
})());
(function() {
g.S = g.String = g.fn.create();
g.S.Kextend({
interpret: function(l) {
return l == null ? "" : String(l)
},
trim: function(l) {
return String(l).replace(/^\s+|\s+$/g, "")
},
include: function(l, m) {
return l.indexOf(m) > -1
}
});
function k(m, n) {
var l = g.S.trim(m).match(/([^?#]*)(#.*)?$/);
if (!l) {
return {}
}
return g.A.each(l[1].split(n || "&"), function(r, s, o) {
if ((r = r.split("="))[0]) {
var p = decodeURIComponent(r.shift()),
q = r.length > 1 ? r.join("=") : r[0];
if (q != undefined) {
q = decodeURIComponent(q)
}
if (p in r) {
if (!g.C.isArray(r[p])) {
r[p] = [r[p]]
}
o[p].push(q)
} else {
o[p] = q
}
}
}, {})
}
g.O.Kextend(g.S, {
toQueryParams: k
})
})();
var c = (function() {
function s(x, w) {
var v = 0;
try {
this._each(function(z) {
x.call(w, z, v++)
})
} catch (y) {
if (y != {}) {
throw y
}
}
return this
}
function p(y, x, w) {
var v = -y,
z = [],
A = this.toArray();
if (y < 1) {
return A
}
while ((v += y) < A.length) {
z.push(A.slice(v, v + y))
}
return z.collect(x, w)
}
function q(x, w) {
x = x || Prototype.K;
var v = [];
this.each(function(z, y) {
v.push(x.call(w, z, y))
});
return v
}
function k(x, w) {
var v;
this.each(function(z, y) {
if (x.call(w, z, y)) {
v = z;
throw $break
}
});
return v
}
function r(x, w) {
var v = [];
this.each(function(z, y) {
if (x.call(w, z, y)) {
v.push(z)
}
});
return v
}
function o(v, x, w) {
this.each(function(z, y) {
v = x.call(w, v, z, y)
});
return v
}
function m(w) {
var v = $A(arguments).slice(1);
return this.map(function(x) {
return x[w].apply(x, v)
})
}
function n(w) {
var v = [];
this.each(function(x) {
v.push(x[w])
});
return v
}
function u(x, w) {
var v = [];
this.each(function(z, y) {
if (!x.call(w, z, y)) {
v.push(z)
}
});
return v
}
function l() {
return this.map()
}
function t() {
return this.toArray().length
}
return {
each: s,
eachSlice: p,
collect: q,
map: q,
detect: k,
findAll: r,
select: r,
filter: r,
inject: o,
invoke: m,
pluck: n,
reject: u,
size: t,
find: k
}
})();
var i = g.H = d.create(c, (function() {
function p(q) {
this._object = o(q) ? q.toObject() : g.O.clone(q)
}
function k(r) {
for (var q in this._object) {
var s = this._object[q],
t = [q, s];
t.key = q;
t.value = s;
r(t)
}
}
function o(q) {
return q instanceof i
}
function m() {
return g.O.clone(this._object)
}
function l(q, r) {
if (g.O.isUndefined(r)) {
return q
}
return q + "=" + encodeURIComponent(g.S.interpret(r))
}
function n() {
return this.inject([], function(u, x) {
var t = encodeURIComponent(x.key),
r = x.value;
if (r && typeof r == "object") {
if (g.O.isArray(r)) {
var w = [];
for (var s = 0, q = r.length, v; s < q; s++) {
v = r[s];
w.push(l(t, v))
}
return u.concat(w)
}
} else {
u.push(l(t, r))
}
return u
}).join("&")
}
return {
init: p,
_each: k,
isHash: o,
toObject: m,
toQueryString: n
}
})());
(function() {
var l = navigator.userAgent.toLowerCase(),
k = navigator.platform.toLowerCase(),
m = l.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [null, "unknown", 0],
p = m[1] == "ie" && document.documentMode;
var o = g.fn.create({
name: (m[1] == "version") ? m[3] : m[1],
version: p || parseFloat((m[1] == "opera" && m[4]) ? m[4] : m[2]),
Platform: {
name: l.match(/ip(?:ad|od|hone)/) ? "ios" : (l.match(/(?:webos|android)/) || k.match(/mac|win|linux/) || ["other"])[0]
},
Features: {
xpath: !!(document.evaluate),
air: !!(window.runtime),
query: !!(document.querySelector),
json: !!(window.JSON)
},
Plugins: {}
});
g.B = g.Browser = new o();
g.B = g.Browser = {
name: (m[1] == "version") ? m[3] : m[1],
version: p || parseFloat((m[1] == "opera" && m[4]) ? m[4] : m[2]),
Platform: {
name: l.match(/ip(?:ad|od|hone)/) ? "ios" : (l.match(/(?:webos|android)/) || k.match(/mac|win|linux/) || ["other"])[0]
},
Features: {
xpath: !!(document.evaluate),
air: !!(window.runtime),
query: !!(document.querySelector),
json: !!(window.JSON)
},
Plugins: {}
};
g.B[g.B.name] = true;
if (g.B.version == 5) {
g.B.version = 8
}
g.B[g.B.name + parseInt(g.B.version, 10)] = true;
g.B.Platform[g.B.Platform.name] = true;
if (g.B.Platform.ios) {
g.B.Platform.ipod = true
}
g.B.Engine = {};
var n = function(r, q) {
g.B.Engine.name = r;
g.B.Engine[r + q] = true;
g.B.Engine.version = q
};
if (g.B.ie) {
g.B.Engine.trident = true;
switch (g.B.version) {
case 6:
n("trident", 4);
break;
case 7:
n("trident", 5);
break;
case 8:
n("trident", 6);
break;
case 9:
n("trident", 7)
}
}
if (g.B.firefox) {
g.B.Engine.gecko = true;
if (g.B.version >= 3) {
n("gecko", 19)
} else {
n("gecko", 18)
}
}
if (g.B.safari || g.B.chrome) {
g.B.Engine.webkit = true;
switch (g.B.version) {
case 2:
n("webkit", 419);
break;
case 3:
n("webkit", 420);
break;
case 4:
n("webkit", 525)
}
}
if (g.B.opera) {
g.B.Engine.presto = true;
if (g.B.version >= 9.6) {
n("presto", 960)
} else {
if (g.B.version >= 9.5) {
n("presto", 950)
} else {
n("presto", 925)
}
}
}
if (g.B.name == "unknown") {
switch ((l.match(/(?:webkit|khtml|gecko)/) || [])[0]) {
case "webkit":
case "khtml":
g.B.Engine.webkit = true;
break;
case "gecko":
g.B.Engine.gecko = true
}
}
})();
(function() {
g.A = g.Array = g.fn.create();
g.A.Kextend({
each: function(o, q, p) {
if (g.C.isArray(o)) {
var p = p || [];
for (var k = 0, m = o.length; k < m; k++) {
q(o[k], k, p)
}
} else {
if (g.C.isNumber(o)) {
var p = p || [];
for (var k = 0, m = o; k < m; k++) {
q(k, p)
}
} else {
var p = p || {};
for (var n in o) {
q(o[n], n, p)
}
}
}
if (p) {
return p
}
},
map: function(n, o) {
var l = [],
k = n.length;
if (o) {
o = g.C.lambda(o);
for (var m = 0; m < k; m++) {
l[m] = o(n[m], m)
}
} else {
for (var m = 0; m < k; m++) {
l[m] = n[m]
}
}
return l
}
})
})();
(function() {
var l = {};
var k = g.DOMEvent = g.E = new g.Type("DOMEvent", function(m, q) {
if (!q) {
q = window
}
m = m || q.event;
if (m.$extended) {
return m
}
this.event = m;
this.$extended = true;
this.shift = m.shiftKey;
this.control = m.ctrlKey;
this.alt = m.altKey;
this.meta = m.metaKey;
var s = this.type = m.type;
var r = m.target || m.srcElement;
while (r && r.nodeType == 3) {
r = r.parentNode
}
this.target = g(r).node;
if (s.indexOf("key") == 0) {
var n = this.code = (m.which || m.keyCode);
this.key = l[n] || g.O.keyOf(m.Keys, n);
if (s == "keydown") {
if (n > 111 && n < 124) {
this.key = "f" + (n - 111)
} else {
if (n > 95 && n < 106) {
this.key = n - 96
}
}
}
if (this.key == null) {
this.key = String.fromCharCode(n).toLowerCase()
}
} else {
if (s == "click" || s == "dblclick" || s == "contextmenu" || s.indexOf("mouse") == 0) {
var t = q.document;
t = (!t.compatMode || t.compatMode == "CSS1Compat") ? t.html : t.body;
this.page = {
x: m.clientX,
y: m.clientY
};
this.client = {
x: (m.pageX != null) ? m.pageX - q.pageXOffset : m.clientX,
y: (m.pageY != null) ? m.pageY - q.pageYOffset : m.clientY
};
if (s == "DOMMouseScroll" || s == "mousewheel") {
this.wheel = (m.wheelDelta) ? m.wheelDelta / 120 : -(m.detail || 0) / 3
}
this.rightClick = (m.which == 3 || m.button == 2);
if (s == "mouseover" || s == "mouseout") {
var u = m.relatedTarget || m[(s == "mouseover" ? "from" : "to") + "Element"];
while (u && u.nodeType == 3) {
u = u.parentNode
}
this.relatedTarget = g(u).node
}
} else {
if (s.indexOf("touch") == 0 || s.indexOf("gesture") == 0) {
this.rotation = m.rotation;
this.scale = m.scale;
this.targetTouches = m.targetTouches;
this.changedTouches = m.changedTouches;
var p = this.touches = m.touches;
if (p && p[0]) {
var o = p[0];
this.page = {
x: o.pageX,
y: o.pageY
};
this.client = {
x: o.clientX,
y: o.clientY
}
}
}
}
}
if (!this.client) {
this.client = {}
}
if (!this.page) {
this.page = {}
}
});
k.Kimplement({
stopPropagation: function() {
if (this.event.stopPropagation) {
this.event.stopPropagation()
} else {
this.event.cancelBubble = true
}
return this
},
preventDefault: function() {
if (this.event.preventDefault) {
this.event.preventDefault()
} else {
this.event.returnValue = false
}
return this
}
});
k.defineKey = function(n, m) {
l[n] = m;
return this
};
k.defineKeys = k.defineKey.KoverloadSetter(true);
k.defineKeys({
"38": "up",
"40": "down",
"37": "left",
"39": "right",
"27": "esc",
"32": "space",
"8": "backspace",
"9": "tab",
"46": "delete",
"13": "enter"
})
})();
this.KEvent = g.E;
(function() {
g.R = g.Regexp = g.fn.create();
g.R.Kextend({
num: /^\-?\d+(?:\.\d+)?$/
})
})();
(function() {
var k = this.Kwdom = g.fn.create({
parent: function(l) {
return Koala.each(function(o, n, p) {
if (!p) {
p = n
}
p = p || 1;
o = o.node;
for (var m = 0; m < p; m++) {
o = o.parentNode
}
return g(o)
}, this, l)
},
sibling: function(l) {
return Koala.each(function(q, m) {
var p = Function.prototype.Kproxy;
if (g.C.isNumber(m)) {
var o = m > 0 ? "nextSibling" : "previousSibling";
m = Math.abs(m);
var q = q.node;
while (q = q[o]) {
if (q.nodeType == 1 && (--m == 0)) {
return g(q)
}
}
return false
}
var n = [];
(g.C.unset(m) ? "<>" : m).replace(/./g, p(q, function(s) {
s = s == ">" ? "nextSibling" : "previousSibling";
var r = this.node;
while (r = r[s]) {
r.nodeType == 1 && n.unshift(r)
}
}));
if (!n[0][0]) {
n = [n]
}
return KK.doms(n)
}, this, l)
},
prev: function() {
return this.sibling(-1)
},
next: function() {
return this.sibling(1)
},
child: function(l) {
return Koala.each(function(s, q, m) {
if (!m) {
m = q
}
if (m.length == 0) {
var p = [];
for (var o = s.node.childNodes, n = o.length, q = 0; q < n; q++) {
o[q].nodeType == 1 && p.push(o[q])
}
return KK.doms(p)
}
var r = function(y, v) {
var w = y.childNodes;
var u = w.length;
var t = +v.shift();
var x;
if (t < 0) {
for (x = u - 1; x >= 0; x--) {
if (w[x].nodeType == 1 && ++t == 0) {
break
}
}
} else {
for (x = 0; x < u; x++) {
if (w[x].nodeType == 1 && --t < 0) {
break
}
}
}
if (x < 0 || x >= u) {
return false
}
return v.length > 0 ? r(w[x], v) : g(w[x])
};
return g(r(s.node, g.A.map(m)))
}, this, arguments)
},
first: function() {
return this.child(0)
},
last: function() {
return this.child(-1)
},
append: function(l) {
if (this.isKdom) {
if (g.C.isString(l)) {
this.node.appendChild(g.fragment(l))
} else {
if (g.C.isElement(l.node)) {
this.node.appendChild(l.node)
} else {
this.node.appendChild(l)
}
}
} else {
if (this.isKdoms) {
this.each(function(o, m, n) {
if (g.C.isString(n)) {
o.node.appendChild(g.fragment(n))
} else {
if (g.C.isElement(n)) {
el = n.cloneNode(true);
o.node.appendChild(n)
}
}
}, l)
}
}
return this
},
remove: function() {
return Koala.each(function(m, l) {
m.parent().node.removeChild(m.node)
}, this)
},
empty: function(l) {
return Koala.each(function(o) {
if (g.C.unset(l)) {
while (o.node.firstChild) {
o.node.removeChild(o.node.firstChild)
}
} else {
for (var m = o.node.childNodes, n = m.length - 1; n >= 0; n--) {
m[n].nodeType != l && o.node.removeChild(m[n])
}
}
return o
}, this)
},
getByTagName: function(l) {
var q = this.node.getElementsByTagName(l);
try {
return [].slice.call(q)
} catch (p) {
var n, o = 0,
m = [];
while (n = q[o]) {
m[o++] = n
}
return m
}
},
insert: function(o) {
element = this.node;
if (g.C.isstr(o) || g.C.isNumber(o) || g.C.isElement(o) || (o && (o.toElement || o.toHTML))) {
o = {
bottom: o
}
}
var n, p, m, q;
for (var l in o) {
n = o[l];
if (g.C.isfun(n)) {
continue
}
l = l.toLowerCase();
p = g._insertionTranslations[l];
if (n && n.toElement) {
n = n.toElement()
}
if (g.C.isElement(n)) {
this.insert(element, n)
}
n = g.C.toHTML(n);
m = ((l == "before" || l == "after") ? element.parentNode : element).tagName.toUpperCase();
q = g._getContentFromAnonymousElement(m, n);
if (l == "top" || l == "after") {
q.reverse()
}
g.A.each(q, p.Kcurry(element))
}
return g(this)
},
cleanWhitespace: function() {
return Koala.each(function(o) {
var n = o.node;
var m = o.node.firstChild;
while (m) {
var l = m.nextSibling;
if (m.nodeType == 3 && !/\S/.test(m.nodeValue)) {
n.removeChild(m)
}
m = l
}
return g(o)
}, this)
}
});
k.Kimplement({
classNames: function() {
return Koala.each(function(l) {
return l.node.className
}, this)
},
hasClass: function(l) {
return Koala.each(function(n) {
var m = n.node.className;
return (m.length > 0 && (m == l || new RegExp("(^|\\s)" + l + "(\\s|$)").test(m)))
}, this)
},
addClass: function(l) {
return Koala.each(function(n, m) {
if (!n.hasClass(l)) {
n.node.className += (n.node.className ? " " : "") + l
}
return g(n)
}, this)
},
removeClass: function(l) {
return Koala.each(function(n) {
var m = g.S.trim;
n.node.className = m(n.node.className.replace(new RegExp("(^|\\s+)" + l + "(\\s+|$)"), " "));
return n
}, this)
},
toggleClass: function(l) {
return this[this.hasClass(l) ? "removeClass" : "addClass"](l)
},
find: function(l) {
return Koala.each(function(o, n, m) {
if (!m) {
m = n
}
var p = KA([m]).join(", ");
return g.Selector.select(p, o.node)
}, this, l)
},
scrollLeft: function(l) {
return Koala.each(function(o) {
if (g.C.isset(l)) {
if (o.tag == "win" || o.tag == "body") {
var n = g().bind("_load", function() {
document.documentElement.scrollLeft = l;
document.body.scrollLeft = l
});
var m = g().bind("_keydown", function(p) {
if (p.code == 116 && g.B.chrome || g.B.safari || g.B.Opera) {
document.documentElement.scrollLeft = l;
document.body.scrollLeft = l
}
})
} else {
o.node.scrollLeft = l
}
return o
} else {
if (o.tag == "win" || o.tag == "body") {
return document.documentElement.scrollLeft || document.body.scrollLeft
} else {
return o.node.scrollLeft
}
}
}, this)
},
scrollTop: function(l) {
return Koala.each(function(o) {
if (g.C.isset(l)) {
if (o.tag == "win" || o.tag == "body") {
var n = g().bind("_load", function() {
document.documentElement.scrollTop = l;
document.body.scrollTop = l
});
var m = g().bind("_keydown", function(p) {
if (p.code == 116 && g.B.chrome || g.B.safari || g.B.Opera) {
document.documentElement.scrollTop = l;
document.body.scrollTop = l
}
})
} else {
o.node.scrollTop = l
}
return o
} else {
if (o.tag == "win" || o.tag == "body") {
return document.documentElement.scrollTop || document.body.scrollTop
} else {
return o.node.scrollTop
}
}
}, this)
},
show: function() {
return this.css("display", /^(span|img|a|input|b|u|i|label|strong|em)$/.test(this.tag) === false ? "block" : "inline")
},
hide: function() {
return this.css("display", "none")
},
toggle: function() {
this.css("display") == "none" ? this.show() : this.hide()
},
css: function(m, l) {
return Koala.each(function(r, o) {
var n = g.S.trim;
if (g.C.isObj(m)) {
for (var p in m) {
r.css(p, m[p])
}
return g(r.node)
}
if (m.indexOf(":") > -1) {
g.A.each(m.replace(/;$/, "").split(";"), Function.prototype.Kproxy(function(u) {
var t = u.split(":");
r.css(n(t.shift()), n(t.join(":")))
}, r));
return g(r.node)
}
if (/\-\w/.test(m)) {
m = m.replace(/\-(\w)/, function(u, t) {
return t.toUpperCase()
})
}
if (o.length == 1) {
if (r.node == document || r.node == window) {
r.node = document.body
}
return r.node.style[m] || (_doc.defaultView ? _doc.defaultView.getComputedStyle(r.node, null)[m] : r.node.currentStyle ? r.node.currentStyle[m] : "")
}
try {
if (l == "rgb(NaN,NaN,NaN)") {
l = "transparent";
r.node.style[m] = l
}
r.node.style[m] = l
} catch (q) {}
return r
}, this, arguments)
},
getStyle: function(l) {
return this.css(l)
},
setStyle: function(m, l) {
return this.css(m, l)
},
opacity: function(l) {
return Koala.each(function(o, m, p) {
if (!p) {
p = m
}
if (p) {
if (o.node.style.opacity != undefined) {
return o.css("opacity", p)
}
return o.css("filter", "alpha(opacity=" + p * 100 + ")")
}
if (o.node.style.opacity != undefined) {
return g.R.num.test(o.css("opacity")) ? +RegExp.lastMatch : 1
}
return /alpha\(opacity=(\d+)\)/.test(o.css("filter")) ? RegExp.$1 / 100 : 1
}, this, l)
},
html: function(l) {
if (g.C.unset(l)) {
if (this.isKdom) {
return this.node.innerHTML
} else {
if (this.isKdoms) {
return g.A.each(this.data[0], function(o, n, m) {
m[n] = o.innerHTML
})
}
}
}
return Koala.each(function(o) {
switch (o.tag) {
case "select":
if (Browser.ie) {
o.empty();
var o = _doc.createElement("div");
o.innerHTML = "<select>" + l + "</select>";
var m = o.firstChild.childNodes;
while (m.length > 0) {
o.node.appendChild(m[0])
}
} else {
o.node.innerHTML = l
}
if (arguments.length == 2) {
o.node.value = arguments[1]
}
break;
case "table":
o.find("tbody").item(0).html(l);
break;
case "thead":
case "tfoot":
case "tbody":
o.empty();
var p = _doc.createElement("div");
p.innerHTML = "<table><tbody>" + l + "</tbody></table>";
var n = p.firstChild.tBodies[0].rows;
while (n.length > 0) {
o.node.appendChild(n[0])
}
break;
default:
o.node.innerHTML = l;
break
}
return o
}, this)
},
attr: function(m, l) {
return Koala.each(function(t, s, p) {
if (!p) {
p = s
}
var v = p.length;
if (v == 2) {
if (m == "style") {
t.node.style.cssText = l
} else {
if (t.node[m] != undefined) {
t.node[m] = l
} else {
t.node.setAttribute(m, l)
}
}
return t
}
if (v == 1) {
if (typeof m == "object") {
for (var s in m) {
t.attr(s, m[s])
}
return t
}
if (m.indexOf("=") > -1) {
F.each(F.trim(m).split(/\s+/), F.proxy(function(o) {
var n = o.split("=");
t.attr(F.trim(n[0]), /["'](.+?)["']/.test(n[1]) ? RegExp.$1 : F.trim(n[1]))
}, t));
return t
}
if (m == "style") {
return t.node.style.cssText
} else {
if (m == "href" && t.tag == "a") {
return t.node.getAttribute(m, 2)
} else {
if (m == "src") {
return t.node.getAttribute(m, 2)
} else {
if (t.node[m] != undefined) {
return t.node[m]
}
}
}
}
return t.node.getAttribute(m)
}
if (v == 0) {
var u = {};
for (var r = t.node.attributes, q = r.length, s = 0; s < q; s++) {
u[r[s].name] = r[s].value
}
return u
}
}, this, arguments)
},
bind: function(n, l, m) {
return Koala.each(function(r) {
n = n.replace(/^_/, "");
var p = r;
var q = q || r;
var o = function(s) {
if (!s) {
s = window.e
}
l.call(q, new g.E(s), p)
};
if (r.node.addEventListener) {
r.node.addEventListener(n, o, false)
} else {
if (r.node.attachEvent) {
if (r.tag == "win") {
r.node.attachEvent("on" + n, o)
} else {
r.node.attachEvent("on" + n, o)
}
}
}
return RegExp.lastMatch == "_" ? o : r
}, this)
},
unbind: function(m, l) {
return Koala.each(function(n) {
if (_win.removeEventListener) {
n.node.removeEventListener(m, l, false)
} else {
if (_win.attachEvent) {
n.node.detachEvent("on" + m, l)
}
}
return n
}, this)
},
click: function(l, m) {
return this.bind("click", l, m)
},
hover: function(l, m) {
if (arguments.length == 1) {
this.bind("mouseover", l)
} else {
this.bind("mouseover", l);
this.bind("mouseout", m)
}
return this
}
})
})();
(function() {
g.P = Kwdom.prototype;
g.P.fn = function() {};
g.P.fn.Kextend({
extend: function(k) {
Kwdom.addMethods(k)
}
})
})();
g.P.fn.extend({
px: function(k, l) {
if (arguments.length == 2) {
this.node.style[k] = l + "px";
return this
}
return parseInt(this.css(k), 10) || 0
},
width: function(k) {
if (arguments.length == 1) {
return this.px("width", k)
}
return this.px("width") || this.node.offsetWidth - this.px("paddingLeft") - this.px("paddingRight") - this.px("borderLeftWidth") - this.px("borderRightWidth")
},
height: function(k) {
if (arguments.length == 1) {
return this.px("height", k)
}
return this.px("height") || this.node.offsetHeight - this.px("paddingTop") - this.px("paddingBottom") - this.px("borderTopWidth") - this.px("borderBottomWidth")
},
pageX: function(l) {
var k;
l ? k = l : k = this.node;
return k.offsetParent ? k.offsetLeft + Kwdom.prototype.pageX(k.offsetParent) : k.offsetLeft
},
pageY: function(l) {
var k;
l ? k = l : k = this.node;
return k.offsetParent ? k.offsetTop + Kwdom.prototype.pageY(k.offsetParent) : k.offsetTop
},
parentX: function(l) {
var k;
l ? k = l : k = this.node;
return k.parentNode == k.offsetParent ? k.offsetLeft : Kwdom.prototype.pageX(k) - Kwdom.prototype.pageX(k.parentNode)
},
parentY: function(l) {
var k;
l ? k = l : k = this.node;
return k.parentNode == k.offsetParent ? k.offsetTop : Kwdom.prototype.pageY(k) - Kwdom.prototype.pageY(k.parentNode)
},
Left: function(k) {
if (arguments.length == 1) {
this.node.style.left = k + "px"
}
return this.px("left")
},
Top: function(k) {
if (arguments.length == 1) {
this.node.style.top = k + "px"
}
return this.px("top")
}
});
g.P.clone = function(k) {
function m(n, p) {
for (var o in p) {
n[o] = p[o]
}
return n
}
if (!!k) {
var l = m({}, this);
return g(l.node.cloneNode(true))
} else {
return this
}
};
g.P.fn.extend({
parentWrap: function(k) {
return Koala.each(function(n) {
var o = n.clone(true);
var m = document.createElement("div");
m.innerHTML = k;
var l = m.cloneNode(true);
while (l.firstChild && l.firstChild.nodeType == 1) {
l = l.firstChild
}
l.appendChild(o.node);
n.node.parentNode.insertBefore(l);
n.node.parentNode.removeChild(n.node)
}, this)
},
childWrap: function(l, k) {
return Koala.each(function(o) {
if (k) {
o = o.child(k)
}
var n = o.html();
o.empty();
o.html(l);
var m = o.node;
while (m.firstChild) {
m = m.firstChild
}
m.innerHTML = n
}, this)
}
});
Koala.each = function(n, m, k) {
var l = n.KargNames();
if (m.isKdom) {
if (l[l.length - 1] == "r") {
n(m, k);
return g(m.node)
} else {
return n(m, k)
}
} else {
if (m.isKdoms) {
if (l[l.length - 1] == "r") {
m.each(n, k);
return KK(m.exp)
} else {
return m._each(n, k)
}
}
}
};
g._insertionTranslations = {
before: function(k, l) {
k.parentNode.insertBefore(l, k)
},
top: function(k, l) {
k.insertBefore(l, k.firstChild)
},
bottom: function(k, l) {
k.appendChild(l)
},
after: function(k, l) {
k.parentNode.insertBefore(l, k.nextSibling)
},
tags: {
TABLE: ["<table>", "</table>", 1],
TBODY: ["<table><tbody>", "</tbody></table>", 2],
TR: ["<table><tbody><tr>", "</tr></tbody></table>", 3],
TD: ["<table><tbody><tr><td>", "</td></tr></tbody></table>", 4],
SELECT: ["<select>", "</select>", 1]
}
};
g._getContentFromAnonymousElement = function(o, n, p) {
var q = document.createElement("div");
var m = g._insertionTranslations.tags[o];
var k = false;
if (m) {
k = true
} else {
if (p) {
k = true;
m = ["", "", 0]
}
}
if (k) {
q.innerHTML = " " + m[0] + n + m[1];
q.removeChild(q.firstChild);
for (var l = m[2]; l--;) {
q = q.firstChild
}
} else {
q.innerHTML = n
}
return KA(q.childNodes)
};
g.fragment = function(o) {
var l = [],
m = _doc.createElement("div"),
s = _doc.createDocumentFragment();
m.innerHTML = o;
var n = m.childNodes;
for (var q = 0, t = n.length; q < t; q++) {
l[l.length] = n[q]
}
for (var p = 0, u = l.length; p < u; p++) {
s.appendChild(l[p])
}
return s
};
g.extend = function(k, l) {
if (!l) {
g.O.Kextend(g, k)
} else {
return g.O.Kextend(k, l)
}
};
g.ready = function(k) {
if (g.C.isfun(k)) {
return j(k)
}
k.init && j(Function.prototype.Kproxy(k, k.init));
return k
};
var j = function() {
var n = false,
o = [],
p, k = function(q) {
if (n) {
q()
} else {
o.push(q)
}
},
l = function() {
for (var r = 0, q = o.length; r < q; r++) {
o[r]()
}
o = null
},
m = function(q) {
if (n) {
return
}
n = true;
l();
if (_doc.removeEventListener) {
_doc.removeEventListener("DOMContentLoaded", m, false)
} else {
if (_doc.attachEvent) {
_doc.detachEvent("onreadystatechange", m);
if (_win == _win.top) {
clearInterval(p);
p = null
}
}
}
};
if (_doc.addEventListener) {
_doc.addEventListener("DOMContentLoaded", m, false)
} else {
if (_doc.attachEvent) {
_doc.attachEvent("onreadystatechange", function() {
if ((/loaded|complete/).test(_doc.readyState)) {
m()
}
});
if (_win == _win.top) {
p = setInterval(function() {
try {
n || _doc.docElement.doScroll("left")
} catch (q) {
return
}
m()
}, 5)
}
}
}
return k
}();
var f = this.ClassK = d.create(Kwdom, {
init: function(k) {
this.isKdom = true;
this.node = k;
this.exist = true;
this.tag = this.node == _win ? "win" : this.node == _doc ? "doc" : this.node.tagName.toLowerCase()
},
Version: "1.4.1",
author: "boqiu",
item: function(k) {
return this
},
nitem: function(k) {
return this.node
},
noConflict: function() {
if (this.Version) {
window.K = e
}
return _K
},
each: function(k) {
k(this, 0);
return this
}
});
var h = d.create(f, {
init: function(k) {
if (h.comp) {
return false
}
if (h.debug) {
this.errorEle = k;
console.log('Error: the "' + this.errorEle + '" not bind')
}
}
});
g.compatible = function(k) {
h.comp = k
};
g.debug = function(k) {
h.debug = k;
if (g.Browser.ie) {
window.console = function() {};
console.log = log = function(l) {
alert(l)
}
}
};
var b = this.Knative = d.create(Kwdom, {
init: function(k, l) {
this.data = k;
this.len = k[0].length;
this.length = k[0].length;
this.isKdoms = true;
this.exist = true;
this.exp = l || "null";
k[1] = k[1] || "null";
return this
},
item: function(k) {
if (k < 0) {
k += this.len
}
return g(this.data[0][k])
},
nitem: function(k) {
if (k < 0) {
k += this.len
}
return this.data[0][k]
},
each: function(p, m) {
var n = this,
l = this.len;
for (var k = 0; k < l; k++) {
if (this.data[0][k] == undefined) {
continue
} else {
p(g(n.item(k)), k, m)
}
}
return this
},
_check: function(k) {
for (var m = 0; m < k.length; m++) {
for (var l = m + 1; l < k.length; l++) {
if (k[l] === k[m]) {
k.splice(l, 1);
l--
}
}
}
return k
},
_each: function(t, u) {
var k = this,
p = this.len,
r = [],
n = [],
l = [],
v = [];
for (var s = 0; s < p; s++) {
r[s] = t(g(k.item(s)), s, u);
if (r[s].isKdom) {
l[s] = r[s].node
} else {
if (r[s].isKdoms) {
l[s] = r[s].data[0]
}
}
}
if (r[0].isKdom) {
for (var m = 0, p = r.length; m < p; m++) {
var q = r[m].node;
if (!q.id && !q.className) {
v[m] = r[m].tag
} else {
if (q.id && !q.className) {
v[m] = "#" + q.id
} else {
if (q.className && !q.id) {
v[m] = "." + q.className
} else {
if (q.id && q.className) {
v[m] = "." + q.id
}
}
}
}
}
v = k._check(v).join(", ")
} else {
if (r[0].isKdoms) {
for (var m = 0, p = r.length; m < p; m++) {
var q = r[m].data[0];
if (!q.id && !q.className) {
v[m] = r[m].tag
} else {
if (q.id && !q.className) {
v[m] = "#" + q.id
} else {
if (q.className && !q.id) {
v[m] = "." + q.className
} else {
if (q.id && q.className) {
v[m] = "." + q.id
}
}
}
}
}
v = k._check(v).join(", ")
}
}
n.push(l);
return new b(n, v)
},
toString: function() {
return "Kdoms"
}
})
})();
(function() {
var b = document,
i = {},
e = {},
h = function(k) {
return k.constructor === Array
},
g = {
core_lib: ["http://mat1.gtimg.com/joke/Koala/Koala.min.1.3.3.js"],
mods: {}
},
j = b.getElementsByTagName("script")[0],
d = function(l, p, r, k, o) {
if (!l) {
return
}
if (i[l]) {
e[l] = false;
if (k) {
k(l, o)
}
return
}
if (e[l]) {
setTimeout(function() {
d(l, p, r, k, o)
}, 1);
return
}
e[l] = true;
var q, m = p || l.toLowerCase().substring(l.lastIndexOf(".") + 1);
if (m === "js") {
q = b.createElement("script");
q.setAttribute("type", "text/javascript");
q.setAttribute("src", l);
q.setAttribute("async", true)
} else {
if (m === "css") {
q = b.createElement("link");
q.setAttribute("type", "text/css");
q.setAttribute("rel", "stylesheet");
q.setAttribute("href", l);
i[l] = true
}
}
if (r) {
q.charset = r
}
if (m === "css") {
j.parentNode.insertBefore(q, j);
if (k) {
k(l, o)
}
return
}
q.onload = q.onreadystatechange = function() {
if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
i[this.getAttribute("src")] = true;
if (k) {
k(this.getAttribute("src"), o)
}
q.onload = q.onreadystatechange = null
}
};
j.parentNode.insertBefore(q, j)
},
c = function(r) {
if (!r || !h(r)) {
return
}
var n = 0,
q, l = [],
p = g.mods,
k = [],
m = {},
o = function(v) {
var u = 0,
s, t;
if (m[v]) {
return k
}
m[v] = true;
if (p[v].requires) {
t = p[v].requires;
for (; s = t[u++];) {
if (p[s]) {
o(s);
k.push(s)
} else {
k.push(s)
}
}
return k
}
return k
};
for (; q = r[n++];) {
if (p[q] && p[q].requires && p[q].requires[0]) {
k = [];
m = {};
l = l.concat(o(q))
}
l.push(q)
}
return l
},
f = function(k) {
if (!k || !h(k)) {
return
}
this.queue = k;
this.current = null
};
f.prototype = {
_interval: 10,
start: function() {
var k = this;
this.current = this.next();
if (!this.current) {
this.end = true;
return
}
this.run()
},
run: function() {
var m = this,
k, l = this.current;
if (typeof l === "function") {
l();
this.start();
return
} else {
if (typeof l === "string") {
if (g.mods[l]) {
k = g.mods[l];
d(k.path, k.type, k.charset, function(n) {
m.start()
}, m)
} else {
if (/\.js|\.css/i.test(l)) {
d(l, "", "", function(n, p) {
p.start()
}, m)
} else {
this.start()
}
}
}
}
},
next: function() {
return this.queue.shift()
}
};
this.Qfast = function() {
var l = Array.prototype.slice.call(arguments, 1),
k;
if (arguments[0]) {
k = new f(c(g.core_lib.concat(l)))
} else {
k = new f(c(l))
}
k.start()
};
this.Qfast.add = function(l, k) {
if (!l || !k || !k.path) {
return
}
g.mods[l] = k
}
})();
#2 JavaScript::Eval (size: 27827) - SHA256: d9536dbd9ab3979827f20ffd7ef2597aec2a5eff200cecb1e974904c29d1072e
var $c;
if ($FF) {
Event.prototype.__defineSetter__("returnValue", function($) {
if (!$) this.preventDefault();
return $
});
Event.prototype.__defineGetter__("srcElement", function() {
var $ = this.target;
while ($.nodeType != 1) $ = $.parentNode;
return $
});
HTMLElement.prototype.attachEvent = function($, _) {
var A = $.replace(/on/, "");
_._ieEmuEventHandler = function($) {
window.event = $;
return _()
};
this.addEventListener(A, _._ieEmuEventHandler, false)
}
}
function My97DP() {
$c = this;
this.QS = [];
$d = document.createElement("div");
$d.className = "WdateDiv";
$d.innerHTML = "<div id=dpTitle><div class=\"navImg NavImgll\"><a href=\"###\"></a></div><div class=\"navImg NavImgl\"><a href=\"###\"></a></div><div style=\"float:left\"><div class=\"menuSel MMenu\"></div><input class=yminput></div><div style=\"float:left\"><div class=\"menuSel YMenu\"></div><input class=yminput></div><div class=\"navImg NavImgrr\"><a href=\"###\"></a></div><div class=\"navImg NavImgr\"><a href=\"###\"></a></div><div style=\"float:right\"></div></div><div style=\"position:absolute;overflow:hidden\"></div><div></div><div id=dpTime><div class=\"menuSel hhMenu\"></div><div class=\"menuSel mmMenu\"></div><div class=\"menuSel ssMenu\"></div><table cellspacing=0 cellpadding=0 border=0><tr><td rowspan=2><span id=dpTimeStr></span> <input class=tB maxlength=2><input value=\":\" class=tm readonly><input class=tE maxlength=2><input value=\":\" class=tm readonly><input class=tE maxlength=2></td><td><button id=dpTimeUp></button></td></tr><tr><td><button id=dpTimeDown></button></td></tr></table></div><div id=dpQS></div><div id=dpControl><input class=dpButton id=dpClearInput type=button><input class=dpButton id=dpTodayInput type=button><input class=dpButton id=dpOkInput type=button></div>";
attachTabEvent($d, function() {
hideSel()
});
A();
$dp.focusArr = [document, $d.MI, $d.yI, $d.HI, $d.mI, $d.sI, $d.clearI, $d.todayI, $d.okI];
for (var B = 0; B < $dp.focusArr.length; B++) {
var _ = $dp.focusArr[B];
_.nextCtrl = B == $dp.focusArr.length - 1 ? $dp.focusArr[1] : $dp.focusArr[B + 1];
$dp.attachEvent(_, "onkeydown", _tab)
}
this.init();
$();
_inputBindEvent("y,M,H,m,s");
$d.upButton.onclick = function() {
updownEvent(1)
};
$d.downButton.onclick = function() {
updownEvent(-1)
};
$d.qsDiv.onclick = function() {
if ($d.qsDivSel.style.display != "block") {
$c._fillQS();
showB($d.qsDivSel)
} else hide($d.qsDivSel)
};
document.body.appendChild($d);
function A() {
var _ = $("a");
divs = $("div"), ipts = $("input"), btns = $("button"), spans = $("span");
$d.navLeftImg = _[0];
$d.leftImg = _[1];
$d.rightImg = _[3];
$d.navRightImg = _[2];
$d.rMD = divs[9];
$d.MI = ipts[0];
$d.yI = ipts[1];
$d.titleDiv = divs[0];
$d.MD = divs[4];
$d.yD = divs[6];
$d.qsDivSel = divs[10];
$d.dDiv = divs[11];
$d.tDiv = divs[12];
$d.HD = divs[13];
$d.mD = divs[14];
$d.sD = divs[15];
$d.qsDiv = divs[16];
$d.bDiv = divs[17];
$d.HI = ipts[2];
$d.mI = ipts[4];
$d.sI = ipts[6];
$d.clearI = ipts[7];
$d.todayI = ipts[8];
$d.okI = ipts[9];
$d.upButton = btns[0];
$d.downButton = btns[1];
$d.timeSpan = spans[0];
function $($) {
return $d.getElementsByTagName($)
}
}
function $() {
$d.navLeftImg.onclick = function() {
$ny = $ny <= 0 ? $ny - 1 : -1;
if ($ny % 5 == 0) {
$d.yI.focus();
return
}
$d.yI.value = $dt.y - 1;
$d.yI.onblur()
};
$d.leftImg.onclick = function() {
$dt.attr("M", -1);
$d.MI.onblur()
};
$d.rightImg.onclick = function() {
$dt.attr("M", 1);
$d.MI.onblur()
};
$d.navRightImg.onclick = function() {
$ny = $ny >= 0 ? $ny + 1 : 1;
if ($ny % 5 == 0) {
$d.yI.focus();
return
}
$d.yI.value = $dt.y + 1;
$d.yI.onblur()
}
}
}
My97DP.prototype = {
init: function() {
$ny = 0;
$dp.cal = this;
if ($dp.readOnly && $dp.el.readOnly != null) {
$dp.el.readOnly = true;
$dp.el.blur()
}
$();
this._dealFmt();
$dt = this.newdate = new DPDate();
$tdt = new DPDate();
$sdt = this.date = new DPDate();
this.dateFmt = this.doExp($dp.dateFmt);
this.autoPickDate = $dp.autoPickDate == null ? ($dp.has.st && $dp.has.st ? false : true) : $dp.autoPickDate;
$dp.autoUpdateOnChanged = $dp.autoUpdateOnChanged == null ? ($dp.isShowOK && $dp.has.d ? false : true) : $dp.autoUpdateOnChanged;
this.ddateRe = this._initRe("disabledDates");
this.ddayRe = this._initRe("disabledDays");
this.sdateRe = this._initRe("specialDates");
this.sdayRe = this._initRe("specialDays");
this.minDate = this.doCustomDate($dp.minDate, $dp.minDate != $dp.defMinDate ? $dp.realFmt : $dp.realFullFmt, $dp.defMinDate);
this.maxDate = this.doCustomDate($dp.maxDate, $dp.maxDate != $dp.defMaxDate ? $dp.realFmt : $dp.realFullFmt, $dp.defMaxDate);
if (this.minDate.compareWith(this.maxDate) > 0) $dp.errMsg = $lang.err_1;
if (this.loadDate()) {
this._makeDateInRange();
this.oldValue = $dp.el[$dp.elProp]
} else this.mark(false, 2);
_setAll($dt);
$d.timeSpan.innerHTML = $lang.timeStr;
$d.clearI.value = $lang.clearStr;
$d.todayI.value = $lang.todayStr;
$d.okI.value = $lang.okStr;
$d.okI.disabled = !$c.checkValid($sdt);
this.initShowAndHide();
this.initBtn();
if ($dp.errMsg) alert($dp.errMsg);
this.draw();
if ($dp.el.nodeType == 1 && $dp.el["My97Mark"] === undefined) {
$dp.attachEvent($dp.el, "onkeydown", _tab);
$dp.attachEvent($dp.el, "onblur", function() {
if ($dp.dd.style.display == "none") {
$c.close();
if ($dp.cal.oldValue != $dp.el[$dp.elProp] && $dp.el.onchange) fireEvent($dp.el, "change")
}
})
}
$c.currFocus = $dp.el;
hideSel();
function $() {
var _, $;
for (_ = 0;
($ = document.getElementsByTagName("link")[_]); _++)
if ($["rel"].indexOf("style") != -1 && $["title"]) {
$.disabled = true;
if ($["title"] == $dp.skin) $.disabled = false
}
}
},
_makeDateInRange: function() {
var _ = this.checkRange();
if (_ != 0) {
var $;
if (_ > 0) $ = this.maxDate;
else $ = this.minDate;
if ($dp.has.sd) {
$dt.y = $.y;
$dt.M = $.M;
$dt.d = $.d
}
if ($dp.has.st) {
$dt.H = $.H;
$dt.m = $.m;
$dt.s = $.s
}
}
},
splitDate: function(J, C, Q, E, B, G, F, K, L) {
var $;
if (J && J.loadDate) $ = J;
else {
$ = new DPDate();
if (J != "") {
C = C || $dp.dateFmt;
var H, P = 0,
O, A = /yyyy|yyy|yy|y|MMMM|MMM|MM|M|dd|d|%ld|HH|H|mm|m|ss|s|DD|D|WW|W|w/g,
_ = C.match(A);
A.lastIndex = 0;
if (L) O = J.split(/\W+/);
else {
var D = 0,
M = "^";
while ((O = A.exec(C)) !== null) {
if (D >= 0) M += C.substring(D, O.index);
D = A.lastIndex;
switch (O[0]) {
case "yyyy":
M += "(\\d{4})";
break;
case "yyy":
M += "(\\d{3})";
break;
case "MMMM":
case "MMM":
case "DD":
case "D":
M += "(\\D+)";
break;
default:
M += "(\\d\\d?)";
break
}
}
M += ".*$";
O = new RegExp(M).exec(J);
P = 1
}
if (O) {
for (H = 0; H < _.length; H++) {
var I = O[H + P];
if (I) switch (_[H]) {
case "MMMM":
case "MMM":
$.M = N(_[H], I);
break;
case "y":
case "yy":
I = pInt2(I, 0);
if (I < 50) I += 2000;
else I += 1900;
$.y = I;
break;
case "yyy":
$.y = pInt2(I, 0) + $dp.yearOffset;
break;
default:
$[_[H].slice(-1)] = I;
break
}
}
} else $.d = 32
}
}
$.coverDate(Q, E, B, G, F, K);
return $;
function N(A, $) {
var _ = A == "MMMM" ? $lang.aLongMonStr : $lang.aMonStr;
for (var B = 0; B < 12; B++)
if (_[B].toLowerCase() == $.substr(0, _[B].length).toLowerCase()) return B + 1;
return -1
}
},
_initRe: function(_) {
var B, $ = $dp[_],
A = "(?:";
if ($) {
for (B = 0; B < $.length; B++) {
A += this.doExp($[B]);
if (B != $.length - 1) A += "|"
}
A = new RegExp(A + ")")
} else A = null;
return A
},
update: function() {
var $ = this.getNewDateStr();
if ($dp.el[$dp.elProp] != $) $dp.el[$dp.elProp] = $;
this.setRealValue()
},
setRealValue: function($) {
var _ = $dp.$($dp.vel),
$ = rtn($, this.getNewDateStr($dp.realFmt));
if (_) _.value = $;
$dp.el["realValue"] = $
},
doExp: function(s) {
var ps = "yMdHms",
arr, tmpEval, re = /#?\{(.*?)\}/;
s = s + "";
for (var i = 0; i < ps.length; i++) s = s.replace("%" + ps.charAt(i), this.getP(ps.charAt(i), null, $tdt));
if (s.substring(0, 3) == "#F{") {
s = s.substring(3, s.length - 1);
if (s.indexOf("return ") < 0) s = "return " + s;
s = $dp.win.eval("new Function(\"" + s + "\");");
s = s()
} else
while ((arr = re.exec(s)) != null) {
arr.lastIndex = arr.index + arr[1].length + arr[0].length - arr[1].length - 1;
tmpEval = pInt(eval(arr[1]));
if (tmpEval < 0) tmpEval = "9700" + (-tmpEval);
s = s.substring(0, arr.index) + tmpEval + s.substring(arr.lastIndex + 1)
}
return s
},
doCustomDate: function(A, B, _) {
var $;
A = this.doExp(A);
if (!A || A == "") A = _;
if (typeof A == "object") $ = A;
else {
$ = this.splitDate(A, B, null, null, 1, 0, 0, 0, true);
$.y = ("" + $.y).replace(/^9700/, "-");
$.M = ("" + $.M).replace(/^9700/, "-");
$.d = ("" + $.d).replace(/^9700/, "-");
$.H = ("" + $.H).replace(/^9700/, "-");
$.m = ("" + $.m).replace(/^9700/, "-");
$.s = ("" + $.s).replace(/^9700/, "-");
if (A.indexOf("%ld") >= 0) {
A = A.replace(/%ld/g, "0");
$.d = 0;
$.M = pInt($.M) + 1
}
$.refresh()
}
return $
},
loadDate: function() {
var _, $;
if ($dp.alwaysUseStartDate || ($dp.startDate != "" && $dp.el[$dp.elProp] == "")) {
_ = this.doExp($dp.startDate);
$ = $dp.realFmt
} else {
_ = $dp.el[$dp.elProp];
$ = this.dateFmt
}
$dt.loadFromDate(this.splitDate(_, $));
if (_ != "") {
var A = 1;
if ($dp.has.sd && !this.isDate($dt)) {
$dt.y = $tdt.y;
$dt.M = $tdt.M;
$dt.d = $tdt.d;
A = 0
}
if ($dp.has.st && !this.isTime($dt)) {
$dt.H = $tdt.H;
$dt.m = $tdt.m;
$dt.s = $tdt.s;
A = 0
}
return A && this.checkValid($dt)
}
return 1
},
isDate: function($) {
if ($.y != null) $ = doStr($.y, 4) + "-" + $.M + "-" + $.d;
return $.match(/^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[0-9])|([1-2][0-3]))\:([0-5]?[0-9])((\s)|(\:([0-5]?[0-9])))))?$/)
},
isTime: function($) {
if ($.H != null) $ = $.H + ":" + $.m + ":" + $.s;
return $.match(/^([0-9]|([0-1][0-9])|([2][0-3])):([0-9]|([0-5][0-9])):([0-9]|([0-5][0-9]))$/)
},
checkRange: function($, A) {
$ = $ || $dt;
var _ = $.compareWith(this.minDate, A);
if (_ > 0) {
_ = $.compareWith(this.maxDate, A);
if (_ < 0) _ = 0
}
return _
},
checkValid: function($, A, B) {
A = A || $dp.has.minUnit;
var _ = this.checkRange($, A);
if (_ == 0) {
_ = 1;
if (A == "d" && B == null) B = Math.abs((new Date($.y, $.M - 1, $.d).getDay() - $dp.firstDayOfWeek) % 7);
_ = !this.testDisDay(B) && !this.testDisDate($, A)
} else _ = 0;
return _
},
checkAndUpdate: function() {
var _ = $dp.el,
A = this,
$ = $dp.el[$dp.elProp];
if ($ != null) {
if ($ != "") A.date.loadFromDate(A.splitDate($, A.dateFmt));
if ($ == "" || (A.isDate(A.date) && A.isTime(A.date) && A.checkValid(A.date))) {
if ($ != "") {
A.newdate.loadFromDate(A.date);
A.update()
} else A.setRealValue("")
} else return false
}
return true
},
close: function($) {
hideSel();
if (this.checkAndUpdate()) {
this.mark(true);
$dp.hide()
} else {
if ($) {
_cancelKey($);
this.mark(false, 2)
} else this.mark(false);
$dp.show()
}
},
_fd: function() {
var E, C, D, K, A, H = new sb(),
F = $lang.aWeekStr,
G = $dp.firstDayOfWeek,
I = "",
$ = "",
_ = new DPDate($dt.y, $dt.M, $dt.d, 0, 0, 0),
J = _.y,
B = _.M;
A = 1 - new Date(J, B - 1, 1).getDay() + G;
if (A > 1) A -= 7;
H.a("<table class=WdayTable width=100% border=0 cellspacing=0 cellpadding=0>");
H.a("<tr class=MTitle align=center>");
if ($dp.isShowWeek) H.a("<td>" + F[0] + "</td>");
for (E = 0; E < 7; E++) H.a("<td>" + F[(G + E) % 7 + 1] + "</td>");
H.a("</tr>");
for (E = 1, C = A; E < 7; E++) {
H.a("<tr>");
for (D = 0; D < 7; D++) {
_.loadDate(J, B, C++);
_.refresh();
if (_.M == B) {
K = true;
if (_.compareWith($sdt, "d") == 0) I = "Wselday";
else if (_.compareWith($tdt, "d") == 0) I = "Wtoday";
else I = ($dp.highLineWeekDay && (0 == (G + D) % 7 || 6 == (G + D) % 7) ? "Wwday" : "Wday");
$ = ($dp.highLineWeekDay && (0 == (G + D) % 7 || 6 == (G + D) % 7) ? "WwdayOn" : "WdayOn")
} else if ($dp.isShowOthers) {
K = true;
I = "WotherDay";
$ = "WotherDayOn"
} else K = false;
if ($dp.isShowWeek && D == 0 && (E < 4 || K)) H.a("<td class=Wweek>" + getWeek(_, $dp.firstDayOfWeek == 0 ? 1 : 0) + "</td>");
H.a("<td ");
if (K) {
if (this.checkValid(_, "d", D)) {
if (this.testSpeDay(Math.abs((new Date(_.y, _.M - 1, _.d).getDay() - $dp.firstDayOfWeek) % 7)) || this.testSpeDate(_)) I = "WspecialDay";
H.a("onclick=\"day_Click(" + _.y + "," + _.M + "," + _.d + ");\" ");
H.a("onmouseover=\"this.className='" + $ + "'\" ");
H.a("onmouseout=\"this.className='" + I + "'\" ")
} else I = "WinvalidDay";
H.a("class=" + I);
H.a(">" + _.d + "</td>")
} else H.a("></td>")
}
H.a("</tr>")
}
H.a("</table>");
return H.j()
},
testDisDate: function(_, A) {
var $ = this.testDate(_, this.ddateRe, A);
return (this.ddateRe && $dp.opposite) ? !$ : $
},
testDisDay: function($) {
return this.testDay($, this.ddayRe)
},
testSpeDate: function($) {
return this.testDate($, this.sdateRe)
},
testSpeDay: function($) {
return this.testDay($, this.sdayRe)
},
testDate: function($, B, A) {
var _ = A == "d" ? $dp.realDateFmt : $dp.realFmt;
return B ? B.test(this.getDateStr(_, $)) : 0
},
testDay: function(_, $) {
return $ ? $.test(_) : 0
},
_f: function(p, c, r, e, isR) {
var s = new sb(),
fp = isR ? "r" + p : p;
bak = $dt[p];
s.a("<table cellspacing=0 cellpadding=3 border=0");
for (var i = 0; i < r; i++) {
s.a("<tr nowrap=\"nowrap\">");
for (var j = 0; j < c; j++) {
s.a("<td nowrap ");
$dt[p] = eval(e);
if (($dp.opposite && this.checkRange($dt, p) == 0) || this.checkValid($dt, p)) {
s.a("class='menu' onmouseover=\"this.className='menuOn'\" onmouseout=\"this.className='menu'\" onmousedown=\"");
s.a("hide($d." + p + "D);$d." + fp + "I.value=" + $dt[p] + ";$d." + fp + "I.blur();\"")
} else s.a("class='invalidMenu'");
s.a(">" + (p == "M" ? $lang.aMonStr[$dt[p] - 1] : $dt[p]) + "</td>")
}
s.a("</tr>")
}
s.a("</table>");
$dt[p] = bak;
return s.j()
},
_fMyPos: function($, _) {
if ($) {
var A = $.offsetLeft;
if ($IE) A = $.getBoundingClientRect().left;
_.style.left = A
}
},
_fM: function($) {
this._fMyPos($, $d.MD);
$d.MD.innerHTML = this._f("M", 2, 6, "i+j*6+1", $ == $d.rMI)
},
_fy: function(_, A) {
var $ = new sb();
A = rtn(A, $dt.y - 5);
$.a(this._f("y", 2, 5, A + "+i+j*5", _ == $d.ryI));
$.a("<table cellspacing=0 cellpadding=3 border=0 align=center><tr><td ");
$.a(this.minDate.y < A ? "class='menu' onmouseover=\"this.className='menuOn'\" onmouseout=\"this.className='menu'\" onmousedown='if(event.preventDefault)event.preventDefault();event.cancelBubble=true;$c._fy(0," + (A - 10) + ")'" : "class='invalidMenu'");
$.a(">\u2190</td><td class='menu' onmouseover=\"this.className='menuOn'\" onmouseout=\"this.className='menu'\" onmousedown=\"hide($d.yD);$d.yI.blur();\">\xd7</td><td ");
$.a(this.maxDate.y > A + 10 ? "class='menu' onmouseover=\"this.className='menuOn'\" onmouseout=\"this.className='menu'\" onmousedown='if(event.preventDefault)event.preventDefault();event.cancelBubble=true;$c._fy(0," + (A + 10) + ")'" : "class='invalidMenu'");
$.a(">\u2192</td></tr></table>");
this._fMyPos(_, $d.yD);
$d.yD.innerHTML = $.j()
},
_fHMS: function(A, _, $) {
$d[A + "D"].innerHTML = this._f(A, 6, _, $)
},
_fH: function() {
this._fHMS("H", 4, "i * 6 + j")
},
_fm: function() {
this._fHMS("m", 2, "i * 30 + j * 5")
},
_fs: function() {
this._fHMS("s", 1, "j * 10")
},
_fillQS: function(A) {
this.initQS();
var _ = this.QS,
C = _.style,
$ = new sb();
$.a("<table class=WdayTable width=100% height=100% border=0 cellspacing=0 cellpadding=0>");
$.a("<tr class=MTitle><td><div style=\"float:left\">" + $lang.quickStr + "</div>");
if (!A) $.a("<div style=\"float:right;cursor:pointer\" onclick=\"hide($d.qsDivSel);\">\xd7</div>");
$.a("</td></tr>");
for (var B = 0; B < _.length; B++)
if (_[B]) {
$.a("<tr><td style='text-align:left' nowrap='nowrap' class='menu' onmouseover=\"this.className='menuOn'\" onmouseout=\"this.className='menu'\" onclick=\"");
$.a("day_Click(" + _[B].y + ", " + _[B].M + ", " + _[B].d + "," + _[B].H + "," + _[B].m + "," + _[B].s + ");\">");
$.a(" " + this.getDateStr(null, _[B]));
$.a("</td></tr>")
} else $.a("<tr><td class='menu'> </td></tr>");
$.a("</table>");
$d.qsDivSel.innerHTML = $.j()
},
_dealFmt: function() {
$(/w/);
$(/WW|W/);
$(/DD|D/);
$(/yyyy|yyy|yy|y/);
$(/MMMM|MMM|MM|M/);
$(/dd|d/);
$(/HH|H/);
$(/mm|m/);
$(/ss|s/);
$dp.has.sd = ($dp.has.y || $dp.has.M || $dp.has.d) ? true : false;
$dp.has.st = ($dp.has.H || $dp.has.m || $dp.has.s) ? true : false;
$dp.realFullFmt = $dp.realFullFmt.replace(/%Date/, $dp.realDateFmt).replace(/%Time/, $dp.realTimeFmt);
if ($dp.has.sd) {
if ($dp.has.st) $dp.realFmt = $dp.realFullFmt;
else $dp.realFmt = $dp.realDateFmt
} else $dp.realFmt = $dp.realTimeFmt;
function $(_) {
var $ = (_ + "").slice(1, 2);
$dp.has[$] = _.exec($dp.dateFmt) ? ($dp.has.minUnit = $, true) : false
}
},
initShowAndHide: function() {
var $ = 0;
$dp.has.y ? ($ = 1, show($d.yI, $d.navLeftImg, $d.navRightImg)) : hide($d.yI, $d.navLeftImg, $d.navRightImg);
$dp.has.M ? ($ = 1, show($d.MI, $d.leftImg, $d.rightImg)) : hide($d.MI, $d.leftImg, $d.rightImg);
$ ? show($d.titleDiv) : hide($d.titleDiv);
if ($dp.has.st) {
show($d.tDiv);
disHMS($d.HI, $dp.has.H);
disHMS($d.mI, $dp.has.m);
disHMS($d.sI, $dp.has.s)
} else hide($d.tDiv);
shorH($d.clearI, $dp.isShowClear);
shorH($d.todayI, $dp.isShowToday);
shorH($d.okI, $dp.isShowOK);
shorH($d.qsDiv, !$dp.doubleCalendar && $dp.has.d && $dp.qsEnabled);
if ($dp.eCont || !($dp.isShowClear || $dp.isShowToday || $dp.isShowOK)) hide($d.bDiv);
else show($d.bDiv)
},
mark: function(B, D) {
var A = $dp.el,
_ = $FF ? "class" : "className";
if (B) C(A);
else {
if (D == null) D = $dp.errDealMode;
switch (D) {
case 0:
if (confirm($lang.errAlertMsg)) {
A[$dp.elProp] = this.oldValue;
C(A)
} else $(A);
break;
case 1:
A[$dp.elProp] = this.oldValue;
C(A);
break;
case 2:
$(A);
break
}
}
function C(A) {
var B = A.className;
if (B) {
var $ = B.replace(/WdateFmtErr/g, "");
if (B != $) A.setAttribute(_, $)
}
}
function $($) {
$.setAttribute(_, $.className + " WdateFmtErr")
}
},
getP: function(D, _, $) {
$ = $ || $sdt;
var H, C = [D + D, D],
E, A = $[D],
F = function($) {
return doStr(A, $.length)
};
switch (D) {
case "w":
A = getDay($);
break;
case "D":
var G = getDay($) + 1;
F = function($) {
return $.length == 2 ? $lang.aLongWeekStr[G] : $lang.aWeekStr[G]
};
break;
case "W":
A = getWeek($);
break;
case "y":
C = ["yyyy", "yyy", "yy", "y"];
_ = _ || C[0];
F = function(_) {
return doStr((_.length < 4) ? (_.length < 3 ? $.y % 100 : ($.y + 2000 - $dp.yearOffset) % 1000) : A, _.length)
};
break;
case "M":
C = ["MMMM", "MMM", "MM", "M"];
F = function($) {
return ($.length == 4) ? $lang.aLongMonStr[A - 1] : ($.length == 3) ? $lang.aMonStr[A - 1] : doStr(A, $.length)
};
break
}
_ = _ || D + D;
if ("yMdHms".indexOf(D) > -1 && D != "y" && !$dp.has[D])
if ("Hms".indexOf(D) > -1) A = 0;
else A = 1;
var B = [];
for (H = 0; H < C.length; H++) {
E = C[H];
if (_.indexOf(E) >= 0) {
B[H] = F(E);
_ = _.replace(E, "{" + H + "}")
}
}
for (H = 0; H < B.length; H++) _ = _.replace(new RegExp("\\{" + H + "\\}", "g"), B[H]);
return _
},
getDateStr: function(_, $) {
$ = $ || this.splitDate($dp.el[$dp.elProp], this.dateFmt) || $sdt;
_ = _ || this.dateFmt;
if (_.indexOf("%ld") >= 0) {
var A = new DPDate();
A.loadFromDate($);
A.d = 0;
A.M = pInt(A.M) + 1;
A.refresh();
_ = _.replace(/%ld/g, A.d)
}
var B = "ydHmswW";
for (var D = 0; D < B.length; D++) {
var C = B.charAt(D);
_ = this.getP(C, _, $)
}
if ($dp.has["D"]) {
_ = _.replace(/DD/g, "%dd").replace(/D/g, "%d");
_ = this.getP("M", _, $);
_ = _.replace(/\%dd/g, this.getP("D", "DD")).replace(/\%d/g, this.getP("D", "D"))
} else _ = this.getP("M", _, $);
return _
},
getNewP: function(_, $) {
return this.getP(_, $, $dt)
},
getNewDateStr: function($) {
return this.getDateStr($, $dt)
},
draw: function() {
$d.rMD.innerHTML = "";
if ($dp.doubleCalendar) {
$c.autoPickDate = true;
$dp.isShowOthers = false;
$d.className = "WdateDiv WdateDiv2";
var $ = new sb();
$.a("<table class=WdayTable2 width=100% cellspacing=0 cellpadding=0 border=1><tr><td valign=top>");
$.a(this._fd());
$.a("</td><td valign=top>");
$dt.attr("M", 1);
$.a(this._fd());
$d.rMI = $d.MI.cloneNode(true);
$d.ryI = $d.yI.cloneNode(true);
$d.rMD.appendChild($d.rMI);
$d.rMD.appendChild($d.ryI);
$d.rMI.value = $lang.aMonStr[$dt.M - 1];
$d.rMI["realValue"] = $dt.M;
$d.ryI.value = $dt.y;
_inputBindEvent("rM,ry");
$d.rMI.className = $d.ryI.className = "yminput";
$dt.attr("M", -1);
$.a("</td></tr></table>");
$d.dDiv.innerHTML = $.j()
} else {
$d.className = "WdateDiv";
$d.dDiv.innerHTML = this._fd()
}
if (!$dp.has.d || $dp.autoShowQS) {
this._fillQS(true);
showB($d.qsDivSel)
} else hide($d.qsDivSel);
this.autoSize()
},
autoSize: function() {
var _ = parent.document.getElementsByTagName("iframe");
for (var C = 0; C < _.length; C++) {
var $ = $d.style.height;
$d.style.height = "";
var A = $d.offsetHeight;
if (_[C].contentWindow == window && A) {
_[C].style.width = $d.offsetWidth + "px";
var B = $d.tDiv.offsetHeight;
if (B && $d.bDiv.style.display == "none" && $d.tDiv.style.display != "none" && document.body.scrollHeight - A >= B) {
A += B;
$d.style.height = A
} else $d.style.height = $;
_[C].style.height = Math.max(A, $d.offsetHeight) + "px"
}
}
$d.qsDivSel.style.width = $d.dDiv.offsetWidth;
$d.qsDivSel.style.height = $d.dDiv.offsetHeight
},
pickDate: function() {
$dt.d = Math.min(new Date($dt.y, $dt.M, 0).getDate(), $dt.d);
$sdt.loadFromDate($dt);
this.update();
if (!$dp.eCont)
if (this.checkValid($dt)) {
elFocus();
hide($dp.dd)
}
if ($dp.onpicked) callFunc("onpicked")
},
initBtn: function() {
$d.clearI.onclick = function() {
if (!callFunc("onclearing")) {
$dp.el[$dp.elProp] = "";
$c.setRealValue("");
elFocus();
hide($dp.dd);
if ($dp.oncleared) callFunc("oncleared")
}
};
$d.okI.onclick = function() {
day_Click()
};
if (this.checkValid($tdt)) {
$d.todayI.disabled = false;
$d.todayI.onclick = function() {
$dt.loadFromDate($tdt);
day_Click()
}
} else $d.todayI.disabled = true
},
initQS: function() {
var H, G, A, F, C = [],
$ = 5,
E = $dp.quickSel.length,
_ = $dp.has.minUnit;
if (E > $) E = $;
else if (_ == "m" || _ == "s") C = [-60, -30, 0, 30, 60, -15, 15, -45, 45];
else
for (H = 0; H < $; H++) C[H] = $dt[_] - 2 + H;
for (H = G = 0; H < E; H++) {
A = this.doCustomDate($dp.quickSel[H]);
if (this.checkValid(A)) this.QS[G++] = A
}
var B = "yMdHms",
D = [1, 1, 1, 0, 0, 0];
for (H = 0; H <= B.indexOf(_); H++) D[H] = $dt[B.charAt(H)];
for (H = 0; G < $; H++)
if (H < C.length) {
A = new DPDate(D[0], D[1], D[2], D[3], D[4], D[5]);
A[_] = C[H];
A.refresh();
if (this.checkValid(A)) this.QS[G++] = A
} else this.QS[G++] = null
}
};
function elFocus() {
var _ = $dp.el;
try {
if (_.style.display != "none" && _.type != "hidden" && (_.nodeName.toLowerCase() == "input" || _.nodeName.toLowerCase() == "textarea")) {
if ($dp.srcEl == _) $dp.el["My97Mark"] = true;
$dp.el.focus();
return
}
} catch ($) {}
_["My97Mark"] = false
}
function sb() {
this.s = new Array();
this.i = 0;
this.a = function($) {
this.s[this.i++] = $
};
this.j = function() {
return this.s.join("")
}
}
function getWeek($, B) {
B = B || 0;
var _ = new Date($.y, $.M - 1, $.d + B);
_.setDate(_.getDate() - (_.getDay() + 6) % 7 + $dp.whichDayIsfirstWeek - 1);
var A = _.valueOf();
_.setMonth(0);
_.setDate(4);
return Math.round((A - _.valueOf()) / (7 * 86400000)) + 1
}
function getDay($) {
var _ = new Date($.y, $.M - 1, $.d);
return _.getDay()
}
function show() {
setDisp(arguments, "")
}
function showB() {
setDisp(arguments, "block")
}
function hide() {
setDisp(arguments, "none")
}
function setDisp(_, $) {
for (i = 0; i < _.length; i++) _[i].style.display = $
}
function shorH(_, $) {
$ ? show(_) : hide(_)
}
function disHMS(_, $) {
if ($) _.disabled = false;
else {
_.disabled = true;
_.value = "00"
}
}
function c(p, pv) {
if (p == "M") pv = makeInRange(pv, 1, 12);
else if (p == "H") pv = makeInRange(pv, 0, 23);
else if ("ms".indexOf(p) >= 0) pv = makeInRange(pv, 0, 59);
if ($sdt[p] != pv && !callFunc(p + "changing")) {
var func = "sv(\"" + p + "\"," + pv + ")",
rv = $c.checkRange();
if (rv == 0) eval(func);
else if (rv < 0) _setFrom($c.minDate);
else if (rv > 0) _setFrom($c.maxDate);
$d.okI.disabled = !$c.checkValid($sdt);
if ("yMd".indexOf(p) >= 0) $c.draw();
callFunc(p + "changed")
}
function _setFrom($) {
_setAll($c.checkValid($) ? $ : $sdt)
}
}
function _setAll($) {
sv("y", $.y);
sv("M", $.M);
sv("d", $.d);
sv("H", $.H);
sv("m", $.m);
sv("s", $.s)
}
function day_Click(F, B, _, D, C, A) {
var $ = new DPDate($dt.y, $dt.M, $dt.d, $dt.H, $dt.m, $dt.s);
$dt.loadDate(F, B, _, D, C, A);
if (!callFunc("onpicking")) {
var E = $.y == F && $.M == B && $.d == _;
if (!E && arguments.length != 0) {
c("y", F);
c("M", B);
c("d", _);
$c.currFocus = $dp.el;
if ($dp.autoUpdateOnChanged) $c.update()
}
if ($c.autoPickDate || E || arguments.length == 0) $c.pickDate()
} else $dt = $
}
function callFunc($) {
var _;
if ($dp[$]) _ = $dp[$].call($dp.el, $dp);
return _
}
function sv(_, $) {
if ($ == null) $ = $dt[_];
$sdt[_] = $dt[_] = $;
if ("yHms".indexOf(_) >= 0) $d[_ + "I"].value = $;
if (_ == "M") {
$d.MI["realValue"] = $;
$d.MI.value = $lang.aMonStr[$ - 1]
}
}
function makeInRange(_, $, A) {
if (_ < $) _ = $;
else if (_ > A) _ = A;
return _
}
function attachTabEvent($, _) {
$.attachEvent("onkeydown", function() {
var $ = event,
A = ($.which == undefined) ? $.keyCode : $.which;
if (A == 9) _()
})
}
function doStr($, _) {
$ = $ + "";
while ($.length < _) $ = "0" + $;
return $
}
function hideSel() {
hide($d.yD, $d.MD, $d.HD, $d.mD, $d.sD)
}
function updownEvent($) {
if ($c.currFocus == undefined) $c.currFocus = $d.HI;
switch ($c.currFocus) {
case $d.HI:
c("H", $dt.H + $);
break;
case $d.mI:
c("m", $dt.m + $);
break;
case $d.sI:
c("s", $dt.s + $);
break
}
if ($dp.autoUpdateOnChanged) $c.update()
}
function DPDate(D, A, $, C, B, _) {
this.loadDate(D, A, $, C, B, _)
}
DPDate.prototype = {
loadDate: function(E, B, _, D, C, A) {
var $ = new Date();
this.y = pInt3(E, this.y, $.getFullYear());
this.M = pInt3(B, this.M, $.getMonth() + 1);
this.d = $dp.has.d ? pInt3(_, this.d, $.getDate()) : 1;
this.H = pInt3(D, this.H, $.getHours());
this.m = pInt3(C, this.m, $.getMinutes());
this.s = pInt3(A, this.s, $.getSeconds())
},
loadFromDate: function($) {
if ($) this.loadDate($.y, $.M, $.d, $.H, $.m, $.s)
},
coverDate: function(E, B, _, D, C, A) {
var $ = new Date();
this.y = pInt3(this.y, E, $.getFullYear());
this.M = pInt3(this.M, B, $.getMonth() + 1);
this.d = $dp.has.d ? pInt3(this.d, _, $.getDate()) : 1;
this.H = pInt3(this.H, D, $.getHours());
this.m = pInt3(this.m, C, $.getMinutes());
this.s = pInt3(this.s, A, $.getSeconds())
},
compareWith: function($, C) {
var A = "yMdHms",
_, B;
C = A.indexOf(C);
C = C >= 0 ? C : 5;
for (var D = 0; D <= C; D++) {
B = A.charAt(D);
_ = this[B] - $[B];
if (_ > 0) return 1;
else if (_ < 0) return -1
}
return 0
},
refresh: function() {
var $ = new Date(this.y, this.M - 1, this.d, this.H, this.m, this.s);
this.y = $.getFullYear();
this.M = $.getMonth() + 1;
this.d = $.getDate();
this.H = $.getHours();
this.m = $.getMinutes();
this.s = $.getSeconds();
return !isNaN(this.y)
},
attr: function(_, $) {
if ("yMdHms".indexOf(_) >= 0) {
var A = this.d;
if (_ == "M") this.d = 1;
this[_] += $;
this.refresh();
this.d = A
}
}
};
function pInt($) {
return parseInt($, 10)
}
function pInt2($, _) {
return rtn(pInt($), _)
}
function pInt3($, A, _) {
return pInt2($, rtn(A, _))
}
function rtn($, _) {
return $ == null || isNaN($) ? _ : $
}
function fireEvent(A, $) {
if ($IE) A.fireEvent("on" + $);
else {
var _ = document.createEvent("HTMLEvents");
_.initEvent($, true, true);
A.dispatchEvent(_)
}
}
function _foundInput($) {
var A, B, _ = "y,M,H,m,s,ry,rM".split(",");
for (B = 0; B < _.length; B++) {
A = _[B];
if ($d[A + "I"] == $) return A.slice(A.length - 1, A.length)
}
return 0
}
function _focus($) {
var _ = _foundInput(this);
if (!_) return;
$c.currFocus = this;
if (_ == "y") this.className = "yminputfocus";
else if (_ == "M") {
this.className = "yminputfocus";
this.value = this["realValue"]
}
this.select();
$c["_f" + _](this);
showB($d[_ + "D"])
}
function _blur(showDiv) {
var p = _foundInput(this),
isR, mStr, v = this.value,
oldv = $dt[p];
if (p == 0) return;
$dt[p] = Number(v) >= 0 ? Number(v) : $dt[p];
if (p == "y") {
isR = this == $d.ryI;
if (isR && $dt.M == 12) $dt.y -= 1
} else if (p == "M") {
isR = this == $d.rMI;
if (isR) {
mStr = $lang.aMonStr[$dt[p] - 1];
if (oldv == 12) $dt.y += 1;
$dt.attr("M", -1)
}
if ($sdt.M == $dt.M) this.value = mStr || $lang.aMonStr[$dt[p] - 1];
if (($sdt.y != $dt.y)) c("y", $dt.y)
}
eval("c(\"" + p + "\"," + $dt[p] + ")");
if (showDiv !== true) {
if (p == "y" || p == "M") this.className = "yminput";
hide($d[p + "D"])
}
if ($dp.autoUpdateOnChanged) $c.update()
}
function _cancelKey($) {
if ($.preventDefault) {
$.preventDefault();
$.stopPropagation()
} else {
$.cancelBubble = true;
$.returnValue = false
}
if ($OPERA) $.keyCode = 0
}
function _inputBindEvent($) {
var A = $.split(",");
for (var B = 0; B < A.length; B++) {
var _ = A[B] + "I";
$d[_].onfocus = _focus;
$d[_].onblur = _blur
}
}
function _tab(M) {
var H = M.srcElement || M.target,
Q = M.which || M.keyCode;
isShow = $dp.dd.style.display != "none";
if (Q >= 96 && Q <= 105) Q -= 48;
if ($dp.enableKeyboard && isShow) {
if (!H.nextCtrl) {
H.nextCtrl = $dp.focusArr[1];
$c.currFocus = $dp.el
}
if (H == $dp.el) $c.currFocus = $dp.el;
if (Q == 27)
if (H == $dp.el) {
$c.close();
return
} else $dp.el.focus();
if (Q >= 37 && Q <= 40) {
var U;
if ($c.currFocus == $dp.el || $c.currFocus == $d.okI)
if ($dp.has.d) {
U = "d";
if (Q == 38) $dt[U] -= 7;
else if (Q == 39) $dt[U] += 1;
else if (Q == 37) $dt[U] -= 1;
else $dt[U] += 7;
$dt.refresh();
c("y", $dt["y"]);
c("M", $dt["M"]);
c("d", $dt[U]);
_cancelKey(M);
return
} else {
U = $dp.has.minUnit;
$d[U + "I"].focus()
}
U = U || _foundInput($c.currFocus);
if (U) {
if (Q == 38 || Q == 39) $dt[U] += 1;
else $dt[U] -= 1;
$dt.refresh();
$c.currFocus.value = $dt[U];
_blur.call($c.currFocus, true);
$c.currFocus.select()
}
} else if (Q == 9) {
var D = H.nextCtrl;
for (var R = 0; R < $dp.focusArr.length; R++)
if (D.disabled == true || D.offsetHeight == 0) D = D.nextCtrl;
else break;
if ($c.currFocus != D) {
$c.currFocus = D;
D.focus()
}
} else if (Q == 13) {
_blur.call($c.currFocus);
if ($c.currFocus.type == "button") $c.currFocus.click();
else $c.pickDate();
$c.currFocus = $dp.el
}
} else if (Q == 9 && H == $dp.el) $c.close();
if ($dp.enableInputMask && !$OPERA && !$dp.readOnly && $c.currFocus == $dp.el && (Q >= 48 && Q <= 57)) {
var T = $dp.el,
S = T.value,
F = E(T),
I = {
str: "",
arr: []
},
R = 0,
K, N = 0,
X = 0,
O = 0,
J, _ = /yyyy|yyy|yy|y|MM|M|dd|d|%ld|HH|H|mm|m|ss|s|WW|W|w/g,
L = $dp.dateFmt.match(_),
B, A, $, V, W, G, J = 0;
if (S != "") {
O = S.match(/[0-9]/g);
O = O == null ? 0 : O.length;
for (R = 0; R < L.length; R++) O -= Math.max(L[R].length, 2);
O = O >= 0 ? 1 : 0;
if (O == 1 && F >= S.length) F = S.length - 1
}
S = S.substring(0, F) + String.fromCharCode(Q) + S.substring(F + O);
F++;
for (R = 0; R < S.length; R++) {
var C = S.charAt(R);
if (/[0-9]/.test(C)) I.str += C;
else I.arr[R] = 1
}
S = "";
_.lastIndex = 0;
while ((K = _.exec($dp.dateFmt)) !== null) {
X = K.index - (K[0] == "%ld" ? 1 : 0);
if (N >= 0) {
S += $dp.dateFmt.substring(N, X);
if (F >= N + J && F <= X + J) F += X - N
}
N = _.lastIndex;
G = N - X;
B = I.str.substring(0, G);
A = K[0].charAt(0);
$ = pInt(B.charAt(0));
if (I.str.length > 1) {
V = I.str.charAt(1);
W = $ * 10 + pInt(V)
} else {
V = "";
W = $
}
if (I.arr[X + 1] || A == "M" && W > 12 || A == "d" && W > 31 || A == "H" && W > 23 || "ms".indexOf(A) >= 0 && W > 59) {
if (K[0].length == 2) B = "0" + $;
else B = $;
F++
} else if (G == 1) {
B = W;
G++;
J++
}
S += B;
I.str = I.str.substring(G);
if (I.str == "") break
}
T.value = S;
P(T, F);
_cancelKey(M)
}
if (isShow && $c.currFocus != $dp.el && !((Q >= 48 && Q <= 57) || Q == 8 || Q == 46)) _cancelKey(M);
function E(A) {
var _ = 0;
if ($dp.win.document.selection) {
var B = $dp.win.document.selection.createRange(),
$ = B.text.length;
B.moveStart("character", -A.value.length);
_ = B.text.length - $
} else if (A.selectionStart || A.selectionStart == "0") _ = A.selectionStart;
return _
}
function P(_, A) {
if (_.setSelectionRange) {
_.focus();
_.setSelectionRange(A, A)
} else if (_.createTextRange) {
var $ = _.createTextRange();
$.collapse(true);
$.moveEnd("character", A);
$.moveStart("character", A);
$.select()
}
}
}