var cookieDomain='.fifa.com';var baseUrl='http://es.fifa.com';var siteLang='es';var idSplitLen=3;var numWordsComment=100;(function(){var l = this, g, y = l.jQuery, p = l.$, o = l.jQuery = l.$ = function(E, F) { return new o.fn.init(E, F) }, D = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, f = /^.[^:#\[\.,]*$/; o.fn = o.prototype = { init: function(E, H) { E = E || document; if (E.nodeType) { this[0] = E; this.length = 1; this.context = E; return this } if (typeof E === "string") { var G = D.exec(E); if (G && (G[1] || !H)) { if (G[1]) { E = o.clean([G[1]], H) } else { var I = document.getElementById(G[3]); if (I && I.id != G[3]) { return o().find(E) } var F = o(I || []); F.context = document; F.selector = E; return F } } else { return o(H).find(E) } } else { if (o.isFunction(E)) { return o(document).ready(E) } } if (E.selector && E.context) { this.selector = E.selector; this.context = E.context } return this.setArray(o.isArray(E) ? E : o.makeArray(E)) }, selector: "", jquery: "1.3.2", size: function() { return this.length }, get: function(E) { return E === g ? Array.prototype.slice.call(this) : this[E] }, pushStack: function(F, H, E) { var G = o(F); G.prevObject = this; G.context = this.context; if (H === "find") { G.selector = this.selector + (this.selector ? " " : "") + E } else { if (H) { G.selector = this.selector + "." + H + "(" + E + ")" } } return G }, setArray: function(E) { this.length = 0; Array.prototype.push.apply(this, E); return this }, each: function(F, E) { return o.each(this, F, E) }, index: function(E) { return o.inArray(E && E.jquery ? E[0] : E, this) }, attr: function(F, H, G) { var E = F; if (typeof F === "string") { if (H === g) { return this[0] && o[G || "attr"](this[0], F) } else { E = {}; E[F] = H } } return this.each(function(I) { for (F in E) { o.attr(G ? this.style : this, F, o.prop(this, E[F], G, I, F)) } }) }, css: function(E, F) { if ((E == "width" || E == "height") && parseFloat(F) < 0) { F = g } return this.attr(E, F, "curCSS") }, text: function(F) { if (typeof F !== "object" && F != null) { return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(F)) } var E = ""; o.each(F || this, function() { o.each(this.childNodes, function() { if (this.nodeType != 8) { E += this.nodeType != 1 ? this.nodeValue : o.fn.text([this]) } }) }); return E }, wrapAll: function(E) { if (this[0]) { var F = o(E, this[0].ownerDocument).clone(); if (this[0].parentNode) { F.insertBefore(this[0]) } F.map(function() { var G = this; while (G.firstChild) { G = G.firstChild } return G }).append(this) } return this }, wrapInner: function(E) { return this.each(function() { o(this).contents().wrapAll(E) }) }, wrap: function(E) { return this.each(function() { o(this).wrapAll(E) }) }, append: function() { return this.domManip(arguments, true, function(E) { if (this.nodeType == 1) { this.appendChild(E) } }) }, prepend: function() { return this.domManip(arguments, true, function(E) { if (this.nodeType == 1) { this.insertBefore(E, this.firstChild) } }) }, before: function() { return this.domManip(arguments, false, function(E) { this.parentNode.insertBefore(E, this) }) }, after: function() { return this.domManip(arguments, false, function(E) { this.parentNode.insertBefore(E, this.nextSibling) }) }, end: function() { return this.prevObject || o([]) }, push: [].push, sort: [].sort, splice: [].splice, find: function(E) { if (this.length === 1) { var F = this.pushStack([], "find", E); F.length = 0; o.find(E, this[0], F); return F } else { return this.pushStack(o.unique(o.map(this, function(G) { return o.find(E, G) })), "find", E) } }, clone: function(G) { var E = this.map(function() { if (!o.support.noCloneEvent && !o.isXMLDoc(this)) { var I = this.outerHTML; if (!I) { var J = this.ownerDocument.createElement("div"); J.appendChild(this.cloneNode(true)); I = J.innerHTML } return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0] } else { return this.cloneNode(true) } }); if (G === true) { var H = this.find("*").andSelf(), F = 0; E.find("*").andSelf().each(function() { if (this.nodeName !== H[F].nodeName) { return } var I = o.data(H[F], "events"); for (var K in I) { for (var J in I[K]) { o.event.add(this, K, I[K][J], I[K][J].data) } } F++ }) } return E }, filter: function(E) { return this.pushStack(o.isFunction(E) && o.grep(this, function(G, F) { return E.call(G, F) }) || o.multiFilter(E, o.grep(this, function(F) { return F.nodeType === 1 })), "filter", E) }, closest: function(E) { var G = o.expr.match.POS.test(E) ? o(E) : null, F = 0; return this.map(function() { var H = this; while (H && H.ownerDocument) { if (G ? G.index(H) > -1 : o(H).is(E)) { o.data(H, "closest", F); return H } H = H.parentNode; F++ } }) }, not: function(E) { if (typeof E === "string") { if (f.test(E)) { return this.pushStack(o.multiFilter(E, this, true), "not", E) } else { E = o.multiFilter(E, this) } } var F = E.length && E[E.length - 1] !== g && !E.nodeType; return this.filter(function() { return F ? o.inArray(this, E) < 0 : this != E }) }, add: function(E) { return this.pushStack(o.unique(o.merge(this.get(), typeof E === "string" ? o(E) : o.makeArray(E)))) }, is: function(E) { return !!E && o.multiFilter(E, this).length > 0 }, hasClass: function(E) { return !!E && this.is("." + E) }, val: function(K) { if (K === g) { var E = this[0]; if (E) { if (o.nodeName(E, "option")) { return (E.attributes.value || {}).specified ? E.value : E.text } if (o.nodeName(E, "select")) { var I = E.selectedIndex, L = [], M = E.options, H = E.type == "select-one"; if (I < 0) { return null } for (var F = H ? I : 0, J = H ? I + 1 : M.length; F < J; F++) { var G = M[F]; if (G.selected) { K = o(G).val(); if (H) { return K } L.push(K) } } return L } return (E.value || "").replace(/\r/g, "") } return g } if (typeof K === "number") { K += "" } return this.each(function() { if (this.nodeType != 1) { return } if (o.isArray(K) && /radio|checkbox/.test(this.type)) { this.checked = (o.inArray(this.value, K) >= 0 || o.inArray(this.name, K) >= 0) } else { if (o.nodeName(this, "select")) { var N = o.makeArray(K); o("option", this).each(function() { this.selected = (o.inArray(this.value, N) >= 0 || o.inArray(this.text, N) >= 0) }); if (!N.length) { this.selectedIndex = -1 } } else { this.value = K } } }) }, html: function(E) { return E === g ? (this[0] ? this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : null) : this.empty().append(E) }, replaceWith: function(E) { return this.after(E).remove() }, eq: function(E) { return this.slice(E, +E + 1) }, slice: function() { return this.pushStack(Array.prototype.slice.apply(this, arguments), "slice", Array.prototype.slice.call(arguments).join(",")) }, map: function(E) { return this.pushStack(o.map(this, function(G, F) { return E.call(G, F, G) })) }, andSelf: function() { return this.add(this.prevObject) }, domManip: function(J, M, L) { if (this[0]) { var I = (this[0].ownerDocument || this[0]).createDocumentFragment(), F = o.clean(J, (this[0].ownerDocument || this[0]), I), H = I.firstChild; if (H) { for (var G = 0, E = this.length; G < E; G++) { L.call(K(this[G], H), this.length > 1 || G > 0 ? I.cloneNode(true) : I) } } if (F) { o.each(F, z) } } return this; function K(N, O) { return M && o.nodeName(N, "table") && o.nodeName(O, "tr") ? (N.getElementsByTagName("tbody")[0] || N.appendChild(N.ownerDocument.createElement("tbody"))) : N } } }; o.fn.init.prototype = o.fn; function z(E, F) { if (F.src) { o.ajax({ url: F.src, async: false, dataType: "script" }) } else { o.globalEval(F.text || F.textContent || F.innerHTML || "") } if (F.parentNode) { F.parentNode.removeChild(F) } } function e() { return +new Date } o.extend = o.fn.extend = function() { var J = arguments[0] || {}, H = 1, I = arguments.length, E = false, G; if (typeof J === "boolean") { E = J; J = arguments[1] || {}; H = 2 } if (typeof J !== "object" && !o.isFunction(J)) { J = {} } if (I == H) { J = this; --H } for (; H < I; H++) { if ((G = arguments[H]) != null) { for (var F in G) { var K = J[F], L = G[F]; if (J === L) { continue } if (E && L && typeof L === "object" && !L.nodeType) { J[F] = o.extend(E, K || (L.length != null ? [] : {}), L) } else { if (L !== g) { J[F] = L } } } } } return J }; var b = /z-?index|font-?weight|opacity|zoom|line-?height/i, q = document.defaultView || {}, s = Object.prototype.toString; o.extend({ noConflict: function(E) { l.$ = p; if (E) { l.jQuery = y } return o }, isFunction: function(E) { return s.call(E) === "[object Function]" }, isArray: function(E) { return s.call(E) === "[object Array]" }, isXMLDoc: function(E) { return E.nodeType === 9 && E.documentElement.nodeName !== "HTML" || !!E.ownerDocument && o.isXMLDoc(E.ownerDocument) }, globalEval: function(G) { if (G && /\S/.test(G)) { var F = document.getElementsByTagName("head")[0] || document.documentElement, E = document.createElement("script"); E.type = "text/javascript"; if (o.support.scriptEval) { E.appendChild(document.createTextNode(G)) } else { E.text = G } F.insertBefore(E, F.firstChild); F.removeChild(E) } }, nodeName: function(F, E) { return F.nodeName && F.nodeName.toUpperCase() == E.toUpperCase() }, each: function(G, K, F) { var E, H = 0, I = G.length; if (F) { if (I === g) { for (E in G) { if (K.apply(G[E], F) === false) { break } } } else { for (; H < I; ) { if (K.apply(G[H++], F) === false) { break } } } } else { if (I === g) { for (E in G) { if (K.call(G[E], E, G[E]) === false) { break } } } else { for (var J = G[0]; H < I && K.call(J, H, J) !== false; J = G[++H]) { } } } return G }, prop: function(H, I, G, F, E) { if (o.isFunction(I)) { I = I.call(H, F) } return typeof I === "number" && G == "curCSS" && !b.test(E) ? I + "px" : I }, className: { add: function(E, F) { o.each((F || "").split(/\s+/), function(G, H) { if (E.nodeType == 1 && !o.className.has(E.className, H)) { E.className += (E.className ? " " : "") + H } }) }, remove: function(E, F) { if (E.nodeType == 1) { E.className = F !== g ? o.grep(E.className.split(/\s+/), function(G) { return !o.className.has(F, G) }).join(" ") : "" } }, has: function(F, E) { return F && o.inArray(E, (F.className || F).toString().split(/\s+/)) > -1 } }, swap: function(H, G, I) { var E = {}; for (var F in G) { E[F] = H.style[F]; H.style[F] = G[F] } I.call(H); for (var F in G) { H.style[F] = E[F] } }, css: function(H, F, J, E) { if (F == "width" || F == "height") { var L, G = { position: "absolute", visibility: "hidden", display: "block" }, K = F == "width" ? ["Left", "Right"] : ["Top", "Bottom"]; function I() { L = F == "width" ? H.offsetWidth : H.offsetHeight; if (E === "border") { return } o.each(K, function() { if (!E) { L -= parseFloat(o.curCSS(H, "padding" + this, true)) || 0 } if (E === "margin") { L += parseFloat(o.curCSS(H, "margin" + this, true)) || 0 } else { L -= parseFloat(o.curCSS(H, "border" + this + "Width", true)) || 0 } }) } if (H.offsetWidth !== 0) { I() } else { o.swap(H, G, I) } return Math.max(0, Math.round(L)) } return o.curCSS(H, F, J) }, curCSS: function(I, F, G) { var L, E = I.style; if (F == "opacity" && !o.support.opacity) { L = o.attr(E, "opacity"); return L == "" ? "1" : L } if (F.match(/float/i)) { F = w } if (!G && E && E[F]) { L = E[F] } else { if (q.getComputedStyle) { if (F.match(/float/i)) { F = "float" } F = F.replace(/([A-Z])/g, "-$1").toLowerCase(); var M = q.getComputedStyle(I, null); if (M) { L = M.getPropertyValue(F) } if (F == "opacity" && L == "") { L = "1" } } else { if (I.currentStyle) { var J = F.replace(/\-(\w)/g, function(N, O) { return O.toUpperCase() }); L = I.currentStyle[F] || I.currentStyle[J]; if (!/^\d+(px)?$/i.test(L) && /^\d/.test(L)) { var H = E.left, K = I.runtimeStyle.left; I.runtimeStyle.left = I.currentStyle.left; E.left = L || 0; L = E.pixelLeft + "px"; E.left = H; I.runtimeStyle.left = K } } } } return L }, clean: function(F, K, I) { K = K || document; if (typeof K.createElement === "undefined") { K = K.ownerDocument || K[0] && K[0].ownerDocument || document } if (!I && F.length === 1 && typeof F[0] === "string") { var H = /^<(\w+)\s*\/?>$/.exec(F[0]); if (H) { return [K.createElement(H[1])] } } var G = [], E = [], L = K.createElement("div"); o.each(F, function(P, S) { if (typeof S === "number") { S += "" } if (!S) { return } if (typeof S === "string") { S = S.replace(/(<(\w+)[^>]*?)\/>/g, function(U, V, T) { return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? U : V + "></" + T + ">" }); var O = S.replace(/^\s+/, "").substring(0, 10).toLowerCase(); var Q = !O.indexOf("<opt") && [1, "<select multiple='multiple'>", "</select>"] || !O.indexOf("<leg") && [1, "<fieldset>", "</fieldset>"] || O.match(/^<(thead|tbody|tfoot|colg|cap)/) && [1, "<table>", "</table>"] || !O.indexOf("<tr") && [2, "<table><tbody>", "</tbody></table>"] || (!O.indexOf("<td") || !O.indexOf("<th")) && [3, "<table><tbody><tr>", "</tr></tbody></table>"] || !O.indexOf("<col") && [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] || !o.support.htmlSerialize && [1, "div<div>", "</div>"] || [0, "", ""]; L.innerHTML = Q[1] + S + Q[2]; while (Q[0]--) { L = L.lastChild } if (!o.support.tbody) { var R = /<tbody/i.test(S), N = !O.indexOf("<table") && !R ? L.firstChild && L.firstChild.childNodes : Q[1] == "<table>" && !R ? L.childNodes : []; for (var M = N.length - 1; M >= 0; --M) { if (o.nodeName(N[M], "tbody") && !N[M].childNodes.length) { N[M].parentNode.removeChild(N[M]) } } } if (!o.support.leadingWhitespace && /^\s/.test(S)) { L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]), L.firstChild) } S = o.makeArray(L.childNodes) } if (S.nodeType) { G.push(S) } else { G = o.merge(G, S) } }); if (I) { for (var J = 0; G[J]; J++) { if (o.nodeName(G[J], "script") && (!G[J].type || G[J].type.toLowerCase() === "text/javascript")) { E.push(G[J].parentNode ? G[J].parentNode.removeChild(G[J]) : G[J]) } else { if (G[J].nodeType === 1) { G.splice.apply(G, [J + 1, 0].concat(o.makeArray(G[J].getElementsByTagName("script")))) } I.appendChild(G[J]) } } return E } return G }, attr: function(J, G, K) { if (!J || J.nodeType == 3 || J.nodeType == 8) { return g } var H = !o.isXMLDoc(J), L = K !== g; G = H && o.props[G] || G; if (J.tagName) { var F = /href|src|style/.test(G); if (G == "selected" && J.parentNode) { J.parentNode.selectedIndex } if (G in J && H && !F) { if (L) { if (G == "type" && o.nodeName(J, "input") && J.parentNode) { throw "type property can't be changed" } J[G] = K } if (o.nodeName(J, "form") && J.getAttributeNode(G)) { return J.getAttributeNode(G).nodeValue } if (G == "tabIndex") { var I = J.getAttributeNode("tabIndex"); return I && I.specified ? I.value : J.nodeName.match(/(button|input|object|select|textarea)/i) ? 0 : J.nodeName.match(/^(a|area)$/i) && J.href ? 0 : g } return J[G] } if (!o.support.style && H && G == "style") { return o.attr(J.style, "cssText", K) } if (L) { J.setAttribute(G, "" + K) } var E = !o.support.hrefNormalized && H && F ? J.getAttribute(G, 2) : J.getAttribute(G); return E === null ? g : E } if (!o.support.opacity && G == "opacity") { if (L) { J.zoom = 1; J.filter = (J.filter || "").replace(/alpha\([^)]*\)/, "") + (parseInt(K) + "" == "NaN" ? "" : "alpha(opacity=" + K * 100 + ")") } return J.filter && J.filter.indexOf("opacity=") >= 0 ? (parseFloat(J.filter.match(/opacity=([^)]*)/)[1]) / 100) + "" : "" } G = G.replace(/-([a-z])/ig, function(M, N) { return N.toUpperCase() }); if (L) { J[G] = K } return J[G] }, trim: function(E) { return (E || "").replace(/^\s+|\s+$/g, "") }, makeArray: function(G) { var E = []; if (G != null) { var F = G.length; if (F == null || typeof G === "string" || o.isFunction(G) || G.setInterval) { E[0] = G } else { while (F) { E[--F] = G[F] } } } return E }, inArray: function(G, H) { for (var E = 0, F = H.length; E < F; E++) { if (H[E] === G) { return E } } return -1 }, merge: function(H, E) { var F = 0, G, I = H.length; if (!o.support.getAll) { while ((G = E[F++]) != null) { if (G.nodeType != 8) { H[I++] = G } } } else { while ((G = E[F++]) != null) { H[I++] = G } } return H }, unique: function(K) { var F = [], E = {}; try { for (var G = 0, H = K.length; G < H; G++) { var J = o.data(K[G]); if (!E[J]) { E[J] = true; F.push(K[G]) } } } catch (I) { F = K } return F }, grep: function(F, J, E) { var G = []; for (var H = 0, I = F.length; H < I; H++) { if (!E != !J(F[H], H)) { G.push(F[H]) } } return G }, map: function(E, J) { var F = []; for (var G = 0, H = E.length; G < H; G++) { var I = J(E[G], G); if (I != null) { F[F.length] = I } } return F.concat.apply([], F) } }); var C = navigator.userAgent.toLowerCase(); o.browser = { version: (C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, "0"])[1], safari: /webkit/.test(C), opera: /opera/.test(C), msie: /msie/.test(C) && !/opera/.test(C), mozilla: /mozilla/.test(C) && !/(compatible|webkit)/.test(C) }; o.each({ parent: function(E) { return E.parentNode }, parents: function(E) { return o.dir(E, "parentNode") }, next: function(E) { return o.nth(E, 2, "nextSibling") }, prev: function(E) { return o.nth(E, 2, "previousSibling") }, nextAll: function(E) { return o.dir(E, "nextSibling") }, prevAll: function(E) { return o.dir(E, "previousSibling") }, siblings: function(E) { return o.sibling(E.parentNode.firstChild, E) }, children: function(E) { return o.sibling(E.firstChild) }, contents: function(E) { return o.nodeName(E, "iframe") ? E.contentDocument || E.contentWindow.document : o.makeArray(E.childNodes) } }, function(E, F) { o.fn[E] = function(G) { var H = o.map(this, F); if (G && typeof G == "string") { H = o.multiFilter(G, H) } return this.pushStack(o.unique(H), E, G) } }); o.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function(E, F) { o.fn[E] = function(G) { var J = [], L = o(G); for (var K = 0, H = L.length; K < H; K++) { var I = (K > 0 ? this.clone(true) : this).get(); o.fn[F].apply(o(L[K]), I); J = J.concat(I) } return this.pushStack(J, E, G) } }); o.each({ removeAttr: function(E) { o.attr(this, E, ""); if (this.nodeType == 1) { this.removeAttribute(E) } }, addClass: function(E) { o.className.add(this, E) }, removeClass: function(E) { o.className.remove(this, E) }, toggleClass: function(F, E) { if (typeof E !== "boolean") { E = !o.className.has(this, F) } o.className[E ? "add" : "remove"](this, F) }, remove: function(E) { if (!E || o.filter(E, [this]).length) { o("*", this).add([this]).each(function() { o.event.remove(this); o.removeData(this) }); if (this.parentNode) { this.parentNode.removeChild(this) } } }, empty: function() { o(this).children().remove(); while (this.firstChild) { this.removeChild(this.firstChild) } } }, function(E, F) { o.fn[E] = function() { return this.each(F, arguments) } }); function j(E, F) { return E[0] && parseInt(o.curCSS(E[0], F, true), 10) || 0 } var h = "jQuery" + e(), v = 0, A = {}; o.extend({ cache: {}, data: function(F, E, G) { F = F == l ? A : F; var H = F[h]; if (!H) { H = F[h] = ++v } if (E && !o.cache[H]) { o.cache[H] = {} } if (G !== g) { o.cache[H][E] = G } return E ? o.cache[H][E] : H }, removeData: function(F, E) { F = F == l ? A : F; var H = F[h]; if (E) { if (o.cache[H]) { delete o.cache[H][E]; E = ""; for (E in o.cache[H]) { break } if (!E) { o.removeData(F) } } } else { try { delete F[h] } catch (G) { if (F.removeAttribute) { F.removeAttribute(h) } } delete o.cache[H] } }, queue: function(F, E, H) { if (F) { E = (E || "fx") + "queue"; var G = o.data(F, E); if (!G || o.isArray(H)) { G = o.data(F, E, o.makeArray(H)) } else { if (H) { G.push(H) } } } return G }, dequeue: function(H, G) { var E = o.queue(H, G), F = E.shift(); if (!G || G === "fx") { F = E[0] } if (F !== g) { F.call(H) } } }); o.fn.extend({ data: function(E, G) { var H = E.split("."); H[1] = H[1] ? "." + H[1] : ""; if (G === g) { var F = this.triggerHandler("getData" + H[1] + "!", [H[0]]); if (F === g && this.length) { F = o.data(this[0], E) } return F === g && H[1] ? this.data(H[0]) : F } else { return this.trigger("setData" + H[1] + "!", [H[0], G]).each(function() { o.data(this, E, G) }) } }, removeData: function(E) { return this.each(function() { o.removeData(this, E) }) }, queue: function(E, F) { if (typeof E !== "string") { F = E; E = "fx" } if (F === g) { return o.queue(this[0], E) } return this.each(function() { var G = o.queue(this, E, F); if (E == "fx" && G.length == 1) { G[0].call(this) } }) }, dequeue: function(E) { return this.each(function() { o.dequeue(this, E) }) } });(function() { var R = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g, L = 0, H = Object.prototype.toString; var F = function(Y, U, ab, ac) { ab = ab || []; U = U || document; if (U.nodeType !== 1 && U.nodeType !== 9) { return [] } if (!Y || typeof Y !== "string") { return ab } var Z = [], W, af, ai, T, ad, V, X = true; R.lastIndex = 0; while ((W = R.exec(Y)) !== null) { Z.push(W[1]); if (W[2]) { V = RegExp.rightContext; break } } if (Z.length > 1 && M.exec(Y)) { if (Z.length === 2 && I.relative[Z[0]]) { af = J(Z[0] + Z[1], U) } else { af = I.relative[Z[0]] ? [U] : F(Z.shift(), U); while (Z.length) { Y = Z.shift(); if (I.relative[Y]) { Y += Z.shift() } af = J(Y, af) } } } else { var ae = ac ? { expr: Z.pop(), set: E(ac)} : F.find(Z.pop(), Z.length === 1 && U.parentNode ? U.parentNode : U, Q(U)); af = F.filter(ae.expr, ae.set); if (Z.length > 0) { ai = E(af) } else { X = false } while (Z.length) { var ah = Z.pop(), ag = ah; if (!I.relative[ah]) { ah = "" } else { ag = Z.pop() } if (ag == null) { ag = U } I.relative[ah](ai, ag, Q(U)) } } if (!ai) { ai = af } if (!ai) { throw "Syntax error, unrecognized expression: " + (ah || Y) } if (H.call(ai) === "[object Array]") { if (!X) { ab.push.apply(ab, ai) } else { if (U.nodeType === 1) { for (var aa = 0; ai[aa] != null; aa++) { if (ai[aa] && (ai[aa] === true || ai[aa].nodeType === 1 && K(U, ai[aa]))) { ab.push(af[aa]) } } } else { for (var aa = 0; ai[aa] != null; aa++) { if (ai[aa] && ai[aa].nodeType === 1) { ab.push(af[aa]) } } } } } else { E(ai, ab) } if (V) { F(V, U, ab, ac); if (G) { hasDuplicate = false; ab.sort(G); if (hasDuplicate) { for (var aa = 1; aa < ab.length; aa++) { if (ab[aa] === ab[aa - 1]) { ab.splice(aa--, 1) } } } } } return ab }; F.matches = function(T, U) { return F(T, null, null, U) }; F.find = function(aa, T, ab) { var Z, X; if (!aa) { return [] } for (var W = 0, V = I.order.length; W < V; W++) { var Y = I.order[W], X; if ((X = I.match[Y].exec(aa))) { var U = RegExp.leftContext; if (U.substr(U.length - 1) !== "\\") { X[1] = (X[1] || "").replace(/\\/g, ""); Z = I.find[Y](X, T, ab); if (Z != null) { aa = aa.replace(I.match[Y], ""); break } } } } if (!Z) { Z = T.getElementsByTagName("*") } return { set: Z, expr: aa} }; F.filter = function(ad, ac, ag, W) { var V = ad, ai = [], aa = ac, Y, T, Z = ac && ac[0] && Q(ac[0]); while (ad && ac.length) { for (var ab in I.filter) { if ((Y = I.match[ab].exec(ad)) != null) { var U = I.filter[ab], ah, af; T = false; if (aa == ai) { ai = [] } if (I.preFilter[ab]) { Y = I.preFilter[ab](Y, aa, ag, ai, W, Z); if (!Y) { T = ah = true } else { if (Y === true) { continue } } } if (Y) { for (var X = 0; (af = aa[X]) != null; X++) { if (af) { ah = U(af, Y, X, aa); var ae = W ^ !!ah; if (ag && ah != null) { if (ae) { T = true } else { aa[X] = false } } else { if (ae) { ai.push(af); T = true } } } } } if (ah !== g) { if (!ag) { aa = ai } ad = ad.replace(I.match[ab], ""); if (!T) { return [] } break } } } if (ad == V) { if (T == null) { throw "Syntax error, unrecognized expression: " + ad } else { break } } V = ad } return aa }; var I = F.selectors = { order: ["ID", "NAME", "TAG"], match: { ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ }, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function(T) { return T.getAttribute("href") } }, relative: { "+": function(aa, T, Z) { var X = typeof T === "string", ab = X && !/\W/.test(T), Y = X && !ab; if (ab && !Z) { T = T.toUpperCase() } for (var W = 0, V = aa.length, U; W < V; W++) { if ((U = aa[W])) { while ((U = U.previousSibling) && U.nodeType !== 1) { } aa[W] = Y || U && U.nodeName === T ? U || false : U === T } } if (Y) { F.filter(T, aa, true) } }, ">": function(Z, U, aa) { var X = typeof U === "string"; if (X && !/\W/.test(U)) { U = aa ? U : U.toUpperCase(); for (var V = 0, T = Z.length; V < T; V++) { var Y = Z[V]; if (Y) { var W = Y.parentNode; Z[V] = W.nodeName === U ? W : false } } } else { for (var V = 0, T = Z.length; V < T; V++) { var Y = Z[V]; if (Y) { Z[V] = X ? Y.parentNode : Y.parentNode === U } } if (X) { F.filter(U, Z, true) } } }, "": function(W, U, Y) { var V = L++, T = S; if (!U.match(/\W/)) { var X = U = Y ? U : U.toUpperCase(); T = P } T("parentNode", U, V, W, X, Y) }, "~": function(W, U, Y) { var V = L++, T = S; if (typeof U === "string" && !U.match(/\W/)) { var X = U = Y ? U : U.toUpperCase(); T = P } T("previousSibling", U, V, W, X, Y) } }, find: { ID: function(U, V, W) { if (typeof V.getElementById !== "undefined" && !W) { var T = V.getElementById(U[1]); return T ? [T] : [] } }, NAME: function(V, Y, Z) { if (typeof Y.getElementsByName !== "undefined") { var U = [], X = Y.getElementsByName(V[1]); for (var W = 0, T = X.length; W < T; W++) { if (X[W].getAttribute("name") === V[1]) { U.push(X[W]) } } return U.length === 0 ? null : U } }, TAG: function(T, U) { return U.getElementsByTagName(T[1]) } }, preFilter: { CLASS: function(W, U, V, T, Z, aa) { W = " " + W[1].replace(/\\/g, "") + " "; if (aa) { return W } for (var X = 0, Y; (Y = U[X]) != null; X++) { if (Y) { if (Z ^ (Y.className && (" " + Y.className + " ").indexOf(W) >= 0)) { if (!V) { T.push(Y) } } else { if (V) { U[X] = false } } } } return false }, ID: function(T) { return T[1].replace(/\\/g, "") }, TAG: function(U, T) { for (var V = 0; T[V] === false; V++) { } return T[V] && Q(T[V]) ? U[1] : U[1].toUpperCase() }, CHILD: function(T) { if (T[1] == "nth") { var U = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2] == "even" && "2n" || T[2] == "odd" && "2n+1" || !/\D/.test(T[2]) && "0n+" + T[2] || T[2]); T[2] = (U[1] + (U[2] || 1)) - 0; T[3] = U[3] - 0 } T[0] = L++; return T }, ATTR: function(X, U, V, T, Y, Z) { var W = X[1].replace(/\\/g, ""); if (!Z && I.attrMap[W]) { X[1] = I.attrMap[W] } if (X[2] === "~=") { X[4] = " " + X[4] + " " } return X }, PSEUDO: function(X, U, V, T, Y) { if (X[1] === "not") { if (X[3].match(R).length > 1 || /^\w/.test(X[3])) { X[3] = F(X[3], null, null, U) } else { var W = F.filter(X[3], U, V, true ^ Y); if (!V) { T.push.apply(T, W) } return false } } else { if (I.match.POS.test(X[0]) || I.match.CHILD.test(X[0])) { return true } } return X }, POS: function(T) { T.unshift(true); return T } }, filters: { enabled: function(T) { return T.disabled === false && T.type !== "hidden" }, disabled: function(T) { return T.disabled === true }, checked: function(T) { return T.checked === true }, selected: function(T) { T.parentNode.selectedIndex; return T.selected === true }, parent: function(T) { return !!T.firstChild }, empty: function(T) { return !T.firstChild }, has: function(V, U, T) { return !!F(T[3], V).length }, header: function(T) { return /h\d/i.test(T.nodeName) }, text: function(T) { return "text" === T.type }, radio: function(T) { return "radio" === T.type }, checkbox: function(T) { return "checkbox" === T.type }, file: function(T) { return "file" === T.type }, password: function(T) { return "password" === T.type }, submit: function(T) { return "submit" === T.type }, image: function(T) { return "image" === T.type }, reset: function(T) { return "reset" === T.type }, button: function(T) { return "button" === T.type || T.nodeName.toUpperCase() === "BUTTON" }, input: function(T) { return /input|select|textarea|button/i.test(T.nodeName) } }, setFilters: { first: function(U, T) { return T === 0 }, last: function(V, U, T, W) { return U === W.length - 1 }, even: function(U, T) { return T % 2 === 0 }, odd: function(U, T) { return T % 2 === 1 }, lt: function(V, U, T) { return U < T[3] - 0 }, gt: function(V, U, T) { return U > T[3] - 0 }, nth: function(V, U, T) { return T[3] - 0 == U }, eq: function(V, U, T) { return T[3] - 0 == U } }, filter: { PSEUDO: function(Z, V, W, aa) { var U = V[1], X = I.filters[U]; if (X) { return X(Z, W, V, aa) } else { if (U === "contains") { return (Z.textContent || Z.innerText || "").indexOf(V[3]) >= 0 } else { if (U === "not") { var Y = V[3]; for (var W = 0, T = Y.length; W < T; W++) { if (Y[W] === Z) { return false } } return true } } } }, CHILD: function(T, W) { var Z = W[1], U = T; switch (Z) { case "only": case "first": while (U = U.previousSibling) { if (U.nodeType === 1) { return false } } if (Z == "first") { return true } U = T; case "last": while (U = U.nextSibling) { if (U.nodeType === 1) { return false } } return true; case "nth": var V = W[2], ac = W[3]; if (V == 1 && ac == 0) { return true } var Y = W[0], ab = T.parentNode; if (ab && (ab.sizcache !== Y || !T.nodeIndex)) { var X = 0; for (U = ab.firstChild; U; U = U.nextSibling) { if (U.nodeType === 1) { U.nodeIndex = ++X } } ab.sizcache = Y } var aa = T.nodeIndex - ac; if (V == 0) { return aa == 0 } else { return (aa % V == 0 && aa / V >= 0) } } }, ID: function(U, T) { return U.nodeType === 1 && U.getAttribute("id") === T }, TAG: function(U, T) { return (T === "*" && U.nodeType === 1) || U.nodeName === T }, CLASS: function(U, T) { return (" " + (U.className || U.getAttribute("class")) + " ").indexOf(T) > -1 }, ATTR: function(Y, W) { var V = W[1], T = I.attrHandle[V] ? I.attrHandle[V](Y) : Y[V] != null ? Y[V] : Y.getAttribute(V), Z = T + "", X = W[2], U = W[4]; return T == null ? X === "!=" : X === "=" ? Z === U : X === "*=" ? Z.indexOf(U) >= 0 : X === "~=" ? (" " + Z + " ").indexOf(U) >= 0 : !U ? Z && T !== false : X === "!=" ? Z != U : X === "^=" ? Z.indexOf(U) === 0 : X === "$=" ? Z.substr(Z.length - U.length) === U : X === "|=" ? Z === U || Z.substr(0, U.length + 1) === U + "-" : false }, POS: function(X, U, V, Y) { var T = U[2], W = I.setFilters[T]; if (W) { return W(X, V, U, Y) } } } }; var M = I.match.POS; for (var O in I.match) { I.match[O] = RegExp(I.match[O].source + /(?![^\[]*\])(?![^\(]*\))/.source) } var E = function(U, T) { U = Array.prototype.slice.call(U); if (T) { T.push.apply(T, U); return T } return U }; try { Array.prototype.slice.call(document.documentElement.childNodes) } catch (N) { E = function(X, W) { var U = W || []; if (H.call(X) === "[object Array]") { Array.prototype.push.apply(U, X) } else { if (typeof X.length === "number") { for (var V = 0, T = X.length; V < T; V++) { U.push(X[V]) } } else { for (var V = 0; X[V]; V++) { U.push(X[V]) } } } return U } } var G; if (document.documentElement.compareDocumentPosition) { G = function(U, T) { var V = U.compareDocumentPosition(T) & 4 ? -1 : U === T ? 0 : 1; if (V === 0) { hasDuplicate = true } return V } } else { if ("sourceIndex" in document.documentElement) { G = function(U, T) { var V = U.sourceIndex - T.sourceIndex; if (V === 0) { hasDuplicate = true } return V } } else { if (document.createRange) { G = function(W, U) { var V = W.ownerDocument.createRange(), T = U.ownerDocument.createRange(); V.selectNode(W); V.collapse(true); T.selectNode(U); T.collapse(true); var X = V.compareBoundaryPoints(Range.START_TO_END, T); if (X === 0) { hasDuplicate = true } return X } } } } (function() { var U = document.createElement("form"), V = "script" + (new Date).getTime(); U.innerHTML = "<input name='" + V + "'/>"; var T = document.documentElement; T.insertBefore(U, T.firstChild); if (!!document.getElementById(V)) { I.find.ID = function(X, Y, Z) { if (typeof Y.getElementById !== "undefined" && !Z) { var W = Y.getElementById(X[1]); return W ? W.id === X[1] || typeof W.getAttributeNode !== "undefined" && W.getAttributeNode("id").nodeValue === X[1] ? [W] : g : [] } }; I.filter.ID = function(Y, W) { var X = typeof Y.getAttributeNode !== "undefined" && Y.getAttributeNode("id"); return Y.nodeType === 1 && X && X.nodeValue === W } } T.removeChild(U) })(); (function() { var T = document.createElement("div"); T.appendChild(document.createComment("")); if (T.getElementsByTagName("*").length > 0) { I.find.TAG = function(U, Y) { var X = Y.getElementsByTagName(U[1]); if (U[1] === "*") { var W = []; for (var V = 0; X[V]; V++) { if (X[V].nodeType === 1) { W.push(X[V]) } } X = W } return X } } T.innerHTML = "<a href='#'></a>"; if (T.firstChild && typeof T.firstChild.getAttribute !== "undefined" && T.firstChild.getAttribute("href") !== "#") { I.attrHandle.href = function(U) { return U.getAttribute("href", 2) } } })(); if (document.querySelectorAll) { (function() { var T = F, U = document.createElement("div"); U.innerHTML = "<p class='TEST'></p>"; if (U.querySelectorAll && U.querySelectorAll(".TEST").length === 0) { return } F = function(Y, X, V, W) { X = X || document; if (!W && X.nodeType === 9 && !Q(X)) { try { return E(X.querySelectorAll(Y), V) } catch (Z) { } } return T(Y, X, V, W) }; F.find = T.find; F.filter = T.filter; F.selectors = T.selectors; F.matches = T.matches })() } if (document.getElementsByClassName && document.documentElement.getElementsByClassName) { (function() { var T = document.createElement("div"); T.innerHTML = "<div class='test e'></div><div class='test'></div>"; if (T.getElementsByClassName("e").length === 0) { return } T.lastChild.className = "e"; if (T.getElementsByClassName("e").length === 1) { return } I.order.splice(1, 0, "CLASS"); I.find.CLASS = function(U, V, W) { if (typeof V.getElementsByClassName !== "undefined" && !W) { return V.getElementsByClassName(U[1]) } } })() } function P(U, Z, Y, ad, aa, ac) { var ab = U == "previousSibling" && !ac; for (var W = 0, V = ad.length; W < V; W++) { var T = ad[W]; if (T) { if (ab && T.nodeType === 1) { T.sizcache = Y; T.sizset = W } T = T[U]; var X = false; while (T) { if (T.sizcache === Y) { X = ad[T.sizset]; break } if (T.nodeType === 1 && !ac) { T.sizcache = Y; T.sizset = W } if (T.nodeName === Z) { X = T; break } T = T[U] } ad[W] = X } } } function S(U, Z, Y, ad, aa, ac) { var ab = U == "previousSibling" && !ac; for (var W = 0, V = ad.length; W < V; W++) { var T = ad[W]; if (T) { if (ab && T.nodeType === 1) { T.sizcache = Y; T.sizset = W } T = T[U]; var X = false; while (T) { if (T.sizcache === Y) { X = ad[T.sizset]; break } if (T.nodeType === 1) { if (!ac) { T.sizcache = Y; T.sizset = W } if (typeof Z !== "string") { if (T === Z) { X = true; break } } else { if (F.filter(Z, [T]).length > 0) { X = T; break } } } T = T[U] } ad[W] = X } } } var K = document.compareDocumentPosition ? function(U, T) { return U.compareDocumentPosition(T) & 16 } : function(U, T) { return U !== T && (U.contains ? U.contains(T) : true) }; var Q = function(T) { return T.nodeType === 9 && T.documentElement.nodeName !== "HTML" || !!T.ownerDocument && Q(T.ownerDocument) }; var J = function(T, aa) { var W = [], X = "", Y, V = aa.nodeType ? [aa] : aa; while ((Y = I.match.PSEUDO.exec(T))) { X += Y[0]; T = T.replace(I.match.PSEUDO, "") } T = I.relative[T] ? T + "*" : T; for (var Z = 0, U = V.length; Z < U; Z++) { F(T, V[Z], W) } return F.filter(X, W) }; o.find = F; o.filter = F.filter; o.expr = F.selectors; o.expr[":"] = o.expr.filters; F.selectors.filters.hidden = function(T) { return T.offsetWidth === 0 || T.offsetHeight === 0 }; F.selectors.filters.visible = function(T) { return T.offsetWidth > 0 || T.offsetHeight > 0 }; F.selectors.filters.animated = function(T) { return o.grep(o.timers, function(U) { return T === U.elem }).length }; o.multiFilter = function(V, T, U) { if (U) { V = ":not(" + V + ")" } return F.matches(V, T) }; o.dir = function(V, U) { var T = [], W = V[U]; while (W && W != document) { if (W.nodeType == 1) { T.push(W) } W = W[U] } return T }; o.nth = function(X, T, V, W) { T = T || 1; var U = 0; for (; X; X = X[V]) { if (X.nodeType == 1 && ++U == T) { break } } return X }; o.sibling = function(V, U) { var T = []; for (; V; V = V.nextSibling) { if (V.nodeType == 1 && V != U) { T.push(V) } } return T }; return; l.Sizzle = F })(); o.event = { add: function(I, F, H, K) { if (I.nodeType == 3 || I.nodeType == 8) { return } if (I.setInterval && I != l) { I = l } if (!H.guid) { H.guid = this.guid++ } if (K !== g) { var G = H; H = this.proxy(G); H.data = K } var E = o.data(I, "events") || o.data(I, "events", {}), J = o.data(I, "handle") || o.data(I, "handle", function() { return typeof o !== "undefined" && !o.event.triggered ? o.event.handle.apply(arguments.callee.elem, arguments) : g }); J.elem = I; o.each(F.split(/\s+/), function(M, N) { var O = N.split("."); N = O.shift(); H.type = O.slice().sort().join("."); var L = E[N]; if (o.event.specialAll[N]) { o.event.specialAll[N].setup.call(I, K, O) } if (!L) { L = E[N] = {}; if (!o.event.special[N] || o.event.special[N].setup.call(I, K, O) === false) { if (I.addEventListener) { I.addEventListener(N, J, false) } else { if (I.attachEvent) { I.attachEvent("on" + N, J) } } } } L[H.guid] = H; o.event.global[N] = true }); I = null }, guid: 1, global: {}, remove: function(K, H, J) { if (K.nodeType == 3 || K.nodeType == 8) { return } var G = o.data(K, "events"), F, E; if (G) { if (H === g || (typeof H === "string" && H.charAt(0) == ".")) { for (var I in G) { this.remove(K, I + (H || "")) } } else { if (H.type) { J = H.handler; H = H.type } o.each(H.split(/\s+/), function(M, O) { var Q = O.split("."); O = Q.shift(); var N = RegExp("(^|\\.)" + Q.slice().sort().join(".*\\.") + "(\\.|$)"); if (G[O]) { if (J) { delete G[O][J.guid] } else { for (var P in G[O]) { if (N.test(G[O][P].type)) { delete G[O][P] } } } if (o.event.specialAll[O]) { o.event.specialAll[O].teardown.call(K, Q) } for (F in G[O]) { break } if (!F) { if (!o.event.special[O] || o.event.special[O].teardown.call(K, Q) === false) { if (K.removeEventListener) { K.removeEventListener(O, o.data(K, "handle"), false) } else { if (K.detachEvent) { K.detachEvent("on" + O, o.data(K, "handle")) } } } F = null; delete G[O] } } }) } for (F in G) { break } if (!F) { var L = o.data(K, "handle"); if (L) { L.elem = null } o.removeData(K, "events"); o.removeData(K, "handle") } } }, trigger: function(I, K, H, E) { var G = I.type || I; if (!E) { I = typeof I === "object" ? I[h] ? I : o.extend(o.Event(G), I) : o.Event(G); if (G.indexOf("!") >= 0) { I.type = G = G.slice(0, -1); I.exclusive = true } if (!H) { I.stopPropagation(); if (this.global[G]) { o.each(o.cache, function() { if (this.events && this.events[G]) { o.event.trigger(I, K, this.handle.elem) } }) } } if (!H || H.nodeType == 3 || H.nodeType == 8) { return g } I.result = g; I.target = H; K = o.makeArray(K); K.unshift(I) } I.currentTarget = H; var J = o.data(H, "handle"); if (J) { J.apply(H, K) } if ((!H[G] || (o.nodeName(H, "a") && G == "click")) && H["on" + G] && H["on" + G].apply(H, K) === false) { I.result = false } if (!E && H[G] && !I.isDefaultPrevented() && !(o.nodeName(H, "a") && G == "click")) { this.triggered = true; try { H[G]() } catch (L) { } } this.triggered = false; if (!I.isPropagationStopped()) { var F = H.parentNode || H.ownerDocument; if (F) { o.event.trigger(I, K, F, true) } } }, handle: function(K) { var J, E; K = arguments[0] = o.event.fix(K || l.event); K.currentTarget = this; var L = K.type.split("."); K.type = L.shift(); J = !L.length && !K.exclusive; var I = RegExp("(^|\\.)" + L.slice().sort().join(".*\\.") + "(\\.|$)"); E = (o.data(this, "events") || {})[K.type]; for (var G in E) { var H = E[G]; if (J || I.test(H.type)) { K.handler = H; K.data = H.data; var F = H.apply(this, arguments); if (F !== g) { K.result = F; if (F === false) { K.preventDefault(); K.stopPropagation() } } if (K.isImmediatePropagationStopped()) { break } } } }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function(H) { if (H[h]) { return H } var F = H; H = o.Event(F); for (var G = this.props.length, J; G; ) { J = this.props[--G]; H[J] = F[J] } if (!H.target) { H.target = H.srcElement || document } if (H.target.nodeType == 3) { H.target = H.target.parentNode } if (!H.relatedTarget && H.fromElement) { H.relatedTarget = H.fromElement == H.target ? H.toElement : H.fromElement } if (H.pageX == null && H.clientX != null) { var I = document.documentElement, E = document.body; H.pageX = H.clientX + (I && I.scrollLeft || E && E.scrollLeft || 0) - (I.clientLeft || 0); H.pageY = H.clientY + (I && I.scrollTop || E && E.scrollTop || 0) - (I.clientTop || 0) } if (!H.which && ((H.charCode || H.charCode === 0) ? H.charCode : H.keyCode)) { H.which = H.charCode || H.keyCode } if (!H.metaKey && H.ctrlKey) { H.metaKey = H.ctrlKey } if (!H.which && H.button) { H.which = (H.button & 1 ? 1 : (H.button & 2 ? 3 : (H.button & 4 ? 2 : 0))) } return H }, proxy: function(F, E) { E = E || function() { return F.apply(this, arguments) }; E.guid = F.guid = F.guid || E.guid || this.guid++; return E }, special: { ready: { setup: B, teardown: function() { } } }, specialAll: { live: { setup: function(E, F) { o.event.add(this, F[0], c) }, teardown: function(G) { if (G.length) { var E = 0, F = RegExp("(^|\\.)" + G[0] + "(\\.|$)"); o.each((o.data(this, "events").live || {}), function() { if (F.test(this.type)) { E++ } }); if (E < 1) { o.event.remove(this, G[0], c) } } } }} }; o.Event = function(E) { if (!this.preventDefault) { return new o.Event(E) } if (E && E.type) { this.originalEvent = E; this.type = E.type } else { this.type = E } this.timeStamp = e(); this[h] = true }; function k() { return false } function u() { return true } o.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = u; var E = this.originalEvent; if (!E) { return } if (E.preventDefault) { E.preventDefault() } E.returnValue = false }, stopPropagation: function() { this.isPropagationStopped = u; var E = this.originalEvent; if (!E) { return } if (E.stopPropagation) { E.stopPropagation() } E.cancelBubble = true }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = u; this.stopPropagation() }, isDefaultPrevented: k, isPropagationStopped: k, isImmediatePropagationStopped: k }; var a = function(F) { var E = F.relatedTarget; while (E && E != this) { try { E = E.parentNode } catch (G) { E = this } } if (E != this) { F.type = F.data; o.event.handle.apply(this, arguments) } }; o.each({ mouseover: "mouseenter", mouseout: "mouseleave" }, function(F, E) { o.event.special[E] = { setup: function() { o.event.add(this, F, a, E) }, teardown: function() { o.event.remove(this, F, a) } } }); o.fn.extend({ bind: function(F, G, E) { return F == "unload" ? this.one(F, G, E) : this.each(function() { o.event.add(this, F, E || G, E && G) }) }, one: function(G, H, F) { var E = o.event.proxy(F || H, function(I) { o(this).unbind(I, E); return (F || H).apply(this, arguments) }); return this.each(function() { o.event.add(this, G, E, F && H) }) }, unbind: function(F, E) { return this.each(function() { o.event.remove(this, F, E) }) }, trigger: function(E, F) { return this.each(function() { o.event.trigger(E, F, this) }) }, triggerHandler: function(E, G) { if (this[0]) { var F = o.Event(E); F.preventDefault(); F.stopPropagation(); o.event.trigger(F, G, this[0]); return F.result } }, toggle: function(G) { var E = arguments, F = 1; while (F < E.length) { o.event.proxy(G, E[F++]) } return this.click(o.event.proxy(G, function(H) { this.lastToggle = (this.lastToggle || 0) % F; H.preventDefault(); return E[this.lastToggle++].apply(this, arguments) || false })) }, hover: function(E, F) { return this.mouseenter(E).mouseleave(F) }, ready: function(E) { B(); if (o.isReady) { E.call(document, o) } else { o.readyList.push(E) } return this }, live: function(G, F) { var E = o.event.proxy(F); E.guid += this.selector + G; o(document).bind(i(G, this.selector), this.selector, E); return this }, die: function(F, E) { o(document).unbind(i(F, this.selector), E ? { guid: E.guid + this.selector + F} : null); return this } }); function c(H) { var E = RegExp("(^|\\.)" + H.type + "(\\.|$)"), G = true, F = []; o.each(o.data(this, "events").live || [], function(I, J) { if (E.test(J.type)) { var K = o(H.target).closest(J.data)[0]; if (K) { F.push({ elem: K, fn: J }) } } }); F.sort(function(J, I) { return o.data(J.elem, "closest") - o.data(I.elem, "closest") }); o.each(F, function() { if (this.fn.call(this.elem, H, this.fn.data) === false) { return (G = false) } }); return G } function i(F, E) { return ["live", F, E.replace(/\./g, "`").replace(/ /g, "|")].join(".") } o.extend({ isReady: false, readyList: [], ready: function() { if (!o.isReady) { o.isReady = true; if (o.readyList) { o.each(o.readyList, function() { this.call(document, o) }); o.readyList = null } o(document).triggerHandler("ready") } } }); var x = false; function B() { if (x) { return } x = true; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", function() { document.removeEventListener("DOMContentLoaded", arguments.callee, false); o.ready() }, false) } else { if (document.attachEvent) { document.attachEvent("onreadystatechange", function() { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", arguments.callee); o.ready() } }); if (document.documentElement.doScroll && l == l.top) { (function() { if (o.isReady) { return } try { document.documentElement.doScroll("left") } catch (E) { setTimeout(arguments.callee, 0); return } o.ready() })() } } } o.event.add(l, "load", o.ready) } o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","), function(F, E) { o.fn[E] = function(G) { return G ? this.bind(E, G) : this.trigger(E) } }); o(l).bind("unload", function() { for (var E in o.cache) { if (E != 1 && o.cache[E].handle) { o.event.remove(o.cache[E].handle.elem) } } }); (function() { o.support = {}; var F = document.documentElement, G = document.createElement("script"), K = document.createElement("div"), J = "script" + (new Date).getTime(); K.style.display = "none"; K.innerHTML = '  <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>'; var H = K.getElementsByTagName("*"), E = K.getElementsByTagName("a")[0]; if (!H || !H.length || !E) { return } o.support = { leadingWhitespace: K.firstChild.nodeType == 3, tbody: !K.getElementsByTagName("tbody").length, objectAll: !!K.getElementsByTagName("object")[0].getElementsByTagName("*").length, htmlSerialize: !!K.getElementsByTagName("link").length, style: /red/.test(E.getAttribute("style")), hrefNormalized: E.getAttribute("href") === "/a", opacity: E.style.opacity === "0.5", cssFloat: !!E.style.cssFloat, scriptEval: false, noCloneEvent: true, boxModel: null }; G.type = "text/javascript"; try { G.appendChild(document.createTextNode("window." + J + "=1;")) } catch (I) { } F.insertBefore(G, F.firstChild); if (l[J]) { o.support.scriptEval = true; delete l[J] } F.removeChild(G); if (K.attachEvent && K.fireEvent) { K.attachEvent("onclick", function() { o.support.noCloneEvent = false; K.detachEvent("onclick", arguments.callee) }); K.cloneNode(true).fireEvent("onclick") } o(function() { var L = document.createElement("div"); L.style.width = L.style.paddingLeft = "1px"; document.body.appendChild(L); o.boxModel = o.support.boxModel = L.offsetWidth === 2; document.body.removeChild(L).style.display = "none" }) })(); var w = o.support.cssFloat ? "cssFloat" : "styleFloat"; o.props = { "for": "htmlFor", "class": "className", "float": w, cssFloat: w, styleFloat: w, readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", tabindex: "tabIndex" }; o.fn.extend({ _load: o.fn.load, load: function(G, J, K) { if (typeof G !== "string") { return this._load(G) } var I = G.indexOf(" "); if (I >= 0) { var E = G.slice(I, G.length); G = G.slice(0, I) } var H = "GET"; if (J) { if (o.isFunction(J)) { K = J; J = null } else { if (typeof J === "object") { J = o.param(J); H = "POST" } } } var F = this; o.ajax({ url: G, type: H, dataType: "html", data: J, complete: function(M, L) { if (L == "success" || L == "notmodified") { F.html(E ? o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g, "")).find(E) : M.responseText) } if (K) { F.each(K, [M.responseText, L, M]) } } }); return this }, serialize: function() { return o.param(this.serializeArray()) }, serializeArray: function() { return this.map(function() { return this.elements ? o.makeArray(this.elements) : this }).filter(function() { return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password|search/i.test(this.type)) }).map(function(E, F) { var G = o(this).val(); return G == null ? null : o.isArray(G) ? o.map(G, function(I, H) { return { name: F.name, value: I} }) : { name: F.name, value: G} }).get() } }); o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(E, F) { o.fn[F] = function(G) { return this.bind(F, G) } }); var r = e(); o.extend({ get: function(E, G, H, F) { if (o.isFunction(G)) { H = G; G = null } return o.ajax({ type: "GET", url: E, data: G, success: H, dataType: F }) }, getScript: function(E, F) { return o.get(E, null, F, "script") }, getJSON: function(E, F, G) { return o.get(E, F, G, "json") }, post: function(E, G, H, F) { if (o.isFunction(G)) { H = G; G = {} } return o.ajax({ type: "POST", url: E, data: G, success: H, dataType: F }) }, ajaxSetup: function(E) { o.extend(o.ajaxSettings, E) }, ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, xhr: function() { return l.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest() }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*"} }, lastModified: {}, ajax: function(M) { M = o.extend(true, M, o.extend(true, {}, o.ajaxSettings, M)); var W, F = /=\?(&|$)/g, R, V, G = M.type.toUpperCase(); if (M.data && M.processData && typeof M.data !== "string") { M.data = o.param(M.data) } if (M.dataType == "jsonp") { if (G == "GET") { if (!M.url.match(F)) { M.url += (M.url.match(/\?/) ? "&" : "?") + (M.jsonp || "callback") + "=?" } } else { if (!M.data || !M.data.match(F)) { M.data = (M.data ? M.data + "&" : "") + (M.jsonp || "callback") + "=?" } } M.dataType = "json" } if (M.dataType == "json" && (M.data && M.data.match(F) || M.url.match(F))) { W = "jsonp" + r++; if (M.data) { M.data = (M.data + "").replace(F, "=" + W + "$1") } M.url = M.url.replace(F, "=" + W + "$1"); M.dataType = "script"; l[W] = function(X) { V = X; I(); L(); l[W] = g; try { delete l[W] } catch (Y) { } if (H) { H.removeChild(T) } } } if (M.dataType == "script" && M.cache == null) { M.cache = false } if (M.cache === false && G == "GET") { var E = e(); var U = M.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + E + "$2"); M.url = U + ((U == M.url) ? (M.url.match(/\?/) ? "&" : "?") + "_=" + E : "") } if (M.data && G == "GET") { M.url += (M.url.match(/\?/) ? "&" : "?") + M.data; M.data = null } if (M.global && !o.active++) { o.event.trigger("ajaxStart") } var Q = /^(\w+:)?\/\/([^\/?#]+)/.exec(M.url); if (M.dataType == "script" && G == "GET" && Q && (Q[1] && Q[1] != location.protocol || Q[2] != location.host)) { var H = document.getElementsByTagName("head")[0]; var T = document.createElement("script"); T.src = M.url; if (M.scriptCharset) { T.charset = M.scriptCharset } if (!W) { var O = false; T.onload = T.onreadystatechange = function() { if (!O && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { O = true; I(); L(); T.onload = T.onreadystatechange = null; H.removeChild(T) } } } H.appendChild(T); return g } var K = false; var J = M.xhr(); if (M.username) { J.open(G, M.url, M.async, M.username, M.password) } else { J.open(G, M.url, M.async) } try { if (M.data) { J.setRequestHeader("Content-Type", M.contentType) } if (M.ifModified) { J.setRequestHeader("If-Modified-Since", o.lastModified[M.url] || "Thu, 01 Jan 1970 00:00:00 GMT") } J.setRequestHeader("X-Requested-With", "XMLHttpRequest"); J.setRequestHeader("Accept", M.dataType && M.accepts[M.dataType] ? M.accepts[M.dataType] + ", */*" : M.accepts._default) } catch (S) { } if (M.beforeSend && M.beforeSend(J, M) === false) { if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } J.abort(); return false } if (M.global) { o.event.trigger("ajaxSend", [J, M]) } var N = function(X) { if (J.readyState == 0) { if (P) { clearInterval(P); P = null; if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } } } else { if (!K && J && (J.readyState == 4 || X == "timeout")) { K = true; if (P) { clearInterval(P); P = null } R = X == "timeout" ? "timeout" : !o.httpSuccess(J) ? "error" : M.ifModified && o.httpNotModified(J, M.url) ? "notmodified" : "success"; if (R == "success") { try { V = o.httpData(J, M.dataType, M) } catch (Z) { R = "parsererror" } } if (R == "success") { var Y; try { Y = J.getResponseHeader("Last-Modified") } catch (Z) { } if (M.ifModified && Y) { o.lastModified[M.url] = Y } if (!W) { I() } } else { o.handleError(M, J, R) } L(); if (X) { J.abort() } if (M.async) { J = null } } } }; if (M.async) { var P = setInterval(N, 13); if (M.timeout > 0) { setTimeout(function() { if (J && !K) { N("timeout") } }, M.timeout) } } try { J.send(M.data) } catch (S) { o.handleError(M, J, null, S) } if (!M.async) { N() } function I() { if (M.success) { M.success(V, R) } if (M.global) { o.event.trigger("ajaxSuccess", [J, M]) } } function L() { if (M.complete) { M.complete(J, R) } if (M.global) { o.event.trigger("ajaxComplete", [J, M]) } if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } } return J }, handleError: function(F, H, E, G) { if (F.error) { F.error(H, E, G) } if (F.global) { o.event.trigger("ajaxError", [H, F, G]) } }, active: 0, httpSuccess: function(F) { try { return !F.status && location.protocol == "file:" || (F.status >= 200 && F.status < 300) || F.status == 304 || F.status == 1223 } catch (E) { } return false }, httpNotModified: function(G, E) { try { var H = G.getResponseHeader("Last-Modified"); return G.status == 304 || H == o.lastModified[E] } catch (F) { } return false }, httpData: function(J, H, G) { var F = J.getResponseHeader("content-type"), E = H == "xml" || !H && F && F.indexOf("xml") >= 0, I = E ? J.responseXML : J.responseText; if (E && I.documentElement.tagName == "parsererror") { throw "parsererror" } if (G && G.dataFilter) { I = G.dataFilter(I, H) } if (typeof I === "string") { if (H == "script") { o.globalEval(I) } if (H == "json") { I = l["eval"]("(" + I + ")") } } return I }, param: function(E) { var G = []; function H(I, J) { G[G.length] = encodeURIComponent(I) + "=" + encodeURIComponent(J) } if (o.isArray(E) || E.jquery) { o.each(E, function() { H(this.name, this.value) }) } else { for (var F in E) { if (o.isArray(E[F])) { o.each(E[F], function() { H(F, this) }) } else { H(F, o.isFunction(E[F]) ? E[F]() : E[F]) } } } return G.join("&").replace(/%20/g, "+") } }); var m = {}, n, d = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]]; function t(F, E) { var G = {}; o.each(d.concat.apply([], d.slice(0, E)), function() { G[this] = F }); return G } o.fn.extend({ show: function(J, L) { if (J) { return this.animate(t("show", 3), J, L) } else { for (var H = 0, F = this.length; H < F; H++) { var E = o.data(this[H], "olddisplay"); this[H].style.display = E || ""; if (o.css(this[H], "display") === "none") { var G = this[H].tagName, K; if (m[G]) { K = m[G] } else { var I = o("<" + G + " />").appendTo("body"); K = I.css("display"); if (K === "none") { K = "block" } I.remove(); m[G] = K } o.data(this[H], "olddisplay", K) } } for (var H = 0, F = this.length; H < F; H++) { this[H].style.display = o.data(this[H], "olddisplay") || "" } return this } }, hide: function(H, I) { if (H) { return this.animate(t("hide", 3), H, I) } else { for (var G = 0, F = this.length; G < F; G++) { var E = o.data(this[G], "olddisplay"); if (!E && E !== "none") { o.data(this[G], "olddisplay", o.css(this[G], "display")) } } for (var G = 0, F = this.length; G < F; G++) { this[G].style.display = "none" } return this } }, _toggle: o.fn.toggle, toggle: function(G, F) { var E = typeof G === "boolean"; return o.isFunction(G) && o.isFunction(F) ? this._toggle.apply(this, arguments) : G == null || E ? this.each(function() { var H = E ? G : o(this).is(":hidden"); o(this)[H ? "show" : "hide"]() }) : this.animate(t("toggle", 3), G, F) }, fadeTo: function(E, G, F) { return this.animate({ opacity: G }, E, F) }, animate: function(I, F, H, G) { var E = o.speed(F, H, G); return this[E.queue === false ? "each" : "queue"](function() { var K = o.extend({}, E), M, L = this.nodeType == 1 && o(this).is(":hidden"), J = this; for (M in I) { if (I[M] == "hide" && L || I[M] == "show" && !L) { return K.complete.call(this) } if ((M == "height" || M == "width") && this.style) { K.display = o.css(this, "display"); K.overflow = this.style.overflow } } if (K.overflow != null) { this.style.overflow = "hidden" } K.curAnim = o.extend({}, I); o.each(I, function(O, S) { var R = new o.fx(J, K, O); if (/toggle|show|hide/.test(S)) { R[S == "toggle" ? L ? "show" : "hide" : S](I) } else { var Q = S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), T = R.cur(true) || 0; if (Q) { var N = parseFloat(Q[2]), P = Q[3] || "px"; if (P != "px") { J.style[O] = (N || 1) + P; T = ((N || 1) / R.cur(true)) * T; J.style[O] = T + P } if (Q[1]) { N = ((Q[1] == "-=" ? -1 : 1) * N) + T } R.custom(T, N, P) } else { R.custom(T, S, "") } } }); return true }) }, stop: function(F, E) { var G = o.timers; if (F) { this.queue([]) } this.each(function() { for (var H = G.length - 1; H >= 0; H--) { if (G[H].elem == this) { if (E) { G[H](true) } G.splice(H, 1) } } }); if (!E) { this.dequeue() } return this } }); o.each({ slideDown: t("show", 1), slideUp: t("hide", 1), slideToggle: t("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide"} }, function(E, F) { o.fn[E] = function(G, H) { return this.animate(F, G, H) } }); o.extend({ speed: function(G, H, F) { var E = typeof G === "object" ? G : { complete: F || !F && H || o.isFunction(G) && G, duration: G, easing: F && H || H && !o.isFunction(H) && H }; E.duration = o.fx.off ? 0 : typeof E.duration === "number" ? E.duration : o.fx.speeds[E.duration] || o.fx.speeds._default; E.old = E.complete; E.complete = function() { if (E.queue !== false) { o(this).dequeue() } if (o.isFunction(E.old)) { E.old.call(this) } }; return E }, easing: { linear: function(G, H, E, F) { return E + F * G }, swing: function(G, H, E, F) { return ((-Math.cos(G * Math.PI) / 2) + 0.5) * F + E } }, timers: [], fx: function(F, E, G) { this.options = E; this.elem = F; this.prop = G; if (!E.orig) { E.orig = {} } } }); o.fx.prototype = { update: function() { if (this.options.step) { this.options.step.call(this.elem, this.now, this) } (o.fx.step[this.prop] || o.fx.step._default)(this); if ((this.prop == "height" || this.prop == "width") && this.elem.style) { this.elem.style.display = "block" } }, cur: function(F) { if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) { return this.elem[this.prop] } var E = parseFloat(o.css(this.elem, this.prop, F)); return E && E > -10000 ? E : parseFloat(o.curCSS(this.elem, this.prop)) || 0 }, custom: function(I, H, G) { this.startTime = e(); this.start = I; this.end = H; this.unit = G || this.unit || "px"; this.now = this.start; this.pos = this.state = 0; var E = this; function F(J) { return E.step(J) } F.elem = this.elem; if (F() && o.timers.push(F) && !n) { n = setInterval(function() { var K = o.timers; for (var J = 0; J < K.length; J++) { if (!K[J]()) { K.splice(J--, 1) } } if (!K.length) { clearInterval(n); n = g } }, 13) } }, show: function() { this.options.orig[this.prop] = o.attr(this.elem.style, this.prop); this.options.show = true; this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur()); o(this.elem).show() }, hide: function() { this.options.orig[this.prop] = o.attr(this.elem.style, this.prop); this.options.hide = true; this.custom(this.cur(), 0) }, step: function(H) { var G = e(); if (H || G >= this.options.duration + this.startTime) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[this.prop] = true; var E = true; for (var F in this.options.curAnim) { if (this.options.curAnim[F] !== true) { E = false } } if (E) { if (this.options.display != null) { this.elem.style.overflow = this.options.overflow; this.elem.style.display = this.options.display; if (o.css(this.elem, "display") == "none") { this.elem.style.display = "block" } } if (this.options.hide) { o(this.elem).hide() } if (this.options.hide || this.options.show) { for (var I in this.options.curAnim) { o.attr(this.elem.style, I, this.options.orig[I]) } } this.options.complete.call(this.elem) } return false } else { var J = G - this.startTime; this.state = J / this.options.duration; this.pos = o.easing[this.options.easing || (o.easing.swing ? "swing" : "linear")](this.state, J, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); this.update() } return true } }; o.extend(o.fx, { speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function(E) { o.attr(E.elem.style, "opacity", E.now) }, _default: function(E) { if (E.elem.style && E.elem.style[E.prop] != null) { E.elem.style[E.prop] = E.now + E.unit } else { E.elem[E.prop] = E.now } } } }); if (document.documentElement.getBoundingClientRect) { o.fn.offset = function() { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return o.offset.bodyOffset(this[0]) } var G = this[0].getBoundingClientRect(), J = this[0].ownerDocument, F = J.body, E = J.documentElement, L = E.clientTop || F.clientTop || 0, K = E.clientLeft || F.clientLeft || 0, I = G.top + (self.pageYOffset || o.boxModel && E.scrollTop || F.scrollTop) - L, H = G.left + (self.pageXOffset || o.boxModel && E.scrollLeft || F.scrollLeft) - K; return { top: I, left: H} } } else { o.fn.offset = function() { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return o.offset.bodyOffset(this[0]) } o.offset.initialized || o.offset.initialize(); var J = this[0], G = J.offsetParent, F = J, O = J.ownerDocument, M, H = O.documentElement, K = O.body, L = O.defaultView, E = L.getComputedStyle(J, null), N = J.offsetTop, I = J.offsetLeft; while ((J = J.parentNode) && J !== K && J !== H) { M = L.getComputedStyle(J, null); N -= J.scrollTop, I -= J.scrollLeft; if (J === G) { N += J.offsetTop, I += J.offsetLeft; if (o.offset.doesNotAddBorder && !(o.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(J.tagName))) { N += parseInt(M.borderTopWidth, 10) || 0, I += parseInt(M.borderLeftWidth, 10) || 0 } F = G, G = J.offsetParent } if (o.offset.subtractsBorderForOverflowNotVisible && M.overflow !== "visible") { N += parseInt(M.borderTopWidth, 10) || 0, I += parseInt(M.borderLeftWidth, 10) || 0 } E = M } if (E.position === "relative" || E.position === "static") { N += K.offsetTop, I += K.offsetLeft } if (E.position === "fixed") { N += Math.max(H.scrollTop, K.scrollTop), I += Math.max(H.scrollLeft, K.scrollLeft) } return { top: N, left: I} } } o.offset = { initialize: function() { if (this.initialized) { return } var L = document.body, F = document.createElement("div"), H, G, N, I, M, E, J = L.style.marginTop, K = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>'; M = { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" }; for (E in M) { F.style[E] = M[E] } F.innerHTML = K; L.insertBefore(F, L.firstChild); H = F.firstChild, G = H.firstChild, I = H.nextSibling.firstChild.firstChild; this.doesNotAddBorder = (G.offsetTop !== 5); this.doesAddBorderForTableAndCells = (I.offsetTop === 5); H.style.overflow = "hidden", H.style.position = "relative"; this.subtractsBorderForOverflowNotVisible = (G.offsetTop === -5); L.style.marginTop = "1px"; this.doesNotIncludeMarginInBodyOffset = (L.offsetTop === 0); L.style.marginTop = J; L.removeChild(F); this.initialized = true }, bodyOffset: function(E) { o.offset.initialized || o.offset.initialize(); var G = E.offsetTop, F = E.offsetLeft; if (o.offset.doesNotIncludeMarginInBodyOffset) { G += parseInt(o.curCSS(E, "marginTop", true), 10) || 0, F += parseInt(o.curCSS(E, "marginLeft", true), 10) || 0 } return { top: G, left: F} } }; o.fn.extend({ position: function() { var I = 0, H = 0, F; if (this[0]) { var G = this.offsetParent(), J = this.offset(), E = /^body|html$/i.test(G[0].tagName) ? { top: 0, left: 0} : G.offset(); J.top -= j(this, "marginTop"); J.left -= j(this, "marginLeft"); E.top += j(G, "borderTopWidth"); E.left += j(G, "borderLeftWidth"); F = { top: J.top - E.top, left: J.left - E.left} } return F }, offsetParent: function() { var E = this[0].offsetParent || document.body; while (E && (!/^body|html$/i.test(E.tagName) && o.css(E, "position") == "static")) { E = E.offsetParent } return o(E) } }); o.each(["Left", "Top"], function(F, E) { var G = "scroll" + E; o.fn[G] = function(H) { if (!this[0]) { return null } return H !== g ? this.each(function() { this == l || this == document ? l.scrollTo(!F ? H : o(l).scrollLeft(), F ? H : o(l).scrollTop()) : this[G] = H }) : this[0] == l || this[0] == document ? self[F ? "pageYOffset" : "pageXOffset"] || o.boxModel && document.documentElement[G] || document.body[G] : this[0][G] } }); o.each(["Height", "Width"], function(I, G) { var E = I ? "Left" : "Top", H = I ? "Right" : "Bottom", F = G.toLowerCase(); o.fn["inner" + G] = function() { return this[0] ? o.css(this[0], F, false, "padding") : null }; o.fn["outer" + G] = function(K) { return this[0] ? o.css(this[0], F, false, K ? "margin" : "border") : null }; var J = G.toLowerCase(); o.fn[J] = function(K) { return this[0] == l ? document.compatMode == "CSS1Compat" && document.documentElement["client" + G] || document.body["client" + G] : this[0] == document ? Math.max(document.documentElement["client" + G], document.body["scroll" + G], document.documentElement["scroll" + G], document.body["offset" + G], document.documentElement["offset" + G]) : K === g ? (this.length ? o.css(this[0], J) : null) : this.css(J, typeof K === "string" ? K : K + "px") } })})();/*Corner*/(function($) { var expr = (function() { var div = document.createElement('div'); try { div.style.setExpression('width', '0+0') } catch (e) { return false } return true })(); function sz(el, p) { return parseInt($.css(el, p)) || 0 }; function hex2(s) { var s = parseInt(s).toString(16); return (s.length < 2) ? '0' + s : s }; function gpc(node) { for (; node && node.nodeName.toLowerCase() != 'html'; node = node.parentNode) { var v = $.css(node, 'backgroundColor'); if (v.indexOf('rgb') >= 0) { if ($.browser.safari && v == 'rgba(0, 0, 0, 0)') continue; var rgb = v.match(/\d+/g); return '#' + hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]) } if (v && v != 'transparent') return v } return '#ffffff' }; function getWidth(fx, i, width) { switch (fx) { case 'round': return Math.round(width * (1 - Math.cos(Math.asin(i / width)))); case 'cool': return Math.round(width * (1 + Math.cos(Math.asin(i / width)))); case 'sharp': return Math.round(width * (1 - Math.cos(Math.acos(i / width)))); case 'bite': return Math.round(width * (Math.cos(Math.asin((width - i - 1) / width)))); case 'slide': return Math.round(width * (Math.atan2(i, width / i))); case 'jut': return Math.round(width * (Math.atan2(width, (width - i - 1)))); case 'curl': return Math.round(width * (Math.atan(i))); case 'tear': return Math.round(width * (Math.cos(i))); case 'wicked': return Math.round(width * (Math.tan(i))); case 'long': return Math.round(width * (Math.sqrt(i))); case 'sculpt': return Math.round(width * (Math.log((width - i - 1), width))); case 'dog': return (i & 1) ? (i + 1) : width; case 'dog2': return (i & 2) ? (i + 1) : width; case 'dog3': return (i & 3) ? (i + 1) : width; case 'fray': return (i % 2) * width; case 'notch': return width; case 'bevel': return i + 1 } }; $.fn.corner = function(o) { if (this.length == 0) { if (!$.isReady && this.selector) { var s = this.selector, c = this.context; $(function() { $(s, c).corner(o) }) } return this } o = (o || "").toLowerCase(); var keep = /keep/.test(o); var cc = ((o.match(/cc:(#[0-9a-f]+)/) || [])[1]); var sc = ((o.match(/sc:(#[0-9a-f]+)/) || [])[1]); var width = parseInt((o.match(/(\d+)px/) || [])[1]) || 10; var re = /round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/; var fx = ((o.match(re) || ['round'])[0]); var edges = { T: 0, B: 1 }; var opts = { TL: /top|tl/.test(o), TR: /top|tr/.test(o), BL: /bottom|bl/.test(o), BR: /bottom|br/.test(o) }; if (!opts.TL && !opts.TR && !opts.BL && !opts.BR) opts = { TL: 1, TR: 1, BL: 1, BR: 1 }; var strip = document.createElement('div'); strip.style.overflow = 'hidden'; strip.style.height = '1px'; strip.style.backgroundColor = sc || 'transparent'; strip.style.borderStyle = 'solid'; return this.each(function(index) { var pad = { T: parseInt($.css(this, 'paddingTop')) || 0, R: parseInt($.css(this, 'paddingRight')) || 0, B: parseInt($.css(this, 'paddingBottom')) || 0, L: parseInt($.css(this, 'paddingLeft')) || 0 }; if (typeof this.style.zoom != undefined) this.style.zoom = 1; if (!keep) this.style.border = 'none'; strip.style.borderColor = cc || gpc(this.parentNode); var cssHeight = $.curCSS(this, 'height'); for (var j in edges) { var bot = edges[j]; if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) { strip.style.borderStyle = 'none ' + (opts[j + 'R'] ? 'solid' : 'none') + ' none ' + (opts[j + 'L'] ? 'solid' : 'none'); var d = document.createElement('div'); $(d).addClass('jquery-corner'); var ds = d.style; bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild); if (bot && cssHeight != 'auto') { if ($.css(this, 'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.bottom = ds.left = ds.padding = ds.margin = '0'; if (expr) ds.setExpression('width', 'this.parentNode.offsetWidth'); else ds.width = '100%' } else if (!bot && $.browser.msie) { if ($.css(this, 'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.top = ds.left = ds.right = ds.padding = ds.margin = '0'; if (expr) { var bw = sz(this, 'borderLeftWidth') + sz(this, 'borderRightWidth'); ds.setExpression('width', 'this.parentNode.offsetWidth - ' + bw + '+ "px"') } else ds.width = '100%' } else { ds.margin = !bot ? '-' + pad.T + 'px -' + pad.R + 'px ' + (pad.T - width) + 'px -' + pad.L + 'px' : (pad.B - width) + 'px -' + pad.R + 'px -' + pad.B + 'px -' + pad.L + 'px' } for (var i = 0; i < width; i++) { var w = Math.max(0, getWidth(fx, i, width)); var e = strip.cloneNode(false); e.style.borderWidth = '0 ' + (opts[j + 'R'] ? w : 0) + 'px 0 ' + (opts[j + 'L'] ? w : 0) + 'px'; bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild) } } } }) }; $.fn.uncorner = function() { $('div.jquery-corner', this).remove(); return this } })(jQuery);/*hoverpulse*/(function($) { $.fn.hoverpulse = function(options) { if (this.length == 0) { if (!$.isReady && this.selector) { var s = this.selector, c = this.context; $(function() { $(s, c).hoverpulse(options) }) } return this } var opts = $.extend({}, $.fn.hoverpulse.defaults, options); this.parent().css({ position: 'relative' }); this.css({ position: 'absolute', top: 0, left: 0 }); this.each(function() { var $this = $(this); var w = $this.width(), h = $this.height(); $this.data('hoverpulse.size', { w: parseInt(w), h: parseInt(h) }) }); return this.hover(function() { var $this = $(this); $this.parent().css('z-index', opts.zIndexActive); var size = $this.data('hoverpulse.size'); var w = size.w, h = size.h; $this.stop().animate({ top: ('-' + opts.size + 'px'), left: ('-' + opts.size + 'px'), height: (h + 2 * opts.size) + 'px', width: (w + 2 * opts.size) + 'px' }, opts.speed) }, function() { var $this = $(this); var size = $this.data('hoverpulse.size'); var w = size.w, h = size.h; $this.stop().animate({ top: 0, left: 0, height: (h + 'px'), width: (w + 'px') }, opts.speed, function() { $this.parent().css('z-index', opts.zIndexNormal) }) }) }; $.fn.hoverpulse.defaults = { size: 20, speed: 200, zIndexActive: 100, zIndexNormal: 1} })(jQuery);var $j = jQuery.noConflict();var Prototype = { Version: '1.5.1', Browser: { IE: !!(window.attachEvent && !window.opera), Opera: !!window.opera, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1 }, BrowserFeatures: { XPath: !!document.evaluate, ElementExtensions: !!window.HTMLElement, SpecificElementExtensions: (document.createElement('div').__proto__ !== document.createElement('form').__proto__) }, ScriptFragment: '<script[^>]*>([\u0001-\uFFFF]*?)</script>', JSONFilter: /^\/\*-secure-\s*(.*)\s*\*\/\s*$/, emptyFunction: function() { }, K: function(x) { return x } }; var Class = { create: function() { return function() { this.initialize.apply(this, arguments) } } }; var Abstract = new Object(); Object.extend = function(a, b) { for (var c in b) { a[c] = b[c] } return a }; Object.extend(Object, { inspect: function(a) { try { if (a === undefined) return 'undefined'; if (a === null) return 'null'; return a.inspect ? a.inspect() : a.toString() } catch (e) { if (e instanceof RangeError) return '...'; throw e; } }, toJSON: function(a) { var b = typeof a; switch (b) { case 'undefined': case 'function': case 'unknown': return; case 'boolean': return a.toString() } if (a === null) return 'null'; if (a.toJSON) return a.toJSON(); if (a.ownerDocument === document) return; var c = []; for (var d in a) { var e = Object.toJSON(a[d]); if (e !== undefined) c.push(d.toJSON() + ': ' + e) } return '{' + c.join(', ') + '}' }, keys: function(a) { var b = []; for (var c in a) b.push(c); return b }, values: function(a) { var b = []; for (var c in a) b.push(a[c]); return b }, clone: function(a) { return Object.extend({}, a) } }); Function.prototype.bind = function() { var a = this, args = $A(arguments), object = args.shift(); return function() { return a.apply(object, args.concat($A(arguments))) } }; Function.prototype.bindAsEventListener = function(b) { var c = this, args = $A(arguments), b = args.shift(); return function(a) { return c.apply(b, [a || window.event].concat(args)) } }; Object.extend(Number.prototype, { toColorPart: function() { return this.toPaddedString(2, 16) }, succ: function() { return this + 1 }, times: function(a) { $R(0, this, true).each(a); return this }, toPaddedString: function(a, b) { var c = this.toString(b || 10); return '0'.times(a - c.length) + c }, toJSON: function() { return isFinite(this) ? this.toString() : 'null' } }); Date.prototype.toJSON = function() { return '"' + this.getFullYear() + '-' + (this.getMonth() + 1).toPaddedString(2) + '-' + this.getDate().toPaddedString(2) + 'T' + this.getHours().toPaddedString(2) + ':' + this.getMinutes().toPaddedString(2) + ':' + this.getSeconds().toPaddedString(2) + '"' }; var Try = { these: function() { var a; for (var i = 0, length = arguments.length; i < length; i++) { var b = arguments[i]; try { a = b(); break } catch (e) { } } return a } }; var PeriodicalExecuter = Class.create(); PeriodicalExecuter.prototype = { initialize: function(a, b) { this.callback = a; this.frequency = b; this.currentlyExecuting = false; this.registerCallback() }, registerCallback: function() { this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000) }, stop: function() { if (!this.timer) return; clearInterval(this.timer); this.timer = null }, onTimerEvent: function() { if (!this.currentlyExecuting) { try { this.currentlyExecuting = true; this.callback(this) } finally { this.currentlyExecuting = false } } } }; Object.extend(String, { interpret: function(a) { return a == null ? '' : String(a) }, specialChar: { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '\\': '\\\\'} }); Object.extend(String.prototype, { gsub: function(a, b) { var c = '', source = this, match; b = arguments.callee.prepareReplacement(b); while (source.length > 0) { if (match = source.match(a)) { c += source.slice(0, match.index); c += String.interpret(b(match)); source = source.slice(match.index + match[0].length) } else { c += source, source = '' } } return c }, sub: function(b, c, d) { c = this.gsub.prepareReplacement(c); d = d === undefined ? 1 : d; return this.gsub(b, function(a) { if (--d < 0) return a[0]; return c(a) }) }, scan: function(a, b) { this.gsub(a, b); return this }, truncate: function(a, b) { a = a || 30; b = b === undefined ? '...' : b; return this.length > a ? this.slice(0, a - b.length) + b : this }, strip: function() { return this.replace(/^\s+/, '').replace(/\s+$/, '') }, stripTags: function() { return this.replace(/<\/?[^>]+>/gi, '') }, stripScripts: function() { return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '') }, extractScripts: function() { var b = new RegExp(Prototype.ScriptFragment, 'img'); var c = new RegExp(Prototype.ScriptFragment, 'im'); return (this.match(b) || []).map(function(a) { return (a.match(c) || ['', ''])[1] }) }, evalScripts: function() { return this.extractScripts().map(function(a) { return eval(a) }) }, escapeHTML: function() { var a = arguments.callee; a.text.data = this; return a.div.innerHTML }, unescapeHTML: function() { var c = document.createElement('div'); c.innerHTML = this.stripTags(); return c.childNodes[0] ? (c.childNodes.length > 1 ? $A(c.childNodes).inject('', function(a, b) { return a + b.nodeValue }) : c.childNodes[0].nodeValue) : '' }, toQueryParams: function(e) { var f = this.strip().match(/([^?#]*)(#.*)?$/); if (!f) return {}; return f[1].split(e || '&').inject({}, function(a, b) { if ((b = b.split('='))[0]) { var c = decodeURIComponent(b.shift()); var d = b.length > 1 ? b.join('=') : b[0]; if (d != undefined) d = decodeURIComponent(d); if (c in a) { if (a[c].constructor != Array) a[c] = [a[c]]; a[c].push(d) } else a[c] = d } return a }) }, toArray: function() { return this.split('') }, succ: function() { return this.slice(0, this.length - 1) + String.fromCharCode(this.charCodeAt(this.length - 1) + 1) }, times: function(a) { var b = ''; for (var i = 0; i < a; i++) b += this; return b }, camelize: function() { var a = this.split('-'), len = a.length; if (len == 1) return a[0]; var b = this.charAt(0) == '-' ? a[0].charAt(0).toUpperCase() + a[0].substring(1) : a[0]; for (var i = 1; i < len; i++) b += a[i].charAt(0).toUpperCase() + a[i].substring(1); return b }, capitalize: function() { return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase() }, underscore: function() { return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/, '#{1}_#{2}').gsub(/([a-z\d])([A-Z])/, '#{1}_#{2}').gsub(/-/, '_').toLowerCase() }, dasherize: function() { return this.gsub(/_/, '-') }, inspect: function(c) { var d = this.gsub(/[\x00-\x1f\\]/, function(a) { var b = String.specialChar[a[0]]; return b ? b : '\\u00' + a[0].charCodeAt().toPaddedString(2, 16) }); if (c) return '"' + d.replace(/"/g, '\\"') + '"'; return "'" + d.replace(/'/g, '\\\'') + "'" }, toJSON: function() { return this.inspect(true) }, unfilterJSON: function(a) { return this.sub(a || Prototype.JSONFilter, '#{1}') }, evalJSON: function(a) { var b = this.unfilterJSON(); try { if (!a || (new RegExp('^("(\\\\.|[^"\\\\\\n\\r])' + '*' + '?"|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$').test(b))) { return eval('(' + b + ')') } } catch (e) { } throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); }, include: function(a) { return this.indexOf(a) > -1 }, startsWith: function(a) { return this.indexOf(a) === 0 }, endsWith: function(a) { var d = this.length - a.length; return d >= 0 && this.lastIndexOf(a) === d }, empty: function() { return this == '' }, blank: function() { return /^\s*$/.test(this) } }); if (Prototype.Browser.WebKit || Prototype.Browser.IE) { Object.extend(String.prototype, { escapeHTML: function() { return this.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;') }, unescapeHTML: function() { return this.replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>') } }) } String.prototype.gsub.prepareReplacement = function(b) { if (typeof b == 'function') return b; var c = new Template(b); return function(a) { return c.evaluate(a) } }; String.prototype.parseQuery = String.prototype.toQueryParams; Object.extend(String.prototype.escapeHTML, { div: document.createElement('div'), text: document.createTextNode('') }); with (String.prototype.escapeHTML) div.appendChild(text); var Template = Class.create(); Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; Template.prototype = { initialize: function(a, b) { this.template = a.toString(); this.pattern = b || Template.Pattern }, evaluate: function(c) { return this.template.gsub(this.pattern, function(a) { var b = a[1]; if (b == '\\') return a[2]; return b + String.interpret(c[a[3]]) }) } }; var $break = {}; var $continue = new Error('"throw $continue" is deprecated, use "return" instead'); var Enumerable = { each: function(b) { var c = 0; try { this._each(function(a) { b(a, c++) }) } catch (e) { if (e != $break) throw e; } return this }, eachSlice: function(a, b) { var c = -a, slices = [], array = this.toArray(); while ((c += a) < array.length) slices.push(array.slice(c, c + a)); return slices.map(b) }, all: function(c) { var d = true; this.each(function(a, b) { d = d && !!(c || Prototype.K)(a, b); if (!d) throw $break; }); return d }, any: function(c) { var d = false; this.each(function(a, b) { if (d = !!(c || Prototype.K)(a, b)) throw $break; }); return d }, collect: function(c) { var d = []; this.each(function(a, b) { d.push((c || Prototype.K)(a, b)) }); return d }, detect: function(c) { var d; this.each(function(a, b) { if (c(a, b)) { d = a; throw $break; } }); return d }, findAll: function(c) { var d = []; this.each(function(a, b) { if (c(a, b)) d.push(a) }); return d }, grep: function(d, e) { var f = []; this.each(function(a, b) { var c = a.toString(); if (c.match(d)) f.push((e || Prototype.K)(a, b)) }); return f }, include: function(b) { var c = false; this.each(function(a) { if (a == b) { c = true; throw $break; } }); return c }, inGroupsOf: function(b, c) { c = c === undefined ? null : c; return this.eachSlice(b, function(a) { while (a.length < b) a.push(c); return a }) }, inject: function(c, d) { this.each(function(a, b) { c = d(c, a, b) }); return c }, invoke: function(b) { var c = $A(arguments).slice(1); return this.map(function(a) { return a[b].apply(a, c) }) }, max: function(c) { var d; this.each(function(a, b) { a = (c || Prototype.K)(a, b); if (d == undefined || a >= d) d = a }); return d }, min: function(c) { var d; this.each(function(a, b) { a = (c || Prototype.K)(a, b); if (d == undefined || a < d) d = a }); return d }, partition: function(c) { var d = [], falses = []; this.each(function(a, b) { ((c || Prototype.K)(a, b) ? d : falses).push(a) }); return [d, falses] }, pluck: function(c) { var d = []; this.each(function(a, b) { d.push(a[c]) }); return d }, reject: function(c) { var d = []; this.each(function(a, b) { if (!c(a, b)) d.push(a) }); return d }, sortBy: function(e) { return this.map(function(a, b) { return { value: a, criteria: e(a, b)} }).sort(function(c, d) { var a = c.criteria, b = d.criteria; return a < b ? -1 : a > b ? 1 : 0 }).pluck('value') }, toArray: function() { return this.map() }, zip: function() { var c = Prototype.K, args = $A(arguments); if (typeof args.last() == 'function') c = args.pop(); var d = [this].concat(args).map($A); return this.map(function(a, b) { return c(d.pluck(b)) }) }, size: function() { return this.toArray().length }, inspect: function() { return '#<Enumerable:' + this.toArray().inspect() + '>' } }; Object.extend(Enumerable, { map: Enumerable.collect, find: Enumerable.detect, select: Enumerable.findAll, member: Enumerable.include, entries: Enumerable.toArray }); var $A = Array.from = function(a) { if (!a) return []; if (a.toArray) { return a.toArray() } else { var b = []; for (var i = 0, length = a.length; i < length; i++) b.push(a[i]); return b } }; if (Prototype.Browser.WebKit) { $A = Array.from = function(a) { if (!a) return []; if (!(typeof a == 'function' && a == '[object NodeList]') && a.toArray) { return a.toArray() } else { var b = []; for (var i = 0, length = a.length; i < length; i++) b.push(a[i]); return b } } } Object.extend(Array.prototype, Enumerable); if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse; Object.extend(Array.prototype, { _each: function(a) { for (var i = 0, length = this.length; i < length; i++) a(this[i]) }, clear: function() { this.length = 0; return this }, first: function() { return this[0] }, last: function() { return this[this.length - 1] }, compact: function() { return this.select(function(a) { return a != null }) }, flatten: function() { return this.inject([], function(a, b) { return a.concat(b && b.constructor == Array ? b.flatten() : [b]) }) }, without: function() { var b = $A(arguments); return this.select(function(a) { return !b.include(a) }) }, indexOf: function(a) { for (var i = 0, length = this.length; i < length; i++) if (this[i] == a) return i; return -1 }, reverse: function(a) { return (a !== false ? this : this.toArray())._reverse() }, reduce: function() { return this.length > 1 ? this : this[0] }, uniq: function(d) { return this.inject([], function(a, b, c) { if (0 == c || (d ? a.last() != b : !a.include(b))) a.push(b); return a }) }, clone: function() { return [].concat(this) }, size: function() { return this.length }, inspect: function() { return '[' + this.map(Object.inspect).join(', ') + ']' }, toJSON: function() { var c = []; this.each(function(a) { var b = Object.toJSON(a); if (b !== undefined) c.push(b) }); return '[' + c.join(', ') + ']' } }); Array.prototype.toArray = Array.prototype.clone; function $w(a) { a = a.strip(); return a ? a.split(/\s+/) : [] } if (Prototype.Browser.Opera) { Array.prototype.concat = function() { var a = []; for (var i = 0, length = this.length; i < length; i++) a.push(this[i]); for (var i = 0, length = arguments.length; i < length; i++) { if (arguments[i].constructor == Array) { for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) a.push(arguments[i][j]) } else { a.push(arguments[i]) } } return a } } var Hash = function(a) { if (a instanceof Hash) this.merge(a); else Object.extend(this, a || {}) }; Object.extend(Hash, { toQueryString: function(d) { var e = []; e.add = arguments.callee.addPair; this.prototype._each.call(d, function(b) { if (!b.key) return; var c = b.value; if (c && typeof c == 'object') { if (c.constructor == Array) c.each(function(a) { e.add(b.key, a) }); return } e.add(b.key, c) }); return e.join('&') }, toJSON: function(c) { var d = []; this.prototype._each.call(c, function(a) { var b = Object.toJSON(a.value); if (b !== undefined) d.push(a.key.toJSON() + ': ' + b) }); return '{' + d.join(', ') + '}' } }); Hash.toQueryString.addPair = function(a, b, c) { a = encodeURIComponent(a); if (b === undefined) this.push(a); else this.push(a + '=' + (b == null ? '' : encodeURIComponent(b))) }; Object.extend(Hash.prototype, Enumerable); Object.extend(Hash.prototype, { _each: function(a) { for (var b in this) { var c = this[b]; if (c && c == Hash.prototype[b]) continue; var d = [b, c]; d.key = b; d.value = c; a(d) } }, keys: function() { return this.pluck('key') }, values: function() { return this.pluck('value') }, merge: function(c) { return $H(c).inject(this, function(a, b) { a[b.key] = b.value; return a }) }, remove: function() { var a; for (var i = 0, length = arguments.length; i < length; i++) { var b = this[arguments[i]]; if (b !== undefined) { if (a === undefined) a = b; else { if (a.constructor != Array) a = [a]; a.push(b) } } delete this[arguments[i]] } return a }, toQueryString: function() { return Hash.toQueryString(this) }, inspect: function() { return '#<Hash:{' + this.map(function(a) { return a.map(Object.inspect).join(': ') }).join(', ') + '}>' }, toJSON: function() { return Hash.toJSON(this) } }); function $H(a) { if (a instanceof Hash) return a; return new Hash(a) }; if (function() { var i = 0, Test = function(a) { this.key = a }; Test.prototype.key = 'foo'; for (var b in new Test('bar')) i++; return i > 1 } ()) Hash.prototype._each = function(a) { var b = []; for (var c in this) { var d = this[c]; if ((d && d == Hash.prototype[c]) || b.include(c)) continue; b.push(c); var e = [c, d]; e.key = c; e.value = d; a(e) } }; ObjectRange = Class.create(); Object.extend(ObjectRange.prototype, Enumerable); Object.extend(ObjectRange.prototype, { initialize: function(a, b, c) { this.start = a; this.end = b; this.exclusive = c }, _each: function(a) { var b = this.start; while (this.include(b)) { a(b); b = b.succ() } }, include: function(a) { if (a < this.start) return false; if (this.exclusive) return a < this.end; return a <= this.end } }); var $R = function(a, b, c) { return new ObjectRange(a, b, c) }; var Ajax = { getTransport: function() { return Try.these(function() { return new XMLHttpRequest() }, function() { return new ActiveXObject('Msxml2.XMLHTTP') }, function() { return new ActiveXObject('Microsoft.XMLHTTP') }) || false }, activeRequestCount: 0 }; Ajax.Responders = { responders: [], _each: function(a) { this.responders._each(a) }, register: function(a) { if (!this.include(a)) this.responders.push(a) }, unregister: function(a) { this.responders = this.responders.without(a) }, dispatch: function(b, c, d, f) { this.each(function(a) { if (typeof a[b] == 'function') { try { a[b].apply(a, [c, d, f]) } catch (e) { } } }) } }; Object.extend(Ajax.Responders, Enumerable); Ajax.Responders.register({ onCreate: function() { Ajax.activeRequestCount++ }, onComplete: function() { Ajax.activeRequestCount-- } }); Ajax.Base = function() { }; Ajax.Base.prototype = { setOptions: function(a) { this.options = { method: 'post', asynchronous: true, contentType: 'application/x-www-form-urlencoded', encoding: 'UTF-8', parameters: '' }; Object.extend(this.options, a || {}); this.options.method = this.options.method.toLowerCase(); if (typeof this.options.parameters == 'string') this.options.parameters = this.options.parameters.toQueryParams() } }; Ajax.Request = Class.create(); Ajax.Request.Events = ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; Ajax.Request.prototype = Object.extend(new Ajax.Base(), { _complete: false, initialize: function(a, b) { this.transport = Ajax.getTransport(); this.setOptions(b); this.request(a) }, request: function(a) { this.url = a; this.method = this.options.method; var b = Object.clone(this.options.parameters); if (!['get', 'post'].include(this.method)) { b['_method'] = this.method; this.method = 'post' } this.parameters = b; if (b = Hash.toQueryString(b)) { if (this.method == 'get') this.url += (this.url.include('?') ? '&' : '?') + b; else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) b += '&_=' } try { if (this.options.onCreate) this.options.onCreate(this.transport); Ajax.Responders.dispatch('onCreate', this, this.transport); this.transport.open(this.method.toUpperCase(), this.url, this.options.asynchronous); if (this.options.asynchronous) setTimeout(function() { this.respondToReadyState(1) } .bind(this), 10); this.transport.onreadystatechange = this.onStateChange.bind(this); this.setRequestHeaders(); this.body = this.method == 'post' ? (this.options.postBody || b) : null; this.transport.send(this.body); if (!this.options.asynchronous && this.transport.overrideMimeType) this.onStateChange() } catch (e) { this.dispatchException(e) } }, onStateChange: function() { var a = this.transport.readyState; if (a > 1 && !((a == 4) && this._complete)) this.respondToReadyState(this.transport.readyState) }, setRequestHeaders: function() { var b = { 'X-Requested-With': 'XMLHttpRequest', 'X-Prototype-Version': Prototype.Version, 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' }; if (this.method == 'post') { b['Content-type'] = this.options.contentType + (this.options.encoding ? '; charset=' + this.options.encoding : ''); if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0, 2005])[1] < 2005) b['Connection'] = 'close' } if (typeof this.options.requestHeaders == 'object') { var c = this.options.requestHeaders; if (typeof c.push == 'function') for (var i = 0, length = c.length; i < length; i += 2) b[c[i]] = c[i + 1]; else $H(c).each(function(a) { b[a.key] = a.value }) } for (var d in b) this.transport.setRequestHeader(d, b[d]) }, success: function() { return !this.transport.status || (this.transport.status >= 200 && this.transport.status < 300) }, respondToReadyState: function(a) { var b = Ajax.Request.Events[a]; var c = this.transport, json = this.evalJSON(); if (b == 'Complete') { try { this._complete = true; (this.options['on' + this.transport.status] || this.options['on' + (this.success() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(c, json) } catch (e) { this.dispatchException(e) } var d = this.getHeader('Content-type'); if (d && d.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) this.evalResponse() } try { (this.options['on' + b] || Prototype.emptyFunction)(c, json); Ajax.Responders.dispatch('on' + b, this, c, json) } catch (e) { this.dispatchException(e) } if (b == 'Complete') { this.transport.onreadystatechange = Prototype.emptyFunction } }, getHeader: function(a) { try { return this.transport.getResponseHeader(a) } catch (e) { return null } }, evalJSON: function() { try { var a = this.getHeader('X-JSON'); return a ? a.evalJSON() : null } catch (e) { return null } }, evalResponse: function() { try { return eval((this.transport.responseText || '').unfilterJSON()) } catch (e) { this.dispatchException(e) } }, dispatchException: function(a) { (this.options.onException || Prototype.emptyFunction)(this, a); Ajax.Responders.dispatch('onException', this, a) } }); Ajax.Updater = Class.create(); Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { initialize: function(c, d, e) { this.container = { success: (c.success || c), failure: (c.failure || (c.success ? null : c)) }; this.transport = Ajax.getTransport(); this.setOptions(e); var f = this.options.onComplete || Prototype.emptyFunction; this.options.onComplete = (function(a, b) { this.updateContent(); f(a, b) }).bind(this); this.request(d) }, updateContent: function() { var a = this.container[this.success() ? 'success' : 'failure']; var b = this.transport.responseText; if (!this.options.evalScripts) b = b.stripScripts(); if (a = $(a)) { if (this.options.insertion) new this.options.insertion(a, b); else a.update(b) } if (this.success()) { if (this.onComplete) setTimeout(this.onComplete.bind(this), 10) } } }); Ajax.PeriodicalUpdater = Class.create(); Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { initialize: function(a, b, c) { this.setOptions(c); this.onComplete = this.options.onComplete; this.frequency = (this.options.frequency || 2); this.decay = (this.options.decay || 1); this.updater = {}; this.container = a; this.url = b; this.start() }, start: function() { this.options.onComplete = this.updateComplete.bind(this); this.onTimerEvent() }, stop: function() { this.updater.options.onComplete = undefined; clearTimeout(this.timer); (this.onComplete || Prototype.emptyFunction).apply(this, arguments) }, updateComplete: function(a) { if (this.options.decay) { this.decay = (a.responseText == this.lastText ? this.decay * this.options.decay : 1); this.lastText = a.responseText } this.timer = setTimeout(this.onTimerEvent.bind(this), this.decay * this.frequency * 1000) }, onTimerEvent: function() { this.updater = new Ajax.Updater(this.container, this.url, this.options) } }); function $(a) { if (arguments.length > 1) { for (var i = 0, elements = [], length = arguments.length; i < length; i++) elements.push($(arguments[i])); return elements } if (typeof a == 'string') a = document.getElementById(a); return Element.extend(a) } if (Prototype.BrowserFeatures.XPath) { document._getElementsByXPath = function(a, b) { var c = []; var d = document.evaluate(a, $(b) || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0, length = d.snapshotLength; i < length; i++) c.push(d.snapshotItem(i)); return c }; document.getElementsByClassName = function(a, b) { var q = ".//*[contains(concat(' ', @class, ' '), ' " + a + " ')]"; return document._getElementsByXPath(q, b) } } else { document.getElementsByClassName = function(a, b) { var c = ($(b) || document.body).getElementsByTagName('*'); var d = [], child; for (var i = 0, length = c.length; i < length; i++) { child = c[i]; if (Element.hasClassName(child, a)) d.push(Element.extend(child)) } return d } } if (!window.Element) var Element = {}; Element.extend = function(a) { var F = Prototype.BrowserFeatures; if (!a || !a.tagName || a.nodeType == 3 || a._extended || F.SpecificElementExtensions || a == window) return a; var b = {}, tagName = a.tagName, cache = Element.extend.cache, T = Element.Methods.ByTag; if (!F.ElementExtensions) { Object.extend(b, Element.Methods), Object.extend(b, Element.Methods.Simulated) } if (T[tagName]) Object.extend(b, T[tagName]); for (var c in b) { var d = b[c]; if (typeof d == 'function' && !(c in a)) a[c] = cache.findOrStore(d) } a._extended = Prototype.emptyFunction; return a }; Element.extend.cache = { findOrStore: function(a) { return this[a] = this[a] || function() { return a.apply(null, [this].concat($A(arguments))) } } }; Element.Methods = { visible: function(a) { return $(a).style.display != 'none' }, toggle: function(a) { a = $(a); Element[Element.visible(a) ? 'hide' : 'show'](a); return a }, hide: function(a) { $(a).style.display = 'none'; return a }, show: function(a) { $(a).style.display = ''; return a }, remove: function(a) { a = $(a); a.parentNode.removeChild(a); return a }, update: function(a, b) { b = typeof b == 'undefined' ? '' : b.toString(); $(a).innerHTML = b.stripScripts(); setTimeout(function() { b.evalScripts() }, 10); return a }, replace: function(a, b) { a = $(a); b = typeof b == 'undefined' ? '' : b.toString(); if (a.outerHTML) { a.outerHTML = b.stripScripts() } else { var c = a.ownerDocument.createRange(); c.selectNodeContents(a); a.parentNode.replaceChild(c.createContextualFragment(b.stripScripts()), a) } setTimeout(function() { b.evalScripts() }, 10); return a }, inspect: function(d) { d = $(d); var e = '<' + d.tagName.toLowerCase(); $H({ 'id': 'id', 'className': 'class' }).each(function(a) { var b = a.first(), attribute = a.last(); var c = (d[b] || '').toString(); if (c) e += ' ' + attribute + '=' + c.inspect(true) }); return e + '>' }, recursivelyCollect: function(a, b) { a = $(a); var c = []; while (a = a[b]) if (a.nodeType == 1) c.push(Element.extend(a)); return c }, ancestors: function(a) { return $(a).recursivelyCollect('parentNode') }, descendants: function(a) { return $A($(a).getElementsByTagName('*')).each(Element.extend) }, firstDescendant: function(a) { a = $(a).firstChild; while (a && a.nodeType != 1) a = a.nextSibling; return $(a) }, immediateDescendants: function(a) { if (!(a = $(a).firstChild)) return []; while (a && a.nodeType != 1) a = a.nextSibling; if (a) return [a].concat($(a).nextSiblings()); return [] }, previousSiblings: function(a) { return $(a).recursivelyCollect('previousSibling') }, nextSiblings: function(a) { return $(a).recursivelyCollect('nextSibling') }, siblings: function(a) { a = $(a); return a.previousSiblings().reverse().concat(a.nextSiblings()) }, match: function(a, b) { if (typeof b == 'string') b = new Selector(b); return b.match($(a)) }, up: function(a, b, c) { a = $(a); if (arguments.length == 1) return $(a.parentNode); var d = a.ancestors(); return b ? Selector.findElement(d, b, c) : d[c || 0] }, down: function(a, b, c) { a = $(a); if (arguments.length == 1) return a.firstDescendant(); var d = a.descendants(); return b ? Selector.findElement(d, b, c) : d[c || 0] }, previous: function(a, b, c) { a = $(a); if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(a)); var d = a.previousSiblings(); return b ? Selector.findElement(d, b, c) : d[c || 0] }, next: function(a, b, c) { a = $(a); if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(a)); var d = a.nextSiblings(); return b ? Selector.findElement(d, b, c) : d[c || 0] }, getElementsBySelector: function() { var a = $A(arguments), element = $(a.shift()); return Selector.findChildElements(element, a) }, getElementsByClassName: function(a, b) { return document.getElementsByClassName(b, a) }, readAttribute: function(a, b) { a = $(a); if (Prototype.Browser.IE) { if (!a.attributes) return null; var t = Element._attributeTranslations; if (t.values[b]) return t.values[b](a, b); if (t.names[b]) b = t.names[b]; var c = a.attributes[b]; return c ? c.nodeValue : null } return a.getAttribute(b) }, getHeight: function(a) { return $(a).getDimensions().height }, getWidth: function(a) { return $(a).getDimensions().width }, classNames: function(a) { return new Element.ClassNames(a) }, hasClassName: function(a, b) { if (!(a = $(a))) return; var c = a.className; if (c.length == 0) return false; if (c == b || c.match(new RegExp("(^|\\s)" + b + "(\\s|$)"))) return true; return false }, addClassName: function(a, b) { if (!(a = $(a))) return; Element.classNames(a).add(b); return a }, removeClassName: function(a, b) { if (!(a = $(a))) return; Element.classNames(a).remove(b); return a }, toggleClassName: function(a, b) { if (!(a = $(a))) return; Element.classNames(a)[a.hasClassName(b) ? 'remove' : 'add'](b); return a }, observe: function() { Event.observe.apply(Event, arguments); return $A(arguments).first() }, stopObserving: function() { Event.stopObserving.apply(Event, arguments); return $A(arguments).first() }, cleanWhitespace: function(a) { a = $(a); var b = a.firstChild; while (b) { var c = b.nextSibling; if (b.nodeType == 3 && !/\S/.test(b.nodeValue)) a.removeChild(b); b = c } return a }, empty: function(a) { return $(a).innerHTML.blank() }, descendantOf: function(a, b) { a = $(a), b = $(b); while (a = a.parentNode) if (a == b) return true; return false }, scrollTo: function(a) { a = $(a); var b = Position.cumulativeOffset(a); window.scrollTo(b[0], b[1]); return a }, getStyle: function(a, b) { a = $(a); b = b == 'float' ? 'cssFloat' : b.camelize(); var c = a.style[b]; if (!c) { var d = document.defaultView.getComputedStyle(a, null); c = d ? d[b] : null } if (b == 'opacity') return c ? parseFloat(c) : 1.0; return c == 'auto' ? null : c }, getOpacity: function(a) { return $(a).getStyle('opacity') }, setStyle: function(a, b, c) { a = $(a); var d = a.style; for (var e in b) if (e == 'opacity') a.setOpacity(b[e]); else d[(e == 'float' || e == 'cssFloat') ? (d.styleFloat === undefined ? 'cssFloat' : 'styleFloat') : (c ? e : e.camelize())] = b[e]; return a }, setOpacity: function(a, b) { a = $(a); a.style.opacity = (b == 1 || b === '') ? '' : (b < 0.00001) ? 0 : b; return a }, getDimensions: function(a) { a = $(a); var b = $(a).getStyle('display'); if (b != 'none' && b != null) return { width: a.offsetWidth, height: a.offsetHeight }; var c = a.style; var d = c.visibility; var e = c.position; var f = c.display; c.visibility = 'hidden'; c.position = 'absolute'; c.display = 'block'; var g = a.clientWidth; var h = a.clientHeight; c.display = f; c.position = e; c.visibility = d; return { width: g, height: h} }, makePositioned: function(a) { a = $(a); var b = Element.getStyle(a, 'position'); if (b == 'static' || !b) { a._madePositioned = true; a.style.position = 'relative'; if (window.opera) { a.style.top = 0; a.style.left = 0 } } return a }, undoPositioned: function(a) { a = $(a); if (a._madePositioned) { a._madePositioned = undefined; a.style.position = a.style.top = a.style.left = a.style.bottom = a.style.right = '' } return a }, makeClipping: function(a) { a = $(a); if (a._overflow) return a; a._overflow = a.style.overflow || 'auto'; if ((Element.getStyle(a, 'overflow') || 'visible') != 'hidden') a.style.overflow = 'hidden'; return a }, undoClipping: function(a) { a = $(a); if (!a._overflow) return a; a.style.overflow = a._overflow == 'auto' ? '' : a._overflow; a._overflow = null; return a } }; Object.extend(Element.Methods, { childOf: Element.Methods.descendantOf, childElements: Element.Methods.immediateDescendants }); if (Prototype.Browser.Opera) { Element.Methods._getStyle = Element.Methods.getStyle; Element.Methods.getStyle = function(a, b) { switch (b) { case 'left': case 'top': case 'right': case 'bottom': if (Element._getStyle(a, 'position') == 'static') return null; default: return Element._getStyle(a, b) } } } else if (Prototype.Browser.IE) { Element.Methods.getStyle = function(a, b) { a = $(a); b = (b == 'float' || b == 'cssFloat') ? 'styleFloat' : b.camelize(); var c = a.style[b]; if (!c && a.currentStyle) c = a.currentStyle[b]; if (b == 'opacity') { if (c = (a.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) if (c[1]) return parseFloat(c[1]) / 100; return 1.0 } if (c == 'auto') { if ((b == 'width' || b == 'height') && (a.getStyle('display') != 'none')) return a['offset' + b.capitalize()] + 'px'; return null } return c }; Element.Methods.setOpacity = function(a, b) { a = $(a); var c = a.getStyle('filter'), style = a.style; if (b == 1 || b === '') { style.filter = c.replace(/alpha\([^\)]*\)/gi, ''); return a } else if (b < 0.00001) b = 0; style.filter = c.replace(/alpha\([^\)]*\)/gi, '') + 'alpha(opacity=' + (b * 100) + ')'; return a }; Element.Methods.update = function(b, c) { b = $(b); c = typeof c == 'undefined' ? '' : c.toString(); var d = b.tagName.toUpperCase(); if (['THEAD', 'TBODY', 'TR', 'TD'].include(d)) { var e = document.createElement('div'); switch (d) { case 'THEAD': case 'TBODY': e.innerHTML = '<table><tbody>' + c.stripScripts() + '</tbody></table>'; depth = 2; break; case 'TR': e.innerHTML = '<table><tbody><tr>' + c.stripScripts() + '</tr></tbody></table>'; depth = 3; break; case 'TD': e.innerHTML = '<table><tbody><tr><td>' + c.stripScripts() + '</td></tr></tbody></table>'; depth = 4 } $A(b.childNodes).each(function(a) { b.removeChild(a) }); depth.times(function() { e = e.firstChild }); $A(e.childNodes).each(function(a) { b.appendChild(a) }) } else { b.innerHTML = c.stripScripts() } setTimeout(function() { c.evalScripts() }, 10); return b } } else if (Prototype.Browser.Gecko) { Element.Methods.setOpacity = function(a, b) { a = $(a); a.style.opacity = (b == 1) ? 0.999999 : (b === '') ? '' : (b < 0.00001) ? 0 : b; return a } } Element._attributeTranslations = { names: { colspan: "colSpan", rowspan: "rowSpan", valign: "vAlign", datetime: "dateTime", accesskey: "accessKey", tabindex: "tabIndex", enctype: "encType", maxlength: "maxLength", readonly: "readOnly", longdesc: "longDesc" }, values: { _getAttr: function(a, b) { return a.getAttribute(b, 2) }, _flag: function(a, b) { return $(a).hasAttribute(b) ? b : null }, style: function(a) { return a.style.cssText.toLowerCase() }, title: function(a) { var b = a.getAttributeNode('title'); return b.specified ? b.nodeValue : null } } }; (function() { Object.extend(this, { href: this._getAttr, src: this._getAttr, type: this._getAttr, disabled: this._flag, checked: this._flag, readonly: this._flag, multiple: this._flag }) }).call(Element._attributeTranslations.values); Element.Methods.Simulated = { hasAttribute: function(a, b) { var t = Element._attributeTranslations, node; b = t.names[b] || b; node = $(a).getAttributeNode(b); return node && node.specified } }; Element.Methods.ByTag = {}; Object.extend(Element, Element.Methods); if (!Prototype.BrowserFeatures.ElementExtensions && document.createElement('div').__proto__) { window.HTMLElement = {}; window.HTMLElement.prototype = document.createElement('div').__proto__; Prototype.BrowserFeatures.ElementExtensions = true } Element.hasAttribute = function(a, b) { if (a.hasAttribute) return a.hasAttribute(b); return Element.Methods.Simulated.hasAttribute(a, b) }; Element.addMethods = function(g) { var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; if (!g) { Object.extend(Form, Form.Methods); Object.extend(Form.Element, Form.Element.Methods); Object.extend(Element.Methods.ByTag, { "FORM": Object.clone(Form.Methods), "INPUT": Object.clone(Form.Element.Methods), "SELECT": Object.clone(Form.Element.Methods), "TEXTAREA": Object.clone(Form.Element.Methods) }) } if (arguments.length == 2) { var h = g; g = arguments[1] } if (!h) Object.extend(Element.Methods, g || {}); else { if (h.constructor == Array) h.each(extend); else extend(h) } function extend(a) { a = a.toUpperCase(); if (!Element.Methods.ByTag[a]) Element.Methods.ByTag[a] = {}; Object.extend(Element.Methods.ByTag[a], g) } function copy(a, b, c) { c = c || false; var d = Element.extend.cache; for (var e in a) { var f = a[e]; if (!c || !(e in b)) b[e] = d.findOrStore(f) } } function findDOMClass(a) { var b; var c = { "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": "FrameSet", "IFRAME": "IFrame" }; if (c[a]) b = 'HTML' + c[a] + 'Element'; if (window[b]) return window[b]; b = 'HTML' + a + 'Element'; if (window[b]) return window[b]; b = 'HTML' + a.capitalize() + 'Element'; if (window[b]) return window[b]; window[b] = {}; window[b].prototype = document.createElement(a).__proto__; return window[b] } if (F.ElementExtensions) { copy(Element.Methods, HTMLElement.prototype); copy(Element.Methods.Simulated, HTMLElement.prototype, true) } if (F.SpecificElementExtensions) { for (var i in Element.Methods.ByTag) { var j = findDOMClass(i); if (typeof j == "undefined") continue; copy(T[i], j.prototype) } } Object.extend(Element, Element.Methods); delete Element.ByTag }; var Toggle = { display: Element.toggle }; Abstract.Insertion = function(a) { this.adjacency = a }; Abstract.Insertion.prototype = { initialize: function(a, b) { this.element = $(a); this.content = b.stripScripts(); if (this.adjacency && this.element.insertAdjacentHTML) { try { this.element.insertAdjacentHTML(this.adjacency, this.content) } catch (e) { var c = this.element.tagName.toUpperCase(); if (['TBODY', 'TR'].include(c)) { this.insertContent(this.contentFromAnonymousTable()) } else { throw e; } } } else { this.range = this.element.ownerDocument.createRange(); if (this.initializeRange) this.initializeRange(); this.insertContent([this.range.createContextualFragment(this.content)]) } setTimeout(function() { b.evalScripts() }, 10) }, contentFromAnonymousTable: function() { var a = document.createElement('div'); a.innerHTML = '<table><tbody>' + this.content + '</tbody></table>'; return $A(a.childNodes[0].childNodes[0].childNodes) } }; var Insertion = new Object(); Insertion.Before = Class.create(); Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { initializeRange: function() { this.range.setStartBefore(this.element) }, insertContent: function(b) { b.each((function(a) { this.element.parentNode.insertBefore(a, this.element) }).bind(this)) } }); Insertion.Top = Class.create(); Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { initializeRange: function() { this.range.selectNodeContents(this.element); this.range.collapse(true) }, insertContent: function(b) { b.reverse(false).each((function(a) { this.element.insertBefore(a, this.element.firstChild) }).bind(this)) } }); Insertion.Bottom = Class.create(); Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { initializeRange: function() { this.range.selectNodeContents(this.element); this.range.collapse(this.element) }, insertContent: function(b) { b.each((function(a) { this.element.appendChild(a) }).bind(this)) } }); Insertion.After = Class.create(); Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { initializeRange: function() { this.range.setStartAfter(this.element) }, insertContent: function(b) { b.each((function(a) { this.element.parentNode.insertBefore(a, this.element.nextSibling) }).bind(this)) } }); Element.ClassNames = Class.create(); Element.ClassNames.prototype = { initialize: function(a) { this.element = $(a) }, _each: function(b) { this.element.className.split(/\s+/).select(function(a) { return a.length > 0 })._each(b) }, set: function(a) { this.element.className = a }, add: function(a) { if (this.include(a)) return; this.set($A(this).concat(a).join(' ')) }, remove: function(a) { if (!this.include(a)) return; this.set($A(this).without(a).join(' ')) }, toString: function() { return $A(this).join(' ') } }; Object.extend(Element.ClassNames.prototype, Enumerable); var Selector = Class.create(); Selector.prototype = { initialize: function(a) { this.expression = a.strip(); this.compileMatcher() }, compileMatcher: function() { if (Prototype.BrowserFeatures.XPath && !(/\[[\w-]*?:/).test(this.expression)) return this.compileXPathMatcher(); var e = this.expression, ps = Selector.patterns, h = Selector.handlers, c = Selector.criteria, le, p, m; if (Selector._cache[e]) { this.matcher = Selector._cache[e]; return } this.matcher = ["this.matcher = function(root) {", "var r = root, h = Selector.handlers, c = false, n;"]; while (e && le != e && (/\S/).test(e)) { le = e; for (var i in ps) { p = ps[i]; if (m = e.match(p)) { this.matcher.push(typeof c[i] == 'function' ? c[i](m) : new Template(c[i]).evaluate(m)); e = e.replace(m[0], ''); break } } } this.matcher.push("return h.unique(n);\n}"); eval(this.matcher.join('\n')); Selector._cache[this.expression] = this.matcher }, compileXPathMatcher: function() { var e = this.expression, ps = Selector.patterns, x = Selector.xpath, le, m; if (Selector._cache[e]) { this.xpath = Selector._cache[e]; return } this.matcher = ['.//*']; while (e && le != e && (/\S/).test(e)) { le = e; for (var i in ps) { if (m = e.match(ps[i])) { this.matcher.push(typeof x[i] == 'function' ? x[i](m) : new Template(x[i]).evaluate(m)); e = e.replace(m[0], ''); break } } } this.xpath = this.matcher.join(''); Selector._cache[this.expression] = this.xpath }, findElements: function(a) { a = a || document; if (this.xpath) return document._getElementsByXPath(this.xpath, a); return this.matcher(a) }, match: function(a) { return this.findElements(document).include(a) }, toString: function() { return this.expression }, inspect: function() { return "#<Selector:" + this.expression.inspect() + ">" } }; Object.extend(Selector, { _cache: {}, xpath: { descendant: "//*", child: "/*", adjacent: "/following-sibling::*[1]", laterSibling: '/following-sibling::*', tagName: function(m) { if (m[1] == '*') return ''; return "[local-name()='" + m[1].toLowerCase() + "' or local-name()='" + m[1].toUpperCase() + "']" }, className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", id: "[@id='#{1}']", attrPresence: "[@#{1}]", attr: function(m) { m[3] = m[5] || m[6]; return new Template(Selector.xpath.operators[m[2]]).evaluate(m) }, pseudo: function(m) { var h = Selector.xpath.pseudos[m[1]]; if (!h) return ''; if (typeof h === 'function') return h(m); return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m) }, operators: { '=': "[@#{1}='#{3}']", '!=': "[@#{1}!='#{3}']", '^=': "[starts-with(@#{1}, '#{3}')]", '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", '*=': "[contains(@#{1}, '#{3}')]", '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" }, pseudos: { 'first-child': '[not(preceding-sibling::*)]', 'last-child': '[not(following-sibling::*)]', 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]", 'checked': "[@checked]", 'disabled': "[@disabled]", 'enabled': "[not(@disabled)]", 'not': function(m) { var e = m[6], p = Selector.patterns, x = Selector.xpath, le, m, v; var a = []; while (e && le != e && (/\S/).test(e)) { le = e; for (var i in p) { if (m = e.match(p[i])) { v = typeof x[i] == 'function' ? x[i](m) : new Template(x[i]).evaluate(m); a.push("(" + v.substring(1, v.length - 1) + ")"); e = e.replace(m[0], ''); break } } } return "[not(" + a.join(" and ") + ")]" }, 'nth-child': function(m) { return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m) }, 'nth-last-child': function(m) { return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m) }, 'nth-of-type': function(m) { return Selector.xpath.pseudos.nth("position() ", m) }, 'nth-last-of-type': function(m) { return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m) }, 'first-of-type': function(m) { m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m) }, 'last-of-type': function(m) { m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m) }, 'only-of-type': function(m) { var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m) }, nth: function(c, m) { var d, formula = m[6], predicate; if (formula == 'even') formula = '2n+0'; if (formula == 'odd') formula = '2n+1'; if (d = formula.match(/^(\d+)$/)) return '[' + c + "= " + d[1] + ']'; if (d = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { if (d[1] == "-") d[1] = -1; var a = d[1] ? Number(d[1]) : 1; var b = d[2] ? Number(d[2]) : 0; predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " + "((#{fragment} - #{b}) div #{a} >= 0)]"; return new Template(predicate).evaluate({ fragment: c, a: a, b: b }) } } } }, criteria: { tagName: 'n = h.tagName(n, r, "#{1}", c);  c = false;', className: 'n = h.className(n, r, "#{1}", c); c = false;', id: 'n = h.id(n, r, "#{1}", c);    c = false;', attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;', attr: function(m) { m[3] = (m[5] || m[6]); return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m) }, pseudo: function(m) { if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m) }, descendant: 'c = "descendant";', child: 'c = "child";', adjacent: 'c = "adjacent";', laterSibling: 'c = "laterSibling";' }, patterns: { laterSibling: new RegExp('^\\s' + '*' + '~\\s*'), child: new RegExp('^\\s' + '*' + '>\\s*'), adjacent: new RegExp('^\\s' + '*' + '\\+\\s*'), descendant: /^\s/, tagName: new RegExp('^\\s*' + '(\\' + '*|[\\w\\-]+)(\\b|$)?'), id: new RegExp('^#([\\w\\-\\' + '*]+)(\\b|$)'), className: new RegExp('^\\.([\\w\\-\\' + '*]+)(\\b|$)'), pseudo: new RegExp('^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\\((.*?)\\))?(\\b|$|\\s||(?=:))'), attrPresence: new RegExp('^\\[([\\w]+)\\]'), attr: new RegExp('\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*(([\'"])([^\\]]*?)\\4|([^\'"][^\\]]*?)))?\\]') }, handlers: { concat: function(a, b) { for (var i = 0, node; node = b[i]; i++) a.push(node); return a }, mark: function(a) { for (var i = 0, node; node = a[i]; i++) node._counted = true; return a }, unmark: function(a) { for (var i = 0, node; node = a[i]; i++) node._counted = undefined; return a }, index: function(a, b, c) { a._counted = true; if (b) { for (var d = a.childNodes, i = d.length - 1, j = 1; i >= 0; i--) { node = d[i]; if (node.nodeType == 1 && (!c || node._counted)) node.nodeIndex = j++ } } else { for (var i = 0, j = 1, d = a.childNodes; node = d[i]; i++) if (node.nodeType == 1 && (!c || node._counted)) node.nodeIndex = j++ } }, unique: function(a) { if (a.length == 0) return a; var b = [], n; for (var i = 0, l = a.length; i < l; i++) if (!(n = a[i])._counted) { n._counted = true; b.push(Element.extend(n)) } return Selector.handlers.unmark(b) }, descendant: function(a) { var h = Selector.handlers; for (var i = 0, results = [], node; node = a[i]; i++) h.concat(results, node.getElementsByTagName('*')); return results }, child: function(a) { var h = Selector.handlers; for (var i = 0, results = [], node; node = a[i]; i++) { for (var j = 0, children = [], child; child = node.childNodes[j]; j++) if (child.nodeType == 1 && child.tagName != '!') results.push(child) } return results }, adjacent: function(a) { for (var i = 0, results = [], node; node = a[i]; i++) { var b = this.nextElementSibling(node); if (b) results.push(b) } return results }, laterSibling: function(a) { var h = Selector.handlers; for (var i = 0, results = [], node; node = a[i]; i++) h.concat(results, Element.nextSiblings(node)); return results }, nextElementSibling: function(a) { while (a = a.nextSibling) if (a.nodeType == 1) return a; return null }, previousElementSibling: function(a) { while (a = a.previousSibling) if (a.nodeType == 1) return a; return null }, tagName: function(a, b, c, d) { c = c.toUpperCase(); var e = [], h = Selector.handlers; if (a) { if (d) { if (d == "descendant") { for (var i = 0, node; node = a[i]; i++) h.concat(e, node.getElementsByTagName(c)); return e } else a = this[d](a); if (c == "*") return a } for (var i = 0, node; node = a[i]; i++) if (node.tagName.toUpperCase() == c) e.push(node); return e } else return b.getElementsByTagName(c) }, id: function(a, b, c, d) { var e = $(c), h = Selector.handlers; if (!a && b == document) return e ? [e] : []; if (a) { if (d) { if (d == 'child') { for (var i = 0, node; node = a[i]; i++) if (e.parentNode == node) return [e] } else if (d == 'descendant') { for (var i = 0, node; node = a[i]; i++) if (Element.descendantOf(e, node)) return [e] } else if (d == 'adjacent') { for (var i = 0, node; node = a[i]; i++) if (Selector.handlers.previousElementSibling(e) == node) return [e] } else a = h[d](a) } for (var i = 0, node; node = a[i]; i++) if (node == e) return [e]; return [] } return (e && Element.descendantOf(e, b)) ? [e] : [] }, className: function(a, b, c, d) { if (a && d) a = this[d](a); return Selector.handlers.byClassName(a, b, c) }, byClassName: function(a, b, c) { if (!a) a = Selector.handlers.descendant([b]); var d = ' ' + c + ' '; for (var i = 0, results = [], node, nodeClassName; node = a[i]; i++) { nodeClassName = node.className; if (nodeClassName.length == 0) continue; if (nodeClassName == c || (' ' + nodeClassName + ' ').include(d)) results.push(node) } return results }, attrPresence: function(a, b, c) { var d = []; for (var i = 0, node; node = a[i]; i++) if (Element.hasAttribute(node, c)) d.push(node); return d }, attr: function(a, b, c, d, e) { if (!a) a = b.getElementsByTagName("*"); var f = Selector.operators[e], results = []; for (var i = 0, node; node = a[i]; i++) { var g = Element.readAttribute(node, c); if (g === null) continue; if (f(g, d)) results.push(node) } return results }, pseudo: function(a, b, c, d, e) { if (a && e) a = this[e](a); if (!a) a = d.getElementsByTagName("*"); return Selector.pseudos[b](a, c, d) } }, pseudos: { 'first-child': function(a, b, c) { for (var i = 0, results = [], node; node = a[i]; i++) { if (Selector.handlers.previousElementSibling(node)) continue; results.push(node) } return results }, 'last-child': function(a, b, c) { for (var i = 0, results = [], node; node = a[i]; i++) { if (Selector.handlers.nextElementSibling(node)) continue; results.push(node) } return results }, 'only-child': function(a, b, c) { var h = Selector.handlers; for (var i = 0, results = [], node; node = a[i]; i++) if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) results.push(node); return results }, 'nth-child': function(a, b, c) { return Selector.pseudos.nth(a, b, c) }, 'nth-last-child': function(a, b, c) { return Selector.pseudos.nth(a, b, c, true) }, 'nth-of-type': function(a, b, c) { return Selector.pseudos.nth(a, b, c, false, true) }, 'nth-last-of-type': function(a, b, c) { return Selector.pseudos.nth(a, b, c, true, true) }, 'first-of-type': function(a, b, c) { return Selector.pseudos.nth(a, "1", c, false, true) }, 'last-of-type': function(a, b, c) { return Selector.pseudos.nth(a, "1", c, true, true) }, 'only-of-type': function(a, b, c) { var p = Selector.pseudos; return p['last-of-type'](p['first-of-type'](a, b, c), b, c) }, getIndices: function(a, b, d) { if (a == 0) return b > 0 ? [b] : []; return $R(1, d).inject([], function(c, i) { if (0 == (i - b) % a && (i - b) / a >= 0) c.push(i); return c }) }, nth: function(c, d, e, f, g) { if (c.length == 0) return []; if (d == 'even') d = '2n+0'; if (d == 'odd') d = '2n+1'; var h = Selector.handlers, results = [], indexed = [], m; h.mark(c); for (var i = 0, node; node = c[i]; i++) { if (!node.parentNode._counted) { h.index(node.parentNode, f, g); indexed.push(node.parentNode) } } if (d.match(/^\d+$/)) { d = Number(d); for (var i = 0, node; node = c[i]; i++) if (node.nodeIndex == d) results.push(node) } else if (m = d.match(/^(-?\d*)?n(([+-])(\d+))?/)) { if (m[1] == "-") m[1] = -1; var a = m[1] ? Number(m[1]) : 1; var b = m[2] ? Number(m[2]) : 0; var k = Selector.pseudos.getIndices(a, b, c.length); for (var i = 0, node, l = k.length; node = c[i]; i++) { for (var j = 0; j < l; j++) if (node.nodeIndex == k[j]) results.push(node) } } h.unmark(c); h.unmark(indexed); return results }, 'empty': function(a, b, c) { for (var i = 0, results = [], node; node = a[i]; i++) { if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue; results.push(node) } return results }, 'not': function(a, b, c) { var h = Selector.handlers, selectorType, m; var d = new Selector(b).findElements(c); h.mark(d); for (var i = 0, results = [], node; node = a[i]; i++) if (!node._counted) results.push(node); h.unmark(d); return results }, 'enabled': function(a, b, c) { for (var i = 0, results = [], node; node = a[i]; i++) if (!node.disabled) results.push(node); return results }, 'disabled': function(a, b, c) { for (var i = 0, results = [], node; node = a[i]; i++) if (node.disabled) results.push(node); return results }, 'checked': function(a, b, c) { for (var i = 0, results = [], node; node = a[i]; i++) if (node.checked) results.push(node); return results } }, operators: { '=': function(a, v) { return a == v }, '!=': function(a, v) { return a != v }, '^=': function(a, v) { return a.startsWith(v) }, '$=': function(a, v) { return a.endsWith(v) }, '*=': function(a, v) { return a.include(v) }, '~=': function(a, v) { return (' ' + a + ' ').include(' ' + v + ' ') }, '|=': function(a, v) { return ('-' + a.toUpperCase() + '-').include('-' + v.toUpperCase() + '-') } }, matchElements: function(a, b) { var c = new Selector(b).findElements(), h = Selector.handlers; h.mark(c); for (var i = 0, results = [], element; element = a[i]; i++) if (element._counted) results.push(element); h.unmark(c); return results }, findElement: function(a, b, c) { if (typeof b == 'number') { c = b; b = false } return Selector.matchElements(a, b || '*')[c || 0] }, findChildElements: function(a, b) { var c = b.join(','), b = []; c.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { b.push(m[1].strip()) }); var d = [], h = Selector.handlers; for (var i = 0, l = b.length, selector; i < l; i++) { selector = new Selector(b[i].strip()); h.concat(d, selector.findElements(a)) } return (l > 1) ? h.unique(d) : d } }); function $$() { return Selector.findChildElements(document, $A(arguments)) } var Form = { reset: function(a) { $(a).reset(); return a }, serializeElements: function(d, e) { var f = d.inject({}, function(a, b) { if (!b.disabled && b.name) { var c = b.name, value = $(b).getValue(); if (value != null) { if (c in a) { if (a[c].constructor != Array) a[c] = [a[c]]; a[c].push(value) } else a[c] = value } } return a }); return e ? f : Hash.toQueryString(f) } }; Form.Methods = { serialize: function(a, b) { return Form.serializeElements(Form.getElements(a), b) }, getElements: function(c) { return $A($(c).getElementsByTagName('*')).inject([], function(a, b) { if (Form.Element.Serializers[b.tagName.toLowerCase()]) a.push(Element.extend(b)); return a }) }, getInputs: function(a, b, c) { a = $(a); var d = a.getElementsByTagName('input'); if (!b && !c) return $A(d).map(Element.extend); for (var i = 0, matchingInputs = [], length = d.length; i < length; i++) { var e = d[i]; if ((b && e.type != b) || (c && e.name != c)) continue; matchingInputs.push(Element.extend(e)) } return matchingInputs }, disable: function(a) { a = $(a); Form.getElements(a).invoke('disable'); return a }, enable: function(a) { a = $(a); Form.getElements(a).invoke('enable'); return a }, findFirstElement: function(b) { return $(b).getElements().find(function(a) { return a.type != 'hidden' && !a.disabled && ['input', 'select', 'textarea'].include(a.tagName.toLowerCase()) }) }, focusFirstElement: function(a) { a = $(a); a.findFirstElement().activate(); return a }, request: function(a, b) { a = $(a), b = Object.clone(b || {}); var c = b.parameters; b.parameters = a.serialize(true); if (c) { if (typeof c == 'string') c = c.toQueryParams(); Object.extend(b.parameters, c) } if (a.hasAttribute('method') && !b.method) b.method = a.method; return new Ajax.Request(a.readAttribute('action'), b) } }; Form.Element = { focus: function(a) { $(a).focus(); return a }, select: function(a) { $(a).select(); return a } }; Form.Element.Methods = { serialize: function(a) { a = $(a); if (!a.disabled && a.name) { var b = a.getValue(); if (b != undefined) { var c = {}; c[a.name] = b; return Hash.toQueryString(c) } } return '' }, getValue: function(a) { a = $(a); var b = a.tagName.toLowerCase(); return Form.Element.Serializers[b](a) }, clear: function(a) { $(a).value = ''; return a }, present: function(a) { return $(a).value != '' }, activate: function(a) { a = $(a); try { a.focus(); if (a.select && (a.tagName.toLowerCase() != 'input' || !['button', 'reset', 'submit'].include(a.type))) a.select() } catch (e) { } return a }, disable: function(a) { a = $(a); a.blur(); a.disabled = true; return a }, enable: function(a) { a = $(a); a.disabled = false; return a } }; var Field = Form.Element; var $F = Form.Element.Methods.getValue; Form.Element.Serializers = { input: function(a) { switch (a.type.toLowerCase()) { case 'checkbox': case 'radio': return Form.Element.Serializers.inputSelector(a); default: return Form.Element.Serializers.textarea(a) } }, inputSelector: function(a) { return a.checked ? a.value : null }, textarea: function(a) { return a.value }, select: function(a) { return this[a.type == 'select-one' ? 'selectOne' : 'selectMany'](a) }, selectOne: function(a) { var b = a.selectedIndex; return b >= 0 ? this.optionValue(a.options[b]) : null }, selectMany: function(a) { var b, length = a.length; if (!length) return null; for (var i = 0, b = []; i < length; i++) { var c = a.options[i]; if (c.selected) b.push(this.optionValue(c)) } return b }, optionValue: function(a) { return Element.extend(a).hasAttribute('value') ? a.value : a.text } }; Abstract.TimedObserver = function() { }; Abstract.TimedObserver.prototype = { initialize: function(a, b, c) { this.frequency = b; this.element = $(a); this.callback = c; this.lastValue = this.getValue(); this.registerCallback() }, registerCallback: function() { setInterval(this.onTimerEvent.bind(this), this.frequency * 1000) }, onTimerEvent: function() { var a = this.getValue(); var b = ('string' == typeof this.lastValue && 'string' == typeof a ? this.lastValue != a : String(this.lastValue) != String(a)); if (b) { this.callback(this.element, a); this.lastValue = a } } }; Form.Element.Observer = Class.create(); Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { getValue: function() { return Form.Element.getValue(this.element) } }); Form.Observer = Class.create(); Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { getValue: function() { return Form.serialize(this.element) } }); Abstract.EventObserver = function() { }; Abstract.EventObserver.prototype = { initialize: function(a, b) { this.element = $(a); this.callback = b; this.lastValue = this.getValue(); if (this.element.tagName.toLowerCase() == 'form') this.registerFormCallbacks(); else this.registerCallback(this.element) }, onElementEvent: function() { var a = this.getValue(); if (this.lastValue != a) { this.callback(this.element, a); this.lastValue = a } }, registerFormCallbacks: function() { Form.getElements(this.element).each(this.registerCallback.bind(this)) }, registerCallback: function(a) { if (a.type) { switch (a.type.toLowerCase()) { case 'checkbox': case 'radio': Event.observe(a, 'click', this.onElementEvent.bind(this)); break; default: Event.observe(a, 'change', this.onElementEvent.bind(this)); break } } } }; Form.Element.EventObserver = Class.create(); Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { getValue: function() { return Form.Element.getValue(this.element) } }); Form.EventObserver = Class.create(); Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { getValue: function() { return Form.serialize(this.element) } }); if (!window.Event) { var Event = new Object() } Object.extend(Event, { KEY_BACKSPACE: 8, KEY_TAB: 9, KEY_RETURN: 13, KEY_ESC: 27, KEY_LEFT: 37, KEY_UP: 38, KEY_RIGHT: 39, KEY_DOWN: 40, KEY_DELETE: 46, KEY_HOME: 36, KEY_END: 35, KEY_PAGEUP: 33, KEY_PAGEDOWN: 34, element: function(a) { return $(a.target || a.srcElement) }, isLeftClick: function(a) { return (((a.which) && (a.which == 1)) || ((a.button) && (a.button == 1))) }, pointerX: function(a) { return a.pageX || (a.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)) }, pointerY: function(a) { return a.pageY || (a.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) }, stop: function(a) { if (a.preventDefault) { a.preventDefault(); a.stopPropagation() } else { a.returnValue = false; a.cancelBubble = true } }, findElement: function(a, b) { var c = Event.element(a); while (c.parentNode && (!c.tagName || (c.tagName.toUpperCase() != b.toUpperCase()))) c = c.parentNode; return c }, observers: false, _observeAndCache: function(a, b, c, d) { if (!this.observers) this.observers = []; if (a.addEventListener) { this.observers.push([a, b, c, d]); a.addEventListener(b, c, d) } else if (a.attachEvent) { this.observers.push([a, b, c, d]); a.attachEvent('on' + b, c) } }, unloadCache: function() { if (!Event.observers) return; for (var i = 0, length = Event.observers.length; i < length; i++) { Event.stopObserving.apply(this, Event.observers[i]); Event.observers[i][0] = null } Event.observers = false }, observe: function(a, b, c, d) { a = $(a); d = d || false; if (b == 'keypress' && (Prototype.Browser.WebKit || a.attachEvent)) b = 'keydown'; Event._observeAndCache(a, b, c, d) }, stopObserving: function(a, b, c, d) { a = $(a); d = d || false; if (b == 'keypress' && (Prototype.Browser.WebKit || a.attachEvent)) b = 'keydown'; if (a.removeEventListener) { a.removeEventListener(b, c, d) } else if (a.detachEvent) { try { a.detachEvent('on' + b, c) } catch (e) { } } } }); if (Prototype.Browser.IE) Event.observe(window, 'unload', Event.unloadCache, false); var Position = { includeScrollOffsets: false, prepare: function() { this.deltaX = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; this.deltaY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 }, realOffset: function(a) { var b = 0, valueL = 0; do { b += a.scrollTop || 0; valueL += a.scrollLeft || 0; a = a.parentNode } while (a); return [valueL, b] }, cumulativeOffset: function(a) { var b = 0, valueL = 0; do { b += a.offsetTop || 0; valueL += a.offsetLeft || 0; a = a.offsetParent } while (a); return [valueL, b] }, positionedOffset: function(a) { var b = 0, valueL = 0; do { b += a.offsetTop || 0; valueL += a.offsetLeft || 0; a = a.offsetParent; if (a) { if (a.tagName == 'BODY') break; var p = Element.getStyle(a, 'position'); if (p == 'relative' || p == 'absolute') break } } while (a); return [valueL, b] }, offsetParent: function(a) { if (a.offsetParent) return a.offsetParent; if (a == document.body) return a; while ((a = a.parentNode) && a != document.body) if (Element.getStyle(a, 'position') != 'static') return a; return document.body }, within: function(a, x, y) { if (this.includeScrollOffsets) return this.withinIncludingScrolloffsets(a, x, y); this.xcomp = x; this.ycomp = y; this.offset = this.cumulativeOffset(a); return (y >= this.offset[1] && y < this.offset[1] + a.offsetHeight && x >= this.offset[0] && x < this.offset[0] + a.offsetWidth) }, withinIncludingScrolloffsets: function(a, x, y) { var b = this.realOffset(a); this.xcomp = x + b[0] - this.deltaX; this.ycomp = y + b[1] - this.deltaY; this.offset = this.cumulativeOffset(a); return (this.ycomp >= this.offset[1] && this.ycomp < this.offset[1] + a.offsetHeight && this.xcomp >= this.offset[0] && this.xcomp < this.offset[0] + a.offsetWidth) }, overlap: function(a, b) { if (!a) return 0; if (a == 'vertical') return ((this.offset[1] + b.offsetHeight) - this.ycomp) / b.offsetHeight; if (a == 'horizontal') return ((this.offset[0] + b.offsetWidth) - this.xcomp) / b.offsetWidth }, page: function(a) { var b = 0, valueL = 0; var c = a; do { b += c.offsetTop || 0; valueL += c.offsetLeft || 0; if (c.offsetParent == document.body) if (Element.getStyle(c, 'position') == 'absolute') break } while (c = c.offsetParent); c = a; do { if (!window.opera || c.tagName == 'BODY') { b -= c.scrollTop || 0; valueL -= c.scrollLeft || 0 } } while (c = c.parentNode); return [valueL, b] }, clone: function(a, b) { var c = Object.extend({ setLeft: true, setTop: true, setWidth: true, setHeight: true, offsetTop: 0, offsetLeft: 0 }, arguments[2] || {}); a = $(a); var p = Position.page(a); b = $(b); var d = [0, 0]; var e = null; if (Element.getStyle(b, 'position') == 'absolute') { e = Position.offsetParent(b); d = Position.page(e) } if (e == document.body) { d[0] -= document.body.offsetLeft; d[1] -= document.body.offsetTop } if (c.setLeft) b.style.left = (p[0] - d[0] + c.offsetLeft) + 'px'; if (c.setTop) b.style.top = (p[1] - d[1] + c.offsetTop) + 'px'; if (c.setWidth) b.style.width = a.offsetWidth + 'px'; if (c.setHeight) b.style.height = a.offsetHeight + 'px' }, absolutize: function(a) { a = $(a); if (a.style.position == 'absolute') return; Position.prepare(); var b = Position.positionedOffset(a); var c = b[1]; var d = b[0]; var e = a.clientWidth; var f = a.clientHeight; a._originalLeft = d - parseFloat(a.style.left || 0); a._originalTop = c - parseFloat(a.style.top || 0); a._originalWidth = a.style.width; a._originalHeight = a.style.height; a.style.position = 'absolute'; a.style.top = c + 'px'; a.style.left = d + 'px'; a.style.width = e + 'px'; a.style.height = f + 'px' }, relativize: function(a) { a = $(a); if (a.style.position == 'relative') return; Position.prepare(); a.style.position = 'relative'; var b = parseFloat(a.style.top || 0) - (a._originalTop || 0); var c = parseFloat(a.style.left || 0) - (a._originalLeft || 0); a.style.top = b + 'px'; a.style.left = c + 'px'; a.style.height = a._originalHeight; a.style.width = a._originalWidth } }; if (Prototype.Browser.WebKit) { Position.cumulativeOffset = function(a) { var b = 0, valueL = 0; do { b += a.offsetTop || 0; valueL += a.offsetLeft || 0; if (a.offsetParent == document.body) if (Element.getStyle(a, 'position') == 'absolute') break; a = a.offsetParent } while (a); return [valueL, b] } } Element.addMethods();var css_browser_selector=function() {var t=this;var ua=navigator.userAgent.toLowerCase();var is=function(x){ return ua.indexOf(x)!=-1;};var h=document.getElementsByTagName('html')[0]var b=(ua.indexOf("opera/9")>-1)?'opera opera9':(ua.indexOf("opera 8")>-1)?'opera opera8':(ua.indexOf("opera 7")>-1)?'opera opera7':(ua.indexOf("msie 8")>-1)?'ie ie8 ie7':(ua.indexOf("msie 7")>-1)?'ie ie7':(ua.indexOf("msie 6")>-1)?'ie ie6':(ua.indexOf("msie 5.5")>-1)?'ie ie55':(ua.indexOf("msie 5.23")>-1)?'ie ie523':(ua.indexOf("msie 5.0")>-1)?'ie ie5':(ua.indexOf("chrome")>-1)?'safari chrome':(ua.indexOf("safari")>-1&&ua.indexOf("version/4.")>-1&&ua.indexOf("version/4.")<ua.indexOf("safari")) ? 'safari safari4 safari3':(ua.indexOf("safari")>-1&&ua.indexOf("version/3.")>-1&&ua.indexOf("version/3.")<ua.indexOf("safari")) ? 'safari safari3':(ua.indexOf("safari")>-1) ? 'safari safari2':(ua.indexOf("seamonkey")>-1)?'seamonkey gecko':(ua.indexOf("netscape")>-1)?'netscape gecko':(ua.indexOf("firefox/1")>-1)?'firefox ff1 gecko':(ua.indexOf("firefox/2")>-1)?'firefox ff2 gecko':(ua.indexOf("firefox/3")>-1)?'firefox ff3 gecko':(ua.indexOf("gecko")>-1)?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js';h.className += h.className?' '+c:c;t.ver=navigator.appVersion;t.agent=navigator.userAgent;t.mac=ua.indexOf("mac")>-1;t.pc=ua.indexOf("win")>-1;t.opera=ua.indexOf("opera")>-1;t.opera9=ua.indexOf("opera/9")>-1;t.opera8=ua.indexOf("opera 8")>-1;t.opera7=ua.indexOf("opera 7")>-1;t.ie7=(ua.indexOf("msie 7")>-1&&!t.opera)?1:0;t.ie7=t.ie8=(ua.indexOf("msie 8")>-1&&!t.opera) ? 1:0;t.ie6=(ua.indexOf("msie 6")>-1&&!t.opera) ? 1:0;t.ie55 =(ua.indexOf("msie 5.5")>-1&&!t.opera)?1:0;t.ie523 =(ua.indexOf("msie 5.23")>-1)?1:0;t.ie4 =(ua.indexOf("msie 4")>-1)?1:0;t.ie3 =(ua.indexOf("msie 3")>-1)?1:0;t.ie5 =(ua.indexOf("msie 5.0")>-1&&!t.ie55&&!t.ie523)?1:0;t.ns71=(ua.indexOf("netscape/7.1")>-1)?1:0;t.safari4=(ua.indexOf("safari")>-1&&ua.indexOf("version/4.")>-1&&ua.indexOf("version/4.")<ua.indexOf("safari")) ? 1:0;t.safari3=(ua.indexOf("safari")>-1&&ua.indexOf("version/3.")>-1&&ua.indexOf("version/3.")<ua.indexOf("safari")) ? 1:0;t.safari2=(ua.indexOf("safari")>-1&&ua.indexOf("version/")==-1) ? 1:0;t.chrome=(ua.indexOf("chrome")>-1)?1:0;t.safari=(t.safari2||t.safari3||t.safari4);t.ie=(t.ie8||t.ie7||t.ie55||t.ie5||t.ie6||t.ie523||t.ie4||t.ie3);t.gecko=(ua.indexOf("gecko")>-1 &!t.ie)?1:0;t.ns=(t.ns71);t.ieOld=(t.ie55||t.ie5||t.ie523||t.ie4||t.ie3);t.ajaxaware =(t.opera||t.ie8||t.ie7||t.ie6||t.safari||t.gecko||t.chrome)?1:0}();if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);if(_8+""!=""){this.addParam("base",_8);}this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={useExpressInstall:function(_e){this.xiSWFPath=!_e?"expressinstall.swf":_e;this.setAttribute("useExpressInstall",true);},setAttribute:function(_f,_10){this.attributes[_f]=_10;},getAttribute:function(_11){return this.attributes[_11];},addParam:function(_12,_13){this.params[_12]=_13;},getParams:function(){return this.params;},addVariable:function(_14,_15){this.variables[_14]=_15;},getVariable:function(_16){return this.variables[_16];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _17=new Array();var key;var _19=this.getVariables();for(key in _19){_17[_17.length]=key+"="+_19[key];}return _17;},getSWFHTML:function(){var _1a="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_1a="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_1a+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1b=this.getParams();for(var key in _1b){_1a+=[key]+"=\""+_1b[key]+"\" ";}var _1d=this.getVariablePairs().join("&");if(_1d.length>0){_1a+="flashvars=\""+_1d+"\"";}_1a+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_1a="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_1a+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1b=this.getParams();for(var key in _1b){_1a+="<param name=\""+key+"\" value=\""+_1b[key]+"\" />";}var _1d=this.getVariablePairs().join("&");if(_1d.length>0){_1a+="<param name=\"flashvars\" value=\""+_1d+"\" />";}_1a+="</object>";}return _1a;},write:function(_1e){if(this.getAttribute("useExpressInstall")){var _1f=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_1f)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _1e=="string")?document.getElementById(_1e):_1e;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _21=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_21=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _24=3;while(axo){try{_24++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_24);_21=new deconcept.PlayerVersion([_24,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_21=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_21.major==6){return _21;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_21=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _21;};deconcept.PlayerVersion=function(_25){this.major=_25[0]!=null?parseInt(_25[0]):0;this.minor=_25[1]!=null?parseInt(_25[1]):0;this.rev=_25[2]!=null?parseInt(_25[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_27){var q=document.location.search||document.location.hash;if(_27==null){return q;}if(q){var _29=q.substring(1).split("&");for(var i=0;i<_29.length;i++){if(_29[i].substring(0,_29[i].indexOf("="))==_27){return _29[i].substring((_29[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2b=document.getElementsByTagName("OBJECT");for(var i=_2b.length-1;i>=0;i--){_2b[i].style.display="none";for(var x in _2b[i]){if(typeof _2b[i][x]=="function"){_2b[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var _ObjectBrowsers=Class.create();_ObjectBrowsers.prototype={initialize:function(){this.oba=new Array();this.obh=new Array();},add:function(ob){this.oba.push(ob);},store:function(bname,ob){var x=this.getBrowserPair(bname);if(x)x.ob=ob;else this.obh.push({bname:bname,ob:ob});},getBrowserPair:function(bname){for (var i=0;i<this.obh.length;i++)if(this.obh[i].bname==bname)return this.obh[i];return null;},getBrowser:function(bname){for (var i=0;i<this.obh.length;i++)if(this.obh[i].bname==bname)return this.obh[i].ob;return null;},stopAll:function(){this.oba.each(function(n){n.stop();});},moveLeft:function(bname){try{this.getBrowser(bname).moveLeft();}catch(e){}},moveRight:function(bname){try{this.getBrowser(bname).moveRight();}catch(e){}},moveTo:function(bname,i){try{this.getBrowser(bname).moveTo(i);}catch(e){}}}var ObjectBrowsers=new _ObjectBrowsers();var BaseObjectBrowser=Class.create();BaseObjectBrowser.prototype={baseInit:function(leftArrowID,rightArrowID,bulletID){var t=this;t.firstInt=10;t.othInt=10;t.state=0t.e=new Array();t.eC=0;t.c=0;t.arrowL=leftArrowID;t.arrowR=rightArrowID;t.bullet=bulletID;ObjectBrowsers.add(t);},onTimer:function(){var t=this;t.moveNext();if(this.state==1){t.pe.stop();t.state=2;t.pe=new PeriodicalExecuter(t.onTimer.bind(t),t.othInt);t.pe.ob=t;}},start:function(){var t=this;t.pe=new PeriodicalExecuter(t.onTimer.bind(t),t.firstInt);t.pe.ob=t;t.state=1var s=0;if(arguments&&arguments.length>0) s=arguments[0];if(s==-1)s=Math.ceil(Math.random()*(t.eC-1));t.c=s;t.moveElement();},stop:function(){this.pe.stop();},moveRight:function(i){var t=this;t.pe.stop();t.c++;if(t.c>=t.eC)t.c=0;t.moveElement();},moveLeft:function(idx){var t=this;t.pe.stop();t.c--;if(t.c<0)t.c=t.eC-1;t.moveElement();},moveTo:function(i){var t=this;t.pe.stop();t.c=i;t.moveElement();},moveNext:function(){var t=this;t.c++;if(t.c>=t.eC)t.c=0;t.moveElement();},refreshControls:function(){var t=this;for (var l=0;l<t.eC;l++) $(t.bullet+l).className='';$(t.bullet+t.c).className='nbSel';}};ArticlePhotoBrowser=Class.create();Object.extend(Object.extend(ArticlePhotoBrowser.prototype,BaseObjectBrowser.prototype),{initialize:function(iID,cID,lAID,rAID,bID,uID) {var t=this;t.baseInit(lAID,rAID,bID);t.img=iID;t.credit=cID;t.urlPic=uID;},addElement:function(src,h,w,alt,c,u) {this.eC=this.e.push({ src:src,h:h,w:w,alt:alt,c:c,u:u });},moveElement:function() {var t=this;var el=t.e[t.c];$(t.img).src=unescape(el.src);$(t.img).height=el.h;$(t.img).width=el.w;$(t.img).alt=unescape(el.alt);$(t.credit).update(el.c);if($(t.urlPic)!=undefined)$(t.urlPic).href=unescape(el.u);t.refreshControls();}});NewsBrowser=Class.create();Object.extend(Object.extend(NewsBrowser.prototype,BaseObjectBrowser.prototype),{initialize:function(pS,nC,cID,lID,rID,bID){var t=this;t.baseInit(lID,rID,bID);t.cID=cID;t.pS=pS;t.eC=(((nC%t.pS)==1?nC-1:nC)/t.pS)+((nC%t.pS)==1?1:0);},addElement:function(){},moveElement:function(){var t=this;var xhtml='';var i,b=t.c*t.pS;for(i=0;i<t.pS;i++){try {xhtml+="<li>"+$('newsRollerE'+(i+b)).innerHTML+"</li>";}catch(e){}}$(t.cID).update(xhtml);t.refreshControls();}});PhotoBrowser=Class.create();Object.extend(Object.extend(PhotoBrowser.prototype,BaseObjectBrowser.prototype),{initialize:function(pS,nC,cID,lID,rID,bID){var t=this;t.baseInit(lID,rID,bID);t.cID=cID;t.pS=pS;t.eC=(((nC%t.pS)==1?nC-1:nC)/t.pS)+((nC%t.pS)==1?1:0);},addElement:function(){},moveElement:function(){var t=this;var xhtml='';var i,b=t.c*t.pS;for(i=0;i<t.pS;i++){try {xhtml+="<li>"+$('photoRollerE'+(i+b)).innerHTML+"</li>";}catch(e){}}$(t.cID).update(xhtml);t.refreshControls();}});function pageNavigate(st,ps){var bU=document.location.pathname;var page=parseInt(ps,10)-1;var pN=",page=";var b=bU.indexOf(pN);var nI,oI,nL;if(b>0){oI=parseInt(bU.substring(b+pN.length,bU.lastIndexOf('.')),10);}else{oI=1;b=bU.indexOf('.htm')}nI=oI+parseInt(st,10);if(nI<=0)nI=1;nL=bU.substring(0,b);if(nI>1)nL+=pN+nI+'.htmx';else nL+='.html';window.location.href=nL;}var HashListener=Class.create();HashListener.prototype={getHash:function(){try{return location.hash.substring(1)}catch (e){return '';}},initialize:function(){var t=this;t.l=new Array();t.cE=false;t.h=t.getHash();t.tm=setInterval(t.onTimer.bind(t),200);},addListner:function(lf){this.l.push(lf);},onTimer:function(){var t=this;if(!t.cE){try {if(t.h!=t.getHash()&&t.getHash()!=''){t.h=t.getHash();t.cE=true;t.l.each(function(n){n(t.h);});}} finally {t.cE=false;}}}}var HashUpdater=Class.create();HashUpdater.prototype={initialize:function(tID,buildPathFunc,beforeChangeFunc,opt,afterChangeFunc){var t=this;t.tID=tID;t.bPF=buildPathFunc;t.bCF=beforeChangeFunc;t.aCF=afterChangeFunc;t.opt=opt;t.hel=new Array();},addHash:function(h){this.hel.push(h);},onHash:function(h) {var t=this;t.h=h;try{t.bCF(t);}catch(e){};var u=t.bPF(h,t);if(u==null||u==undefined||u.length==0) return;new Ajax.Updater({success:t.tID},u,{method:'get',evalScripts:true,onComplete:t.onComplete.bind(t)});},onComplete:function() {try{this.aCF(this);}catch (e) {}},checkHash:function(h) {for (var i=0;i<this.hel.length;i++)if(this.hel[i]==h)return true;return false;},start:function(sH) {var t=this;t.hl=new HashListener();t.hl.addListner(t.onHash.bind(t));var h=t.hl.getHash();if((h===undefined||h==null||h=='')&&t.hel.length>1){if(sH!=null&&sH!=undefined&&sH.length>0)h=sH;else{var i=Math.ceil(((Math.random()+0.1)*t.hel.length)-1);if(i<0||i>=t.hel.length) i=0;h =t.hel[i];}}else if((h===undefined||h==null||h=='')&&t.hel.length==1){h=t.hel[0];}try{t.bCF(t);}catch(e){};t.onHash(h);}}var Cookie={setRaw:function(n,v,daysToExp,pg){var ex='';try{if(getUOpt('pl')!='1'){if(daysToExp!=undefined){var d=new Date();d.setTime(d.getTime()+(86400000*parseFloat(daysToExp)));ex=';expires='+d.toGMTString();}}}catch(e){}if(pg!=undefined){if(pg!='.')ex+=';path='+pg;}else {ex+=';path=/';}if(cookieDomain!==undefined&&cookieDomain!=null&&cookieDomain!='')ex +=";domain="+cookieDomain;return(document.cookie=escape(n)+'='+(v||'')+ex);},set:function(n,v,daysToExp,pg){return this.setRaw(n,escape(v||''),daysToExp,pg);},get:function(n){var c=document.cookie.match(new RegExp('(^|;)\\s*'+escape(n)+'=([^;\\s]*)'));return(c?unescape(c[2]):null);},erase:function(n,pg){var c=Cookie.get(n)||true;Cookie.set(n,'',-1,pg);return c;},accept:function(){if(typeof(navigator.cookieEnabled)=='boolean'){return navigator.cookieEnabled;}Cookie.set('_t','1');return(Cookie.erase('_t')==='1');}};var bLoggedIn=false;var bNeedAutentication=false;function initAutentication(bAuthNeeded) { bNeedAutentication=bAuthNeeded;}function login() {var c=Cookie.get('FIFAComClub');bLoggedIn=false;if(c!=null&&c!==undefined){try{if(c.toQueryParams().un.length>0)bLoggedIn=true}catch(e){}}if(!bLoggedIn){$('aut_notSI').show();return;}$('currUser').update(c.toQueryParams().un);$('aut_SI').show();$('aut_notSI').hide();changeAbsLink('#navBarBottom','/theclub/index.html','/theclub/myprofile/index.htmx');var w=Cookie.get('warned');if(w==null||w==undefined||w!="true") {checkIfWarned();}}function checkIfWarned() {$j.getJSON("/theclub/warnedlist.txt",function(data) {try {if(data.warned.indexOf(Cookie.get('FIFAComClub').toQueryParams().id)!=-1) {window.location.href='/theclub/tools/changescreenname.htmx?redirect=' + window.location;}} catch (e) { }});}function redirectToChangeScreenname(originalResponse){if(originalResponse.responseText==1){window.location.href='/users/profile/changescreenname.htmx';}}function logout(){Cookie.erase('FIFAComClub');Cookie.erase('warned');bLoggedIn=false;$('aut_SI').hide();$('aut_notSI').show();$('currUser').update(' ');changeAbsLink('#navBarBottom','/theclub/myprofile/index.htmx','/theclub/index.html');if(bNeedAutentication)document.location.href="/";elsedocument.location.href=document.location.href;}function logoutBar() {Cookie.erase('FIFAComClub');Cookie.erase('warned');bLoggedIn=false;$('aut_SI').hide();$('pLogin').hide();$('Logged').hide();$('noLogged').show();$('lnkLogged').hide();changeAbsLink('#navBarBottom','/theclub/myprofile/index.htmx','/theclub/index.html');if(bNeedAutentication)document.location.href="/";elsedocument.location.href=document.location.href;}function forceLogout(){Cookie.erase('FIFAComClub');bLoggedIn=false;$('aut_SI').hide();$('aut_notSI').show();$('currUser').update(' ');}function getUOpt(opt){var c=Cookie.get('FIFAComClub');if(c==null||c==undefined) return '';var v=eval('c.toQueryParams().'+opt);if(v==null||v==undefined) return '';return v;}function myfifacom() {if(getUOpt('un')=='') {$('myfifacom').addClassName('loginteaser');$('mfc').hide();$('mfcNO').show();new Ajax.Updater({ success:'mfcNO' },'/users/library/_loginteaser.html',{ method:'get',evalScripts:true });return;}if((getUOpt('m1') + '').length<3&&(getUOpt('m2') + '').length<3&&(getUOpt('m3') + '').length<3&&(getUOpt('n1') + '').length<3&&(getUOpt('n2') + '').length<3&&(getUOpt('n3') + '').length<3) {$('myfifacom').addClassName('loginteaser');$('mfc').hide();$('mfcNO').show();new Ajax.Updater({ success:'mfcNO' },'/users/library/_personalizeteaser.html',{ method:'get',evalScripts:true });return;}var h='';var m='';if(getUOpt('m1').length==3) { h += mfcMAli(getUOpt('m1'));if(m=='') m=getUOpt('m1');}if(getUOpt('m2').length==3) { h += mfcMAli(getUOpt('m2'));if(m=='') m=getUOpt('m2');}if(getUOpt('m3').length==3) { h += mfcMAli(getUOpt('m3'));if(m=='') m=getUOpt('m3');}if(m!='') { $('mfcMANav').update('<ul>' + h + '</ul>');mfcMAChange(m);}h='';m='';if(getUOpt('n1').length==3) { h += mfcNLli(getUOpt('n1'));if(m=='') m=getUOpt('n1');}if(getUOpt('n2').length==3) { h += mfcNLli(getUOpt('n2'));if(m=='') m=getUOpt('n2');}if(getUOpt('n3').length==3) { h += mfcNLli(getUOpt('n3'));if(m=='') m=getUOpt('n3');}if(m!='') { $('mfcNLNav').update('<ul>' + h + '</ul>');mfcNLChange(m);}$('mfcNO').hide();$('myfifacom').removeClassName('loginteaser');$('mfc').show();if(getUOpt('m1').length==3)$(getUOpt('m1')).addClassName('current');if(getUOpt('n1').length==3)$('n' + getUOpt('n1')).addClassName('current');try { new Ajax.Request('/userdata/games/worldcupfantasyfootball/' + getUOpt('ac') + '.txt',{ method:'get',onComplete:showWCFPoints });} catch (e) { }try { new Ajax.Request('/userdata/games/worldcuppredictor/' + getUOpt('ac') + '.txt',{ method:'get',onComplete:showWCPPoints });} catch (e) { }try { new Ajax.Request('/userdata/games/worldleaguespredictor/' + getUOpt('ac') + '.txt',{ method:'get',onComplete:showWLPoints });} catch (e) { }}function mfcMAli(v){var i='<img src=\'/imgml/flags/s/'+v+'.gif\' height="13" width="19" alt="'+v+'" />'return '<li id="'+ v +'"><a href="javascript:mfcMAChange(\''+v+'\')"><span>'+v+'</span>'+i+'</a></li>'}function mfcNLli(v){var i='<img src=\'/imgml/flags/s/'+v+'.gif\' height="13" width="19" alt="'+v+'" />'return '<li id="n'+ v +'"><a href="javascript:mfcNLChange(\''+v+'\')"><span>'+v+'</span>'+i+'</a></li>'}function mfcMAChange(m){try{$(getUOpt('m1')).removeClassName('current');}catch(e){}try{$(getUOpt('m2')).removeClassName('current');}catch(e){}try{$(getUOpt('m3')).removeClassName('current');}catch(e){}$(m).addClassName('current');new Ajax.Updater({success:'mfcMACont'},'/associations/association='+m+'/library/_myfifaclub.html',{method:'get'});}function mfcNLChange(m){try{$('n'+getUOpt('n1')).removeClassName('current');}catch(e){}try{$('n'+getUOpt('n2')).removeClassName('current');}catch(e){}try{$('n'+getUOpt('n3')).removeClassName('current');}catch(e){}$('n'+m).addClassName('current');new Ajax.Updater({success:'mfcNLCont'},'/associations/association='+m+'/library/_myfifaclubnatleague.html',{method:'get'});}function showWCFPoints(originalRequest){try{var j=eval('('+originalRequest.responseText+')')$('wcfPosition').update(j.rank);$('wcfPoints').update(j.points);$('wcFantasy').show();}catch(e){}}function showWCPPoints(originalRequest){try{var j=eval('('+originalRequest.responseText+')')$('wcpPosition').update(j.rank);$('wcpPoints').update(j.points);$('wcPredictor').show();}catch(e){}}function showWLPoints(originalRequest){try{var j=eval('('+originalRequest.responseText+')')$('wlpPosition').update(j.rank);$('wlpPoints').update(j.points);$('wlPredictor').show();}catch(e){}}function showFIWCPoints(originalRequest){try{var j=eval('('+originalRequest.responseText+')')if(j.r){$('mfcFIWCPosition').update(j.r);$('mfcFIWCPoints').update(j.p);$('mfcFIWC').show();}}catch(e){}}function myfifacomWf(){if(getUOpt('un')==''){$('mfc').hide();$('mfcNO').show();$('dComm').show();new Ajax.Updater({success:'mfcNO'},'/worldfootball/clubfootball/_MA_fixturesresults.html',{method:'get',evalScripts:true});return;}$('dComm').hide()if(getUOpt('n1')==''||getUOpt('n2')==''||getUOpt('n3')==''){$('dComm').show()}$('mfc').show();var h='';var m='';if(getUOpt('n1').length==3){h+=mfcMAliWf(getUOpt('n1'));if(m=='')m=getUOpt('n1');}if(getUOpt('n2').length==3){h+=mfcMAliWf(getUOpt('n2'));if(m=='')m=getUOpt('n2');}if(getUOpt('n3').length==3){h+=mfcMAliWf(getUOpt('n3'));if(m=='')m=getUOpt('n3');}if(m!=''){$('mfcMANav').update('<ul>'+h+'</ul>');mfcMAChangeWf(m);}h='';m='';$('mfcNO').hide();}function mfcMAliWf(v){var i='<img src=\'/imgml/flags/s/'+v+'.gif\' height="13" width="19" alt="'+v+'" />'return '<li id="'+ v +'"><a href="javascript:mfcMAChangeWf(\''+v+'\')"><span>'+v+'</span>'+i+'</a></li>'}function mfcMAChangeWf(m){$(getUOpt('n1')).removeClassName('current');$(getUOpt('n2')).removeClassName('current');$(getUOpt('n3')).removeClassName('current');$(m).addClassName('current');new Ajax.Updater({ success:'mfcMACont' },'/worldfootball/clubfootball/association=' + m + '/_MA_fixturesresults.html',{ method:'get' });}var MyClubRHN={init:function() {if(getUOpt('un')=='') {} else if(getUOpt('pl')=='1') {$j('#myfifacom_nologin #teaserTitle').hide();var avatarUrl="/userdata/" + splitResourceId(getUOpt('id'),3) + "/avatar_24.png";$j('#myfifacom_nologin .myAvatar').html("<div><img src='" + avatarUrl + "' /></div>");$j('#myfifacom_nologin .myName').html(getUOpt('un'));$j('#myfifacom_nologin .myCountry').html(getUOpt('ct'));$j('#myfifacom_nologin .myProfile').show();$j('#myfifacom_nologin a#takeTheTour').hide();$j('#myfifacom_nologin a#activation').show();} else {$j('#myfifacom_nologin').hide();var avatarUrl="/userdata/" + splitResourceId(getUOpt('id'),3) + "/avatar_24.png";$j('#myfifacom_content .myAvatar').html("<div><img src='" + avatarUrl + "' /></div>");$j('#myfifacom_content .myName').html(getUOpt('un'));$j('#myfifacom_content .myCountry').html(getUOpt('ct'));$j('#myfifacom_nologin .myProfile').show();$j('#myfifacom_content #myGames').load('/library/home/_mygames.htmx');if((getUOpt('m1') + '').length<3&&(getUOpt('m2') + '').length<3&&(getUOpt('m3') + '').length<3)MyClubRHN.tolInit('m1',getUOpt('ct'));elseMyClubRHN.tolInit('m1');MyClubRHN.tolInit('m2');MyClubRHN.tolInit('m3');if((getUOpt('n1') + '').length<3&&(getUOpt('n2') + '').length<3&&(getUOpt('n3') + '').length<3)MyClubRHN.tolInit('n1',getUOpt('ct'));elseMyClubRHN.tolInit('n1');MyClubRHN.tolInit('n2');MyClubRHN.tolInit('n3');MyClubRHN.tolSelect('t');$j('#myfifacom_content #myClubNews .iC').load('/theclub/library/_clubnewshp.html');$j('#myfifacom_content').show();var poll=$j('.ie div.pollContainer .iC div');if(poll.size()>0) {poll.hide(1,function() { poll.show();});}}},tolInit:function(strId,id) {if(id==null||id=='')id=getUOpt(strId);if(id.length!=3) {$j('li#' + strId).hide();} else {var lnk=$j('li#' + strId + ' a');lnk.html("<img width='19' height='13' src='/imgml/flags/s/" + id + ".gif'><span>" + id + "</span>");lnk.attr('href',"javascript:MyClubRHN.tolUpdate('" + strId + "','" + id + "');");if(strId=='m1'||strId=='n1')MyClubRHN.tolUpdate(strId,id);}},tolUpdate:function(strId,id) {if(strId=="m1"||strId=="m2"||strId=="m3") {$j('#myTeamsFlags li').removeClass('current');$j('#myTeamsFlags li#' + strId).addClass('current');$j('#myTeams').load('/associations/association=' + id + '/library/_myfifaclub.html');} else if(strId=="n1"||strId=="n2"||strId=="n3") {$j('#myLeaguesFlags li').removeClass('current');$j('#myLeaguesFlags li#' + strId).addClass('current');$j('#myLeagues').load('/associations/association=' + id + '/library/_myfifaclubnatleague.html');}},tolSelect:function(opt) {if(opt=='l') {$j('#tol_t').removeClass('current');$j('#tol_l').addClass('current');$j('#myTeamsFlags').hide();$j('#myLeaguesFlags').show();$j('#myTeams').hide();$j('#myLeagues').show();} else {$j('#tol_t').addClass('current');$j('#tol_l').removeClass('current');$j('#myTeamsFlags').show();$j('#myLeaguesFlags').hide();$j('#myTeams').show();$j('#myLeagues').hide();}},showGameResults:function(service,datafile) {new Ajax.Request(datafile,{method:'get',onSuccess:function(originalRequest) {try {var j=eval('(' + originalRequest.responseText + ')')$(service + 'Points').update(j.points);$(service + 'Rank').update(j.rank);var performance=Number(j.last_rank) - Number(j.rank);if(performance>0) {$(service + 'Performance').update('(<span style="color:green">+' + performance + '</span>)');} else if(performance<0) {$(service + 'Performance').update('(<span style="color:red">' + performance + '</span>)');}$('myGame_' + service + 'Score').show();} catch (e) { }}});}}function opPopup(mode) {if(mode=='logged') {$('popup_login').show();$('pLogin').show();$('qlLogged').show();$('a_upLogged').show();$('i_upLogged').show();$('a_downLogged').hide();$('i_downLogged').hide();$('lnkLogged').addClassName('current');$('lnkLogged').removeClassName('lnk');$('lnkLogged').removeClassName('logged');return;}$('popup_login').show();$('pLogin').show();$('a_down').hide();$('i_down').hide();$('a_up').show();$('i_up').show();$('loginTheclub').show();$('lnkLog').addClassName('current');$('lnkLog').removeClassName('lnk');}function clPopup(mode) {if(mode=='logged') {$('popup_login').hide();$('pLogin').hide();$('a_downLogged').show();$('i_downLogged').show();$('a_upLogged').hide();$('i_upLogged').hide();$('lnkLogged').removeClassName('current');$('lnkLogged').addClassName('lnk');return;}try {$('popup_login').hide();$('pLogin').hide();$('a_down').show();$('i_down').show();$('a_up').hide();$('i_up').hide();$('lnkLog').removeClassName('current');$('lnkLog').addClassName('lnk');} catch (e) { }}function onLogin() {var c=Cookie.get('FIFAComClub');bLoggedIn=false;if(c!=null&&c!==undefined) {try { if(c.toQueryParams().un.length>0) bLoggedIn=true;$('Logged').hide();}catch (e) { }}if(!bLoggedIn){ $('aut_SI').hide();$('Logged').hide();$('noLogged').show();return;}$('noLogged').hide();$('Logged').show();$('popup_login').hide();$('cUser').update(c.toQueryParams().un);$('cUser2').update(c.toQueryParams().un);changeAbsLink('#navBarBottom','/theclub/index.html','/theclub/myprofile/index.htmx');if($j("#level1.theClubHeader").size()>0) {$("level1").onclick="";$j("#level1.theClubHeader").click(function() { document.location.href='/theclub/myprofile/index.htmx';});$j("#lev1Menu a[href$='/theclub/index.html']").attr("href","/theclub/myprofile/index.htmx");}var w=Cookie.get('warned');if(w==null||w==undefined||w!="true") {checkIfWarned();}return;}function cleanLogin() {try {var e=$('cp_email');if(e.hasClassName('toclean')) {e.removeClassName('toclean');e.value='';}var p=$('cp_password');if(p.hasClassName('toclean')) {p.removeClassName('toclean');p.value='';}} catch (exc) { }}function changeAbsLink(sel,oldU,newU) {try {var el=$j(sel + ' a[href$=' + oldU + ']');var u=el.attr('href');u=u.substring(0,u.indexOf(oldU)) + newU;el.attr('href',u);} catch(e) {}}function splitResourceId(id,splitLen) {var ret='';id=id.toString();if(id!='') {for (var i=0;i<(id.length - id.length % splitLen) / splitLen;i++) {ret += id.substr(i * splitLen,splitLen) + '/';}if(i * splitLen<id.length) ret += id.substr(i * splitLen) + '/';ret=ret.slice(0,-1);}return ret;}var Rating={id:0,rt:0,idtype:0,init:function(elementID,videoMode) {this.id=elementID;this.idtype=0;this.videoMode=(videoMode===undefined||videoMode==null) ? false:videoMode;var u="/newscentre/rating/news/" + splitResourceId(this.id,idSplitLen) + "/votes.xml?rnd=" + Math.random();var a=new Ajax.Request(u,{ method:'get',onComplete:Rating.onCallBack });},initFG:function(elementID,videoMode,lang) {this.id=elementID;this.idtype=1;this.videoMode=(videoMode===undefined||videoMode==null) ? false:videoMode;var u;if(lang=='ar') {u="/newscentre/rating/_fg,id=" + this.id + ".xml?rnd=" + Math.random();}else {u="/newscentre/rating/photo/" + splitResourceId(this.id,idSplitLen) + "/votes.xml?rnd=" + Math.random();}var a=new Ajax.Request(u,{ method:'get',onComplete:Rating.onCallBack });},initVD:function(elementID,videoMode) {this.id=elementID;this.idtype=2;this.videoMode=(videoMode===undefined||videoMode==null) ? false:videoMode;var u="/newscentre/rating/video/" + splitResourceId(this.id,idSplitLen) + "/votes.xml?rnd=" + Math.random();var a=new Ajax.Request(u,{ method:'get',onComplete:Rating.onCallBack });},isAlreadyRated:function() {var c=Cookie.get("rate");if(c==null) return false;var v=eval('c.toQueryParams().v' + this.id);return (v==1);},rate:function(idx) {if(this.id>0&&idx>0&&this.isAlreadyRated()) return;var u="/newscentre/rating/rnd=" + Math.random() + "/_,id=" + this.id + ".htmx?t=" + this.idtype + "&v=" + idx;var a=new Ajax.Request(u,{ method:'get',onComplete:Rating.onCallBack,asynchronous:false });if(idx==0) return;var c=Cookie.get("rate");if(c!=null) { c += '&';} else { c='';}c += 'v' + this.id + '=1';Cookie.set('rate',c,1,'.');},onCallBack:function(originalResponse) {if(originalResponse.responseText=='') return;Rating.rt=parseFloat(originalResponse.responseText.toQueryParams().avg);var tx=originalResponse.responseText.toQueryParams().text;$('voteResults').update(tx.gsub("'",""));Rating.unhover();},getIconPath:function(icon) {if(this.videoMode)return "/imgml/videoplayer/" + icon;elsereturn "/imgml/icons/" + icon;},hover:function(idx) {if(this.isAlreadyRated()) return;var i;for (i=1;i<=5;i++) {var src=this.getIconPath("starv.gif");if(i<=idx) src=this.getIconPath("starvs.gif");$("star_" + i).setAttribute("src",src);}},unhover:function() {var i;for (i=1;i<=5;i++) {var im=(Math.round(this.rt)>=i) ? "star1.gif":"star0.gif";$("star_" + i).setAttribute("src",this.getIconPath(im));}}}var Comment={newsId:0,init:function(newsId) {this.newsId=newsId;var u="/newscentre/comment/" + splitResourceId(this.newsId,idSplitLen) + "/index.html";var a=new Ajax.Request(u,{ method:'get',onComplete:Comment.displayComments });},viewAllComments:function() {var u="/newscentre/allcomment/" + splitResourceId(this.newsId,idSplitLen) + "/index.html";var a=new Ajax.Request(u,{ method:'get',onComplete:Comment.displayComments });},displayComments:function(originalResponse) {var d=$('comments_' + Comment.newsId);d.update(originalResponse.responseText);if(originalResponse.responseText='')$('listComment').hide();},addComments:function(newsid) {var u='/theclub/tools/comment/newsid=' + newsid + '/_comment.html';if(bLoggedIn)var a=new Ajax.Request(u,{ method:'get',onComplete:Comment.displayCommentsForm });else {var ru=document.location.pathname + '#insertcomment';document.location.href='/theclub/index.html?redirect=' + escape(ru)}},addCommentsHYS:function(newsid) {var u='/fanfest/tools/newsid=' + newsid + '/_hyscomment.html';if(bLoggedIn) {var a=new Ajax.Request(u,{ method:'get',onComplete:Comment.displayCommentsForm });}else {var ru=document.location.pathname + '#insertcomment';document.location.href='/theclub/index.html?redirect=' + escape(ru)}},displayCommentsForm:function(originalResponse) {var d=$('form_comments_' + Comment.newsId);d.update(originalResponse.responseText);$('form_comments_' + Comment.newsId).show();},submitComments:function() {if($('c_comment').value.length>1) {$('btn_postNewsComment').disabled=true;var u="/theclub/tools/comment/_comment.htmx?btn_Save=save&n=" + this.newsId + "&c_comment=" + escape($('c_comment').value);var a=new Ajax.Request(encodeURI(u),{ method:'get',onComplete:Comment.onSaveComments });}},onSaveComments:function(originalResponse) {if(originalResponse.responseText.indexOf('error')!=-1) {var d=$('form_comments_' + Comment.newsId);var s='<div class="commentError"><div class="cEIC">';s += originalResponse.responseText.toQueryParams().error.gsub('\'','');s += '</div></div>'d.update(s);d.show();}else if(originalResponse.responseText.indexOf('warning')!=-1) {Comment.closeCommentsForm();var d=$('form_comments_' + Comment.newsId);var s='<div class="commentWarn"><div class="cEIC">';s += originalResponse.responseText.toQueryParams().warning.gsub('\'','');s += '</div></div>'d.update(s);d.show();}else {Comment.closeCommentsForm();var u="/newscentre/allcomment/" + splitResourceId(this.newsId,idSplitLen) + "/index.html";var a=new Ajax.Request(u,{ method:'get',onComplete:Comment.displayComments });}},closeCommentsForm:function() {$('form_comments_' + Comment.newsId).hide();},textLimit:function(obj) {var len=obj.value.split(/[\s]+/);if(len.length>0) {if(numWordsComment - (len.length - 1)>=0) {$('c_count').value=numWordsComment - (len.length - 1);}else$('c_count').value=0;}counter=len.length - 1;if(len.length>numWordsComment) {objvalue=obj.value.split(/[\s]+/);var newval='';for (var m=0;m<numWordsComment;m++) {newval += objvalue[m] + ' ';}obj.value='';obj.value=newval;return false;}return true;}}var poll={Vote:function(id){var f=$('f_poll'+id)var d='dynamic_'+id;var bV=false;for (var i=0;i<f.i_answers.length;i++){if(f.i_answers[i].checked)bV=true;}if(!bV){alert(f.message.value);return false;}new Ajax.Updater(d,'/theclub/polls/pollid='+id+'/vote.htmx',{method:'post',parameters:f.serialize()});},ViewResult:function(id,lang){var d='dynamic_'+id;var l='';if(lang!==undefined&&lang!=null&&lang!='') l='/language='+lang;new Ajax.Updater(d,'/theclub/polls/pollid='+id+l+'/instantresult.html',{method:'get'});},ViewROResult:function(id,lang){var d='dynamic_'+id;var l='';if(lang!==undefined&&lang!=null&&lang!='') l='/language='+lang;new Ajax.Updater(d,'/theclub/polls/pollid='+id+l+'/result.html',{method:'get'});},Load:function(id){var d='dynamic_'+id;var c=Cookie.get('poll'+id);var u='/theclub/polls/pollid='+id+'/result.html';if(c===undefined||c==null||c=='')u='/theclub/polls/pollid='+id+'/vote.html'new Ajax.Updater(d,u,{method:'get'});}}if(parent.frames.length>0) {top.location.href=self.location.href;}function setCSS(title){var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){a.disabled=true;if(a.getAttribute("title")==title)a.disabled=false;}};Cookie.set('accessFIFA',title,365,'/');}function toggleAccessibilityButtons(t){if(t===undefined||t==null||t=='')t=Cookie.get('accessFIFA');if(t!='standard'){$('accessibleVersion').hide();if(!this.ieOld)$('standardVersion').show();}else{$('accessibleVersion').show();$('standardVersion').hide()};}function switchCSS(){var t=Cookie.get('accessFIFA');if(t===undefined||t==null||t=='') t='standard';if(t=='standard') t='accessible';else t='standard';setCSS(t);toggleAccessibilityButtons(t)}var openCSS=function(){var t=Cookie.get('accessFIFA');if(t===undefined||t==null||t=='')t='standard';if(this.ieOld)t='accessible';setCSS(t);}();var hbxPageName='',hbxContentCategory='',bHbxFT=true;function setHBXParameters(pn,cc){hbxPageName=pn;hbxContentCategory=cc;}function invokeAjaxHBXPageView(){if(!bHbxFT)invokeHBXPageView(hbxPageName,hbxContentCategory);bHbxFT=false;}function invokeHBXPageView() {if(hbxPageName!=''&&hbxContentCategory!='') _hbPageView(hbxPageName,hbxContentCategory);}function _hbPageViewSponsored(pn,cc,sp){if(pn!=''&&cc!='') _hbPageView(pn,cc);}function getHostName() {var s=document.location.href;s=s.replace(/(^[a-zA-z0-9]*:\/\/)/,'');s=s.replace(/(\/.*)/,'');return s;}function getUrlParams() {var s=document.location.href;if(s.indexOf('?')!=-1) return s.substring(s.indexOf('?')+1);if(s.indexOf('#')!=-1) return s.substring(s.indexOf('#')+1);return '';}function fnClearInput(inp,ot){if(inp.value.toLowerCase()==ot.toLowerCase()) inp.value='';}function wloc(originalResponse){$('wLang').update(originalResponse.responseText);$('wLang').show();}function wlo(){$('wMA').hide();if($('wLang').visible()) {$('wLang').hide();return;}if($('wLang').empty())var pA=new Ajax.Request("/library/home/_languageslist.html",{method:'get',onComplete:wloc});else $('wLang').show();}function wlc(){$('wLang').hide();}function wmac(){$('wMA').hide();}function wmao(){$('wLang').hide();if($('wMA').visible()) {$('wMA').hide();return;}if($('wMA').empty()) var pA=new Ajax.Request("/library/home/_countrieslist.html",{method:'get',onComplete:wmaoc});else $('wMA').show();}function wmaopl(originalResponse){$('wMA').update(originalResponse.responseText);}function wmaoc(originalResponse){$('wMA').update(originalResponse.responseText);$('wMA').show();}function wmapl(){clearTimeout(mapltimer);var pA=new Ajax.Request("/library/home/_countrieslist.html",{method:'get',onComplete:wmaopl});}var mapltimer;function mapreloader(){mapltimer=setTimeout("wmapl()",2000);}function wpOpen(u) {var h=652;if(window.ie6)h=648;window.open(u,'videoplayer','width=740,height='+h+',resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no');}function wpopenlower(u) {var h=652;if(window.ie6)h=648;window.open(u,'videoplayer','width=740,height='+h+',resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no');}function openPopup(u,h,w){window.open(u,'popup','width='+w+',height='+h+',resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no')}function mcOpen(u){var h='height=705';window.open(u,'popup','width=770,'+h+',resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no');}function mcWCQOpen(u) {window.open(u,'popup','width=885,height=705,resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no');}function mcFCCOpen(u){document.location.href=u;}function resizeFWCQFlashPopUp(divId,h,w,resizeType) {var ua=navigator.userAgent.toLowerCase();var hNew,wNew;if(resizeType=='1') {$('prelmatchcast').setStyle({visibility:'visible'});}else {$('prelmatchcast').setStyle({visibility:'hidden'});}if(ua.indexOf("chrome")>-1) {if(resizeType=='1') window.resizeTo(Number(w)+Number(10),760);else window.resizeTo(Number(w)+Number(5),135);return;}if(ua.indexOf("msie 6")>-1) {if(resizeType=='1') window.resizeTo(Number(w)+Number(10),745);else window.resizeTo(Number(w),120);return;}var o=$('resizeReference');window.resizeTo(w,h);var hDiff=mcFWCQstartH - o.clientHeight;var wDiff=mcFWCQstartW - o.clientWidth;var hDiffmin=mcFWCQstartHmin - o.clientHeight;var wDiffmin=mcFWCQstartWmin - o.clientWidth;if(resizeType=='1') {hNew=Number(h) + Number(hDiff);wNew=Number(w) + Number(wDiff);window.resizeTo(wNew,hNew);}else if(resizeType=='2') {hNew=Number(h) + Number(hDiffmin-20);wNew=Number(w) + Number(wDiffmin);window.resizeTo(wNew,hNew);}}function dcOpen(){window.open('/live/competitions/worldcup/preliminarydraw/drawcast.html','popup','width=885,height=700,resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no');}var Tab={id:'',tab:0,Change:function(id,url,tab){Tab.id=id;Tab.tab=tab;var p=$(id);var a=new Ajax.Updater({success:id+'_content'},url,{method:'get',evalScripts:true,onComplete:Tab.Refresh()});},Refresh:function(){var d=$(this.id).descendants();for(i=0;i<d.length;i++){try {$(d[i].id).removeClassName('current');if(d[i].id==this.id+'_'+this.tab)$(d[i].id).addClassName('current');}catch(e){}}}}function toggleImg(obj,img1,img2){if(obj.src.indexOf(img1)>0){obj.src=img2;} else {obj.src=img1;}}function currMenuItem(id){try{if($(id)){var p=document.location.pathname;for(i=0;i<$(id).childNodes.length;i++){//Strict matchvar u=String($(id).childNodes[i].innerHTML.match(/href="[^"]*"/));u=u.replace(/href=|"/ig,'');if(p.match(u)){Element.addClassName($(id).childNodes[i],'current');return;}}for(i=0;i<$(id).childNodes.length;i++){//Loose matchvar u=String($(id).childNodes[i].innerHTML.match(/href="[^"]*"/));u=u.replace(/href=|"/ig,'');u=u.replace(/index.html|[a-z]*list.html/,'');//Index pagesu=u.match(/[^/]+/g);u=u.toString().replace(/,/g,'/.*');if(p.match(u+'/')){Element.addClassName($(id).childNodes[i],'current');return;}}}}catch(e){}}var AjaxIncluder=Class.create();AjaxIncluder.prototype ={initialize:function(url){new Ajax.Updater('ajaxincluded',url);}};function checkToS(){var accept_tos_ayq=$('c_agree').checked;if(accept_tos_ayq){Comment.submitComments()$('d_errPanelComments').hide();return true;}else {$('d_errPanelComments').show();$('d_errPanelComments').focus();window.scrollTo(0,0);return false;}}function WFTickerOnLeagueSelect(nat){document.location.href="/worldfootball/worldmatchcentre/index.html#"+nat;}function currMenuItemCC(id){try{if($(id)){var p=document.location.pathname;for(i=0;i<$(id).childNodes.length;i++){var u=String($(id).childNodes[i].innerHTML.match(/href="[^"]*"/));u=u.replace(/href=|"/ig,'');if(p.match(u)){Element.addClassName($(id).childNodes[i],'current');Element.addClassName($(id).childNodes[$(id).childNodes.length-1],'last');Element.addClassName($(id).childNodes[i-1],'precurrent');return;}}}}catch(e){} }function printAndGoBack() {window.print();window.close();}function openWidget(name) {closeWidget();$j("#" + name).animate({ opacity:"show",top:"100",left:"250" },"fast");}function closeWidget() {$j(".widgetFlashBox").animate({ opacity:"hide",top:"0",left:"250" },"fast");}var FormValidate=Class.create();FormValidate.prototype={initialize:function(p){this.params=p;for(i=0;i<p.length;i++){var e=p[i];if(this.isRequired(e))$(e.label).addClassName('required');}this.erList=new Array();this.errClass='validateError';},checkSpecialCharacter:function(v,chkSpecial){if(!chkSpecial) return false;var p=new RegExp("[^A-Za-z_ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿĀāĂăĄąĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥħĨĩĪīĬĭĮįİıĲĳĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňŉŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž0-9.\\'\\.\\-]","g");patmatch=p.test(v);return patmatch;},checkText:function(id,required,chkSpecial,minL,maxL){if(minL<0) minL=0;if(required&&minL<1) minL=1;var v=$F(id);if(required){if(v==null||v==undefined)return false;else{if(v.length<minL)return false;if(v.length>maxL)return false;if(this.checkSpecialCharacter(v,chkSpecial))return false;}}else{if(v!=null&&v!=undefined&&v.length>0){if(v.length>maxL)return false;if(this.checkSpecialCharacter(v,chkSpecial))return false;}}return true;},checkNumber:function(id,required,onlyInt,minV,maxV){var v=$F(id);if(required||v.length>0){if(v==undefined||v==null||isNaN(v)||v!=parseFloat(v))return false;else{if(onlyInt&&(parseInt(v)!=v||v.indexOf('.')!=-1)) return false;if(v<minV) return false;if(v>maxV) return false;}}return true;},checkEmail:function(id,required){var v=$F(id);var moreExt=new Array("info","aero","museum","name");if(required||v.length>0){var p=new RegExp("^(\\w|-|\\.)+@(\\w|-|\\.)+\\.[a-z]{2,3}$","i");pMatch=p.test(v);if(pMatch)return true;else{for(var i=0;i<moreExt.length;i++){p.compile("^(\\w|-|\\.)+@(\\w|-|\\.)+\\." + moreExt[i] +"$");pMatch=p.test(v);if(pMatch)return true;}}return false;}return true;},checkEmailString:function(emailAddress){var p=new RegExp("^(\\w|-|\\.)+@(\\w|-|\\.)+\\.[a-z]{2,3}$","i");return p.test(emailAddress);},checkDate:function(idD,idM,idY){var vD=$F(idD);var vM=$F(idM);var vY=$F(idY);var v=vD+'/'+vM+'/'+vY;var re= /(\d{1,2})(-|\/)+(\d{1,2})(-|\/)+(\d{4}|\d{2})/;if(!re.test(v))return false;var res=null;if(v.match(/\-/)!=null)res=v.split(/\-/);elseres=v.split(/\//);if(res!=null){if(res.length!=3) return false;var d=new Date(vY,vM-1,vD);if(d.getDate()!=vD||d.getMonth()!=vM-1||d.getFullYear()!=vY) return false;return true;}return false;},checkCompare:function(e){if(e.idCompare==null||e.idCompare==undefined) return true;if($F(e.id)!=$F(e.idCompare)) return false;return true;},checkOption:function(id){if($(id).selectedIndex>0) return true;return false;},isRequired:function(e){if(e.required==null||e.required==undefined) return true;return e.required;},min:function(e){if(e.min==null||e.min==undefined) return Number.MIN_VALUE;return e.min;},max:function(e){if(e.max==null||e.max==undefined) return Number.MAX_VALUE;return e.max;},setError:function(e){var t=this;t.valid=false;t.erList.push(e.message);try {if(!$(e.label).hasClassName(t.errClass)) $(e.label).addClassName(t.errClass)if(e.type=='date'){if(!$(e.idD).hasClassName(t.errClass)) $(e.idD).addClassName(t.errClass)if(!$(e.idM).hasClassName(t.errClass)) $(e.idM).addClassName(t.errClass)if(!$(e.idY).hasClassName(t.errClass)) $(e.idY).addClassName(t.errClass)}elseif(!$(e.id).hasClassName(t.errClass)) $(e.id).addClassName(t.errClass)}catch(e){};},setErrorCompare:function(e){var t=this;t.valid=false;t.erList.push(e.messageCompare);try {if(!$(e.label).hasClassName(t.errClass)) $(e.label).addClassName(t.errClass)if(!$(e.id).hasClassName(t.errClass)) $(e.id).addClassName(t.errClass)if(!$(e.idCompare).hasClassName(t.errClass)) $(e.idCompare).addClassName(t.errClass)if(!$(e.labelCompare).hasClassName(t.errClass)) $(e.labelCompare).addClassName(t.errClass)}catch(e){};},cleanError:function(e){var t=this;try{if($(e.label).hasClassName(t.errClass)) $(e.label).removeClassName(t.errClass)if(e.type=='date'){if($(e.idD).hasClassName(t.errClass)) $(e.idD).removeClassName(t.errClass)if($(e.idM).hasClassName(t.errClass)) $(e.idM).removeClassName(t.errClass)if($(e.idY).hasClassName(t.errClass)) $(e.idY).removeClassName(t.errClass)}elseif($(e.id).hasClassName(t.errClass)) $(e.id).removeClassName(t.errClass)}catch(e){};},addErrorMessage:function(msg){this.erList.push(msg);},setErrorClass:function(id){if(!$(id).hasClassName(this.errClass)) $(id).addClassName(this.errClass)},resetErrorClass:function(id){if($(id).hasClassName(this.errClass)) $(id).removeClassName(this.errClass)},setErrorState:function(){this.valid=false;},getValidationStatus:function(){return this.valid;},getValidationErrorList:function(){var el=this.erList;if(el==null||el==undefined||el.length==0) return '';var t='<ul>';for (i=0;i<el.length;i++)t +='<li>'+el[i]+'</li>';t+='</ul>';return t;},validate:function(){var t=this;var p=t.params;t.valid=true;t.erList=new Array();for(i=0;i<p.length;i++){var e=p[i];switch (e.type){case 'text':{if(!t.checkText(e.id,t.isRequired(e),true,t.min(e),t.max(e))) t.setError(e)else if(!t.checkCompare(e)) t.setErrorCompare(e)elset.cleanError(e);}break;case 'any-text':{if(!t.checkText(e.id,t.isRequired(e),false,t.min(e),t.max(e))) t.setError(e)else if(!t.checkCompare(e)) t.setErrorCompare(e)elset.cleanError(e);}break;case 'int':{if(!t.checkNumber(e.id,t.isRequired(e),true,t.min(e),t.max(e))) t.setError(e)else if(!t.checkCompare(e)) t.setErrorCompare(e)elset.cleanError(e);}break;case 'number':{if(!t.checkNumber(e.id,t.isRequired(e),false,t.min(e),t.max(e))) t.setError(e)else if(!t.checkCompare(e)) t.setErrorCompare(e)elset.cleanError(e);}break;case 'date':{if(t.isRequired(e)&&(!t.checkDate(e.idD,e.idM,e.idY))) t.setError(e)else if(!t.checkCompare(e)) t.setErrorCompare(e)elset.cleanError(e);}break;case 'email':{if(!t.checkEmail(e.id,t.isRequired(e))) t.setError(e)else if(!t.checkCompare(e)) t.setErrorCompare(e)elset.cleanError(e);}break;case 'option':{if(t.isRequired(e)&&(!t.checkOption(e.id))) t.setError(e)elset.cleanError(e);}break;case 'check':{if(!t.isRequired(e)){if($F(e.id)==null) t.setError(e)elset.cleanError(e)}elset.cleanError(e);}break;}}return t.valid;}}var Email={idNews:'',d:'',dMsg:'',viewFrmEmail:function(newsid,dN,bN) {if(Email.d!='') {$(Email.d).hide();$('emailFrm').removeClassName('current');Email.d='';return;}Email.idNews=newsid;Email.d=dN;var u='/theclub/tools/email/news/_email.html';var a=new Ajax.Request(u,{ method:'get',evalScripts:true,onComplete:Email.displayFrmEmail });if(bN!=undefined) {$('emailFrm').addClassName('current');Bookmarks.d=bN;Bookmarks.hideBookmarks();}},hideFrmEmail:function() {$(Email.d).hide();Email.d='';$('emailFrm').removeClassName('current');},viewFrmEmailGeneric:function(dN,newsTag,emailTitle,mode,confirmation) {if(Email.d!='')$(Email.d).hide();Email.d=dN;var u='/theclub/tools/email/genericemail/_email.html?c_tagnewsbody=' + newsTag + '&c_title=' + emailTitle + '&c_mode=' + mode + '&c_confirmMsg=' + confirmation;var a=new Ajax.Request(u,{ method:'get',evalScripts:true,onComplete:Email.displayFrmEmail });},displayFrmEmail:function(originalResponse) {$(Email.d).update(originalResponse.responseText);var fe=$('c_from');var fn=$('c_fromname');var c=Cookie.get('FIFAComClub');if(c!=null&&c!==undefined&&fe!==undefined&&fe!=null&&fn!==undefined&&fn!=null) {fn.value=c.toQueryParams().un;fe.value=c.toQueryParams().em;}$('c_urln').value=document.location.href;$('emailSubjectTXT').innerHTML=newsTitleString;$(Email.d).show();},sendEmail:function(idNews) {Email.clearAllErrors();if(($('c_from').value=='')||($('c_fromname').value=='')||($('c_to').value=='')||($('c_message').value=='')){ $('c_errorMsg').show();return;}var frm=new FormValidate(new Array(0));if(!frm.checkEmail('c_from',true)) {if($('c_errorMsgEmailFrom')!=null) { $('c_errorMsgEmailFrom').show();}return;}var strTo=$F('c_to');if(strTo.lastIndexOf(',')==strTo.length - 1) {strTo=strTo.substring(0,strTo.length - 1);$('c_to').value=strTo;}var toArr=strTo.split(',');for (var i=0;i<toArr.length;i++) {if(!frm.checkEmailString(toArr[i])) {if($('c_errorMsgEmailTo')!=null) { $('c_errorMsgEmailTo').show();}return;}}if(idNews!=''){ var u='/theclub/tools/email/news/newsid=' + Email.idNews + '/_email.htmx' }else{ var u="/theclub/tools/email/genericemail/_email.htmx";}var a=new Ajax.Updater('frmEmail',encodeURI(u),{ method:'post',parameters:$('f_sendEmail').serialize(),evalScripts:true });},clsForm:function() {$(Email.d).hide();$('emailFrm').removeClassName('current');Email.d='';return;},clearAllErrors:function() {$('c_errorMsg').hide();if($('c_errorMsgEmailFrom')!=null) { $('c_errorMsgEmailFrom').hide();}if($('c_errorMsgEmailTo')!=null) { $('c_errorMsgEmailTo').hide();}},openPhotoEmailDialog:function(newsid,dN) {if(Email.d!='')$(Email.d).hide();Email.idNews=newsid;Email.d=dN;var u='/theclub/tools/email/photos/photoid=' + Email.idNews + '/_email.html';var a=new Ajax.Request(u,{ method:'get',evalScripts:true,onComplete:Email.displayFrmEmail });},sendPhotoEmail:function() {Email.clearAllErrors();if(($('c_from').value=='')||($('c_fromname').value=='')||($('c_to').value=='')||($('c_message').value=='')){ $('c_errorMsg').show();return;}var frm=new FormValidate(new Array(0));if(!frm.checkEmail('c_from',true)) {if($('c_errorMsgEmailFrom')!=null) { $('c_errorMsgEmailFrom').show();}return;}var strTo=$F('c_to');if(strTo.lastIndexOf(',')==strTo.length - 1) {strTo=strTo.substring(0,strTo.length - 1);$('c_to').value=strTo;}var toArr=strTo.split(',');for (var i=0;i<toArr.length;i++) {if(!frm.checkEmailString(toArr[i])) {if($('c_errorMsgEmailTo')!=null) { $('c_errorMsgEmailTo').show();}return;}}var u='/theclub/tools/email/photos/photoid=' + Email.idNews + '/_email.htmx?' + $('f_sendEmail').serialize()var a=new Ajax.Updater('frmEmail',encodeURI(u),{ method:'get',evalScripts:true });},medicalFieldValidate:function() {Email.clearAllErrors();if(($('afmc_lastName').value=='')||($('afmc_firstName').value=='')||($('afmc_title').value=='')||($('afmc_profession').value=='')||($('afmc_institution').value=='')||($('afmc_mailingAdress').value=='')||($('afmc_cityZipCode').value=='')||($('afmc_country').value=='')||($('afmc_email').value=='')||($('afmc_mobile').value=='')||($('afmc_daytimeTel').value=='')) {$('c_errorMsg').show();$('c_errorMsgMail').hide();scroll(0,0);return;}if($('afmc_email').value!=''&&!Email.checkEmail('afmc_email',true)) {$('c_errorMsgMail').show();$('c_errorMsg').hide();scroll(0,0);return;}var u='/aboutfifa/developing/medical/footballmedicineconference/_registration.htmx?' + $('afm_sendEmail').serialize();window.location.href=u;return true;},checkEmail:function(id,required) {var v=$F(id);var moreExt=new Array("info","aero","museum","name");if(required||v.length>0) {var p=new RegExp("^(\\w|-|\\.)+@(\\w|-|\\.)+\\.[a-z]{2,3}$","i");pMatch=p.test(v);if(pMatch)return true;else {for (var i=0;i<moreExt.length;i++) {p.compile("^(\\w|-|\\.)+@(\\w|-|\\.)+\\." + moreExt[i] + "$");pMatch=p.test(v);if(pMatch)return true;}}return false;}return true;}}var DBClickOrd=Math.random()*10000000000000000;var DBClickTile=0;var DBClickKeyValues=getDBClickKeyValues();function getDBClickKeyValues() {var m=document.location.pathname.match(/[^/]*=[^/|^\.]*/g);if(m!=null){return m.toString().replace(',',';')+';';} return '';}var tzc={tFmt:'dd/MM/yy HH:mm',tCls:'matchTimeConvertible',initialized:false,init:function(sFormat) {if(sFormat!==undefined&&sFormat!=null&&sFormat!='') tzc.tFmt=sFormat;tzc.initialized=true;var c=Cookie.get('TZC');if(c!==undefined&&c!=null&&c=='1')tzc.clientTime();elsetzc.localTime();},refreshAfterAjax:function() {if(tzc.initialized!=true) return;var c=Cookie.get('TZC');if(c!==undefined&&c!=null&&c=='1')tzc.clientTime();elsetzc.localTime();},localTime:function() {$('tzcLocal').show();$('tzcClient').hide();var mts=document.getElementsByClassName(tzc.tCls);mts.each(function(mt) {if(mt.readAttribute('title')!=null&&mt.readAttribute('title').length>0) {var s=mt.readAttribute('title').split(',')if(s.length>0) {mt.update(s[0]);mt.removeClassName('TZCclient');}}});Cookie.set('TZC','0',365,'/');},clientTime:function() {$('tzcClient').show();$('tzcLocal').hide();var mts=document.getElementsByClassName(tzc.tCls);mts.each(function(mt) {if(mt.readAttribute('title')!=null&&mt.readAttribute('title').length>0) {var s=mt.readAttribute('title').split(',')if(s.length>0) {var t=tzc.formatDate(tzc.decodeUTC(s[1]));mt.update(t);mt.addClassName('TZCclient');}}});Cookie.set('TZC','1',365,'/');},padString:function(s,l,pc) { while (s.length<l) { s=pc + s };return s;},formatDate:function(d) {var _d=tzc.padString(d.getDate().toString(),2,'0'),_M=tzc.padString((d.getMonth() + 1).toString(),2,'0'),_y=tzc.padString((d.getFullYear() % 1000).toString(),2,'0'),_h=tzc.padString(d.getHours().toString(),2,'0'),_m=tzc.padString(d.getMinutes().toString(),2,'0');if(tzc.tFmt=='dd/MM/yy HH:mm') return _d + '/' + _M + '/' + _y + ' ' + _h + ':' + _m;if(tzc.tFmt=='dd/MM HH:mm') return _d + '/' + _M + ' ' + _h + ':' + _m;if(tzc.tFmt=='HH:mm') return _h + ':' + _m;if(tzc.tFmt=='dd/MM/yy') return _d + '/' + _M + '/' + _y;return _d + '/' + _M + '/' + _y + ' ' + _h + ':' + _m;},decodeUTC:function(n) {var _m=n % 100,_h=Math.floor(n / 100) % 100,_d=Math.floor(n / 10000) % 100,_M=(Math.floor(n / 1000000) % 100) - 1,_y=Math.floor(n / 100000000),_dt=new Date();_dt.setTime(Date.UTC(_y,_M,_d,_h,_m));return _dt}}var H2HLoader=Class.create();H2HLoader.prototype ={selectElement:0,ajaxUrl:'',initialize:function(url){this.selectElement= $('h2hbox_select');this.ajaxUrl=url;Event.observe(this.selectElement,'change',this._teamSelectHandler.bindAsEventListener(this));this._selectRandomTeam();},_teamSelectHandler:function(){new Ajax.Updater('h2hbox_data',this._buildAjaxUrl(),{method:'get'});},_selectRandomTeam:function(){optionsNum= this.selectElement.options.length;randomIndex=Math.round((Math.random()*100))%optionsNum;this.selectElement.selectedIndex=randomIndex;this._teamSelectHandler();},_buildAjaxUrl:function(){var url=this.ajaxUrl;var url=url.replace('{1}',$F('curTeamTri'));var url=url.replace('{2}',this.selectElement.value);return url;}};var PlSlider=Class.create();PlSlider.prototype ={visibleElements:4,currStartElement:-1,initialize:function(numToShow){this.visibleElements=numToShow;this.currStartElement=$$('#playerStatisticID .listPlayer li.selected')[0];Event.observe($('ulListPlayers'),'mouseover',function(){ $$('#ulListPlayers li.cur')[0].removeClassName('selected')});Event.observe($('ulListPlayers'),'mouseout',function(){ $$('#ulListPlayers li.cur')[0].addClassName('selected')});if(!window.XMLHttpRequest) //hack for detecting ie6{$$('#playerStatisticID .listPlayer li').each(function(e){Event.observe(e,'mouseover',function() {Element.addClassName(e,'ieselected');});Event.observe(e,'mouseout',function() {Element.removeClassName(e,'ieselected');});});}},next:function(){var nextHiddenEl=this.currStartElement.next('li.hidden');var nextCurrEl=this.currStartElement.next('li');if(nextHiddenEl!=undefined){nextHiddenEl.removeClassName('hidden');this.currStartElement.addClassName('hidden');this.currStartElement.removeClassName('selected');this.currStartElement.removeClassName('cur');nextCurrEl.addClassName('selected');nextCurrEl.addClassName('cur');this.currStartElement=nextCurrEl;}},prev:function(){var prevHiddenEl=this.currStartElement.previous('li.hidden');var lastVisibleEl=this.currStartElement.next('li',this.visibleElements -2);if(prevHiddenEl!=undefined){prevHiddenEl.removeClassName('hidden');prevHiddenEl.addClassName('selected');prevHiddenEl.addClassName('cur');lastVisibleEl.addClassName('hidden');this.currStartElement.removeClassName('selected');this.currStartElement.removeClassName('cur');this.currStartElement=prevHiddenEl;}}};var Bookmarks={d:'',viewFrmBookmarks:function(dN,eN){Bookmarks.d=dN;if($(Bookmarks.d).innerHTML.length>1){$(Bookmarks.d).innerHTML='';$('bookmarksFrm').removeClassName('current');} else {var a=new Ajax.Updater(Bookmarks.d,'/fanfest/tools/_bookmarks.html',{method:'get',evalScripts:true});$(Bookmarks.d).show();$('bookmarksFrm').addClassName('current');Email.d=eN;Email.hideFrmEmail();}},hideBookmarks:function(){$(Bookmarks.d).innerHTML=' ';Bookmarks.d='';$('bookmarksFrm').removeClassName('current');},setBookmarks:function(){$('facebook').href='http://www.facebook.com/sharer.php?u='+document.location;$('digg').href='http://digg.com/submit?url='+document.location+'&amp;title='+document.title.replace('FIFA.com - ','');$('delicious').href='http://del.icio.us/post?url='+document.location+'&amp;title='+document.title.replace('FIFA.com - ','');$('stumbleupon').href='http://www.stumbleupon.com/submit?url='+document.location+'&amp;title='+document.title.replace('FIFA.com - ','');$('reddit').href='http://reddit.com/submit?url='+document.location+'&amp;title='+document.title.replace('FIFA.com - ','');}}var TableSortable=Class.create();TableSortable.prototype ={DATE_RE:/^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/,initialize:function(id){id=id||'';var table=$(id);if(!table) return;this.makeSortable(table);},makeSortable:function(table) {if(table.getElementsByTagName('thead').length==0){the=document.createElement('thead');the.appendChild(table.rows[0]);table.insertBefore(the,table.firstChild);}if(table.tHead==null) table.tHead=table.getElementsByTagName('thead')[0];if(table.tHead.rows.length!=1) return;// can't cope with two header rowsheadrow=table.tHead.rows[0].cells;for (var i=0;i<headrow.length;i++){if(!$(headrow[i]).hasClassName('sorttable_nosort')){mtch=headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/);if(mtch) { override=mtch[1];}if(mtch&&typeof this["sort_"+override]=='function'){headrow[i].sorttable_sortfunction=sorttable["sort_"+override];}else{headrow[i].sorttable_sortfunction=this.guessType(table,i);}headrow[i].sorttable_columnindex=i;this.sorttable_tbody=table.tBodies[0];headrow[i].setStyle({cursor:'pointer'});var me= this;Event.observe(headrow[i],"click",function(evt){var target=Event.element(evt);if(target.tagName.toLowerCase()!='th')target=target.up('th');if(target.hasClassName('sorttable_sorted')){me.reverse(me.sorttable_tbody);target.removeClassName('sorttable_sorted');target.addClassName('sorttable_sorted_reverse');target.removeChild($('sorttable_sortfwdind'));sortrevind=document.createElement('span');sortrevind.id='sorttable_sortrevind';sortrevind.innerHTML='↑';target.appendChild(sortrevind);return;}if(target.hasClassName('sorttable_sorted_reverse')){me.reverse(me.sorttable_tbody);target.removeClassName('sorttable_sorted_reverse');target.addClassName('sorttable_sorted');target.removeChild($('sorttable_sortrevind'));sortfwdind=document.createElement('span');sortfwdind.id='sorttable_sortfwdind';sortfwdind.innerHTML='↓';target.appendChild(sortfwdind);return;}theadrow=target.parentNode;$A(theadrow.childNodes).each(function(cell){if(cell.nodeType==1){ // an elementcell.removeClassName('sorttable_sorted_reverse');cell.removeClassName('sorttable_sorted');}});sortfwdind =$('sorttable_sortfwdind');if(sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind);}sortrevind=$('sorttable_sortrevind');if(sortrevind) { sortrevind.parentNode.removeChild(sortrevind);}target.addClassName(' sorttable_sorted');sortfwdind=document.createElement('span');sortfwdind.id="sorttable_sortfwdind";sortfwdind.innerHTML ='↓';target.appendChild(sortfwdind);row_array=[];col=target.sorttable_columnindex;rows=me.sorttable_tbody.rows;for (var j=0;j<rows.length;j++){row_array[row_array.length]=[me.getInnerText(rows[j].cells[col]),rows[j]];}row_array.sort(target.sorttable_sortfunction);tb=me.sorttable_tbody;for (var j=0;j<row_array.length;j++){var aRow=$(row_array[j][1]);if(j%2==0){aRow.removeClassName('even');aRow.addClassName('odd');}else{aRow.removeClassName('odd');aRow.addClassName('even');}tb.appendChild(aRow);}delete row_array;});}}},guessType:function(table,column) {sortfn=this.sort_alpha;for (var i=0;i<table.tBodies[0].rows.length;i++){text=this.getInnerText(table.tBodies[0].rows[i].cells[column]);if(text!=''){if(text.match(/^-?[£$¤]?[\d,.]+%?$/)){return this.sort_numeric;}possdate=text.match(this.DATE_RE)if(possdate){first=parseInt(possdate[1]);second=parseInt(possdate[2]);if(first>12){return this.sort_ddmm;}else if(second>12){return this.sort_mmdd;}else{sortfn=this.sort_ddmm;}}}}return sortfn;},getInnerText:function(node){hasInputs=(typeof node.getElementsByTagName=='function')&&node.getElementsByTagName('input').length;if(node.getAttribute("sorttable_customkey")!=null){return node.getAttribute("sorttable_customkey");}else if(typeof node.textContent!='undefined'&&!hasInputs){return node.textContent.replace(/^\s+|\s+$/g,'');}else if(typeof node.innerText!='undefined'&&!hasInputs){return node.innerText.replace(/^\s+|\s+$/g,'');}else if(typeof node.text!='undefined'&&!hasInputs){return node.text.replace(/^\s+|\s+$/g,'');}else{switch (node.nodeType){case 3:if(node.nodeName.toLowerCase()=='input'){return node.value.replace(/^\s+|\s+$/g,'');}case 4:return node.nodeValue.replace(/^\s+|\s+$/g,'');break;case 1:case 11:var innerText='';for (var i=0;i<node.childNodes.length;i++){innerText += this.getInnerText(node.childNodes[i]);}return innerText.replace(/^\s+|\s+$/g,'');break;default:return '';}}},reverse:function(tbody){newrows=[];for (var i=0;i<tbody.rows.length;i++){newrows[newrows.length]=tbody.rows[i];}for (var i=newrows.length-1;i>=0;i--){tbody.appendChild(newrows[i]);}delete newrows;},sort_numeric:function(a,b){aa=parseFloat(a[0].replace(/[^0-9.-]/g,''));if(isNaN(aa)) aa=0;bb=parseFloat(b[0].replace(/[^0-9.-]/g,''));if(isNaN(bb)) bb=0;return aa-bb;},sort_alpha:function(a,b){if(a[0]==b[0]) return 0;if(a[0]<b[0]) return -1;return 1;},sort_ddmm:function(a,b){mtch=a[0].match(sorttable.DATE_RE);y=mtch[3];m=mtch[2];d=mtch[1];if(m.length==1) m='0'+m;if(d.length==1) d='0'+d;dt1=y+m+d;mtch=b[0].match(sorttable.DATE_RE);y=mtch[3];m=mtch[2];d=mtch[1];if(m.length==1) m='0'+m;if(d.length==1) d='0'+d;dt2=y+m+d;if(dt1==dt2) return 0;if(dt1<dt2) return -1;return 1;},sort_mmdd:function(a,b){mtch=a[0].match(sorttable.DATE_RE);y=mtch[3];d=mtch[2];m=mtch[1];if(m.length==1) m='0'+m;if(d.length==1) d='0'+d;dt1=y+m+d;mtch=b[0].match(sorttable.DATE_RE);y=mtch[3];d=mtch[2];m=mtch[1];if(m.length==1) m='0'+m;if(d.length==1) d='0'+d;dt2=y+m+d;if(dt1==dt2) return 0;if(dt1<dt2) return -1;return 1;},shaker_sort:function(list,comp_func){var b=0;var t=list.length - 1;var swap=true;while(swap){swap=false;for(var i=b;i<t;++i) {if(comp_func(list[i],list[i+1])>0) {var q=list[i];list[i]=list[i+1];list[i+1]=q;swap=true;}} // fort--;if(!swap) break;for(var i=t;i>b;--i){if(comp_func(list[i],list[i-1])<0){var q=list[i];list[i]=list[i-1];list[i-1]=q;swap=true;}}b++;}}}var url;var mascot={VoteMascot:function(id,p){var f=$('f_poll'+id);var d='dynamic_'+id;var bV=false;url=p;for (var i=0;i<f.i_answers.length;i++){if(f.i_answers[i].checked)bV=true;}if(!bV){alert(f.message.value);return false;}new Ajax.Updater(d,url+'vote.htmx',{method:'post',parameters:f.serialize()});},ViewROResultMascot:function(id,lang){var d='dynamic_'+id;var l='';if(lang!==undefined&&lang!=null&&lang!='') l='/language='+lang;new Ajax.Updater(d,url+'result.html',{method:'get'});},LoadMascot:function(id,p){url=pvar d='dynamic_'+id;var c=Cookie.get('poll'+id);var u=url+'result.html';if(c===undefined||c==null||c=='')u=url+'vote.html'new Ajax.Updater(d,u,{method:'get'});}}var TurfSearch={initForm:function() {var qs=location.search;var arr=qs.parseQuery();if(arr.fu>0) { $j("#user").val(arr.fu);}if(arr.cf>0) { $j("#confederation").val(arr.cf);}if(arr.st>0) { $j("#star").val(arr.st);}if(arr.fu>0||arr.cf>0||arr.st>0) {TurfSearch.doSearch();}},doSearch:function() {$j('#loading').insertBefore('#turfSearchResultsPane').ajaxStart(function() { $j('#turfSearchSubmit').attr('disabled','disabled');$j('#turfSearchResultsPane').hide();$j(this).show();}).ajaxStop(function() { $j('#turfSearchSubmit').removeAttr('disabled');$j(this).hide();});var cc=$F('country');var lc=$F('licencee');var cf=$F('confederation');var st=$F('star');var fu=$F('user');var an=$F('authNumber');var qs='';if(cf!==undefined&&cf!=null&&cf!='')qs += 'cf=' + cf + '&';if(cc!==undefined&&cc!=null&&cc!='')qs += 'cc=' + cc + '&';if(lc!==undefined&&lc!=null&&lc!='')qs += 'lc=' + lc + '&';if(st!==undefined&&st!=null&&st!='')qs += 'st=' + st + '&';if(fu!==undefined&&fu!=null&&fu!='')qs += 'fu=' + fu + '&';if(an!==undefined&&an!=null&&an!='')qs += 'an=' + an + '&';var u='/aboutfifa/developing/pitchequipment/footballturf/_turfsearchresults.htmx?' + qs;$j.get(u,function(data) {$j("#turfSearchResultsPane").replaceWith(data);});}}
