12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606 |
- /*
- * Ext JS Library 2.0 Copyright(c) 2006-2007, Ext JS, LLC. licensing@extjs.com
- *
- * http://extjs.com/license
- */
- if (typeof YAHOO == "undefined") {
- var YAHOO = {}
- }
- YAHOO.namespace = function() {
- var A = arguments, E = null, C, B, D;
- for (C = 0; C < A.length; C = C + 1) {
- D = A[C].split(".");
- E = YAHOO;
- for (B = (D[0] == "YAHOO") ? 1 : 0; B < D.length; B = B + 1) {
- E[D[B]] = E[D[B]] || {};
- E = E[D[B]]
- }
- }
- return E
- };
- YAHOO.log = function(D, A, C) {
- var B = YAHOO.widget.Logger;
- if (B && B.log) {
- return B.log(D, A, C)
- } else {
- return false
- }
- };
- YAHOO.init = function() {
- this.namespace("util", "widget", "example");
- if (typeof YAHOO_config != "undefined") {
- var B = YAHOO_config.listener, A = YAHOO.env.listeners, D = true, C;
- if (B) {
- for (C = 0; C < A.length; C = C + 1) {
- if (A[C] == B) {
- D = false;
- break
- }
- }
- if (D) {
- A.push(B)
- }
- }
- }
- };
- YAHOO.register = function(A, E, D) {
- var I = YAHOO.env.modules;
- if (!I[A]) {
- I[A] = {
- versions : [],
- builds : []
- }
- }
- var B = I[A], H = D.version, G = D.build, F = YAHOO.env.listeners;
- B.name = A;
- B.version = H;
- B.build = G;
- B.versions.push(H);
- B.builds.push(G);
- B.mainClass = E;
- for (var C = 0; C < F.length; C = C + 1) {
- F[C](B)
- }
- if (E) {
- E.VERSION = H;
- E.BUILD = G
- } else {
- YAHOO.log("mainClass is undefined for module " + A, "warn")
- }
- };
- YAHOO.env = YAHOO.env || {
- modules : [],
- listeners : [],
- getVersion : function(A) {
- return YAHOO.env.modules[A] || null
- }
- };
- YAHOO.lang = {
- isArray : function(A) {
- if (A.constructor && A.constructor.toString().indexOf("Array") > -1) {
- return true
- } else {
- return YAHOO.lang.isObject(A) && A.constructor == Array
- }
- },
- isBoolean : function(A) {
- return typeof A == "boolean"
- },
- isFunction : function(A) {
- return typeof A == "function"
- },
- isNull : function(A) {
- return A === null
- },
- isNumber : function(A) {
- return typeof A == "number" && isFinite(A)
- },
- isObject : function(A) {
- return typeof A == "object" || YAHOO.lang.isFunction(A)
- },
- isString : function(A) {
- return typeof A == "string"
- },
- isUndefined : function(A) {
- return typeof A == "undefined"
- },
- hasOwnProperty : function(A, B) {
- if (Object.prototype.hasOwnProperty) {
- return A.hasOwnProperty(B)
- }
- return !YAHOO.lang.isUndefined(A[B])
- && A.constructor.prototype[B] !== A[B]
- },
- extend : function(D, E, C) {
- var B = function() {
- };
- B.prototype = E.prototype;
- D.prototype = new B();
- D.prototype.constructor = D;
- D.superclass = E.prototype;
- if (E.prototype.constructor == Object.prototype.constructor) {
- E.prototype.constructor = E
- }
- if (C) {
- for (var A in C) {
- D.prototype[A] = C[A]
- }
- }
- },
- augment : function(E, D) {
- var C = E.prototype, F = D.prototype, A = arguments, B, G;
- if (A[2]) {
- for (B = 2; B < A.length; B = B + 1) {
- C[A[B]] = F[A[B]]
- }
- } else {
- for (G in F) {
- if (!C[G]) {
- C[G] = F[G]
- }
- }
- }
- }
- };
- YAHOO.init();
- YAHOO.util.Lang = YAHOO.lang;
- YAHOO.augment = YAHOO.lang.augment;
- YAHOO.extend = YAHOO.lang.extend;
- YAHOO.register("yahoo", YAHOO, {
- version : "2.2.0",
- build : "127"
- });
- (function() {
- var C = YAHOO.util, J, H, G = 0, I = {};
- var B = navigator.userAgent.toLowerCase(), D = (B.indexOf("opera") > -1), K = (B
- .indexOf("safari") > -1), A = (!D && !K && B.indexOf("gecko") > -1), F = (!D && B
- .indexOf("msie") > -1);
- var E = {
- HYPHEN : /(-[a-z])/i
- };
- var L = function(M) {
- if (!E.HYPHEN.test(M)) {
- return M
- }
- if (I[M]) {
- return I[M]
- }
- while (E.HYPHEN.exec(M)) {
- M = M.replace(RegExp.$1, RegExp.$1.substr(1).toUpperCase())
- }
- I[M] = M;
- return M
- };
- if (document.defaultView && document.defaultView.getComputedStyle) {
- J = function(M, P) {
- var O = null;
- var N = document.defaultView.getComputedStyle(M, "");
- if (N) {
- O = N[L(P)]
- }
- return M.style[P] || O
- }
- } else {
- if (document.documentElement.currentStyle && F) {
- J = function(M, O) {
- switch (L(O)) {
- case "opacity" :
- var Q = 100;
- try {
- Q = M.filters["DXImageTransform.Microsoft.Alpha"].opacity
- } catch (P) {
- try {
- Q = M.filters("alpha").opacity
- } catch (P) {
- }
- }
- return Q / 100;
- break;
- default :
- var N = M.currentStyle ? M.currentStyle[O] : null;
- return (M.style[O] || N)
- }
- }
- } else {
- J = function(M, N) {
- return M.style[N]
- }
- }
- }
- if (F) {
- H = function(M, N, O) {
- switch (N) {
- case "opacity" :
- if (typeof M.style.filter == "string") {
- M.style.filter = "alpha(opacity=" + O * 100 + ")";
- if (!M.currentStyle || !M.currentStyle.hasLayout) {
- M.style.zoom = 1
- }
- }
- break;
- default :
- M.style[N] = O
- }
- }
- } else {
- H = function(M, N, O) {
- M.style[N] = O
- }
- }
- YAHOO.util.Dom = {
- get : function(O) {
- if (!O) {
- return null
- }
- if (typeof O != "string" && !(O instanceof Array)) {
- return O
- }
- if (typeof O == "string") {
- return document.getElementById(O)
- } else {
- var P = [];
- for (var N = 0, M = O.length; N < M; ++N) {
- P[P.length] = C.Dom.get(O[N])
- }
- return P
- }
- return null
- },
- getStyle : function(M, O) {
- O = L(O);
- var N = function(P) {
- return J(P, O)
- };
- return C.Dom.batch(M, N, C.Dom, true)
- },
- setStyle : function(M, O, P) {
- O = L(O);
- var N = function(Q) {
- H(Q, O, P)
- };
- C.Dom.batch(M, N, C.Dom, true)
- },
- getXY : function(M) {
- var N = function(P) {
- if (P.parentNode === null || P.offsetParent === null
- || this.getStyle(P, "display") == "none") {
- return false
- }
- var O = null;
- var U = [];
- var Q;
- if (P.getBoundingClientRect) {
- Q = P.getBoundingClientRect();
- var S = document;
- if (!this.inDocument(P) && parent.document != document) {
- S = parent.document;
- if (!this.isAncestor(S.documentElement, P)) {
- return false
- }
- }
- var R = Math.max(S.documentElement.scrollTop,
- S.body.scrollTop);
- var T = Math.max(S.documentElement.scrollLeft,
- S.body.scrollLeft);
- return [Q.left + T, Q.top + R]
- } else {
- U = [P.offsetLeft, P.offsetTop];
- O = P.offsetParent;
- if (O != P) {
- while (O) {
- U[0] += O.offsetLeft;
- U[1] += O.offsetTop;
- O = O.offsetParent
- }
- }
- if (K && this.getStyle(P, "position") == "absolute") {
- U[0] -= document.body.offsetLeft;
- U[1] -= document.body.offsetTop
- }
- }
- if (P.parentNode) {
- O = P.parentNode
- } else {
- O = null
- }
- while (O && O.tagName.toUpperCase() != "BODY"
- && O.tagName.toUpperCase() != "HTML") {
- if (C.Dom.getStyle(O, "display") != "inline") {
- U[0] -= O.scrollLeft;
- U[1] -= O.scrollTop
- }
- if (O.parentNode) {
- O = O.parentNode
- } else {
- O = null
- }
- }
- return U
- };
- return C.Dom.batch(M, N, C.Dom, true)
- },
- getX : function(M) {
- var N = function(O) {
- return C.Dom.getXY(O)[0]
- };
- return C.Dom.batch(M, N, C.Dom, true)
- },
- getY : function(M) {
- var N = function(O) {
- return C.Dom.getXY(O)[1]
- };
- return C.Dom.batch(M, N, C.Dom, true)
- },
- setXY : function(M, P, O) {
- var N = function(S) {
- var R = this.getStyle(S, "position");
- if (R == "static") {
- this.setStyle(S, "position", "relative");
- R = "relative"
- }
- var U = this.getXY(S);
- if (U === false) {
- return false
- }
- var T = [parseInt(this.getStyle(S, "left"), 10),
- parseInt(this.getStyle(S, "top"), 10)];
- if (isNaN(T[0])) {
- T[0] = (R == "relative") ? 0 : S.offsetLeft
- }
- if (isNaN(T[1])) {
- T[1] = (R == "relative") ? 0 : S.offsetTop
- }
- if (P[0] !== null) {
- S.style.left = P[0] - U[0] + T[0] + "px"
- }
- if (P[1] !== null) {
- S.style.top = P[1] - U[1] + T[1] + "px"
- }
- if (!O) {
- var Q = this.getXY(S);
- if ((P[0] !== null && Q[0] != P[0])
- || (P[1] !== null && Q[1] != P[1])) {
- this.setXY(S, P, true)
- }
- }
- };
- C.Dom.batch(M, N, C.Dom, true)
- },
- setX : function(N, M) {
- C.Dom.setXY(N, [M, null])
- },
- setY : function(M, N) {
- C.Dom.setXY(M, [null, N])
- },
- getRegion : function(M) {
- var N = function(O) {
- var P = new C.Region.getRegion(O);
- return P
- };
- return C.Dom.batch(M, N, C.Dom, true)
- },
- getClientWidth : function() {
- return C.Dom.getViewportWidth()
- },
- getClientHeight : function() {
- return C.Dom.getViewportHeight()
- },
- getElementsByClassName : function(O, M, N) {
- var P = function(Q) {
- return C.Dom.hasClass(Q, O)
- };
- return C.Dom.getElementsBy(P, M, N)
- },
- hasClass : function(O, N) {
- var M = new RegExp("(?:^|\\s+)" + N + "(?:\\s+|$)");
- var P = function(Q) {
- return M.test(Q["className"])
- };
- return C.Dom.batch(O, P, C.Dom, true)
- },
- addClass : function(N, M) {
- var O = function(P) {
- if (this.hasClass(P, M)) {
- return
- }
- P["className"] = [P["className"], M].join(" ")
- };
- C.Dom.batch(N, O, C.Dom, true)
- },
- removeClass : function(O, N) {
- var M = new RegExp("(?:^|\\s+)" + N + "(?:\\s+|$)", "g");
- var P = function(Q) {
- if (!this.hasClass(Q, N)) {
- return
- }
- var R = Q["className"];
- Q["className"] = R.replace(M, " ");
- if (this.hasClass(Q, N)) {
- this.removeClass(Q, N)
- }
- };
- C.Dom.batch(O, P, C.Dom, true)
- },
- replaceClass : function(P, N, M) {
- if (N === M) {
- return false
- }
- var O = new RegExp("(?:^|\\s+)" + N + "(?:\\s+|$)", "g");
- var Q = function(R) {
- if (!this.hasClass(R, N)) {
- this.addClass(R, M);
- return
- }
- R["className"] = R["className"].replace(O, " " + M + " ");
- if (this.hasClass(R, N)) {
- this.replaceClass(R, N, M)
- }
- };
- C.Dom.batch(P, Q, C.Dom, true)
- },
- generateId : function(M, O) {
- O = O || "yui-gen";
- M = M || {};
- var N = function(P) {
- if (P) {
- P = C.Dom.get(P)
- } else {
- P = {}
- }
- if (!P.id) {
- P.id = O + G++
- }
- return P.id
- };
- return C.Dom.batch(M, N, C.Dom, true)
- },
- isAncestor : function(N, O) {
- N = C.Dom.get(N);
- if (!N || !O) {
- return false
- }
- var M = function(Q) {
- if (N.contains && !K) {
- return N.contains(Q)
- } else {
- if (N.compareDocumentPosition) {
- return !!(N.compareDocumentPosition(Q) & 16)
- } else {
- var P = Q.parentNode;
- while (P) {
- if (P == N) {
- return true
- } else {
- if (!P.tagName
- || P.tagName.toUpperCase() == "HTML") {
- return false
- }
- }
- P = P.parentNode
- }
- return false
- }
- }
- };
- return C.Dom.batch(O, M, C.Dom, true)
- },
- inDocument : function(M) {
- var N = function(O) {
- return this.isAncestor(document.documentElement, O)
- };
- return C.Dom.batch(M, N, C.Dom, true)
- },
- getElementsBy : function(S, N, O) {
- N = N || "*";
- var P = [];
- if (O) {
- O = C.Dom.get(O);
- if (!O) {
- return P
- }
- } else {
- O = document
- }
- var R = O.getElementsByTagName(N);
- if (!R.length && (N == "*" && O.all)) {
- R = O.all
- }
- for (var Q = 0, M = R.length; Q < M; ++Q) {
- if (S(R[Q])) {
- P[P.length] = R[Q]
- }
- }
- return P
- },
- batch : function(Q, M, P, O) {
- var N = Q;
- Q = C.Dom.get(Q);
- var U = (O) ? P : window;
- if (!Q || Q.tagName || !Q.length) {
- if (!Q) {
- return false
- }
- return M.call(U, Q, P)
- }
- var S = [];
- for (var R = 0, T = Q.length; R < T; ++R) {
- if (!Q[R]) {
- N = Q[R]
- }
- S[S.length] = M.call(U, Q[R], P)
- }
- return S
- },
- getDocumentHeight : function() {
- var N = (document.compatMode != "CSS1Compat")
- ? document.body.scrollHeight
- : document.documentElement.scrollHeight;
- var M = Math.max(N, C.Dom.getViewportHeight());
- return M
- },
- getDocumentWidth : function() {
- var N = (document.compatMode != "CSS1Compat")
- ? document.body.scrollWidth
- : document.documentElement.scrollWidth;
- var M = Math.max(N, C.Dom.getViewportWidth());
- return M
- },
- getViewportHeight : function() {
- var M = self.innerHeight;
- var N = document.compatMode;
- if ((N || F) && !D) {
- M = (N == "CSS1Compat")
- ? document.documentElement.clientHeight
- : document.body.clientHeight
- }
- return M
- },
- getViewportWidth : function() {
- var M = self.innerWidth;
- var N = document.compatMode;
- if (N || F) {
- M = (N == "CSS1Compat")
- ? document.documentElement.clientWidth
- : document.body.clientWidth
- }
- return M
- }
- }
- })();
- YAHOO.util.Region = function(C, D, A, B) {
- this.top = C;
- this[1] = C;
- this.right = D;
- this.bottom = A;
- this.left = B;
- this[0] = B
- };
- YAHOO.util.Region.prototype.contains = function(A) {
- return (A.left >= this.left && A.right <= this.right && A.top >= this.top && A.bottom <= this.bottom)
- };
- YAHOO.util.Region.prototype.getArea = function() {
- return ((this.bottom - this.top) * (this.right - this.left))
- };
- YAHOO.util.Region.prototype.intersect = function(E) {
- var C = Math.max(this.top, E.top);
- var D = Math.min(this.right, E.right);
- var A = Math.min(this.bottom, E.bottom);
- var B = Math.max(this.left, E.left);
- if (A >= C && D >= B) {
- return new YAHOO.util.Region(C, D, A, B)
- } else {
- return null
- }
- };
- YAHOO.util.Region.prototype.union = function(E) {
- var C = Math.min(this.top, E.top);
- var D = Math.max(this.right, E.right);
- var A = Math.max(this.bottom, E.bottom);
- var B = Math.min(this.left, E.left);
- return new YAHOO.util.Region(C, D, A, B)
- };
- YAHOO.util.Region.prototype.toString = function() {
- return ("Region {" + "top: " + this.top + ", right: " + this.right
- + ", bottom: " + this.bottom + ", left: " + this.left + "}")
- };
- YAHOO.util.Region.getRegion = function(D) {
- var F = YAHOO.util.Dom.getXY(D);
- var C = F[1];
- var E = F[0] + D.offsetWidth;
- var A = F[1] + D.offsetHeight;
- var B = F[0];
- return new YAHOO.util.Region(C, E, A, B)
- };
- YAHOO.util.Point = function(A, B) {
- if (A instanceof Array) {
- B = A[1];
- A = A[0]
- }
- this.x = this.right = this.left = this[0] = A;
- this.y = this.top = this.bottom = this[1] = B
- };
- YAHOO.util.Point.prototype = new YAHOO.util.Region();
- YAHOO.register("dom", YAHOO.util.Dom, {
- version : "2.2.0",
- build : "127"
- });
- if (!YAHOO.util.Event) {
- YAHOO.util.Event = function() {
- var H = false;
- var I = [];
- var J = [];
- var F = [];
- var D = [];
- var C = 0;
- var E = [];
- var B = [];
- var A = 0;
- var G = null;
- return {
- POLL_RETRYS : 200,
- POLL_INTERVAL : 20,
- EL : 0,
- TYPE : 1,
- FN : 2,
- WFN : 3,
- OBJ : 3,
- ADJ_SCOPE : 4,
- isSafari : (/KHTML/gi).test(navigator.userAgent),
- webkit : function() {
- var K = navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);
- if (K && K[1]) {
- return K[1]
- }
- return null
- }(),
- isIE : (!this.webkit && !navigator.userAgent.match(/opera/gi) && navigator.userAgent
- .match(/msie/gi)),
- _interval : null,
- startInterval : function() {
- if (!this._interval) {
- var K = this;
- var L = function() {
- K._tryPreloadAttach()
- };
- this._interval = setInterval(L, this.POLL_INTERVAL)
- }
- },
- onAvailable : function(M, K, N, L) {
- E.push({
- id : M,
- fn : K,
- obj : N,
- override : L,
- checkReady : false
- });
- C = this.POLL_RETRYS;
- this.startInterval()
- },
- onContentReady : function(M, K, N, L) {
- E.push({
- id : M,
- fn : K,
- obj : N,
- override : L,
- checkReady : true
- });
- C = this.POLL_RETRYS;
- this.startInterval()
- },
- addListener : function(M, K, V, Q, L) {
- if (!V || !V.call) {
- return false
- }
- if (this._isValidCollection(M)) {
- var W = true;
- for (var R = 0, T = M.length; R < T; ++R) {
- W = this.on(M[R], K, V, Q, L) && W
- }
- return W
- } else {
- if (typeof M == "string") {
- var P = this.getEl(M);
- if (P) {
- M = P
- } else {
- this.onAvailable(M, function() {
- YAHOO.util.Event.on(M, K, V, Q, L)
- });
- return true
- }
- }
- }
- if (!M) {
- return false
- }
- if ("unload" == K && Q !== this) {
- J[J.length] = [M, K, V, Q, L];
- return true
- }
- var Y = M;
- if (L) {
- if (L === true) {
- Y = Q
- } else {
- Y = L
- }
- }
- var N = function(Z) {
- return V.call(Y, YAHOO.util.Event.getEvent(Z), Q)
- };
- var X = [M, K, V, N, Y];
- var S = I.length;
- I[S] = X;
- if (this.useLegacyEvent(M, K)) {
- var O = this.getLegacyIndex(M, K);
- if (O == -1 || M != F[O][0]) {
- O = F.length;
- B[M.id + K] = O;
- F[O] = [M, K, M["on" + K]];
- D[O] = [];
- M["on" + K] = function(Z) {
- YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event
- .getEvent(Z), O)
- }
- }
- D[O].push(X)
- } else {
- try {
- this._simpleAdd(M, K, N, false)
- } catch (U) {
- this.lastError = U;
- this.removeListener(M, K, V);
- return false
- }
- }
- return true
- },
- fireLegacyEvent : function(O, M) {
- var Q = true, K, S, R, T, P;
- S = D[M];
- for (var L = 0, N = S.length; L < N; ++L) {
- R = S[L];
- if (R && R[this.WFN]) {
- T = R[this.ADJ_SCOPE];
- P = R[this.WFN].call(T, O);
- Q = (Q && P)
- }
- }
- K = F[M];
- if (K && K[2]) {
- K[2](O)
- }
- return Q
- },
- getLegacyIndex : function(L, M) {
- var K = this.generateId(L) + M;
- if (typeof B[K] == "undefined") {
- return -1
- } else {
- return B[K]
- }
- },
- useLegacyEvent : function(L, M) {
- if (this.webkit && ("click" == M || "dblclick" == M)) {
- var K = parseInt(this.webkit, 10);
- if (!isNaN(K) && K < 418) {
- return true
- }
- }
- return false
- },
- removeListener : function(L, K, T) {
- var O, R;
- if (typeof L == "string") {
- L = this.getEl(L)
- } else {
- if (this._isValidCollection(L)) {
- var U = true;
- for (O = 0, R = L.length; O < R; ++O) {
- U = (this.removeListener(L[O], K, T) && U)
- }
- return U
- }
- }
- if (!T || !T.call) {
- return this.purgeElement(L, false, K)
- }
- if ("unload" == K) {
- for (O = 0, R = J.length; O < R; O++) {
- var V = J[O];
- if (V && V[0] == L && V[1] == K && V[2] == T) {
- J.splice(O, 1);
- return true
- }
- }
- return false
- }
- var P = null;
- var Q = arguments[3];
- if ("undefined" == typeof Q) {
- Q = this._getCacheIndex(L, K, T)
- }
- if (Q >= 0) {
- P = I[Q]
- }
- if (!L || !P) {
- return false
- }
- if (this.useLegacyEvent(L, K)) {
- var N = this.getLegacyIndex(L, K);
- var M = D[N];
- if (M) {
- for (O = 0, R = M.length; O < R; ++O) {
- V = M[O];
- if (V && V[this.EL] == L && V[this.TYPE] == K
- && V[this.FN] == T) {
- M.splice(O, 1);
- break
- }
- }
- }
- } else {
- try {
- this._simpleRemove(L, K, P[this.WFN], false)
- } catch (S) {
- this.lastError = S;
- return false
- }
- }
- delete I[Q][this.WFN];
- delete I[Q][this.FN];
- I.splice(Q, 1);
- return true
- },
- getTarget : function(M, L) {
- var K = M.target || M.srcElement;
- return this.resolveTextNode(K)
- },
- resolveTextNode : function(K) {
- if (K && 3 == K.nodeType) {
- return K.parentNode
- } else {
- return K
- }
- },
- getPageX : function(L) {
- var K = L.pageX;
- if (!K && 0 !== K) {
- K = L.clientX || 0;
- if (this.isIE) {
- K += this._getScrollLeft()
- }
- }
- return K
- },
- getPageY : function(K) {
- var L = K.pageY;
- if (!L && 0 !== L) {
- L = K.clientY || 0;
- if (this.isIE) {
- L += this._getScrollTop()
- }
- }
- return L
- },
- getXY : function(K) {
- return [this.getPageX(K), this.getPageY(K)]
- },
- getRelatedTarget : function(L) {
- var K = L.relatedTarget;
- if (!K) {
- if (L.type == "mouseout") {
- K = L.toElement
- } else {
- if (L.type == "mouseover") {
- K = L.fromElement
- }
- }
- }
- return this.resolveTextNode(K)
- },
- getTime : function(M) {
- if (!M.time) {
- var L = allGetServerTime().getTime();
- try {
- M.time = L
- } catch (K) {
- this.lastError = K;
- return L
- }
- }
- return M.time
- },
- stopEvent : function(K) {
- this.stopPropagation(K);
- this.preventDefault(K)
- },
- stopPropagation : function(K) {
- if (K.stopPropagation) {
- K.stopPropagation()
- } else {
- K.cancelBubble = true
- }
- },
- preventDefault : function(K) {
- if (K.preventDefault) {
- K.preventDefault()
- } else {
- K.returnValue = false
- }
- },
- getEvent : function(L) {
- var K = L || window.event;
- if (!K) {
- var M = this.getEvent.caller;
- while (M) {
- K = M.arguments[0];
- if (K && Event == K.constructor) {
- break
- }
- M = M.caller
- }
- }
- return K
- },
- getCharCode : function(K) {
- return K.charCode || K.keyCode || 0
- },
- _getCacheIndex : function(O, P, N) {
- for (var M = 0, L = I.length; M < L; ++M) {
- var K = I[M];
- if (K && K[this.FN] == N && K[this.EL] == O
- && K[this.TYPE] == P) {
- return M
- }
- }
- return -1
- },
- generateId : function(K) {
- var L = K.id;
- if (!L) {
- L = "yuievtautoid-" + A;
- ++A;
- K.id = L
- }
- return L
- },
- _isValidCollection : function(K) {
- return (K && K.length && typeof K != "string" && !K.tagName
- && !K.alert && typeof K[0] != "undefined")
- },
- elCache : {},
- getEl : function(K) {
- return document.getElementById(K)
- },
- clearCache : function() {
- },
- _load : function(L) {
- H = true;
- var K = YAHOO.util.Event;
- if (this.isIE) {
- K._simpleRemove(window, "load", K._load)
- }
- },
- _tryPreloadAttach : function() {
- if (this.locked) {
- return false
- }
- this.locked = true;
- var Q = !H;
- if (!Q) {
- Q = (C > 0)
- }
- var P = [];
- for (var L = 0, K = E.length; L < K; ++L) {
- var O = E[L];
- if (O) {
- var N = this.getEl(O.id);
- if (N) {
- if (!O.checkReady || H || N.nextSibling
- || (document && document.body)) {
- var M = N;
- if (O.override) {
- if (O.override === true) {
- M = O.obj
- } else {
- M = O.override
- }
- }
- O.fn.call(M, O.obj);
- E[L] = null
- }
- } else {
- P.push(O)
- }
- }
- }
- C = (P.length === 0) ? 0 : C - 1;
- if (Q) {
- this.startInterval()
- } else {
- clearInterval(this._interval);
- this._interval = null
- }
- this.locked = false;
- return true
- },
- purgeElement : function(N, O, Q) {
- var P = this.getListeners(N, Q);
- if (P) {
- for (var M = 0, K = P.length; M < K; ++M) {
- var L = P[M];
- this.removeListener(N, L.type, L.fn)
- }
- }
- if (O && N && N.childNodes) {
- for (M = 0, K = N.childNodes.length; M < K; ++M) {
- this.purgeElement(N.childNodes[M], O, Q)
- }
- }
- },
- getListeners : function(M, K) {
- var P = [], L;
- if (!K) {
- L = [I, J]
- } else {
- if (K == "unload") {
- L = [J]
- } else {
- L = [I]
- }
- }
- for (var O = 0; O < L.length; ++O) {
- var S = L[O];
- if (S && S.length > 0) {
- for (var Q = 0, R = S.length; Q < R; ++Q) {
- var N = S[Q];
- if (N && N[this.EL] === M
- && (!K || K === N[this.TYPE])) {
- P.push({
- type : N[this.TYPE],
- fn : N[this.FN],
- obj : N[this.OBJ],
- adjust : N[this.ADJ_SCOPE],
- index : Q
- })
- }
- }
- }
- }
- return (P.length) ? P : null
- },
- _unload : function(R) {
- var Q = YAHOO.util.Event, O, N, L, K, M;
- for (O = 0, K = J.length; O < K; ++O) {
- L = J[O];
- if (L) {
- var P = window;
- if (L[Q.ADJ_SCOPE]) {
- if (L[Q.ADJ_SCOPE] === true) {
- P = L[Q.OBJ]
- } else {
- P = L[Q.ADJ_SCOPE]
- }
- }
- L[Q.FN].call(P, Q.getEvent(R), L[Q.OBJ]);
- J[O] = null;
- L = null;
- P = null
- }
- }
- J = null;
- if (I && I.length > 0) {
- N = I.length;
- while (N) {
- M = N - 1;
- L = I[M];
- if (L) {
- Q.removeListener(L[Q.EL], L[Q.TYPE], L[Q.FN], M)
- }
- N = N - 1
- }
- L = null;
- Q.clearCache()
- }
- for (O = 0, K = F.length; O < K; ++O) {
- F[O][0] = null;
- F[O] = null
- }
- F = null;
- Q._simpleRemove(window, "unload", Q._unload)
- },
- _getScrollLeft : function() {
- return this._getScroll()[1]
- },
- _getScrollTop : function() {
- return this._getScroll()[0]
- },
- _getScroll : function() {
- var K = document.documentElement, L = document.body;
- if (K && (K.scrollTop || K.scrollLeft)) {
- return [K.scrollTop, K.scrollLeft]
- } else {
- if (L) {
- return [L.scrollTop, L.scrollLeft]
- } else {
- return [0, 0]
- }
- }
- },
- regCE : function() {
- },
- _simpleAdd : function() {
- if (window.addEventListener) {
- return function(M, N, L, K) {
- M.addEventListener(N, L, (K))
- }
- } else {
- if (window.attachEvent) {
- return function(M, N, L, K) {
- M.attachEvent("on" + N, L)
- }
- } else {
- return function() {
- }
- }
- }
- }(),
- _simpleRemove : function() {
- if (window.removeEventListener) {
- return function(M, N, L, K) {
- M.removeEventListener(N, L, (K))
- }
- } else {
- if (window.detachEvent) {
- return function(L, M, K) {
- L.detachEvent("on" + M, K)
- }
- } else {
- return function() {
- }
- }
- }
- }()
- }
- }();
- (function() {
- var A = YAHOO.util.Event;
- A.on = A.addListener;
- if (document && document.body) {
- A._load()
- } else {
- A._simpleAdd(window, "load", A._load)
- }
- A._simpleAdd(window, "unload", A._unload);
- A._tryPreloadAttach()
- })()
- }
- YAHOO.util.CustomEvent = function(D, B, C, A) {
- this.type = D;
- this.scope = B || window;
- this.silent = C;
- this.signature = A || YAHOO.util.CustomEvent.LIST;
- this.subscribers = [];
- if (!this.silent) {
- }
- var E = "_YUICEOnSubscribe";
- if (D !== E) {
- this.subscribeEvent = new YAHOO.util.CustomEvent(E, this, true)
- }
- };
- YAHOO.util.CustomEvent.LIST = 0;
- YAHOO.util.CustomEvent.FLAT = 1;
- YAHOO.util.CustomEvent.prototype = {
- subscribe : function(B, C, A) {
- if (this.subscribeEvent) {
- this.subscribeEvent.fire(B, C, A)
- }
- this.subscribers.push(new YAHOO.util.Subscriber(B, C, A))
- },
- unsubscribe : function(D, F) {
- if (!D) {
- return this.unsubscribeAll()
- }
- var E = false;
- for (var B = 0, A = this.subscribers.length; B < A; ++B) {
- var C = this.subscribers[B];
- if (C && C.contains(D, F)) {
- this._delete(B);
- E = true
- }
- }
- return E
- },
- fire : function() {
- var A = this.subscribers.length;
- if (!A && this.silent) {
- return true
- }
- var C = [], B = true, D;
- for (D = 0; D < arguments.length; ++D) {
- C.push(arguments[D])
- }
- var G = C.length;
- if (!this.silent) {
- }
- for (D = 0; D < A; ++D) {
- var F = this.subscribers[D];
- if (F) {
- if (!this.silent) {
- }
- var E = F.getScope(this.scope);
- if (this.signature == YAHOO.util.CustomEvent.FLAT) {
- var H = null;
- if (C.length > 0) {
- H = C[0]
- }
- B = F.fn.call(E, H, F.obj)
- } else {
- B = F.fn.call(E, this.type, C, F.obj)
- }
- if (false === B) {
- if (!this.silent) {
- }
- return false
- }
- }
- }
- return true
- },
- unsubscribeAll : function() {
- for (var B = 0, A = this.subscribers.length; B < A; ++B) {
- this._delete(A - 1 - B)
- }
- return B
- },
- _delete : function(A) {
- var B = this.subscribers[A];
- if (B) {
- delete B.fn;
- delete B.obj
- }
- this.subscribers.splice(A, 1)
- },
- toString : function() {
- return "CustomEvent: " + "'" + this.type + "', " + "scope: "
- + this.scope
- }
- };
- YAHOO.util.Subscriber = function(B, C, A) {
- this.fn = B;
- this.obj = C || null;
- this.override = A
- };
- YAHOO.util.Subscriber.prototype.getScope = function(A) {
- if (this.override) {
- if (this.override === true) {
- return this.obj
- } else {
- return this.override
- }
- }
- return A
- };
- YAHOO.util.Subscriber.prototype.contains = function(A, B) {
- if (B) {
- return (this.fn == A && this.obj == B)
- } else {
- return (this.fn == A)
- }
- };
- YAHOO.util.Subscriber.prototype.toString = function() {
- return "Subscriber { obj: " + (this.obj || "") + ", override: "
- + (this.override || "no") + " }"
- };
- YAHOO.util.EventProvider = function() {
- };
- YAHOO.util.EventProvider.prototype = {
- __yui_events : null,
- __yui_subscribers : null,
- subscribe : function(A, C, F, E) {
- this.__yui_events = this.__yui_events || {};
- var D = this.__yui_events[A];
- if (D) {
- D.subscribe(C, F, E)
- } else {
- this.__yui_subscribers = this.__yui_subscribers || {};
- var B = this.__yui_subscribers;
- if (!B[A]) {
- B[A] = []
- }
- B[A].push({
- fn : C,
- obj : F,
- override : E
- })
- }
- },
- unsubscribe : function(A, B, D) {
- this.__yui_events = this.__yui_events || {};
- var C = this.__yui_events[A];
- if (C) {
- return C.unsubscribe(B, D)
- } else {
- return false
- }
- },
- unsubscribeAll : function(A) {
- return this.unsubscribe(A)
- },
- createEvent : function(G, D) {
- this.__yui_events = this.__yui_events || {};
- var A = D || {};
- var I = this.__yui_events;
- if (I[G]) {
- } else {
- var H = A.scope || this;
- var E = A.silent || null;
- var B = new YAHOO.util.CustomEvent(G, H, E,
- YAHOO.util.CustomEvent.FLAT);
- I[G] = B;
- if (A.onSubscribeCallback) {
- B.subscribeEvent.subscribe(A.onSubscribeCallback)
- }
- this.__yui_subscribers = this.__yui_subscribers || {};
- var F = this.__yui_subscribers[G];
- if (F) {
- for (var C = 0; C < F.length; ++C) {
- B.subscribe(F[C].fn, F[C].obj, F[C].override)
- }
- }
- }
- return I[G]
- },
- fireEvent : function(E, D, A, C) {
- this.__yui_events = this.__yui_events || {};
- var G = this.__yui_events[E];
- if (G) {
- var B = [];
- for (var F = 1; F < arguments.length; ++F) {
- B.push(arguments[F])
- }
- return G.fire.apply(G, B)
- } else {
- return null
- }
- },
- hasEvent : function(A) {
- if (this.__yui_events) {
- if (this.__yui_events[A]) {
- return true
- }
- }
- return false
- }
- };
- YAHOO.util.KeyListener = function(A, F, B, C) {
- if (!A) {
- } else {
- if (!F) {
- } else {
- if (!B) {
- }
- }
- }
- if (!C) {
- C = YAHOO.util.KeyListener.KEYDOWN
- }
- var D = new YAHOO.util.CustomEvent("keyPressed");
- this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
- this.disabledEvent = new YAHOO.util.CustomEvent("disabled");
- if (typeof A == "string") {
- A = document.getElementById(A)
- }
- if (typeof B == "function") {
- D.subscribe(B)
- } else {
- D.subscribe(B.fn, B.scope, B.correctScope)
- }
- function E(K, J) {
- if (!F.shift) {
- F.shift = false
- }
- if (!F.alt) {
- F.alt = false
- }
- if (!F.ctrl) {
- F.ctrl = false
- }
- if (K.shiftKey == F.shift && K.altKey == F.alt && K.ctrlKey == F.ctrl) {
- var H;
- var G;
- if (F.keys instanceof Array) {
- for (var I = 0; I < F.keys.length; I++) {
- H = F.keys[I];
- if (H == K.charCode) {
- D.fire(K.charCode, K);
- break
- } else {
- if (H == K.keyCode) {
- D.fire(K.keyCode, K);
- break
- }
- }
- }
- } else {
- H = F.keys;
- if (H == K.charCode) {
- D.fire(K.charCode, K)
- } else {
- if (H == K.keyCode) {
- D.fire(K.keyCode, K)
- }
- }
- }
- }
- }
- this.enable = function() {
- if (!this.enabled) {
- YAHOO.util.Event.addListener(A, C, E);
- this.enabledEvent.fire(F)
- }
- this.enabled = true
- };
- this.disable = function() {
- if (this.enabled) {
- YAHOO.util.Event.removeListener(A, C, E);
- this.disabledEvent.fire(F)
- }
- this.enabled = false
- };
- this.toString = function() {
- return "KeyListener [" + F.keys + "] " + A.tagName
- + (A.id ? "[" + A.id + "]" : "")
- }
- };
- YAHOO.util.KeyListener.KEYDOWN = "keydown";
- YAHOO.util.KeyListener.KEYUP = "keyup";
- YAHOO.register("event", YAHOO.util.Event, {
- version : "2.2.0",
- build : "127"
- });
- YAHOO.util.Connect = {
- _msxml_progid : ["MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP",
- "Microsoft.XMLHTTP"],
- _http_headers : {},
- _has_http_headers : false,
- _use_default_post_header : true,
- _default_post_header : "application/x-www-form-urlencoded",
- _use_default_xhr_header : true,
- _default_xhr_header : "XMLHttpRequest",
- _has_default_headers : true,
- _default_headers : {},
- _isFormSubmit : false,
- _isFileUpload : false,
- _formNode : null,
- _sFormData : null,
- _poll : {},
- _timeOut : {},
- _polling_interval : 50,
- _transaction_id : 0,
- setProgId : function(A) {
- this._msxml_progid.unshift(A)
- },
- setDefaultPostHeader : function(A) {
- this._use_default_post_header = A
- },
- setDefaultXhrHeader : function(A) {
- this._use_default_xhr_header = A
- },
- setPollingInterval : function(A) {
- if (typeof A == "number" && isFinite(A)) {
- this._polling_interval = A
- }
- },
- createXhrObject : function(E) {
- var D, A;
- try {
- A = new XMLHttpRequest();
- D = {
- conn : A,
- tId : E
- }
- } catch (C) {
- for (var B = 0; B < this._msxml_progid.length; ++B) {
- try {
- A = new ActiveXObject(this._msxml_progid[B]);
- D = {
- conn : A,
- tId : E
- };
- break
- } catch (C) {
- }
- }
- } finally {
- return D
- }
- },
- getConnectionObject : function() {
- var B;
- var C = this._transaction_id;
- try {
- B = this.createXhrObject(C);
- if (B) {
- this._transaction_id++
- }
- } catch (A) {
- } finally {
- return B
- }
- },
- asyncRequest : function(E, B, D, A) {
- var C = this.getConnectionObject();
- if (!C) {
- return null
- } else {
- if (this._isFormSubmit) {
- if (this._isFileUpload) {
- this.uploadFile(C.tId, D, B, A);
- this.releaseObject(C);
- return
- }
- if (E.toUpperCase() == "GET") {
- if (this._sFormData.length != 0) {
- B += ((B.indexOf("?") == -1) ? "?" : "&")
- + this._sFormData
- } else {
- B += "?" + this._sFormData
- }
- } else {
- if (E.toUpperCase() == "POST") {
- A = A ? this._sFormData + "&" + A : this._sFormData
- }
- }
- }
- C.conn.open(E, B, true);
- if (this._use_default_xhr_header) {
- if (!this._default_headers["X-Requested-With"]) {
- this.initHeader("X-Requested-With",
- this._default_xhr_header, true)
- }
- }
- if (this._isFormSubmit || (A && this._use_default_post_header)) {
- this.initHeader("Content-Type", this._default_post_header);
- if (this._isFormSubmit) {
- this.resetFormState()
- }
- }
- if (this._has_default_headers || this._has_http_headers) {
- this.setHeader(C)
- }
- this.handleReadyState(C, D);
- C.conn.send(A || null);
- return C
- }
- },
- handleReadyState : function(B, C) {
- var A = this;
- if (C && C.timeout) {
- this._timeOut[B.tId] = window.setTimeout(function() {
- A.abort(B, C, true)
- }, C.timeout)
- }
- this._poll[B.tId] = window.setInterval(function() {
- if (B.conn && B.conn.readyState == 4) {
- window.clearInterval(A._poll[B.tId]);
- delete A._poll[B.tId];
- if (C && C.timeout) {
- delete A._timeOut[B.tId]
- }
- A.handleTransactionResponse(B, C)
- }
- }, this._polling_interval)
- },
- handleTransactionResponse : function(E, F, A) {
- if (!F) {
- this.releaseObject(E);
- return
- }
- var C, B;
- try {
- if (E.conn.status !== undefined && E.conn.status != 0) {
- C = E.conn.status
- } else {
- C = 13030
- }
- } catch (D) {
- C = 13030
- }
- if (C >= 200 && C < 300) {
- B = this.createResponseObject(E, F.argument);
- if (F.success) {
- if (!F.scope) {
- F.success(B)
- } else {
- F.success.apply(F.scope, [B])
- }
- }
- } else {
- switch (C) {
- case 12002 :
- case 12029 :
- case 12030 :
- case 12031 :
- case 12152 :
- case 13030 :
- B = this.createExceptionObject(E.tId, F.argument, (A
- ? A
- : false));
- if (F.failure) {
- if (!F.scope) {
- F.failure(B)
- } else {
- F.failure.apply(F.scope, [B])
- }
- }
- break;
- default :
- B = this.createResponseObject(E, F.argument);
- if (F.failure) {
- if (!F.scope) {
- F.failure(B)
- } else {
- F.failure.apply(F.scope, [B])
- }
- }
- }
- }
- this.releaseObject(E);
- B = null
- },
- createResponseObject : function(A, G) {
- var D = {};
- var I = {};
- try {
- var C = A.conn.getAllResponseHeaders();
- var F = C.split("\n");
- for (var E = 0; E < F.length; E++) {
- var B = F[E].indexOf(":");
- if (B != -1) {
- I[F[E].substring(0, B)] = F[E].substring(B + 2)
- }
- }
- } catch (H) {
- }
- D.tId = A.tId;
- D.status = A.conn.status;
- D.statusText = A.conn.statusText;
- D.getResponseHeader = I;
- D.getAllResponseHeaders = C;
- D.responseText = A.conn.responseText;
- D.responseXML = A.conn.responseXML;
- if (typeof G !== undefined) {
- D.argument = G
- }
- return D
- },
- createExceptionObject : function(H, D, A) {
- var F = 0;
- var G = "communication failure";
- var C = -1;
- var B = "transaction aborted";
- var E = {};
- E.tId = H;
- if (A) {
- E.status = C;
- E.statusText = B
- } else {
- E.status = F;
- E.statusText = G
- }
- if (D) {
- E.argument = D
- }
- return E
- },
- initHeader : function(A, D, C) {
- var B = (C) ? this._default_headers : this._http_headers;
- if (B[A] === undefined) {
- B[A] = D
- } else {
- B[A] = D + "," + B[A]
- }
- if (C) {
- this._has_default_headers = true
- } else {
- this._has_http_headers = true
- }
- },
- setHeader : function(A) {
- if (this._has_default_headers) {
- for (var B in this._default_headers) {
- if (YAHOO.lang.hasOwnProperty(this._default_headers, B)) {
- A.conn.setRequestHeader(B, this._default_headers[B])
- }
- }
- }
- if (this._has_http_headers) {
- for (var B in this._http_headers) {
- if (YAHOO.lang.hasOwnProperty(this._http_headers, B)) {
- A.conn.setRequestHeader(B, this._http_headers[B])
- }
- }
- delete this._http_headers;
- this._http_headers = {};
- this._has_http_headers = false
- }
- },
- resetDefaultHeaders : function() {
- delete this._default_headers;
- this._default_headers = {};
- this._has_default_headers = false
- },
- setForm : function(J, E, B) {
- this.resetFormState();
- var I;
- if (typeof J == "string") {
- I = (document.getElementById(J) || document.forms[J])
- } else {
- if (typeof J == "object") {
- I = J
- } else {
- return
- }
- }
- if (E) {
- this.createFrame(B ? B : null);
- this._isFormSubmit = true;
- this._isFileUpload = true;
- this._formNode = I;
- return
- }
- var A, H, F, K;
- var G = false;
- for (var D = 0; D < I.elements.length; D++) {
- A = I.elements[D];
- K = I.elements[D].disabled;
- H = I.elements[D].name;
- F = I.elements[D].value;
- if (!K && H) {
- switch (A.type) {
- case "select-one" :
- case "select-multiple" :
- for (var C = 0; C < A.options.length; C++) {
- if (A.options[C].selected) {
- if (window.ActiveXObject) {
- this._sFormData += encodeURIComponent(H)
- + "="
- + encodeURIComponent(A.options[C].attributes["value"].specified
- ? A.options[C].value
- : A.options[C].text) + "&"
- } else {
- this._sFormData += encodeURIComponent(H)
- + "="
- + encodeURIComponent(A.options[C]
- .hasAttribute("value")
- ? A.options[C].value
- : A.options[C].text) + "&"
- }
- }
- }
- break;
- case "radio" :
- case "checkbox" :
- if (A.checked) {
- this._sFormData += encodeURIComponent(H) + "="
- + encodeURIComponent(F) + "&"
- }
- break;
- case "file" :
- case undefined :
- case "reset" :
- case "button" :
- break;
- case "submit" :
- if (G == false) {
- this._sFormData += encodeURIComponent(H) + "="
- + encodeURIComponent(F) + "&";
- G = true
- }
- break;
- default :
- this._sFormData += encodeURIComponent(H) + "="
- + encodeURIComponent(F) + "&";
- break
- }
- }
- }
- this._isFormSubmit = true;
- this._sFormData = this._sFormData.substr(0, this._sFormData.length - 1);
- return this._sFormData
- },
- resetFormState : function() {
- this._isFormSubmit = false;
- this._isFileUpload = false;
- this._formNode = null;
- this._sFormData = ""
- },
- createFrame : function(A) {
- var B = "yuiIO" + this._transaction_id;
- if (window.ActiveXObject) {
- var C = document.createElement("<iframe id=\"" + B + "\" name=\""
- + B + "\" />");
- if (typeof A == "boolean") {
- C.src = "javascript:false"
- } else {
- if (typeof secureURI == "string") {
- C.src = A
- }
- }
- } else {
- var C = document.createElement("iframe");
- C.id = B;
- C.name = B
- }
- C.style.position = "absolute";
- C.style.top = "-1000px";
- C.style.left = "-1000px";
- document.body.appendChild(C)
- },
- appendPostData : function(A) {
- var D = [];
- var B = A.split("&");
- for (var C = 0; C < B.length; C++) {
- var E = B[C].indexOf("=");
- if (E != -1) {
- D[C] = document.createElement("input");
- D[C].type = "hidden";
- D[C].name = B[C].substring(0, E);
- D[C].value = B[C].substring(E + 1);
- this._formNode.appendChild(D[C])
- }
- }
- return D
- },
- uploadFile : function(A, I, C, B) {
- var F = "yuiIO" + A;
- var G = "multipart/form-data";
- var H = document.getElementById(F);
- this._formNode.action = C;
- this._formNode.method = "POST";
- this._formNode.target = F;
- if (this._formNode.encoding) {
- this._formNode.encoding = G
- } else {
- this._formNode.enctype = G
- }
- if (B) {
- var J = this.appendPostData(B)
- }
- this._formNode.submit();
- if (J && J.length > 0) {
- for (var E = 0; E < J.length; E++) {
- this._formNode.removeChild(J[E])
- }
- }
- this.resetFormState();
- var D = function() {
- var L = {};
- L.tId = A;
- L.argument = I.argument;
- try {
- L.responseText = H.contentWindow.document.body
- ? H.contentWindow.document.body.innerHTML
- : null;
- L.responseXML = H.contentWindow.document.XMLDocument
- ? H.contentWindow.document.XMLDocument
- : H.contentWindow.document
- } catch (K) {
- }
- if (I && I.upload) {
- if (!I.scope) {
- I.upload(L)
- } else {
- I.upload.apply(I.scope, [L])
- }
- }
- if (YAHOO.util.Event) {
- YAHOO.util.Event.removeListener(H, "load", D)
- } else {
- if (window.detachEvent) {
- H.detachEvent("onload", D)
- } else {
- H.removeEventListener("load", D, false)
- }
- }
- setTimeout(function() {
- document.body.removeChild(H)
- }, 100)
- };
- if (YAHOO.util.Event) {
- YAHOO.util.Event.addListener(H, "load", D)
- } else {
- if (window.attachEvent) {
- H.attachEvent("onload", D)
- } else {
- H.addEventListener("load", D, false)
- }
- }
- },
- abort : function(B, C, A) {
- if (this.isCallInProgress(B)) {
- B.conn.abort();
- window.clearInterval(this._poll[B.tId]);
- delete this._poll[B.tId];
- if (A) {
- delete this._timeOut[B.tId]
- }
- this.handleTransactionResponse(B, C, true);
- return true
- } else {
- return false
- }
- },
- isCallInProgress : function(A) {
- if (A.conn) {
- return A.conn.readyState != 4 && A.conn.readyState != 0
- } else {
- return false
- }
- },
- releaseObject : function(A) {
- A.conn = null;
- A = null
- }
- };
- YAHOO.register("connection", YAHOO.widget.Module, {
- version : "2.2.0",
- build : "127"
- });
- YAHOO.util.Anim = function(B, A, C, D) {
- if (B) {
- this.init(B, A, C, D)
- }
- };
- YAHOO.util.Anim.prototype = {
- toString : function() {
- var A = this.getEl();
- var B = A.id || A.tagName;
- return ("Anim " + B)
- },
- patterns : {
- noNegatives : /width|height|opacity|padding/i,
- offsetAttribute : /^((width|height)|(top|left))$/,
- defaultUnit : /width|height|top$|bottom$|left$|right$/i,
- offsetUnit : /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i
- },
- doMethod : function(A, C, B) {
- return this.method(this.currentFrame, C, B - C, this.totalFrames)
- },
- setAttribute : function(A, C, B) {
- if (this.patterns.noNegatives.test(A)) {
- C = (C > 0) ? C : 0
- }
- YAHOO.util.Dom.setStyle(this.getEl(), A, C + B)
- },
- getAttribute : function(A) {
- var C = this.getEl();
- var E = YAHOO.util.Dom.getStyle(C, A);
- if (E !== "auto" && !this.patterns.offsetUnit.test(E)) {
- return parseFloat(E)
- }
- var B = this.patterns.offsetAttribute.exec(A) || [];
- var F = !!(B[3]);
- var D = !!(B[2]);
- if (D || (YAHOO.util.Dom.getStyle(C, "position") == "absolute" && F)) {
- E = C["offset" + B[0].charAt(0).toUpperCase() + B[0].substr(1)]
- } else {
- E = 0
- }
- return E
- },
- getDefaultUnit : function(A) {
- if (this.patterns.defaultUnit.test(A)) {
- return "px"
- }
- return ""
- },
- setRuntimeAttribute : function(B) {
- var G;
- var C;
- var D = this.attributes;
- this.runtimeAttributes[B] = {};
- var F = function(H) {
- return (typeof H !== "undefined")
- };
- if (!F(D[B]["to"]) && !F(D[B]["by"])) {
- return false
- }
- G = (F(D[B]["from"])) ? D[B]["from"] : this.getAttribute(B);
- if (F(D[B]["to"])) {
- C = D[B]["to"]
- } else {
- if (F(D[B]["by"])) {
- if (G.constructor == Array) {
- C = [];
- for (var E = 0, A = G.length; E < A; ++E) {
- C[E] = G[E] + D[B]["by"][E]
- }
- } else {
- C = G + D[B]["by"]
- }
- }
- }
- this.runtimeAttributes[B].start = G;
- this.runtimeAttributes[B].end = C;
- this.runtimeAttributes[B].unit = (F(D[B].unit)) ? D[B]["unit"] : this
- .getDefaultUnit(B)
- },
- init : function(C, H, G, A) {
- var B = false;
- var D = null;
- var F = 0;
- C = YAHOO.util.Dom.get(C);
- this.attributes = H || {};
- this.duration = G || 1;
- this.method = A || YAHOO.util.Easing.easeNone;
- this.useSeconds = true;
- this.currentFrame = 0;
- this.totalFrames = YAHOO.util.AnimMgr.fps;
- this.getEl = function() {
- return C
- };
- this.isAnimated = function() {
- return B
- };
- this.getStartTime = function() {
- return D
- };
- this.runtimeAttributes = {};
- this.animate = function() {
- if (this.isAnimated()) {
- return false
- }
- this.currentFrame = 0;
- this.totalFrames = (this.useSeconds)
- ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration)
- : this.duration;
- YAHOO.util.AnimMgr.registerElement(this)
- };
- this.stop = function(K) {
- if (K) {
- this.currentFrame = this.totalFrames;
- this._onTween.fire()
- }
- YAHOO.util.AnimMgr.stop(this)
- };
- var J = function() {
- this.onStart.fire();
- this.runtimeAttributes = {};
- for (var K in this.attributes) {
- this.setRuntimeAttribute(K)
- }
- B = true;
- F = 0;
- D = allGetServerTime()
- };
- var I = function() {
- var M = {
- duration : allGetServerTime() - this.getStartTime(),
- currentFrame : this.currentFrame
- };
- M.toString = function() {
- return ("duration: " + M.duration + ", currentFrame: " + M.currentFrame)
- };
- this.onTween.fire(M);
- var L = this.runtimeAttributes;
- for (var K in L) {
- this.setAttribute(K, this.doMethod(K, L[K].start, L[K].end),
- L[K].unit)
- }
- F += 1
- };
- var E = function() {
- var K = (allGetServerTime() - D) / 1000;
- var L = {
- duration : K,
- frames : F,
- fps : F / K
- };
- L.toString = function() {
- return ("duration: " + L.duration + ", frames: " + L.frames
- + ", fps: " + L.fps)
- };
- B = false;
- F = 0;
- this.onComplete.fire(L)
- };
- this._onStart = new YAHOO.util.CustomEvent("_start", this, true);
- this.onStart = new YAHOO.util.CustomEvent("start", this);
- this.onTween = new YAHOO.util.CustomEvent("tween", this);
- this._onTween = new YAHOO.util.CustomEvent("_tween", this, true);
- this.onComplete = new YAHOO.util.CustomEvent("complete", this);
- this._onComplete = new YAHOO.util.CustomEvent("_complete", this, true);
- this._onStart.subscribe(J);
- this._onTween.subscribe(I);
- this._onComplete.subscribe(E)
- }
- };
- YAHOO.util.AnimMgr = new function() {
- var C = null;
- var B = [];
- var A = 0;
- this.fps = 1000;
- this.delay = 1;
- this.registerElement = function(F) {
- B[B.length] = F;
- A += 1;
- F._onStart.fire();
- this.start()
- };
- this.unRegister = function(G, F) {
- G._onComplete.fire();
- F = F || E(G);
- if (F != -1) {
- B.splice(F, 1)
- }
- A -= 1;
- if (A <= 0) {
- this.stop()
- }
- };
- this.start = function() {
- if (C === null) {
- C = setInterval(this.run, this.delay)
- }
- };
- this.stop = function(H) {
- if (!H) {
- clearInterval(C);
- for (var G = 0, F = B.length; G < F; ++G) {
- if (B[0].isAnimated()) {
- this.unRegister(B[0], 0)
- }
- }
- B = [];
- C = null;
- A = 0
- } else {
- this.unRegister(H)
- }
- };
- this.run = function() {
- for (var H = 0, F = B.length; H < F; ++H) {
- var G = B[H];
- if (!G || !G.isAnimated()) {
- continue
- }
- if (G.currentFrame < G.totalFrames || G.totalFrames === null) {
- G.currentFrame += 1;
- if (G.useSeconds) {
- D(G)
- }
- G._onTween.fire()
- } else {
- YAHOO.util.AnimMgr.stop(G, H)
- }
- }
- };
- var E = function(H) {
- for (var G = 0, F = B.length; G < F; ++G) {
- if (B[G] == H) {
- return G
- }
- }
- return -1
- };
- var D = function(G) {
- var J = G.totalFrames;
- var I = G.currentFrame;
- var H = (G.currentFrame * G.duration * 1000 / G.totalFrames);
- var F = (allGetServerTime() - G.getStartTime());
- var K = 0;
- if (F < G.duration * 1000) {
- K = Math.round((F / H - 1) * G.currentFrame)
- } else {
- K = J - (I + 1)
- }
- if (K > 0 && isFinite(K)) {
- if (G.currentFrame + K >= J) {
- K = J - (I + 1)
- }
- G.currentFrame += K
- }
- }
- };
- YAHOO.util.Bezier = new function() {
- this.getPosition = function(E, D) {
- var F = E.length;
- var C = [];
- for (var B = 0; B < F; ++B) {
- C[B] = [E[B][0], E[B][1]]
- }
- for (var A = 1; A < F; ++A) {
- for (B = 0; B < F - A; ++B) {
- C[B][0] = (1 - D) * C[B][0] + D * C[parseInt(B + 1, 10)][0];
- C[B][1] = (1 - D) * C[B][1] + D * C[parseInt(B + 1, 10)][1]
- }
- }
- return [C[0][0], C[0][1]]
- }
- };
- (function() {
- YAHOO.util.ColorAnim = function(E, D, F, G) {
- YAHOO.util.ColorAnim.superclass.constructor.call(this, E, D, F, G)
- };
- YAHOO.extend(YAHOO.util.ColorAnim, YAHOO.util.Anim);
- var B = YAHOO.util;
- var C = B.ColorAnim.superclass;
- var A = B.ColorAnim.prototype;
- A.toString = function() {
- var D = this.getEl();
- var E = D.id || D.tagName;
- return ("ColorAnim " + E)
- };
- A.patterns.color = /color$/i;
- A.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;
- A.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;
- A.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
- A.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/;
- A.parseColor = function(D) {
- if (D.length == 3) {
- return D
- }
- var E = this.patterns.hex.exec(D);
- if (E && E.length == 4) {
- return [parseInt(E[1], 16), parseInt(E[2], 16), parseInt(E[3], 16)]
- }
- E = this.patterns.rgb.exec(D);
- if (E && E.length == 4) {
- return [parseInt(E[1], 10), parseInt(E[2], 10), parseInt(E[3], 10)]
- }
- E = this.patterns.hex3.exec(D);
- if (E && E.length == 4) {
- return [parseInt(E[1] + E[1], 16), parseInt(E[2] + E[2], 16),
- parseInt(E[3] + E[3], 16)]
- }
- return null
- };
- A.getAttribute = function(D) {
- var F = this.getEl();
- if (this.patterns.color.test(D)) {
- var G = YAHOO.util.Dom.getStyle(F, D);
- if (this.patterns.transparent.test(G)) {
- var E = F.parentNode;
- G = B.Dom.getStyle(E, D);
- while (E && this.patterns.transparent.test(G)) {
- E = E.parentNode;
- G = B.Dom.getStyle(E, D);
- if (E.tagName.toUpperCase() == "HTML") {
- G = "#fff"
- }
- }
- }
- } else {
- G = C.getAttribute.call(this, D)
- }
- return G
- };
- A.doMethod = function(E, I, F) {
- var H;
- if (this.patterns.color.test(E)) {
- H = [];
- for (var G = 0, D = I.length; G < D; ++G) {
- H[G] = C.doMethod.call(this, E, I[G], F[G])
- }
- H = "rgb(" + Math.floor(H[0]) + "," + Math.floor(H[1]) + ","
- + Math.floor(H[2]) + ")"
- } else {
- H = C.doMethod.call(this, E, I, F)
- }
- return H
- };
- A.setRuntimeAttribute = function(E) {
- C.setRuntimeAttribute.call(this, E);
- if (this.patterns.color.test(E)) {
- var G = this.attributes;
- var I = this.parseColor(this.runtimeAttributes[E].start);
- var F = this.parseColor(this.runtimeAttributes[E].end);
- if (typeof G[E]["to"] === "undefined"
- && typeof G[E]["by"] !== "undefined") {
- F = this.parseColor(G[E].by);
- for (var H = 0, D = I.length; H < D; ++H) {
- F[H] = I[H] + F[H]
- }
- }
- this.runtimeAttributes[E].start = I;
- this.runtimeAttributes[E].end = F
- }
- }
- })();
- YAHOO.util.Easing = {
- easeNone : function(B, A, D, C) {
- return D * B / C + A
- },
- easeIn : function(B, A, D, C) {
- return D * (B /= C) * B + A
- },
- easeOut : function(B, A, D, C) {
- return -D * (B /= C) * (B - 2) + A
- },
- easeBoth : function(B, A, D, C) {
- if ((B /= C / 2) < 1) {
- return D / 2 * B * B + A
- }
- return -D / 2 * ((--B) * (B - 2) - 1) + A
- },
- easeInStrong : function(B, A, D, C) {
- return D * (B /= C) * B * B * B + A
- },
- easeOutStrong : function(B, A, D, C) {
- return -D * ((B = B / C - 1) * B * B * B - 1) + A
- },
- easeBothStrong : function(B, A, D, C) {
- if ((B /= C / 2) < 1) {
- return D / 2 * B * B * B * B + A
- }
- return -D / 2 * ((B -= 2) * B * B * B - 2) + A
- },
- elasticIn : function(C, A, G, F, B, E) {
- if (C == 0) {
- return A
- }
- if ((C /= F) == 1) {
- return A + G
- }
- if (!E) {
- E = F * 0.3
- }
- if (!B || B < Math.abs(G)) {
- B = G;
- var D = E / 4
- } else {
- var D = E / (2 * Math.PI) * Math.asin(G / B)
- }
- return -(B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D)
- * (2 * Math.PI) / E))
- + A
- },
- elasticOut : function(C, A, G, F, B, E) {
- if (C == 0) {
- return A
- }
- if ((C /= F) == 1) {
- return A + G
- }
- if (!E) {
- E = F * 0.3
- }
- if (!B || B < Math.abs(G)) {
- B = G;
- var D = E / 4
- } else {
- var D = E / (2 * Math.PI) * Math.asin(G / B)
- }
- return B * Math.pow(2, -10 * C)
- * Math.sin((C * F - D) * (2 * Math.PI) / E) + G + A
- },
- elasticBoth : function(C, A, G, F, B, E) {
- if (C == 0) {
- return A
- }
- if ((C /= F / 2) == 2) {
- return A + G
- }
- if (!E) {
- E = F * (0.3 * 1.5)
- }
- if (!B || B < Math.abs(G)) {
- B = G;
- var D = E / 4
- } else {
- var D = E / (2 * Math.PI) * Math.asin(G / B)
- }
- if (C < 1) {
- return -0.5
- * (B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D)
- * (2 * Math.PI) / E)) + A
- }
- return B * Math.pow(2, -10 * (C -= 1))
- * Math.sin((C * F - D) * (2 * Math.PI) / E) * 0.5 + G + A
- },
- backIn : function(B, A, E, D, C) {
- if (typeof C == "undefined") {
- C = 1.70158
- }
- return E * (B /= D) * B * ((C + 1) * B - C) + A
- },
- backOut : function(B, A, E, D, C) {
- if (typeof C == "undefined") {
- C = 1.70158
- }
- return E * ((B = B / D - 1) * B * ((C + 1) * B + C) + 1) + A
- },
- backBoth : function(B, A, E, D, C) {
- if (typeof C == "undefined") {
- C = 1.70158
- }
- if ((B /= D / 2) < 1) {
- return E / 2 * (B * B * (((C *= (1.525)) + 1) * B - C)) + A
- }
- return E / 2 * ((B -= 2) * B * (((C *= (1.525)) + 1) * B + C) + 2) + A
- },
- bounceIn : function(B, A, D, C) {
- return D - YAHOO.util.Easing.bounceOut(C - B, 0, D, C) + A
- },
- bounceOut : function(B, A, D, C) {
- if ((B /= C) < (1 / 2.75)) {
- return D * (7.5625 * B * B) + A
- } else {
- if (B < (2 / 2.75)) {
- return D * (7.5625 * (B -= (1.5 / 2.75)) * B + 0.75) + A
- } else {
- if (B < (2.5 / 2.75)) {
- return D * (7.5625 * (B -= (2.25 / 2.75)) * B + 0.9375) + A
- }
- }
- }
- return D * (7.5625 * (B -= (2.625 / 2.75)) * B + 0.984375) + A
- },
- bounceBoth : function(B, A, D, C) {
- if (B < C / 2) {
- return YAHOO.util.Easing.bounceIn(B * 2, 0, D, C) * 0.5 + A
- }
- return YAHOO.util.Easing.bounceOut(B * 2 - C, 0, D, C) * 0.5 + D * 0.5
- + A
- }
- };
- (function() {
- YAHOO.util.Motion = function(G, F, H, I) {
- if (G) {
- YAHOO.util.Motion.superclass.constructor.call(this, G, F, H, I)
- }
- };
- YAHOO.extend(YAHOO.util.Motion, YAHOO.util.ColorAnim);
- var D = YAHOO.util;
- var E = D.Motion.superclass;
- var B = D.Motion.prototype;
- B.toString = function() {
- var F = this.getEl();
- var G = F.id || F.tagName;
- return ("Motion " + G)
- };
- B.patterns.points = /^points$/i;
- B.setAttribute = function(F, H, G) {
- if (this.patterns.points.test(F)) {
- G = G || "px";
- E.setAttribute.call(this, "left", H[0], G);
- E.setAttribute.call(this, "top", H[1], G)
- } else {
- E.setAttribute.call(this, F, H, G)
- }
- };
- B.getAttribute = function(F) {
- if (this.patterns.points.test(F)) {
- var G = [E.getAttribute.call(this, "left"),
- E.getAttribute.call(this, "top")]
- } else {
- G = E.getAttribute.call(this, F)
- }
- return G
- };
- B.doMethod = function(F, J, G) {
- var I = null;
- if (this.patterns.points.test(F)) {
- var H = this.method(this.currentFrame, 0, 100, this.totalFrames)
- / 100;
- I = D.Bezier.getPosition(this.runtimeAttributes[F], H)
- } else {
- I = E.doMethod.call(this, F, J, G)
- }
- return I
- };
- B.setRuntimeAttribute = function(O) {
- if (this.patterns.points.test(O)) {
- var G = this.getEl();
- var I = this.attributes;
- var F;
- var K = I["points"]["control"] || [];
- var H;
- var L, N;
- if (K.length > 0 && !(K[0] instanceof Array)) {
- K = [K]
- } else {
- var J = [];
- for (L = 0, N = K.length; L < N; ++L) {
- J[L] = K[L]
- }
- K = J
- }
- if (D.Dom.getStyle(G, "position") == "static") {
- D.Dom.setStyle(G, "position", "relative")
- }
- if (C(I["points"]["from"])) {
- D.Dom.setXY(G, I["points"]["from"])
- } else {
- D.Dom.setXY(G, D.Dom.getXY(G))
- }
- F = this.getAttribute("points");
- if (C(I["points"]["to"])) {
- H = A.call(this, I["points"]["to"], F);
- var M = D.Dom.getXY(this.getEl());
- for (L = 0, N = K.length; L < N; ++L) {
- K[L] = A.call(this, K[L], F)
- }
- } else {
- if (C(I["points"]["by"])) {
- H = [F[0] + I["points"]["by"][0],
- F[1] + I["points"]["by"][1]];
- for (L = 0, N = K.length; L < N; ++L) {
- K[L] = [F[0] + K[L][0], F[1] + K[L][1]]
- }
- }
- }
- this.runtimeAttributes[O] = [F];
- if (K.length > 0) {
- this.runtimeAttributes[O] = this.runtimeAttributes[O].concat(K)
- }
- this.runtimeAttributes[O][this.runtimeAttributes[O].length] = H
- } else {
- E.setRuntimeAttribute.call(this, O)
- }
- };
- var A = function(F, H) {
- var G = D.Dom.getXY(this.getEl());
- F = [F[0] - G[0] + H[0], F[1] - G[1] + H[1]];
- return F
- };
- var C = function(F) {
- return (typeof F !== "undefined")
- }
- })();
- (function() {
- YAHOO.util.Scroll = function(E, D, F, G) {
- if (E) {
- YAHOO.util.Scroll.superclass.constructor.call(this, E, D, F, G)
- }
- };
- YAHOO.extend(YAHOO.util.Scroll, YAHOO.util.ColorAnim);
- var B = YAHOO.util;
- var C = B.Scroll.superclass;
- var A = B.Scroll.prototype;
- A.toString = function() {
- var D = this.getEl();
- var E = D.id || D.tagName;
- return ("Scroll " + E)
- };
- A.doMethod = function(D, G, E) {
- var F = null;
- if (D == "scroll") {
- F = [
- this.method(this.currentFrame, G[0], E[0] - G[0],
- this.totalFrames),
- this.method(this.currentFrame, G[1], E[1] - G[1],
- this.totalFrames)]
- } else {
- F = C.doMethod.call(this, D, G, E)
- }
- return F
- };
- A.getAttribute = function(D) {
- var F = null;
- var E = this.getEl();
- if (D == "scroll") {
- F = [E.scrollLeft, E.scrollTop]
- } else {
- F = C.getAttribute.call(this, D)
- }
- return F
- };
- A.setAttribute = function(D, G, F) {
- var E = this.getEl();
- if (D == "scroll") {
- E.scrollLeft = G[0];
- E.scrollTop = G[1]
- } else {
- C.setAttribute.call(this, D, G, F)
- }
- }
- })();
- YAHOO.register("animation", YAHOO.util.Anim, {
- version : "2.2.0",
- build : "127"
- });
|