81cf1b6f3eea4bffcb2e4b483b017119c6df1d47.svn-base 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606
  1. /*
  2. * Ext JS Library 2.0 Copyright(c) 2006-2007, Ext JS, LLC. licensing@extjs.com
  3. *
  4. * http://extjs.com/license
  5. */
  6. if (typeof YAHOO == "undefined") {
  7. var YAHOO = {}
  8. }
  9. YAHOO.namespace = function() {
  10. var A = arguments, E = null, C, B, D;
  11. for (C = 0; C < A.length; C = C + 1) {
  12. D = A[C].split(".");
  13. E = YAHOO;
  14. for (B = (D[0] == "YAHOO") ? 1 : 0; B < D.length; B = B + 1) {
  15. E[D[B]] = E[D[B]] || {};
  16. E = E[D[B]]
  17. }
  18. }
  19. return E
  20. };
  21. YAHOO.log = function(D, A, C) {
  22. var B = YAHOO.widget.Logger;
  23. if (B && B.log) {
  24. return B.log(D, A, C)
  25. } else {
  26. return false
  27. }
  28. };
  29. YAHOO.init = function() {
  30. this.namespace("util", "widget", "example");
  31. if (typeof YAHOO_config != "undefined") {
  32. var B = YAHOO_config.listener, A = YAHOO.env.listeners, D = true, C;
  33. if (B) {
  34. for (C = 0; C < A.length; C = C + 1) {
  35. if (A[C] == B) {
  36. D = false;
  37. break
  38. }
  39. }
  40. if (D) {
  41. A.push(B)
  42. }
  43. }
  44. }
  45. };
  46. YAHOO.register = function(A, E, D) {
  47. var I = YAHOO.env.modules;
  48. if (!I[A]) {
  49. I[A] = {
  50. versions : [],
  51. builds : []
  52. }
  53. }
  54. var B = I[A], H = D.version, G = D.build, F = YAHOO.env.listeners;
  55. B.name = A;
  56. B.version = H;
  57. B.build = G;
  58. B.versions.push(H);
  59. B.builds.push(G);
  60. B.mainClass = E;
  61. for (var C = 0; C < F.length; C = C + 1) {
  62. F[C](B)
  63. }
  64. if (E) {
  65. E.VERSION = H;
  66. E.BUILD = G
  67. } else {
  68. YAHOO.log("mainClass is undefined for module " + A, "warn")
  69. }
  70. };
  71. YAHOO.env = YAHOO.env || {
  72. modules : [],
  73. listeners : [],
  74. getVersion : function(A) {
  75. return YAHOO.env.modules[A] || null
  76. }
  77. };
  78. YAHOO.lang = {
  79. isArray : function(A) {
  80. if (A.constructor && A.constructor.toString().indexOf("Array") > -1) {
  81. return true
  82. } else {
  83. return YAHOO.lang.isObject(A) && A.constructor == Array
  84. }
  85. },
  86. isBoolean : function(A) {
  87. return typeof A == "boolean"
  88. },
  89. isFunction : function(A) {
  90. return typeof A == "function"
  91. },
  92. isNull : function(A) {
  93. return A === null
  94. },
  95. isNumber : function(A) {
  96. return typeof A == "number" && isFinite(A)
  97. },
  98. isObject : function(A) {
  99. return typeof A == "object" || YAHOO.lang.isFunction(A)
  100. },
  101. isString : function(A) {
  102. return typeof A == "string"
  103. },
  104. isUndefined : function(A) {
  105. return typeof A == "undefined"
  106. },
  107. hasOwnProperty : function(A, B) {
  108. if (Object.prototype.hasOwnProperty) {
  109. return A.hasOwnProperty(B)
  110. }
  111. return !YAHOO.lang.isUndefined(A[B])
  112. && A.constructor.prototype[B] !== A[B]
  113. },
  114. extend : function(D, E, C) {
  115. var B = function() {
  116. };
  117. B.prototype = E.prototype;
  118. D.prototype = new B();
  119. D.prototype.constructor = D;
  120. D.superclass = E.prototype;
  121. if (E.prototype.constructor == Object.prototype.constructor) {
  122. E.prototype.constructor = E
  123. }
  124. if (C) {
  125. for (var A in C) {
  126. D.prototype[A] = C[A]
  127. }
  128. }
  129. },
  130. augment : function(E, D) {
  131. var C = E.prototype, F = D.prototype, A = arguments, B, G;
  132. if (A[2]) {
  133. for (B = 2; B < A.length; B = B + 1) {
  134. C[A[B]] = F[A[B]]
  135. }
  136. } else {
  137. for (G in F) {
  138. if (!C[G]) {
  139. C[G] = F[G]
  140. }
  141. }
  142. }
  143. }
  144. };
  145. YAHOO.init();
  146. YAHOO.util.Lang = YAHOO.lang;
  147. YAHOO.augment = YAHOO.lang.augment;
  148. YAHOO.extend = YAHOO.lang.extend;
  149. YAHOO.register("yahoo", YAHOO, {
  150. version : "2.2.0",
  151. build : "127"
  152. });
  153. (function() {
  154. var C = YAHOO.util, J, H, G = 0, I = {};
  155. var B = navigator.userAgent.toLowerCase(), D = (B.indexOf("opera") > -1), K = (B
  156. .indexOf("safari") > -1), A = (!D && !K && B.indexOf("gecko") > -1), F = (!D && B
  157. .indexOf("msie") > -1);
  158. var E = {
  159. HYPHEN : /(-[a-z])/i
  160. };
  161. var L = function(M) {
  162. if (!E.HYPHEN.test(M)) {
  163. return M
  164. }
  165. if (I[M]) {
  166. return I[M]
  167. }
  168. while (E.HYPHEN.exec(M)) {
  169. M = M.replace(RegExp.$1, RegExp.$1.substr(1).toUpperCase())
  170. }
  171. I[M] = M;
  172. return M
  173. };
  174. if (document.defaultView && document.defaultView.getComputedStyle) {
  175. J = function(M, P) {
  176. var O = null;
  177. var N = document.defaultView.getComputedStyle(M, "");
  178. if (N) {
  179. O = N[L(P)]
  180. }
  181. return M.style[P] || O
  182. }
  183. } else {
  184. if (document.documentElement.currentStyle && F) {
  185. J = function(M, O) {
  186. switch (L(O)) {
  187. case "opacity" :
  188. var Q = 100;
  189. try {
  190. Q = M.filters["DXImageTransform.Microsoft.Alpha"].opacity
  191. } catch (P) {
  192. try {
  193. Q = M.filters("alpha").opacity
  194. } catch (P) {
  195. }
  196. }
  197. return Q / 100;
  198. break;
  199. default :
  200. var N = M.currentStyle ? M.currentStyle[O] : null;
  201. return (M.style[O] || N)
  202. }
  203. }
  204. } else {
  205. J = function(M, N) {
  206. return M.style[N]
  207. }
  208. }
  209. }
  210. if (F) {
  211. H = function(M, N, O) {
  212. switch (N) {
  213. case "opacity" :
  214. if (typeof M.style.filter == "string") {
  215. M.style.filter = "alpha(opacity=" + O * 100 + ")";
  216. if (!M.currentStyle || !M.currentStyle.hasLayout) {
  217. M.style.zoom = 1
  218. }
  219. }
  220. break;
  221. default :
  222. M.style[N] = O
  223. }
  224. }
  225. } else {
  226. H = function(M, N, O) {
  227. M.style[N] = O
  228. }
  229. }
  230. YAHOO.util.Dom = {
  231. get : function(O) {
  232. if (!O) {
  233. return null
  234. }
  235. if (typeof O != "string" && !(O instanceof Array)) {
  236. return O
  237. }
  238. if (typeof O == "string") {
  239. return document.getElementById(O)
  240. } else {
  241. var P = [];
  242. for (var N = 0, M = O.length; N < M; ++N) {
  243. P[P.length] = C.Dom.get(O[N])
  244. }
  245. return P
  246. }
  247. return null
  248. },
  249. getStyle : function(M, O) {
  250. O = L(O);
  251. var N = function(P) {
  252. return J(P, O)
  253. };
  254. return C.Dom.batch(M, N, C.Dom, true)
  255. },
  256. setStyle : function(M, O, P) {
  257. O = L(O);
  258. var N = function(Q) {
  259. H(Q, O, P)
  260. };
  261. C.Dom.batch(M, N, C.Dom, true)
  262. },
  263. getXY : function(M) {
  264. var N = function(P) {
  265. if (P.parentNode === null || P.offsetParent === null
  266. || this.getStyle(P, "display") == "none") {
  267. return false
  268. }
  269. var O = null;
  270. var U = [];
  271. var Q;
  272. if (P.getBoundingClientRect) {
  273. Q = P.getBoundingClientRect();
  274. var S = document;
  275. if (!this.inDocument(P) && parent.document != document) {
  276. S = parent.document;
  277. if (!this.isAncestor(S.documentElement, P)) {
  278. return false
  279. }
  280. }
  281. var R = Math.max(S.documentElement.scrollTop,
  282. S.body.scrollTop);
  283. var T = Math.max(S.documentElement.scrollLeft,
  284. S.body.scrollLeft);
  285. return [Q.left + T, Q.top + R]
  286. } else {
  287. U = [P.offsetLeft, P.offsetTop];
  288. O = P.offsetParent;
  289. if (O != P) {
  290. while (O) {
  291. U[0] += O.offsetLeft;
  292. U[1] += O.offsetTop;
  293. O = O.offsetParent
  294. }
  295. }
  296. if (K && this.getStyle(P, "position") == "absolute") {
  297. U[0] -= document.body.offsetLeft;
  298. U[1] -= document.body.offsetTop
  299. }
  300. }
  301. if (P.parentNode) {
  302. O = P.parentNode
  303. } else {
  304. O = null
  305. }
  306. while (O && O.tagName.toUpperCase() != "BODY"
  307. && O.tagName.toUpperCase() != "HTML") {
  308. if (C.Dom.getStyle(O, "display") != "inline") {
  309. U[0] -= O.scrollLeft;
  310. U[1] -= O.scrollTop
  311. }
  312. if (O.parentNode) {
  313. O = O.parentNode
  314. } else {
  315. O = null
  316. }
  317. }
  318. return U
  319. };
  320. return C.Dom.batch(M, N, C.Dom, true)
  321. },
  322. getX : function(M) {
  323. var N = function(O) {
  324. return C.Dom.getXY(O)[0]
  325. };
  326. return C.Dom.batch(M, N, C.Dom, true)
  327. },
  328. getY : function(M) {
  329. var N = function(O) {
  330. return C.Dom.getXY(O)[1]
  331. };
  332. return C.Dom.batch(M, N, C.Dom, true)
  333. },
  334. setXY : function(M, P, O) {
  335. var N = function(S) {
  336. var R = this.getStyle(S, "position");
  337. if (R == "static") {
  338. this.setStyle(S, "position", "relative");
  339. R = "relative"
  340. }
  341. var U = this.getXY(S);
  342. if (U === false) {
  343. return false
  344. }
  345. var T = [parseInt(this.getStyle(S, "left"), 10),
  346. parseInt(this.getStyle(S, "top"), 10)];
  347. if (isNaN(T[0])) {
  348. T[0] = (R == "relative") ? 0 : S.offsetLeft
  349. }
  350. if (isNaN(T[1])) {
  351. T[1] = (R == "relative") ? 0 : S.offsetTop
  352. }
  353. if (P[0] !== null) {
  354. S.style.left = P[0] - U[0] + T[0] + "px"
  355. }
  356. if (P[1] !== null) {
  357. S.style.top = P[1] - U[1] + T[1] + "px"
  358. }
  359. if (!O) {
  360. var Q = this.getXY(S);
  361. if ((P[0] !== null && Q[0] != P[0])
  362. || (P[1] !== null && Q[1] != P[1])) {
  363. this.setXY(S, P, true)
  364. }
  365. }
  366. };
  367. C.Dom.batch(M, N, C.Dom, true)
  368. },
  369. setX : function(N, M) {
  370. C.Dom.setXY(N, [M, null])
  371. },
  372. setY : function(M, N) {
  373. C.Dom.setXY(M, [null, N])
  374. },
  375. getRegion : function(M) {
  376. var N = function(O) {
  377. var P = new C.Region.getRegion(O);
  378. return P
  379. };
  380. return C.Dom.batch(M, N, C.Dom, true)
  381. },
  382. getClientWidth : function() {
  383. return C.Dom.getViewportWidth()
  384. },
  385. getClientHeight : function() {
  386. return C.Dom.getViewportHeight()
  387. },
  388. getElementsByClassName : function(O, M, N) {
  389. var P = function(Q) {
  390. return C.Dom.hasClass(Q, O)
  391. };
  392. return C.Dom.getElementsBy(P, M, N)
  393. },
  394. hasClass : function(O, N) {
  395. var M = new RegExp("(?:^|\\s+)" + N + "(?:\\s+|$)");
  396. var P = function(Q) {
  397. return M.test(Q["className"])
  398. };
  399. return C.Dom.batch(O, P, C.Dom, true)
  400. },
  401. addClass : function(N, M) {
  402. var O = function(P) {
  403. if (this.hasClass(P, M)) {
  404. return
  405. }
  406. P["className"] = [P["className"], M].join(" ")
  407. };
  408. C.Dom.batch(N, O, C.Dom, true)
  409. },
  410. removeClass : function(O, N) {
  411. var M = new RegExp("(?:^|\\s+)" + N + "(?:\\s+|$)", "g");
  412. var P = function(Q) {
  413. if (!this.hasClass(Q, N)) {
  414. return
  415. }
  416. var R = Q["className"];
  417. Q["className"] = R.replace(M, " ");
  418. if (this.hasClass(Q, N)) {
  419. this.removeClass(Q, N)
  420. }
  421. };
  422. C.Dom.batch(O, P, C.Dom, true)
  423. },
  424. replaceClass : function(P, N, M) {
  425. if (N === M) {
  426. return false
  427. }
  428. var O = new RegExp("(?:^|\\s+)" + N + "(?:\\s+|$)", "g");
  429. var Q = function(R) {
  430. if (!this.hasClass(R, N)) {
  431. this.addClass(R, M);
  432. return
  433. }
  434. R["className"] = R["className"].replace(O, " " + M + " ");
  435. if (this.hasClass(R, N)) {
  436. this.replaceClass(R, N, M)
  437. }
  438. };
  439. C.Dom.batch(P, Q, C.Dom, true)
  440. },
  441. generateId : function(M, O) {
  442. O = O || "yui-gen";
  443. M = M || {};
  444. var N = function(P) {
  445. if (P) {
  446. P = C.Dom.get(P)
  447. } else {
  448. P = {}
  449. }
  450. if (!P.id) {
  451. P.id = O + G++
  452. }
  453. return P.id
  454. };
  455. return C.Dom.batch(M, N, C.Dom, true)
  456. },
  457. isAncestor : function(N, O) {
  458. N = C.Dom.get(N);
  459. if (!N || !O) {
  460. return false
  461. }
  462. var M = function(Q) {
  463. if (N.contains && !K) {
  464. return N.contains(Q)
  465. } else {
  466. if (N.compareDocumentPosition) {
  467. return !!(N.compareDocumentPosition(Q) & 16)
  468. } else {
  469. var P = Q.parentNode;
  470. while (P) {
  471. if (P == N) {
  472. return true
  473. } else {
  474. if (!P.tagName
  475. || P.tagName.toUpperCase() == "HTML") {
  476. return false
  477. }
  478. }
  479. P = P.parentNode
  480. }
  481. return false
  482. }
  483. }
  484. };
  485. return C.Dom.batch(O, M, C.Dom, true)
  486. },
  487. inDocument : function(M) {
  488. var N = function(O) {
  489. return this.isAncestor(document.documentElement, O)
  490. };
  491. return C.Dom.batch(M, N, C.Dom, true)
  492. },
  493. getElementsBy : function(S, N, O) {
  494. N = N || "*";
  495. var P = [];
  496. if (O) {
  497. O = C.Dom.get(O);
  498. if (!O) {
  499. return P
  500. }
  501. } else {
  502. O = document
  503. }
  504. var R = O.getElementsByTagName(N);
  505. if (!R.length && (N == "*" && O.all)) {
  506. R = O.all
  507. }
  508. for (var Q = 0, M = R.length; Q < M; ++Q) {
  509. if (S(R[Q])) {
  510. P[P.length] = R[Q]
  511. }
  512. }
  513. return P
  514. },
  515. batch : function(Q, M, P, O) {
  516. var N = Q;
  517. Q = C.Dom.get(Q);
  518. var U = (O) ? P : window;
  519. if (!Q || Q.tagName || !Q.length) {
  520. if (!Q) {
  521. return false
  522. }
  523. return M.call(U, Q, P)
  524. }
  525. var S = [];
  526. for (var R = 0, T = Q.length; R < T; ++R) {
  527. if (!Q[R]) {
  528. N = Q[R]
  529. }
  530. S[S.length] = M.call(U, Q[R], P)
  531. }
  532. return S
  533. },
  534. getDocumentHeight : function() {
  535. var N = (document.compatMode != "CSS1Compat")
  536. ? document.body.scrollHeight
  537. : document.documentElement.scrollHeight;
  538. var M = Math.max(N, C.Dom.getViewportHeight());
  539. return M
  540. },
  541. getDocumentWidth : function() {
  542. var N = (document.compatMode != "CSS1Compat")
  543. ? document.body.scrollWidth
  544. : document.documentElement.scrollWidth;
  545. var M = Math.max(N, C.Dom.getViewportWidth());
  546. return M
  547. },
  548. getViewportHeight : function() {
  549. var M = self.innerHeight;
  550. var N = document.compatMode;
  551. if ((N || F) && !D) {
  552. M = (N == "CSS1Compat")
  553. ? document.documentElement.clientHeight
  554. : document.body.clientHeight
  555. }
  556. return M
  557. },
  558. getViewportWidth : function() {
  559. var M = self.innerWidth;
  560. var N = document.compatMode;
  561. if (N || F) {
  562. M = (N == "CSS1Compat")
  563. ? document.documentElement.clientWidth
  564. : document.body.clientWidth
  565. }
  566. return M
  567. }
  568. }
  569. })();
  570. YAHOO.util.Region = function(C, D, A, B) {
  571. this.top = C;
  572. this[1] = C;
  573. this.right = D;
  574. this.bottom = A;
  575. this.left = B;
  576. this[0] = B
  577. };
  578. YAHOO.util.Region.prototype.contains = function(A) {
  579. return (A.left >= this.left && A.right <= this.right && A.top >= this.top && A.bottom <= this.bottom)
  580. };
  581. YAHOO.util.Region.prototype.getArea = function() {
  582. return ((this.bottom - this.top) * (this.right - this.left))
  583. };
  584. YAHOO.util.Region.prototype.intersect = function(E) {
  585. var C = Math.max(this.top, E.top);
  586. var D = Math.min(this.right, E.right);
  587. var A = Math.min(this.bottom, E.bottom);
  588. var B = Math.max(this.left, E.left);
  589. if (A >= C && D >= B) {
  590. return new YAHOO.util.Region(C, D, A, B)
  591. } else {
  592. return null
  593. }
  594. };
  595. YAHOO.util.Region.prototype.union = function(E) {
  596. var C = Math.min(this.top, E.top);
  597. var D = Math.max(this.right, E.right);
  598. var A = Math.max(this.bottom, E.bottom);
  599. var B = Math.min(this.left, E.left);
  600. return new YAHOO.util.Region(C, D, A, B)
  601. };
  602. YAHOO.util.Region.prototype.toString = function() {
  603. return ("Region {" + "top: " + this.top + ", right: " + this.right
  604. + ", bottom: " + this.bottom + ", left: " + this.left + "}")
  605. };
  606. YAHOO.util.Region.getRegion = function(D) {
  607. var F = YAHOO.util.Dom.getXY(D);
  608. var C = F[1];
  609. var E = F[0] + D.offsetWidth;
  610. var A = F[1] + D.offsetHeight;
  611. var B = F[0];
  612. return new YAHOO.util.Region(C, E, A, B)
  613. };
  614. YAHOO.util.Point = function(A, B) {
  615. if (A instanceof Array) {
  616. B = A[1];
  617. A = A[0]
  618. }
  619. this.x = this.right = this.left = this[0] = A;
  620. this.y = this.top = this.bottom = this[1] = B
  621. };
  622. YAHOO.util.Point.prototype = new YAHOO.util.Region();
  623. YAHOO.register("dom", YAHOO.util.Dom, {
  624. version : "2.2.0",
  625. build : "127"
  626. });
  627. if (!YAHOO.util.Event) {
  628. YAHOO.util.Event = function() {
  629. var H = false;
  630. var I = [];
  631. var J = [];
  632. var F = [];
  633. var D = [];
  634. var C = 0;
  635. var E = [];
  636. var B = [];
  637. var A = 0;
  638. var G = null;
  639. return {
  640. POLL_RETRYS : 200,
  641. POLL_INTERVAL : 20,
  642. EL : 0,
  643. TYPE : 1,
  644. FN : 2,
  645. WFN : 3,
  646. OBJ : 3,
  647. ADJ_SCOPE : 4,
  648. isSafari : (/KHTML/gi).test(navigator.userAgent),
  649. webkit : function() {
  650. var K = navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);
  651. if (K && K[1]) {
  652. return K[1]
  653. }
  654. return null
  655. }(),
  656. isIE : (!this.webkit && !navigator.userAgent.match(/opera/gi) && navigator.userAgent
  657. .match(/msie/gi)),
  658. _interval : null,
  659. startInterval : function() {
  660. if (!this._interval) {
  661. var K = this;
  662. var L = function() {
  663. K._tryPreloadAttach()
  664. };
  665. this._interval = setInterval(L, this.POLL_INTERVAL)
  666. }
  667. },
  668. onAvailable : function(M, K, N, L) {
  669. E.push({
  670. id : M,
  671. fn : K,
  672. obj : N,
  673. override : L,
  674. checkReady : false
  675. });
  676. C = this.POLL_RETRYS;
  677. this.startInterval()
  678. },
  679. onContentReady : function(M, K, N, L) {
  680. E.push({
  681. id : M,
  682. fn : K,
  683. obj : N,
  684. override : L,
  685. checkReady : true
  686. });
  687. C = this.POLL_RETRYS;
  688. this.startInterval()
  689. },
  690. addListener : function(M, K, V, Q, L) {
  691. if (!V || !V.call) {
  692. return false
  693. }
  694. if (this._isValidCollection(M)) {
  695. var W = true;
  696. for (var R = 0, T = M.length; R < T; ++R) {
  697. W = this.on(M[R], K, V, Q, L) && W
  698. }
  699. return W
  700. } else {
  701. if (typeof M == "string") {
  702. var P = this.getEl(M);
  703. if (P) {
  704. M = P
  705. } else {
  706. this.onAvailable(M, function() {
  707. YAHOO.util.Event.on(M, K, V, Q, L)
  708. });
  709. return true
  710. }
  711. }
  712. }
  713. if (!M) {
  714. return false
  715. }
  716. if ("unload" == K && Q !== this) {
  717. J[J.length] = [M, K, V, Q, L];
  718. return true
  719. }
  720. var Y = M;
  721. if (L) {
  722. if (L === true) {
  723. Y = Q
  724. } else {
  725. Y = L
  726. }
  727. }
  728. var N = function(Z) {
  729. return V.call(Y, YAHOO.util.Event.getEvent(Z), Q)
  730. };
  731. var X = [M, K, V, N, Y];
  732. var S = I.length;
  733. I[S] = X;
  734. if (this.useLegacyEvent(M, K)) {
  735. var O = this.getLegacyIndex(M, K);
  736. if (O == -1 || M != F[O][0]) {
  737. O = F.length;
  738. B[M.id + K] = O;
  739. F[O] = [M, K, M["on" + K]];
  740. D[O] = [];
  741. M["on" + K] = function(Z) {
  742. YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event
  743. .getEvent(Z), O)
  744. }
  745. }
  746. D[O].push(X)
  747. } else {
  748. try {
  749. this._simpleAdd(M, K, N, false)
  750. } catch (U) {
  751. this.lastError = U;
  752. this.removeListener(M, K, V);
  753. return false
  754. }
  755. }
  756. return true
  757. },
  758. fireLegacyEvent : function(O, M) {
  759. var Q = true, K, S, R, T, P;
  760. S = D[M];
  761. for (var L = 0, N = S.length; L < N; ++L) {
  762. R = S[L];
  763. if (R && R[this.WFN]) {
  764. T = R[this.ADJ_SCOPE];
  765. P = R[this.WFN].call(T, O);
  766. Q = (Q && P)
  767. }
  768. }
  769. K = F[M];
  770. if (K && K[2]) {
  771. K[2](O)
  772. }
  773. return Q
  774. },
  775. getLegacyIndex : function(L, M) {
  776. var K = this.generateId(L) + M;
  777. if (typeof B[K] == "undefined") {
  778. return -1
  779. } else {
  780. return B[K]
  781. }
  782. },
  783. useLegacyEvent : function(L, M) {
  784. if (this.webkit && ("click" == M || "dblclick" == M)) {
  785. var K = parseInt(this.webkit, 10);
  786. if (!isNaN(K) && K < 418) {
  787. return true
  788. }
  789. }
  790. return false
  791. },
  792. removeListener : function(L, K, T) {
  793. var O, R;
  794. if (typeof L == "string") {
  795. L = this.getEl(L)
  796. } else {
  797. if (this._isValidCollection(L)) {
  798. var U = true;
  799. for (O = 0, R = L.length; O < R; ++O) {
  800. U = (this.removeListener(L[O], K, T) && U)
  801. }
  802. return U
  803. }
  804. }
  805. if (!T || !T.call) {
  806. return this.purgeElement(L, false, K)
  807. }
  808. if ("unload" == K) {
  809. for (O = 0, R = J.length; O < R; O++) {
  810. var V = J[O];
  811. if (V && V[0] == L && V[1] == K && V[2] == T) {
  812. J.splice(O, 1);
  813. return true
  814. }
  815. }
  816. return false
  817. }
  818. var P = null;
  819. var Q = arguments[3];
  820. if ("undefined" == typeof Q) {
  821. Q = this._getCacheIndex(L, K, T)
  822. }
  823. if (Q >= 0) {
  824. P = I[Q]
  825. }
  826. if (!L || !P) {
  827. return false
  828. }
  829. if (this.useLegacyEvent(L, K)) {
  830. var N = this.getLegacyIndex(L, K);
  831. var M = D[N];
  832. if (M) {
  833. for (O = 0, R = M.length; O < R; ++O) {
  834. V = M[O];
  835. if (V && V[this.EL] == L && V[this.TYPE] == K
  836. && V[this.FN] == T) {
  837. M.splice(O, 1);
  838. break
  839. }
  840. }
  841. }
  842. } else {
  843. try {
  844. this._simpleRemove(L, K, P[this.WFN], false)
  845. } catch (S) {
  846. this.lastError = S;
  847. return false
  848. }
  849. }
  850. delete I[Q][this.WFN];
  851. delete I[Q][this.FN];
  852. I.splice(Q, 1);
  853. return true
  854. },
  855. getTarget : function(M, L) {
  856. var K = M.target || M.srcElement;
  857. return this.resolveTextNode(K)
  858. },
  859. resolveTextNode : function(K) {
  860. if (K && 3 == K.nodeType) {
  861. return K.parentNode
  862. } else {
  863. return K
  864. }
  865. },
  866. getPageX : function(L) {
  867. var K = L.pageX;
  868. if (!K && 0 !== K) {
  869. K = L.clientX || 0;
  870. if (this.isIE) {
  871. K += this._getScrollLeft()
  872. }
  873. }
  874. return K
  875. },
  876. getPageY : function(K) {
  877. var L = K.pageY;
  878. if (!L && 0 !== L) {
  879. L = K.clientY || 0;
  880. if (this.isIE) {
  881. L += this._getScrollTop()
  882. }
  883. }
  884. return L
  885. },
  886. getXY : function(K) {
  887. return [this.getPageX(K), this.getPageY(K)]
  888. },
  889. getRelatedTarget : function(L) {
  890. var K = L.relatedTarget;
  891. if (!K) {
  892. if (L.type == "mouseout") {
  893. K = L.toElement
  894. } else {
  895. if (L.type == "mouseover") {
  896. K = L.fromElement
  897. }
  898. }
  899. }
  900. return this.resolveTextNode(K)
  901. },
  902. getTime : function(M) {
  903. if (!M.time) {
  904. var L = allGetServerTime().getTime();
  905. try {
  906. M.time = L
  907. } catch (K) {
  908. this.lastError = K;
  909. return L
  910. }
  911. }
  912. return M.time
  913. },
  914. stopEvent : function(K) {
  915. this.stopPropagation(K);
  916. this.preventDefault(K)
  917. },
  918. stopPropagation : function(K) {
  919. if (K.stopPropagation) {
  920. K.stopPropagation()
  921. } else {
  922. K.cancelBubble = true
  923. }
  924. },
  925. preventDefault : function(K) {
  926. if (K.preventDefault) {
  927. K.preventDefault()
  928. } else {
  929. K.returnValue = false
  930. }
  931. },
  932. getEvent : function(L) {
  933. var K = L || window.event;
  934. if (!K) {
  935. var M = this.getEvent.caller;
  936. while (M) {
  937. K = M.arguments[0];
  938. if (K && Event == K.constructor) {
  939. break
  940. }
  941. M = M.caller
  942. }
  943. }
  944. return K
  945. },
  946. getCharCode : function(K) {
  947. return K.charCode || K.keyCode || 0
  948. },
  949. _getCacheIndex : function(O, P, N) {
  950. for (var M = 0, L = I.length; M < L; ++M) {
  951. var K = I[M];
  952. if (K && K[this.FN] == N && K[this.EL] == O
  953. && K[this.TYPE] == P) {
  954. return M
  955. }
  956. }
  957. return -1
  958. },
  959. generateId : function(K) {
  960. var L = K.id;
  961. if (!L) {
  962. L = "yuievtautoid-" + A;
  963. ++A;
  964. K.id = L
  965. }
  966. return L
  967. },
  968. _isValidCollection : function(K) {
  969. return (K && K.length && typeof K != "string" && !K.tagName
  970. && !K.alert && typeof K[0] != "undefined")
  971. },
  972. elCache : {},
  973. getEl : function(K) {
  974. return document.getElementById(K)
  975. },
  976. clearCache : function() {
  977. },
  978. _load : function(L) {
  979. H = true;
  980. var K = YAHOO.util.Event;
  981. if (this.isIE) {
  982. K._simpleRemove(window, "load", K._load)
  983. }
  984. },
  985. _tryPreloadAttach : function() {
  986. if (this.locked) {
  987. return false
  988. }
  989. this.locked = true;
  990. var Q = !H;
  991. if (!Q) {
  992. Q = (C > 0)
  993. }
  994. var P = [];
  995. for (var L = 0, K = E.length; L < K; ++L) {
  996. var O = E[L];
  997. if (O) {
  998. var N = this.getEl(O.id);
  999. if (N) {
  1000. if (!O.checkReady || H || N.nextSibling
  1001. || (document && document.body)) {
  1002. var M = N;
  1003. if (O.override) {
  1004. if (O.override === true) {
  1005. M = O.obj
  1006. } else {
  1007. M = O.override
  1008. }
  1009. }
  1010. O.fn.call(M, O.obj);
  1011. E[L] = null
  1012. }
  1013. } else {
  1014. P.push(O)
  1015. }
  1016. }
  1017. }
  1018. C = (P.length === 0) ? 0 : C - 1;
  1019. if (Q) {
  1020. this.startInterval()
  1021. } else {
  1022. clearInterval(this._interval);
  1023. this._interval = null
  1024. }
  1025. this.locked = false;
  1026. return true
  1027. },
  1028. purgeElement : function(N, O, Q) {
  1029. var P = this.getListeners(N, Q);
  1030. if (P) {
  1031. for (var M = 0, K = P.length; M < K; ++M) {
  1032. var L = P[M];
  1033. this.removeListener(N, L.type, L.fn)
  1034. }
  1035. }
  1036. if (O && N && N.childNodes) {
  1037. for (M = 0, K = N.childNodes.length; M < K; ++M) {
  1038. this.purgeElement(N.childNodes[M], O, Q)
  1039. }
  1040. }
  1041. },
  1042. getListeners : function(M, K) {
  1043. var P = [], L;
  1044. if (!K) {
  1045. L = [I, J]
  1046. } else {
  1047. if (K == "unload") {
  1048. L = [J]
  1049. } else {
  1050. L = [I]
  1051. }
  1052. }
  1053. for (var O = 0; O < L.length; ++O) {
  1054. var S = L[O];
  1055. if (S && S.length > 0) {
  1056. for (var Q = 0, R = S.length; Q < R; ++Q) {
  1057. var N = S[Q];
  1058. if (N && N[this.EL] === M
  1059. && (!K || K === N[this.TYPE])) {
  1060. P.push({
  1061. type : N[this.TYPE],
  1062. fn : N[this.FN],
  1063. obj : N[this.OBJ],
  1064. adjust : N[this.ADJ_SCOPE],
  1065. index : Q
  1066. })
  1067. }
  1068. }
  1069. }
  1070. }
  1071. return (P.length) ? P : null
  1072. },
  1073. _unload : function(R) {
  1074. var Q = YAHOO.util.Event, O, N, L, K, M;
  1075. for (O = 0, K = J.length; O < K; ++O) {
  1076. L = J[O];
  1077. if (L) {
  1078. var P = window;
  1079. if (L[Q.ADJ_SCOPE]) {
  1080. if (L[Q.ADJ_SCOPE] === true) {
  1081. P = L[Q.OBJ]
  1082. } else {
  1083. P = L[Q.ADJ_SCOPE]
  1084. }
  1085. }
  1086. L[Q.FN].call(P, Q.getEvent(R), L[Q.OBJ]);
  1087. J[O] = null;
  1088. L = null;
  1089. P = null
  1090. }
  1091. }
  1092. J = null;
  1093. if (I && I.length > 0) {
  1094. N = I.length;
  1095. while (N) {
  1096. M = N - 1;
  1097. L = I[M];
  1098. if (L) {
  1099. Q.removeListener(L[Q.EL], L[Q.TYPE], L[Q.FN], M)
  1100. }
  1101. N = N - 1
  1102. }
  1103. L = null;
  1104. Q.clearCache()
  1105. }
  1106. for (O = 0, K = F.length; O < K; ++O) {
  1107. F[O][0] = null;
  1108. F[O] = null
  1109. }
  1110. F = null;
  1111. Q._simpleRemove(window, "unload", Q._unload)
  1112. },
  1113. _getScrollLeft : function() {
  1114. return this._getScroll()[1]
  1115. },
  1116. _getScrollTop : function() {
  1117. return this._getScroll()[0]
  1118. },
  1119. _getScroll : function() {
  1120. var K = document.documentElement, L = document.body;
  1121. if (K && (K.scrollTop || K.scrollLeft)) {
  1122. return [K.scrollTop, K.scrollLeft]
  1123. } else {
  1124. if (L) {
  1125. return [L.scrollTop, L.scrollLeft]
  1126. } else {
  1127. return [0, 0]
  1128. }
  1129. }
  1130. },
  1131. regCE : function() {
  1132. },
  1133. _simpleAdd : function() {
  1134. if (window.addEventListener) {
  1135. return function(M, N, L, K) {
  1136. M.addEventListener(N, L, (K))
  1137. }
  1138. } else {
  1139. if (window.attachEvent) {
  1140. return function(M, N, L, K) {
  1141. M.attachEvent("on" + N, L)
  1142. }
  1143. } else {
  1144. return function() {
  1145. }
  1146. }
  1147. }
  1148. }(),
  1149. _simpleRemove : function() {
  1150. if (window.removeEventListener) {
  1151. return function(M, N, L, K) {
  1152. M.removeEventListener(N, L, (K))
  1153. }
  1154. } else {
  1155. if (window.detachEvent) {
  1156. return function(L, M, K) {
  1157. L.detachEvent("on" + M, K)
  1158. }
  1159. } else {
  1160. return function() {
  1161. }
  1162. }
  1163. }
  1164. }()
  1165. }
  1166. }();
  1167. (function() {
  1168. var A = YAHOO.util.Event;
  1169. A.on = A.addListener;
  1170. if (document && document.body) {
  1171. A._load()
  1172. } else {
  1173. A._simpleAdd(window, "load", A._load)
  1174. }
  1175. A._simpleAdd(window, "unload", A._unload);
  1176. A._tryPreloadAttach()
  1177. })()
  1178. }
  1179. YAHOO.util.CustomEvent = function(D, B, C, A) {
  1180. this.type = D;
  1181. this.scope = B || window;
  1182. this.silent = C;
  1183. this.signature = A || YAHOO.util.CustomEvent.LIST;
  1184. this.subscribers = [];
  1185. if (!this.silent) {
  1186. }
  1187. var E = "_YUICEOnSubscribe";
  1188. if (D !== E) {
  1189. this.subscribeEvent = new YAHOO.util.CustomEvent(E, this, true)
  1190. }
  1191. };
  1192. YAHOO.util.CustomEvent.LIST = 0;
  1193. YAHOO.util.CustomEvent.FLAT = 1;
  1194. YAHOO.util.CustomEvent.prototype = {
  1195. subscribe : function(B, C, A) {
  1196. if (this.subscribeEvent) {
  1197. this.subscribeEvent.fire(B, C, A)
  1198. }
  1199. this.subscribers.push(new YAHOO.util.Subscriber(B, C, A))
  1200. },
  1201. unsubscribe : function(D, F) {
  1202. if (!D) {
  1203. return this.unsubscribeAll()
  1204. }
  1205. var E = false;
  1206. for (var B = 0, A = this.subscribers.length; B < A; ++B) {
  1207. var C = this.subscribers[B];
  1208. if (C && C.contains(D, F)) {
  1209. this._delete(B);
  1210. E = true
  1211. }
  1212. }
  1213. return E
  1214. },
  1215. fire : function() {
  1216. var A = this.subscribers.length;
  1217. if (!A && this.silent) {
  1218. return true
  1219. }
  1220. var C = [], B = true, D;
  1221. for (D = 0; D < arguments.length; ++D) {
  1222. C.push(arguments[D])
  1223. }
  1224. var G = C.length;
  1225. if (!this.silent) {
  1226. }
  1227. for (D = 0; D < A; ++D) {
  1228. var F = this.subscribers[D];
  1229. if (F) {
  1230. if (!this.silent) {
  1231. }
  1232. var E = F.getScope(this.scope);
  1233. if (this.signature == YAHOO.util.CustomEvent.FLAT) {
  1234. var H = null;
  1235. if (C.length > 0) {
  1236. H = C[0]
  1237. }
  1238. B = F.fn.call(E, H, F.obj)
  1239. } else {
  1240. B = F.fn.call(E, this.type, C, F.obj)
  1241. }
  1242. if (false === B) {
  1243. if (!this.silent) {
  1244. }
  1245. return false
  1246. }
  1247. }
  1248. }
  1249. return true
  1250. },
  1251. unsubscribeAll : function() {
  1252. for (var B = 0, A = this.subscribers.length; B < A; ++B) {
  1253. this._delete(A - 1 - B)
  1254. }
  1255. return B
  1256. },
  1257. _delete : function(A) {
  1258. var B = this.subscribers[A];
  1259. if (B) {
  1260. delete B.fn;
  1261. delete B.obj
  1262. }
  1263. this.subscribers.splice(A, 1)
  1264. },
  1265. toString : function() {
  1266. return "CustomEvent: " + "'" + this.type + "', " + "scope: "
  1267. + this.scope
  1268. }
  1269. };
  1270. YAHOO.util.Subscriber = function(B, C, A) {
  1271. this.fn = B;
  1272. this.obj = C || null;
  1273. this.override = A
  1274. };
  1275. YAHOO.util.Subscriber.prototype.getScope = function(A) {
  1276. if (this.override) {
  1277. if (this.override === true) {
  1278. return this.obj
  1279. } else {
  1280. return this.override
  1281. }
  1282. }
  1283. return A
  1284. };
  1285. YAHOO.util.Subscriber.prototype.contains = function(A, B) {
  1286. if (B) {
  1287. return (this.fn == A && this.obj == B)
  1288. } else {
  1289. return (this.fn == A)
  1290. }
  1291. };
  1292. YAHOO.util.Subscriber.prototype.toString = function() {
  1293. return "Subscriber { obj: " + (this.obj || "") + ", override: "
  1294. + (this.override || "no") + " }"
  1295. };
  1296. YAHOO.util.EventProvider = function() {
  1297. };
  1298. YAHOO.util.EventProvider.prototype = {
  1299. __yui_events : null,
  1300. __yui_subscribers : null,
  1301. subscribe : function(A, C, F, E) {
  1302. this.__yui_events = this.__yui_events || {};
  1303. var D = this.__yui_events[A];
  1304. if (D) {
  1305. D.subscribe(C, F, E)
  1306. } else {
  1307. this.__yui_subscribers = this.__yui_subscribers || {};
  1308. var B = this.__yui_subscribers;
  1309. if (!B[A]) {
  1310. B[A] = []
  1311. }
  1312. B[A].push({
  1313. fn : C,
  1314. obj : F,
  1315. override : E
  1316. })
  1317. }
  1318. },
  1319. unsubscribe : function(A, B, D) {
  1320. this.__yui_events = this.__yui_events || {};
  1321. var C = this.__yui_events[A];
  1322. if (C) {
  1323. return C.unsubscribe(B, D)
  1324. } else {
  1325. return false
  1326. }
  1327. },
  1328. unsubscribeAll : function(A) {
  1329. return this.unsubscribe(A)
  1330. },
  1331. createEvent : function(G, D) {
  1332. this.__yui_events = this.__yui_events || {};
  1333. var A = D || {};
  1334. var I = this.__yui_events;
  1335. if (I[G]) {
  1336. } else {
  1337. var H = A.scope || this;
  1338. var E = A.silent || null;
  1339. var B = new YAHOO.util.CustomEvent(G, H, E,
  1340. YAHOO.util.CustomEvent.FLAT);
  1341. I[G] = B;
  1342. if (A.onSubscribeCallback) {
  1343. B.subscribeEvent.subscribe(A.onSubscribeCallback)
  1344. }
  1345. this.__yui_subscribers = this.__yui_subscribers || {};
  1346. var F = this.__yui_subscribers[G];
  1347. if (F) {
  1348. for (var C = 0; C < F.length; ++C) {
  1349. B.subscribe(F[C].fn, F[C].obj, F[C].override)
  1350. }
  1351. }
  1352. }
  1353. return I[G]
  1354. },
  1355. fireEvent : function(E, D, A, C) {
  1356. this.__yui_events = this.__yui_events || {};
  1357. var G = this.__yui_events[E];
  1358. if (G) {
  1359. var B = [];
  1360. for (var F = 1; F < arguments.length; ++F) {
  1361. B.push(arguments[F])
  1362. }
  1363. return G.fire.apply(G, B)
  1364. } else {
  1365. return null
  1366. }
  1367. },
  1368. hasEvent : function(A) {
  1369. if (this.__yui_events) {
  1370. if (this.__yui_events[A]) {
  1371. return true
  1372. }
  1373. }
  1374. return false
  1375. }
  1376. };
  1377. YAHOO.util.KeyListener = function(A, F, B, C) {
  1378. if (!A) {
  1379. } else {
  1380. if (!F) {
  1381. } else {
  1382. if (!B) {
  1383. }
  1384. }
  1385. }
  1386. if (!C) {
  1387. C = YAHOO.util.KeyListener.KEYDOWN
  1388. }
  1389. var D = new YAHOO.util.CustomEvent("keyPressed");
  1390. this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
  1391. this.disabledEvent = new YAHOO.util.CustomEvent("disabled");
  1392. if (typeof A == "string") {
  1393. A = document.getElementById(A)
  1394. }
  1395. if (typeof B == "function") {
  1396. D.subscribe(B)
  1397. } else {
  1398. D.subscribe(B.fn, B.scope, B.correctScope)
  1399. }
  1400. function E(K, J) {
  1401. if (!F.shift) {
  1402. F.shift = false
  1403. }
  1404. if (!F.alt) {
  1405. F.alt = false
  1406. }
  1407. if (!F.ctrl) {
  1408. F.ctrl = false
  1409. }
  1410. if (K.shiftKey == F.shift && K.altKey == F.alt && K.ctrlKey == F.ctrl) {
  1411. var H;
  1412. var G;
  1413. if (F.keys instanceof Array) {
  1414. for (var I = 0; I < F.keys.length; I++) {
  1415. H = F.keys[I];
  1416. if (H == K.charCode) {
  1417. D.fire(K.charCode, K);
  1418. break
  1419. } else {
  1420. if (H == K.keyCode) {
  1421. D.fire(K.keyCode, K);
  1422. break
  1423. }
  1424. }
  1425. }
  1426. } else {
  1427. H = F.keys;
  1428. if (H == K.charCode) {
  1429. D.fire(K.charCode, K)
  1430. } else {
  1431. if (H == K.keyCode) {
  1432. D.fire(K.keyCode, K)
  1433. }
  1434. }
  1435. }
  1436. }
  1437. }
  1438. this.enable = function() {
  1439. if (!this.enabled) {
  1440. YAHOO.util.Event.addListener(A, C, E);
  1441. this.enabledEvent.fire(F)
  1442. }
  1443. this.enabled = true
  1444. };
  1445. this.disable = function() {
  1446. if (this.enabled) {
  1447. YAHOO.util.Event.removeListener(A, C, E);
  1448. this.disabledEvent.fire(F)
  1449. }
  1450. this.enabled = false
  1451. };
  1452. this.toString = function() {
  1453. return "KeyListener [" + F.keys + "] " + A.tagName
  1454. + (A.id ? "[" + A.id + "]" : "")
  1455. }
  1456. };
  1457. YAHOO.util.KeyListener.KEYDOWN = "keydown";
  1458. YAHOO.util.KeyListener.KEYUP = "keyup";
  1459. YAHOO.register("event", YAHOO.util.Event, {
  1460. version : "2.2.0",
  1461. build : "127"
  1462. });
  1463. YAHOO.util.Connect = {
  1464. _msxml_progid : ["MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP",
  1465. "Microsoft.XMLHTTP"],
  1466. _http_headers : {},
  1467. _has_http_headers : false,
  1468. _use_default_post_header : true,
  1469. _default_post_header : "application/x-www-form-urlencoded",
  1470. _use_default_xhr_header : true,
  1471. _default_xhr_header : "XMLHttpRequest",
  1472. _has_default_headers : true,
  1473. _default_headers : {},
  1474. _isFormSubmit : false,
  1475. _isFileUpload : false,
  1476. _formNode : null,
  1477. _sFormData : null,
  1478. _poll : {},
  1479. _timeOut : {},
  1480. _polling_interval : 50,
  1481. _transaction_id : 0,
  1482. setProgId : function(A) {
  1483. this._msxml_progid.unshift(A)
  1484. },
  1485. setDefaultPostHeader : function(A) {
  1486. this._use_default_post_header = A
  1487. },
  1488. setDefaultXhrHeader : function(A) {
  1489. this._use_default_xhr_header = A
  1490. },
  1491. setPollingInterval : function(A) {
  1492. if (typeof A == "number" && isFinite(A)) {
  1493. this._polling_interval = A
  1494. }
  1495. },
  1496. createXhrObject : function(E) {
  1497. var D, A;
  1498. try {
  1499. A = new XMLHttpRequest();
  1500. D = {
  1501. conn : A,
  1502. tId : E
  1503. }
  1504. } catch (C) {
  1505. for (var B = 0; B < this._msxml_progid.length; ++B) {
  1506. try {
  1507. A = new ActiveXObject(this._msxml_progid[B]);
  1508. D = {
  1509. conn : A,
  1510. tId : E
  1511. };
  1512. break
  1513. } catch (C) {
  1514. }
  1515. }
  1516. } finally {
  1517. return D
  1518. }
  1519. },
  1520. getConnectionObject : function() {
  1521. var B;
  1522. var C = this._transaction_id;
  1523. try {
  1524. B = this.createXhrObject(C);
  1525. if (B) {
  1526. this._transaction_id++
  1527. }
  1528. } catch (A) {
  1529. } finally {
  1530. return B
  1531. }
  1532. },
  1533. asyncRequest : function(E, B, D, A) {
  1534. var C = this.getConnectionObject();
  1535. if (!C) {
  1536. return null
  1537. } else {
  1538. if (this._isFormSubmit) {
  1539. if (this._isFileUpload) {
  1540. this.uploadFile(C.tId, D, B, A);
  1541. this.releaseObject(C);
  1542. return
  1543. }
  1544. if (E.toUpperCase() == "GET") {
  1545. if (this._sFormData.length != 0) {
  1546. B += ((B.indexOf("?") == -1) ? "?" : "&")
  1547. + this._sFormData
  1548. } else {
  1549. B += "?" + this._sFormData
  1550. }
  1551. } else {
  1552. if (E.toUpperCase() == "POST") {
  1553. A = A ? this._sFormData + "&" + A : this._sFormData
  1554. }
  1555. }
  1556. }
  1557. C.conn.open(E, B, true);
  1558. if (this._use_default_xhr_header) {
  1559. if (!this._default_headers["X-Requested-With"]) {
  1560. this.initHeader("X-Requested-With",
  1561. this._default_xhr_header, true)
  1562. }
  1563. }
  1564. if (this._isFormSubmit || (A && this._use_default_post_header)) {
  1565. this.initHeader("Content-Type", this._default_post_header);
  1566. if (this._isFormSubmit) {
  1567. this.resetFormState()
  1568. }
  1569. }
  1570. if (this._has_default_headers || this._has_http_headers) {
  1571. this.setHeader(C)
  1572. }
  1573. this.handleReadyState(C, D);
  1574. C.conn.send(A || null);
  1575. return C
  1576. }
  1577. },
  1578. handleReadyState : function(B, C) {
  1579. var A = this;
  1580. if (C && C.timeout) {
  1581. this._timeOut[B.tId] = window.setTimeout(function() {
  1582. A.abort(B, C, true)
  1583. }, C.timeout)
  1584. }
  1585. this._poll[B.tId] = window.setInterval(function() {
  1586. if (B.conn && B.conn.readyState == 4) {
  1587. window.clearInterval(A._poll[B.tId]);
  1588. delete A._poll[B.tId];
  1589. if (C && C.timeout) {
  1590. delete A._timeOut[B.tId]
  1591. }
  1592. A.handleTransactionResponse(B, C)
  1593. }
  1594. }, this._polling_interval)
  1595. },
  1596. handleTransactionResponse : function(E, F, A) {
  1597. if (!F) {
  1598. this.releaseObject(E);
  1599. return
  1600. }
  1601. var C, B;
  1602. try {
  1603. if (E.conn.status !== undefined && E.conn.status != 0) {
  1604. C = E.conn.status
  1605. } else {
  1606. C = 13030
  1607. }
  1608. } catch (D) {
  1609. C = 13030
  1610. }
  1611. if (C >= 200 && C < 300) {
  1612. B = this.createResponseObject(E, F.argument);
  1613. if (F.success) {
  1614. if (!F.scope) {
  1615. F.success(B)
  1616. } else {
  1617. F.success.apply(F.scope, [B])
  1618. }
  1619. }
  1620. } else {
  1621. switch (C) {
  1622. case 12002 :
  1623. case 12029 :
  1624. case 12030 :
  1625. case 12031 :
  1626. case 12152 :
  1627. case 13030 :
  1628. B = this.createExceptionObject(E.tId, F.argument, (A
  1629. ? A
  1630. : false));
  1631. if (F.failure) {
  1632. if (!F.scope) {
  1633. F.failure(B)
  1634. } else {
  1635. F.failure.apply(F.scope, [B])
  1636. }
  1637. }
  1638. break;
  1639. default :
  1640. B = this.createResponseObject(E, F.argument);
  1641. if (F.failure) {
  1642. if (!F.scope) {
  1643. F.failure(B)
  1644. } else {
  1645. F.failure.apply(F.scope, [B])
  1646. }
  1647. }
  1648. }
  1649. }
  1650. this.releaseObject(E);
  1651. B = null
  1652. },
  1653. createResponseObject : function(A, G) {
  1654. var D = {};
  1655. var I = {};
  1656. try {
  1657. var C = A.conn.getAllResponseHeaders();
  1658. var F = C.split("\n");
  1659. for (var E = 0; E < F.length; E++) {
  1660. var B = F[E].indexOf(":");
  1661. if (B != -1) {
  1662. I[F[E].substring(0, B)] = F[E].substring(B + 2)
  1663. }
  1664. }
  1665. } catch (H) {
  1666. }
  1667. D.tId = A.tId;
  1668. D.status = A.conn.status;
  1669. D.statusText = A.conn.statusText;
  1670. D.getResponseHeader = I;
  1671. D.getAllResponseHeaders = C;
  1672. D.responseText = A.conn.responseText;
  1673. D.responseXML = A.conn.responseXML;
  1674. if (typeof G !== undefined) {
  1675. D.argument = G
  1676. }
  1677. return D
  1678. },
  1679. createExceptionObject : function(H, D, A) {
  1680. var F = 0;
  1681. var G = "communication failure";
  1682. var C = -1;
  1683. var B = "transaction aborted";
  1684. var E = {};
  1685. E.tId = H;
  1686. if (A) {
  1687. E.status = C;
  1688. E.statusText = B
  1689. } else {
  1690. E.status = F;
  1691. E.statusText = G
  1692. }
  1693. if (D) {
  1694. E.argument = D
  1695. }
  1696. return E
  1697. },
  1698. initHeader : function(A, D, C) {
  1699. var B = (C) ? this._default_headers : this._http_headers;
  1700. if (B[A] === undefined) {
  1701. B[A] = D
  1702. } else {
  1703. B[A] = D + "," + B[A]
  1704. }
  1705. if (C) {
  1706. this._has_default_headers = true
  1707. } else {
  1708. this._has_http_headers = true
  1709. }
  1710. },
  1711. setHeader : function(A) {
  1712. if (this._has_default_headers) {
  1713. for (var B in this._default_headers) {
  1714. if (YAHOO.lang.hasOwnProperty(this._default_headers, B)) {
  1715. A.conn.setRequestHeader(B, this._default_headers[B])
  1716. }
  1717. }
  1718. }
  1719. if (this._has_http_headers) {
  1720. for (var B in this._http_headers) {
  1721. if (YAHOO.lang.hasOwnProperty(this._http_headers, B)) {
  1722. A.conn.setRequestHeader(B, this._http_headers[B])
  1723. }
  1724. }
  1725. delete this._http_headers;
  1726. this._http_headers = {};
  1727. this._has_http_headers = false
  1728. }
  1729. },
  1730. resetDefaultHeaders : function() {
  1731. delete this._default_headers;
  1732. this._default_headers = {};
  1733. this._has_default_headers = false
  1734. },
  1735. setForm : function(J, E, B) {
  1736. this.resetFormState();
  1737. var I;
  1738. if (typeof J == "string") {
  1739. I = (document.getElementById(J) || document.forms[J])
  1740. } else {
  1741. if (typeof J == "object") {
  1742. I = J
  1743. } else {
  1744. return
  1745. }
  1746. }
  1747. if (E) {
  1748. this.createFrame(B ? B : null);
  1749. this._isFormSubmit = true;
  1750. this._isFileUpload = true;
  1751. this._formNode = I;
  1752. return
  1753. }
  1754. var A, H, F, K;
  1755. var G = false;
  1756. for (var D = 0; D < I.elements.length; D++) {
  1757. A = I.elements[D];
  1758. K = I.elements[D].disabled;
  1759. H = I.elements[D].name;
  1760. F = I.elements[D].value;
  1761. if (!K && H) {
  1762. switch (A.type) {
  1763. case "select-one" :
  1764. case "select-multiple" :
  1765. for (var C = 0; C < A.options.length; C++) {
  1766. if (A.options[C].selected) {
  1767. if (window.ActiveXObject) {
  1768. this._sFormData += encodeURIComponent(H)
  1769. + "="
  1770. + encodeURIComponent(A.options[C].attributes["value"].specified
  1771. ? A.options[C].value
  1772. : A.options[C].text) + "&"
  1773. } else {
  1774. this._sFormData += encodeURIComponent(H)
  1775. + "="
  1776. + encodeURIComponent(A.options[C]
  1777. .hasAttribute("value")
  1778. ? A.options[C].value
  1779. : A.options[C].text) + "&"
  1780. }
  1781. }
  1782. }
  1783. break;
  1784. case "radio" :
  1785. case "checkbox" :
  1786. if (A.checked) {
  1787. this._sFormData += encodeURIComponent(H) + "="
  1788. + encodeURIComponent(F) + "&"
  1789. }
  1790. break;
  1791. case "file" :
  1792. case undefined :
  1793. case "reset" :
  1794. case "button" :
  1795. break;
  1796. case "submit" :
  1797. if (G == false) {
  1798. this._sFormData += encodeURIComponent(H) + "="
  1799. + encodeURIComponent(F) + "&";
  1800. G = true
  1801. }
  1802. break;
  1803. default :
  1804. this._sFormData += encodeURIComponent(H) + "="
  1805. + encodeURIComponent(F) + "&";
  1806. break
  1807. }
  1808. }
  1809. }
  1810. this._isFormSubmit = true;
  1811. this._sFormData = this._sFormData.substr(0, this._sFormData.length - 1);
  1812. return this._sFormData
  1813. },
  1814. resetFormState : function() {
  1815. this._isFormSubmit = false;
  1816. this._isFileUpload = false;
  1817. this._formNode = null;
  1818. this._sFormData = ""
  1819. },
  1820. createFrame : function(A) {
  1821. var B = "yuiIO" + this._transaction_id;
  1822. if (window.ActiveXObject) {
  1823. var C = document.createElement("<iframe id=\"" + B + "\" name=\""
  1824. + B + "\" />");
  1825. if (typeof A == "boolean") {
  1826. C.src = "javascript:false"
  1827. } else {
  1828. if (typeof secureURI == "string") {
  1829. C.src = A
  1830. }
  1831. }
  1832. } else {
  1833. var C = document.createElement("iframe");
  1834. C.id = B;
  1835. C.name = B
  1836. }
  1837. C.style.position = "absolute";
  1838. C.style.top = "-1000px";
  1839. C.style.left = "-1000px";
  1840. document.body.appendChild(C)
  1841. },
  1842. appendPostData : function(A) {
  1843. var D = [];
  1844. var B = A.split("&");
  1845. for (var C = 0; C < B.length; C++) {
  1846. var E = B[C].indexOf("=");
  1847. if (E != -1) {
  1848. D[C] = document.createElement("input");
  1849. D[C].type = "hidden";
  1850. D[C].name = B[C].substring(0, E);
  1851. D[C].value = B[C].substring(E + 1);
  1852. this._formNode.appendChild(D[C])
  1853. }
  1854. }
  1855. return D
  1856. },
  1857. uploadFile : function(A, I, C, B) {
  1858. var F = "yuiIO" + A;
  1859. var G = "multipart/form-data";
  1860. var H = document.getElementById(F);
  1861. this._formNode.action = C;
  1862. this._formNode.method = "POST";
  1863. this._formNode.target = F;
  1864. if (this._formNode.encoding) {
  1865. this._formNode.encoding = G
  1866. } else {
  1867. this._formNode.enctype = G
  1868. }
  1869. if (B) {
  1870. var J = this.appendPostData(B)
  1871. }
  1872. this._formNode.submit();
  1873. if (J && J.length > 0) {
  1874. for (var E = 0; E < J.length; E++) {
  1875. this._formNode.removeChild(J[E])
  1876. }
  1877. }
  1878. this.resetFormState();
  1879. var D = function() {
  1880. var L = {};
  1881. L.tId = A;
  1882. L.argument = I.argument;
  1883. try {
  1884. L.responseText = H.contentWindow.document.body
  1885. ? H.contentWindow.document.body.innerHTML
  1886. : null;
  1887. L.responseXML = H.contentWindow.document.XMLDocument
  1888. ? H.contentWindow.document.XMLDocument
  1889. : H.contentWindow.document
  1890. } catch (K) {
  1891. }
  1892. if (I && I.upload) {
  1893. if (!I.scope) {
  1894. I.upload(L)
  1895. } else {
  1896. I.upload.apply(I.scope, [L])
  1897. }
  1898. }
  1899. if (YAHOO.util.Event) {
  1900. YAHOO.util.Event.removeListener(H, "load", D)
  1901. } else {
  1902. if (window.detachEvent) {
  1903. H.detachEvent("onload", D)
  1904. } else {
  1905. H.removeEventListener("load", D, false)
  1906. }
  1907. }
  1908. setTimeout(function() {
  1909. document.body.removeChild(H)
  1910. }, 100)
  1911. };
  1912. if (YAHOO.util.Event) {
  1913. YAHOO.util.Event.addListener(H, "load", D)
  1914. } else {
  1915. if (window.attachEvent) {
  1916. H.attachEvent("onload", D)
  1917. } else {
  1918. H.addEventListener("load", D, false)
  1919. }
  1920. }
  1921. },
  1922. abort : function(B, C, A) {
  1923. if (this.isCallInProgress(B)) {
  1924. B.conn.abort();
  1925. window.clearInterval(this._poll[B.tId]);
  1926. delete this._poll[B.tId];
  1927. if (A) {
  1928. delete this._timeOut[B.tId]
  1929. }
  1930. this.handleTransactionResponse(B, C, true);
  1931. return true
  1932. } else {
  1933. return false
  1934. }
  1935. },
  1936. isCallInProgress : function(A) {
  1937. if (A.conn) {
  1938. return A.conn.readyState != 4 && A.conn.readyState != 0
  1939. } else {
  1940. return false
  1941. }
  1942. },
  1943. releaseObject : function(A) {
  1944. A.conn = null;
  1945. A = null
  1946. }
  1947. };
  1948. YAHOO.register("connection", YAHOO.widget.Module, {
  1949. version : "2.2.0",
  1950. build : "127"
  1951. });
  1952. YAHOO.util.Anim = function(B, A, C, D) {
  1953. if (B) {
  1954. this.init(B, A, C, D)
  1955. }
  1956. };
  1957. YAHOO.util.Anim.prototype = {
  1958. toString : function() {
  1959. var A = this.getEl();
  1960. var B = A.id || A.tagName;
  1961. return ("Anim " + B)
  1962. },
  1963. patterns : {
  1964. noNegatives : /width|height|opacity|padding/i,
  1965. offsetAttribute : /^((width|height)|(top|left))$/,
  1966. defaultUnit : /width|height|top$|bottom$|left$|right$/i,
  1967. offsetUnit : /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i
  1968. },
  1969. doMethod : function(A, C, B) {
  1970. return this.method(this.currentFrame, C, B - C, this.totalFrames)
  1971. },
  1972. setAttribute : function(A, C, B) {
  1973. if (this.patterns.noNegatives.test(A)) {
  1974. C = (C > 0) ? C : 0
  1975. }
  1976. YAHOO.util.Dom.setStyle(this.getEl(), A, C + B)
  1977. },
  1978. getAttribute : function(A) {
  1979. var C = this.getEl();
  1980. var E = YAHOO.util.Dom.getStyle(C, A);
  1981. if (E !== "auto" && !this.patterns.offsetUnit.test(E)) {
  1982. return parseFloat(E)
  1983. }
  1984. var B = this.patterns.offsetAttribute.exec(A) || [];
  1985. var F = !!(B[3]);
  1986. var D = !!(B[2]);
  1987. if (D || (YAHOO.util.Dom.getStyle(C, "position") == "absolute" && F)) {
  1988. E = C["offset" + B[0].charAt(0).toUpperCase() + B[0].substr(1)]
  1989. } else {
  1990. E = 0
  1991. }
  1992. return E
  1993. },
  1994. getDefaultUnit : function(A) {
  1995. if (this.patterns.defaultUnit.test(A)) {
  1996. return "px"
  1997. }
  1998. return ""
  1999. },
  2000. setRuntimeAttribute : function(B) {
  2001. var G;
  2002. var C;
  2003. var D = this.attributes;
  2004. this.runtimeAttributes[B] = {};
  2005. var F = function(H) {
  2006. return (typeof H !== "undefined")
  2007. };
  2008. if (!F(D[B]["to"]) && !F(D[B]["by"])) {
  2009. return false
  2010. }
  2011. G = (F(D[B]["from"])) ? D[B]["from"] : this.getAttribute(B);
  2012. if (F(D[B]["to"])) {
  2013. C = D[B]["to"]
  2014. } else {
  2015. if (F(D[B]["by"])) {
  2016. if (G.constructor == Array) {
  2017. C = [];
  2018. for (var E = 0, A = G.length; E < A; ++E) {
  2019. C[E] = G[E] + D[B]["by"][E]
  2020. }
  2021. } else {
  2022. C = G + D[B]["by"]
  2023. }
  2024. }
  2025. }
  2026. this.runtimeAttributes[B].start = G;
  2027. this.runtimeAttributes[B].end = C;
  2028. this.runtimeAttributes[B].unit = (F(D[B].unit)) ? D[B]["unit"] : this
  2029. .getDefaultUnit(B)
  2030. },
  2031. init : function(C, H, G, A) {
  2032. var B = false;
  2033. var D = null;
  2034. var F = 0;
  2035. C = YAHOO.util.Dom.get(C);
  2036. this.attributes = H || {};
  2037. this.duration = G || 1;
  2038. this.method = A || YAHOO.util.Easing.easeNone;
  2039. this.useSeconds = true;
  2040. this.currentFrame = 0;
  2041. this.totalFrames = YAHOO.util.AnimMgr.fps;
  2042. this.getEl = function() {
  2043. return C
  2044. };
  2045. this.isAnimated = function() {
  2046. return B
  2047. };
  2048. this.getStartTime = function() {
  2049. return D
  2050. };
  2051. this.runtimeAttributes = {};
  2052. this.animate = function() {
  2053. if (this.isAnimated()) {
  2054. return false
  2055. }
  2056. this.currentFrame = 0;
  2057. this.totalFrames = (this.useSeconds)
  2058. ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration)
  2059. : this.duration;
  2060. YAHOO.util.AnimMgr.registerElement(this)
  2061. };
  2062. this.stop = function(K) {
  2063. if (K) {
  2064. this.currentFrame = this.totalFrames;
  2065. this._onTween.fire()
  2066. }
  2067. YAHOO.util.AnimMgr.stop(this)
  2068. };
  2069. var J = function() {
  2070. this.onStart.fire();
  2071. this.runtimeAttributes = {};
  2072. for (var K in this.attributes) {
  2073. this.setRuntimeAttribute(K)
  2074. }
  2075. B = true;
  2076. F = 0;
  2077. D = allGetServerTime()
  2078. };
  2079. var I = function() {
  2080. var M = {
  2081. duration : allGetServerTime() - this.getStartTime(),
  2082. currentFrame : this.currentFrame
  2083. };
  2084. M.toString = function() {
  2085. return ("duration: " + M.duration + ", currentFrame: " + M.currentFrame)
  2086. };
  2087. this.onTween.fire(M);
  2088. var L = this.runtimeAttributes;
  2089. for (var K in L) {
  2090. this.setAttribute(K, this.doMethod(K, L[K].start, L[K].end),
  2091. L[K].unit)
  2092. }
  2093. F += 1
  2094. };
  2095. var E = function() {
  2096. var K = (allGetServerTime() - D) / 1000;
  2097. var L = {
  2098. duration : K,
  2099. frames : F,
  2100. fps : F / K
  2101. };
  2102. L.toString = function() {
  2103. return ("duration: " + L.duration + ", frames: " + L.frames
  2104. + ", fps: " + L.fps)
  2105. };
  2106. B = false;
  2107. F = 0;
  2108. this.onComplete.fire(L)
  2109. };
  2110. this._onStart = new YAHOO.util.CustomEvent("_start", this, true);
  2111. this.onStart = new YAHOO.util.CustomEvent("start", this);
  2112. this.onTween = new YAHOO.util.CustomEvent("tween", this);
  2113. this._onTween = new YAHOO.util.CustomEvent("_tween", this, true);
  2114. this.onComplete = new YAHOO.util.CustomEvent("complete", this);
  2115. this._onComplete = new YAHOO.util.CustomEvent("_complete", this, true);
  2116. this._onStart.subscribe(J);
  2117. this._onTween.subscribe(I);
  2118. this._onComplete.subscribe(E)
  2119. }
  2120. };
  2121. YAHOO.util.AnimMgr = new function() {
  2122. var C = null;
  2123. var B = [];
  2124. var A = 0;
  2125. this.fps = 1000;
  2126. this.delay = 1;
  2127. this.registerElement = function(F) {
  2128. B[B.length] = F;
  2129. A += 1;
  2130. F._onStart.fire();
  2131. this.start()
  2132. };
  2133. this.unRegister = function(G, F) {
  2134. G._onComplete.fire();
  2135. F = F || E(G);
  2136. if (F != -1) {
  2137. B.splice(F, 1)
  2138. }
  2139. A -= 1;
  2140. if (A <= 0) {
  2141. this.stop()
  2142. }
  2143. };
  2144. this.start = function() {
  2145. if (C === null) {
  2146. C = setInterval(this.run, this.delay)
  2147. }
  2148. };
  2149. this.stop = function(H) {
  2150. if (!H) {
  2151. clearInterval(C);
  2152. for (var G = 0, F = B.length; G < F; ++G) {
  2153. if (B[0].isAnimated()) {
  2154. this.unRegister(B[0], 0)
  2155. }
  2156. }
  2157. B = [];
  2158. C = null;
  2159. A = 0
  2160. } else {
  2161. this.unRegister(H)
  2162. }
  2163. };
  2164. this.run = function() {
  2165. for (var H = 0, F = B.length; H < F; ++H) {
  2166. var G = B[H];
  2167. if (!G || !G.isAnimated()) {
  2168. continue
  2169. }
  2170. if (G.currentFrame < G.totalFrames || G.totalFrames === null) {
  2171. G.currentFrame += 1;
  2172. if (G.useSeconds) {
  2173. D(G)
  2174. }
  2175. G._onTween.fire()
  2176. } else {
  2177. YAHOO.util.AnimMgr.stop(G, H)
  2178. }
  2179. }
  2180. };
  2181. var E = function(H) {
  2182. for (var G = 0, F = B.length; G < F; ++G) {
  2183. if (B[G] == H) {
  2184. return G
  2185. }
  2186. }
  2187. return -1
  2188. };
  2189. var D = function(G) {
  2190. var J = G.totalFrames;
  2191. var I = G.currentFrame;
  2192. var H = (G.currentFrame * G.duration * 1000 / G.totalFrames);
  2193. var F = (allGetServerTime() - G.getStartTime());
  2194. var K = 0;
  2195. if (F < G.duration * 1000) {
  2196. K = Math.round((F / H - 1) * G.currentFrame)
  2197. } else {
  2198. K = J - (I + 1)
  2199. }
  2200. if (K > 0 && isFinite(K)) {
  2201. if (G.currentFrame + K >= J) {
  2202. K = J - (I + 1)
  2203. }
  2204. G.currentFrame += K
  2205. }
  2206. }
  2207. };
  2208. YAHOO.util.Bezier = new function() {
  2209. this.getPosition = function(E, D) {
  2210. var F = E.length;
  2211. var C = [];
  2212. for (var B = 0; B < F; ++B) {
  2213. C[B] = [E[B][0], E[B][1]]
  2214. }
  2215. for (var A = 1; A < F; ++A) {
  2216. for (B = 0; B < F - A; ++B) {
  2217. C[B][0] = (1 - D) * C[B][0] + D * C[parseInt(B + 1, 10)][0];
  2218. C[B][1] = (1 - D) * C[B][1] + D * C[parseInt(B + 1, 10)][1]
  2219. }
  2220. }
  2221. return [C[0][0], C[0][1]]
  2222. }
  2223. };
  2224. (function() {
  2225. YAHOO.util.ColorAnim = function(E, D, F, G) {
  2226. YAHOO.util.ColorAnim.superclass.constructor.call(this, E, D, F, G)
  2227. };
  2228. YAHOO.extend(YAHOO.util.ColorAnim, YAHOO.util.Anim);
  2229. var B = YAHOO.util;
  2230. var C = B.ColorAnim.superclass;
  2231. var A = B.ColorAnim.prototype;
  2232. A.toString = function() {
  2233. var D = this.getEl();
  2234. var E = D.id || D.tagName;
  2235. return ("ColorAnim " + E)
  2236. };
  2237. A.patterns.color = /color$/i;
  2238. A.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;
  2239. A.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;
  2240. A.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
  2241. A.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/;
  2242. A.parseColor = function(D) {
  2243. if (D.length == 3) {
  2244. return D
  2245. }
  2246. var E = this.patterns.hex.exec(D);
  2247. if (E && E.length == 4) {
  2248. return [parseInt(E[1], 16), parseInt(E[2], 16), parseInt(E[3], 16)]
  2249. }
  2250. E = this.patterns.rgb.exec(D);
  2251. if (E && E.length == 4) {
  2252. return [parseInt(E[1], 10), parseInt(E[2], 10), parseInt(E[3], 10)]
  2253. }
  2254. E = this.patterns.hex3.exec(D);
  2255. if (E && E.length == 4) {
  2256. return [parseInt(E[1] + E[1], 16), parseInt(E[2] + E[2], 16),
  2257. parseInt(E[3] + E[3], 16)]
  2258. }
  2259. return null
  2260. };
  2261. A.getAttribute = function(D) {
  2262. var F = this.getEl();
  2263. if (this.patterns.color.test(D)) {
  2264. var G = YAHOO.util.Dom.getStyle(F, D);
  2265. if (this.patterns.transparent.test(G)) {
  2266. var E = F.parentNode;
  2267. G = B.Dom.getStyle(E, D);
  2268. while (E && this.patterns.transparent.test(G)) {
  2269. E = E.parentNode;
  2270. G = B.Dom.getStyle(E, D);
  2271. if (E.tagName.toUpperCase() == "HTML") {
  2272. G = "#fff"
  2273. }
  2274. }
  2275. }
  2276. } else {
  2277. G = C.getAttribute.call(this, D)
  2278. }
  2279. return G
  2280. };
  2281. A.doMethod = function(E, I, F) {
  2282. var H;
  2283. if (this.patterns.color.test(E)) {
  2284. H = [];
  2285. for (var G = 0, D = I.length; G < D; ++G) {
  2286. H[G] = C.doMethod.call(this, E, I[G], F[G])
  2287. }
  2288. H = "rgb(" + Math.floor(H[0]) + "," + Math.floor(H[1]) + ","
  2289. + Math.floor(H[2]) + ")"
  2290. } else {
  2291. H = C.doMethod.call(this, E, I, F)
  2292. }
  2293. return H
  2294. };
  2295. A.setRuntimeAttribute = function(E) {
  2296. C.setRuntimeAttribute.call(this, E);
  2297. if (this.patterns.color.test(E)) {
  2298. var G = this.attributes;
  2299. var I = this.parseColor(this.runtimeAttributes[E].start);
  2300. var F = this.parseColor(this.runtimeAttributes[E].end);
  2301. if (typeof G[E]["to"] === "undefined"
  2302. && typeof G[E]["by"] !== "undefined") {
  2303. F = this.parseColor(G[E].by);
  2304. for (var H = 0, D = I.length; H < D; ++H) {
  2305. F[H] = I[H] + F[H]
  2306. }
  2307. }
  2308. this.runtimeAttributes[E].start = I;
  2309. this.runtimeAttributes[E].end = F
  2310. }
  2311. }
  2312. })();
  2313. YAHOO.util.Easing = {
  2314. easeNone : function(B, A, D, C) {
  2315. return D * B / C + A
  2316. },
  2317. easeIn : function(B, A, D, C) {
  2318. return D * (B /= C) * B + A
  2319. },
  2320. easeOut : function(B, A, D, C) {
  2321. return -D * (B /= C) * (B - 2) + A
  2322. },
  2323. easeBoth : function(B, A, D, C) {
  2324. if ((B /= C / 2) < 1) {
  2325. return D / 2 * B * B + A
  2326. }
  2327. return -D / 2 * ((--B) * (B - 2) - 1) + A
  2328. },
  2329. easeInStrong : function(B, A, D, C) {
  2330. return D * (B /= C) * B * B * B + A
  2331. },
  2332. easeOutStrong : function(B, A, D, C) {
  2333. return -D * ((B = B / C - 1) * B * B * B - 1) + A
  2334. },
  2335. easeBothStrong : function(B, A, D, C) {
  2336. if ((B /= C / 2) < 1) {
  2337. return D / 2 * B * B * B * B + A
  2338. }
  2339. return -D / 2 * ((B -= 2) * B * B * B - 2) + A
  2340. },
  2341. elasticIn : function(C, A, G, F, B, E) {
  2342. if (C == 0) {
  2343. return A
  2344. }
  2345. if ((C /= F) == 1) {
  2346. return A + G
  2347. }
  2348. if (!E) {
  2349. E = F * 0.3
  2350. }
  2351. if (!B || B < Math.abs(G)) {
  2352. B = G;
  2353. var D = E / 4
  2354. } else {
  2355. var D = E / (2 * Math.PI) * Math.asin(G / B)
  2356. }
  2357. return -(B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D)
  2358. * (2 * Math.PI) / E))
  2359. + A
  2360. },
  2361. elasticOut : function(C, A, G, F, B, E) {
  2362. if (C == 0) {
  2363. return A
  2364. }
  2365. if ((C /= F) == 1) {
  2366. return A + G
  2367. }
  2368. if (!E) {
  2369. E = F * 0.3
  2370. }
  2371. if (!B || B < Math.abs(G)) {
  2372. B = G;
  2373. var D = E / 4
  2374. } else {
  2375. var D = E / (2 * Math.PI) * Math.asin(G / B)
  2376. }
  2377. return B * Math.pow(2, -10 * C)
  2378. * Math.sin((C * F - D) * (2 * Math.PI) / E) + G + A
  2379. },
  2380. elasticBoth : function(C, A, G, F, B, E) {
  2381. if (C == 0) {
  2382. return A
  2383. }
  2384. if ((C /= F / 2) == 2) {
  2385. return A + G
  2386. }
  2387. if (!E) {
  2388. E = F * (0.3 * 1.5)
  2389. }
  2390. if (!B || B < Math.abs(G)) {
  2391. B = G;
  2392. var D = E / 4
  2393. } else {
  2394. var D = E / (2 * Math.PI) * Math.asin(G / B)
  2395. }
  2396. if (C < 1) {
  2397. return -0.5
  2398. * (B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D)
  2399. * (2 * Math.PI) / E)) + A
  2400. }
  2401. return B * Math.pow(2, -10 * (C -= 1))
  2402. * Math.sin((C * F - D) * (2 * Math.PI) / E) * 0.5 + G + A
  2403. },
  2404. backIn : function(B, A, E, D, C) {
  2405. if (typeof C == "undefined") {
  2406. C = 1.70158
  2407. }
  2408. return E * (B /= D) * B * ((C + 1) * B - C) + A
  2409. },
  2410. backOut : function(B, A, E, D, C) {
  2411. if (typeof C == "undefined") {
  2412. C = 1.70158
  2413. }
  2414. return E * ((B = B / D - 1) * B * ((C + 1) * B + C) + 1) + A
  2415. },
  2416. backBoth : function(B, A, E, D, C) {
  2417. if (typeof C == "undefined") {
  2418. C = 1.70158
  2419. }
  2420. if ((B /= D / 2) < 1) {
  2421. return E / 2 * (B * B * (((C *= (1.525)) + 1) * B - C)) + A
  2422. }
  2423. return E / 2 * ((B -= 2) * B * (((C *= (1.525)) + 1) * B + C) + 2) + A
  2424. },
  2425. bounceIn : function(B, A, D, C) {
  2426. return D - YAHOO.util.Easing.bounceOut(C - B, 0, D, C) + A
  2427. },
  2428. bounceOut : function(B, A, D, C) {
  2429. if ((B /= C) < (1 / 2.75)) {
  2430. return D * (7.5625 * B * B) + A
  2431. } else {
  2432. if (B < (2 / 2.75)) {
  2433. return D * (7.5625 * (B -= (1.5 / 2.75)) * B + 0.75) + A
  2434. } else {
  2435. if (B < (2.5 / 2.75)) {
  2436. return D * (7.5625 * (B -= (2.25 / 2.75)) * B + 0.9375) + A
  2437. }
  2438. }
  2439. }
  2440. return D * (7.5625 * (B -= (2.625 / 2.75)) * B + 0.984375) + A
  2441. },
  2442. bounceBoth : function(B, A, D, C) {
  2443. if (B < C / 2) {
  2444. return YAHOO.util.Easing.bounceIn(B * 2, 0, D, C) * 0.5 + A
  2445. }
  2446. return YAHOO.util.Easing.bounceOut(B * 2 - C, 0, D, C) * 0.5 + D * 0.5
  2447. + A
  2448. }
  2449. };
  2450. (function() {
  2451. YAHOO.util.Motion = function(G, F, H, I) {
  2452. if (G) {
  2453. YAHOO.util.Motion.superclass.constructor.call(this, G, F, H, I)
  2454. }
  2455. };
  2456. YAHOO.extend(YAHOO.util.Motion, YAHOO.util.ColorAnim);
  2457. var D = YAHOO.util;
  2458. var E = D.Motion.superclass;
  2459. var B = D.Motion.prototype;
  2460. B.toString = function() {
  2461. var F = this.getEl();
  2462. var G = F.id || F.tagName;
  2463. return ("Motion " + G)
  2464. };
  2465. B.patterns.points = /^points$/i;
  2466. B.setAttribute = function(F, H, G) {
  2467. if (this.patterns.points.test(F)) {
  2468. G = G || "px";
  2469. E.setAttribute.call(this, "left", H[0], G);
  2470. E.setAttribute.call(this, "top", H[1], G)
  2471. } else {
  2472. E.setAttribute.call(this, F, H, G)
  2473. }
  2474. };
  2475. B.getAttribute = function(F) {
  2476. if (this.patterns.points.test(F)) {
  2477. var G = [E.getAttribute.call(this, "left"),
  2478. E.getAttribute.call(this, "top")]
  2479. } else {
  2480. G = E.getAttribute.call(this, F)
  2481. }
  2482. return G
  2483. };
  2484. B.doMethod = function(F, J, G) {
  2485. var I = null;
  2486. if (this.patterns.points.test(F)) {
  2487. var H = this.method(this.currentFrame, 0, 100, this.totalFrames)
  2488. / 100;
  2489. I = D.Bezier.getPosition(this.runtimeAttributes[F], H)
  2490. } else {
  2491. I = E.doMethod.call(this, F, J, G)
  2492. }
  2493. return I
  2494. };
  2495. B.setRuntimeAttribute = function(O) {
  2496. if (this.patterns.points.test(O)) {
  2497. var G = this.getEl();
  2498. var I = this.attributes;
  2499. var F;
  2500. var K = I["points"]["control"] || [];
  2501. var H;
  2502. var L, N;
  2503. if (K.length > 0 && !(K[0] instanceof Array)) {
  2504. K = [K]
  2505. } else {
  2506. var J = [];
  2507. for (L = 0, N = K.length; L < N; ++L) {
  2508. J[L] = K[L]
  2509. }
  2510. K = J
  2511. }
  2512. if (D.Dom.getStyle(G, "position") == "static") {
  2513. D.Dom.setStyle(G, "position", "relative")
  2514. }
  2515. if (C(I["points"]["from"])) {
  2516. D.Dom.setXY(G, I["points"]["from"])
  2517. } else {
  2518. D.Dom.setXY(G, D.Dom.getXY(G))
  2519. }
  2520. F = this.getAttribute("points");
  2521. if (C(I["points"]["to"])) {
  2522. H = A.call(this, I["points"]["to"], F);
  2523. var M = D.Dom.getXY(this.getEl());
  2524. for (L = 0, N = K.length; L < N; ++L) {
  2525. K[L] = A.call(this, K[L], F)
  2526. }
  2527. } else {
  2528. if (C(I["points"]["by"])) {
  2529. H = [F[0] + I["points"]["by"][0],
  2530. F[1] + I["points"]["by"][1]];
  2531. for (L = 0, N = K.length; L < N; ++L) {
  2532. K[L] = [F[0] + K[L][0], F[1] + K[L][1]]
  2533. }
  2534. }
  2535. }
  2536. this.runtimeAttributes[O] = [F];
  2537. if (K.length > 0) {
  2538. this.runtimeAttributes[O] = this.runtimeAttributes[O].concat(K)
  2539. }
  2540. this.runtimeAttributes[O][this.runtimeAttributes[O].length] = H
  2541. } else {
  2542. E.setRuntimeAttribute.call(this, O)
  2543. }
  2544. };
  2545. var A = function(F, H) {
  2546. var G = D.Dom.getXY(this.getEl());
  2547. F = [F[0] - G[0] + H[0], F[1] - G[1] + H[1]];
  2548. return F
  2549. };
  2550. var C = function(F) {
  2551. return (typeof F !== "undefined")
  2552. }
  2553. })();
  2554. (function() {
  2555. YAHOO.util.Scroll = function(E, D, F, G) {
  2556. if (E) {
  2557. YAHOO.util.Scroll.superclass.constructor.call(this, E, D, F, G)
  2558. }
  2559. };
  2560. YAHOO.extend(YAHOO.util.Scroll, YAHOO.util.ColorAnim);
  2561. var B = YAHOO.util;
  2562. var C = B.Scroll.superclass;
  2563. var A = B.Scroll.prototype;
  2564. A.toString = function() {
  2565. var D = this.getEl();
  2566. var E = D.id || D.tagName;
  2567. return ("Scroll " + E)
  2568. };
  2569. A.doMethod = function(D, G, E) {
  2570. var F = null;
  2571. if (D == "scroll") {
  2572. F = [
  2573. this.method(this.currentFrame, G[0], E[0] - G[0],
  2574. this.totalFrames),
  2575. this.method(this.currentFrame, G[1], E[1] - G[1],
  2576. this.totalFrames)]
  2577. } else {
  2578. F = C.doMethod.call(this, D, G, E)
  2579. }
  2580. return F
  2581. };
  2582. A.getAttribute = function(D) {
  2583. var F = null;
  2584. var E = this.getEl();
  2585. if (D == "scroll") {
  2586. F = [E.scrollLeft, E.scrollTop]
  2587. } else {
  2588. F = C.getAttribute.call(this, D)
  2589. }
  2590. return F
  2591. };
  2592. A.setAttribute = function(D, G, F) {
  2593. var E = this.getEl();
  2594. if (D == "scroll") {
  2595. E.scrollLeft = G[0];
  2596. E.scrollTop = G[1]
  2597. } else {
  2598. C.setAttribute.call(this, D, G, F)
  2599. }
  2600. }
  2601. })();
  2602. YAHOO.register("animation", YAHOO.util.Anim, {
  2603. version : "2.2.0",
  2604. build : "127"
  2605. });