/* Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ if (typeof YAHOO == "undefined" || !YAHOO) { var YAHOO = {}; } YAHOO.namespace = function() { var A = arguments, E = null, C, B, D; for (C = 0; C < A.length; C = C + 1) { D = ("" + A[C]).split("."); E = YAHOO; for (B = (D[0] == "YAHOO") ? 1 : 0; B < D.length; B = B + 1) { E[D[B]] = E[D[B]] || {}; E = E[D[B]]; } } return E; }; YAHOO.log = function(D, A, C) { var B = YAHOO.widget.Logger; if (B && B.log) { return B.log(D, A, C); } else { return false; } }; YAHOO.register = function(A, E, D) { var I = YAHOO.env.modules, B, H, G, F, C; if (!I[A]) { I[A] = { versions: [], builds: [] }; } B = I[A]; H = D.version; G = D.build; F = YAHOO.env.listeners; B.name = A; B.version = H; B.build = G; B.versions.push(H); B.builds.push(G); B.mainClass = E; for (C = 0; C < F.length; C = C + 1) { F[C](B); } if (E) { E.VERSION = H; E.BUILD = G; } else { YAHOO.log("mainClass is undefined for module " + A, "warn"); } }; YAHOO.env = YAHOO.env || { modules: [], listeners: [] }; YAHOO.env.getVersion = function(A) { return YAHOO.env.modules[A] || null; }; YAHOO.env.ua = function() { var D = function(H) { var I = 0; return parseFloat(H.replace(/\./g, function() { return (I++ == 1) ? "" : "."; })); }, G = navigator, F = { ie: 0, opera: 0, gecko: 0, webkit: 0, mobile: null, air: 0, caja: G.cajaVersion, secure: false, os: null }, C = navigator && navigator.userAgent, E = window && window.location, B = E && E.href, A; F.secure = B && (B.toLowerCase().indexOf("https") === 0); if (C) { if ((/windows|win32/i).test(C)) { F.os = "windows"; } else { if ((/macintosh/i).test(C)) { F.os = "macintosh"; } } if ((/KHTML/).test(C)) { F.webkit = 1; } A = C.match(/AppleWebKit\/([^\s]*)/); if (A && A[1]) { F.webkit = D(A[1]); if (/ Mobile\//.test(C)) { F.mobile = "Apple"; } else { A = C.match(/NokiaN[^\/]*/); if (A) { F.mobile = A[0]; } } A = C.match(/AdobeAIR\/([^\s]*)/); if (A) { F.air = A[0]; } } if (!F.webkit) { A = C.match(/Opera[\s\/]([^\s]*)/); if (A && A[1]) { F.opera = D(A[1]); A = C.match(/Opera Mini[^;]*/); if (A) { F.mobile = A[0]; } } else { A = C.match(/MSIE\s([^;]*)/); if (A && A[1]) { F.ie = D(A[1]); } else { A = C.match(/Gecko\/([^\s]*)/); if (A) { F.gecko = 1; A = C.match(/rv:([^\s\)]*)/); if (A && A[1]) { F.gecko = D(A[1]); } } } } } } return F; }(); (function() { YAHOO.namespace("util", "widget", "example"); if ("undefined" !== typeof YAHOO_config) { var B = YAHOO_config.listener, A = YAHOO.env.listeners, D = true, C; if (B) { for (C = 0; C < A.length; C++) { if (A[C] == B) { D = false; break; } } if (D) { A.push(B); } } } })(); YAHOO.lang = YAHOO.lang || {}; (function() { var B = YAHOO.lang, A = Object.prototype, H = "[object Array]", C = "[object Function]", G = "[object Object]", E = [], F = ["toString", "valueOf"], D = { isArray: function(I) { return A.toString.apply(I) === H; }, isBoolean: function(I) { return typeof I === "boolean"; }, isFunction: function(I) { return (typeof I === "function") || A.toString.apply(I) === C; }, isNull: function(I) { return I === null; }, isNumber: function(I) { return typeof I === "number" && isFinite(I); }, isObject: function(I) { return (I && (typeof I === "object" || B.isFunction(I))) || false; }, isString: function(I) { return typeof I === "string"; }, isUndefined: function(I) { return typeof I === "undefined"; }, _IEEnumFix: (YAHOO.env.ua.ie) ? function(K, J) { var I, M, L; for (I = 0; I < F.length; I = I + 1) { M = F[I]; L = J[M]; if (B.isFunction(L) && L != A[M]) { K[M] = L; } } } : function() {}, extend: function(L, M, K) { if (!M || !L) { throw new Error("extend failed, please check that " + "all dependencies are included."); } var J = function() {}, I; J.prototype = M.prototype; L.prototype = new J(); L.prototype.constructor = L; L.superclass = M.prototype; if (M.prototype.constructor == A.constructor) { M.prototype.constructor = M; } if (K) { for (I in K) { if (B.hasOwnProperty(K, I)) { L.prototype[I] = K[I]; } } B._IEEnumFix(L.prototype, K); } }, augmentObject: function(M, L) { if (!L || !M) { throw new Error("Absorb failed, verify dependencies."); } var I = arguments, K, N, J = I[2]; if (J && J !== true) { for (K = 2; K < I.length; K = K + 1) { M[I[K]] = L[I[K]]; } } else { for (N in L) { if (J || !(N in M)) { M[N] = L[N]; } } B._IEEnumFix(M, L); } }, augmentProto: function(L, K) { if (!K || !L) { throw new Error("Augment failed, verify dependencies."); } var I = [L.prototype, K.prototype], J; for (J = 2; J < arguments.length; J = J + 1) { I.push(arguments[J]); } B.augmentObject.apply(this, I); }, dump: function(I, N) { var K, M, P = [], Q = "{...}", J = "f(){...}", O = ", ", L = " => "; if (!B.isObject(I)) { return I + ""; } else { if (I instanceof Date || ("nodeType" in I && "tagName" in I)) { return I; } else { if (B.isFunction(I)) { return J; } } } N = (B.isNumber(N)) ? N : 3; if (B.isArray(I)) { P.push("["); for (K = 0, M = I.length; K < M; K = K + 1) { if (B.isObject(I[K])) { P.push((N > 0) ? B.dump(I[K], N - 1) : Q); } else { P.push(I[K]); } P.push(O); } if (P.length > 1) { P.pop(); } P.push("]"); } else { P.push("{"); for (K in I) { if (B.hasOwnProperty(I, K)) { P.push(K + L); if (B.isObject(I[K])) { P.push((N > 0) ? B.dump(I[K], N - 1) : Q); } else { P.push(I[K]); } P.push(O); } } if (P.length > 1) { P.pop(); } P.push("}"); } return P.join(""); }, substitute: function(Y, J, R) { var N, M, L, U, V, X, T = [], K, O = "dump", S = " ", I = "{", W = "}", Q, P; for (;;) { N = Y.lastIndexOf(I); if (N < 0) { break; } M = Y.indexOf(W, N); if (N + 1 >= M) { break; } K = Y.substring(N + 1, M); U = K; X = null; L = U.indexOf(S); if (L > -1) { X = U.substring(L + 1); U = U.substring(0, L); } V = J[U]; if (R) { V = R(U, V, X); } if (B.isObject(V)) { if (B.isArray(V)) { V = B.dump(V, parseInt(X, 10)); } else { X = X || ""; Q = X.indexOf(O); if (Q > -1) { X = X.substring(4); } P = V.toString(); if (P === G || Q > -1) { V = B.dump(V, parseInt(X, 10)); } else { V = P; } } } else { if (!B.isString(V) && !B.isNumber(V)) { V = "~-" + T.length + "-~"; T[T.length] = K; } } Y = Y.substring(0, N) + V + Y.substring(M + 1); } for (N = T.length - 1; N >= 0; N = N - 1) { Y = Y.replace(new RegExp("~-" + N + "-~"), "{" + T[N] + "}", "g"); } return Y; }, trim: function(I) { try { return I.replace(/^\s+|\s+$/g, ""); } catch (J) { return I; } }, merge: function() { var L = {}, J = arguments, I = J.length, K; for (K = 0; K < I; K = K + 1) { B.augmentObject(L, J[K], true); } return L; }, later: function(P, J, Q, L, M) { P = P || 0; J = J || {}; var K = Q, O = L, N, I; if (B.isString(Q)) { K = J[Q]; } if (!K) { throw new TypeError("method undefined"); } if (O && !B.isArray(O)) { O = [L]; } N = function() { K.apply(J, O || E); }; I = (M) ? setInterval(N, P) : setTimeout(N, P); return { interval: M, cancel: function() { if (this.interval) { clearInterval(I); } else { clearTimeout(I); } } }; }, isValue: function(I) { return (B.isObject(I) || B.isString(I) || B.isNumber(I) || B.isBoolean(I)); } }; B.hasOwnProperty = (A.hasOwnProperty) ? function(I, J) { return I && I.hasOwnProperty(J); } : function(I, J) { return !B.isUndefined(I[J]) && I.constructor.prototype[J] !== I[J]; }; D.augmentObject(B, D, true); YAHOO.util.Lang = B; B.augment = B.augmentProto; YAHOO.augment = B.augmentProto; YAHOO.extend = B.extend; })(); YAHOO.register("yahoo", YAHOO, { version: "2.8.0r4", build: "2449" }); // End of File include/javascript/yui/build/yahoo/yahoo-min.js /* * Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the * BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ (function() { YAHOO.env._id_counter = YAHOO.env._id_counter || 0; var E = YAHOO.util, L = YAHOO.lang, m = YAHOO.env.ua, A = YAHOO.lang.trim, d = {}, h = {}, N = /^t(?:able|d|h)$/i, X = /color$/i, K = window.document, W = K.documentElement, e = "ownerDocument", n = "defaultView", v = "documentElement", t = "compatMode", b = "offsetLeft", P = "offsetTop", u = "offsetParent", Z = "parentNode", l = "nodeType", C = "tagName", O = "scrollLeft", i = "scrollTop", Q = "getBoundingClientRect", w = "getComputedStyle", a = "currentStyle", M = "CSS1Compat", c = "BackCompat", g = "class", F = "className", J = "", B = " ", s = "(?:^|\\s)", k = "(?= |$)", U = "g", p = "position", f = "fixed", V = "relative", j = "left", o = "top", r = "medium", q = "borderLeftWidth", R = "borderTopWidth", D = m.opera, I = m.webkit, H = m.gecko, T = m.ie; E.Dom = { CUSTOM_ATTRIBUTES: (!W.hasAttribute) ? { "for": "htmlFor", "class": F } : { "htmlFor": "for", "className": g }, DOT_ATTRIBUTES: {}, get: function(z) { var AB, x, AA, y, Y, G; if (z) { if (z[l] || z.item) { return z; } if (typeof z === "string") { AB = z; z = K.getElementById(z); G = (z) ? z.attributes : null; if (z && G && G.id && G.id.value === AB) { return z; } else { if (z && K.all) { z = null; x = K.all[AB]; for (y = 0, Y = x.length; y < Y; ++y) { if (x[y].id === AB) { return x[y]; } } } } return z; } if (YAHOO.util.Element && z instanceof YAHOO.util.Element) { z = z.get("element"); } if ("length" in z) { AA = []; for (y = 0, Y = z.length; y < Y; ++y) { AA[AA.length] = E.Dom.get(z[y]); } return AA; } return z; } return null; }, getComputedStyle: function(G, Y) { if (window[w]) { return G[e][n][w](G, null)[Y]; } else { if (G[a]) { return E.Dom.IE_ComputedStyle.get(G, Y); } } }, getStyle: function(G, Y) { return E.Dom.batch(G, E.Dom._getStyle, Y); }, _getStyle: function() { if (window[w]) { return function(G, y) { y = (y === "float") ? y = "cssFloat" : E.Dom._toCamel(y); var x = G.style[y], Y; if (!x) { Y = G[e][n][w](G, null); if (Y) { x = Y[y]; } } return x; }; } else { if (W[a]) { return function(G, y) { var x; switch (y) { case "opacity": x = 100; try { x = G.filters["DXImageTransform.Microsoft.Alpha"].opacity; } catch (z) { try { x = G.filters("alpha").opacity; } catch (Y) {} } return x / 100; case "float": y = "styleFloat"; default: y = E.Dom._toCamel(y); x = G[a] ? G[a][y] : null; return (G.style[y] || x); } }; } } }(), setStyle: function(G, Y, x) { E.Dom.batch(G, E.Dom._setStyle, { prop: Y, val: x }); }, _setStyle: function() { if (T) { return function(Y, G) { var x = E.Dom._toCamel(G.prop), y = G.val; if (Y) { switch (x) { case "opacity": if (L.isString(Y.style.filter)) { Y.style.filter = "alpha(opacity=" + y * 100 + ")"; if (!Y[a] || !Y[a].hasLayout) { Y.style.zoom = 1; } } break; case "float": x = "styleFloat"; default: Y.style[x] = y; } } else {} }; } else { return function(Y, G) { var x = E.Dom._toCamel(G.prop), y = G.val; if (Y) { if (x == "float") { x = "cssFloat"; } Y.style[x] = y; } else {} }; } }(), getXY: function(G) { return E.Dom.batch(G, E.Dom._getXY); }, _canPosition: function(G) { return (E.Dom._getStyle(G, "display") !== "none" && E.Dom._inDoc(G)); }, _getXY: function() { if (K[v][Q]) { return function(y) { var z, Y, AA, AF, AE, AD, AC, G, x, AB = Math.floor, AG = false; if (E.Dom._canPosition(y)) { AA = y[Q](); AF = y[e]; z = E.Dom.getDocumentScrollLeft(AF); Y = E.Dom.getDocumentScrollTop(AF); AG = [AB(AA[j]), AB(AA[o])]; if (T && m.ie < 8) { AE = 2; AD = 2; AC = AF[t]; if (m.ie === 6) { if (AC !== c) { AE = 0; AD = 0; } } if ((AC === c)) { G = S(AF[v], q); x = S(AF[v], R); if (G !== r) { AE = parseInt(G, 10); } if (x !== r) { AD = parseInt(x, 10); } } AG[0] -= AE; AG[1] -= AD; } if ((Y || z)) { AG[0] += z; AG[1] += Y; } AG[0] = AB(AG[0]); AG[1] = AB(AG[1]); } else {} return AG; }; } else { return function(y) { var x, Y, AA, AB, AC, z = false, G = y; if (E.Dom._canPosition(y)) { z = [y[b], y[P]]; x = E.Dom.getDocumentScrollLeft(y[e]); Y = E.Dom.getDocumentScrollTop(y[e]); AC = ((H || m.webkit > 519) ? true : false); while ((G = G[u])) { z[0] += G[b]; z[1] += G[P]; if (AC) { z = E.Dom._calcBorders(G, z); } } if (E.Dom._getStyle(y, p) !== f) { G = y; while ((G = G[Z]) && G[C]) { AA = G[i]; AB = G[O]; if (H && (E.Dom._getStyle(G, "overflow") !== "visible")) { z = E.Dom._calcBorders(G, z); } if (AA || AB) { z[0] -= AB; z[1] -= AA; } } z[0] += x; z[1] += Y; } else { if (D) { z[0] -= x; z[1] -= Y; } else { if (I || H) { z[0] += x; z[1] += Y; } } } z[0] = Math.floor(z[0]); z[1] = Math.floor(z[1]); } else {} return z; }; } }(), getX: function(G) { var Y = function(x) { return E.Dom.getXY(x)[0]; }; return E.Dom.batch(G, Y, E.Dom, true); }, getY: function(G) { var Y = function(x) { return E.Dom.getXY(x)[1]; }; return E.Dom.batch(G, Y, E.Dom, true); }, setXY: function(G, x, Y) { E.Dom.batch(G, E.Dom._setXY, { pos: x, noRetry: Y }); }, _setXY: function(G, z) { var AA = E.Dom._getStyle(G, p), y = E.Dom.setStyle, AD = z.pos, Y = z.noRetry, AB = [parseInt(E.Dom.getComputedStyle(G, j), 10), parseInt(E.Dom.getComputedStyle(G, o), 10)], AC, x; if (AA == "static") { AA = V; y(G, p, AA); } AC = E.Dom._getXY(G); if (!AD || AC === false) { return false; } if (isNaN(AB[0])) { AB[0] = (AA == V) ? 0 : G[b]; } if (isNaN(AB[1])) { AB[1] = (AA == V) ? 0 : G[P]; } if (AD[0] !== null) { y(G, j, AD[0] - AC[0] + AB[0] + "px"); } if (AD[1] !== null) { y(G, o, AD[1] - AC[1] + AB[1] + "px"); } if (!Y) { x = E.Dom._getXY(G); if ((AD[0] !== null && x[0] != AD[0]) || (AD[1] !== null && x[1] != AD[1])) { E.Dom._setXY(G, { pos: AD, noRetry: true }); } } }, setX: function(Y, G) { E.Dom.setXY(Y, [G, null]); }, setY: function(G, Y) { E.Dom.setXY(G, [null, Y]); }, getRegion: function(G) { var Y = function(x) { var y = false; if (E.Dom._canPosition(x)) { y = E.Region.getRegion(x); } else {} return y; }; return E.Dom.batch(G, Y, E.Dom, true); }, getClientWidth: function() { return E.Dom.getViewportWidth(); }, getClientHeight: function() { return E.Dom.getViewportHeight(); }, getElementsByClassName: function(AB, AF, AC, AE, x, AD) { AF = AF || "*"; AC = (AC) ? E.Dom.get(AC) : null || K; if (!AC) { return []; } var Y = [], G = AC.getElementsByTagName(AF), z = E.Dom.hasClass; for (var y = 0, AA = G.length; y < AA; ++y) { if (z(G[y], AB)) { Y[Y.length] = G[y]; } } if (AE) { E.Dom.batch(Y, AE, x, AD); } return Y; }, hasClass: function(Y, G) { return E.Dom.batch(Y, E.Dom._hasClass, G); }, _hasClass: function(x, Y) { var G = false, y; if (x && Y) { y = E.Dom._getAttribute(x, F) || J; if (Y.exec) { G = Y.test(y); } else { G = Y && (B + y + B).indexOf(B + Y + B) > -1; } } else {} return G; }, addClass: function(Y, G) { return E.Dom.batch(Y, E.Dom._addClass, G); }, _addClass: function(x, Y) { var G = false, y; if (x && Y) { y = E.Dom._getAttribute(x, F) || J; if (!E.Dom._hasClass(x, Y)) { E.Dom.setAttribute(x, F, A(y + B + Y)); G = true; } } else {} return G; }, removeClass: function(Y, G) { return E.Dom.batch(Y, E.Dom._removeClass, G); }, _removeClass: function(y, x) { var Y = false, AA, z, G; if (y && x) { AA = E.Dom._getAttribute(y, F) || J; E.Dom.setAttribute(y, F, AA.replace(E.Dom._getClassRegex(x), J)); z = E.Dom._getAttribute(y, F); if (AA !== z) { E.Dom.setAttribute(y, F, A(z)); Y = true; if (E.Dom._getAttribute(y, F) === "") { G = (y.hasAttribute && y.hasAttribute(g)) ? g : F; y.removeAttribute(G); } } } else {} return Y; }, replaceClass: function(x, Y, G) { return E.Dom.batch(x, E.Dom._replaceClass, { from: Y, to: G }); }, _replaceClass: function(y, x) { var Y, AB, AA, G = false, z; if (y && x) { AB = x.from; AA = x.to; if (!AA) { G = false; } else { if (!AB) { G = E.Dom._addClass(y, x.to); } else { if (AB !== AA) { z = E.Dom._getAttribute(y, F) || J; Y = (B + z.replace(E.Dom._getClassRegex(AB), B + AA)).split(E.Dom._getClassRegex(AA)); Y.splice(1, 0, B + AA); E.Dom.setAttribute(y, F, A(Y.join(J))); G = true; } } } } else {} return G; }, generateId: function(G, x) { x = x || "yui-gen"; var Y = function(y) { if (y && y.id) { return y.id; } var z = x + YAHOO.env._id_counter++; if (y) { if (y[e] && y[e].getElementById(z)) { return E.Dom.generateId(y, z + x); } y.id = z; } return z; }; return E.Dom.batch(G, Y, E.Dom, true) || Y.apply(E.Dom, arguments); }, isAncestor: function(Y, x) { Y = E.Dom.get(Y); x = E.Dom.get(x); var G = false; if ((Y && x) && (Y[l] && x[l])) { if (Y.contains && Y !== x) { G = Y.contains(x); } else { if (Y.compareDocumentPosition) { G = !!(Y.compareDocumentPosition(x) & 16); } } } else {} return G; }, inDocument: function(G, Y) { return E.Dom._inDoc(E.Dom.get(G), Y); }, _inDoc: function(Y, x) { var G = false; if (Y && Y[C]) { x = x || Y[e]; G = E.Dom.isAncestor(x[v], Y); } else {} return G; }, getElementsBy: function(Y, AF, AB, AD, y, AC, AE) { AF = AF || "*"; AB = (AB) ? E.Dom.get(AB) : null || K; if (!AB) { return []; } var x = [], G = AB.getElementsByTagName(AF); for (var z = 0, AA = G.length; z < AA; ++z) { if (Y(G[z])) { if (AE) { x = G[z]; break; } else { x[x.length] = G[z]; } } } if (AD) { E.Dom.batch(x, AD, y, AC); } return x; }, getElementBy: function(x, G, Y) { return E.Dom.getElementsBy(x, G, Y, null, null, null, true); }, batch: function(x, AB, AA, z) { var y = [], Y = (z) ? AA : window; x = (x && (x[C] || x.item)) ? x : E.Dom.get(x); if (x && AB) { if (x[C] || x.length === undefined) { return AB.call(Y, x, AA); } for (var G = 0; G < x.length; ++G) { y[y.length] = AB.call(Y, x[G], AA); } } else { return false; } return y; }, getDocumentHeight: function() { var Y = (K[t] != M || I) ? K.body.scrollHeight : W.scrollHeight, G = Math.max(Y, E.Dom.getViewportHeight()); return G; }, getDocumentWidth: function() { var Y = (K[t] != M || I) ? K.body.scrollWidth : W.scrollWidth, G = Math.max(Y, E.Dom.getViewportWidth()); return G; }, getViewportHeight: function() { var G = self.innerHeight, Y = K[t]; if ((Y || T) && !D) { G = (Y == M) ? W.clientHeight : K.body.clientHeight; } return G; }, getViewportWidth: function() { var G = self.innerWidth, Y = K[t]; if (Y || T) { G = (Y == M) ? W.clientWidth : K.body.clientWidth; } return G; }, getAncestorBy: function(G, Y) { while ((G = G[Z])) { if (E.Dom._testElement(G, Y)) { return G; } } return null; }, getAncestorByClassName: function(Y, G) { Y = E.Dom.get(Y); if (!Y) { return null; } var x = function(y) { return E.Dom.hasClass(y, G); }; return E.Dom.getAncestorBy(Y, x); }, getAncestorByTagName: function(Y, G) { Y = E.Dom.get(Y); if (!Y) { return null; } var x = function(y) { return y[C] && y[C].toUpperCase() == G.toUpperCase(); }; return E.Dom.getAncestorBy(Y, x); }, getPreviousSiblingBy: function(G, Y) { while (G) { G = G.previousSibling; if (E.Dom._testElement(G, Y)) { return G; } } return null; }, getPreviousSibling: function(G) { G = E.Dom.get(G); if (!G) { return null; } return E.Dom.getPreviousSiblingBy(G); }, getNextSiblingBy: function(G, Y) { while (G) { G = G.nextSibling; if (E.Dom._testElement(G, Y)) { return G; } } return null; }, getNextSibling: function(G) { G = E.Dom.get(G); if (!G) { return null; } return E.Dom.getNextSiblingBy(G); }, getFirstChildBy: function(G, x) { var Y = (E.Dom._testElement(G.firstChild, x)) ? G.firstChild : null; return Y || E.Dom.getNextSiblingBy(G.firstChild, x); }, getFirstChild: function(G, Y) { G = E.Dom.get(G); if (!G) { return null; } return E.Dom.getFirstChildBy(G); }, getLastChildBy: function(G, x) { if (!G) { return null; } var Y = (E.Dom._testElement(G.lastChild, x)) ? G.lastChild : null; return Y || E.Dom.getPreviousSiblingBy(G.lastChild, x); }, getLastChild: function(G) { G = E.Dom.get(G); return E.Dom.getLastChildBy(G); }, getChildrenBy: function(Y, y) { var x = E.Dom.getFirstChildBy(Y, y), G = x ? [x] : []; E.Dom.getNextSiblingBy(x, function(z) { if (!y || y(z)) { G[G.length] = z; } return false; }); return G; }, getChildren: function(G) { G = E.Dom.get(G); if (!G) {} return E.Dom.getChildrenBy(G); }, getDocumentScrollLeft: function(G) { G = G || K; return Math.max(G[v].scrollLeft, G.body.scrollLeft); }, getDocumentScrollTop: function(G) { G = G || K; return Math.max(G[v].scrollTop, G.body.scrollTop); }, insertBefore: function(Y, G) { Y = E.Dom.get(Y); G = E.Dom.get(G); if (!Y || !G || !G[Z]) { return null; } return G[Z].insertBefore(Y, G); }, insertAfter: function(Y, G) { Y = E.Dom.get(Y); G = E.Dom.get(G); if (!Y || !G || !G[Z]) { return null; } if (G.nextSibling) { return G[Z].insertBefore(Y, G.nextSibling); } else { return G[Z].appendChild(Y); } }, getClientRegion: function() { var x = E.Dom.getDocumentScrollTop(), Y = E.Dom.getDocumentScrollLeft(), y = E.Dom.getViewportWidth() + Y, G = E.Dom.getViewportHeight() + x; return new E.Region(x, y, G, Y); }, setAttribute: function(Y, G, x) { E.Dom.batch(Y, E.Dom._setAttribute, { attr: G, val: x }); }, _setAttribute: function(x, Y) { var G = E.Dom._toCamel(Y.attr), y = Y.val; if (x && x.setAttribute) { if (E.Dom.DOT_ATTRIBUTES[G]) { x[G] = y; } else { G = E.Dom.CUSTOM_ATTRIBUTES[G] || G; x.setAttribute(G, y); } } else {} }, getAttribute: function(Y, G) { return E.Dom.batch(Y, E.Dom._getAttribute, G); }, _getAttribute: function(Y, G) { var x; G = E.Dom.CUSTOM_ATTRIBUTES[G] || G; if (Y && Y.getAttribute) { x = Y.getAttribute(G, 2); } else {} return x; }, _toCamel: function(Y) { var x = d; function G(y, z) { return z.toUpperCase(); } return x[Y] || (x[Y] = Y.indexOf("-") === -1 ? Y : Y.replace(/-([a-z])/gi, G)); }, _getClassRegex: function(Y) { var G; if (Y !== undefined) { if (Y.exec) { G = Y; } else { G = h[Y]; if (!G) { Y = Y.replace(E.Dom._patterns.CLASS_RE_TOKENS, "\\$1"); G = h[Y] = new RegExp(s + Y + k, U); } } } return G; }, _patterns: { ROOT_TAG: /^body|html$/i, CLASS_RE_TOKENS: /([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g }, _testElement: function(G, Y) { return G && G[l] == 1 && (!Y || Y(G)); }, _calcBorders: function(x, y) { var Y = parseInt(E.Dom[w](x, R), 10) || 0, G = parseInt(E.Dom[w](x, q), 10) || 0; if (H) { if (N.test(x[C])) { Y = 0; G = 0; } } y[0] += G; y[1] += Y; return y; } }; var S = E.Dom[w]; if (m.opera) { E.Dom[w] = function(Y, G) { var x = S(Y, G); if (X.test(G)) { x = E.Dom.Color.toRGB(x); } return x; }; } if (m.webkit) { E.Dom[w] = function(Y, G) { var x = S(Y, G); if (x === "rgba(0, 0, 0, 0)") { x = "transparent"; } return x; }; } if (m.ie && m.ie >= 8 && K.documentElement.hasAttribute) { E.Dom.DOT_ATTRIBUTES.type = true; } })(); YAHOO.util.Region = function(C, D, A, B) { this.top = C; this.y = C; this[1] = C; this.right = D; this.bottom = A; this.left = B; this.x = B; this[0] = B; this.width = this.right - this.left; this.height = this.bottom - this.top; }; YAHOO.util.Region.prototype.contains = function(A) { return (A.left >= this.left && A.right <= this.right && A.top >= this.top && A.bottom <= this.bottom); }; YAHOO.util.Region.prototype.getArea = function() { return ((this.bottom - this.top) * (this.right - this.left)); }; YAHOO.util.Region.prototype.intersect = function(E) { var C = Math.max(this.top, E.top), D = Math.min(this.right, E.right), A = Math.min(this.bottom, E.bottom), B = Math.max(this.left, E.left); if (A >= C && D >= B) { return new YAHOO.util.Region(C, D, A, B); } else { return null; } }; YAHOO.util.Region.prototype.union = function(E) { var C = Math.min(this.top, E.top), D = Math.max(this.right, E.right), A = Math.max(this.bottom, E.bottom), B = Math.min(this.left, E.left); return new YAHOO.util.Region(C, D, A, B); }; YAHOO.util.Region.prototype.toString = function() { return ("Region {" + "top: " + this.top + ", right: " + this.right + ", bottom: " + this.bottom + ", left: " + this.left + ", height: " + this.height + ", width: " + this.width + "}"); }; YAHOO.util.Region.getRegion = function(D) { var F = YAHOO.util.Dom.getXY(D), C = F[1], E = F[0] + D.offsetWidth, A = F[1] + D.offsetHeight, B = F[0]; return new YAHOO.util.Region(C, E, A, B); }; YAHOO.util.Point = function(A, B) { if (YAHOO.lang.isArray(A)) { B = A[1]; A = A[0]; } YAHOO.util.Point.superclass.constructor.call(this, B, A, B, A); }; YAHOO.extend(YAHOO.util.Point, YAHOO.util.Region); (function() { var B = YAHOO.util, A = "clientTop", F = "clientLeft", J = "parentNode", K = "right", W = "hasLayout", I = "px", U = "opacity", L = "auto", D = "borderLeftWidth", G = "borderTopWidth", P = "borderRightWidth", V = "borderBottomWidth", S = "visible", Q = "transparent", N = "height", E = "width", H = "style", T = "currentStyle", R = /^width|height$/, O = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i, M = { get: function(X, Z) { var Y = "", a = X[T][Z]; if (Z === U) { Y = B.Dom.getStyle(X, U); } else { if (!a || (a.indexOf && a.indexOf(I) > -1)) { Y = a; } else { if (B.Dom.IE_COMPUTED[Z]) { Y = B.Dom.IE_COMPUTED[Z](X, Z); } else { if (O.test(a)) { Y = B.Dom.IE.ComputedStyle.getPixel(X, Z); } else { Y = a; } } } } return Y; }, getOffset: function(Z, e) { var b = Z[T][e], X = e.charAt(0).toUpperCase() + e.substr(1), c = "offset" + X, Y = "pixel" + X, a = "", d; if (b == L) { d = Z[c]; if (d === undefined) { a = 0; } a = d; if (R.test(e)) { Z[H][e] = d; if (Z[c] > d) { a = d - (Z[c] - d); } Z[H][e] = L; } } else { if (!Z[H][Y] && !Z[H][e]) { Z[H][e] = b; } a = Z[H][Y]; } return a + I; }, getBorderWidth: function(X, Z) { var Y = null; if (!X[T][W]) { X[H].zoom = 1; } switch (Z) { case G: Y = X[A]; break; case V: Y = X.offsetHeight - X.clientHeight - X[A]; break; case D: Y = X[F]; break; case P: Y = X.offsetWidth - X.clientWidth - X[F]; break; } return Y + I; }, getPixel: function(Y, X) { var a = null, b = Y[T][K], Z = Y[T][X]; Y[H][K] = Z; a = Y[H].pixelRight; Y[H][K] = b; return a + I; }, getMargin: function(Y, X) { var Z; if (Y[T][X] == L) { Z = 0 + I; } else { Z = B.Dom.IE.ComputedStyle.getPixel(Y, X); } return Z; }, getVisibility: function(Y, X) { var Z; while ((Z = Y[T]) && Z[X] == "inherit") { Y = Y[J]; } return (Z) ? Z[X] : S; }, getColor: function(Y, X) { return B.Dom.Color.toRGB(Y[T][X]) || Q; }, getBorderColor: function(Y, X) { var Z = Y[T], a = Z[X] || Z.color; return B.Dom.Color.toRGB(B.Dom.Color.toHex(a)); } }, C = {}; C.top = C.right = C.bottom = C.left = C[E] = C[N] = M.getOffset; C.color = M.getColor; C[G] = C[P] = C[V] = C[D] = M.getBorderWidth; C.marginTop = C.marginRight = C.marginBottom = C.marginLeft = M.getMargin; C.visibility = M.getVisibility; C.borderColor = C.borderTopColor = C.borderRightColor = C.borderBottomColor = C.borderLeftColor = M.getBorderColor; B.Dom.IE_COMPUTED = C; B.Dom.IE_ComputedStyle = M; })(); (function() { var C = "toString", A = parseInt, B = RegExp, D = YAHOO.util; D.Dom.Color = { KEYWORDS: { black: "000", silver: "c0c0c0", gray: "808080", white: "fff", maroon: "800000", red: "f00", purple: "800080", fuchsia: "f0f", green: "008000", lime: "0f0", olive: "808000", yellow: "ff0", navy: "000080", blue: "00f", teal: "008080", aqua: "0ff" }, re_RGB: /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, re_hex: /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i, re_hex3: /([0-9A-F])/gi, toRGB: function(E) { if (!D.Dom.Color.re_RGB.test(E)) { E = D.Dom.Color.toHex(E); } if (D.Dom.Color.re_hex.exec(E)) { E = "rgb(" + [A(B.$1, 16), A(B.$2, 16), A(B.$3, 16)].join(", ") + ")"; } return E; }, toHex: function(H) { H = D.Dom.Color.KEYWORDS[H] || H; if (D.Dom.Color.re_RGB.exec(H)) { var G = (B.$1.length === 1) ? "0" + B.$1 : Number(B.$1), F = (B.$2.length === 1) ? "0" + B.$2 : Number(B.$2), E = (B.$3.length === 1) ? "0" + B.$3 : Number(B.$3); H = [G[C](16), F[C](16), E[C](16)].join(""); } if (H.length < 6) { H = H.replace(D.Dom.Color.re_hex3, "$1$1"); } if (H !== "transparent" && H.indexOf("#") < 0) { H = "#" + H; } return H.toLowerCase(); } }; }()); YAHOO.register("dom", YAHOO.util.Dom, { version: "2.8.0r4", build: "2449" }); // End // of // File // include/javascript/yui/build/dom/dom-min.js /* * Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the * BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ YAHOO.util.CustomEvent = function(D, C, B, A, E) { this.type = D; this.scope = C || window; this.silent = B; this.fireOnce = E; this.fired = false; this.firedWith = null; this.signature = A || YAHOO.util.CustomEvent.LIST; this.subscribers = []; if (!this.silent) {} var F = "_YUICEOnSubscribe"; if (D !== F) { this.subscribeEvent = new YAHOO.util.CustomEvent(F, this, true); } this.lastError = null; }; YAHOO.util.CustomEvent.LIST = 0; YAHOO.util.CustomEvent.FLAT = 1; YAHOO.util.CustomEvent.prototype = { subscribe: function(B, C, D) { if (!B) { throw new Error("Invalid callback for subscriber to '" + this.type + "'"); } if (this.subscribeEvent) { this.subscribeEvent.fire(B, C, D); } var A = new YAHOO.util.Subscriber(B, C, D); if (this.fireOnce && this.fired) { this.notify(A, this.firedWith); } else { this.subscribers.push(A); } }, unsubscribe: function(D, F) { if (!D) { return this.unsubscribeAll(); } var E = false; for (var B = 0, A = this.subscribers.length; B < A; ++B) { var C = this.subscribers[B]; if (C && C.contains(D, F)) { this._delete(B); E = true; } } return E; }, fire: function() { this.lastError = null; var H = [], A = this.subscribers.length; var D = [].slice.call(arguments, 0), C = true, F, B = false; if (this.fireOnce) { if (this.fired) { return true; } else { this.firedWith = D; } } this.fired = true; if (!A && this.silent) { return true; } if (!this.silent) {} var E = this.subscribers.slice(); for (F = 0; F < A; ++F) { var G = E[F]; if (!G) { B = true; } else { C = this.notify(G, D); if (false === C) { if (!this.silent) {} break; } } } return (C !== false); }, notify: function(F, C) { var B, H = null, E = F.getScope(this.scope), A = YAHOO.util.Event.throwErrors; if (!this.silent) {} if (this.signature == YAHOO.util.CustomEvent.FLAT) { if (C.length > 0) { H = C[0]; } try { B = F.fn.call(E, H, F.obj); } catch (G) { this.lastError = G; if (A) { throw G; } } } else { try { B = F.fn.call(E, this.type, C, F.obj); } catch (D) { this.lastError = D; if (A) { throw D; } } } return B; }, unsubscribeAll: function() { var A = this.subscribers.length, B; for (B = A - 1; B > -1; B--) { this._delete(B); } this.subscribers = []; return A; }, _delete: function(A) { var B = this.subscribers[A]; if (B) { delete B.fn; delete B.obj; } this.subscribers.splice(A, 1); }, toString: function() { return "CustomEvent: " + "'" + this.type + "', " + "context: " + this.scope; } }; YAHOO.util.Subscriber = function(A, B, C) { this.fn = A; this.obj = YAHOO.lang.isUndefined(B) ? null : B; this.overrideContext = C; }; YAHOO.util.Subscriber.prototype.getScope = function(A) { if (this.overrideContext) { if (this.overrideContext === true) { return this.obj; } else { return this.overrideContext; } } return A; }; YAHOO.util.Subscriber.prototype.contains = function(A, B) { if (B) { return (this.fn == A && this.obj == B); } else { return (this.fn == A); } }; YAHOO.util.Subscriber.prototype.toString = function() { return "Subscriber { obj: " + this.obj + ", overrideContext: " + (this.overrideContext || "no") + " }"; }; if (!YAHOO.util.Event) { YAHOO.util.Event = function() { var G = false, H = [], J = [], A = 0, E = [], B = 0, C = { 63232: 38, 63233: 40, 63234: 37, 63235: 39, 63276: 33, 63277: 34, 25: 9 }, D = YAHOO.env.ua.ie, F = "focusin", I = "focusout"; return { POLL_RETRYS: 500, POLL_INTERVAL: 40, EL: 0, TYPE: 1, FN: 2, WFN: 3, UNLOAD_OBJ: 3, ADJ_SCOPE: 4, OBJ: 5, OVERRIDE: 6, CAPTURE: 7, lastError: null, isSafari: YAHOO.env.ua.webkit, webkit: YAHOO.env.ua.webkit, isIE: D, _interval: null, _dri: null, _specialTypes: { focusin: (D ? "focusin" : "focus"), focusout: (D ? "focusout" : "blur") }, DOMReady: false, throwErrors: false, startInterval: function() { if (!this._interval) { this._interval = YAHOO.lang.later(this.POLL_INTERVAL, this, this._tryPreloadAttach, null, true); } }, onAvailable: function(Q, M, O, P, N) { var K = (YAHOO.lang.isString(Q)) ? [Q] : Q; for (var L = 0; L < K.length; L = L + 1) { E.push({ id: K[L], fn: M, obj: O, overrideContext: P, checkReady: N }); } A = this.POLL_RETRYS; this.startInterval(); }, onContentReady: function(N, K, L, M) { this.onAvailable(N, K, L, M, true); }, onDOMReady: function() { this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent, arguments); }, _addListener: function(M, K, V, P, T, Y) { if (!V || !V.call) { return false; } if (this._isValidCollection(M)) { var W = true; for (var Q = 0, S = M.length; Q < S; ++Q) { W = this.on(M[Q], K, V, P, T) && W; } return W; } else { if (YAHOO.lang.isString(M)) { var O = this.getEl(M); if (O) { M = O; } else { this.onAvailable(M, function() { YAHOO.util.Event._addListener(M, K, V, P, T, Y); }); return true; } } } if (!M) { return false; } if ("unload" == K && P !== this) { J[J.length] = [M, K, V, P, T]; return true; } var L = M; if (T) { if (T === true) { L = P; } else { L = T; } } var N = function(Z) { return V.call(L, YAHOO.util.Event.getEvent(Z, M), P); }; var X = [M, K, V, N, L, P, T, Y]; var R = H.length; H[R] = X; try { this._simpleAdd(M, K, N, Y); } catch (U) { this.lastError = U; this.removeListener(M, K, V); return false; } return true; }, _getType: function(K) { return this._specialTypes[K] || K; }, addListener: function(M, P, L, N, O) { var K = ((P == F || P == I) && !YAHOO.env.ua.ie) ? true : false; return this._addListener(M, this._getType(P), L, N, O, K); }, addFocusListener: function(L, K, M, N) { return this.on(L, F, K, M, N); }, removeFocusListener: function(L, K) { return this.removeListener(L, F, K); }, addBlurListener: function(L, K, M, N) { return this.on(L, I, K, M, N); }, removeBlurListener: function(L, K) { return this.removeListener(L, I, K); }, removeListener: function(L, K, R) { var M, P, U; K = this._getType(K); if (typeof L == "string") { L = this.getEl(L); } else { if (this._isValidCollection(L)) { var S = true; for (M = L.length - 1; M > -1; M--) { S = (this.removeListener(L[M], K, R) && S); } return S; } } if (!R || !R.call) { return this.purgeElement(L, false, K); } if ("unload" == K) { for (M = J.length - 1; M > -1; M--) { U = J[M]; if (U && U[0] == L && U[1] == K && U[2] == R) { J.splice(M, 1); return true; } } return false; } var N = null; var O = arguments[3]; if ("undefined" === typeof O) { O = this._getCacheIndex(H, L, K, R); } if (O >= 0) { N = H[O]; } if (!L || !N) { return false; } var T = N[this.CAPTURE] === true ? true : false; try { this._simpleRemove(L, K, N[this.WFN], T); } catch (Q) { this.lastError = Q; return false; } delete H[O][this.WFN]; delete H[O][this.FN]; H.splice(O, 1); return true; }, getTarget: function(M, L) { var K = M.target || M.srcElement; return this.resolveTextNode(K); }, resolveTextNode: function(L) { try { if (L && 3 == L.nodeType) { return L.parentNode; } } catch (K) {} return L; }, getPageX: function(L) { var K = L.pageX; if (!K && 0 !== K) { K = L.clientX || 0; if (this.isIE) { K += this._getScrollLeft(); } } return K; }, getPageY: function(K) { var L = K.pageY; if (!L && 0 !== L) { L = K.clientY || 0; if (this.isIE) { L += this._getScrollTop(); } } return L; }, getXY: function(K) { return [this.getPageX(K), this.getPageY(K)]; }, getRelatedTarget: function(L) { var K = L.relatedTarget; if (!K) { if (L.type == "mouseout") { K = L.toElement; } else { if (L.type == "mouseover") { K = L.fromElement; } } } return this.resolveTextNode(K); }, getTime: function(M) { if (!M.time) { var L = new Date().getTime(); try { M.time = L; } catch (K) { this.lastError = K; return L; } } return M.time; }, stopEvent: function(K) { this.stopPropagation(K); this.preventDefault(K); }, stopPropagation: function(K) { if (K.stopPropagation) { K.stopPropagation(); } else { K.cancelBubble = true; } }, preventDefault: function(K) { if (K.preventDefault) { K.preventDefault(); } else { K.returnValue = false; } }, getEvent: function(M, K) { var L = M || window.event; if (!L) { var N = this.getEvent.caller; while (N) { L = N.arguments[0]; if (L && Event == L.constructor) { break; } N = N.caller; } } return L; }, getCharCode: function(L) { var K = L.keyCode || L.charCode || 0; if (YAHOO.env.ua.webkit && (K in C)) { K = C[K]; } return K; }, _getCacheIndex: function(M, P, Q, O) { for (var N = 0, L = M.length; N < L; N = N + 1) { var K = M[N]; if (K && K[this.FN] == O && K[this.EL] == P && K[this.TYPE] == Q) { return N; } } return -1; }, generateId: function(K) { var L = K.id; if (!L) { L = "yuievtautoid-" + B; ++B; K.id = L; } return L; }, _isValidCollection: function(L) { try { return (L && typeof L !== "string" && L.length && !L.tagName && !L.alert && typeof L[0] !== "undefined"); } catch (K) { return false; } }, elCache: {}, getEl: function(K) { return (typeof K === "string") ? document.getElementById(K) : K; }, clearCache: function() {}, DOMReadyEvent: new YAHOO.util.CustomEvent("DOMReady", YAHOO, 0, 0, 1), _load: function(L) { if (!G) { G = true; var K = YAHOO.util.Event; K._ready(); K._tryPreloadAttach(); } }, _ready: function(L) { var K = YAHOO.util.Event; if (!K.DOMReady) { K.DOMReady = true; K.DOMReadyEvent.fire(); K._simpleRemove(document, "DOMContentLoaded", K._ready); } }, _tryPreloadAttach: function() { if (E.length === 0) { A = 0; if (this._interval) { this._interval.cancel(); this._interval = null; } return; } if (this.locked) { return; } if (this.isIE) { if (!this.DOMReady) { this.startInterval(); return; } } this.locked = true; var Q = !G; if (!Q) { Q = (A > 0 && E.length > 0); } var P = []; var R = function(T, U) { var S = T; if (U.overrideContext) { if (U.overrideContext === true) { S = U.obj; } else { S = U.overrideContext; } } U.fn.call(S, U.obj); }; var L, K, O, N, M = []; for (L = 0, K = E.length; L < K; L = L + 1) { O = E[L]; if (O) { N = this.getEl(O.id); if (N) { if (O.checkReady) { if (G || N.nextSibling || !Q) { M.push(O); E[L] = null; } } else { R(N, O); E[L] = null; } } else { P.push(O); } } } for (L = 0, K = M.length; L < K; L = L + 1) { O = M[L]; R(this.getEl(O.id), O); } A--; if (Q) { for (L = E.length - 1; L > -1; L--) { O = E[L]; if (!O || !O.id) { E.splice(L, 1); } } this.startInterval(); } else { if (this._interval) { this._interval.cancel(); this._interval = null; } } this.locked = false; }, purgeElement: function(O, P, R) { var M = (YAHOO.lang.isString(O)) ? this.getEl(O) : O; var Q = this.getListeners(M, R), N, K; if (Q) { for (N = Q.length - 1; N > -1; N--) { var L = Q[N]; this.removeListener(M, L.type, L.fn); } } if (P && M && M.childNodes) { for (N = 0, K = M.childNodes.length; N < K; ++N) { this.purgeElement(M.childNodes[N], P, R); } } }, getListeners: function(M, K) { var P = [], L; if (!K) { L = [H, J]; } else { if (K === "unload") { L = [J]; } else { K = this._getType(K); L = [H]; } } var R = (YAHOO.lang.isString(M)) ? this.getEl(M) : M; for (var O = 0; O < L.length; O = O + 1) { var T = L[O]; if (T) { for (var Q = 0, S = T.length; Q < S; ++Q) { var N = T[Q]; if (N && N[this.EL] === R && (!K || K === N[this.TYPE])) { P.push({ type: N[this.TYPE], fn: N[this.FN], obj: N[this.OBJ], adjust: N[this.OVERRIDE], scope: N[this.ADJ_SCOPE], index: Q }); } } } } return (P.length) ? P : null; }, _unload: function(R) { var L = YAHOO.util.Event, O, N, M, Q, P, S = J.slice(), K; for (O = 0, Q = J.length; O < Q; ++O) { M = S[O]; if (M) { K = window; if (M[L.ADJ_SCOPE]) { if (M[L.ADJ_SCOPE] === true) { K = M[L.UNLOAD_OBJ]; } else { K = M[L.ADJ_SCOPE]; } } M[L.FN].call(K, L.getEvent(R, M[L.EL]), M[L.UNLOAD_OBJ]); S[O] = null; } } M = null; K = null; J = null; if (H) { for (N = H.length - 1; N > -1; N--) { M = H[N]; if (M) { L.removeListener(M[L.EL], M[L.TYPE], M[L.FN], N); } } M = null; } L._simpleRemove(window, "unload", L._unload); }, _getScrollLeft: function() { return this._getScroll()[1]; }, _getScrollTop: function() { return this._getScroll()[0]; }, _getScroll: function() { var K = document.documentElement, L = document.body; if (K && (K.scrollTop || K.scrollLeft)) { return [K.scrollTop, K.scrollLeft]; } else { if (L) { return [L.scrollTop, L.scrollLeft]; } else { return [0, 0]; } } }, regCE: function() {}, _simpleAdd: function() { if (window.addEventListener) { return function(M, N, L, K) { M.addEventListener(N, L, (K)); }; } else { if (window.attachEvent) { return function(M, N, L, K) { M.attachEvent("on" + N, L); }; } else { return function() {}; } } }(), _simpleRemove: function() { if (window.removeEventListener) { return function(M, N, L, K) { M.removeEventListener(N, L, (K)); }; } else { if (window.detachEvent) { return function(L, M, K) { L.detachEvent("on" + M, K); }; } else { return function() {}; } } }() }; }(); (function() { var EU = YAHOO.util.Event; EU.on = EU.addListener; EU.onFocus = EU.addFocusListener; EU.onBlur = EU.addBlurListener; /* * DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego * Perini */ if (EU.isIE) { if (self !== self.top) { document.onreadystatechange = function() { if (document.readyState == "complete") { document.onreadystatechange = null; EU._ready(); } }; } else { YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach, YAHOO.util.Event, true); var n = document.createElement("p"); EU._dri = setInterval(function() { try { n.doScroll("left"); clearInterval(EU._dri); EU._dri = null; EU._ready(); n = null; } catch (ex) {} }, EU.POLL_INTERVAL); } } else { if (EU.webkit && EU.webkit < 525) { EU._dri = setInterval(function() { var rs = document.readyState; if ("loaded" == rs || "complete" == rs) { clearInterval(EU._dri); EU._dri = null; EU._ready(); } }, EU.POLL_INTERVAL); } else { EU._simpleAdd(document, "DOMContentLoaded", EU._ready); } } EU._simpleAdd(window, "load", EU._load); EU._simpleAdd(window, "unload", EU._unload); EU._tryPreloadAttach(); })(); } YAHOO.util.EventProvider = function() {}; YAHOO.util.EventProvider.prototype = { __yui_events: null, __yui_subscribers: null, subscribe: function(A, C, F, E) { this.__yui_events = this.__yui_events || {}; var D = this.__yui_events[A]; if (D) { D.subscribe(C, F, E); } else { this.__yui_subscribers = this.__yui_subscribers || {}; var B = this.__yui_subscribers; if (!B[A]) { B[A] = []; } B[A].push({ fn: C, obj: F, overrideContext: E }); } }, unsubscribe: function(C, E, G) { this.__yui_events = this.__yui_events || {}; var A = this.__yui_events; if (C) { var F = A[C]; if (F) { return F.unsubscribe(E, G); } } else { var B = true; for (var D in A) { if (YAHOO.lang.hasOwnProperty(A, D)) { B = B && A[D].unsubscribe(E, G); } } return B; } return false; }, unsubscribeAll: function(A) { return this.unsubscribe(A); }, createEvent: function(B, G) { this.__yui_events = this.__yui_events || {}; var E = G || {}, D = this.__yui_events, F; if (D[B]) {} else { F = new YAHOO.util.CustomEvent(B, E.scope || this, E.silent, YAHOO.util.CustomEvent.FLAT, E.fireOnce); D[B] = F; if (E.onSubscribeCallback) { F.subscribeEvent.subscribe(E.onSubscribeCallback); } this.__yui_subscribers = this.__yui_subscribers || {}; var A = this.__yui_subscribers[B]; if (A) { for (var C = 0; C < A.length; ++C) { F.subscribe(A[C].fn, A[C].obj, A[C].overrideContext); } } } return D[B]; }, fireEvent: function(B) { this.__yui_events = this.__yui_events || {}; var D = this.__yui_events[B]; if (!D) { return null; } var A = []; for (var C = 1; C < arguments.length; ++C) { A.push(arguments[C]); } return D.fire.apply(D, A); }, hasEvent: function(A) { if (this.__yui_events) { if (this.__yui_events[A]) { return true; } } return false; } }; (function() { var A = YAHOO.util.Event, C = YAHOO.lang; YAHOO.util.KeyListener = function(D, I, E, F) { if (!D) {} else { if (!I) {} else { if (!E) {} } } if (!F) { F = YAHOO.util.KeyListener.KEYDOWN; } var G = new YAHOO.util.CustomEvent("keyPressed"); this.enabledEvent = new YAHOO.util.CustomEvent("enabled"); this.disabledEvent = new YAHOO.util.CustomEvent("disabled"); if (C.isString(D)) { D = document.getElementById(D); } if (C.isFunction(E)) { G.subscribe(E); } else { G.subscribe(E.fn, E.scope, E.correctScope); } function H(O, N) { if (!I.shift) { I.shift = false; } if (!I.alt) { I.alt = false; } if (!I.ctrl) { I.ctrl = false; } if (O.shiftKey == I.shift && O.altKey == I.alt && O.ctrlKey == I.ctrl) { var J, M = I.keys, L; if (YAHOO.lang.isArray(M)) { for (var K = 0; K < M.length; K++) { J = M[K]; L = A.getCharCode(O); if (J == L) { G.fire(L, O); break; } } } else { L = A.getCharCode(O); if (M == L) { G.fire(L, O); } } } } this.enable = function() { if (!this.enabled) { A.on(D, F, H); this.enabledEvent.fire(I); } this.enabled = true; }; this.disable = function() { if (this.enabled) { A.removeListener(D, F, H); this.disabledEvent.fire(I); } this.enabled = false; }; this.toString = function() { return "KeyListener [" + I.keys + "] " + D.tagName + (D.id ? "[" + D.id + "]" : ""); }; }; var B = YAHOO.util.KeyListener; B.KEYDOWN = "keydown"; B.KEYUP = "keyup"; B.KEY = { ALT: 18, BACK_SPACE: 8, CAPS_LOCK: 20, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, META: 224, NUM_LOCK: 144, PAGE_DOWN: 34, PAGE_UP: 33, PAUSE: 19, PRINTSCREEN: 44, RIGHT: 39, SCROLL_LOCK: 145, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38 }; })(); YAHOO.register("event", YAHOO.util.Event, { version: "2.8.0r4", build: "2449" }); // End // of // File // include/javascript/yui/build/event/event-min.js /* * Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the * BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ YAHOO.widget.LogMsg = function(A) { this.msg = this.time = this.category = this.source = this.sourceDetail = null; if (A && (A.constructor == Object)) { for (var B in A) { if (A.hasOwnProperty(B)) { this[B] = A[B]; } } } }; YAHOO.widget.LogWriter = function(A) { if (!A) { YAHOO.log("Could not instantiate LogWriter due to invalid source.", "error", "LogWriter"); return; } this._source = A; }; YAHOO.widget.LogWriter.prototype.toString = function() { return "LogWriter " + this._sSource; }; YAHOO.widget.LogWriter.prototype.log = function(A, B) { YAHOO.widget.Logger.log(A, B, this._source); }; YAHOO.widget.LogWriter.prototype.getSource = function() { return this._source; }; YAHOO.widget.LogWriter.prototype.setSource = function(A) { if (!A) { YAHOO.log("Could not set source due to invalid source.", "error", this.toString()); return; } else { this._source = A; } }; YAHOO.widget.LogWriter.prototype._source = null; if (!YAHOO.widget.Logger) { YAHOO.widget.Logger = { loggerEnabled: true, _browserConsoleEnabled: false, categories: ["info", "warn", "error", "time", "window"], sources: ["global"], _stack: [], maxStackEntries: 2500, _startTime: new Date().getTime(), _lastTime: null, _windowErrorsHandled: false, _origOnWindowError: null }; YAHOO.widget.Logger.log = function(B, F, G) { if (this.loggerEnabled) { if (!F) { F = "info"; } else { F = F.toLocaleLowerCase(); if (this._isNewCategory(F)) { this._createNewCategory(F); } } var C = "global"; var A = null; if (G) { var D = G.indexOf(" "); if (D > 0) { C = G.substring(0, D); A = G.substring(D, G.length); } else { C = G; } if (this._isNewSource(C)) { this._createNewSource(C); } } var H = new Date(); var J = new YAHOO.widget.LogMsg({ msg: B, time: H, category: F, source: C, sourceDetail: A }); var I = this._stack; var E = this.maxStackEntries; if (E && !isNaN(E) && (I.length >= E)) { I.shift(); } I.push(J); this.newLogEvent.fire(J); if (this._browserConsoleEnabled) { this._printToBrowserConsole(J); } return true; } else { return false; } }; YAHOO.widget.Logger.reset = function() { this._stack = []; this._startTime = new Date().getTime(); this.loggerEnabled = true; this.log("Logger reset"); this.logResetEvent.fire(); }; YAHOO.widget.Logger.getStack = function() { return this._stack; }; YAHOO.widget.Logger.getStartTime = function() { return this._startTime; }; YAHOO.widget.Logger.disableBrowserConsole = function() { YAHOO.log("Logger output to the function console.log() has been disabled."); this._browserConsoleEnabled = false; }; YAHOO.widget.Logger.enableBrowserConsole = function() { this._browserConsoleEnabled = true; YAHOO.log("Logger output to the function console.log() has been enabled."); }; YAHOO.widget.Logger.handleWindowErrors = function() { if (!YAHOO.widget.Logger._windowErrorsHandled) { if (window.error) { YAHOO.widget.Logger._origOnWindowError = window.onerror; } window.onerror = YAHOO.widget.Logger._onWindowError; YAHOO.widget.Logger._windowErrorsHandled = true; YAHOO.log("Logger handling of window.onerror has been enabled."); } else { YAHOO.log("Logger handling of window.onerror had already been enabled."); } }; YAHOO.widget.Logger.unhandleWindowErrors = function() { if (YAHOO.widget.Logger._windowErrorsHandled) { if (YAHOO.widget.Logger._origOnWindowError) { window.onerror = YAHOO.widget.Logger._origOnWindowError; YAHOO.widget.Logger._origOnWindowError = null; } else { window.onerror = null; } YAHOO.widget.Logger._windowErrorsHandled = false; YAHOO.log("Logger handling of window.onerror has been disabled."); } else { YAHOO.log("Logger handling of window.onerror had already been disabled."); } }; YAHOO.widget.Logger.categoryCreateEvent = new YAHOO.util.CustomEvent("categoryCreate", this, true); YAHOO.widget.Logger.sourceCreateEvent = new YAHOO.util.CustomEvent("sourceCreate", this, true); YAHOO.widget.Logger.newLogEvent = new YAHOO.util.CustomEvent("newLog", this, true); YAHOO.widget.Logger.logResetEvent = new YAHOO.util.CustomEvent("logReset", this, true); YAHOO.widget.Logger._createNewCategory = function(A) { this.categories.push(A); this.categoryCreateEvent.fire(A); }; YAHOO.widget.Logger._isNewCategory = function(B) { for (var A = 0; A < this.categories.length; A++) { if (B == this.categories[A]) { return false; } } return true; }; YAHOO.widget.Logger._createNewSource = function(A) { this.sources.push(A); this.sourceCreateEvent.fire(A); }; YAHOO.widget.Logger._isNewSource = function(A) { if (A) { for (var B = 0; B < this.sources.length; B++) { if (A == this.sources[B]) { return false; } } return true; } }; YAHOO.widget.Logger._printToBrowserConsole = function(C) { if (window.console && console.log) { var E = C.category; var D = C.category.substring(0, 4).toUpperCase(); var G = C.time; var F; if (G.toLocaleTimeString) { F = G.toLocaleTimeString(); } else { F = G.toString(); } var H = G.getTime(); var B = (YAHOO.widget.Logger._lastTime) ? (H - YAHOO.widget.Logger._lastTime) : 0; YAHOO.widget.Logger._lastTime = H; var A = F + " (" + B + "ms): " + C.source + ": "; if (YAHOO.env.ua.webkit) { A += C.msg; } console.log(A, C.msg); } }; YAHOO.widget.Logger._onWindowError = function(A, C, B) { try { YAHOO.widget.Logger.log(A + " (" + C + ", line " + B + ")", "window"); if (YAHOO.widget.Logger._origOnWindowError) { YAHOO.widget.Logger._origOnWindowError(); } } catch (D) { return false; } }; YAHOO.widget.Logger.log("Logger initialized"); }(function() { var C = YAHOO.widget.Logger, D = YAHOO.util, E = D.Dom, A = D.Event, G = document; function B(I, H) { I = G.createElement(I); if (H) { for (var J in H) { if (H.hasOwnProperty(J)) { I[J] = H[J]; } } } return I; } function F(I, H) { this._sName = F._index; F._index++; this._init.apply(this, arguments); if (this.autoRender !== false) { this.render(); } } YAHOO.lang.augmentObject(F, { _index: 0, ENTRY_TEMPLATE: (function() { return B("pre", { className: "yui-log-entry" }); })(), VERBOSE_TEMPLATE: "
{label} {totalTime}ms (+{elapsedTime}) {localTime}:
{sourceAndDetail}
{message}
", BASIC_TEMPLATE: "{label} {totalTime}ms (+{elapsedTime}) {localTime}: {sourceAndDetail}: {message}
" }); F.prototype = { logReaderEnabled: true, width: null, height: null, top: null, left: null, right: null, bottom: null, fontSize: null, footerEnabled: true, verboseOutput: true, entryFormat: null, newestOnTop: true, outputBuffer: 100, thresholdMax: 500, thresholdMin: 100, isCollapsed: false, isPaused: false, draggable: true, toString: function() { return "LogReader instance" + this._sName; }, pause: function() { this.isPaused = true; this._timeout = null; this.logReaderEnabled = false; if (this._btnPause) { this._btnPause.value = "Resume"; } }, resume: function() { this.isPaused = false; this.logReaderEnabled = true; this._printBuffer(); if (this._btnPause) { this._btnPause.value = "Pause"; } }, render: function() { if (this.rendered) { return; } this._initContainerEl(); this._initHeaderEl(); this._initConsoleEl(); this._initFooterEl(); this._initCategories(); this._initSources(); this._initDragDrop(); C.newLogEvent.subscribe(this._onNewLog, this); C.logResetEvent.subscribe(this._onReset, this); C.categoryCreateEvent.subscribe(this._onCategoryCreate, this); C.sourceCreateEvent.subscribe(this._onSourceCreate, this); this.rendered = true; this._filterLogs(); }, destroy: function() { A.purgeElement(this._elContainer, true); this._elContainer.innerHTML = ""; this._elContainer.parentNode.removeChild(this._elContainer); this.rendered = false; }, hide: function() { this._elContainer.style.display = "none"; }, show: function() { this._elContainer.style.display = "block"; }, collapse: function() { this._elConsole.style.display = "none"; if (this._elFt) { this._elFt.style.display = "none"; } this._btnCollapse.value = "Expand"; this.isCollapsed = true; }, expand: function() { this._elConsole.style.display = "block"; if (this._elFt) { this._elFt.style.display = "block"; } this._btnCollapse.value = "Collapse"; this.isCollapsed = false; }, getCheckbox: function(H) { return this._filterCheckboxes[H]; }, getCategories: function() { return this._categoryFilters; }, showCategory: function(I) { var K = this._categoryFilters; if (K.indexOf) { if (K.indexOf(I) > -1) { return; } } else { for (var H = 0; H < K.length; H++) { if (K[H] === I) { return; } } } this._categoryFilters.push(I); this._filterLogs(); var J = this.getCheckbox(I); if (J) { J.checked = true; } }, hideCategory: function(I) { var K = this._categoryFilters; for (var H = 0; H < K.length; H++) { if (I == K[H]) { K.splice(H, 1); break; } } this._filterLogs(); var J = this.getCheckbox(I); if (J) { J.checked = false; } }, getSources: function() { return this._sourceFilters; }, showSource: function(H) { var K = this._sourceFilters; if (K.indexOf) { if (K.indexOf(H) > -1) { return; } } else { for (var I = 0; I < K.length; I++) { if (H == K[I]) { return; } } } K.push(H); this._filterLogs(); var J = this.getCheckbox(H); if (J) { J.checked = true; } }, hideSource: function(H) { var K = this._sourceFilters; for (var I = 0; I < K.length; I++) { if (H == K[I]) { K.splice(I, 1); break; } } this._filterLogs(); var J = this.getCheckbox(H); if (J) { J.checked = false; } }, clearConsole: function() { this._timeout = null; this._buffer = []; this._consoleMsgCount = 0; var H = this._elConsole; H.innerHTML = ""; }, setTitle: function(H) { this._title.innerHTML = this.html2Text(H); }, getLastTime: function() { return this._lastTime; }, formatMsg: function(I) { var H = this.entryFormat || (this.verboseOutput ? F.VERBOSE_TEMPLATE : F.BASIC_TEMPLATE), J = { category: I.category, label: I.category.substring(0, 4).toUpperCase(), sourceAndDetail: I.sourceDetail ? I.source + " " + I.sourceDetail : I.source, message: this.html2Text(I.msg || I.message || "") }; if (I.time && I.time.getTime) { J.localTime = I.time.toLocaleTimeString ? I.time.toLocaleTimeString() : I.time.toString(); J.elapsedTime = I.time.getTime() - this.getLastTime(); J.totalTime = I.time.getTime() - C.getStartTime(); } var K = F.ENTRY_TEMPLATE.cloneNode(true); if (this.verboseOutput) { K.className += " yui-log-verbose"; } K.innerHTML = H.replace(/\{(\w+)\}/g, function(L, M) { return (M in J) ? J[M] : ""; }); return K; }, html2Text: function(H) { if (H) { H += ""; return H.replace(/&/g, "&").replace(//g, ">"); } return ""; }, _sName: null, _buffer: null, _consoleMsgCount: 0, _lastTime: null, _timeout: null, _filterCheckboxes: null, _categoryFilters: null, _sourceFilters: null, _elContainer: null, _elHd: null, _elCollapse: null, _btnCollapse: null, _title: null, _elConsole: null, _elFt: null, _elBtns: null, _elCategoryFilters: null, _elSourceFilters: null, _btnPause: null, _btnClear: null, _init: function(H, I) { this._buffer = []; this._filterCheckboxes = {}; this._lastTime = C.getStartTime(); if (I && (I.constructor == Object)) { for (var J in I) { if (I.hasOwnProperty(J)) { this[J] = I[J]; } } } this._elContainer = E.get(H); YAHOO.log("LogReader initialized", null, this.toString()); }, _initContainerEl: function() { if (!this._elContainer || !/div$/i.test(this._elContainer.tagName)) { this._elContainer = G.body.insertBefore(B("div"), G.body.firstChild); E.addClass(this._elContainer, "yui-log-container"); } E.addClass(this._elContainer, "yui-log"); var J = this._elContainer.style, H = ["width", "right", "top", "fontSize"], K, I; for (I = H.length - 1; I >= 0; --I) { K = H[I]; if (this[K]) { J[K] = this[K]; } } if (this.left) { J.left = this.left; J.right = "auto"; } if (this.bottom) { J.bottom = this.bottom; J.top = "auto"; } if (YAHOO.env.ua.opera) { G.body.style += ""; } }, _initHeaderEl: function() { if (this._elHd) { A.purgeElement(this._elHd, true); this._elHd.innerHTML = ""; } this._elHd = B("div", { id: "yui-log-hd" + this._sName, className: "yui-log-hd" }); this._elCollapse = B("div", { className: "yui-log-btns" }); this._btnCollapse = B("input", { type: "button", className: "yui-log-button", value: "Collapse" }); A.on(this._btnCollapse, "click", this._onClickCollapseBtn, this); this._title = B("h4", { innerHTML: "Logger Console" }); this._elCollapse.appendChild(this._btnCollapse); this._elHd.appendChild(this._elCollapse); this._elHd.appendChild(this._title); this._elContainer.appendChild(this._elHd); }, _initConsoleEl: function() { if (this._elConsole) { A.purgeElement(this._elConsole, true); this._elConsole.innerHTML = ""; } this._elConsole = B("div", { className: "yui-log-bd" }); if (this.height) { this._elConsole.style.height = this.height; } this._elContainer.appendChild(this._elConsole); }, _initFooterEl: function() { if (this.footerEnabled) { if (this._elFt) { A.purgeElement(this._elFt, true); this._elFt.innerHTML = ""; } this._elFt = B("div", { className: "yui-log-ft" }); this._elBtns = B("div", { className: "yui-log-btns" }); this._btnPause = B("input", { type: "button", className: "yui-log-button", value: "Pause" }); A.on(this._btnPause, "click", this._onClickPauseBtn, this); this._btnClear = B("input", { type: "button", className: "yui-log-button", value: "Clear" }); A.on(this._btnClear, "click", this._onClickClearBtn, this); this._elCategoryFilters = B("div", { className: "yui-log-categoryfilters" }); this._elSourceFilters = B("div", { className: "yui-log-sourcefilters" }); this._elBtns.appendChild(this._btnPause); this._elBtns.appendChild(this._btnClear); this._elFt.appendChild(this._elBtns); this._elFt.appendChild(this._elCategoryFilters); this._elFt.appendChild(this._elSourceFilters); this._elContainer.appendChild(this._elFt); } }, _initDragDrop: function() { if (D.DD && this.draggable && this._elHd) { var H = new D.DD(this._elContainer); H.setHandleElId(this._elHd.id); this._elHd.style.cursor = "move"; } }, _initCategories: function() { this._categoryFilters = []; var J = C.categories; for (var H = 0; H < J.length; H++) { var I = J[H]; this._categoryFilters.push(I); if (this._elCategoryFilters) { this._createCategoryCheckbox(I); } } }, _initSources: function() { this._sourceFilters = []; var J = C.sources; for (var I = 0; I < J.length; I++) { var H = J[I]; this._sourceFilters.push(H); if (this._elSourceFilters) { this._createSourceCheckbox(H); } } }, _createCategoryCheckbox: function(K) { if (this._elFt) { var J = B("span", { className: "yui-log-filtergrp" }), H = B("input", { id: "yui-log-filter-" + K + this._sName, className: "yui-log-filter-" + K, type: "checkbox", category: K }), I = B("label", { htmlFor: H.id, className: K, innerHTML: K }); A.on(H, "click", this._onCheckCategory, this); this._filterCheckboxes[K] = H; J.appendChild(H); J.appendChild(I); this._elCategoryFilters.appendChild(J); H.checked = true; } }, _createSourceCheckbox: function(H) { if (this._elFt) { var K = B("span", { className: "yui-log-filtergrp" }), I = B("input", { id: "yui-log-filter-" + H + this._sName, className: "yui-log-filter-" + H, type: "checkbox", source: H }), J = B("label", { htmlFor: I.id, className: H, innerHTML: H }); A.on(I, "click", this._onCheckSource, this); this._filterCheckboxes[H] = I; K.appendChild(I); K.appendChild(J); this._elSourceFilters.appendChild(K); I.checked = true; } }, _filterLogs: function() { if (this._elConsole !== null) { this.clearConsole(); this._printToConsole(C.getStack()); } }, _printBuffer: function() { this._timeout = null; if (this._elConsole !== null) { var I = this.thresholdMax; I = (I && !isNaN(I)) ? I : 500; if (this._consoleMsgCount < I) { var H = []; for (var J = 0; J < this._buffer.length; J++) { H[J] = this._buffer[J]; } this._buffer = []; this._printToConsole(H); } else { this._filterLogs(); } if (!this.newestOnTop) { this._elConsole.scrollTop = this._elConsole.scrollHeight; } } }, _printToConsole: function(P) { var I = P.length, T = G.createDocumentFragment(), W = [], X = this.thresholdMin, J = this._sourceFilters.length, U = this._categoryFilters.length, R, O, N, M, S; if (isNaN(X) || (X > this.thresholdMax)) { X = 0; } R = (I > X) ? (I - X) : 0; for (O = R; O < I; O++) { var L = false, Q = false, V = P[O], H = V.source, K = V.category; for (N = 0; N < J; N++) { if (H == this._sourceFilters[N]) { Q = true; break; } } if (Q) { for (N = 0; N < U; N++) { if (K == this._categoryFilters[N]) { L = true; break; } } } if (L) { if (this._consoleMsgCount === 0) { this._lastTime = V.time.getTime(); } M = this.formatMsg(V); if (typeof M === "string") { W[W.length] = M; } else { T.insertBefore(M, this.newestOnTop ? T.firstChild || null : null); } this._consoleMsgCount++; this._lastTime = V.time.getTime(); } } if (W.length) { W.splice(0, 0, this._elConsole.innerHTML); this._elConsole.innerHTML = this.newestOnTop ? W.reverse().join("") : W.join(""); } else { if (T.firstChild) { this._elConsole.insertBefore(T, this.newestOnTop ? this._elConsole.firstChild || null : null); } } }, _onCategoryCreate: function(K, J, H) { var I = J[0]; H._categoryFilters.push(I); if (H._elFt) { H._createCategoryCheckbox(I); } }, _onSourceCreate: function(K, J, H) { var I = J[0]; H._sourceFilters.push(I); if (H._elFt) { H._createSourceCheckbox(I); } }, _onCheckCategory: function(H, I) { var J = this.category; if (!this.checked) { I.hideCategory(J); } else { I.showCategory(J); } }, _onCheckSource: function(H, I) { var J = this.source; if (!this.checked) { I.hideSource(J); } else { I.showSource(J); } }, _onClickCollapseBtn: function(H, I) { if (!I.isCollapsed) { I.collapse(); } else { I.expand(); } }, _onClickPauseBtn: function(H, I) { if (!I.isPaused) { I.pause(); } else { I.resume(); } }, _onClickClearBtn: function(H, I) { I.clearConsole(); }, _onNewLog: function(K, J, H) { var I = J[0]; H._buffer.push(I); if (H.logReaderEnabled === true && H._timeout === null) { H._timeout = setTimeout(function() { H._printBuffer(); }, H.outputBuffer); } }, _onReset: function(J, I, H) { H._filterLogs(); } }; YAHOO.widget.LogReader = F; })(); YAHOO.register("logger", YAHOO.widget.Logger, { version: "2.8.0r4", build: "2449" }); // End // of // File // include/javascript/yui/build/logger/logger-min.js /* * Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the * BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ (function() { var B = YAHOO.util; var A = function(D, C, E, F) { if (!D) {} this.init(D, C, E, F); }; A.NAME = "Anim"; A.prototype = { toString: function() { var C = this.getEl() || {}; var D = C.id || C.tagName; return (this.constructor.NAME + ": " + D); }, patterns: { noNegatives: /width|height|opacity|padding/i, offsetAttribute: /^((width|height)|(top|left))$/, defaultUnit: /width|height|top$|bottom$|left$|right$/i, offsetUnit: /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i }, doMethod: function(C, E, D) { return this.method(this.currentFrame, E, D - E, this.totalFrames); }, setAttribute: function(C, F, E) { var D = this.getEl(); if (this.patterns.noNegatives.test(C)) { F = (F > 0) ? F : 0; } if (C in D && !("style" in D && C in D.style)) { D[C] = F; } else { B.Dom.setStyle(D, C, F + E); } }, getAttribute: function(C) { var E = this.getEl(); var G = B.Dom.getStyle(E, C); if (G !== "auto" && !this.patterns.offsetUnit.test(G)) { return parseFloat(G); } var D = this.patterns.offsetAttribute.exec(C) || []; var H = !!(D[3]); var F = !!(D[2]); if ("style" in E) { if (F || (B.Dom.getStyle(E, "position") == "absolute" && H)) { G = E["offset" + D[0].charAt(0).toUpperCase() + D[0].substr(1)]; } else { G = 0; } } else { if (C in E) { G = E[C]; } } return G; }, getDefaultUnit: function(C) { if (this.patterns.defaultUnit.test(C)) { return "px"; } return ""; }, setRuntimeAttribute: function(D) { var I; var E; var F = this.attributes; this.runtimeAttributes[D] = {}; var H = function(J) { return (typeof J !== "undefined"); }; if (!H(F[D]["to"]) && !H(F[D]["by"])) { return false; } I = (H(F[D]["from"])) ? F[D]["from"] : this.getAttribute(D); if (H(F[D]["to"])) { E = F[D]["to"]; } else { if (H(F[D]["by"])) { if (I.constructor == Array) { E = []; for (var G = 0, C = I.length; G < C; ++G) { E[G] = I[G] + F[D]["by"][G] * 1; } } else { E = I + F[D]["by"] * 1; } } } this.runtimeAttributes[D].start = I; this.runtimeAttributes[D].end = E; this.runtimeAttributes[D].unit = (H(F[D].unit)) ? F[D]["unit"] : this.getDefaultUnit(D); return true; }, init: function(E, J, I, C) { var D = false; var F = null; var H = 0; E = B.Dom.get(E); this.attributes = J || {}; this.duration = !YAHOO.lang.isUndefined(I) ? I : 1; this.method = C || B.Easing.easeNone; this.useSeconds = true; this.currentFrame = 0; this.totalFrames = B.AnimMgr.fps; this.setEl = function(M) { E = B.Dom.get(M); }; this.getEl = function() { return E; }; this.isAnimated = function() { return D; }; this.getStartTime = function() { return F; }; this.runtimeAttributes = {}; this.animate = function() { if (this.isAnimated()) { return false; } this.currentFrame = 0; this.totalFrames = (this.useSeconds) ? Math.ceil(B.AnimMgr.fps * this.duration) : this.duration; if (this.duration === 0 && this.useSeconds) { this.totalFrames = 1; } B.AnimMgr.registerElement(this); return true; }; this.stop = function(M) { if (!this.isAnimated()) { return false; } if (M) { this.currentFrame = this.totalFrames; this._onTween.fire(); } B.AnimMgr.stop(this); }; var L = function() { this.onStart.fire(); this.runtimeAttributes = {}; for (var M in this.attributes) { this.setRuntimeAttribute(M); } D = true; H = 0; F = new Date(); }; var K = function() { var O = { duration: new Date() - this.getStartTime(), currentFrame: this.currentFrame }; O.toString = function() { return ("duration: " + O.duration + ", currentFrame: " + O.currentFrame); }; this.onTween.fire(O); var N = this.runtimeAttributes; for (var M in N) { this.setAttribute(M, this.doMethod(M, N[M].start, N[M].end), N[M].unit); } H += 1; }; var G = function() { var M = (new Date() - F) / 1000; var N = { duration: M, frames: H, fps: H / M }; N.toString = function() { return ("duration: " + N.duration + ", frames: " + N.frames + ", fps: " + N.fps); }; D = false; H = 0; this.onComplete.fire(N); }; this._onStart = new B.CustomEvent("_start", this, true); this.onStart = new B.CustomEvent("start", this); this.onTween = new B.CustomEvent("tween", this); this._onTween = new B.CustomEvent("_tween", this, true); this.onComplete = new B.CustomEvent("complete", this); this._onComplete = new B.CustomEvent("_complete", this, true); this._onStart.subscribe(L); this._onTween.subscribe(K); this._onComplete.subscribe(G); } }; B.Anim = A; })(); YAHOO.util.AnimMgr = new function() { var C = null; var B = []; var A = 0; this.fps = 1000; this.delay = 1; this.registerElement = function(F) { B[B.length] = F; A += 1; F._onStart.fire(); this.start(); }; this.unRegister = function(G, F) { F = F || E(G); if (!G.isAnimated() || F === -1) { return false; } G._onComplete.fire(); B.splice(F, 1); A -= 1; if (A <= 0) { this.stop(); } return true; }; this.start = function() { if (C === null) { C = setInterval(this.run, this.delay); } }; this.stop = function(H) { if (!H) { clearInterval(C); for (var G = 0, F = B.length; G < F; ++G) { this.unRegister(B[0], 0); } B = []; C = null; A = 0; } else { this.unRegister(H); } }; this.run = function() { for (var H = 0, F = B.length; H < F; ++H) { var G = B[H]; if (!G || !G.isAnimated()) { continue; } if (G.currentFrame < G.totalFrames || G.totalFrames === null) { G.currentFrame += 1; if (G.useSeconds) { D(G); } G._onTween.fire(); } else { YAHOO.util.AnimMgr.stop(G, H); } } }; var E = function(H) { for (var G = 0, F = B.length; G < F; ++G) { if (B[G] === H) { return G; } } return -1; }; var D = function(G) { var J = G.totalFrames; var I = G.currentFrame; var H = (G.currentFrame * G.duration * 1000 / G.totalFrames); var F = (new Date() - G.getStartTime()); var K = 0; if (F < G.duration * 1000) { K = Math.round((F / H - 1) * G.currentFrame); } else { K = J - (I + 1); } if (K > 0 && isFinite(K)) { if (G.currentFrame + K >= J) { K = J - (I + 1); } G.currentFrame += K; } }; this._queue = B; this._getIndex = E; }; YAHOO.util.Bezier = new function() { this.getPosition = function(E, D) { var F = E.length; var C = []; for (var B = 0; B < F; ++B) { C[B] = [E[B][0], E[B][1]]; } for (var A = 1; A < F; ++A) { for (B = 0; B < F - A; ++B) { C[B][0] = (1 - D) * C[B][0] + D * C[parseInt(B + 1, 10)][0]; C[B][1] = (1 - D) * C[B][1] + D * C[parseInt(B + 1, 10)][1]; } } return [C[0][0], C[0][1]]; }; }; (function() { var A = function(F, E, G, H) { A.superclass.constructor.call(this, F, E, G, H); }; A.NAME = "ColorAnim"; A.DEFAULT_BGCOLOR = "#fff"; var C = YAHOO.util; YAHOO.extend(A, C.Anim); var D = A.superclass; var B = A.prototype; B.patterns.color = /color$/i; B.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i; B.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i; B.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i; B.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; B.parseColor = function(E) { if (E.length == 3) { return E; } var F = this.patterns.hex.exec(E); if (F && F.length == 4) { return [parseInt(F[1], 16), parseInt(F[2], 16), parseInt(F[3], 16)]; } F = this.patterns.rgb.exec(E); if (F && F.length == 4) { return [parseInt(F[1], 10), parseInt(F[2], 10), parseInt(F[3], 10)]; } F = this.patterns.hex3.exec(E); if (F && F.length == 4) { return [parseInt(F[1] + F[1], 16), parseInt(F[2] + F[2], 16), parseInt(F[3] + F[3], 16)]; } return null; }; B.getAttribute = function(E) { var G = this.getEl(); if (this.patterns.color.test(E)) { var I = YAHOO.util.Dom.getStyle(G, E); var H = this; if (this.patterns.transparent.test(I)) { var F = YAHOO.util.Dom.getAncestorBy(G, function(J) { return !H.patterns.transparent.test(I); }); if (F) { I = C.Dom.getStyle(F, E); } else { I = A.DEFAULT_BGCOLOR; } } } else { I = D.getAttribute.call(this, E); } return I; }; B.doMethod = function(F, J, G) { var I; if (this.patterns.color.test(F)) { I = []; for (var H = 0, E = J.length; H < E; ++H) { I[H] = D.doMethod.call(this, F, J[H], G[H]); } I = "rgb(" + Math.floor(I[0]) + "," + Math.floor(I[1]) + "," + Math.floor(I[2]) + ")"; } else { I = D.doMethod.call(this, F, J, G); } return I; }; B.setRuntimeAttribute = function(F) { D.setRuntimeAttribute.call(this, F); if (this.patterns.color.test(F)) { var H = this.attributes; var J = this.parseColor(this.runtimeAttributes[F].start); var G = this.parseColor(this.runtimeAttributes[F].end); if (typeof H[F]["to"] === "undefined" && typeof H[F]["by"] !== "undefined") { G = this.parseColor(H[F].by); for (var I = 0, E = J.length; I < E; ++I) { G[I] = J[I] + G[I]; } } this.runtimeAttributes[F].start = J; this.runtimeAttributes[F].end = G; } }; C.ColorAnim = A; })(); /* * TERMS OF USE - EASING EQUATIONS Open source under the BSD License. Copyright * 2001 Robert Penner All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. Redistributions in binary * form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided * with the distribution. Neither the name of the author nor the names of * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ YAHOO.util.Easing = { easeNone: function(B, A, D, C) { return D * B / C + A; }, easeIn: function(B, A, D, C) { return D * (B /= C) * B + A; }, easeOut: function(B, A, D, C) { return -D * (B /= C) * (B - 2) + A; }, easeBoth: function(B, A, D, C) { if ((B /= C / 2) < 1) { return D / 2 * B * B + A; } return -D / 2 * ((--B) * (B - 2) - 1) + A; }, easeInStrong: function(B, A, D, C) { return D * (B /= C) * B * B * B + A; }, easeOutStrong: function(B, A, D, C) { return -D * ((B = B / C - 1) * B * B * B - 1) + A; }, easeBothStrong: function(B, A, D, C) { if ((B /= C / 2) < 1) { return D / 2 * B * B * B * B + A; } return -D / 2 * ((B -= 2) * B * B * B - 2) + A; }, elasticIn: function(C, A, G, F, B, E) { if (C == 0) { return A; } if ((C /= F) == 1) { return A + G; } if (!E) { E = F * 0.3; } if (!B || B < Math.abs(G)) { B = G; var D = E / 4; } else { var D = E / (2 * Math.PI) * Math.asin(G / B); } return -(B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D) * (2 * Math.PI) / E)) + A; }, elasticOut: function(C, A, G, F, B, E) { if (C == 0) { return A; } if ((C /= F) == 1) { return A + G; } if (!E) { E = F * 0.3; } if (!B || B < Math.abs(G)) { B = G; var D = E / 4; } else { var D = E / (2 * Math.PI) * Math.asin(G / B); } return B * Math.pow(2, -10 * C) * Math.sin((C * F - D) * (2 * Math.PI) / E) + G + A; }, elasticBoth: function(C, A, G, F, B, E) { if (C == 0) { return A; } if ((C /= F / 2) == 2) { return A + G; } if (!E) { E = F * (0.3 * 1.5); } if (!B || B < Math.abs(G)) { B = G; var D = E / 4; } else { var D = E / (2 * Math.PI) * Math.asin(G / B); } if (C < 1) { return -0.5 * (B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D) * (2 * Math.PI) / E)) + A; } return B * Math.pow(2, -10 * (C -= 1)) * Math.sin((C * F - D) * (2 * Math.PI) / E) * 0.5 + G + A; }, backIn: function(B, A, E, D, C) { if (typeof C == "undefined") { C = 1.70158; } return E * (B /= D) * B * ((C + 1) * B - C) + A; }, backOut: function(B, A, E, D, C) { if (typeof C == "undefined") { C = 1.70158; } return E * ((B = B / D - 1) * B * ((C + 1) * B + C) + 1) + A; }, backBoth: function(B, A, E, D, C) { if (typeof C == "undefined") { C = 1.70158; } if ((B /= D / 2) < 1) { return E / 2 * (B * B * (((C *= (1.525)) + 1) * B - C)) + A; } return E / 2 * ((B -= 2) * B * (((C *= (1.525)) + 1) * B + C) + 2) + A; }, bounceIn: function(B, A, D, C) { return D - YAHOO.util.Easing.bounceOut(C - B, 0, D, C) + A; }, bounceOut: function(B, A, D, C) { if ((B /= C) < (1 / 2.75)) { return D * (7.5625 * B * B) + A; } else { if (B < (2 / 2.75)) { return D * (7.5625 * (B -= (1.5 / 2.75)) * B + 0.75) + A; } else { if (B < (2.5 / 2.75)) { return D * (7.5625 * (B -= (2.25 / 2.75)) * B + 0.9375) + A; } } } return D * (7.5625 * (B -= (2.625 / 2.75)) * B + 0.984375) + A; }, bounceBoth: function(B, A, D, C) { if (B < C / 2) { return YAHOO.util.Easing.bounceIn(B * 2, 0, D, C) * 0.5 + A; } return YAHOO.util.Easing.bounceOut(B * 2 - C, 0, D, C) * 0.5 + D * 0.5 + A; } }; (function() { var A = function(H, G, I, J) { if (H) { A.superclass.constructor.call(this, H, G, I, J); } }; A.NAME = "Motion"; var E = YAHOO.util; YAHOO.extend(A, E.ColorAnim); var F = A.superclass; var C = A.prototype; C.patterns.points = /^points$/i; C.setAttribute = function(G, I, H) { if (this.patterns.points.test(G)) { H = H || "px"; F.setAttribute.call(this, "left", I[0], H); F.setAttribute.call(this, "top", I[1], H); } else { F.setAttribute.call(this, G, I, H); } }; C.getAttribute = function(G) { if (this.patterns.points.test(G)) { var H = [F.getAttribute.call(this, "left"), F.getAttribute.call(this, "top")]; } else { H = F.getAttribute.call(this, G); } return H; }; C.doMethod = function(G, K, H) { var J = null; if (this.patterns.points.test(G)) { var I = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100; J = E.Bezier.getPosition(this.runtimeAttributes[G], I); } else { J = F.doMethod.call(this, G, K, H); } return J; }; C.setRuntimeAttribute = function(P) { if (this.patterns.points.test(P)) { var H = this.getEl(); var J = this.attributes; var G; var L = J["points"]["control"] || []; var I; var M, O; if (L.length > 0 && !(L[0] instanceof Array)) { L = [L]; } else { var K = []; for (M = 0, O = L.length; M < O; ++M) { K[M] = L[M]; } L = K; } if (E.Dom.getStyle(H, "position") == "static") { E.Dom.setStyle(H, "position", "relative"); } if (D(J["points"]["from"])) { E.Dom.setXY(H, J["points"]["from"]); } else { E.Dom.setXY(H, E.Dom.getXY(H)); } G = this.getAttribute("points"); if (D(J["points"]["to"])) { I = B.call(this, J["points"]["to"], G); var N = E.Dom.getXY(this.getEl()); for (M = 0, O = L.length; M < O; ++M) { L[M] = B.call(this, L[M], G); } } else { if (D(J["points"]["by"])) { I = [G[0] + J["points"]["by"][0], G[1] + J["points"]["by"][1]]; for (M = 0, O = L.length; M < O; ++M) { L[M] = [G[0] + L[M][0], G[1] + L[M][1]]; } } } this.runtimeAttributes[P] = [G]; if (L.length > 0) { this.runtimeAttributes[P] = this.runtimeAttributes[P].concat(L); } this.runtimeAttributes[P][this.runtimeAttributes[P].length] = I; } else { F.setRuntimeAttribute.call(this, P); } }; var B = function(G, I) { var H = E.Dom.getXY(this.getEl()); G = [G[0] - H[0] + I[0], G[1] - H[1] + I[1]]; return G; }; var D = function(G) { return (typeof G !== "undefined"); }; E.Motion = A; })(); (function() { var D = function(F, E, G, H) { if (F) { D.superclass.constructor.call(this, F, E, G, H); } }; D.NAME = "Scroll"; var B = YAHOO.util; YAHOO.extend(D, B.ColorAnim); var C = D.superclass; var A = D.prototype; A.doMethod = function(E, H, F) { var G = null; if (E == "scroll") { G = [this.method(this.currentFrame, H[0], F[0] - H[0], this.totalFrames), this.method(this.currentFrame, H[1], F[1] - H[1], this.totalFrames)]; } else { G = C.doMethod.call(this, E, H, F); } return G; }; A.getAttribute = function(E) { var G = null; var F = this.getEl(); if (E == "scroll") { G = [F.scrollLeft, F.scrollTop]; } else { G = C.getAttribute.call(this, E); } return G; }; A.setAttribute = function(E, H, G) { var F = this.getEl(); if (E == "scroll") { F.scrollLeft = H[0]; F.scrollTop = H[1]; } else { C.setAttribute.call(this, E, H, G); } }; B.Scroll = D; })(); YAHOO.register("animation", YAHOO.util.Anim, { version: "2.8.0r4", build: "2449" }); // End // of // File // include/javascript/yui/build/animation/animation-min.js /* * Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the * BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ YAHOO.util.Connect = { _msxml_progid: ["Microsoft.XMLHTTP", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP"], _http_headers: {}, _has_http_headers: false, _use_default_post_header: true, _default_post_header: "application/x-www-form-urlencoded; charset=UTF-8", _default_form_header: "application/x-www-form-urlencoded", _use_default_xhr_header: true, _default_xhr_header: "XMLHttpRequest", _has_default_headers: true, _default_headers: {}, _poll: {}, _timeOut: {}, _polling_interval: 50, _transaction_id: 0, startEvent: new YAHOO.util.CustomEvent("start"), completeEvent: new YAHOO.util.CustomEvent("complete"), successEvent: new YAHOO.util.CustomEvent("success"), failureEvent: new YAHOO.util.CustomEvent("failure"), abortEvent: new YAHOO.util.CustomEvent("abort"), _customEvents: { onStart: ["startEvent", "start"], onComplete: ["completeEvent", "complete"], onSuccess: ["successEvent", "success"], onFailure: ["failureEvent", "failure"], onUpload: ["uploadEvent", "upload"], onAbort: ["abortEvent", "abort"] }, setProgId: function(A) { this._msxml_progid.unshift(A); }, setDefaultPostHeader: function(A) { if (typeof A == "string") { this._default_post_header = A; } else { if (typeof A == "boolean") { this._use_default_post_header = A; } } }, setDefaultXhrHeader: function(A) { if (typeof A == "string") { this._default_xhr_header = A; } else { this._use_default_xhr_header = A; } }, setPollingInterval: function(A) { if (typeof A == "number" && isFinite(A)) { this._polling_interval = A; } }, createXhrObject: function(F) { var D, A, B; try { A = new XMLHttpRequest(); D = { conn: A, tId: F, xhr: true }; } catch (C) { for (B = 0; B < this._msxml_progid.length; ++B) { try { A = new ActiveXObject(this._msxml_progid[B]); D = { conn: A, tId: F, xhr: true }; break; } catch (E) {} } } finally { return D; } }, getConnectionObject: function(A) { var C, D = this._transaction_id; try { if (!A) { C = this.createXhrObject(D); } else { C = { tId: D }; if (A === "xdr") { C.conn = this._transport; C.xdr = true; } else { if (A === "upload") { C.upload = true; } } } if (C) { this._transaction_id++; } } catch (B) {} return C; }, asyncRequest: function(G, D, F, A) { var E, C, B = (F && F.argument) ? F.argument : null; if (this._isFileUpload) { C = "upload"; } else { if (F.xdr) { C = "xdr"; } } E = this.getConnectionObject(C); if (!E) { return null; } else { if (F && F.customevents) { this.initCustomEvents(E, F); } if (this._isFormSubmit) { if (this._isFileUpload) { this.uploadFile(E, F, D, A); return E; } if (G.toUpperCase() == "GET") { if (this._sFormData.length !== 0) { D += ((D.indexOf("?") == -1) ? "?" : "&") + this._sFormData; } } else { if (G.toUpperCase() == "POST") { A = A ? this._sFormData + "&" + A : this._sFormData; } } } if (G.toUpperCase() == "GET" && (F && F.cache === false)) { D += ((D.indexOf("?") == -1) ? "?" : "&") + "rnd=" + new Date().valueOf().toString(); } if (this._use_default_xhr_header) { if (!this._default_headers["X-Requested-With"]) { this.initHeader("X-Requested-With", this._default_xhr_header, true); } } if ((G.toUpperCase() === "POST" && this._use_default_post_header) && this._isFormSubmit === false) { this.initHeader("Content-Type", this._default_post_header); } if (E.xdr) { this.xdr(E, G, D, F, A); return E; } E.conn.open(G, D, true); if (this._has_default_headers || this._has_http_headers) { this.setHeader(E); } this.handleReadyState(E, F); E.conn.send(A || ""); if (this._isFormSubmit === true) { this.resetFormState(); } this.startEvent.fire(E, B); if (E.startEvent) { E.startEvent.fire(E, B); } return E; } }, initCustomEvents: function(A, C) { var B; for (B in C.customevents) { if (this._customEvents[B][0]) { A[this._customEvents[B][0]] = new YAHOO.util.CustomEvent(this._customEvents[B][1], (C.scope) ? C.scope : null); A[this._customEvents[B][0]].subscribe(C.customevents[B]); } } }, handleReadyState: function(C, D) { var B = this, A = (D && D.argument) ? D.argument : null; if (D && D.timeout) { this._timeOut[C.tId] = window.setTimeout(function() { B.abort(C, D, true); }, D.timeout); } this._poll[C.tId] = window.setInterval(function() { if (C.conn && C.conn.readyState === 4) { window.clearInterval(B._poll[C.tId]); delete B._poll[C.tId]; if (D && D.timeout) { window.clearTimeout(B._timeOut[C.tId]); delete B._timeOut[C.tId]; } B.completeEvent.fire(C, A); if (C.completeEvent) { C.completeEvent.fire(C, A); } B.handleTransactionResponse(C, D); } }, this._polling_interval); }, handleTransactionResponse: function(B, I, D) { var E, A, G = (I && I.argument) ? I.argument : null, C = (B.r && B.r.statusText === "xdr:success") ? true : false, H = (B.r && B.r.statusText === "xdr:failure") ? true : false, J = D; try { if ((B.conn.status !== undefined && B.conn.status !== 0) || C) { E = B.conn.status; } else { if (H && !J) { E = 0; } else { E = 13030; } } } catch (F) { E = 13030; } if ((E >= 200 && E < 300) || E === 1223 || C) { A = B.xdr ? B.r : this.createResponseObject(B, G); if (I && I.success) { if (!I.scope) { I.success(A); } else { I.success.apply(I.scope, [A]); } } this.successEvent.fire(A); if (B.successEvent) { B.successEvent.fire(A); } } else { switch (E) { case 12002: case 12029: case 12030: case 12031: case 12152: case 13030: A = this.createExceptionObject(B.tId, G, (D ? D : false)); if (I && I.failure) { if (!I.scope) { I.failure(A); } else { I.failure.apply(I.scope, [A]); } } break; default: A = (B.xdr) ? B.response : this.createResponseObject(B, G); if (I && I.failure) { if (!I.scope) { I.failure(A); } else { I.failure.apply(I.scope, [A]); } } } this.failureEvent.fire(A); if (B.failureEvent) { B.failureEvent.fire(A); } } this.releaseObject(B); A = null; }, createResponseObject: function(A, G) { var D = {}, I = {}, E, C, F, B; try { C = A.conn.getAllResponseHeaders(); F = C.split("\n"); for (E = 0; E < F.length; E++) { B = F[E].indexOf(":"); if (B != -1) { I[F[E].substring(0, B)] = YAHOO.lang.trim(F[E].substring(B + 2)); } } } catch (H) {} D.tId = A.tId; D.status = (A.conn.status == 1223) ? 204 : A.conn.status; D.statusText = (A.conn.status == 1223) ? "No Content" : A.conn.statusText; D.getResponseHeader = I; D.getAllResponseHeaders = C; D.responseText = A.conn.responseText; D.responseXML = A.conn.responseXML; if (G) { D.argument = G; } return D; }, createExceptionObject: function(H, D, A) { var F = 0, G = "communication failure", C = -1, B = "transaction aborted", E = {}; E.tId = H; if (A) { E.status = C; E.statusText = B; } else { E.status = F; E.statusText = G; } if (D) { E.argument = D; } return E; }, initHeader: function(A, D, C) { var B = (C) ? this._default_headers : this._http_headers; B[A] = D; if (C) { this._has_default_headers = true; } else { this._has_http_headers = true; } }, setHeader: function(A) { var B; if (this._has_default_headers) { for (B in this._default_headers) { if (YAHOO.lang.hasOwnProperty(this._default_headers, B)) { A.conn.setRequestHeader(B, this._default_headers[B]); } } } if (this._has_http_headers) { for (B in this._http_headers) { if (YAHOO.lang.hasOwnProperty(this._http_headers, B)) { A.conn.setRequestHeader(B, this._http_headers[B]); } } this._http_headers = {}; this._has_http_headers = false; } }, resetDefaultHeaders: function() { this._default_headers = {}; this._has_default_headers = false; }, abort: function(E, G, A) { var D, B = (G && G.argument) ? G.argument : null; E = E || {}; if (E.conn) { if (E.xhr) { if (this.isCallInProgress(E)) { E.conn.abort(); window.clearInterval(this._poll[E.tId]); delete this._poll[E.tId]; if (A) { window.clearTimeout(this._timeOut[E.tId]); delete this._timeOut[E.tId]; } D = true; } } else { if (E.xdr) { E.conn.abort(E.tId); D = true; } } } else { if (E.upload) { var C = "yuiIO" + E.tId; var F = document.getElementById(C); if (F) { YAHOO.util.Event.removeListener(F, "load"); document.body.removeChild(F); if (A) { window.clearTimeout(this._timeOut[E.tId]); delete this._timeOut[E.tId]; } D = true; } } else { D = false; } } if (D === true) { this.abortEvent.fire(E, B); if (E.abortEvent) { E.abortEvent.fire(E, B); } this.handleTransactionResponse(E, G, true); } return D; }, isCallInProgress: function(A) { A = A || {}; if (A.xhr && A.conn) { return A.conn.readyState !== 4 && A.conn.readyState !== 0; } else { if (A.xdr && A.conn) { return A.conn.isCallInProgress(A.tId); } else { if (A.upload === true) { return document.getElementById("yuiIO" + A.tId) ? true : false; } else { return false; } } } }, releaseObject: function(A) { if (A && A.conn) { A.conn = null; A = null; } } }; (function() { var G = YAHOO.util.Connect, H = {}; function D(I) { var J = '", K = document.createElement("div"); document.body.appendChild(K); K.innerHTML = J; } function B(L, I, J, M, K) { H[parseInt(L.tId)] = { "o": L, "c": M }; if (K) { M.method = I; M.data = K; } L.conn.send(J, M, L.tId); } function E(I) { D(I); G._transport = document.getElementById("YUIConnectionSwf"); } function C() { G.xdrReadyEvent.fire(); } function A(J, I) { if (J) { G.startEvent.fire(J, I.argument); if (J.startEvent) { J.startEvent.fire(J, I.argument); } } } function F(J) { var K = H[J.tId].o, I = H[J.tId].c; if (J.statusText === "xdr:start") { A(K, I); return; } J.responseText = decodeURI(J.responseText); K.r = J; if (I.argument) { K.r.argument = I.argument; } this.handleTransactionResponse(K, I, J.statusText === "xdr:abort" ? true : false); delete H[J.tId]; } G.xdr = B; G.swf = D; G.transport = E; G.xdrReadyEvent = new YAHOO.util.CustomEvent("xdrReady"); G.xdrReady = C; G.handleXdrResponse = F; })(); (function() { var D = YAHOO.util.Connect, F = YAHOO.util.Event; D._isFormSubmit = false; D._isFileUpload = false; D._formNode = null; D._sFormData = null; D._submitElementValue = null; D.uploadEvent = new YAHOO.util.CustomEvent("upload"), D._hasSubmitListener = function() { if (F) { F.addListener(document, "click", function(J) { var I = F.getTarget(J), H = I.nodeName.toLowerCase(); if ((H === "input" || H === "button") && (I.type && I.type.toLowerCase() == "submit")) { D._submitElementValue = encodeURIComponent(I.name) + "=" + encodeURIComponent(I.value); } }); return true; } return false; }(); function G(T, O, J) { var S, I, R, P, W, Q = false, M = [], V = 0, L, N, K, U, H; this.resetFormState(); if (typeof T == "string") { S = (document.getElementById(T) || document.forms[T]); } else { if (typeof T == "object") { S = T; } else { return; } } if (O) { this.createFrame(J ? J : null); this._isFormSubmit = true; this._isFileUpload = true; this._formNode = S; return; } for (L = 0, N = S.elements.length; L < N; ++L) { I = S.elements[L]; W = I.disabled; R = I.name; if (!W && R) { R = encodeURIComponent(R) + "="; P = encodeURIComponent(I.value); switch (I.type) { case "select-one": if (I.selectedIndex > -1) { H = I.options[I.selectedIndex]; M[V++] = R + encodeURIComponent((H.attributes.value && H.attributes.value.specified) ? H.value : H.text); } break; case "select-multiple": if (I.selectedIndex > -1) { for (K = I.selectedIndex, U = I.options.length; K < U; ++K) { H = I.options[K]; if (H.selected) { M[V++] = R + encodeURIComponent((H.attributes.value && H.attributes.value.specified) ? H.value : H.text); } } } break; case "radio": case "checkbox": if (I.checked) { M[V++] = R + P; } break; case "file": case undefined: case "reset": case "button": break; case "submit": if (Q === false) { if (this._hasSubmitListener && this._submitElementValue) { M[V++] = this._submitElementValue; } Q = true; } break; default: M[V++] = R + P; } } } this._isFormSubmit = true; this._sFormData = M.join("&"); this.initHeader("Content-Type", this._default_form_header); return this._sFormData; } function C() { this._isFormSubmit = false; this._isFileUpload = false; this._formNode = null; this._sFormData = ""; } function B(H) { var I = "yuiIO" + this._transaction_id, J; if (YAHOO.env.ua.ie) { J = document.createElement(''); if (typeof H == "boolean") { J.src = "javascript:false"; } } else { J = document.createElement("iframe"); J.id = I; J.name = I; } J.style.position = "absolute"; J.style.top = "-1000px"; J.style.left = "-1000px"; document.body.appendChild(J); } function E(H) { var K = [], I = H.split("&"), J, L; for (J = 0; J < I.length; J++) { L = I[J].indexOf("="); if (L != -1) { K[J] = document.createElement("input"); K[J].type = "hidden"; K[J].name = decodeURIComponent(I[J].substring(0, L)); K[J].value = decodeURIComponent(I[J].substring(L + 1)); this._formNode.appendChild(K[J]); } } return K; } function A(K, V, L, J) { var Q = "yuiIO" + K.tId, R = "multipart/form-data", T = document.getElementById(Q), M = (document.documentMode && document.documentMode === 8) ? true : false, W = this, S = (V && V.argument) ? V.argument : null, U, P, I, O, H, N; H = { action: this._formNode.getAttribute("action"), method: this._formNode.getAttribute("method"), target: this._formNode.getAttribute("target") }; this._formNode.setAttribute("action", L); this._formNode.setAttribute("method", "POST"); this._formNode.setAttribute("target", Q); if (YAHOO.env.ua.ie && !M) { this._formNode.setAttribute("encoding", R); } else { this._formNode.setAttribute("enctype", R); } if (J) { U = this.appendPostData(J); } this._formNode.submit(); this.startEvent.fire(K, S); if (K.startEvent) { K.startEvent.fire(K, S); } if (V && V.timeout) { this._timeOut[K.tId] = window.setTimeout(function() { W.abort(K, V, true); }, V.timeout); } if (U && U.length > 0) { for (P = 0; P < U.length; P++) { this._formNode.removeChild(U[P]); } } for (I in H) { if (YAHOO.lang.hasOwnProperty(H, I)) { if (H[I]) { this._formNode.setAttribute(I, H[I]); } else { this._formNode.removeAttribute(I); } } } this.resetFormState(); N = function() { if (V && V.timeout) { window.clearTimeout(W._timeOut[K.tId]); delete W._timeOut[K.tId]; } W.completeEvent.fire(K, S); if (K.completeEvent) { K.completeEvent.fire(K, S); } O = { tId: K.tId, argument: V.argument }; try { O.responseText = T.contentWindow.document.body ? T.contentWindow.document.body.innerHTML : T.contentWindow.document.documentElement.textContent; O.responseXML = T.contentWindow.document.XMLDocument ? T.contentWindow.document.XMLDocument : T.contentWindow.document; } catch (X) {} if (V && V.upload) { if (!V.scope) { V.upload(O); } else { V.upload.apply(V.scope, [O]); } } W.uploadEvent.fire(O); if (K.uploadEvent) { K.uploadEvent.fire(O); } F.removeListener(T, "load", N); setTimeout(function() { document.body.removeChild(T); W.releaseObject(K); }, 100); }; F.addListener(T, "load", N); } D.setForm = G; D.resetFormState = C; D.createFrame = B; D.appendPostData = E; D.uploadFile = A; })(); YAHOO.register("connection", YAHOO.util.Connect, { version: "2.8.0r4", build: "2449" }); // End // of // File // include/javascript/yui/build/connection/connection-min.js /* * Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the * BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ if (!YAHOO.util.DragDropMgr) { YAHOO.util.DragDropMgr = function() { var A = YAHOO.util.Event, B = YAHOO.util.Dom; return { useShim: false, _shimActive: false, _shimState: false, _debugShim: false, _createShim: function() { var C = document.createElement("div"); C.id = "yui-ddm-shim"; if (document.body.firstChild) { document.body.insertBefore(C, document.body.firstChild); } else { document.body.appendChild(C); } C.style.display = "none"; C.style.backgroundColor = "red"; C.style.position = "absolute"; C.style.zIndex = "99999"; B.setStyle(C, "opacity", "0"); this._shim = C; A.on(C, "mouseup", this.handleMouseUp, this, true); A.on(C, "mousemove", this.handleMouseMove, this, true); A.on(window, "scroll", this._sizeShim, this, true); }, _sizeShim: function() { if (this._shimActive) { var C = this._shim; C.style.height = B.getDocumentHeight() + "px"; C.style.width = B.getDocumentWidth() + "px"; C.style.top = "0"; C.style.left = "0"; } }, _activateShim: function() { if (this.useShim) { if (!this._shim) { this._createShim(); } this._shimActive = true; var C = this._shim, D = "0"; if (this._debugShim) { D = ".5"; } B.setStyle(C, "opacity", D); this._sizeShim(); C.style.display = "block"; } }, _deactivateShim: function() { this._shim.style.display = "none"; this._shimActive = false; }, _shim: null, ids: {}, handleIds: {}, dragCurrent: null, dragOvers: {}, deltaX: 0, deltaY: 0, preventDefault: true, stopPropagation: true, initialized: false, locked: false, interactionInfo: null, init: function() { this.initialized = true; }, POINT: 0, INTERSECT: 1, STRICT_INTERSECT: 2, mode: 0, _execOnAll: function(E, D) { for (var F in this.ids) { for (var C in this.ids[F]) { var G = this.ids[F][C]; if (!this.isTypeOfDD(G)) { continue; } G[E].apply(G, D); } } }, _onLoad: function() { this.init(); A.on(document, "mouseup", this.handleMouseUp, this, true); A.on(document, "mousemove", this.handleMouseMove, this, true); A.on(window, "unload", this._onUnload, this, true); A.on(window, "resize", this._onResize, this, true); }, _onResize: function(C) { this._execOnAll("resetConstraints", []); }, lock: function() { this.locked = true; }, unlock: function() { this.locked = false; }, isLocked: function() { return this.locked; }, locationCache: {}, useCache: true, clickPixelThresh: 3, clickTimeThresh: 1000, dragThreshMet: false, clickTimeout: null, startX: 0, startY: 0, fromTimeout: false, regDragDrop: function(D, C) { if (!this.initialized) { this.init(); } if (!this.ids[C]) { this.ids[C] = {}; } this.ids[C][D.id] = D; }, removeDDFromGroup: function(E, C) { if (!this.ids[C]) { this.ids[C] = {}; } var D = this.ids[C]; if (D && D[E.id]) { delete D[E.id]; } }, _remove: function(E) { for (var D in E.groups) { if (D) { var C = this.ids[D]; if (C && C[E.id]) { delete C[E.id]; } } } delete this.handleIds[E.id]; }, regHandle: function(D, C) { if (!this.handleIds[D]) { this.handleIds[D] = {}; } this.handleIds[D][C] = C; }, isDragDrop: function(C) { return (this.getDDById(C)) ? true : false; }, getRelated: function(H, D) { var G = []; for (var F in H.groups) { for (var E in this.ids[F]) { var C = this.ids[F][E]; if (!this.isTypeOfDD(C)) { continue; } if (!D || C.isTarget) { G[G.length] = C; } } } return G; }, isLegalTarget: function(G, F) { var D = this.getRelated(G, true); for (var E = 0, C = D.length; E < C; ++E) { if (D[E].id == F.id) { return true; } } return false; }, isTypeOfDD: function(C) { return (C && C.__ygDragDrop); }, isHandle: function(D, C) { return (this.handleIds[D] && this.handleIds[D][C]); }, getDDById: function(D) { for (var C in this.ids) { if (this.ids[C][D]) { return this.ids[C][D]; } } return null; }, handleMouseDown: function(E, D) { this.currentTarget = YAHOO.util.Event.getTarget(E); this.dragCurrent = D; var C = D.getEl(); this.startX = YAHOO.util.Event.getPageX(E); this.startY = YAHOO.util.Event.getPageY(E); this.deltaX = this.startX - C.offsetLeft; this.deltaY = this.startY - C.offsetTop; this.dragThreshMet = false; this.clickTimeout = setTimeout(function() { var F = YAHOO.util.DDM; F.startDrag(F.startX, F.startY); F.fromTimeout = true; }, this.clickTimeThresh); }, startDrag: function(C, E) { if (this.dragCurrent && this.dragCurrent.useShim) { this._shimState = this.useShim; this.useShim = true; } this._activateShim(); clearTimeout(this.clickTimeout); var D = this.dragCurrent; if (D && D.events.b4StartDrag) { D.b4StartDrag(C, E); D.fireEvent("b4StartDragEvent", { x: C, y: E }); } if (D && D.events.startDrag) { D.startDrag(C, E); D.fireEvent("startDragEvent", { x: C, y: E }); } this.dragThreshMet = true; }, handleMouseUp: function(C) { if (this.dragCurrent) { clearTimeout(this.clickTimeout); if (this.dragThreshMet) { if (this.fromTimeout) { this.fromTimeout = false; this.handleMouseMove(C); } this.fromTimeout = false; this.fireEvents(C, true); } else {} this.stopDrag(C); this.stopEvent(C); } }, stopEvent: function(C) { if (this.stopPropagation) { YAHOO.util.Event.stopPropagation(C); } if (this.preventDefault) { YAHOO.util.Event.preventDefault(C); } }, stopDrag: function(E, D) { var C = this.dragCurrent; if (C && !D) { if (this.dragThreshMet) { if (C.events.b4EndDrag) { C.b4EndDrag(E); C.fireEvent("b4EndDragEvent", { e: E }); } if (C.events.endDrag) { C.endDrag(E); C.fireEvent("endDragEvent", { e: E }); } } if (C.events.mouseUp) { C.onMouseUp(E); C.fireEvent("mouseUpEvent", { e: E }); } } if (this._shimActive) { this._deactivateShim(); if (this.dragCurrent && this.dragCurrent.useShim) { this.useShim = this._shimState; this._shimState = false; } } this.dragCurrent = null; this.dragOvers = {}; }, handleMouseMove: function(F) { var C = this.dragCurrent; if (C) { if (YAHOO.util.Event.isIE && !F.button) { this.stopEvent(F); return this.handleMouseUp(F); } else { if (F.clientX < 0 || F.clientY < 0) {} } if (!this.dragThreshMet) { var E = Math.abs(this.startX - YAHOO.util.Event.getPageX(F)); var D = Math.abs(this.startY - YAHOO.util.Event.getPageY(F)); if (E > this.clickPixelThresh || D > this.clickPixelThresh) { this.startDrag(this.startX, this.startY); } } if (this.dragThreshMet) { if (C && C.events.b4Drag) { C.b4Drag(F); C.fireEvent("b4DragEvent", { e: F }); } if (C && C.events.drag) { C.onDrag(F); C.fireEvent("dragEvent", { e: F }); } if (C) { this.fireEvents(F, false); } } this.stopEvent(F); } }, fireEvents: function(V, L) { var a = this.dragCurrent; if (!a || a.isLocked() || a.dragOnly) { return; } var N = YAHOO.util.Event.getPageX(V), M = YAHOO.util.Event.getPageY(V), P = new YAHOO.util.Point(N, M), K = a.getTargetCoord(P.x, P.y), F = a.getDragEl(), E = ["out", "over", "drop", "enter"], U = new YAHOO.util.Region(K.y, K.x + F.offsetWidth, K.y + F.offsetHeight, K.x), I = [], D = {}, Q = [], c = { outEvts: [], overEvts: [], dropEvts: [], enterEvts: [] }; for (var S in this.dragOvers) { var d = this.dragOvers[S]; if (!this.isTypeOfDD(d)) { continue; } if (!this.isOverTarget(P, d, this.mode, U)) { c.outEvts.push(d); } I[S] = true; delete this.dragOvers[S]; } for (var R in a.groups) { if ("string" != typeof R) { continue; } for (S in this.ids[R]) { var G = this.ids[R][S]; if (!this.isTypeOfDD(G)) { continue; } if (G.isTarget && !G.isLocked() && G != a) { if (this.isOverTarget(P, G, this.mode, U)) { D[R] = true; if (L) { c.dropEvts.push(G); } else { if (!I[G.id]) { c.enterEvts.push(G); } else { c.overEvts.push(G); } this.dragOvers[G.id] = G; } } } } } this.interactionInfo = { out: c.outEvts, enter: c.enterEvts, over: c.overEvts, drop: c.dropEvts, point: P, draggedRegion: U, sourceRegion: this.locationCache[a.id], validDrop: L }; for (var C in D) { Q.push(C); } if (L && !c.dropEvts.length) { this.interactionInfo.validDrop = false; if (a.events.invalidDrop) { a.onInvalidDrop(V); a.fireEvent("invalidDropEvent", { e: V }); } } for (S = 0; S < E.length; S++) { var Y = null; if (c[E[S] + "Evts"]) { Y = c[E[S] + "Evts"]; } if (Y && Y.length) { var H = E[S].charAt(0).toUpperCase() + E[S].substr(1), X = "onDrag" + H, J = "b4Drag" + H, O = "drag" + H + "Event", W = "drag" + H; if (this.mode) { if (a.events[J]) { a[J](V, Y, Q); a.fireEvent(J + "Event", { event: V, info: Y, group: Q }); } if (a.events[W]) { a[X](V, Y, Q); a.fireEvent(O, { event: V, info: Y, group: Q }); } } else { for (var Z = 0, T = Y.length; Z < T; ++Z) { if (a.events[J]) { a[J](V, Y[Z].id, Q[0]); a.fireEvent(J + "Event", { event: V, info: Y[Z].id, group: Q[0] }); } if (a.events[W]) { a[X](V, Y[Z].id, Q[0]); a.fireEvent(O, { event: V, info: Y[Z].id, group: Q[0] }); } } } } } }, getBestMatch: function(E) { var G = null; var D = E.length; if (D == 1) { G = E[0]; } else { for (var F = 0; F < D; ++F) { var C = E[F]; if (this.mode == this.INTERSECT && C.cursorIsOver) { G = C; break; } else { if (!G || !G.overlap || (C.overlap && G.overlap.getArea() < C.overlap.getArea())) { G = C; } } } } return G; }, refreshCache: function(D) { var F = D || this.ids; for (var C in F) { if ("string" != typeof C) { continue; } for (var E in this.ids[C]) { var G = this.ids[C][E]; if (this.isTypeOfDD(G)) { var H = this.getLocation(G); if (H) { this.locationCache[G.id] = H; } else { delete this.locationCache[G.id]; } } } } }, verifyEl: function(D) { try { if (D) { var C = D.offsetParent; if (C) { return true; } } } catch (E) {} return false; }, getLocation: function(H) { if (!this.isTypeOfDD(H)) { return null; } var F = H.getEl(), K, E, D, M, L, N, C, J, G; try { K = YAHOO.util.Dom.getXY(F); } catch (I) {} if (!K) { return null; } E = K[0]; D = E + F.offsetWidth; M = K[1]; L = M + F.offsetHeight; N = M - H.padding[0]; C = D + H.padding[1]; J = L + H.padding[2]; G = E - H.padding[3]; return new YAHOO.util.Region(N, C, J, G); }, isOverTarget: function(K, C, E, F) { var G = this.locationCache[C.id]; if (!G || !this.useCache) { G = this.getLocation(C); this.locationCache[C.id] = G; } if (!G) { return false; } C.cursorIsOver = G.contains(K); var J = this.dragCurrent; if (!J || (!E && !J.constrainX && !J.constrainY)) { return C.cursorIsOver; } C.overlap = null; if (!F) { var H = J.getTargetCoord(K.x, K.y); var D = J.getDragEl(); F = new YAHOO.util.Region(H.y, H.x + D.offsetWidth, H.y + D.offsetHeight, H.x); } var I = F.intersect(G); if (I) { C.overlap = I; return (E) ? true : C.cursorIsOver; } else { return false; } }, _onUnload: function(D, C) { this.unregAll(); }, unregAll: function() { if (this.dragCurrent) { this.stopDrag(); this.dragCurrent = null; } this._execOnAll("unreg", []); this.ids = {}; }, elementCache: {}, getElWrapper: function(D) { var C = this.elementCache[D]; if (!C || !C.el) { C = this.elementCache[D] = new this.ElementWrapper(YAHOO.util.Dom.get(D)); } return C; }, getElement: function(C) { return YAHOO.util.Dom.get(C); }, getCss: function(D) { var C = YAHOO.util.Dom.get(D); return (C) ? C.style : null; }, ElementWrapper: function(C) { this.el = C || null; this.id = this.el && C.id; this.css = this.el && C.style; }, getPosX: function(C) { return YAHOO.util.Dom.getX(C); }, getPosY: function(C) { return YAHOO.util.Dom.getY(C); }, swapNode: function(E, C) { if (E.swapNode) { E.swapNode(C); } else { var F = C.parentNode; var D = C.nextSibling; if (D == E) { F.insertBefore(E, C); } else { if (C == E.nextSibling) { F.insertBefore(C, E); } else { E.parentNode.replaceChild(C, E); F.insertBefore(E, D); } } } }, getScroll: function() { var E, C, F = document.documentElement, D = document.body; if (F && (F.scrollTop || F.scrollLeft)) { E = F.scrollTop; C = F.scrollLeft; } else { if (D) { E = D.scrollTop; C = D.scrollLeft; } else {} } return { top: E, left: C }; }, getStyle: function(D, C) { return YAHOO.util.Dom.getStyle(D, C); }, getScrollTop: function() { return this.getScroll().top; }, getScrollLeft: function() { return this.getScroll().left; }, moveToEl: function(C, E) { var D = YAHOO.util.Dom.getXY(E); YAHOO.util.Dom.setXY(C, D); }, getClientHeight: function() { return YAHOO.util.Dom.getViewportHeight(); }, getClientWidth: function() { return YAHOO.util.Dom.getViewportWidth(); }, numericSort: function(D, C) { return (D - C); }, _timeoutCount: 0, _addListeners: function() { var C = YAHOO.util.DDM; if (YAHOO.util.Event && document) { C._onLoad(); } else { if (C._timeoutCount > 2000) {} else { setTimeout(C._addListeners, 10); if (document && document.body) { C._timeoutCount += 1; } } } }, handleWasClicked: function(C, E) { if (this.isHandle(E, C.id)) { return true; } else { var D = C.parentNode; while (D) { if (this.isHandle(E, D.id)) { return true; } else { D = D.parentNode; } } } return false; } }; }(); YAHOO.util.DDM = YAHOO.util.DragDropMgr; YAHOO.util.DDM._addListeners(); }(function() { var A = YAHOO.util.Event; var B = YAHOO.util.Dom; YAHOO.util.DragDrop = function(E, C, D) { if (E) { this.init(E, C, D); } }; YAHOO.util.DragDrop.prototype = { events: null, on: function() { this.subscribe.apply(this, arguments); }, id: null, config: null, dragElId: null, handleElId: null, invalidHandleTypes: null, invalidHandleIds: null, invalidHandleClasses: null, startPageX: 0, startPageY: 0, groups: null, locked: false, lock: function() { this.locked = true; }, unlock: function() { this.locked = false; }, isTarget: true, padding: null, dragOnly: false, useShim: false, _domRef: null, __ygDragDrop: true, constrainX: false, constrainY: false, minX: 0, maxX: 0, minY: 0, maxY: 0, deltaX: 0, deltaY: 0, maintainOffset: false, xTicks: null, yTicks: null, primaryButtonOnly: true, available: false, hasOuterHandles: false, cursorIsOver: false, overlap: null, b4StartDrag: function(C, D) {}, startDrag: function(C, D) {}, b4Drag: function(C) {}, onDrag: function(C) {}, onDragEnter: function(C, D) {}, b4DragOver: function(C) {}, onDragOver: function(C, D) {}, b4DragOut: function(C) {}, onDragOut: function(C, D) {}, b4DragDrop: function(C) {}, onDragDrop: function(C, D) {}, onInvalidDrop: function(C) {}, b4EndDrag: function(C) {}, endDrag: function(C) {}, b4MouseDown: function(C) {}, onMouseDown: function(C) {}, onMouseUp: function(C) {}, onAvailable: function() {}, getEl: function() { if (!this._domRef) { this._domRef = B.get(this.id); } return this._domRef; }, getDragEl: function() { return B.get(this.dragElId); }, init: function(F, C, D) { this.initTarget(F, C, D); A.on(this._domRef || this.id, "mousedown", this.handleMouseDown, this, true); for (var E in this.events) { this.createEvent(E + "Event"); } }, initTarget: function(E, C, D) { this.config = D || {}; this.events = {}; this.DDM = YAHOO.util.DDM; this.groups = {}; if (typeof E !== "string") { this._domRef = E; E = B.generateId(E); } this.id = E; this.addToGroup((C) ? C : "default"); this.handleElId = E; A.onAvailable(E, this.handleOnAvailable, this, true); this.setDragElId(E); this.invalidHandleTypes = { A: "A" }; this.invalidHandleIds = {}; this.invalidHandleClasses = []; this.applyConfig(); }, applyConfig: function() { this.events = { mouseDown: true, b4MouseDown: true, mouseUp: true, b4StartDrag: true, startDrag: true, b4EndDrag: true, endDrag: true, drag: true, b4Drag: true, invalidDrop: true, b4DragOut: true, dragOut: true, dragEnter: true, b4DragOver: true, dragOver: true, b4DragDrop: true, dragDrop: true }; if (this.config.events) { for (var C in this.config.events) { if (this.config.events[C] === false) { this.events[C] = false; } } } this.padding = this.config.padding || [0, 0, 0, 0]; this.isTarget = (this.config.isTarget !== false); this.maintainOffset = (this.config.maintainOffset); this.primaryButtonOnly = (this.config.primaryButtonOnly !== false); this.dragOnly = ((this.config.dragOnly === true) ? true : false); this.useShim = ((this.config.useShim === true) ? true : false); }, handleOnAvailable: function() { this.available = true; this.resetConstraints(); this.onAvailable(); }, setPadding: function(E, C, F, D) { if (!C && 0 !== C) { this.padding = [E, E, E, E]; } else { if (!F && 0 !== F) { this.padding = [E, C, E, C]; } else { this.padding = [E, C, F, D]; } } }, setInitPosition: function(F, E) { var G = this.getEl(); if (!this.DDM.verifyEl(G)) { if (G && G.style && (G.style.display == "none")) {} else {} return; } var D = F || 0; var C = E || 0; var H = B.getXY(G); this.initPageX = H[0] - D; this.initPageY = H[1] - C; this.lastPageX = H[0]; this.lastPageY = H[1]; this.setStartPosition(H); }, setStartPosition: function(D) { var C = D || B.getXY(this.getEl()); this.deltaSetXY = null; this.startPageX = C[0]; this.startPageY = C[1]; }, addToGroup: function(C) { this.groups[C] = true; this.DDM.regDragDrop(this, C); }, removeFromGroup: function(C) { if (this.groups[C]) { delete this.groups[C]; } this.DDM.removeDDFromGroup(this, C); }, setDragElId: function(C) { this.dragElId = C; }, setHandleElId: function(C) { if (typeof C !== "string") { C = B.generateId(C); } this.handleElId = C; this.DDM.regHandle(this.id, C); }, setOuterHandleElId: function(C) { if (typeof C !== "string") { C = B.generateId(C); } A.on(C, "mousedown", this.handleMouseDown, this, true); this.setHandleElId(C); this.hasOuterHandles = true; }, unreg: function() { A.removeListener(this.id, "mousedown", this.handleMouseDown); this._domRef = null; this.DDM._remove(this); }, isLocked: function() { return (this.DDM.isLocked() || this.locked); }, handleMouseDown: function(J, I) { var D = J.which || J.button; if (this.primaryButtonOnly && D > 1) { return; } if (this.isLocked()) { return; } var C = this.b4MouseDown(J), F = true; if (this.events.b4MouseDown) { F = this.fireEvent("b4MouseDownEvent", J); } var E = this.onMouseDown(J), H = true; if (this.events.mouseDown) { H = this.fireEvent("mouseDownEvent", J); } if ((C === false) || (E === false) || (F === false) || (H === false)) { return; } this.DDM.refreshCache(this.groups); var G = new YAHOO.util.Point(A.getPageX(J), A.getPageY(J)); if (!this.hasOuterHandles && !this.DDM.isOverTarget(G, this)) {} else { if (this.clickValidator(J)) { this.setStartPosition(); this.DDM.handleMouseDown(J, this); this.DDM.stopEvent(J); } else {} } }, clickValidator: function(D) { var C = YAHOO.util.Event.getTarget(D); return (this.isValidHandleChild(C) && (this.id == this.handleElId || this.DDM.handleWasClicked(C, this.id))); }, getTargetCoord: function(E, D) { var C = E - this.deltaX; var F = D - this.deltaY; if (this.constrainX) { if (C < this.minX) { C = this.minX; } if (C > this.maxX) { C = this.maxX; } } if (this.constrainY) { if (F < this.minY) { F = this.minY; } if (F > this.maxY) { F = this.maxY; } } C = this.getTick(C, this.xTicks); F = this.getTick(F, this.yTicks); return { x: C, y: F }; }, addInvalidHandleType: function(C) { var D = C.toUpperCase(); this.invalidHandleTypes[D] = D; }, addInvalidHandleId: function(C) { if (typeof C !== "string") { C = B.generateId(C); } this.invalidHandleIds[C] = C; }, addInvalidHandleClass: function(C) { this.invalidHandleClasses.push(C); }, removeInvalidHandleType: function(C) { var D = C.toUpperCase(); delete this.invalidHandleTypes[D]; }, removeInvalidHandleId: function(C) { if (typeof C !== "string") { C = B.generateId(C); } delete this.invalidHandleIds[C]; }, removeInvalidHandleClass: function(D) { for (var E = 0, C = this.invalidHandleClasses.length; E < C; ++E) { if (this.invalidHandleClasses[E] == D) { delete this.invalidHandleClasses[E]; } } }, isValidHandleChild: function(F) { var E = true; var H; try { H = F.nodeName.toUpperCase(); } catch (G) { H = F.nodeName; } E = E && !this.invalidHandleTypes[H]; E = E && !this.invalidHandleIds[F.id]; for (var D = 0, C = this.invalidHandleClasses.length; E && D < C; ++D) { E = !B.hasClass(F, this.invalidHandleClasses[D]); } return E; }, setXTicks: function(F, C) { this.xTicks = []; this.xTickSize = C; var E = {}; for (var D = this.initPageX; D >= this.minX; D = D - C) { if (!E[D]) { this.xTicks[this.xTicks.length] = D; E[D] = true; } } for (D = this.initPageX; D <= this.maxX; D = D + C) { if (!E[D]) { this.xTicks[this.xTicks.length] = D; E[D] = true; } } this.xTicks.sort(this.DDM.numericSort); }, setYTicks: function(F, C) { this.yTicks = []; this.yTickSize = C; var E = {}; for (var D = this.initPageY; D >= this.minY; D = D - C) { if (!E[D]) { this.yTicks[this.yTicks.length] = D; E[D] = true; } } for (D = this.initPageY; D <= this.maxY; D = D + C) { if (!E[D]) { this.yTicks[this.yTicks.length] = D; E[D] = true; } } this.yTicks.sort(this.DDM.numericSort); }, setXConstraint: function(E, D, C) { this.leftConstraint = parseInt(E, 10); this.rightConstraint = parseInt(D, 10); this.minX = this.initPageX - this.leftConstraint; this.maxX = this.initPageX + this.rightConstraint; if (C) { this.setXTicks(this.initPageX, C); } this.constrainX = true; }, clearConstraints: function() { this.constrainX = false; this.constrainY = false; this.clearTicks(); }, clearTicks: function() { this.xTicks = null; this.yTicks = null; this.xTickSize = 0; this.yTickSize = 0; }, setYConstraint: function(C, E, D) { this.topConstraint = parseInt(C, 10); this.bottomConstraint = parseInt(E, 10); this.minY = this.initPageY - this.topConstraint; this.maxY = this.initPageY + this.bottomConstraint; if (D) { this.setYTicks(this.initPageY, D); } this.constrainY = true; }, resetConstraints: function() { if (this.initPageX || this.initPageX === 0) { var D = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0; var C = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0; this.setInitPosition(D, C); } else { this.setInitPosition(); } if (this.constrainX) { this.setXConstraint(this.leftConstraint, this.rightConstraint, this.xTickSize); } if (this.constrainY) { this.setYConstraint(this.topConstraint, this.bottomConstraint, this.yTickSize); } }, getTick: function(I, F) { if (!F) { return I; } else { if (F[0] >= I) { return F[0]; } else { for (var D = 0, C = F.length; D < C; ++D) { var E = D + 1; if (F[E] && F[E] >= I) { var H = I - F[D]; var G = F[E] - I; return (G > H) ? F[D] : F[E]; } } return F[F.length - 1]; } } }, toString: function() { return ("DragDrop " + this.id); } }; YAHOO.augment(YAHOO.util.DragDrop, YAHOO.util.EventProvider); })(); YAHOO.util.DD = function(C, A, B) { if (C) { this.init(C, A, B); } }; YAHOO.extend(YAHOO.util.DD, YAHOO.util.DragDrop, { scroll: true, autoOffset: function(C, B) { var A = C - this.startPageX; var D = B - this.startPageY; this.setDelta(A, D); }, setDelta: function(B, A) { this.deltaX = B; this.deltaY = A; }, setDragElPos: function(C, B) { var A = this.getDragEl(); this.alignElWithMouse(A, C, B); }, alignElWithMouse: function(C, G, F) { var E = this.getTargetCoord(G, F); if (!this.deltaSetXY) { var H = [E.x, E.y]; YAHOO.util.Dom.setXY(C, H); var D = parseInt(YAHOO.util.Dom.getStyle(C, "left"), 10); var B = parseInt(YAHOO.util.Dom.getStyle(C, "top"), 10); this.deltaSetXY = [D - E.x, B - E.y]; } else { YAHOO.util.Dom.setStyle(C, "left", (E.x + this.deltaSetXY[0]) + "px"); YAHOO.util.Dom.setStyle(C, "top", (E.y + this.deltaSetXY[1]) + "px"); } this.cachePosition(E.x, E.y); var A = this; setTimeout(function() { A.autoScroll.call(A, E.x, E.y, C.offsetHeight, C.offsetWidth); }, 0); }, cachePosition: function(B, A) { if (B) { this.lastPageX = B; this.lastPageY = A; } else { var C = YAHOO.util.Dom.getXY(this.getEl()); this.lastPageX = C[0]; this.lastPageY = C[1]; } }, autoScroll: function(J, I, E, K) { if (this.scroll) { var L = this.DDM.getClientHeight(); var B = this.DDM.getClientWidth(); var N = this.DDM.getScrollTop(); var D = this.DDM.getScrollLeft(); var H = E + I; var M = K + J; var G = (L + N - I - this.deltaY); var F = (B + D - J - this.deltaX); var C = 40; var A = (document.all) ? 80 : 30; if (H > L && G < C) { window.scrollTo(D, N + A); } if (I < N && N > 0 && I - N < C) { window.scrollTo(D, N - A); } if (M > B && F < C) { window.scrollTo(D + A, N); } if (J < D && D > 0 && J - D < C) { window.scrollTo(D - A, N); } } }, applyConfig: function() { YAHOO.util.DD.superclass.applyConfig.call(this); this.scroll = (this.config.scroll !== false); }, b4MouseDown: function(A) { this.setStartPosition(); this.autoOffset(YAHOO.util.Event.getPageX(A), YAHOO.util.Event.getPageY(A)); }, b4Drag: function(A) { this.setDragElPos(YAHOO.util.Event.getPageX(A), YAHOO.util.Event.getPageY(A)); }, toString: function() { return ("DD " + this.id); } }); YAHOO.util.DDProxy = function(C, A, B) { if (C) { this.init(C, A, B); this.initFrame(); } }; YAHOO.util.DDProxy.dragElId = "ygddfdiv"; YAHOO.extend(YAHOO.util.DDProxy, YAHOO.util.DD, { resizeFrame: true, centerFrame: false, createFrame: function() { var B = this, A = document.body; if (!A || !A.firstChild) { setTimeout(function() { B.createFrame(); }, 50); return; } var F = this.getDragEl(), E = YAHOO.util.Dom; if (!F) { F = document.createElement("div"); F.id = this.dragElId; var D = F.style; D.position = "absolute"; D.visibility = "hidden"; D.cursor = "move"; D.border = "2px solid #aaa"; D.zIndex = 999; D.height = "25px"; D.width = "25px"; var C = document.createElement("div"); E.setStyle(C, "height", "100%"); E.setStyle(C, "width", "100%"); E.setStyle(C, "background-color", "#ccc"); E.setStyle(C, "opacity", "0"); F.appendChild(C); A.insertBefore(F, A.firstChild); } }, initFrame: function() { this.createFrame(); }, applyConfig: function() { YAHOO.util.DDProxy.superclass.applyConfig.call(this); this.resizeFrame = (this.config.resizeFrame !== false); this.centerFrame = (this.config.centerFrame); this.setDragElId(this.config.dragElId || YAHOO.util.DDProxy.dragElId); }, showFrame: function(E, D) { var C = this.getEl(); var A = this.getDragEl(); var B = A.style; this._resizeProxy(); if (this.centerFrame) { this.setDelta(Math.round(parseInt(B.width, 10) / 2), Math.round(parseInt(B.height, 10) / 2)); } this.setDragElPos(E, D); YAHOO.util.Dom.setStyle(A, "visibility", "visible"); }, _resizeProxy: function() { if (this.resizeFrame) { var H = YAHOO.util.Dom; var B = this.getEl(); var C = this.getDragEl(); var G = parseInt(H.getStyle(C, "borderTopWidth"), 10); var I = parseInt(H.getStyle(C, "borderRightWidth"), 10); var F = parseInt(H.getStyle(C, "borderBottomWidth"), 10); var D = parseInt(H.getStyle(C, "borderLeftWidth"), 10); if (isNaN(G)) { G = 0; } if (isNaN(I)) { I = 0; } if (isNaN(F)) { F = 0; } if (isNaN(D)) { D = 0; } var E = Math.max(0, B.offsetWidth - I - D); var A = Math.max(0, B.offsetHeight - G - F); H.setStyle(C, "width", E + "px"); H.setStyle(C, "height", A + "px"); } }, b4MouseDown: function(B) { this.setStartPosition(); var A = YAHOO.util.Event.getPageX(B); var C = YAHOO.util.Event.getPageY(B); this.autoOffset(A, C); }, b4StartDrag: function(A, B) { this.showFrame(A, B); }, b4EndDrag: function(A) { YAHOO.util.Dom.setStyle(this.getDragEl(), "visibility", "hidden"); }, endDrag: function(D) { var C = YAHOO.util.Dom; var B = this.getEl(); var A = this.getDragEl(); C.setStyle(A, "visibility", ""); C.setStyle(B, "visibility", "hidden"); YAHOO.util.DDM.moveToEl(B, A); C.setStyle(A, "visibility", "hidden"); C.setStyle(B, "visibility", ""); }, toString: function() { return ("DDProxy " + this.id); } }); YAHOO.util.DDTarget = function(C, A, B) { if (C) { this.initTarget(C, A, B); } }; YAHOO.extend(YAHOO.util.DDTarget, YAHOO.util.DragDrop, { toString: function() { return ("DDTarget " + this.id); } }); YAHOO.register("dragdrop", YAHOO.util.DragDropMgr, { version: "2.8.0r4", build: "2449" }); // End // of // File // include/javascript/yui/build/dragdrop/dragdrop-min.js /* * Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the * BSD License: http://developer.yahoo.net/yui/license.txt version: 2.8.0r4 */ (function() { YAHOO.util.Config = function(D) { if (D) { this.init(D); } }; var B = YAHOO.lang, C = YAHOO.util.CustomEvent, A = YAHOO.util.Config; A.CONFIG_CHANGED_EVENT = "configChanged"; A.BOOLEAN_TYPE = "boolean"; A.prototype = { owner: null, queueInProgress: false, config: null, initialConfig: null, eventQueue: null, configChangedEvent: null, init: function(D) { this.owner = D; this.configChangedEvent = this.createEvent(A.CONFIG_CHANGED_EVENT); this.configChangedEvent.signature = C.LIST; this.queueInProgress = false; this.config = {}; this.initialConfig = {}; this.eventQueue = []; }, checkBoolean: function(D) { return (typeof D == A.BOOLEAN_TYPE); }, checkNumber: function(D) { return (!isNaN(D)); }, fireEvent: function(D, F) { var E = this.config[D]; if (E && E.event) { E.event.fire(F); } }, addProperty: function(E, D) { E = E.toLowerCase(); this.config[E] = D; D.event = this.createEvent(E, { scope: this.owner }); D.event.signature = C.LIST; D.key = E; if (D.handler) { D.event.subscribe(D.handler, this.owner); } this.setProperty(E, D.value, true); if (!D.suppressEvent) { this.queueProperty(E, D.value); } }, getConfig: function() { var D = {}, F = this.config, G, E; for (G in F) { if (B.hasOwnProperty(F, G)) { E = F[G]; if (E && E.event) { D[G] = E.value; } } } return D; }, getProperty: function(D) { var E = this.config[D.toLowerCase()]; if (E && E.event) { return E.value; } else { return undefined; } }, resetProperty: function(D) { D = D.toLowerCase(); var E = this.config[D]; if (E && E.event) { if (this.initialConfig[D] && !B.isUndefined(this.initialConfig[D])) { this.setProperty(D, this.initialConfig[D]); return true; } } else { return false; } }, setProperty: function(E, G, D) { var F; E = E.toLowerCase(); if (this.queueInProgress && !D) { this.queueProperty(E, G); return true; } else { F = this.config[E]; if (F && F.event) { if (F.validator && !F.validator(G)) { return false; } else { F.value = G; if (!D) { this.fireEvent(E, G); this.configChangedEvent.fire([E, G]); } return true; } } else { return false; } } }, queueProperty: function(S, P) { S = S.toLowerCase(); var R = this.config[S], K = false, J, G, H, I, O, Q, F, M, N, D, L, T, E; if (R && R.event) { if (!B.isUndefined(P) && R.validator && !R.validator(P)) { return false; } else { if (!B.isUndefined(P)) { R.value = P; } else { P = R.value; } K = false; J = this.eventQueue.length; for (L = 0; L < J; L++) { G = this.eventQueue[L]; if (G) { H = G[0]; I = G[1]; if (H == S) { this.eventQueue[L] = null; this.eventQueue.push([S, (!B.isUndefined(P) ? P : I)]); K = true; break; } } } if (!K && !B.isUndefined(P)) { this.eventQueue.push([S, P]); } } if (R.supercedes) { O = R.supercedes.length; for (T = 0; T < O; T++) { Q = R.supercedes[T]; F = this.eventQueue.length; for (E = 0; E < F; E++) { M = this.eventQueue[E]; if (M) { N = M[0]; D = M[1]; if (N == Q.toLowerCase()) { this.eventQueue.push([N, D]); this.eventQueue[E] = null; break; } } } } } return true; } else { return false; } }, refireEvent: function(D) { D = D.toLowerCase(); var E = this.config[D]; if (E && E.event && !B.isUndefined(E.value)) { if (this.queueInProgress) { this.queueProperty(D); } else { this.fireEvent(D, E.value); } } }, applyConfig: function(D, G) { var F, E; if (G) { E = {}; for (F in D) { if (B.hasOwnProperty(D, F)) { E[F.toLowerCase()] = D[F]; } } this.initialConfig = E; } for (F in D) { if (B.hasOwnProperty(D, F)) { this.queueProperty(F, D[F]); } } }, refresh: function() { var D; for (D in this.config) { if (B.hasOwnProperty(this.config, D)) { this.refireEvent(D); } } }, fireQueue: function() { var E, H, D, G, F; this.queueInProgress = true; for (E = 0; E < this.eventQueue.length; E++) { H = this.eventQueue[E]; if (H) { D = H[0]; G = H[1]; F = this.config[D]; F.value = G; this.eventQueue[E] = null; this.fireEvent(D, G); } } this.queueInProgress = false; this.eventQueue = []; }, subscribeToConfigEvent: function(D, E, G, H) { var F = this.config[D.toLowerCase()]; if (F && F.event) { if (!A.alreadySubscribed(F.event, E, G)) { F.event.subscribe(E, G, H); } return true; } else { return false; } }, unsubscribeFromConfigEvent: function(D, E, G) { var F = this.config[D.toLowerCase()]; if (F && F.event) { return F.event.unsubscribe(E, G); } else { return false; } }, toString: function() { var D = "Config"; if (this.owner) { D += " [" + this.owner.toString() + "]"; } return D; }, outputEventQueue: function() { var D = "", G, E, F = this.eventQueue.length; for (E = 0; E < F; E++) { G = this.eventQueue[E]; if (G) { D += G[0] + "=" + G[1] + ", "; } } return D; }, destroy: function() { var E = this.config, D, F; for (D in E) { if (B.hasOwnProperty(E, D)) { F = E[D]; F.event.unsubscribeAll(); F.event = null; } } this.configChangedEvent.unsubscribeAll(); this.configChangedEvent = null; this.owner = null; this.config = null; this.initialConfig = null; this.eventQueue = null; } }; A.alreadySubscribed = function(E, H, I) { var F = E.subscribers.length, D, G; if (F > 0) { G = F - 1; do { D = E.subscribers[G]; if (D && D.obj == I && D.fn == H) { return true; } } while (G--); } return false; }; YAHOO.lang.augmentProto(A, YAHOO.util.EventProvider); }()); (function() { YAHOO.widget.Module = function(R, Q) { if (R) { this.init(R, Q); } else {} }; var F = YAHOO.util.Dom, D = YAHOO.util.Config, N = YAHOO.util.Event, M = YAHOO.util.CustomEvent, G = YAHOO.widget.Module, I = YAHOO.env.ua, H, P, O, E, A = { "BEFORE_INIT": "beforeInit", "INIT": "init", "APPEND": "append", "BEFORE_RENDER": "beforeRender", "RENDER": "render", "CHANGE_HEADER": "changeHeader", "CHANGE_BODY": "changeBody", "CHANGE_FOOTER": "changeFooter", "CHANGE_CONTENT": "changeContent", "DESTROY": "destroy", "BEFORE_SHOW": "beforeShow", "SHOW": "show", "BEFORE_HIDE": "beforeHide", "HIDE": "hide" }, J = { "VISIBLE": { key: "visible", value: true, validator: YAHOO.lang.isBoolean }, "EFFECT": { key: "effect", suppressEvent: true, supercedes: ["visible"] }, "MONITOR_RESIZE": { key: "monitorresize", value: true }, "APPEND_TO_DOCUMENT_BODY": { key: "appendtodocumentbody", value: false } }; G.IMG_ROOT = null; G.IMG_ROOT_SSL = null; G.CSS_MODULE = "yui-module"; G.CSS_HEADER = "hd"; G.CSS_BODY = "bd"; G.CSS_FOOTER = "ft"; G.RESIZE_MONITOR_SECURE_URL = "javascript:false;"; G.RESIZE_MONITOR_BUFFER = 1; G.textResizeEvent = new M("textResize"); G.forceDocumentRedraw = function() { var Q = document.documentElement; if (Q) { Q.className += " "; Q.className = YAHOO.lang.trim(Q.className); } }; function L() { if (!H) { H = document.createElement("div"); H.innerHTML = ('' + ''); P = H.firstChild; O = P.nextSibling; E = O.nextSibling; } return H; } function K() { if (!P) { L(); } return (P.cloneNode(false)); } function B() { if (!O) { L(); } return (O.cloneNode(false)); } function C() { if (!E) { L(); } return (E.cloneNode(false)); } G.prototype = { constructor: G, element: null, header: null, body: null, footer: null, id: null, imageRoot: G.IMG_ROOT, initEvents: function() { var Q = M.LIST; this.beforeInitEvent = this.createEvent(A.BEFORE_INIT); this.beforeInitEvent.signature = Q; this.initEvent = this.createEvent(A.INIT); this.initEvent.signature = Q; this.appendEvent = this.createEvent(A.APPEND); this.appendEvent.signature = Q; this.beforeRenderEvent = this.createEvent(A.BEFORE_RENDER); this.beforeRenderEvent.signature = Q; this.renderEvent = this.createEvent(A.RENDER); this.renderEvent.signature = Q; this.changeHeaderEvent = this.createEvent(A.CHANGE_HEADER); this.changeHeaderEvent.signature = Q; this.changeBodyEvent = this.createEvent(A.CHANGE_BODY); this.changeBodyEvent.signature = Q; this.changeFooterEvent = this.createEvent(A.CHANGE_FOOTER); this.changeFooterEvent.signature = Q; this.changeContentEvent = this.createEvent(A.CHANGE_CONTENT); this.changeContentEvent.signature = Q; this.destroyEvent = this.createEvent(A.DESTROY); this.destroyEvent.signature = Q; this.beforeShowEvent = this.createEvent(A.BEFORE_SHOW); this.beforeShowEvent.signature = Q; this.showEvent = this.createEvent(A.SHOW); this.showEvent.signature = Q; this.beforeHideEvent = this.createEvent(A.BEFORE_HIDE); this.beforeHideEvent.signature = Q; this.hideEvent = this.createEvent(A.HIDE); this.hideEvent.signature = Q; }, platform: function() { var Q = navigator.userAgent.toLowerCase(); if (Q.indexOf("windows") != -1 || Q.indexOf("win32") != -1) { return "windows"; } else { if (Q.indexOf("macintosh") != -1) { return "mac"; } else { return false; } } }(), browser: function() { var Q = navigator.userAgent.toLowerCase(); if (Q.indexOf("opera") != -1) { return "opera"; } else { if (Q.indexOf("msie 7") != -1) { return "ie7"; } else { if (Q.indexOf("msie") != -1) { return "ie"; } else { if (Q.indexOf("safari") != -1) { return "safari"; } else { if (Q.indexOf("gecko") != -1) { return "gecko"; } else { return false; } } } } } }(), isSecure: function() { if (window.location.href.toLowerCase().indexOf("https") === 0) { return true; } else { return false; } }(), initDefaultConfig: function() { this.cfg.addProperty(J.VISIBLE.key, { handler: this.configVisible, value: J.VISIBLE.value, validator: J.VISIBLE.validator }); this.cfg.addProperty(J.EFFECT.key, { suppressEvent: J.EFFECT.suppressEvent, supercedes: J.EFFECT.supercedes }); this.cfg.addProperty(J.MONITOR_RESIZE.key, { handler: this.configMonitorResize, value: J.MONITOR_RESIZE.value }); this.cfg.addProperty(J.APPEND_TO_DOCUMENT_BODY.key, { value: J.APPEND_TO_DOCUMENT_BODY.value }); }, init: function(V, U) { var S, W; this.initEvents(); this.beforeInitEvent.fire(G); this.cfg = new D(this); if (this.isSecure) { this.imageRoot = G.IMG_ROOT_SSL; } if (typeof V == "string") { S = V; V = document.getElementById(V); if (!V) { V = (L()).cloneNode(false); V.id = S; } } this.id = F.generateId(V); this.element = V; W = this.element.firstChild; if (W) { var R = false, Q = false, T = false; do { if (1 == W.nodeType) { if (!R && F.hasClass(W, G.CSS_HEADER)) { this.header = W; R = true; } else { if (!Q && F.hasClass(W, G.CSS_BODY)) { this.body = W; Q = true; } else { if (!T && F.hasClass(W, G.CSS_FOOTER)) { this.footer = W; T = true; } } } } } while ((W = W.nextSibling)); } this.initDefaultConfig(); F.addClass(this.element, G.CSS_MODULE); if (U) { this.cfg.applyConfig(U, true); } if (!D.alreadySubscribed(this.renderEvent, this.cfg.fireQueue, this.cfg)) { this.renderEvent.subscribe(this.cfg.fireQueue, this.cfg, true); } this.initEvent.fire(G); }, initResizeMonitor: function() { var R = (I.gecko && this.platform == "windows"); if (R) { var Q = this; setTimeout(function() { Q._initResizeMonitor(); }, 0); } else { this._initResizeMonitor(); } }, _initResizeMonitor: function() { var Q, S, U; function W() { G.textResizeEvent.fire(); } if (!I.opera) { S = F.get("_yuiResizeMonitor"); var V = this._supportsCWResize(); if (!S) { S = document.createElement("iframe"); if (this.isSecure && G.RESIZE_MONITOR_SECURE_URL && I.ie) { S.src = G.RESIZE_MONITOR_SECURE_URL; } if (!V) { U = ["