if (typeof YAHOO == "undefined" || !YAHOO) { var YAHOO = {} } YAHOO.namespace = function() { var b = arguments, g = null, e, c, f; for (e = 0; e < b.length; e = e + 1) { f = ("" + b[e]).split("."); g = YAHOO; for (c = (f[0] == "YAHOO") ? 1 : 0; c < f.length; c = c + 1) { g[f[c]] = g[f[c]] || {}; g = g[f[c]] } } return g }; 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, f, e) { var k = YAHOO.env.modules, c, j, h, g, d; if (!k[a]) { k[a] = { versions: [], builds: []} } c = k[a]; j = e.version; h = e.build; g = YAHOO.env.listeners; c.name = a; c.version = j; c.build = h; c.versions.push(j); c.builds.push(h); c.mainClass = f; for (d = 0; d < g.length; d = d + 1) { g[d](c) } if (f) { f.VERSION = j; f.BUILD = h } 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(j, h) { var g, l, k; for (g = 0; g < e.length; g = g + 1) { l = e[g]; k = h[l]; if (b.isFunction(k) && k != a[l]) { j[l] = k } } } : function() { }, extend: function(k, l, j) { if (!l || !k) { throw new Error("extend failed, please check that all dependencies are included.") } var h = function() { }, g; h.prototype = l.prototype; k.prototype = new h(); k.prototype.constructor = k; k.superclass = l.prototype; if (l.prototype.constructor == a.constructor) { l.prototype.constructor = l } if (j) { for (g in j) { if (b.hasOwnProperty(j, g)) { k.prototype[g] = j[g] } } b._IEEnumFix(k.prototype, j) } }, augmentObject: function(l, k) { if (!k || !l) { throw new Error("Absorb failed, verify dependencies.") } var g = arguments, j, m, h = g[2]; if (h && h !== true) { for (j = 2; j < g.length; j = j + 1) { l[g[j]] = k[g[j]] } } else { for (m in k) { if (h || !(m in l)) { l[m] = k[m] } } b._IEEnumFix(l, k) } }, augmentProto: function(k, j) { if (!j || !k) { throw new Error("Augment failed, verify dependencies.") } var g = [k.prototype, j.prototype], h; for (h = 2; h < arguments.length; h = h + 1) { g.push(arguments[h]) } b.augmentObject.apply(this, g) }, dump: function(g, m) { var j, l, q = [], r = "{...}", h = "f(){...}", p = ", ", k = " => "; 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 } } } m = (b.isNumber(m)) ? m : 3; if (b.isArray(g)) { q.push("["); for (j = 0, l = g.length; j < l; j = j + 1) { if (b.isObject(g[j])) { q.push((m > 0) ? b.dump(g[j], m - 1) : r) } else { q.push(g[j]) } q.push(p) } if (q.length > 1) { q.pop() } q.push("]") } else { q.push("{"); for (j in g) { if (b.hasOwnProperty(g, j)) { q.push(j + k); if (b.isObject(g[j])) { q.push((m > 0) ? b.dump(g[j], m - 1) : r) } else { q.push(g[j]) } q.push(p) } } if (q.length > 1) { q.pop() } q.push("}") } return q.join("") }, substitute: function(C, h, u) { var q, p, m, y, z, B, x = [], l, r = "dump", w = " ", g = "{", A = "}", t; for (; ; ) { q = C.lastIndexOf(g); if (q < 0) { break } p = C.indexOf(A, q); if (q + 1 >= p) { break } l = C.substring(q + 1, p); y = l; B = null; m = y.indexOf(w); if (m > -1) { B = y.substring(m + 1); y = y.substring(0, m) } z = h[y]; if (u) { z = u(y, z, B) } if (b.isObject(z)) { if (b.isArray(z)) { z = b.dump(z, parseInt(B, 10)) } else { B = B || ""; t = B.indexOf(r); if (t > -1) { B = B.substring(4) } if (z.toString === a.toString || t > -1) { z = b.dump(z, parseInt(B, 10)) } else { z = z.toString() } } } else { if (!b.isString(z) && !b.isNumber(z)) { z = "~-" + x.length + "-~"; x[x.length] = l } } C = C.substring(0, q) + z + C.substring(p + 1) } for (q = x.length - 1; q >= 0; q = q - 1) { C = C.replace(new RegExp("~-" + q + "-~"), "{" + x[q] + "}", "g") } return C }, trim: function(g) { try { return g.replace(/^\s+|\s+$/g, "") } catch (h) { return g } }, merge: function() { var k = {}, h = arguments, g = h.length, j; for (j = 0; j < g; j = j + 1) { b.augmentObject(k, h[j], true) } return k }, later: function(q, h, s, j, k) { q = q || 0; h = h || {}; var i = s, p = j, l, g; if (b.isString(s)) { i = h[s] } if (!i) { throw new TypeError("method undefined") } if (!b.isArray(p)) { p = [j] } l = function() { i.apply(h, p) }; g = (k) ? setInterval(l, q) : setTimeout(l, q); 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: "1796" }); (function() { YAHOO.env._id_counter = YAHOO.env._id_counter || 0; var e = YAHOO.util, k = YAHOO.lang, M = YAHOO.env.ua, a = YAHOO.lang.trim, C = {}, H = {}, m = /^t(?:able|d|h)$/i, x = /color$/i, j = window.document, w = j.documentElement, D = "ownerDocument", N = "defaultView", V = "documentElement", T = "compatMode", A = "offsetLeft", p = "offsetTop", U = "offsetParent", y = "parentNode", L = "nodeType", c = "tagName", o = "scrollLeft", I = "scrollTop", q = "getBoundingClientRect", W = "getComputedStyle", z = "currentStyle", l = "CSS1Compat", B = "BackCompat", F = "class", f = "className", i = "", b = " ", S = "(?:^|\\s)", K = "(?= |$)", u = "g", P = "position", E = "fixed", v = "relative", J = "left", O = "top", R = "medium", Q = "borderLeftWidth", r = "borderTopWidth", d = M.opera, h = M.webkit, g = M.gecko, t = M.ie; e.Dom = { CUSTOM_ATTRIBUTES: (!w.hasAttribute) ? { "for": "htmlFor", "class": f} : { htmlFor: "for", className: F }, get: function(Z) { var ab, X, aa, Y, G; if (Z) { if (Z[L] || Z.item) { return Z } if (typeof Z === "string") { ab = Z; Z = j.getElementById(Z); if (Z && Z.id === ab) { return Z } else { if (Z && j.all) { Z = null; X = j.all[ab]; for (Y = 0, G = X.length; Y < G; ++Y) { if (X[Y].id === ab) { return X[Y] } } } } return Z } if (Z.DOM_EVENTS) { Z = Z.get("element") } if ("length" in Z) { aa = []; for (Y = 0, G = Z.length; Y < G; ++Y) { aa[aa.length] = e.Dom.get(Z[Y]) } return aa } return Z } return null }, getComputedStyle: function(G, X) { if (window[W]) { return G[D][N][W](G, null)[X] } else { if (G[z]) { return e.Dom.IE_ComputedStyle.get(G, X) } } }, getStyle: function(G, X) { return e.Dom.batch(G, e.Dom._getStyle, X) }, _getStyle: function() { if (window[W]) { return function(G, Z) { Z = (Z === "float") ? Z = "cssFloat" : e.Dom._toCamel(Z); var Y = G.style[Z], X; if (!Y) { X = G[D][N][W](G, null); if (X) { Y = X[Z] } } return Y } } else { if (w[z]) { return function(G, Z) { var Y; switch (Z) { case "opacity": Y = 100; try { Y = G.filters["DXImageTransform.Microsoft.Alpha"].opacity } catch (aa) { try { Y = G.filters("alpha").opacity } catch (X) { } } return Y / 100; case "float": Z = "styleFloat"; default: Z = e.Dom._toCamel(Z); Y = G[z] ? G[z][Z] : null; return (G.style[Z] || Y) } } } } } (), setStyle: function(G, X, Y) { e.Dom.batch(G, e.Dom._setStyle, { prop: X, val: Y }) }, _setStyle: function() { if (t) { return function(X, G) { var Y = e.Dom._toCamel(G.prop), Z = G.val; if (X) { switch (Y) { case "opacity": if (k.isString(X.style.filter)) { X.style.filter = "alpha(opacity=" + Z * 100 + ")"; if (!X[z] || !X[z].hasLayout) { X.style.zoom = 1 } } break; case "float": Y = "styleFloat"; default: X.style[Y] = Z } } else { } } } else { return function(X, G) { var Y = e.Dom._toCamel(G.prop), Z = G.val; if (X) { if (Y == "float") { Y = "cssFloat" } X.style[Y] = Z } 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 (j[V][q]) { return function(Z) { var aa, X, ab, ag, af, ae, ad, G, Y, ac = Math.floor, ah = false; if (e.Dom._canPosition(Z)) { ab = Z[q](); ag = Z[D]; aa = e.Dom.getDocumentScrollLeft(ag); X = e.Dom.getDocumentScrollTop(ag); ah = [ac(ab[J]), ac(ab[O])]; if (t && M.ie < 8) { af = 2; ae = 2; ad = ag[T]; G = s(ag[V], Q); Y = s(ag[V], r); if (M.ie === 6) { if (ad !== B) { af = 0; ae = 0 } } if ((ad == B)) { if (G !== R) { af = parseInt(G, 10) } if (Y !== R) { ae = parseInt(Y, 10) } } ah[0] -= af; ah[1] -= ae } if ((X || aa)) { ah[0] += aa; ah[1] += X } ah[0] = ac(ah[0]); ah[1] = ac(ah[1]) } else { } return ah } } else { return function(Z) { var Y, X, ab, ac, ad, aa = false, G = Z; if (e.Dom._canPosition(Z)) { aa = [Z[A], Z[p]]; Y = e.Dom.getDocumentScrollLeft(Z[D]); X = e.Dom.getDocumentScrollTop(Z[D]); ad = ((g || M.webkit > 519) ? true : false); while ((G = G[U])) { aa[0] += G[A]; aa[1] += G[p]; if (ad) { aa = e.Dom._calcBorders(G, aa) } } if (e.Dom._getStyle(Z, P) !== E) { G = Z; while ((G = G[y]) && G[c]) { ab = G[I]; ac = G[o]; if (g && (e.Dom._getStyle(G, "overflow") !== "visible")) { aa = e.Dom._calcBorders(G, aa) } if (ab || ac) { aa[0] -= ac; aa[1] -= ab } } aa[0] += Y; aa[1] += X } else { if (d) { aa[0] -= Y; aa[1] -= X } else { if (h || g) { aa[0] += Y; aa[1] += X } } } aa[0] = Math.floor(aa[0]); aa[1] = Math.floor(aa[1]) } else { } return aa } } } (), getX: function(G) { var X = function(Y) { return e.Dom.getXY(Y)[0] }; return e.Dom.batch(G, X, e.Dom, true) }, getY: function(G) { var X = function(Y) { return e.Dom.getXY(Y)[1] }; return e.Dom.batch(G, X, e.Dom, true) }, setXY: function(G, Y, X) { e.Dom.batch(G, e.Dom._setXY, { pos: Y, noRetry: X }) }, _setXY: function(G, aa) { var ab = e.Dom._getStyle(G, P), Z = e.Dom.setStyle, ae = aa.pos, X = aa.noRetry, ac = [parseInt(e.Dom.getComputedStyle(G, J), 10), parseInt(e.Dom.getComputedStyle(G, O), 10)], ad, Y; if (ab == "static") { ab = v; Z(G, P, ab) } ad = e.Dom._getXY(G); if (!ae || ad === false) { return false } if (isNaN(ac[0])) { ac[0] = (ab == v) ? 0 : G[A] } if (isNaN(ac[1])) { ac[1] = (ab == v) ? 0 : G[p] } if (ae[0] !== null) { Z(G, J, ae[0] - ad[0] + ac[0] + "px") } if (ae[1] !== null) { Z(G, O, ae[1] - ad[1] + ac[1] + "px") } if (!X) { Y = e.Dom._getXY(G); if ((ae[0] !== null && Y[0] != ae[0]) || (ae[1] !== null && Y[1] != ae[1])) { e.Dom._setXY(G, { pos: ae, noRetry: true }) } } }, setX: function(X, G) { e.Dom.setXY(X, [G, null]) }, setY: function(G, X) { e.Dom.setXY(G, [null, X]) }, getRegion: function(G) { var X = function(Y) { var Z = false; if (e.Dom._canPosition(Y)) { Z = e.Region.getRegion(Y) } else { } return Z }; return e.Dom.batch(G, X, e.Dom, true) }, getClientWidth: function() { return e.Dom.getViewportWidth() }, getClientHeight: function() { return e.Dom.getViewportHeight() }, getElementsByClassName: function(ac, ag, ad, af, Y, ae) { ac = k.trim(ac); ag = ag || "*"; ad = (ad) ? e.Dom.get(ad) : null || j; if (!ad) { return [] } var X = [], G = ad.getElementsByTagName(ag), aa = e.Dom.hasClass; for (var Z = 0, ab = G.length; Z < ab; ++Z) { if (aa(G[Z], ac)) { X[X.length] = G[Z] } } if (af) { e.Dom.batch(X, af, Y, ae) } return X }, hasClass: function(X, G) { return e.Dom.batch(X, e.Dom._hasClass, G) }, _hasClass: function(Y, X) { var G = false, Z; if (Y && X) { Z = e.Dom.getAttribute(Y, f) || i; if (X.exec) { G = X.test(Z) } else { G = X && (b + Z + b).indexOf(b + X + b) > -1 } } else { } return G }, addClass: function(X, G) { return e.Dom.batch(X, e.Dom._addClass, G) }, _addClass: function(Y, X) { var G = false, Z; if (Y && X) { Z = e.Dom.getAttribute(Y, f) || i; if (!e.Dom._hasClass(Y, X)) { e.Dom.setAttribute(Y, f, a(Z + b + X)); G = true } } else { } return G }, removeClass: function(X, G) { return e.Dom.batch(X, e.Dom._removeClass, G) }, _removeClass: function(Z, Y) { var X = false, ab, aa, G; if (Z && Y) { ab = e.Dom.getAttribute(Z, f) || i; e.Dom.setAttribute(Z, f, ab.replace(e.Dom._getClassRegex(Y), i)); aa = e.Dom.getAttribute(Z, f); if (ab !== aa) { e.Dom.setAttribute(Z, f, a(aa)); X = true; if (e.Dom.getAttribute(Z, f) === "") { G = (Z.hasAttribute && Z.hasAttribute(F)) ? F : f; Z.removeAttribute(G) } } } else { } return X }, replaceClass: function(Y, X, G) { return e.Dom.batch(Y, e.Dom._replaceClass, { from: X, to: G }) }, _replaceClass: function(Z, Y) { var X, ac, ab, G = false, aa; if (Z && Y) { ac = Y.from; ab = Y.to; if (!ab) { G = false } else { if (!ac) { G = e.Dom._addClass(Z, Y.to) } else { if (ac !== ab) { aa = e.Dom.getAttribute(Z, f) || i; X = (b + aa.replace(e.Dom._getClassRegex(ac), b + ab)).split(e.Dom._getClassRegex(ab)); X.splice(1, 0, b + ab); e.Dom.setAttribute(Z, f, a(X.join(i))); G = true } } } } else { } return G }, generateId: function(G, Y) { Y = Y || "yui-gen"; var X = function(Z) { if (Z && Z.id) { return Z.id } var aa = Y + YAHOO.env._id_counter++; if (Z) { if (Z[D].getElementById(aa)) { return e.Dom.generateId(Z, aa + Y) } Z.id = aa } return aa }; return e.Dom.batch(G, X, e.Dom, true) || X.apply(e.Dom, arguments) }, isAncestor: function(X, Y) { X = e.Dom.get(X); Y = e.Dom.get(Y); var G = false; if ((X && Y) && (X[L] && Y[L])) { if (X.contains && X !== Y) { G = X.contains(Y) } else { if (X.compareDocumentPosition) { G = !!(X.compareDocumentPosition(Y) & 16) } } } else { } return G }, inDocument: function(G, X) { return e.Dom._inDoc(e.Dom.get(G), X) }, _inDoc: function(X, Y) { var G = false; if (X && X[c]) { Y = Y || X[D]; G = e.Dom.isAncestor(Y[V], X) } else { } return G }, getElementsBy: function(X, ag, ac, ae, Z, ad, af) { ag = ag || "*"; ac = (ac) ? e.Dom.get(ac) : null || j; if (!ac) { return [] } var Y = [], G = ac.getElementsByTagName(ag); for (var aa = 0, ab = G.length; aa < ab; ++aa) { if (X(G[aa])) { if (af) { Y = G[aa]; break } else { Y[Y.length] = G[aa] } } } if (ae) { e.Dom.batch(Y, ae, Z, ad) } return Y }, getElementBy: function(Y, G, X) { return e.Dom.getElementsBy(Y, G, X, null, null, null, true) }, batch: function(Y, ac, ab, aa) { var Z = [], X = (aa) ? ab : window; Y = (Y && (Y[c] || Y.item)) ? Y : e.Dom.get(Y); if (Y && ac) { if (Y[c] || Y.length === undefined) { return ac.call(X, Y, ab) } for (var G = 0; G < Y.length; ++G) { Z[Z.length] = ac.call(X, Y[G], ab) } } else { return false } return Z }, getDocumentHeight: function() { var X = (j[T] != l || h) ? j.body.scrollHeight : w.scrollHeight, G = Math.max(X, e.Dom.getViewportHeight()); return G }, getDocumentWidth: function() { var X = (j[T] != l || h) ? j.body.scrollWidth : w.scrollWidth, G = Math.max(X, e.Dom.getViewportWidth()); return G }, getViewportHeight: function() { var G = self.innerHeight, X = j[T]; if ((X || t) && !d) { G = (X == l) ? w.clientHeight : j.body.clientHeight } return G }, getViewportWidth: function() { var G = self.innerWidth, X = j[T]; if (X || t) { G = (X == l) ? w.clientWidth : j.body.clientWidth } return G }, getAncestorBy: function(G, X) { while ((G = G[y])) { if (e.Dom._testElement(G, X)) { return G } } return null }, getAncestorByClassName: function(X, G) { X = e.Dom.get(X); if (!X) { return null } var Y = function(Z) { return e.Dom.hasClass(Z, G) }; return e.Dom.getAncestorBy(X, Y) }, getAncestorByTagName: function(X, G) { X = e.Dom.get(X); if (!X) { return null } var Y = function(Z) { return Z[c] && Z[c].toUpperCase() == G.toUpperCase() }; return e.Dom.getAncestorBy(X, Y) }, getPreviousSiblingBy: function(G, X) { while (G) { G = G.previousSibling; if (e.Dom._testElement(G, X)) { return G } } return null }, getPreviousSibling: function(G) { G = e.Dom.get(G); if (!G) { return null } return e.Dom.getPreviousSiblingBy(G) }, getNextSiblingBy: function(G, X) { while (G) { G = G.nextSibling; if (e.Dom._testElement(G, X)) { return G } } return null }, getNextSibling: function(G) { G = e.Dom.get(G); if (!G) { return null } return e.Dom.getNextSiblingBy(G) }, getFirstChildBy: function(G, Y) { var X = (e.Dom._testElement(G.firstChild, Y)) ? G.firstChild : null; return X || e.Dom.getNextSiblingBy(G.firstChild, Y) }, getFirstChild: function(G, X) { G = e.Dom.get(G); if (!G) { return null } return e.Dom.getFirstChildBy(G) }, getLastChildBy: function(G, Y) { if (!G) { return null } var X = (e.Dom._testElement(G.lastChild, Y)) ? G.lastChild : null; return X || e.Dom.getPreviousSiblingBy(G.lastChild, Y) }, getLastChild: function(G) { G = e.Dom.get(G); return e.Dom.getLastChildBy(G) }, getChildrenBy: function(X, Z) { var Y = e.Dom.getFirstChildBy(X, Z), G = Y ? [Y] : []; e.Dom.getNextSiblingBy(Y, function(aa) { if (!Z || Z(aa)) { G[G.length] = aa } return false }); return G }, getChildren: function(G) { G = e.Dom.get(G); if (!G) { } return e.Dom.getChildrenBy(G) }, getDocumentScrollLeft: function(G) { G = G || j; return Math.max(G[V].scrollLeft, G.body.scrollLeft) }, getDocumentScrollTop: function(G) { G = G || j; return Math.max(G[V].scrollTop, G.body.scrollTop) }, insertBefore: function(X, G) { X = e.Dom.get(X); G = e.Dom.get(G); if (!X || !G || !G[y]) { return null } return G[y].insertBefore(X, G) }, insertAfter: function(X, G) { X = e.Dom.get(X); G = e.Dom.get(G); if (!X || !G || !G[y]) { return null } if (G.nextSibling) { return G[y].insertBefore(X, G.nextSibling) } else { return G[y].appendChild(X) } }, getClientRegion: function() { var Y = e.Dom.getDocumentScrollTop(), X = e.Dom.getDocumentScrollLeft(), Z = e.Dom.getViewportWidth() + X, G = e.Dom.getViewportHeight() + Y; return new e.Region(Y, Z, G, X) }, setAttribute: function(X, G, Y) { G = e.Dom.CUSTOM_ATTRIBUTES[G] || G; X.setAttribute(G, Y) }, getAttribute: function(X, G) { G = e.Dom.CUSTOM_ATTRIBUTES[G] || G; return X.getAttribute(G) }, _toCamel: function(X) { var Y = C; function G(Z, aa) { return aa.toUpperCase() } return Y[X] || (Y[X] = X.indexOf("-") === -1 ? X : X.replace(/-([a-z])/gi, G)) }, _getClassRegex: function(X) { var G; if (X !== undefined) { if (X.exec) { G = X } else { G = H[X]; if (!G) { X = X.replace(e.Dom._patterns.CLASS_RE_TOKENS, "\\$1"); G = H[X] = new RegExp(S + X + K, u) } } } return G }, _patterns: { ROOT_TAG: /^body|html$/i, CLASS_RE_TOKENS: /([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g }, _testElement: function(G, X) { return G && G[L] == 1 && (!X || X(G)) }, _calcBorders: function(Y, Z) { var X = parseInt(e.Dom[W](Y, r), 10) || 0, G = parseInt(e.Dom[W](Y, Q), 10) || 0; if (g) { if (m.test(Y[c])) { X = 0; G = 0 } } Z[0] += G; Z[1] += X; return Z } }; var s = e.Dom[W]; if (M.opera) { e.Dom[W] = function(X, G) { var Y = s(X, G); if (x.test(G)) { Y = e.Dom.Color.toRGB(Y) } return Y } } if (M.webkit) { e.Dom[W] = function(X, G) { var Y = s(X, G); if (Y === "rgba(0, 0, 0, 0)") { Y = "transparent" } return Y } } })(); YAHOO.util.Region = function(d, e, a, c) { this.top = d; this.y = d; this[1] = d; this.right = e; this.bottom = a; this.left = c; this.x = c; this[0] = c; 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(f) { var d = Math.max(this.top, f.top), e = Math.min(this.right, f.right), a = Math.min(this.bottom, f.bottom), c = Math.max(this.left, f.left); if (a >= d && e >= c) { return new YAHOO.util.Region(d, e, a, c) } else { return null } }; YAHOO.util.Region.prototype.union = function(f) { var d = Math.min(this.top, f.top), e = Math.max(this.right, f.right), a = Math.max(this.bottom, f.bottom), c = Math.min(this.left, f.left); return new YAHOO.util.Region(d, e, a, c) }; 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(e) { var g = YAHOO.util.Dom.getXY(e), d = g[1], f = g[0] + e.offsetWidth, a = g[1] + e.offsetHeight, c = g[0]; return new YAHOO.util.Region(d, f, a, c) }; 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", x = "hasLayout", i = "px", v = "opacity", l = "auto", d = "borderLeftWidth", g = "borderTopWidth", q = "borderRightWidth", w = "borderBottomWidth", t = "visible", r = "transparent", o = "height", e = "width", h = "style", u = "currentStyle", s = /^width|height$/, p = /^(\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(y, A) { var z = "", B = y[u][A]; if (A === v) { z = b.Dom.getStyle(y, v) } else { if (!B || (B.indexOf && B.indexOf(i) > -1)) { z = B } else { if (b.Dom.IE_COMPUTED[A]) { z = b.Dom.IE_COMPUTED[A](y, A) } else { if (p.test(B)) { z = b.Dom.IE.ComputedStyle.getPixel(y, A) } else { z = B } } } } return z }, getOffset: function(A, F) { var C = A[u][F], y = F.charAt(0).toUpperCase() + F.substr(1), D = "offset" + y, z = "pixel" + y, B = "", E; if (C == l) { E = A[D]; if (E === undefined) { B = 0 } B = E; if (s.test(F)) { A[h][F] = E; if (A[D] > E) { B = E - (A[D] - E) } A[h][F] = l } } else { if (!A[h][z] && !A[h][F]) { A[h][F] = C } B = A[h][z] } return B + i }, getBorderWidth: function(y, A) { var z = null; if (!y[u][x]) { y[h].zoom = 1 } switch (A) { case g: z = y[a]; break; case w: z = y.offsetHeight - y.clientHeight - y[a]; break; case d: z = y[f]; break; case q: z = y.offsetWidth - y.clientWidth - y[f]; break } return z + i }, getPixel: function(z, y) { var B = null, C = z[u][k], A = z[u][y]; z[h][k] = A; B = z[h].pixelRight; z[h][k] = C; return B + i }, getMargin: function(z, y) { var A; if (z[u][y] == l) { A = 0 + i } else { A = b.Dom.IE.ComputedStyle.getPixel(z, y) } return A }, getVisibility: function(z, y) { var A; while ((A = z[u]) && A[y] == "inherit") { z = z[j] } return (A) ? A[y] : t }, getColor: function(z, y) { return b.Dom.Color.toRGB(z[u][y]) || r }, getBorderColor: function(z, y) { var A = z[u], B = A[y] || A.color; return b.Dom.Color.toRGB(b.Dom.Color.toHex(B)) } }, c = {}; c.top = c.right = c.bottom = c.left = c[e] = c[o] = m.getOffset; c.color = m.getColor; c[g] = c[q] = c[w] = 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(i) { i = d.Dom.Color.KEYWORDS[i] || i; if (d.Dom.Color.re_RGB.exec(i)) { var h = (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); i = [h[c](16), f[c](16), e[c](16)].join("") } if (i.length < 6) { i = i.replace(d.Dom.Color.re_hex3, "$1$1") } if (i !== "transparent" && i.indexOf("#") < 0) { i = "#" + i } return i.toLowerCase() } } } ()); YAHOO.register("dom", YAHOO.util.Dom, { version: "2.7.0", build: "1796" }); 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 m = [], f = this.subscribers.length; if (!f && this.silent) { return true } var k = [].slice.call(arguments, 0), h = true, d, l = false; if (!this.silent) { } var c = this.subscribers.slice(), a = YAHOO.util.Event.throwErrors; for (d = 0; d < f; ++d) { var p = c[d]; if (!p) { l = true } else { if (!this.silent) { } var o = p.getScope(this.scope); if (this.signature == YAHOO.util.CustomEvent.FLAT) { var b = null; if (k.length > 0) { b = k[0] } try { h = p.fn.call(o, b, p.obj) } catch (g) { this.lastError = g; if (a) { throw g } } } else { try { h = p.fn.call(o, this.type, k, p.obj) } catch (j) { this.lastError = j; if (a) { throw j } } } if (false === h) { if (!this.silent) { } break } } } return (h !== 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 o = function() { m._tryPreloadAttach() }; this._interval = setInterval(o, this.POLL_INTERVAL) } }, onAvailable: function(t, p, r, s, q) { var m = (YAHOO.lang.isString(t)) ? [t] : t; for (var o = 0; o < m.length; o = o + 1) { f.push({ id: m[o], fn: p, obj: r, overrideContext: s, checkReady: q }) } c = this.POLL_RETRYS; this.startInterval() }, onContentReady: function(q, m, o, p) { this.onAvailable(q, m, o, p, true) }, onDOMReady: function(m, o, p) { if (this.DOMReady) { setTimeout(function() { var q = window; if (p) { if (p === true) { q = o } else { q = p } } m.call(q, "DOMReady", [], o) }, 0) } else { this.DOMReadyEvent.subscribe(m, o, p) } }, _addListener: function(p, m, z, t, x, C) { if (!z || !z.call) { return false } if (this._isValidCollection(p)) { var A = true; for (var u = 0, w = p.length; u < w; ++u) { A = this.on(p[u], m, z, t, x) && A } return A } else { if (YAHOO.lang.isString(p)) { var s = this.getEl(p); if (s) { p = s } else { this.onAvailable(p, function() { YAHOO.util.Event.on(p, m, z, t, x) }); return true } } } if (!p) { return false } if ("unload" == m && t !== this) { j[j.length] = [p, m, z, t, x]; return true } var o = p; if (x) { if (x === true) { o = t } else { o = x } } var q = function(D) { return z.call(o, YAHOO.util.Event.getEvent(D, p), t) }; var B = [p, m, z, q, o, t, x]; var v = i.length; i[v] = B; if (this.useLegacyEvent(p, m)) { var r = this.getLegacyIndex(p, m); if (r == -1 || p != g[r][0]) { r = g.length; b[p.id + m] = r; g[r] = [p, m, p["on" + m]]; e[r] = []; p["on" + m] = function(D) { YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(D), r) } } e[r].push(B) } else { try { this._simpleAdd(p, m, q, C) } catch (y) { this.lastError = y; this.removeListener(p, m, z); return false } } return true }, addListener: function(o, r, m, p, q) { return this._addListener(o, r, m, p, q, false) }, addFocusListener: function(o, m, p, q) { return this._addListener(o, k, m, p, q, true) }, removeFocusListener: function(o, m) { return this.removeListener(o, k, m) }, addBlurListener: function(o, m, p, q) { return this._addListener(o, l, m, p, q, true) }, removeBlurListener: function(o, m) { return this.removeListener(o, l, m) }, fireLegacyEvent: function(s, q) { var u = true, m, w, v, o, t; w = e[q].slice(); for (var p = 0, r = w.length; p < r; ++p) { v = w[p]; if (v && v[this.WFN]) { o = v[this.ADJ_SCOPE]; t = v[this.WFN].call(o, s); u = (u && t) } } m = g[q]; if (m && m[2]) { m[2](s) } return u }, getLegacyIndex: function(o, p) { var m = this.generateId(o) + p; if (typeof b[m] == "undefined") { return -1 } else { return b[m] } }, useLegacyEvent: function(m, o) { return (this.webkit && this.webkit < 419 && ("click" == o || "dblclick" == o)) }, removeListener: function(o, m, w) { var r, u, y; if (typeof o == "string") { o = this.getEl(o) } else { if (this._isValidCollection(o)) { var x = true; for (r = o.length - 1; r > -1; r--) { x = (this.removeListener(o[r], m, w) && x) } return x } } if (!w || !w.call) { return this.purgeElement(o, false, m) } if ("unload" == m) { for (r = j.length - 1; r > -1; r--) { y = j[r]; if (y && y[0] == o && y[1] == m && y[2] == w) { j.splice(r, 1); return true } } return false } var s = null; var t = arguments[3]; if ("undefined" === typeof t) { t = this._getCacheIndex(o, m, w) } if (t >= 0) { s = i[t] } if (!o || !s) { return false } if (this.useLegacyEvent(o, m)) { var q = this.getLegacyIndex(o, m); var p = e[q]; if (p) { for (r = 0, u = p.length; r < u; ++r) { y = p[r]; if (y && y[this.EL] == o && y[this.TYPE] == m && y[this.FN] == w) { p.splice(r, 1); break } } } } else { try { this._simpleRemove(o, m, s[this.WFN], false) } catch (v) { this.lastError = v; return false } } delete i[t][this.WFN]; delete i[t][this.FN]; i.splice(t, 1); return true }, getTarget: function(p, o) { var m = p.target || p.srcElement; return this.resolveTextNode(m) }, resolveTextNode: function(o) { try { if (o && 3 == o.nodeType) { return o.parentNode } } catch (m) { } return o }, getPageX: function(o) { var m = o.pageX; if (!m && 0 !== m) { m = o.clientX || 0; if (this.isIE) { m += this._getScrollLeft() } } return m }, getPageY: function(m) { var o = m.pageY; if (!o && 0 !== o) { o = m.clientY || 0; if (this.isIE) { o += this._getScrollTop() } } return o }, getXY: function(m) { return [this.getPageX(m), this.getPageY(m)] }, getRelatedTarget: function(o) { var m = o.relatedTarget; if (!m) { if (o.type == "mouseout") { m = o.toElement } else { if (o.type == "mouseover") { m = o.fromElement } } } return this.resolveTextNode(m) }, getTime: function(p) { if (!p.time) { var o = new Date().getTime(); try { p.time = o } catch (m) { this.lastError = m; return o } } return p.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(p, m) { var o = p || window.event; if (!o) { var q = this.getEvent.caller; while (q) { o = q.arguments[0]; if (o && Event == o.constructor) { break } q = q.caller } } return o }, getCharCode: function(o) { var m = o.keyCode || o.charCode || 0; if (YAHOO.env.ua.webkit && (m in d)) { m = d[m] } return m }, _getCacheIndex: function(r, s, q) { for (var p = 0, o = i.length; p < o; p = p + 1) { var m = i[p]; if (m && m[this.FN] == q && m[this.EL] == r && m[this.TYPE] == s) { return p } } return -1 }, generateId: function(m) { var o = m.id; if (!o) { o = "yuievtautoid-" + a; ++a; m.id = o } return o }, _isValidCollection: function(p) { try { return (p && typeof p !== "string" && p.length && !p.tagName && !p.alert && typeof p[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(o) { if (!h) { h = true; var m = YAHOO.util.Event; m._ready(); m._tryPreloadAttach() } }, _ready: function(o) { 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 t = !h; if (!t) { t = (c > 0 && f.length > 0) } var s = []; var u = function(w, x) { var v = w; if (x.overrideContext) { if (x.overrideContext === true) { v = x.obj } else { v = x.overrideContext } } x.fn.call(v, x.obj) }; var o, m, r, q, p = []; for (o = 0, m = f.length; o < m; o = o + 1) { r = f[o]; if (r) { q = this.getEl(r.id); if (q) { if (r.checkReady) { if (h || q.nextSibling || !t) { p.push(r); f[o] = null } } else { u(q, r); f[o] = null } } else { s.push(r) } } } for (o = 0, m = p.length; o < m; o = o + 1) { r = p[o]; u(this.getEl(r.id), r) } c--; if (t) { for (o = f.length - 1; o > -1; o--) { r = f[o]; if (!r || !r.id) { f.splice(o, 1) } } this.startInterval() } else { if (this._interval) { clearInterval(this._interval); this._interval = null } } this.locked = false }, purgeElement: function(r, s, u) { var p = (YAHOO.lang.isString(r)) ? this.getEl(r) : r; var t = this.getListeners(p, u), q, m; if (t) { for (q = t.length - 1; q > -1; q--) { var o = t[q]; this.removeListener(p, o.type, o.fn) } } if (s && p && p.childNodes) { for (q = 0, m = p.childNodes.length; q < m; ++q) { this.purgeElement(p.childNodes[q], s, u) } } }, getListeners: function(p, m) { var s = [], o; if (!m) { o = [i, j] } else { if (m === "unload") { o = [j] } else { o = [i] } } var u = (YAHOO.lang.isString(p)) ? this.getEl(p) : p; for (var r = 0; r < o.length; r = r + 1) { var w = o[r]; if (w) { for (var t = 0, v = w.length; t < v; ++t) { var q = w[t]; if (q && q[this.EL] === u && (!m || m === q[this.TYPE])) { s.push({ type: q[this.TYPE], fn: q[this.FN], obj: q[this.OBJ], adjust: q[this.OVERRIDE], scope: q[this.ADJ_SCOPE], index: t }) } } } } return (s.length) ? s : null }, _unload: function(u) { var o = YAHOO.util.Event, r, q, p, t, s, v = j.slice(), m; for (r = 0, t = j.length; r < t; ++r) { p = v[r]; if (p) { m = window; if (p[o.ADJ_SCOPE]) { if (p[o.ADJ_SCOPE] === true) { m = p[o.UNLOAD_OBJ] } else { m = p[o.ADJ_SCOPE] } } p[o.FN].call(m, o.getEvent(u, p[o.EL]), p[o.UNLOAD_OBJ]); v[r] = null } } p = null; m = null; j = null; if (i) { for (q = i.length - 1; q > -1; q--) { p = i[q]; if (p) { o.removeListener(p[o.EL], p[o.TYPE], p[o.FN], q) } } p = null } g = null; o._simpleRemove(window, "unload", o._unload) }, _getScrollLeft: function() { return this._getScroll()[1] }, _getScrollTop: function() { return this._getScroll()[0] }, _getScroll: function() { var m = document.documentElement, o = document.body; if (m && (m.scrollTop || m.scrollLeft)) { return [m.scrollTop, m.scrollLeft] } else { if (o) { return [o.scrollTop, o.scrollLeft] } else { return [0, 0] } } }, regCE: function() { }, _simpleAdd: function() { if (window.addEventListener) { return function(p, q, o, m) { p.addEventListener(q, o, (m)) } } else { if (window.attachEvent) { return function(p, q, o, m) { p.attachEvent("on" + q, o) } } else { return function() { } } } } (), _simpleRemove: function() { if (window.removeEventListener) { return function(p, q, o, m) { p.removeEventListener(q, o, (m)) } } else { if (window.detachEvent) { return function(o, p, m) { o.detachEvent("on" + p, m) } } else { return function() { } } } } ()} } (); (function() { var a = YAHOO.util.Event; a.on = a.addListener; a.onFocus = a.addFocusListener; a.onBlur = a.addBlurListener; /* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ if (a.isIE) { YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach, YAHOO.util.Event, true); var b = document.createElement("p"); a._dri = setInterval(function() { try { b.doScroll("left"); clearInterval(a._dri); a._dri = null; a._ready(); b = null } catch (c) { } }, a.POLL_INTERVAL) } else { if (a.webkit && a.webkit < 525) { a._dri = setInterval(function() { var c = document.readyState; if ("loaded" == c || "complete" == c) { clearInterval(a._dri); a._dri = null; a._ready() } }, a.POLL_INTERVAL) } else { a._simpleAdd(document, "DOMContentLoaded", a._ready) } } a._simpleAdd(window, "load", a._load); a._simpleAdd(window, "unload", a._unload); a._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 j = this.__yui_events; if (j[g]) { } else { var h = a.scope || this; var e = (a.silent); var b = new YAHOO.util.CustomEvent(g, h, e, YAHOO.util.CustomEvent.FLAT); j[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 j[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(p, o) { if (!i.shift) { i.shift = false } if (!i.alt) { i.alt = false } if (!i.ctrl) { i.ctrl = false } if (p.shiftKey == i.shift && p.altKey == i.alt && p.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(p); if (j == l) { g.fire(l, p); break } } } else { l = a.getCharCode(p); if (m == l) { g.fire(l, p) } } } } 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: "1796" }); YAHOO.util.Get = function() { var m = {}, l = 0, s = 0, e = false, o = YAHOO.env.ua, t = YAHOO.lang; var j = function(y, u, z) { var v = z || window, A = v.document, B = A.createElement(y); for (var x in u) { if (u[x] && YAHOO.lang.hasOwnProperty(u, x)) { B.setAttribute(x, u[x]) } } return B }; var i = function(u, v, x) { var w = x || "utf-8"; return j("link", { id: "yui__dyn_" + (s++), type: "text/css", charset: w, rel: "stylesheet", href: u }, v) }; var q = function(u, v, x) { var w = x || "utf-8"; return j("script", { id: "yui__dyn_" + (s++), type: "text/javascript", charset: w, src: u }, v) }; var a = function(u, v) { return { tId: u.tId, win: u.win, data: u.data, nodes: u.nodes, msg: v, purge: function() { d(this.tId) } } }; var b = function(u, x) { var v = m[x], w = (t.isString(u)) ? v.win.document.getElementById(u) : u; if (!w) { r(x, "target node not found: " + u) } return w }; var r = function(x, w) { var u = m[x]; if (u.onFailure) { var v = u.scope || u.win; u.onFailure.call(v, a(u, w)) } }; var c = function(x) { var u = m[x]; u.finished = true; if (u.aborted) { var w = "transaction " + x + " was aborted"; r(x, w); return } if (u.onSuccess) { var v = u.scope || u.win; u.onSuccess.call(v, a(u)) } }; var p = function(w) { var u = m[w]; if (u.onTimeout) { var v = u.scope || u; u.onTimeout.call(v, a(u)) } }; var g = function(x, B) { var v = m[x]; if (v.timer) { v.timer.cancel() } if (v.aborted) { var z = "transaction " + x + " was aborted"; r(x, z); return } if (B) { v.url.shift(); if (v.varName) { v.varName.shift() } } else { v.url = (t.isString(v.url)) ? [v.url] : v.url; if (v.varName) { v.varName = (t.isString(v.varName)) ? [v.varName] : v.varName } } var E = v.win, D = E.document, C = D.getElementsByTagName("head")[0], y; if (v.url.length === 0) { if (v.type === "script" && o.webkit && o.webkit < 420 && !v.finalpass && !v.varName) { var A = q(null, v.win, v.charset); A.innerHTML = 'YAHOO.util.Get._finalize("' + x + '");'; v.nodes.push(A); C.appendChild(A) } else { c(x) } return } var u = v.url[0]; if (!u) { v.url.shift(); return g(x) } if (v.timeout) { v.timer = t.later(v.timeout, v, p, x) } if (v.type === "script") { y = q(u, E, v.charset) } else { y = i(u, E, v.charset) } f(v.type, y, x, u, E, v.url.length); v.nodes.push(y); if (v.insertBefore) { var F = b(v.insertBefore, x); if (F) { F.parentNode.insertBefore(y, F) } } else { C.appendChild(y) } if ((o.webkit || o.gecko) && v.type === "css") { g(x, u) } }; var k = function() { if (e) { return } e = true; for (var u in m) { var v = m[u]; if (v.autopurge && v.finished) { d(v.tId); delete m[u] } } e = false }; var d = function(B) { var y = m[B]; if (y) { var A = y.nodes, u = A.length, z = y.win.document, x = z.getElementsByTagName("head")[0]; if (y.insertBefore) { var w = b(y.insertBefore, B); if (w) { x = w.parentNode } } for (var v = 0; v < u; v = v + 1) { x.removeChild(A[v]) } y.nodes = [] } }; var h = function(v, u, w) { var y = "q" + (l++); w = w || {}; if (l % YAHOO.util.Get.PURGE_THRESH === 0) { k() } m[y] = t.merge(w, { tId: y, type: v, url: u, finished: false, aborted: false, nodes: [] }); var x = m[y]; x.win = x.win || window; x.scope = x.scope || x.win; x.autopurge = ("autopurge" in x) ? x.autopurge : (v === "script") ? true : false; t.later(0, x, g, y); return { tId: y} }; var f = function(D, y, x, v, z, A, C) { var B = C || g; if (o.ie) { y.onreadystatechange = function() { var E = this.readyState; if ("loaded" === E || "complete" === E) { y.onreadystatechange = null; B(x, v) } } } else { if (o.webkit) { if (D === "script") { if (o.webkit >= 420) { y.addEventListener("load", function() { B(x, v) }) } else { var u = m[x]; if (u.varName) { var w = YAHOO.util.Get.POLL_FREQ; u.maxattempts = YAHOO.util.Get.TIMEOUT / w; u.attempts = 0; u._cache = u.varName[0].split("."); u.timer = t.later(w, u, function(J) { var G = this._cache, F = G.length, E = this.win, H; for (H = 0; H < F; H = H + 1) { E = E[G[H]]; if (!E) { this.attempts++; if (this.attempts++ > this.maxattempts) { var I = "Over retry limit, giving up"; u.timer.cancel(); r(x, I) } else { } return } } u.timer.cancel(); B(x, v) }, null, true) } else { t.later(YAHOO.util.Get.POLL_FREQ, null, B, [x, v]) } } } } else { y.onload = function() { B(x, v) } } } }; return { POLL_FREQ: 10, PURGE_THRESH: 20, TIMEOUT: 2000, _finalize: function(u) { t.later(0, null, c, u) }, abort: function(v) { var w = (t.isString(v)) ? v : v.tId; var u = m[w]; if (u) { u.aborted = true } }, script: function(u, v) { return h("script", u, v) }, css: function(u, v) { return h("css", u, v) } } } (); YAHOO.register("get", YAHOO.util.Get, { version: "2.7.0", build: "1796" }); if (typeof YAHOO == "undefined" || !YAHOO) { var YAHOO = {} } YAHOO.namespace = function() { var b = arguments, g = null, e, c, f; for (e = 0; e < b.length; e = e + 1) { f = ("" + b[e]).split("."); g = YAHOO; for (c = (f[0] == "YAHOO") ? 1 : 0; c < f.length; c = c + 1) { g[f[c]] = g[f[c]] || {}; g = g[f[c]] } } return g }; 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, f, e) { var k = YAHOO.env.modules, c, j, h, g, d; if (!k[a]) { k[a] = { versions: [], builds: []} } c = k[a]; j = e.version; h = e.build; g = YAHOO.env.listeners; c.name = a; c.version = j; c.build = h; c.versions.push(j); c.builds.push(h); c.mainClass = f; for (d = 0; d < g.length; d = d + 1) { g[d](c) } if (f) { f.VERSION = j; f.BUILD = h } 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(j, h) { var g, l, k; for (g = 0; g < e.length; g = g + 1) { l = e[g]; k = h[l]; if (b.isFunction(k) && k != a[l]) { j[l] = k } } } : function() { }, extend: function(k, l, j) { if (!l || !k) { throw new Error("extend failed, please check that all dependencies are included.") } var h = function() { }, g; h.prototype = l.prototype; k.prototype = new h(); k.prototype.constructor = k; k.superclass = l.prototype; if (l.prototype.constructor == a.constructor) { l.prototype.constructor = l } if (j) { for (g in j) { if (b.hasOwnProperty(j, g)) { k.prototype[g] = j[g] } } b._IEEnumFix(k.prototype, j) } }, augmentObject: function(l, k) { if (!k || !l) { throw new Error("Absorb failed, verify dependencies.") } var g = arguments, j, m, h = g[2]; if (h && h !== true) { for (j = 2; j < g.length; j = j + 1) { l[g[j]] = k[g[j]] } } else { for (m in k) { if (h || !(m in l)) { l[m] = k[m] } } b._IEEnumFix(l, k) } }, augmentProto: function(k, j) { if (!j || !k) { throw new Error("Augment failed, verify dependencies.") } var g = [k.prototype, j.prototype], h; for (h = 2; h < arguments.length; h = h + 1) { g.push(arguments[h]) } b.augmentObject.apply(this, g) }, dump: function(g, m) { var j, l, q = [], r = "{...}", h = "f(){...}", p = ", ", k = " => "; 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 } } } m = (b.isNumber(m)) ? m : 3; if (b.isArray(g)) { q.push("["); for (j = 0, l = g.length; j < l; j = j + 1) { if (b.isObject(g[j])) { q.push((m > 0) ? b.dump(g[j], m - 1) : r) } else { q.push(g[j]) } q.push(p) } if (q.length > 1) { q.pop() } q.push("]") } else { q.push("{"); for (j in g) { if (b.hasOwnProperty(g, j)) { q.push(j + k); if (b.isObject(g[j])) { q.push((m > 0) ? b.dump(g[j], m - 1) : r) } else { q.push(g[j]) } q.push(p) } } if (q.length > 1) { q.pop() } q.push("}") } return q.join("") }, substitute: function(C, h, u) { var q, p, m, y, z, B, x = [], l, r = "dump", w = " ", g = "{", A = "}", t; for (; ; ) { q = C.lastIndexOf(g); if (q < 0) { break } p = C.indexOf(A, q); if (q + 1 >= p) { break } l = C.substring(q + 1, p); y = l; B = null; m = y.indexOf(w); if (m > -1) { B = y.substring(m + 1); y = y.substring(0, m) } z = h[y]; if (u) { z = u(y, z, B) } if (b.isObject(z)) { if (b.isArray(z)) { z = b.dump(z, parseInt(B, 10)) } else { B = B || ""; t = B.indexOf(r); if (t > -1) { B = B.substring(4) } if (z.toString === a.toString || t > -1) { z = b.dump(z, parseInt(B, 10)) } else { z = z.toString() } } } else { if (!b.isString(z) && !b.isNumber(z)) { z = "~-" + x.length + "-~"; x[x.length] = l } } C = C.substring(0, q) + z + C.substring(p + 1) } for (q = x.length - 1; q >= 0; q = q - 1) { C = C.replace(new RegExp("~-" + q + "-~"), "{" + x[q] + "}", "g") } return C }, trim: function(g) { try { return g.replace(/^\s+|\s+$/g, "") } catch (h) { return g } }, merge: function() { var k = {}, h = arguments, g = h.length, j; for (j = 0; j < g; j = j + 1) { b.augmentObject(k, h[j], true) } return k }, later: function(q, h, s, j, k) { q = q || 0; h = h || {}; var i = s, p = j, l, g; if (b.isString(s)) { i = h[s] } if (!i) { throw new TypeError("method undefined") } if (!b.isArray(p)) { p = [j] } l = function() { i.apply(h, p) }; g = (k) ? setInterval(l, q) : setTimeout(l, q); 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: "1796" }); YAHOO.util.Get = function() { var m = {}, l = 0, s = 0, e = false, o = YAHOO.env.ua, t = YAHOO.lang; var j = function(y, u, z) { var v = z || window, A = v.document, B = A.createElement(y); for (var x in u) { if (u[x] && YAHOO.lang.hasOwnProperty(u, x)) { B.setAttribute(x, u[x]) } } return B }; var i = function(u, v, x) { var w = x || "utf-8"; return j("link", { id: "yui__dyn_" + (s++), type: "text/css", charset: w, rel: "stylesheet", href: u }, v) }; var q = function(u, v, x) { var w = x || "utf-8"; return j("script", { id: "yui__dyn_" + (s++), type: "text/javascript", charset: w, src: u }, v) }; var a = function(u, v) { return { tId: u.tId, win: u.win, data: u.data, nodes: u.nodes, msg: v, purge: function() { d(this.tId) } } }; var b = function(u, x) { var v = m[x], w = (t.isString(u)) ? v.win.document.getElementById(u) : u; if (!w) { r(x, "target node not found: " + u) } return w }; var r = function(x, w) { var u = m[x]; if (u.onFailure) { var v = u.scope || u.win; u.onFailure.call(v, a(u, w)) } }; var c = function(x) { var u = m[x]; u.finished = true; if (u.aborted) { var w = "transaction " + x + " was aborted"; r(x, w); return } if (u.onSuccess) { var v = u.scope || u.win; u.onSuccess.call(v, a(u)) } }; var p = function(w) { var u = m[w]; if (u.onTimeout) { var v = u.scope || u; u.onTimeout.call(v, a(u)) } }; var g = function(x, B) { var v = m[x]; if (v.timer) { v.timer.cancel() } if (v.aborted) { var z = "transaction " + x + " was aborted"; r(x, z); return } if (B) { v.url.shift(); if (v.varName) { v.varName.shift() } } else { v.url = (t.isString(v.url)) ? [v.url] : v.url; if (v.varName) { v.varName = (t.isString(v.varName)) ? [v.varName] : v.varName } } var E = v.win, D = E.document, C = D.getElementsByTagName("head")[0], y; if (v.url.length === 0) { if (v.type === "script" && o.webkit && o.webkit < 420 && !v.finalpass && !v.varName) { var A = q(null, v.win, v.charset); A.innerHTML = 'YAHOO.util.Get._finalize("' + x + '");'; v.nodes.push(A); C.appendChild(A) } else { c(x) } return } var u = v.url[0]; if (!u) { v.url.shift(); return g(x) } if (v.timeout) { v.timer = t.later(v.timeout, v, p, x) } if (v.type === "script") { y = q(u, E, v.charset) } else { y = i(u, E, v.charset) } f(v.type, y, x, u, E, v.url.length); v.nodes.push(y); if (v.insertBefore) { var F = b(v.insertBefore, x); if (F) { F.parentNode.insertBefore(y, F) } } else { C.appendChild(y) } if ((o.webkit || o.gecko) && v.type === "css") { g(x, u) } }; var k = function() { if (e) { return } e = true; for (var u in m) { var v = m[u]; if (v.autopurge && v.finished) { d(v.tId); delete m[u] } } e = false }; var d = function(B) { var y = m[B]; if (y) { var A = y.nodes, u = A.length, z = y.win.document, x = z.getElementsByTagName("head")[0]; if (y.insertBefore) { var w = b(y.insertBefore, B); if (w) { x = w.parentNode } } for (var v = 0; v < u; v = v + 1) { x.removeChild(A[v]) } y.nodes = [] } }; var h = function(v, u, w) { var y = "q" + (l++); w = w || {}; if (l % YAHOO.util.Get.PURGE_THRESH === 0) { k() } m[y] = t.merge(w, { tId: y, type: v, url: u, finished: false, aborted: false, nodes: [] }); var x = m[y]; x.win = x.win || window; x.scope = x.scope || x.win; x.autopurge = ("autopurge" in x) ? x.autopurge : (v === "script") ? true : false; t.later(0, x, g, y); return { tId: y} }; var f = function(D, y, x, v, z, A, C) { var B = C || g; if (o.ie) { y.onreadystatechange = function() { var E = this.readyState; if ("loaded" === E || "complete" === E) { y.onreadystatechange = null; B(x, v) } } } else { if (o.webkit) { if (D === "script") { if (o.webkit >= 420) { y.addEventListener("load", function() { B(x, v) }) } else { var u = m[x]; if (u.varName) { var w = YAHOO.util.Get.POLL_FREQ; u.maxattempts = YAHOO.util.Get.TIMEOUT / w; u.attempts = 0; u._cache = u.varName[0].split("."); u.timer = t.later(w, u, function(J) { var G = this._cache, F = G.length, E = this.win, H; for (H = 0; H < F; H = H + 1) { E = E[G[H]]; if (!E) { this.attempts++; if (this.attempts++ > this.maxattempts) { var I = "Over retry limit, giving up"; u.timer.cancel(); r(x, I) } else { } return } } u.timer.cancel(); B(x, v) }, null, true) } else { t.later(YAHOO.util.Get.POLL_FREQ, null, B, [x, v]) } } } } else { y.onload = function() { B(x, v) } } } }; return { POLL_FREQ: 10, PURGE_THRESH: 20, TIMEOUT: 2000, _finalize: function(u) { t.later(0, null, c, u) }, abort: function(v) { var w = (t.isString(v)) ? v : v.tId; var u = m[w]; if (u) { u.aborted = true } }, script: function(u, v) { return h("script", u, v) }, css: function(u, v) { return h("css", u, v) } } } (); YAHOO.register("get", YAHOO.util.Get, { version: "2.7.0", build: "1796" }); (function() { var Y = YAHOO, util = Y.util, lang = Y.lang, env = Y.env, PROV = "_provides", SUPER = "_supersedes", REQ = "expanded", AFTER = "_after"; var YUI = { dupsAllowed: { yahoo: true, get: true }, info: { root: "2.7.0/build/", base: "http://yui.yahooapis.com/2.7.0/build/", comboBase: "http://yui.yahooapis.com/combo?", skin: { defaultSkin: "sam", base: "assets/skins/", path: "skin.css", after: ["reset", "fonts", "grids", "base"], rollup: 3 }, dupsAllowed: ["yahoo", "get"], moduleInfo: { animation: { type: "js", path: "animation/animation-min.js", requires: ["dom", "event"] }, autocomplete: { type: "js", path: "autocomplete/autocomplete-min.js", requires: ["dom", "event", "datasource"], optional: ["connection", "animation"], skinnable: true }, base: { type: "css", path: "base/base-min.css", after: ["reset", "fonts", "grids"] }, button: { type: "js", path: "button/button-min.js", requires: ["element"], optional: ["menu"], skinnable: true }, calendar: { type: "js", path: "calendar/calendar-min.js", requires: ["event", "dom"], skinnable: true }, carousel: { type: "js", path: "carousel/carousel-min.js", requires: ["element"], optional: ["animation"], skinnable: true }, charts: { type: "js", path: "charts/charts-min.js", requires: ["element", "json", "datasource"] }, colorpicker: { type: "js", path: "colorpicker/colorpicker-min.js", requires: ["slider", "element"], optional: ["animation"], skinnable: true }, connection: { type: "js", path: "connection/connection-min.js", requires: ["event"] }, container: { type: "js", path: "container/container-min.js", requires: ["dom", "event"], optional: ["dragdrop", "animation", "connection"], supersedes: ["containercore"], skinnable: true }, containercore: { type: "js", path: "container/container_core-min.js", requires: ["dom", "event"], pkg: "container" }, cookie: { type: "js", path: "cookie/cookie-min.js", requires: ["yahoo"] }, datasource: { type: "js", path: "datasource/datasource-min.js", requires: ["event"], optional: ["connection"] }, datatable: { type: "js", path: "datatable/datatable-min.js", requires: ["element", "datasource"], optional: ["calendar", "dragdrop", "paginator"], skinnable: true }, dom: { type: "js", path: "dom/dom-min.js", requires: ["yahoo"] }, dragdrop: { type: "js", path: "dragdrop/dragdrop-min.js", requires: ["dom", "event"] }, editor: { type: "js", path: "editor/editor-min.js", requires: ["menu", "element", "button"], optional: ["animation", "dragdrop"], supersedes: ["simpleeditor"], skinnable: true }, element: { type: "js", path: "element/element-min.js", requires: ["dom", "event"] }, event: { type: "js", path: "event/event-min.js", requires: ["yahoo"] }, fonts: { type: "css", path: "fonts/fonts-min.css" }, get: { type: "js", path: "get/get-min.js", requires: ["yahoo"] }, grids: { type: "css", path: "grids/grids-min.css", requires: ["fonts"], optional: ["reset"] }, history: { type: "js", path: "history/history-min.js", requires: ["event"] }, imagecropper: { type: "js", path: "imagecropper/imagecropper-min.js", requires: ["dom", "event", "dragdrop", "element", "resize"], skinnable: true }, imageloader: { type: "js", path: "imageloader/imageloader-min.js", requires: ["event", "dom"] }, json: { type: "js", path: "json/json-min.js", requires: ["yahoo"] }, layout: { type: "js", path: "layout/layout-min.js", requires: ["dom", "event", "element"], optional: ["animation", "dragdrop", "resize", "selector"], skinnable: true }, logger: { type: "js", path: "logger/logger-min.js", requires: ["event", "dom"], optional: ["dragdrop"], skinnable: true }, menu: { type: "js", path: "menu/menu-min.js", requires: ["containercore"], skinnable: true }, paginator: { type: "js", path: "paginator/paginator-min.js", requires: ["element"], skinnable: true }, profiler: { type: "js", path: "profiler/profiler-min.js", requires: ["yahoo"] }, profilerviewer: { type: "js", path: "profilerviewer/profilerviewer-min.js", requires: ["profiler", "yuiloader", "element"], skinnable: true }, reset: { type: "css", path: "reset/reset-min.css" }, "reset-fonts-grids": { type: "css", path: "reset-fonts-grids/reset-fonts-grids.css", supersedes: ["reset", "fonts", "grids", "reset-fonts"], rollup: 4 }, "reset-fonts": { type: "css", path: "reset-fonts/reset-fonts.css", supersedes: ["reset", "fonts"], rollup: 2 }, resize: { type: "js", path: "resize/resize-min.js", requires: ["dom", "event", "dragdrop", "element"], optional: ["animation"], skinnable: true }, selector: { type: "js", path: "selector/selector-min.js", requires: ["yahoo", "dom"] }, simpleeditor: { type: "js", path: "editor/simpleeditor-min.js", requires: ["element"], optional: ["containercore", "menu", "button", "animation", "dragdrop"], skinnable: true, pkg: "editor" }, slider: { type: "js", path: "slider/slider-min.js", requires: ["dragdrop"], optional: ["animation"], skinnable: true }, stylesheet: { type: "js", path: "stylesheet/stylesheet-min.js", requires: ["yahoo"] }, tabview: { type: "js", path: "tabview/tabview-min.js", requires: ["element"], optional: ["connection"], skinnable: true }, treeview: { type: "js", path: "treeview/treeview-min.js", requires: ["event", "dom"], optional: ["json"], skinnable: true }, uploader: { type: "js", path: "uploader/uploader.js", requires: ["element"] }, utilities: { type: "js", path: "utilities/utilities.js", supersedes: ["yahoo", "event", "dragdrop", "animation", "dom", "connection", "element", "yahoo-dom-event", "get", "yuiloader", "yuiloader-dom-event"], rollup: 8 }, yahoo: { type: "js", path: "yahoo/yahoo-min.js" }, "yahoo-dom-event": { type: "js", path: "yahoo-dom-event/yahoo-dom-event.js", supersedes: ["yahoo", "event", "dom"], rollup: 3 }, yuiloader: { type: "js", path: "yuiloader/yuiloader-min.js", supersedes: ["yahoo", "get"] }, "yuiloader-dom-event": { type: "js", path: "yuiloader-dom-event/yuiloader-dom-event.js", supersedes: ["yahoo", "dom", "event", "get", "yuiloader", "yahoo-dom-event"], rollup: 5 }, yuitest: { type: "js", path: "yuitest/yuitest-min.js", requires: ["logger"], skinnable: true}} }, ObjectUtil: { appendArray: function(o, a) { if (a) { for (var i = 0; i < a.length; i = i + 1) { o[a[i]] = true } } }, keys: function(o, ordered) { var a = [], i; for (i in o) { if (lang.hasOwnProperty(o, i)) { a.push(i) } } return a } }, ArrayUtil: { appendArray: function(a1, a2) { Array.prototype.push.apply(a1, a2) }, indexOf: function(a, val) { for (var i = 0; i < a.length; i = i + 1) { if (a[i] === val) { return i } } return -1 }, toObject: function(a) { var o = {}; for (var i = 0; i < a.length; i = i + 1) { o[a[i]] = true } return o }, uniq: function(a) { return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a)) } } }; YAHOO.util.YUILoader = function(o) { this._internalCallback = null; this._useYahooListener = false; this.onSuccess = null; this.onFailure = Y.log; this.onProgress = null; this.onTimeout = null; this.scope = this; this.data = null; this.insertBefore = null; this.charset = null; this.varName = null; this.base = YUI.info.base; this.comboBase = YUI.info.comboBase; this.combine = false; this.root = YUI.info.root; this.timeout = 0; this.ignore = null; this.force = null; this.allowRollup = true; this.filter = null; this.required = {}; this.moduleInfo = lang.merge(YUI.info.moduleInfo); this.rollups = null; this.loadOptional = false; this.sorted = []; this.loaded = {}; this.dirty = true; this.inserted = {}; var self = this; env.listeners.push(function(m) { if (self._useYahooListener) { self.loadNext(m.name) } }); this.skin = lang.merge(YUI.info.skin); this._config(o) }; Y.util.YUILoader.prototype = { FILTERS: { RAW: { searchExp: "-min\\.js", replaceStr: ".js" }, DEBUG: { searchExp: "-min\\.js", replaceStr: "-debug.js"} }, SKIN_PREFIX: "skin-", _config: function(o) { if (o) { for (var i in o) { if (lang.hasOwnProperty(o, i)) { if (i == "require") { this.require(o[i]) } else { this[i] = o[i] } } } } var f = this.filter; if (lang.isString(f)) { f = f.toUpperCase(); if (f === "DEBUG") { this.require("logger") } if (!Y.widget.LogWriter) { Y.widget.LogWriter = function() { return Y } } this.filter = this.FILTERS[f] } }, addModule: function(o) { if (!o || !o.name || !o.type || (!o.path && !o.fullpath)) { return false } o.ext = ("ext" in o) ? o.ext : true; o.requires = o.requires || []; this.moduleInfo[o.name] = o; this.dirty = true; return true }, require: function(what) { var a = (typeof what === "string") ? arguments : what; this.dirty = true; YUI.ObjectUtil.appendArray(this.required, a) }, _addSkin: function(skin, mod) { var name = this.formatSkin(skin), info = this.moduleInfo, sinf = this.skin, ext = info[mod] && info[mod].ext; if (!info[name]) { this.addModule({ name: name, type: "css", path: sinf.base + skin + "/" + sinf.path, after: sinf.after, rollup: sinf.rollup, ext: ext }) } if (mod) { name = this.formatSkin(skin, mod); if (!info[name]) { var mdef = info[mod], pkg = mdef.pkg || mod; this.addModule({ name: name, type: "css", after: sinf.after, path: pkg + "/" + sinf.base + skin + "/" + mod + ".css", ext: ext }) } } return name }, getRequires: function(mod) { if (!mod) { return [] } if (!this.dirty && mod.expanded) { return mod.expanded } mod.requires = mod.requires || []; var i, d = [], r = mod.requires, o = mod.optional, info = this.moduleInfo, m; for (i = 0; i < r.length; i = i + 1) { d.push(r[i]); m = info[r[i]]; YUI.ArrayUtil.appendArray(d, this.getRequires(m)) } if (o && this.loadOptional) { for (i = 0; i < o.length; i = i + 1) { d.push(o[i]); YUI.ArrayUtil.appendArray(d, this.getRequires(info[o[i]])) } } mod.expanded = YUI.ArrayUtil.uniq(d); return mod.expanded }, getProvides: function(name, notMe) { var addMe = !(notMe), ckey = (addMe) ? PROV : SUPER, m = this.moduleInfo[name], o = {}; if (!m) { return o } if (m[ckey]) { return m[ckey] } var s = m.supersedes, done = {}, me = this; var add = function(mm) { if (!done[mm]) { done[mm] = true; lang.augmentObject(o, me.getProvides(mm)) } }; if (s) { for (var i = 0; i < s.length; i = i + 1) { add(s[i]) } } m[SUPER] = o; m[PROV] = lang.merge(o); m[PROV][name] = true; return m[ckey] }, calculate: function(o) { if (o || this.dirty) { this._config(o); this._setup(); this._explode(); if (this.allowRollup) { this._rollup() } this._reduce(); this._sort(); this.dirty = false } }, _setup: function() { var info = this.moduleInfo, name, i, j; for (name in info) { if (lang.hasOwnProperty(info, name)) { var m = info[name]; if (m && m.skinnable) { var o = this.skin.overrides, smod; if (o && o[name]) { for (i = 0; i < o[name].length; i = i + 1) { smod = this._addSkin(o[name][i], name) } } else { smod = this._addSkin(this.skin.defaultSkin, name) } m.requires.push(smod) } } } var l = lang.merge(this.inserted); if (!this._sandbox) { l = lang.merge(l, env.modules) } if (this.ignore) { YUI.ObjectUtil.appendArray(l, this.ignore) } if (this.force) { for (i = 0; i < this.force.length; i = i + 1) { if (this.force[i] in l) { delete l[this.force[i]] } } } for (j in l) { if (lang.hasOwnProperty(l, j)) { lang.augmentObject(l, this.getProvides(j)) } } this.loaded = l }, _explode: function() { var r = this.required, i, mod; for (i in r) { if (lang.hasOwnProperty(r, i)) { mod = this.moduleInfo[i]; if (mod) { var req = this.getRequires(mod); if (req) { YUI.ObjectUtil.appendArray(r, req) } } } } }, _skin: function() { }, formatSkin: function(skin, mod) { var s = this.SKIN_PREFIX + skin; if (mod) { s = s + "-" + mod } return s }, parseSkin: function(mod) { if (mod.indexOf(this.SKIN_PREFIX) === 0) { var a = mod.split("-"); return { skin: a[1], module: a[2]} } return null }, _rollup: function() { var i, j, m, s, rollups = {}, r = this.required, roll, info = this.moduleInfo; if (this.dirty || !this.rollups) { for (i in info) { if (lang.hasOwnProperty(info, i)) { m = info[i]; if (m && m.rollup) { rollups[i] = m } } } this.rollups = rollups } for (; ; ) { var rolled = false; for (i in rollups) { if (!r[i] && !this.loaded[i]) { m = info[i]; s = m.supersedes; roll = false; if (!m.rollup) { continue } var skin = (m.ext) ? false : this.parseSkin(i), c = 0; if (skin) { for (j in r) { if (lang.hasOwnProperty(r, j)) { if (i !== j && this.parseSkin(j)) { c++; roll = (c >= m.rollup); if (roll) { break } } } } } else { for (j = 0; j < s.length; j = j + 1) { if (this.loaded[s[j]] && (!YUI.dupsAllowed[s[j]])) { roll = false; break } else { if (r[s[j]]) { c++; roll = (c >= m.rollup); if (roll) { break } } } } } if (roll) { r[i] = true; rolled = true; this.getRequires(m) } } } if (!rolled) { break } } }, _reduce: function() { var i, j, s, m, r = this.required; for (i in r) { if (i in this.loaded) { delete r[i] } else { var skinDef = this.parseSkin(i); if (skinDef) { if (!skinDef.module) { var skin_pre = this.SKIN_PREFIX + skinDef.skin; for (j in r) { if (lang.hasOwnProperty(r, j)) { m = this.moduleInfo[j]; var ext = m && m.ext; if (!ext && j !== i && j.indexOf(skin_pre) > -1) { delete r[j] } } } } } else { m = this.moduleInfo[i]; s = m && m.supersedes; if (s) { for (j = 0; j < s.length; j = j + 1) { if (s[j] in r) { delete r[s[j]] } } } } } } }, _onFailure: function(msg) { YAHOO.log("Failure", "info", "loader"); var f = this.onFailure; if (f) { f.call(this.scope, { msg: "failure: " + msg, data: this.data, success: false }) } }, _onTimeout: function() { YAHOO.log("Timeout", "info", "loader"); var f = this.onTimeout; if (f) { f.call(this.scope, { msg: "timeout", data: this.data, success: false }) } }, _sort: function() { var s = [], info = this.moduleInfo, loaded = this.loaded, checkOptional = !this.loadOptional, me = this; var requires = function(aa, bb) { var mm = info[aa]; if (loaded[bb] || !mm) { return false } var ii, rr = mm.expanded, after = mm.after, other = info[bb], optional = mm.optional; if (rr && YUI.ArrayUtil.indexOf(rr, bb) > -1) { return true } if (after && YUI.ArrayUtil.indexOf(after, bb) > -1) { return true } if (checkOptional && optional && YUI.ArrayUtil.indexOf(optional, bb) > -1) { return true } var ss = info[bb] && info[bb].supersedes; if (ss) { for (ii = 0; ii < ss.length; ii = ii + 1) { if (requires(aa, ss[ii])) { return true } } } if (mm.ext && mm.type == "css" && !other.ext && other.type == "css") { return true } return false }; for (var i in this.required) { if (lang.hasOwnProperty(this.required, i)) { s.push(i) } } var p = 0; for (; ; ) { var l = s.length, a, b, j, k, moved = false; for (j = p; j < l; j = j + 1) { a = s[j]; for (k = j + 1; k < l; k = k + 1) { if (requires(a, s[k])) { b = s.splice(k, 1); s.splice(j, 0, b[0]); moved = true; break } } if (moved) { break } else { p = p + 1 } } if (!moved) { break } } this.sorted = s }, toString: function() { var o = { type: "YUILoader", base: this.base, filter: this.filter, required: this.required, loaded: this.loaded, inserted: this.inserted }; lang.dump(o, 1) }, _combine: function() { this._combining = []; var self = this, s = this.sorted, len = s.length, js = this.comboBase, css = this.comboBase, target, startLen = js.length, i, m, type = this.loadType; YAHOO.log("type " + type); for (i = 0; i < len; i = i + 1) { m = this.moduleInfo[s[i]]; if (m && !m.ext && (!type || type === m.type)) { target = this.root + m.path; target += "&"; if (m.type == "js") { js += target } else { css += target } this._combining.push(s[i]) } } if (this._combining.length) { YAHOO.log("Attempting to combine: " + this._combining, "info", "loader"); var callback = function(o) { var c = this._combining, len = c.length, i, m; for (i = 0; i < len; i = i + 1) { this.inserted[c[i]] = true } this.loadNext(o.data) }, loadScript = function() { if (js.length > startLen) { YAHOO.util.Get.script(self._filter(js), { data: self._loading, onSuccess: callback, onFailure: self._onFailure, onTimeout: self._onTimeout, insertBefore: self.insertBefore, charset: self.charset, timeout: self.timeout, scope: self }) } }; if (css.length > startLen) { YAHOO.util.Get.css(this._filter(css), { data: this._loading, onSuccess: loadScript, onFailure: this._onFailure, onTimeout: this._onTimeout, insertBefore: this.insertBefore, charset: this.charset, timeout: this.timeout, scope: self }) } else { loadScript() } return } else { this.loadNext(this._loading) } }, insert: function(o, type) { this.calculate(o); this._loading = true; this.loadType = type; if (this.combine) { return this._combine() } if (!type) { var self = this; this._internalCallback = function() { self._internalCallback = null; self.insert(null, "js") }; this.insert(null, "css"); return } this.loadNext() }, sandbox: function(o, type) { this._config(o); if (!this.onSuccess) { throw new Error("You must supply an onSuccess handler for your sandbox") } this._sandbox = true; var self = this; if (!type || type !== "js") { this._internalCallback = function() { self._internalCallback = null; self.sandbox(null, "js") }; this.insert(null, "css"); return } if (!util.Connect) { var ld = new YAHOO.util.YUILoader(); ld.insert({ base: this.base, filter: this.filter, require: "connection", insertBefore: this.insertBefore, charset: this.charset, onSuccess: function() { this.sandbox(null, "js") }, scope: this }, "js"); return } this._scriptText = []; this._loadCount = 0; this._stopCount = this.sorted.length; this._xhr = []; this.calculate(); var s = this.sorted, l = s.length, i, m, url; for (i = 0; i < l; i = i + 1) { m = this.moduleInfo[s[i]]; if (!m) { this._onFailure("undefined module " + m); for (var j = 0; j < this._xhr.length; j = j + 1) { this._xhr[j].abort() } return } if (m.type !== "js") { this._loadCount++; continue } url = m.fullpath; url = (url) ? this._filter(url) : this._url(m.path); var xhrData = { success: function(o) { var idx = o.argument[0], name = o.argument[2]; this._scriptText[idx] = o.responseText; if (this.onProgress) { this.onProgress.call(this.scope, { name: name, scriptText: o.responseText, xhrResponse: o, data: this.data }) } this._loadCount++; if (this._loadCount >= this._stopCount) { var v = this.varName || "YAHOO"; var t = "(function() {\n"; var b = "\nreturn " + v + ";\n})();"; var ref = eval(t + this._scriptText.join("\n") + b); this._pushEvents(ref); if (ref) { this.onSuccess.call(this.scope, { reference: ref, data: this.data }) } else { this._onFailure.call(this.varName + " reference failure") } } }, failure: function(o) { this.onFailure.call(this.scope, { msg: "XHR failure", xhrResponse: o, data: this.data }) }, scope: this, argument: [i, url, s[i]] }; this._xhr.push(util.Connect.asyncRequest("GET", url, xhrData)) } }, loadNext: function(mname) { if (!this._loading) { return } if (mname) { if (mname !== this._loading) { return } this.inserted[mname] = true; if (this.onProgress) { this.onProgress.call(this.scope, { name: mname, data: this.data }) } } var s = this.sorted, len = s.length, i, m; for (i = 0; i < len; i = i + 1) { if (s[i] in this.inserted) { continue } if (s[i] === this._loading) { return } m = this.moduleInfo[s[i]]; if (!m) { this.onFailure.call(this.scope, { msg: "undefined module " + m, data: this.data }); return } if (!this.loadType || this.loadType === m.type) { this._loading = s[i]; var fn = (m.type === "css") ? util.Get.css : util.Get.script, url = m.fullpath, self = this, c = function(o) { self.loadNext(o.data) }; url = (url) ? this._filter(url) : this._url(m.path); if (env.ua.webkit && env.ua.webkit < 420 && m.type === "js" && !m.varName) { c = null; this._useYahooListener = true } fn(url, { data: s[i], onSuccess: c, onFailure: this._onFailure, onTimeout: this._onTimeout, insertBefore: this.insertBefore, charset: this.charset, timeout: this.timeout, varName: m.varName, scope: self }); return } } this._loading = null; if (this._internalCallback) { var f = this._internalCallback; this._internalCallback = null; f.call(this) } else { if (this.onSuccess) { this._pushEvents(); this.onSuccess.call(this.scope, { data: this.data }) } } }, _pushEvents: function(ref) { var r = ref || YAHOO; if (r.util && r.util.Event) { r.util.Event._load() } }, _filter: function(str) { var f = this.filter; return (f) ? str.replace(new RegExp(f.searchExp, "g"), f.replaceStr) : str }, _url: function(path) { return this._filter((this.base || "") + path) } } })(); YAHOO.register("yuiloader", YAHOO.util.YUILoader, { version: "2.7.0", build: "1796" }); 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: {}, _isFormSubmit: false, _isFileUpload: false, _formNode: null, _sFormData: null, _poll: {}, _timeOut: {}, _polling_interval: 50, _transaction_id: 0, _submitElementValue: null, _hasSubmitListener: (function() { if (YAHOO.util.Event) { YAHOO.util.Event.addListener(document, "click", function(c) { var b = YAHOO.util.Event.getTarget(c), a = b.nodeName.toLowerCase(); if ((a === "input" || a === "button") && (b.type && b.type.toLowerCase() == "submit")) { YAHOO.util.Connect._submitElementValue = encodeURIComponent(b.name) + "=" + encodeURIComponent(b.value) } }); return true } return false })(), startEvent: new YAHOO.util.CustomEvent("start"), completeEvent: new YAHOO.util.CustomEvent("complete"), successEvent: new YAHOO.util.CustomEvent("success"), failureEvent: new YAHOO.util.CustomEvent("failure"), uploadEvent: new YAHOO.util.CustomEvent("upload"), 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(g) { var f, a; try { a = new XMLHttpRequest(); f = { conn: a, tId: g} } catch (d) { for (var b = 0; b < this._msxml_progid.length; ++b) { try { a = new ActiveXObject(this._msxml_progid[b]); f = { conn: a, tId: g }; break } catch (c) { } } } finally { return f } }, getConnectionObject: function(a) { var c; var d = this._transaction_id; try { if (!a) { c = this.createXhrObject(d) } else { c = {}; c.tId = d; c.isUpload = true } if (c) { this._transaction_id++ } } catch (b) { } finally { return c } }, asyncRequest: function(f, c, e, a) { var d = (this._isFileUpload) ? this.getConnectionObject(true) : this.getConnectionObject(); var b = (e && e.argument) ? e.argument : null; if (!d) { return null } else { if (e && e.customevents) { this.initCustomEvents(d, e) } if (this._isFormSubmit) { if (this._isFileUpload) { this.uploadFile(d, e, c, a); return d } if (f.toUpperCase() == "GET") { if (this._sFormData.length !== 0) { c += ((c.indexOf("?") == -1) ? "?" : "&") + this._sFormData } } else { if (f.toUpperCase() == "POST") { a = a ? this._sFormData + "&" + a : this._sFormData } } } if (f.toUpperCase() == "GET" && (e && e.cache === false)) { c += ((c.indexOf("?") == -1) ? "?" : "&") + "rnd=" + new Date().valueOf().toString() } d.conn.open(f, c, true); if (this._use_default_xhr_header) { if (!this._default_headers["X-Requested-With"]) { this.initHeader("X-Requested-With", this._default_xhr_header, true) } } if ((f.toUpperCase() === "POST" && this._use_default_post_header) && this._isFormSubmit === false) { this.initHeader("Content-Type", this._default_post_header) } if (this._has_default_headers || this._has_http_headers) { this.setHeader(d) } this.handleReadyState(d, e); d.conn.send(a || ""); if (this._isFormSubmit === true) { this.resetFormState() } this.startEvent.fire(d, b); if (d.startEvent) { d.startEvent.fire(d, b) } return d } }, 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; var 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(g, h, a) { var d, c; var b = (h && h.argument) ? h.argument : null; try { if (g.conn.status !== undefined && g.conn.status !== 0) { d = g.conn.status } else { d = 13030 } } catch (f) { d = 13030 } if (d >= 200 && d < 300 || d === 1223) { c = this.createResponseObject(g, b); if (h && h.success) { if (!h.scope) { h.success(c) } else { h.success.apply(h.scope, [c]) } } this.successEvent.fire(c); if (g.successEvent) { g.successEvent.fire(c) } } else { switch (d) { case 12002: case 12029: case 12030: case 12031: case 12152: case 13030: c = this.createExceptionObject(g.tId, b, (a ? a : false)); if (h && h.failure) { if (!h.scope) { h.failure(c) } else { h.failure.apply(h.scope, [c]) } } break; default: c = this.createResponseObject(g, b); if (h && h.failure) { if (!h.scope) { h.failure(c) } else { h.failure.apply(h.scope, [c]) } } } this.failureEvent.fire(c); if (g.failureEvent) { g.failureEvent.fire(c) } } this.releaseObject(g); c = null }, createResponseObject: function(a, h) { var d = {}; var k = {}; try { var c = a.conn.getAllResponseHeaders(); var g = c.split("\n"); for (var f = 0; f < g.length; f++) { var b = g[f].indexOf(":"); if (b != -1) { k[g[f].substring(0, b)] = g[f].substring(b + 2) } } } catch (j) { } 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 = k; d.getAllResponseHeaders = c; d.responseText = a.conn.responseText; d.responseXML = a.conn.responseXML; if (h) { d.argument = h } return d }, createExceptionObject: function(h, d, a) { var f = 0; var g = "communication failure"; var c = -1; var b = "transaction aborted"; var 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]) } } delete this._http_headers; this._http_headers = {}; this._has_http_headers = false } }, resetDefaultHeaders: function() { delete this._default_headers; this._default_headers = {}; this._has_default_headers = false }, setForm: function(p, h, c) { var o, b, m, k, s, l = false, f = [], r = 0, e, g, d, q, a; this.resetFormState(); if (typeof p == "string") { o = (document.getElementById(p) || document.forms[p]) } else { if (typeof p == "object") { o = p } else { return } } if (h) { this.createFrame(c ? c : null); this._isFormSubmit = true; this._isFileUpload = true; this._formNode = o; return } for (e = 0, g = o.elements.length; e < g; ++e) { b = o.elements[e]; s = b.disabled; m = b.name; if (!s && m) { m = encodeURIComponent(m) + "="; k = encodeURIComponent(b.value); switch (b.type) { case "select-one": if (b.selectedIndex > -1) { a = b.options[b.selectedIndex]; f[r++] = m + encodeURIComponent((a.attributes.value && a.attributes.value.specified) ? a.value : a.text) } break; case "select-multiple": if (b.selectedIndex > -1) { for (d = b.selectedIndex, q = b.options.length; d < q; ++d) { a = b.options[d]; if (a.selected) { f[r++] = m + encodeURIComponent((a.attributes.value && a.attributes.value.specified) ? a.value : a.text) } } } break; case "radio": case "checkbox": if (b.checked) { f[r++] = m + k } break; case "file": case undefined: case "reset": case "button": break; case "submit": if (l === false) { if (this._hasSubmitListener && this._submitElementValue) { f[r++] = this._submitElementValue } l = true } break; default: f[r++] = m + k } } } this._isFormSubmit = true; this._sFormData = f.join("&"); this.initHeader("Content-Type", this._default_form_header); return this._sFormData }, resetFormState: function() { this._isFormSubmit = false; this._isFileUpload = false; this._formNode = null; this._sFormData = "" }, createFrame: function(a) { var b = "yuiIO" + this._transaction_id; var c; if (YAHOO.env.ua.ie) { c = document.createElement('