You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AiShopping/AiGouWu\Content\Javascript\...

13 lines
188 KiB

11 months ago
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(th
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.getLegacyInde
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) { r
YAHOO.util.Easing = { easeNone: function(e, a, g, f) { return g * e / f + a }, easeIn: function(e, a, g, f) { return g * (e /= f) * e + a }, easeOut: function(e, a, g, f) { return -g * (e /= f) * (e - 2) + a }, easeBoth: function(e, a, g, f) { if ((e /= f / 2) < 1) { return g / 2 * e * e + a } return -g / 2 * ((--e) * (e - 2) - 1) + a }, easeInStrong: function(e, a, g, f) { return g * (e /= f) * e * e * e + a }, easeOutStrong: function(e, a, g, f) { return -g * ((e = e / f - 1) * e * e * e - 1) + a }, easeBothStrong: function(e, a, g, f) { if ((e /= f / 2) < 1) { return g / 2 * e * e * e * e + a } return -g / 2 * ((e -= 2) * e * e * e - 2) + a }, elasticIn: function(g, e, k, j, f, i) { if (g == 0) { return e } if ((g /= j) == 1) { return e + k } if (!i) { i = j * 0.3 } if (!f || f < Math.abs(k)) { f = k; var h = i / 4 } else { var h = i / (2 * Math.PI) * Math.asin(k / f) } return -(f * Math.pow(2, 10 * (g -= 1)) * Math.sin((g * j - h) * (2 * Math.PI) / i)) + e }, elasticOut: function(g, e, k, j, f, i) { if (g == 0) { return e } if ((g /= j) == 1) { return e + k } if (!i) { i = j * 0.3 } if (!f || f < Math.abs(k)) { f = k; var h = i / 4 } else { var h = i / (2 * Math.PI) * Math.asin(k / f) } return f * Math.pow(2, -10 * g) * Math.sin((g * j - h) * (2 * Math.PI) / i) + k + e }, elasticBoth: function(g, e, k, j, f, i) { if (g == 0) { return e } if ((g /= j / 2) == 2) { return e + k } if (!i) { i = j * (0.3 * 1.5) } if (!f || f < Math.abs(k)) { f = k; var h = i / 4 } else { var h = i / (2 * Math.PI) * Math.asin(k / f) } if (g < 1) { return -0.5 * (f * Math.pow(2, 10 * (g -= 1)) * Math.sin((g * j - h) * (2 * Math.PI) / i)) + e } return f * Math.pow(2, -10 * (g -= 1)) * Math.sin((g * j - h) * (2 * Math.PI) / i) * 0.5 + k + e }, backIn: function(e, a, h, g, f) { if (typeof f == "undefined") { f = 1.70158 } return h * (e /= g) * e * ((f + 1) * e - f) + a }, backOut: function(e, a, h, g, f) { if (typeof f == "undefined") { f = 1.70158 } return h * ((e = e / g - 1) * e * ((f + 1) * e + f) + 1) + a }, backBoth: function(e, a, h, g, f) { if (typeof f == "undefined") { f = 1.70158 } if ((e /= g / 2) < 1) { return h / 2 * (e * e * (((f *= (1.525)) + 1) * e - f)) + a } return h / 2 * ((e -= 2) * e * (((f *= (1.525)) + 1) * e + f) + 2) + a }, bounceIn: function(e, a, g, f) { return g - YAHOO.util.Easing.bounceOut(f - e, 0, g, f) + a }, bounceOut: function(e, a, g, f) { if ((e /= f) < (1 / 2.75)) { return g * (7.5625 * e * e) + a } else { if (e < (2 / 2.75)) { return g * (7.5625 * (e -= (1.5 / 2.75)) * e + 0.75) + a } else { if (e < (2.5 / 2.75)) { return g * (7.5625 * (e -= (2.25 / 2.75)) * e + 0.9375) + a } } } return g * (7.5625 * (e -= (2.625 / 2.75)) * e + 0.984375) + a }, bounceBoth: function(e, a, g, f) { if (e < f / 2) { return YAHOO.util.Easing.bounceIn(e * 2, 0, g, f) * 0.5 + a } return YAHOO.util.Easing.bounceOut(e * 2 - f, 0, g, f) * 0.5 + g * 0.5 + a } }; (function() { var a = function(h, g, i, j) { if (h) { a.superclass.constructor.call(this, h, g, i, j) } }; a.NAME = "Motion"; var e = YAHOO.util; YAHOO.extend(a, e.ColorAnim); var f = a.superclass; var c = a.prototype; c.patterns.points = /^points$/i; c.setAttribute = function(g, i, h) { if (this.patterns.points.test(g)) { h = h || "px"; f.setAttribute.call(this, "left", i[0], h); f.setAttribute.call(this, "top", i[1], h) } else { f.setAttribute.call(this, g, i, h) } }; c.getAttribute = function(g) { if (this.patterns.points.test(g)) { var h = [f.getAttribute.call(this, "left"), f.getAttribute.call(this, "top")] } else { h = f.getAttribute.call(this, g) } return h }; c.doMethod = function(g, k, h) { var j = null; if (this.patterns.points.test(g)) { var i = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100; j = e.Bezier.getPosition(this.runtimeAttributes[g], i) } else { j = f.doMethod.call(this, g, k, h) } return j }; c.setRuntimeAttribute = function(r) { if (this.patterns.points.test(r)) { var h = this.getEl(); var k = this.attributes; var g; var m = k.points["control"] || []; var j; var o, q; if (m.length > 0 && !(m[0] instanceof Array)) { m = [m] } else { va
if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(c, b) { if (b == null) { b = 0 } else { if (b < 0) { b = Math.max(0, this.length + b) } } for (var a = b; a < this.length; a++) { if (this[a] === c) { return a } } return -1 } } if (!Array.prototype.lastIndexOf) { Array.prototype.lastIndexOf = function(c, b) { if (b == null) { b = this.length - 1 } else { if (b < 0) { b = Math.max(0, this.length + b) } } for (var a = b; a >= 0; a--) { if (this[a] === c) { return a } } return -1 } } if (!Array.prototype.forEach) { Array.prototype.forEach = function(b) { var a = this.length; if (typeof b != "function") { throw new TypeError() } var d = arguments[1]; for (var c = 0; c < a; c++) { if (c in this) { b.call(d, this[c], c, this) } } } } if (!Array.prototype.filter) { Array.prototype.filter = function(b) { var a = this.length; if (typeof b != "function") { throw new TypeError() } var e = []; var d = arguments[1]; for (var c = 0; c < a; c++) { if (c in this) { var f = this[c]; if (b.call(d, f, c, this)) { e.push(f) } } } return e } } if (!Array.prototype.map) { Array.prototype.map = function(b) { var a = this.length; if (typeof b != "function") { throw new TypeError() } var e = new Array(a); var d = arguments[1]; for (var c = 0; c < a; c++) { if (c in this) { e[c] = b.call(d, this[c], c, this) } } return e } } if (!Array.prototype.some) { Array.prototype.some = function(b) { var a = this.length; if (typeof b != "function") { throw new TypeError() } var d = arguments[1]; for (var c = 0; c < a; c++) { if (c in this && b.call(d, this[c], c, this)) { return true } } return false } } if (!Array.prototype.every) { Array.prototype.every = function(b) { var a = this.length; if (typeof b != "function") { throw new TypeError() } var d = arguments[1]; for (var c = 0; c < a; c++) { if (c in this && !b.call(d, this[c], c, this)) { return false } } return true } } Array.prototype.copy = function() { var a = this.length; var c = new Array(a); for (var b = 0; b < a; b++) { c[b] = this[b] } return c }; Array.prototype.remove = function(a) { var b = this.indexOf(a); return (b != -1) ? this.splice(b, 1) : false }; (function() { ["indexOf", "lastIndexOf", "forEach", "filter", "map", "some", "every", "copy"].forEach(function(a) { if (!Array[a]) { Array[a] = function(b) { return Array.prototype[a].apply(b, Array.prototype.slice.call(arguments, 1)) } } }) })(); if (!String.prototype.toQueryParams) { String.prototype.toQueryParams = function() { var f = {}; var g = this.split("&"); var d = /([^=]*)=(.*)/; for (var b = 0; b < g.length; b++) { var a = d.exec(g[b]); if (!a) { continue } var c = decodeURIComponent(a[1]); var e = a[2] ? decodeURIComponent(a[2]) : undefined; if (f[c] !== undefined) { if (f[c].constructor != Array) { f[c] = [f[c]] } if (e) { f[c].push(e) } } else { f[c] = e } } return f } } if (!String.prototype.trim) { String.prototype.trim = function() { var a = /^\s+|\s+$/g; return function() { return this.replace(a, "") } } () } if (!String.prototype.replaceAll) { String.prototype.replaceAll = function(b, a) { return this.replace(new RegExp(b, "gm"), a) } } Math.randomInt = function(a) { return Math.floor(Math.random() * (a + 1)) }; $D = YAHOO.util.Dom; $E = YAHOO.util.Event; $ = $D.get; _prev_TB = window.TB; TB = YAHOO.namespace("TB"); if (_prev_TB) { YAHOO.lang.augmentObject(TB, _prev_TB) } TB.namespace = function() { var a = Array.prototype.slice.call(arguments, 0), b; for (b = 0; b < a.length; ++b) { if (a[b].indexOf("TB") != 0) { a[b] = "TB." + a[b] } } return YAHOO.namespace.apply(null, a) }; TB.namespace("env"); TB.env = { hostname: "taobao.com", debug: false, yuipath: "http://a.tbcdn.cn/yui/2.7.0/", lang: "zh-cn" }; TB.namespace("locale"); TB.locale = { Messages: {}, getMessage: function(a) { return TB.locale.Messages[a] || a }, setMessage: function(a, b) { TB.locale.Messages[a] = b } }; $M = TB.locale.getMessage; TB.trace = function(a) { if (!TB.env.debug) { return } if (window.console) { window.console.debug(a) } else { alert(a) } }; TB.init = function() { this.namespace("widget", "dom", "bom", "util", "form", "an