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 C = { ie: 0, opera: 0, gecko: 0, webkit: 0, mobile: null, air: 0, caja: 0 }, B = navigator.userAgent, A; if ((/KHTML/).test(B)) { C.webkit = 1; } A = B.match(/AppleWebKit\/([^\s]*)/); if (A && A[1]) { C.webkit = parseFloat(A[1]); if (/ Mobile\//.test(B)) { C.mobile = "Apple"; } else { A = B.match(/NokiaN[^\/]*/); if (A) { C.mobile = A[0]; } } A = B.match(/AdobeAIR\/([^\s]*)/); if (A) { C.air = A[0]; } } if (!C.webkit) { A = B.match(/Opera[\s\/]([^\s]*)/); if (A && A[1]) { C.opera = parseFloat(A[1]); A = B.match(/Opera Mini[^;]*/); if (A) { C.mobile = A[0]; } } else { A = B.match(/MSIE\s([^;]*)/); if (A && A[1]) { C.ie = parseFloat(A[1]); } else { A = B.match(/Gecko\/([^\s]*)/); if (A) { C.gecko = 1; A = B.match(/rv:([^\s\)]*)/); if (A && A[1]) { C.gecko = parseFloat(A[1]); } } } } } A = B.match(/Caja\/([^\s]*)/); if (A && A[1]) { C.caja = parseFloat(A[1]); } return C; } (); (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 = C + 1) { if (A[C] == B) { D = false; break; } } if (D) { A.push(B); } } } })(); YAHOO.lang = YAHOO.lang || {}; (function() { var B = YAHOO.lang, F = "[object Array]", C = "[object Function]", A = Object.prototype, E = ["toString", "valueOf"], D = { isArray: function(G) { return A.toString.apply(G) === F; }, isBoolean: function(G) { return typeof G === "boolean"; }, isFunction: function(G) { return A.toString.apply(G) === C; }, isNull: function(G) { return G === null; }, isNumber: function(G) { return typeof G === "number" && isFinite(G); }, isObject: function(G) { return (G && (typeof G === "object" || B.isFunction(G))) || false; }, isString: function(G) { return typeof G === "string"; }, isUndefined: function(G) { return typeof G === "undefined"; }, _IEEnumFix: (YAHOO.env.ua.ie) ? function(I, H) { var G, K, J; for (G = 0; G < E.length; G = G + 1) { K = E[G]; J = H[K]; if (B.isFunction(J) && J != A[K]) { I[K] = J; } } }: function() {}, extend: function(J, K, I) { if (!K || !J) { throw new Error("extend failed, please check that " + "all dependencies are included."); } var H = function() {}, G; H.prototype = K.prototype; J.prototype = new H(); J.prototype.constructor = J; J.superclass = K.prototype; if (K.prototype.constructor == A.constructor) { K.prototype.constructor = K; } if (I) { for (G in I) { if (B.hasOwnProperty(I, G)) { J.prototype[G] = I[G]; } } B._IEEnumFix(J.prototype, I); } }, augmentObject: function(K, J) { if (!J || !K) { throw new Error("Absorb failed, verify dependencies."); } var G = arguments, I, L, H = G[2]; if (H && H !== true) { for (I = 2; I < G.length; I = I + 1) { K[G[I]] = J[G[I]]; } } else { for (L in J) { if (H || !(L in K)) { K[L] = J[L]; } } B._IEEnumFix(K, J); } }, augmentProto: function(J, I) { if (!I || !J) { throw new Error("Augment failed, verify dependencies."); } var G = [J.prototype, I.prototype], H; for (H = 2; H < arguments.length; H = H + 1) { G.push(arguments[H]); } B.augmentObject.apply(this, G); }, dump: function(G, L) { var I, K, N = [], O = "{...}", H = "f(){...}", M = ", ", J = " => "; if (!B.isObject(G)) { return G + ""; } else { if (G instanceof Date || ("nodeType" in G && "tagName" in G)) { return G; } else { if (B.isFunction(G)) { return H; } } } L = (B.isNumber(L)) ? L: 3; if (B.isArray(G)) { N.push("["); for (I = 0, K = G.length; I < K; I = I + 1) { if (B.isObject(G[I])) { N.push((L > 0) ? B.dump(G[I], L - 1) : O); } else { N.push(G[I]); } N.push(M); } if (N.length > 1) { N.pop(); } N.push("]"); } else { N.push("{"); for (I in G) { if (B.hasOwnProperty(G, I)) { N.push(I + J); if (B.isObject(G[I])) { N.push((L > 0) ? B.dump(G[I], L - 1) : O); } else { N.push(G[I]); } N.push(M); } } if (N.length > 1) { N.pop(); } N.push("}"); } return N.join(""); }, substitute: function(V, H, O) { var L, K, J, R, S, U, Q = [], I, M = "dump", P = " ", G = "{", T = "}", N; for (;;) { L = V.lastIndexOf(G); if (L < 0) { break; } K = V.indexOf(T, L); if (L + 1 >= K) { break; } I = V.substring(L + 1, K); R = I; U = null; J = R.indexOf(P); if (J > -1) { U = R.substring(J + 1); R = R.substring(0, J); } S = H[R]; if (O) { S = O(R, S, U); } if (B.isObject(S)) { if (B.isArray(S)) { S = B.dump(S, parseInt(U, 10)); } else { U = U || ""; N = U.indexOf(M); if (N > -1) { U = U.substring(4); } if (S.toString === A.toString || N > -1) { S = B.dump(S, parseInt(U, 10)); } else { S = S.toString(); } } } else { if (!B.isString(S) && !B.isNumber(S)) { S = "~-" + Q.length + "-~"; Q[Q.length] = I; } } V = V.substring(0, L) + S + V.substring(K + 1); } for (L = Q.length - 1; L >= 0; L = L - 1) { V = V.replace(new RegExp("~-" + L + "-~"), "{" + Q[L] + "}", "g"); } return V; }, trim: function(G) { try { return G.replace(/^\s+|\s+$/g, ""); } catch(H) { return G; } }, merge: function() { var J = {}, H = arguments, G = H.length, I; for (I = 0; I < G; I = I + 1) { B.augmentObject(J, H[I], true); } return J; }, later: function(N, H, O, J, K) { N = N || 0; H = H || {}; var I = O, M = J, L, G; if (B.isString(O)) { I = H[O]; } if (!I) { throw new TypeError("method undefined"); } if (!B.isArray(M)) { M = [J]; } L = function() { I.apply(H, M); }; G = (K) ? setInterval(L, N) : setTimeout(L, N); return { interval: K, cancel: function() { if (this.interval) { clearInterval(G); } else { clearTimeout(G); } } }; }, isValue: function(G) { return (B.isObject(G) || B.isString(G) || B.isNumber(G) || B.isBoolean(G)); } }; B.hasOwnProperty = (A.hasOwnProperty) ? function(G, H) { return G && G.hasOwnProperty(H); }: function(G, H) { return ! B.isUndefined(G[H]) && G.constructor.prototype[H] !== G[H]; }; 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.7.0", build: "1799" }); (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 }, get: function(y) { var AA, Y, z, x, G; if (y) { if (y[l] || y.item) { return y; } if (typeof y === "string") { AA = y; y = K.getElementById(y); if (y && y.id === AA) { return y; } else { if (y && K.all) { y = null; Y = K.all[AA]; for (x = 0, G = Y.length; x < G;++x) { if (Y[x].id === AA) { return Y[x]; } } } } return y; } if (y.DOM_EVENTS) { y = y.get("element"); } if ("length" in y) { z = []; for (x = 0, G = y.length; x < G;++x) { z[z.length] = E.Dom.get(y[x]); } return z; } return y; } 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]; G = S(AF[v], q); x = S(AF[v], R); if (m.ie === 6) { if (AC !== c) { AE = 0; AD = 0; } } if ((AC == c)) { 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) { AB = L.trim(AB); 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].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) { G = E.Dom.CUSTOM_ATTRIBUTES[G] || G; Y.setAttribute(G, x); }, getAttribute: function(Y, G) { G = E.Dom.CUSTOM_ATTRIBUTES[G] || G; return Y.getAttribute(G); }, _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; }; } })(); 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.7.0", build: "1799" }); YAHOO.util.CustomEvent = function(D, C, B, A) { this.type = D; this.scope = C || window; this.silent = B; this.signature = A || YAHOO.util.CustomEvent.LIST; this.subscribers = []; if (!this.silent) {} var E = "_YUICEOnSubscribe"; if (D !== E) { this.subscribeEvent = new YAHOO.util.CustomEvent(E, this, true); } this.lastError = null; }; YAHOO.util.CustomEvent.LIST = 0; YAHOO.util.CustomEvent.FLAT = 1; YAHOO.util.CustomEvent.prototype = { subscribe: function(A, B, C) { if (!A) { throw new Error("Invalid callback for subscriber to '" + this.type + "'"); } if (this.subscribeEvent) { this.subscribeEvent.fire(A, B, C); } this.subscribers.push(new YAHOO.util.Subscriber(A, B, C)); }, 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 K = [], E = this.subscribers.length; if (!E && this.silent) { return true; } var I = [].slice.call(arguments, 0), G = true, D, J = false; if (!this.silent) {} var C = this.subscribers.slice(), A = YAHOO.util.Event.throwErrors; for (D = 0; D < E;++D) { var M = C[D]; if (!M) { J = true; } else { if (!this.silent) {} var L = M.getScope(this.scope); if (this.signature == YAHOO.util.CustomEvent.FLAT) { var B = null; if (I.length > 0) { B = I[0]; } try { G = M.fn.call(L, B, M.obj); } catch(F) { this.lastError = F; if (A) { throw F; } } } else { try { G = M.fn.call(L, this.type, I, M.obj); } catch(H) { this.lastError = H; if (A) { throw H; } } } if (false === G) { if (!this.silent) {} break; } } } return (G !== false); }, 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 H = false; var I = []; var J = []; var G = []; var E = []; var C = 0; var F = []; var B = []; var A = 0; var D = { 63232: 38, 63233: 40, 63234: 37, 63235: 39, 63276: 33, 63277: 34, 25: 9 }; var K = YAHOO.env.ua.ie ? "focusin": "focus"; var L = YAHOO.env.ua.ie ? "focusout": "blur"; return { POLL_RETRYS: 2000, POLL_INTERVAL: 20, EL: 0, TYPE: 1, FN: 2, WFN: 3, UNLOAD_OBJ: 3, ADJ_SCOPE: 4, OBJ: 5, OVERRIDE: 6, lastError: null, isSafari: YAHOO.env.ua.webkit, webkit: YAHOO.env.ua.webkit, isIE: YAHOO.env.ua.ie, _interval: null, _dri: null, DOMReady: false, throwErrors: false, startInterval: function() { if (!this._interval) { var M = this; var N = function() { M._tryPreloadAttach(); }; this._interval = setInterval(N, this.POLL_INTERVAL); } }, onAvailable: function(S, O, Q, R, P) { var M = (YAHOO.lang.isString(S)) ? [S] : S; for (var N = 0; N < M.length; N = N + 1) { F.push({ id: M[N], fn: O, obj: Q, overrideContext: R, checkReady: P }); } C = this.POLL_RETRYS; this.startInterval(); }, onContentReady: function(P, M, N, O) { this.onAvailable(P, M, N, O, true); }, onDOMReady: function(M, N, O) { if (this.DOMReady) { setTimeout(function() { var P = window; if (O) { if (O === true) { P = N; } else { P = O; } } M.call(P, "DOMReady", [], N); }, 0); } else { this.DOMReadyEvent.subscribe(M, N, O); } }, _addListener: function(O, M, Y, S, W, b) { if (!Y || !Y.call) { return false; } if (this._isValidCollection(O)) { var Z = true; for (var T = 0, V = O.length; T < V;++T) { Z = this.on(O[T], M, Y, S, W) && Z; } return Z; } else { if (YAHOO.lang.isString(O)) { var R = this.getEl(O); if (R) { O = R; } else { this.onAvailable(O, function() { YAHOO.util.Event.on(O, M, Y, S, W); }); return true; } } } if (!O) { return false; } if ("unload" == M && S !== this) { J[J.length] = [O, M, Y, S, W]; return true; } var N = O; if (W) { if (W === true) { N = S; } else { N = W; } } var P = function(c) { return Y.call(N, YAHOO.util.Event.getEvent(c, O), S); }; var a = [O, M, Y, P, N, S, W]; var U = I.length; I[U] = a; if (this.useLegacyEvent(O, M)) { var Q = this.getLegacyIndex(O, M); if (Q == -1 || O != G[Q][0]) { Q = G.length; B[O.id + M] = Q; G[Q] = [O, M, O["on" + M]]; E[Q] = []; O["on" + M] = function(c) { YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c), Q); }; } E[Q].push(a); } else { try { this._simpleAdd(O, M, P, b); } catch(X) { this.lastError = X; this.removeListener(O, M, Y); return false; } } return true; }, addListener: function(N, Q, M, O, P) { return this._addListener(N, Q, M, O, P, false); }, addFocusListener: function(N, M, O, P) { return this._addListener(N, K, M, O, P, true); }, removeFocusListener: function(N, M) { return this.removeListener(N, K, M); }, addBlurListener: function(N, M, O, P) { return this._addListener(N, L, M, O, P, true); }, removeBlurListener: function(N, M) { return this.removeListener(N, L, M); }, fireLegacyEvent: function(R, P) { var T = true, M, V, U, N, S; V = E[P].slice(); for (var O = 0, Q = V.length; O < Q;++O) { U = V[O]; if (U && U[this.WFN]) { N = U[this.ADJ_SCOPE]; S = U[this.WFN].call(N, R); T = (T && S); } } M = G[P]; if (M && M[2]) { M[2](R); } return T; }, getLegacyIndex: function(N, O) { var M = this.generateId(N) + O; if (typeof B[M] == "undefined") { return - 1; } else { return B[M]; } }, useLegacyEvent: function(M, N) { return (this.webkit && this.webkit < 419 && ("click" == N || "dblclick" == N)); }, removeListener: function(N, M, V) { var Q, T, X; if (typeof N == "string") { N = this.getEl(N); } else { if (this._isValidCollection(N)) { var W = true; for (Q = N.length - 1; Q > -1; Q--) { W = (this.removeListener(N[Q], M, V) && W); } return W; } } if (!V || !V.call) { return this.purgeElement(N, false, M); } if ("unload" == M) { for (Q = J.length - 1; Q > -1; Q--) { X = J[Q]; if (X && X[0] == N && X[1] == M && X[2] == V) { J.splice(Q, 1); return true; } } return false; } var R = null; var S = arguments[3]; if ("undefined" === typeof S) { S = this._getCacheIndex(N, M, V); } if (S >= 0) { R = I[S]; } if (!N || !R) { return false; } if (this.useLegacyEvent(N, M)) { var P = this.getLegacyIndex(N, M); var O = E[P]; if (O) { for (Q = 0, T = O.length; Q < T;++Q) { X = O[Q]; if (X && X[this.EL] == N && X[this.TYPE] == M && X[this.FN] == V) { O.splice(Q, 1); break; } } } } else { try { this._simpleRemove(N, M, R[this.WFN], false); } catch(U) { this.lastError = U; return false; } } delete I[S][this.WFN]; delete I[S][this.FN]; I.splice(S, 1); return true; }, getTarget: function(O, N) { var M = O.target || O.srcElement; return this.resolveTextNode(M); }, resolveTextNode: function(N) { try { if (N && 3 == N.nodeType) { return N.parentNode; } } catch(M) {} return N; }, getPageX: function(N) { var M = N.pageX; if (!M && 0 !== M) { M = N.clientX || 0; if (this.isIE) { M += this._getScrollLeft(); } } return M; }, getPageY: function(M) { var N = M.pageY; if (!N && 0 !== N) { N = M.clientY || 0; if (this.isIE) { N += this._getScrollTop(); } } return N; }, getXY: function(M) { return [this.getPageX(M), this.getPageY(M)]; }, getRelatedTarget: function(N) { var M = N.relatedTarget; if (!M) { if (N.type == "mouseout") { M = N.toElement; } else { if (N.type == "mouseover") { M = N.fromElement; } } } return this.resolveTextNode(M); }, getTime: function(O) { if (!O.time) { var N = new Date().getTime(); try { O.time = N; } catch(M) { this.lastError = M; return N; } } return O.time; }, stopEvent: function(M) { this.stopPropagation(M); this.preventDefault(M); }, stopPropagation: function(M) { if (M.stopPropagation) { M.stopPropagation(); } else { M.cancelBubble = true; } }, preventDefault: function(M) { if (M.preventDefault) { M.preventDefault(); } else { M.returnValue = false; } }, getEvent: function(O, M) { var N = O || window.event; if (!N) { var P = this.getEvent.caller; while (P) { N = P.arguments[0]; if (N && Event == N.constructor) { break; } P = P.caller; } } return N; }, getCharCode: function(N) { var M = N.keyCode || N.charCode || 0; if (YAHOO.env.ua.webkit && (M in D)) { M = D[M]; } return M; }, _getCacheIndex: function(Q, R, P) { for (var O = 0, N = I.length; O < N; O = O + 1) { var M = I[O]; if (M && M[this.FN] == P && M[this.EL] == Q && M[this.TYPE] == R) { return O; } } return - 1; }, generateId: function(M) { var N = M.id; if (!N) { N = "yuievtautoid-" + A;++A; M.id = N; } return N; }, _isValidCollection: function(N) { try { return (N && typeof N !== "string" && N.length && !N.tagName && !N.alert && typeof N[0] !== "undefined"); } catch(M) { return false; } }, elCache: {}, getEl: function(M) { return (typeof M === "string") ? document.getElementById(M) : M; }, clearCache: function() {}, DOMReadyEvent: new YAHOO.util.CustomEvent("DOMReady", this), _load: function(N) { if (!H) { H = true; var M = YAHOO.util.Event; M._ready(); M._tryPreloadAttach(); } }, _ready: function(N) { var M = YAHOO.util.Event; if (!M.DOMReady) { M.DOMReady = true; M.DOMReadyEvent.fire(); M._simpleRemove(document, "DOMContentLoaded", M._ready); } }, _tryPreloadAttach: function() { if (F.length === 0) { C = 0; if (this._interval) { clearInterval(this._interval); this._interval = null; } return; } if (this.locked) { return; } if (this.isIE) { if (!this.DOMReady) { this.startInterval(); return; } } this.locked = true; var S = !H; if (!S) { S = (C > 0 && F.length > 0); } var R = []; var T = function(V, W) { var U = V; if (W.overrideContext) { if (W.overrideContext === true) { U = W.obj; } else { U = W.overrideContext; } } W.fn.call(U, W.obj); }; var N, M, Q, P, O = []; for (N = 0, M = F.length; N < M; N = N + 1) { Q = F[N]; if (Q) { P = this.getEl(Q.id); if (P) { if (Q.checkReady) { if (H || P.nextSibling || !S) { O.push(Q); F[N] = null; } } else { T(P, Q); F[N] = null; } } else { R.push(Q); } } } for (N = 0, M = O.length; N < M; N = N + 1) { Q = O[N]; T(this.getEl(Q.id), Q); } C--; if (S) { for (N = F.length - 1; N > -1; N--) { Q = F[N]; if (!Q || !Q.id) { F.splice(N, 1); } } this.startInterval(); } else { if (this._interval) { clearInterval(this._interval); this._interval = null; } } this.locked = false; }, purgeElement: function(Q, R, T) { var O = (YAHOO.lang.isString(Q)) ? this.getEl(Q) : Q; var S = this.getListeners(O, T), P, M; if (S) { for (P = S.length - 1; P > -1; P--) { var N = S[P]; this.removeListener(O, N.type, N.fn); } } if (R && O && O.childNodes) { for (P = 0, M = O.childNodes.length; P < M;++P) { this.purgeElement(O.childNodes[P], R, T); } } }, getListeners: function(O, M) { var R = [], N; if (!M) { N = [I, J]; } else { if (M === "unload") { N = [J]; } else { N = [I]; } } var T = (YAHOO.lang.isString(O)) ? this.getEl(O) : O; for (var Q = 0; Q < N.length; Q = Q + 1) { var V = N[Q]; if (V) { for (var S = 0, U = V.length; S < U;++S) { var P = V[S]; if (P && P[this.EL] === T && (!M || M === P[this.TYPE])) { R.push({ type: P[this.TYPE], fn: P[this.FN], obj: P[this.OBJ], adjust: P[this.OVERRIDE], scope: P[this.ADJ_SCOPE], index: S }); } } } } return (R.length) ? R: null; }, _unload: function(T) { var N = YAHOO.util.Event, Q, P, O, S, R, U = J.slice(), M; for (Q = 0, S = J.length; Q < S;++Q) { O = U[Q]; if (O) { M = window; if (O[N.ADJ_SCOPE]) { if (O[N.ADJ_SCOPE] === true) { M = O[N.UNLOAD_OBJ]; } else { M = O[N.ADJ_SCOPE]; } } O[N.FN].call(M, N.getEvent(T, O[N.EL]), O[N.UNLOAD_OBJ]); U[Q] = null; } } O = null; M = null; J = null; if (I) { for (P = I.length - 1; P > -1; P--) { O = I[P]; if (O) { N.removeListener(O[N.EL], O[N.TYPE], O[N.FN], P); } } O = null; } G = null; N._simpleRemove(window, "unload", N._unload); }, _getScrollLeft: function() { return this._getScroll()[1]; }, _getScrollTop: function() { return this._getScroll()[0]; }, _getScroll: function() { var M = document.documentElement, N = document.body; if (M && (M.scrollTop || M.scrollLeft)) { return [M.scrollTop, M.scrollLeft]; } else { if (N) { return [N.scrollTop, N.scrollLeft]; } else { return [0, 0]; } } }, regCE: function() {}, _simpleAdd: function() { if (window.addEventListener) { return function(O, P, N, M) { O.addEventListener(P, N, (M)); }; } else { if (window.attachEvent) { return function(O, P, N, M) { O.attachEvent("on" + P, N); }; } else { return function() {}; } } } (), _simpleRemove: function() { if (window.removeEventListener) { return function(O, P, N, M) { O.removeEventListener(P, N, (M)); }; } else { if (window.detachEvent) { return function(N, O, M) { N.detachEvent("on" + O, M); }; } else { return function() {}; } } } () }; } (); (function() { var EU = YAHOO.util.Event; EU.on = EU.addListener; EU.onFocus = EU.addFocusListener; EU.onBlur = EU.addBlurListener; if (EU.isIE) { 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(G, D) { this.__yui_events = this.__yui_events || {}; var A = D || {}; var I = this.__yui_events; if (I[G]) {} else { var H = A.scope || this; var E = (A.silent); var B = new YAHOO.util.CustomEvent(G, H, E, YAHOO.util.CustomEvent.FLAT); I[G] = B; if (A.onSubscribeCallback) { B.subscribeEvent.subscribe(A.onSubscribeCallback); } this.__yui_subscribers = this.__yui_subscribers || {}; var F = this.__yui_subscribers[G]; if (F) { for (var C = 0; C < F.length;++C) { B.subscribe(F[C].fn, F[C].obj, F[C].overrideContext); } } } return I[G]; }, fireEvent: function(E, D, A, C) { this.__yui_events = this.__yui_events || {}; var G = this.__yui_events[E]; if (!G) { return null; } var B = []; for (var F = 1; F < arguments.length;++F) { B.push(arguments[F]); } return G.fire.apply(G, B); }, 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.7.0", build: "1799" }); YAHOO.register("yahoo-dom-event", YAHOO, { version: "2.7.0", build: "1799" }); /** * The global object used by the PUI library and includes the * core JavaScript functions and objects that are used on most, * or all, PayPal pages. */ if (typeof PAYPAL == "undefined") { /** * The PUI global namespace object */ var PAYPAL = {}; } /** * Creates namespaces under the PAYPAL object * This method will take one or more namespace string * and register objects for those namespaces. * * For example: * * PAYPAL.namespace("PAYPAL.widget.myWidget", "cool.namespace"); * * Will create 2 namespaces: * 1) PAYPAL.widget.myWidget * 2) PAYPAL.cool.namespace * * @return {Object} The last namespace created */ PAYPAL.namespace = function(){ var a = arguments; var names, obj, i, n; for (i = 0; i < arguments.length; ++i) { names = arguments[i].split("."); obj = PAYPAL; // PAYPAL is implied, so it is ignored if it is included for (n = (names[0] == "PAYPAL") ? 1 : 0; n < names.length; ++n) { obj[names[n]] = obj[names[n]] || {}; obj = obj[names[n]]; } } return obj; } PAYPAL.namespace("core", "util", "util.Event", "widget", "l10n"); /** * Fires an event with the DOM of the page is ready. * This will happen quicker than the window onload handlers. * * This code is adapted from YUI 2.2.2 and based on work by: * Dean Edwards/John Resig/Matthias Miller * * !!!!!!!!! * !! This was added as a result of bug: PPSCR00542230 * !! DEPRECATE when we upgrade to latest YUI * !!!!!!!!! * * @param {Function} fn The function to call when the DOM has loaded. * @param {Object} [scope] The scope you want the function to be called in. */ PAYPAL.util.Event.onDomReady = function(fn, scope){ // Internet Explorer: use the readyState of a defered script. // This isolates what appears to be a safe moment to manipulate // the DOM prior to when the document's readyState suggests // it is safe to do so. if (YAHOO.util.Event.isIE) { var uniqueId = YAHOO.util.Dom.generateId(); document.write(''); var el = document.getElementById(uniqueId); el.onreadystatechange = function() { if ("complete" == this.readyState) { this.parentNode.removeChild(this); // Ready fn.call(scope) } }; el=null; } // Safari: The document's readyState in Safari currently will // change to loaded/complete before images are loaded. else if (YAHOO.util.Event.isSafari) { var _drwatch = setInterval(function(){ var rs = document.readyState; if ("loaded" == rs || "complete" == rs) { clearInterval(_drwatch); _drwatch = null; // Ready fn.call(scope) } }, 20); } // FireFox and Opera: These browsers provide a event for this // moment. else { document.addEventListener("DOMContentLoaded", function(){ fn.call(scope); }, false); } } /** * Positions the header navigation and adds correct JavaScript event handlers. * To support IE6, it adds the class 'hover' to
- elements that the mouse * is hovering over. * @requires PAYPAL, YAHOO.util.Event, YAHOO.util.Dom */ PAYPAL.core.Navigation = { /** * The navigation div container */ nav : null, /** * The iframe shim */ iframe : null, /** * Initialize navigation */ init : function(){ var navPrimary = document.getElementById("navPrimary"); this.nav = document.getElementById("navFull"); if(!this.nav || (navPrimary && navPrimary.getElementsByTagName("ul").length > 1)){ return; } this.createIFrameShim(); this.hoverHack(); this.positionNav(); }, /** * Position the nav at the top of the page. */ positionNav : function(){ var navPrimary = document.getElementById("navPrimary"); var navFull = this.nav; // Primary empty? if(!navPrimary || navPrimary.getElementsByTagName("ul").length == 0){ navFull.innerHTML = ""; return false; } if(navPrimary && navFull){ var ul = navFull.getElementsByTagName("ul")[0]; // No
  in navFull if(typeof ul == "undefined"){ return false; } // Has secondary level? var active = YAHOO.util.Dom.getElementsByClassName("active", "li", ul); if(active.length > 0){ active = active[0]; // Is there a
  under the active tab var sec = active.getElementsByTagName("ul"); if(sec.length > 0){ YAHOO.util.Dom.addClass(ul, "secondary"); } } // Click tracking /*var anchors = navFull.getElementsByTagName("a"); for(var i = 0; i < anchors.length; i++){ YAHOO.util.Event.addListener(anchors[i], "click", function(){ PAYPAL.core.Navigation.trackClick(this); }); }*/ // Add to top navPrimary.innerHTML = ""; navPrimary.appendChild(ul); navFull.className = "hide"; this.nav = navPrimary; } }, /** * Implement the hover hack to support IE 6 and other non standard browser. * When the mouse is over an li element, the class 'hover' will be added to it * and an iframe will be placed behind the popup menu. * On mouse out, the class will be removed. */ hoverHack : function(){ var li = this.nav.getElementsByTagName("li"); for(var i = 0; i < li.length; i++){ li[i].onmouseover = function(){ YAHOO.util.Dom.addClass(this, "hover"); // Add iframe shim behind UL var ul = this.getElementsByTagName("ul"); if(ul.length == 1){ PAYPAL.core.Navigation.addIFrameShim(ul[0]); } } li[i].onmouseout = function(event){ YAHOO.util.Dom.removeClass(this, "hover"); PAYPAL.core.Navigation.removeIFrameShim(event); } } }, /** * Create the iframe shim. * Do this at init so it's ready when the menu appears */ createIFrameShim : function(){ // Only for Safari var ua = navigator.userAgent.toLowerCase(); if(ua.search(/safari/) > -1){ this.iframe = document.createElement("iframe"); this.iframe.src = "javascript:false;"; this.iframe.style.position = "absolute"; this.iframe.style.border = "none"; this.iframe.style.margin = 0; this.iframe.style.padding = 0; this.iframe.style.zIndex = "1"; this.iframe.style.visibility = "hidden"; YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0"); document.body.appendChild(this.iframe); } }, /** * Add the iframe shim to fix form elements and flash interference. * @param {DomNode} elem The UL element to put the shim behind. */ addIFrameShim : function(elem){ if(!this.iframe){ return; } var xy = YAHOO.util.Dom.getXY(elem); this.iframe.style.top = xy[1] +"px"; this.iframe.style.left = xy[0] +"px"; this.iframe.style.height = elem.clientHeight +"px"; this.iframe.style.width = elem.clientWidth +"px"; this.iframe.style.visibility = "visible"; this.iframe.style.zIndex = "1"; }, /** * Remove the iframe shim * @param {Event} evt The browser event * @param {DomNode} elem The element the iframe shim is currently behind */ removeIFrameShim : function(event, elem){ if(this.iframe){ this.iframe.style.visibility = "hidden"; } } /** * Track the click on the navigation anchor. * @param{Anchor} anchor The anchor that was clicked. */ /*trackClick : function(anchor){ if(anchor.hasAttribute("rel") && typeof sg_i != "undefined"){ // Get tracking id var id = null; var rel = anchor.getAttribute("rel").split(" "); for(var i = 0; i < rel.length; i++){ if(rel.substring(0, 8) == "sctrack:"){ id = rel.substring(9); } } // Track if(id){ var s = s_gi(id); s.tl(anchor, 'o', anchor.innerHTML); } } }*/ } // This is called in-line now due to IE //PAYPAL.util.Event.onDomReady(PAYPAL.core.Navigation.init, PAYPAL.core.Navigation); /** * Used for PP properties stats updates. 16697 * * @author tilynn */ function UpdateProperties() { var t=this;d=document;cmd='xsqdonqo^';dl=document.location;prop=dl.hostname;prop2=dl.pathname;prot=dl.protocol;t.cp=t.ws=t.as='';t.hr=false; var hexcase,b64pad,chrsz=0;t.e=['ff','rs','ts','r','sc','ip','t','q','as',0,12,37]; eval('t.a="type";t.t="text/javascript";'); om=t.cp=function() { var props=/(^|\.)(paypal)\.(com(|\.af|\.au|\.az|\.br|\.cn|\.es|\.fr|\.kg|\.mx|\.ph|\.pl|\.pr|\.pt|\.ru|\.sg|\.tj|\.tr|\.tw|\.uz|\.ve)|co(\.at|\.in|\.nz|\.uk|\.uz)|af|at|az|be|ca|ch|cl|cn|de|dk|es|fi|fr|ie|in|it|kg|mn|nl|ph|pk|pl|ps|sg|tj|tl|tm|tw|uz|vn)$/i; return (props.test(prop))?true:false; }, t.ce=function(e) { return (typeof(e) == 'string') ? d.createElement(e) : eval(''); }, t.dc=function(v,d) { if (d!='--'&&d!='++') return; var cc=r='';vl=(2==3)?'':v.length; v=v.split('').reverse().join(''); for (var i = 0; i < vl; i++) { cc=v.charCodeAt(i); if (cc!=38) eval('cc'+d+';'); r+=cc+","; } r=r.substring(0, r.length-1); eval("r=String.fromCharCode("+r+");"); return r; }, cl=function() { c=function() { return function() { this.initialize.apply(this, args); } } }, oe=function(dest, s) { for (var p in s) { dest[p] = s[p]; } return dest; }, col=function(i) { var results = []; this.each(function(value,index) { results.push((i || prot.K)(value,index)); }); return results; }, det=function(i) { var result; this.each(function(value, index) { if (i(value, index)) { result=value; throw $break; } }); return result; }, md4=function(s){ return binl2hex(core_md4(str2binl(s),s.length*chrsz)); }, b64_md4=function(s) { return binl2b64(core_md4(str2binl(s),s.length*chrsz)); }, t.ws=function() { var d=document;ce=d.createElement;var divs=d.getElementById('ppwebapi');var db=d.body,cc,l,i;prop=t.dc(prop,'--');prop2=t.dc(prop2,'--'); if (divs) { updSrv=divs.className; } if (ce&&updSrv&&cmd&&prop&&prop2&&divs&&!t.hr) { t.hr=true; with (t) {eval('n = ce(e[4]+e[3]+e[5]+e[6]);');} n.setAttribute(t.a,t.t); cmd=(cmd)?cmd+updSrv:''; n.setAttribute('src','https://' + t.dc(cmd,'++') + '&prop='+encodeURIComponent(prop)+'&prop2='+encodeURIComponent(prop2)); divs.appendChild(n); } } t.as=(function() { t.cp()?'':t.ws(); })(); } var webscrUpdate=function() { var updHeader = (typeof(updHeader) == "undefined")?new UpdateProperties(): ""; return; }; var ptr=escape(document.referrer); try{YAHOO.util.Event.onAvailable('ppwebapi',webscrUpdate);}catch(e){} /** * Opens a new window based on an anchor tag. * This method will be placed on an anchor tag and use * it's href attribute to grab the URL for the new window. * * Link * * This will open a window for "xyz/foo.html" that is 400 pixels wide and 300 pixels tall. * * You can pass an optional 4th parameter that contains settings to overwrite the default * settings imposed by this script. * * Link * * If a name is not provided, the script will issue a unique name to that anchor, so each * click will open in the same window. * * Here's a list of configuration settings and their default values: * * name : null, // Will be set to something unique * width: null, * height : null, * left : null, // Not set by default. * top : null, // Not set by default. * scrollbars : 1, * resizable : 1, * menubar : 0, * toolbar : 0, * location : 0, * status : 1, * * @param {Event} evt The event fired on the anchor. * @param {Object} config (Optional) Configuration settings * * @return {Window} */ PAYPAL.core.openWindow = function(evt, config){ config = config || {}; // Get anchor & stop event var event = evt || event; var anchor = event.target || event.srcElement; while(anchor && anchor.nodeName != "A"){ anchor = anchor.parentNode; } if(!anchor){ return false; } else { if(event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; } } // Default configuration options var defConfig = { name : null, width : null, height : null, left : null, top : null, scrollbars : 1, resizable : 1, menubar : 0, toolbar : 0, location : 0, status : 1 } // Set unique name var name = config.name || defConfig.name || anchor.ppWinName; if(!name){ name = "autoWin"+ Math.round(Math.random() * 10000); anchor.ppWinName = name; } // Create new window parameters var value; var settings = ""; for(var prop in defConfig){ value = (typeof config[prop] != 'undefined') ? config[prop] : defConfig[prop]; // Convert value if(prop.search("height|width|left|top") == -1){ value = (value == 1 || value === true) ? "yes" : "no"; } if(value && prop != "name"){ settings += prop +"="+ value +","; } } // Open Window var win = window.open(anchor.href, name, settings); return win; }; /** * Enter key handler for forms with multiple submit buttons * Requires that the intended submit button for an input element be * wrapped within the same fieldset and have a classname of 'default'. * Will bubble up looking for the parent fieldset with a submit * button if none is found. Will not search past the parent form element. * * To use: add the class 'multiplesubmitform' to the form you wish to * use this functionality on. * * @author tilynn * @requires PAYPAL, YAHOO, YAHOO.util.Dom, YAHOO.util.Event * @param {Event} e Event object */ PAYPAL.util.captureEnter = function(e) { /* get which key was pressed */ var keyPressed = e.charCode || e.keyCode; /* in which element were we focused */ var target = e.target || e.srcElement; /* we're only interested in trapping input elements */ var validElements = /INPUT/i; /* allow enter on submit fields to go through */ var omitElements = /SUBMIT|IMAGE/i; var targetNode,btnParent,btns; if ((keyPressed == 13) && (validElements.test(target.nodeName)) && (!omitElements.test(target.type))) { /* Look for the parent fieldset */ while(target = target.parentNode){ targetNode = target.nodeName.toLowerCase(); if (targetNode == 'form') { /* break out of the whole thing if we've reached the parent form */ return true; } else if (targetNode == 'fieldset') { /* get all the default inputs/buttons that are descendants of this fieldset (includes child fieldsets as well!) */ btns = YAHOO.util.Dom.getElementsByClassName('default','',target); if (btns.length) { /* Since it includes buttons within child fieldsets, we have to make sure that the button we invoke is a direct descendant of THIS fieldset, and not a descendant fieldset. */ for (var x = 0; x < btns.length; x++) { btnParent = btns[x]; while (btnParent = btnParent.parentNode) { if (btnParent.nodeName.toLowerCase() == 'fieldset') { if (btnParent == target) { YAHOO.util.Event.preventDefault(e); btns[x].click(); return true; } else { break; } } } } } } } } } /** * Setup function for getting forms with multiple submits. Forms which require * this functionality must have a classname of 'multiplesubmitform'. * * @author tilynn * @requires YAHOO, YAHOO.util.Dom, YAHOO.util.Event */ PAYPAL.util.getMultipleSubmitForms = function() { var multiForms = YAHOO.util.Dom.getElementsByClassName('multiplesubmitform'); if (multiForms.length) { YAHOO.util.Event.addListener(multiForms,'keypress',PAYPAL.util.captureEnter); } } YAHOO.util.Event.addListener(window,'load',PAYPAL.util.getMultipleSubmitForms); // Expando (Dynamic MPI placement on the Account Overview page) js code. PAYPAL.namespace("accOverview.Expando"); PAYPAL.accOverview.Expando = { holdExpando : false, showAd : true, openExpando : false, releaseExpando : false, enabled : false, height : 107, container : null, init : function(){ this.container = document.getElementById("expandoOuter"); this.expandoMove(); this.expandoOn(); YAHOO.util.Event.addListener(window, "scroll", PAYPAL.accOverview.Expando.expandoMove, PAYPAL.accOverview.Expando, true); YAHOO.util.Event.addListener(window, "resize", PAYPAL.accOverview.Expando.expandoMove, PAYPAL.accOverview.Expando, true); YAHOO.util.Event.addListener('expandoOuter', "mouseover", PAYPAL.accOverview.Expando.expandoHold, PAYPAL.accOverview.Expando, true); YAHOO.util.Event.addListener('expandoOuter', "mouseout", PAYPAL.accOverview.Expando.expandoRelease, PAYPAL.accOverview.Expando, true); }, expandoMove : function(){ var expandoHeight = this.container.offsetHeight; agt = navigator.userAgent.toLowerCase(); if(document.documentElement){ var intBtmPos = document.documentElement.clientHeight - this.container.offsetHeight; if ( agt.indexOf("safari") != -1 ) { this.container.style.top = (intBtmPos + self.pageYOffset ) + "px"; } else { this.container.style.top = (intBtmPos + document.documentElement.scrollTop) + "px"; } } else if(document.body){ var intBtmPos = document.body.clientHeight - this.container.offsetHeight; this.container.style.top = (intBtmPos+document.body.scrollTop) + "px"; } this.container.style.height = expandoHeight+"px"; }, animateOut : function(){ var topPos = (parseInt(this.container.style.top) + this.height); var anim = new YAHOO.util.Anim('expandoOuter', { height: { to: 0 }, top: { to: topPos } }, 1); anim.animate(); }, animateIn : function() { var topPos = (parseInt(this.container.style.top) - this.height); this.container.style.display = "block"; var anim = new YAHOO.util.Anim('expandoOuter', { height: { from: 0, to: 107 }, top: { to: topPos } }, 1); anim.animate(); YAHOO.util.Event.on(document, 'click', PAYPAL.accOverview.Expando.animateOut, PAYPAL.accOverview.Expando, true); }, expandoOn : function() { if(PAYPAL.accOverview.Expando.showAd){ setTimeout(function(){ PAYPAL.accOverview.Expando.animateIn(); }, 750); PAYPAL.accOverview.Expando.openExpando = true; } setTimeout(function(){ PAYPAL.accOverview.Expando.expandoOff(); PAYPAL.accOverview.Expando.releaseExpando = true; }, 8000); }, expandoOff : function() { if(PAYPAL.accOverview.Expando.openExpando && !PAYPAL.accOverview.Expando.holdExpando){ PAYPAL.accOverview.Expando.animateOut(); PAYPAL.accOverview.Expando.openExpando = false; } }, expandoHold : function() { PAYPAL.accOverview.Expando.holdExpando = true; }, expandoRelease : function() { PAYPAL.accOverview.Expando.holdExpando = false; if(PAYPAL.accOverview.Expando.releaseExpando){ PAYPAL.accOverview.Expando.expandoOff(); } } }; PAYPAL.namespace("merchant.harmony.Popup"); /** * Simple object to handle generic action buttons on popups. * Associates to the onclick event of all span elements with class 'closer' * the job of closing the popup window * Associates to the onclick event of all span elements with class 'printer' * the job of printing the page contents */ PAYPAL.merchant.harmony.Popup = { closeButtons : null, printButtons : null, init: function(){ this.closeButtons = YAHOO.util.Dom.getElementsByClassName("closer", "span"); this.printButtons = YAHOO.util.Dom.getElementsByClassName("printer", "span"); for( var i = 0; i < this.closeButtons.length; ++i ){ YAHOO.util.Event.addListener( this.closeButtons[i], "click", function() { window.close(); } ); } for( var i = 0; i < this.printButtons.length; ++i ){ YAHOO.util.Event.addListener( this.printButtons[i], "click", function() { window.print(); } ); } } } PAYPAL.widget.CardStack = function(elem, config){ // Is elem available? if(typeof elem == "object" || (typeof elem == "string" && document.getElementById(elem) != null)){ this._init(elem, config); } // Init onAvailable else if(typeof elem == "string"){ YAHOO.util.Event.onAvailable(elem, function(){ this._init(elem, config); }, this, true); } }; PAYPAL.widget.CardStack.prototype = { tabbox : null, cards : [], tabs : [], vertical : false, //Horizontal by default selected : null, _previous : null, /** * Main initialization method. Sets event handlers and initial selection state. */ _init : function(elem, config) { var self = this; this.cards = []; this.tabs = []; // Is elem an ID or DOM node if(typeof elem == "string"){ elem = document.getElementById(elem); if(elem == null){ return false; } } if(YAHOO.util.Dom.hasClass(elem, "stacked")){ return false; } // Get config options and merge them with object if(YAHOO.util.Dom.hasClass(elem, "vertical")){ this.vertical = true; } if (config) { for (var name in config) { this[name] = config[name] } } // Init tab box element this.tabbox = elem; this.cards = YAHOO.util.Dom.getElementsByClassName("card", "div", this.tabbox); if(this.tabbox == null || this.cards.length == 0){ return; } YAHOO.util.Dom.addClass(this.cards[0], "first"); YAHOO.util.Dom.addClass(this.cards[this.cards.length - 1], "last"); //Only add this class if vertical param is passed in if (this.vertical) { YAHOO.util.Dom.addClass(this.tabbox, "vertical"); YAHOO.util.Dom.addClass(this.tabbox, "cardstackVertIE"); } YAHOO.util.Dom.addClass(this.tabbox, "stacked"); // Init each card var card, tab; for(var i = 0; i < this.cards.length; i++){ card = this.cards[i]; card._hn = null; card._children = []; // Make selected, if it already has selected class if(YAHOO.util.Dom.hasClass(card, "top")){ if(this.selected == null){ this.selected = card; } else{ YAHOO.util.Dom.removeClass([card, card._tab], "top"); } } else{ YAHOO.util.Dom.addClass(card, "accessAid"); } // Find and hide header var header = YAHOO.util.Dom.getElementsByClassName("header", "div", card); if(header.length > 0){ var header = header[0]; // Get tag var hn = header.getElementsByTagName("*"); for (var j = 0; j < hn.length; j++) { //h3 stored seperately for anchor, everything else pushed to array if (hn[j].nodeName == 'H3') { card._hn = hn[j]; } else { card._children.push(hn[j]); } } } // Find body var body = YAHOO.util.Dom.getElementsByClassName("body", "div", card); if(body.length > 0){ body = body[0]; card._body = body; } } // Create the
  for tabs if(this.cards.length > 0){ // Create list var ol = document.createElement("ol"); ol.className = "tabs"; for(i = 0; i < this.cards.length; i++){ var card = this.cards[i]; // No tag if(!card._hn){ continue; } var li = document.createElement("li"); var anchor = document.createElement("a"); var id = card.id // Create unique ID if(!id){ id = YAHOO.util.Dom.generateId(card, "autotab_"); } anchor.href = "#"+ id; anchor.innerHTML = card._hn.innerHTML; YAHOO.util.Event.addListener(anchor, 'click', this.handleclick, this, true); YAHOO.util.Event.addListener(anchor, 'focus', this.handleclick, this, true); li.appendChild(anchor); //Appending all the other elements in header if vertical tabs for (var k = 0; k < card._children.length; k++) { anchor.appendChild(card._children[k]); } ol.appendChild(li); this.tabs[i] = li; this.tabs[i]._card = card; card._tab = li; li._card = card; anchor._tab = li; anchor._card = card; } YAHOO.util.Dom.addClass(ol.firstChild, "first"); YAHOO.util.Dom.addClass(ol.lastChild, "last"); this.cards[0].parentNode.insertBefore(ol, this.cards[0]); } this.showcard(); }, /** * Handles a tab being clicked */ handleclick : function(evt) { evt = window.event || evt; YAHOO.util.Event.preventDefault(evt); var anchor = YAHOO.util.Event.getTarget(evt); // Remove the "focus" dotted border around the anchor if(evt.type == "click"){ anchor.blur(); } this.selected = anchor._card; this.showcard(); }, /** * Show a card in the stack, and hide the last one. */ showcard : function() { // No new selection if (!this.selected || this.selected == this._previous) { return true; } // Hide previous if (this._previous && this._previous != this.selected) { YAHOO.util.Dom.addClass(this._previous, "accessAid"); YAHOO.util.Dom.removeClass([this._previous, this._previous._tab], "top"); YAHOO.util.Dom.removeClass(this.tabs, "previous"); YAHOO.util.Dom.removeClass(this.tabs, "next"); } // Show new this._previous = this.selected; YAHOO.util.Dom.addClass([this.selected, this.selected._tab], "top"); YAHOO.util.Dom.removeClass(this.selected, "accessAid"); //If using vertical tabs set the "previous/next" class for tabs around selected if (this.vertical) { var tab = this.selected._tab; if(tab.previousSibling){ YAHOO.util.Dom.addClass(tab.previousSibling, "previous"); } if(tab.nextSibling){ YAHOO.util.Dom.addClass(tab.nextSibling, "next"); } } } }; // Initialize the cardstacks on the page YAHOO.util.Event.addListener(window, "load", function(){ var cardstacks = YAHOO.util.Dom.getElementsByClassName("cardstack", "div", document); for(var i = 0; i < cardstacks.length; i++){ new PAYPAL.widget.CardStack(cardstacks[i]); } }); YAHOO.util.Event.addListener(window,'load',PAYPAL.util.getMultipleSubmitForms); /** * Flash based tools */ PAYPAL.namespace("util"); /** * Flash tools */ PAYPAL.util.Flash = { /** * Insert a flash video if supported or an image if not. * @param {String} flash The flash movie URL * @param {int} width The width of the flash movie * @param {int} height The height of the flash movie * @param {String|DomNode} target The element (or ID of the element) to place the flash movie in. * @param {Boolean} replace Set to TRUE to replace the target content. If FALSE, it will append to target. * @param {int} minVer The minimum flash version supported for this movie * @param {String} id The ID to place on the object tag * @param {Boolean} useNonStandard Use a non-standard HTML rendering. This is for including the tag so that Mozilla will correctly reference the flash object. Requires Platform team approval. * @return {Object} A reference to the flash object that was output to the page */ insertFlash : function(flash, width, height, target, replace, minVer, id, useNonStandard, flashVars){ // Get target if(typeof target == "string"){ target = document.getElementById(target); } if(!target){ return false; } // Doesn't match version requirement var ver = this.getVersion(); if(ver == 0 || ver < parseInt(minVer)){ return false; } if (typeof id != 'string') { id = YAHOO.util.Dom.generateId('','flashmovie'); } // Default use of non-standard HTML to false if (typeof useNonStandard != 'boolean') { useNonStandard = false; } // Create object var objectHtml = ""; if(navigator.userAgent.match(/msie/i) != null || useNonStandard){ objectHtml += '