From: =?Windows-1252?Q?Enregistr=E9_par_Windows_Internet_Explorer_8?= Subject: Catalogue collectif Date: Mon, 25 Jan 2010 17:17:42 +0100 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_0000_01CA9DE2.4D9C5060" X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7600.16385 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Location: http://opac.rero.ch/gateway?skin=uc&lng=fr-ch&inst=consortium&host=virtua.rero.ch%2b8801%2bDEFAULT&search=KEYWORD&function=CARDSCR&SourceScreen=INITREQ&elementcount=3&t1=Soci%c3%a9t%c3%a9%20d%27%c3%a9mulation%20industrielle&u1=1035&pos=9&itempos=1&rootsearch=KEYWORD =EF=BB=BF Catalogue collectif
FR | DE | EN=20        Aide | Quitter =
3Dexclamation=20
Pour b=C3=A9n=C3=A9ficier de toutes les = fonctionnalit=C3=A9s de=20 ce catalogue, veuillez activer les cookies de votre=20 navigateur.
3Dexclamation=20
Recherche=20 Espace=20 personnel=20 Autres=20 Catalogues RERO Ressources=20 =C3=A9lectroniques Autres=20 ressources Services=20 en ligne
Format complet
D=C3=A9but=20 de la liste     Ecran=20 pr=C3=A9c=C3=A9dent     Ecran=20 suivant     Fin=20 de la liste
Notice et=20 biblioth=C3=A8que(s)  Format=20 MARC
Notice 9 sur 10
Votre recherche: - Partout: Soci=C3=A9t=C3=A9 = d'=C3=A9mulation=20 industrielle
Titre [Pi=C3=A8ces=20 diverses concernant les expositions industrielles = locales]=20
Lieu / Dates = La Chaux-de-Fonds, 1879-1892
Collation 1 portefeuille (5 pi=C3=A8ces) ; 30 cm
Note Exposition. La Chaux-de-Fonds. 1879
Note Exposition. La Chaux-de-Fonds. 1892
Contient 1 et 4: Rapport du jury nomm=C3=A9 par la Soci=C3=A9t=C3=A9 d'=C3=A9mulation = industrielle de La Chaux-de-Fonds = pour=20 appr=C3=A9cier les produits envoy=C3=A9s =C3=A0 l'exposition = industrielle locale de septembre = 1879 ; 2:=20 Convocation =C3=A0 une r=C3=A9union de la Commission = d'organisation 1892 ; 3:=20 Liste des prix d=C3=A9cern=C3=A9s par le jury ; 5: Rapport = sur l'exposition=20 industrielle de La = Chaux-de-Fonds,=20 section des machines
No RERO R274099560
Autre auteur = Soci=C3=A9t=C3=A9 d'=C3=A9mulation = industrielle (La = Chaux-de-Fonds)
Autre auteur = E= xposition=20 industrielle (1879 : La=20 Chaux-de-Fonds)
Autre auteur = E= xposition=20 industrielle (1892 : La=20 Chaux-de-Fonds)
Poss=C3=A9d=C3=A9 par R=C3=A9sea= u=20 des biblioth=C3=A8ques neuch=C3=A2teloises et = jurassiennes
=20 =
=20 =20
=20



Tous droits r=C3=A9serv=C3=A9s =C2=A9 2007 , RERO
Powered by: iPortal, VTLS Inc Informations=20 techniques
------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: image/png Content-Transfer-Encoding: base64 Content-Location: http://opac.rero.ch/gw_48_1_10m/html/uc/fr-ch/common_files/images/exclamation.png iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJPSURBVDjLpZPLS5RhFMYfv9QJlelTQZwR b2OKlKuINuHGLlBEBEOLxAu46oL0F0QQFdWizUCrWnjBaDHgThCMoiKkhUONTqmjmDp2GZ0UnWbm fc/ztrC+GbM2dXbv4ZzfeQ7vefKMMfifyP89IbevNNCYdkN2kawkCZKfSPZTOGTf6Y/m1uflKlC3 LvsNTWArr9BT2LAf+W73dn5jHclIBFZyfYWU3or7T4K7AJmbl/yG7EtX1BQXNTVCYgtgbAEAYHlq YHlrsTEVQWr63RZFuqsfDAcdQPrGRR/JF5nKGm9xUxMyr0YBAEXXHgIANq/3ADQobD2J9fAkNiMT MSFb9z8ambMAQER3JC1XttkYGGZXoyZEGyTHRuBuPgBTUu7VSnUAgAUAWutOV2MjZGkehgYUA6O5 A0AlkAyRnotiX3MLlFKduYCqAtuGXpyH0XQmOj+TIURt51OzURTYZdBKV2UBSsOIcRp/TVTT4ewK 6idECAihtUKOArWcjq/B8tQ6UkUR31+OYXP4sTOdisivrkMyHodWejlXwcC38Fvs8dY5xaIId89V lJy7ACpCNCFCuOp8+BJ6A631gANQSg1mVmOxxGQYRW2nHMha4B5WA3chsv22T5/B13AIicWZmNZ6 cMchTXUe81Okzz54pLi0uQWp+TmkZqMwxsBV74Or3od4OISPr0e3SHa3PX0f3HXKofNH/UIG9pZ5 PeUth+CyS2EMkEqs4fPEOBJLsyske48/+xD8oxcAYPzs4QaS7RR2kbLTTOTQieczfzfTv8QPldGv TGoF6/8AAAAASUVORK5CYII= ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: image/png Content-Transfer-Encoding: base64 Content-Location: http://opac.rero.ch/gw_48_1_10m/html/uc/fr-ch/common_files/images/help.png iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAKkSURBVDjLpZPdT5JhGMb9W+BPaK3matVq ndXWOOigA6fmJ9DUcrUMlrN0mNMsKTUznQpq6pyKAm8CIogmypcg8GIiX8rHRHjhVbPt6o01nMvZ Wge/k3vP9duuZ/edAyDnf/hjoCMP2Vr3gUDj3CdV6zT1xZ6iFDaKnLEkBFOmPfaZArWT5sw60iFP +BAbOzTcQSqDZzsNRyCNkcVoaGghzDlVQKylOHJrMrUZ2Yf52y6kc36IxpyoH1lHF7EBgyMKV4jC J5U/1UVscU4IZOYEa3I1HtwI01hwxlDLhDoJD/wxGr5YGmOLAdRIrVCuhmD3JdA6SQabx12srGB0 KSpc86ew4olDOGjH4x4z0gdHDD9+c4TaQQtq+k2Yt0egXYugTmoVZgV9cyHSxXTtJjZR3WNCVfcK /NE0ppYDUNu2QTMCtS0IbrsOrVMOWL27eNJtJLOCDoWXdgeTEEosqPxoBK/TwDzWY9rowy51gJ1d Gr2zLpS2aVH5QQ+Hbw88sZ7OClrGXbQrkMTTAQu4HXqUv9eh7J0OSfo7tiIU+GItilpUuM/AF2tg 98eR36Q+FryQ2kjbVhximQu8dgPKxPMoeTuH4tfqDIWvCBQ2KlDQKEe9dBlGTwR36+THFZg+QoUx AL0jgsoOQzYYS+wjskcjTzSToVAkA7Hqg4Spc6tm4vgT+eIFVvmb+eCSMwLlih/cNg0KmpRoGzdl +BXOb5jAsMYNjSWAm9VjwesPR1knFilPNMu510CkdPZtqK1BvJQsoaRZjqLGaTzv1UNp9EJl9uNq xefU5QdDnFNX+Y5Qxrn9bDLUR6zjqzsMizeWYdG5gy6ZDbk8aehiuYRz5jHdeDTKvlY1IrhSMUxe 4g9SuVwpdaFsgDxf2i84V9zH/us1/is/AdevBaK9Tb3EAAAAAElFTkSuQmCC ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: http://resolver.rero.ch/rero/sfx.gif R0lGODlhQwARAPf2AMbGxoyMjC4uLj4+Pjs7O5ubnHh4eMvLy7a2t8PDxB8fH+rq6ldXV21tbaio qcTExMXFxdDQ0SkpKR4eHnt7e7i4uJOTk35+fgAAAIKDg2tra7S0tG9vb9LS0oqKimJiY3R0dPvz 8ywsLJmZmTw8PH19fQ4ODlxcXA8PDx0dHdTU1Pj4+NfX16+wsLC2tbO2tuKfn8h3djg4OZ+7uxsb G7W1tcHBwcPDwzc3N9LS06+ys/37+8OdnODk5OHh4mhoae3Pz73Gxeje3nomKOTd39WhoYl4eXst LVtcXIsdHaEvL3x9ffTo6KUUFOrMzIolJb7GxqysrJGSkotgYUZGRvXk5JaWlncHB66vr9vP0LRo aIA7PHBxcbljY2BgYZ46OtmtrbpgX3V1dZF5eYYyMrJCQ9mqq5ssLK+vr5cpKa6ur243OJCQkcqg oPDb2/br68XOzrDS0vbs7L+npvHp6dvMzPv09CoqKqanp6amp92ur72+vtPU1LJyceeuroVrbIRu bcFwcNbIyfP4+M3NzX8FBZqamqJbXD09PZiYmWlCQpcsLK6urt+bnH5gYS0tLfDy8trb2/js7ZUe HpWhoDg4ONWUlHUtLodCQdCqqs2Iid3r7LxRUYAoKNbf329QUdTb25EDA8vMzIk7OqpjY8rb293P z58ZGisrK8m2t56enooODrNiY9uysqysrfLg4Jqbm71XV6WlpsRxcWMmJszMzIUHB5GRkapISLS0 tZycnHpDQ9K/u93d3YIJCaU3N4gNDciFhautrYlOTtGXl46Oj58iIqm7vdutrbq6uqGhoRwcHDo6 Or29vXR1da+wsfXw8IeNi7u7u76/wLCwsPf393wWF+G4uI0aGsRjY6ZdXJQFBa1MTJo+PmVlZZM1 NpqbnL6+vo8nKHp7e798fMfIyN7e3/r6+vDw8fb29unp6dHR0vz8/P39/b+/wP7+/qmqq5CRkqio qOPj46mpqf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAPYALAAAAABDABEA AAj/AFfMG0iwoMGDCBMqXKhwgT16yuRJnEixosWLGDNqxGhBRYBq9UKKHEmypMmTKEnuCBHiHUoI AAKknEmzpkg7QCzNCqRH0kmYAd4JHUq0qNGjSJMOrRLjjLUjmL6Rk3MUaLurWBkpwKBAFdavYMNe uBC2LFY3Sq4omuHJSSttvMo+iMmurl0UzdgRQtHLrt+/gAMLZvcmTKFPcWBweyIujRZogOcGOEe5 soIolA8sOLdggOfN0hQM0NVg8gEB50qUoNxAgIADrF3Dpnxt0pBjjcgAEjbnCzAelSvfiJmuuHEW SCYMMFRcw4h0I06kqzCheDkB6TR4SEeBQjp6iKaP//sunUX14sRWTdmUqdSgV3SQnRoFynhxGzHR 6dfv44H+DiJYgQ4JIhBAwA/obEDCfink8EgH6BhgQIQT7mdACgYSsB8Y2HSTBSRM+NFFHUU0sQUc ++kXTkzqtNiiKCbU0iIDGajDgBTqRLKHOlgw46I3YqDSIgggqJMBA+qg4Yw6tyCpTgsuCsGKLb9k g0snY5jCSSh/9OBii8nEZM6YZHqAgQzLSBCBORvQwMUdiZiDBw5k5mLCEmNywIE5EUjwQSV58Okn FV6QaQ4RhwyziyMuCBLLNrQEYeiYNcS0zqWYrpNAAQ5kuikClybQKaYFJHApAqBeWkCqqo6aaTCk tGdhhiZl+LIGOHxkeqkaMbnj66/ABivssMQW+2sqfSxiTBKXGKHDNMPKEhM81FZr7bXYZqvtttY+ 80I0lEDhyrawAGABG/Gkq+667Lbr7rvwxvtuMQCoQM+9+Oar77789uvvv/5Ss0JAADs= ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: image/png Content-Transfer-Encoding: base64 Content-Location: http://opac.rero.ch/gw_48_1_10m/html/uc/fr-ch/common_files/images/logo_rero.png iVBORw0KGgoAAAANSUhEUgAAAGkAAAAnCAIAAACDsvFxAAAABmJLR0QA/wAmAAAP50ahAAAACXBI WXMAAAsRAAALEQF/ZF+RAAAAB3RJTUUH0wcZADIcPj4IGgAADdhJREFUeJztWnlsXMd5n5l37r69 l/chiqRF2rTuUpZlq3Vgy5fgIJKdo5Dl1G4MC5FbNEgRFIkL1wHcok6B2BbcCDBiWIBVwUaVqpUh KRFJ3SJpSaEoXstruST3vvne2913v+kfT6ZpyYcqqZJo5If9Y973Zr6Z+eGb75i3EGMM/oTrArrd C1jE+KZx19c3u2PH3l/84sAtOE/fNO5CocyBA/1PPbUSQvj/PRf8hvm7QCCOEGxtrboFc33TuLuV IG/3Ar4G+/f/sbc3BABoaPDv3PnQwYOX9uzpGR9Prl5d/8EHL5AkYXVLJIQPPzx//PjY1FTaMPDS pf7Nm5dv377e47HPq4qklf0n0wAAAsHtj1YKJf0/OpJDoSKE8J9fbFxaxVrdVB33DPMn++cmo1JR Np12oqXO9vBab3urkyQ+5wfudO46OgLvvnsaALBhQ1MolHn77S7TxAAA08Tzjd/+9szPf34glyvO jwoE4keODO3adWzfvhfb2xssYTKv7u1IAgAoEtZXMLt+FxVKuvVKKBpWYzwi/cvemeFQceFhHAoV /+t0pr3V+Y/PNdSVM/PyRRMrhofj88QtxK9+9YedO/dZxK1aVbd9+/pNm+5hGBIAMDGR2rLlN6mU eMUQwwRv7Y/MEzePyaj04zfHhz5P3DwujIk/fnM8mlHmJXe63c1DECSSRFu3rtm6dbXTyebzJYJA Z89OvvrqQcMwGYZ8770fbtt2nxVep6bSTzyxa2IiFY3Ovf76oV27/nKhKtPEBclYWsU+8xfldeUM X9QrfZSqmf/0/jRf0AEACMEn7vNtedDvd1OJnPqfJ9InL81hDOJZ9fUPZn7zkxYrhi8a7gAAr776 1CuvbEboM6fz6193apoBAHj22fXPPrt+Xt7UVP7GG888/fRuAMCBA/1vvPGMzUYtVHX3Evs7f7fM 4/hs+6cuzY1HSlb7r5+s2vHtGoughkq2vdX5bx+GLV95flQcni4ub+TAIuLO47H97GePLSQOANDR EbAaDEPu2dOz8NW8+0sk+Kmp9L331ix8+1ePVy0kDgDQMyJYGUe1n/7hY5ULs0MCwb/ZWnuoNysp JgCge1hYZNzdc081y37OdrLZoijKVnv37pO7d5/8woG6biYSwkLuSAIuq7Nd0S2aUa1GWwNnZ4kr 3jpsRFsD98dxEQCQmbvcc9HEiqtBENdaORiGufARQnB10UF+yoRufHHCq+qfKvl08KKxu6vh8di9 Xns+XwIAvPnm93/wg/Yv6+nzcV+rrb6CBYAHAAyFimLJcNo/Z3o5QRudvewNq3201VjEdgcA2LJl tdU4cOCi12uvrnZ/4c9KWb4aG1e4EQIAgKygvf27yELrk1XzX/fNajoGACAIHlrltuSL2O4AAD/9 6aP79/eJonz69MS2be/98pffbm2toukrvZUFn5N6fJ0PAEASkLvKo61tcWx7pDI9p8Vz6n+fyYRT ylMb/OUeKpZV/+dMZnj6cuR5ZK23qeayr7zT69kdO/bO1xXd3f9wdYc9e3peeukDK1NhGPL++5tO nPj7G5nxD+dyr7wX+sJXdy+x7/rbu3yuyyFrcZ9ZAMDzz284ePDllpZKCKGi6Asrs+sDyyDyqihE kXDz/f5//8myeeLAnW93x4+PDQ/HAABVVe7vfnftl3UrldSOjsCJE2MYg7fe+v6NzIgxGAuXzgzy UzFJKBlujmypt21c4W6uuTKtudO5u5Nx+czOzOS6ukZLJTUWm/uyromEMDmZmn8cHU3IspbJFPr6 ZgEAfX2z6bQIANB14+zZoK6bsdicJGlfpm1yMlUoXK6ru7uDY2NJAEA+X9J14yuWK0laoSBHIvnp 6awlwRirqn6FwluDy3F2YCAyMhK35sZ4uqLCKUlaqaRgDJYtqyAIxHHM/v19Xq99eDjOstR99y0N hTK9vaG6Os/UVCYczhuGOTcn5XIFQZB7e0OZjGiamCQJTTMYhqyqcuXzJVU1MMbf+lbLzEzu0KHB lStrSZJ45JG7L14Mr1pVVyjI0eicy2Wz2ahCQSkWlaam8sZG/8cfDzQ2lsXjvMvFWjFheDhWUeHq 7w+zLIUxHhqK1tf7DAOXlXEEgTZtuueWcgchoGni7NlJAICi6LKs+Xycy8XKsjY5mWprq8EYsyx5 6tS4zUaXlztomlBVXVG0Tz4J+f2OgYFIW1v1wECkstI1OBitrnYnEkJf36zDwaxYUTsyEqcoIpUS WZay2aiGBt/58zM0TXz88QDDUA8/3Fpe7jh2bMw0TYxBfb13djZXKCjhcO6xx9owxqWSumdPz+bN ywOBRH29t7NztK2tuqtrFAD85JMrNM0Ih+d8Pkciwff0BFmWumXcXfZ3qmoAgBVFNwxTVQ2OYxRF M03MMGSxqFRWujAGyaTg8dgFQSII5PXaTRNnMgW/36FphiSpLhcLIUynxbIyp64bCEFJ0miaFEWp vz+yalWdz8fxvIQQtMZms0WXi1UU3eu1Z7NFu53mecnjsamqNVaFEDqdLMOQ8ThfXu5Mp0WOY0zT tNuZVErw+x2CIHm9HMYYQpDJFKy2pfDWcAfwDSCZFCKRfG/vVCYjTk9nLCHPl+Y79PZOYYw1zbAe TdMMBlNXKOnpCXZ2BoLB9NGjwxjjrq5AKiVgjAsF2ZJgjMfHk9ls4YqBPC9Z+hdifsgtwA3VFT6f /Z13TgwORpcvr1m9uv7ChZlSSQ2H81VVrubm8lJJ7e8Pz8zkKiqcum6kUqLbbeM45syZSZalSyXV 6WQ2brxrcDA2Pp58+uk1x4+Py7KezRZ5XhZFKZ8vJZMChDAczpumqetmTY2HIBDDkKmU6HDQgiD3 90cikXxFhTMSmSNJRFFEX9/so4+23SzD+moQr7322nUPRgh1dwdffHHj4GA0lysODcWy2SKEkCBQ T89US0uF3++w2+nDh4fC4bwgyPE473SyFy7MQAjPn59ubCxbv74xEIjLsub12nhekiSNYcihoZjP x+VyxdbWqlyueOTIEE2ToqhIkibLWipV6OwcURR9w4bm2dlcJlMYG0tqmuHzcZFInmHIDRuabh4/ X4Ubze9U1aBpYt5JYYxZllZVnWXJQkFxOFgAgGGYEEKMsa6bFIUURadpUpI0h4MhSaSqOsaAIJAs awhBiiIgBKKoOJ2stTZJ0liWghDIsma304aBVVWjKJIkkSDITicrirLDwUAIFEUHAHIcfXO4+Trc aE1mFd779n0yMBBxOlnDwDRNOBwMSRIej/3QoQGSRMFg+uDBfoYhOY7meSkczpdK6pkzE4WCcvLk +OhogmFIa+d2O01RBEkSAwMR6wxSFOFysYFAvFhUWZZ6993TgUDM4WAZhrx0KXL06AhCkGHIaHSO JAmOY76WOEGQYjF+ZCQ+MfFZrmp9Dzp5cvz/tPebU1fs3LnvgQeaQ6FMqaTW1/tYlnzhhQfef787 GEx7PDaOY0iSwBhXVbnXrVu6d+8nra2VmUyhVFIBAOvXNwaDKU0zBwYiHo+9qamsutrd1TW6YkXt +HjyRz/aOD6e7O6eLC936rqZSgkcx9jt9He+szoe5wOBuNfLKYpmt9OXLkUefLD53LlpkkReL2cY pmGYy5ZVtLRUHj48yDCUzUbpuulysblcMRTKOBwshJDjaJ+P+/3vh9esqRdFuampXBTl559/4Fr+ kXFz7gKWL6+RJC2R4MvKHKZp5nJFjAHPSzYbFYvxhoHdbtvsbM761mWzkVYFghDUdaNYVIpF1cqE 0mkxnRZVVX/ooZZYbC6ZFBRFEwTJbmeSSVEUZb/fIcuaqhqapvO8lMsV8/mi38/NzOQURR8dTfp8 XDzO5/PFlpYKRdGtHBtjEAymEUKiKJsmjsd5jmMEQcrniy4XCyGoqXErik4QKB7nrYB+Lbu+OXZn mhhjrGkGRRHWI0URqqojhHTdoGkSY2yaGCGIEFIUzZKoqmHdSloOESGoqjpNk/N6VFVnWco0saoa FIUsDdZ9CcuSAABVNSz/qOvmpxuBGGOSRAhBy7EiBGVZY1lKljWCQAAAgrB8LqHrpjXR1Yu/ll3f HLtDCBIEYlmKIBBBIGtumiZJErEshRAMhbKx2FxX1+jAQMSSEASy2SiEoBUfjh4dTiSEgYEoQhBj nE6LEALr4w5CkGXJzs5RiiIIAiEEOzsD09PZjo5AJJI/f366oyNAUQRNkzRNxuNzDEMSBIIQWhMd OTLU1TUKAGBZKpEQJiZSCEGbjbLSnVAoEwplFi7+2LGxa9z1Lbo35vkSTZP5fOncuelTpybsdlqW NYKAGAO/39He3hCL8bHYIEkShw8PAgCi0bn29qUOB83zEscxhYISCMTb2qqTSf7ixXA0Ord27RJd Nz/66AJBoLo678sv72tpqfJ4bGfPBgkCtrRU+v0cz8svvfTnHo99bCz50UcXEgmeoghZ1oPB9MhI PJstuN02qxwyTaxphs1GMwyZyxUff/yaMsRbdPfJcUwgEGdZiqIIhOC6dQ3Wif7e9/7s4sXZJUt8 NTWe7dvXF4sKxzH19d7nnrtfFCUAAMNQGIN7761uba3M5QoQQlU1mpvLa2s9mzbdXVfnbWur3rjx LrfbXlbGZTKFlStry8octbWeFStq16ypNwwzHudVVZcklWGoNWuWNDeXJxJ8U1OZ220rK3OsXbvE ZqM0zfB47LW1boyxx3PlPd2X4Tbf3/G8FAplVq+uv41ruG786e7z+rHov1fcRvwvtC8zwf5VwNgA AAAASUVORK5CYII= ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://opac.rero.ch/gw_48_1_10m/html/uc/fr-ch/common_files/js/prototype.js /* Prototype JavaScript framework, version 1.6.0.3=0A= * (c) 2005-2008 Sam Stephenson=0A= *=0A= * Prototype is freely distributable under the terms of an MIT-style = license.=0A= * For details, see the Prototype web site: http://www.prototypejs.org/=0A= *=0A= = *------------------------------------------------------------------------= --*/=0A= =0A= var Prototype =3D {=0A= Version: '1.6.0.3',=0A= =0A= Browser: {=0A= IE: !!(window.attachEvent &&=0A= navigator.userAgent.indexOf('Opera') =3D=3D=3D -1),=0A= Opera: navigator.userAgent.indexOf('Opera') > -1,=0A= WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,=0A= Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&=0A= navigator.userAgent.indexOf('KHTML') =3D=3D=3D -1,=0A= MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)=0A= },=0A= =0A= BrowserFeatures: {=0A= XPath: !!document.evaluate,=0A= SelectorsAPI: !!document.querySelector,=0A= ElementExtensions: !!window.HTMLElement,=0A= SpecificElementExtensions:=0A= document.createElement('div')['__proto__'] &&=0A= document.createElement('div')['__proto__'] !=3D=3D=0A= document.createElement('form')['__proto__']=0A= },=0A= =0A= ScriptFragment: ']*>([\\S\\s]*?)<\/script>',=0A= JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,=0A= =0A= emptyFunction: function() { },=0A= K: function(x) { return x }=0A= };=0A= =0A= if (Prototype.Browser.MobileSafari)=0A= Prototype.BrowserFeatures.SpecificElementExtensions =3D false;=0A= =0A= =0A= /* Based on Alex Arnell's inheritance implementation. */=0A= var Class =3D {=0A= create: function() {=0A= var parent =3D null, properties =3D $A(arguments);=0A= if (Object.isFunction(properties[0]))=0A= parent =3D properties.shift();=0A= =0A= function klass() {=0A= this.initialize.apply(this, arguments);=0A= }=0A= =0A= Object.extend(klass, Class.Methods);=0A= klass.superclass =3D parent;=0A= klass.subclasses =3D [];=0A= =0A= if (parent) {=0A= var subclass =3D function() { };=0A= subclass.prototype =3D parent.prototype;=0A= klass.prototype =3D new subclass;=0A= parent.subclasses.push(klass);=0A= }=0A= =0A= for (var i =3D 0; i < properties.length; i++)=0A= klass.addMethods(properties[i]);=0A= =0A= if (!klass.prototype.initialize)=0A= klass.prototype.initialize =3D Prototype.emptyFunction;=0A= =0A= klass.prototype.constructor =3D klass;=0A= =0A= return klass;=0A= }=0A= };=0A= =0A= Class.Methods =3D {=0A= addMethods: function(source) {=0A= var ancestor =3D this.superclass && this.superclass.prototype;=0A= var properties =3D Object.keys(source);=0A= =0A= if (!Object.keys({ toString: true }).length)=0A= properties.push("toString", "valueOf");=0A= =0A= for (var i =3D 0, length =3D properties.length; i < length; i++) {=0A= var property =3D properties[i], value =3D source[property];=0A= if (ancestor && Object.isFunction(value) &&=0A= value.argumentNames().first() =3D=3D "$super") {=0A= var method =3D value;=0A= value =3D (function(m) {=0A= return function() { return ancestor[m].apply(this, arguments) = };=0A= })(property).wrap(method);=0A= =0A= value.valueOf =3D method.valueOf.bind(method);=0A= value.toString =3D method.toString.bind(method);=0A= }=0A= this.prototype[property] =3D value;=0A= }=0A= =0A= return this;=0A= }=0A= };=0A= =0A= var Abstract =3D { };=0A= =0A= Object.extend =3D function(destination, source) {=0A= for (var property in source)=0A= destination[property] =3D source[property];=0A= return destination;=0A= };=0A= =0A= Object.extend(Object, {=0A= inspect: function(object) {=0A= try {=0A= if (Object.isUndefined(object)) return 'undefined';=0A= if (object =3D=3D=3D null) return 'null';=0A= return object.inspect ? object.inspect() : String(object);=0A= } catch (e) {=0A= if (e instanceof RangeError) return '...';=0A= throw e;=0A= }=0A= },=0A= =0A= toJSON: function(object) {=0A= var type =3D typeof object;=0A= switch (type) {=0A= case 'undefined':=0A= case 'function':=0A= case 'unknown': return;=0A= case 'boolean': return object.toString();=0A= }=0A= =0A= if (object =3D=3D=3D null) return 'null';=0A= if (object.toJSON) return object.toJSON();=0A= if (Object.isElement(object)) return;=0A= =0A= var results =3D [];=0A= for (var property in object) {=0A= var value =3D Object.toJSON(object[property]);=0A= if (!Object.isUndefined(value))=0A= results.push(property.toJSON() + ': ' + value);=0A= }=0A= =0A= return '{' + results.join(', ') + '}';=0A= },=0A= =0A= toQueryString: function(object) {=0A= return $H(object).toQueryString();=0A= },=0A= =0A= toHTML: function(object) {=0A= return object && object.toHTML ? object.toHTML() : = String.interpret(object);=0A= },=0A= =0A= keys: function(object) {=0A= var keys =3D [];=0A= for (var property in object)=0A= keys.push(property);=0A= return keys;=0A= },=0A= =0A= values: function(object) {=0A= var values =3D [];=0A= for (var property in object)=0A= values.push(object[property]);=0A= return values;=0A= },=0A= =0A= clone: function(object) {=0A= return Object.extend({ }, object);=0A= },=0A= =0A= isElement: function(object) {=0A= return !!(object && object.nodeType =3D=3D 1);=0A= },=0A= =0A= isArray: function(object) {=0A= return object !=3D null && typeof object =3D=3D "object" &&=0A= 'splice' in object && 'join' in object;=0A= },=0A= =0A= isHash: function(object) {=0A= return object instanceof Hash;=0A= },=0A= =0A= isFunction: function(object) {=0A= return typeof object =3D=3D "function";=0A= },=0A= =0A= isString: function(object) {=0A= return typeof object =3D=3D "string";=0A= },=0A= =0A= isNumber: function(object) {=0A= return typeof object =3D=3D "number";=0A= },=0A= =0A= isUndefined: function(object) {=0A= return typeof object =3D=3D "undefined";=0A= }=0A= });=0A= =0A= Object.extend(Function.prototype, {=0A= argumentNames: function() {=0A= var names =3D = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]=0A= .replace(/\s+/g, '').split(',');=0A= return names.length =3D=3D 1 && !names[0] ? [] : names;=0A= },=0A= =0A= bind: function() {=0A= if (arguments.length < 2 && Object.isUndefined(arguments[0])) return = this;=0A= var __method =3D this, args =3D $A(arguments), object =3D = args.shift();=0A= return function() {=0A= return __method.apply(object, args.concat($A(arguments)));=0A= }=0A= },=0A= =0A= bindAsEventListener: function() {=0A= var __method =3D this, args =3D $A(arguments), object =3D = args.shift();=0A= return function(event) {=0A= return __method.apply(object, [event || = window.event].concat(args));=0A= }=0A= },=0A= =0A= curry: function() {=0A= if (!arguments.length) return this;=0A= var __method =3D this, args =3D $A(arguments);=0A= return function() {=0A= return __method.apply(this, args.concat($A(arguments)));=0A= }=0A= },=0A= =0A= delay: function() {=0A= var __method =3D this, args =3D $A(arguments), timeout =3D = args.shift() * 1000;=0A= return window.setTimeout(function() {=0A= return __method.apply(__method, args);=0A= }, timeout);=0A= },=0A= =0A= defer: function() {=0A= var args =3D [0.01].concat($A(arguments));=0A= return this.delay.apply(this, args);=0A= },=0A= =0A= wrap: function(wrapper) {=0A= var __method =3D this;=0A= return function() {=0A= return wrapper.apply(this, = [__method.bind(this)].concat($A(arguments)));=0A= }=0A= },=0A= =0A= methodize: function() {=0A= if (this._methodized) return this._methodized;=0A= var __method =3D this;=0A= return this._methodized =3D function() {=0A= return __method.apply(null, [this].concat($A(arguments)));=0A= };=0A= }=0A= });=0A= =0A= Date.prototype.toJSON =3D function() {=0A= return '"' + this.getUTCFullYear() + '-' +=0A= (this.getUTCMonth() + 1).toPaddedString(2) + '-' +=0A= this.getUTCDate().toPaddedString(2) + 'T' +=0A= this.getUTCHours().toPaddedString(2) + ':' +=0A= this.getUTCMinutes().toPaddedString(2) + ':' +=0A= this.getUTCSeconds().toPaddedString(2) + 'Z"';=0A= };=0A= =0A= var Try =3D {=0A= these: function() {=0A= var returnValue;=0A= =0A= for (var i =3D 0, length =3D arguments.length; i < length; i++) {=0A= var lambda =3D arguments[i];=0A= try {=0A= returnValue =3D lambda();=0A= break;=0A= } catch (e) { }=0A= }=0A= =0A= return returnValue;=0A= }=0A= };=0A= =0A= RegExp.prototype.match =3D RegExp.prototype.test;=0A= =0A= RegExp.escape =3D function(str) {=0A= return String(str).replace(/([.*+?^=3D!:${}()|[\]\/\\])/g, '\\$1');=0A= };=0A= =0A= /*-----------------------------------------------------------------------= ---*/=0A= =0A= var PeriodicalExecuter =3D Class.create({=0A= initialize: function(callback, frequency) {=0A= this.callback =3D callback;=0A= this.frequency =3D frequency;=0A= this.currentlyExecuting =3D false;=0A= =0A= this.registerCallback();=0A= },=0A= =0A= registerCallback: function() {=0A= this.timer =3D setInterval(this.onTimerEvent.bind(this), = this.frequency * 1000);=0A= },=0A= =0A= execute: function() {=0A= this.callback(this);=0A= },=0A= =0A= stop: function() {=0A= if (!this.timer) return;=0A= clearInterval(this.timer);=0A= this.timer =3D null;=0A= },=0A= =0A= onTimerEvent: function() {=0A= if (!this.currentlyExecuting) {=0A= try {=0A= this.currentlyExecuting =3D true;=0A= this.execute();=0A= } finally {=0A= this.currentlyExecuting =3D false;=0A= }=0A= }=0A= }=0A= });=0A= Object.extend(String, {=0A= interpret: function(value) {=0A= return value =3D=3D null ? '' : String(value);=0A= },=0A= specialChar: {=0A= '\b': '\\b',=0A= '\t': '\\t',=0A= '\n': '\\n',=0A= '\f': '\\f',=0A= '\r': '\\r',=0A= '\\': '\\\\'=0A= }=0A= });=0A= =0A= Object.extend(String.prototype, {=0A= gsub: function(pattern, replacement) {=0A= var result =3D '', source =3D this, match;=0A= replacement =3D arguments.callee.prepareReplacement(replacement);=0A= =0A= while (source.length > 0) {=0A= if (match =3D source.match(pattern)) {=0A= result +=3D source.slice(0, match.index);=0A= result +=3D String.interpret(replacement(match));=0A= source =3D source.slice(match.index + match[0].length);=0A= } else {=0A= result +=3D source, source =3D '';=0A= }=0A= }=0A= return result;=0A= },=0A= =0A= sub: function(pattern, replacement, count) {=0A= replacement =3D this.gsub.prepareReplacement(replacement);=0A= count =3D Object.isUndefined(count) ? 1 : count;=0A= =0A= return this.gsub(pattern, function(match) {=0A= if (--count < 0) return match[0];=0A= return replacement(match);=0A= });=0A= },=0A= =0A= scan: function(pattern, iterator) {=0A= this.gsub(pattern, iterator);=0A= return String(this);=0A= },=0A= =0A= truncate: function(length, truncation) {=0A= length =3D length || 30;=0A= truncation =3D Object.isUndefined(truncation) ? '...' : truncation;=0A= return this.length > length ?=0A= this.slice(0, length - truncation.length) + truncation : = String(this);=0A= },=0A= =0A= strip: function() {=0A= return this.replace(/^\s+/, '').replace(/\s+$/, '');=0A= },=0A= =0A= stripTags: function() {=0A= return this.replace(/<\/?[^>]+>/gi, '');=0A= },=0A= =0A= stripScripts: function() {=0A= return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');=0A= },=0A= =0A= extractScripts: function() {=0A= var matchAll =3D new RegExp(Prototype.ScriptFragment, 'img');=0A= var matchOne =3D new RegExp(Prototype.ScriptFragment, 'im');=0A= return (this.match(matchAll) || []).map(function(scriptTag) {=0A= return (scriptTag.match(matchOne) || ['', ''])[1];=0A= });=0A= },=0A= =0A= evalScripts: function() {=0A= return this.extractScripts().map(function(script) { return = eval(script) });=0A= },=0A= =0A= escapeHTML: function() {=0A= var self =3D arguments.callee;=0A= self.text.data =3D this;=0A= return self.div.innerHTML;=0A= },=0A= =0A= unescapeHTML: function() {=0A= var div =3D new Element('div');=0A= div.innerHTML =3D this.stripTags();=0A= return div.childNodes[0] ? (div.childNodes.length > 1 ?=0A= $A(div.childNodes).inject('', function(memo, node) { return = memo+node.nodeValue }) :=0A= div.childNodes[0].nodeValue) : '';=0A= },=0A= =0A= toQueryParams: function(separator) {=0A= var match =3D this.strip().match(/([^?#]*)(#.*)?$/);=0A= if (!match) return { };=0A= =0A= return match[1].split(separator || '&').inject({ }, function(hash, = pair) {=0A= if ((pair =3D pair.split('=3D'))[0]) {=0A= var key =3D decodeURIComponent(pair.shift());=0A= var value =3D pair.length > 1 ? pair.join('=3D') : pair[0];=0A= if (value !=3D undefined) value =3D decodeURIComponent(value);=0A= =0A= if (key in hash) {=0A= if (!Object.isArray(hash[key])) hash[key] =3D [hash[key]];=0A= hash[key].push(value);=0A= }=0A= else hash[key] =3D value;=0A= }=0A= return hash;=0A= });=0A= },=0A= =0A= toArray: function() {=0A= return this.split('');=0A= },=0A= =0A= succ: function() {=0A= return this.slice(0, this.length - 1) +=0A= String.fromCharCode(this.charCodeAt(this.length - 1) + 1);=0A= },=0A= =0A= times: function(count) {=0A= return count < 1 ? '' : new Array(count + 1).join(this);=0A= },=0A= =0A= camelize: function() {=0A= var parts =3D this.split('-'), len =3D parts.length;=0A= if (len =3D=3D 1) return parts[0];=0A= =0A= var camelized =3D this.charAt(0) =3D=3D '-'=0A= ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)=0A= : parts[0];=0A= =0A= for (var i =3D 1; i < len; i++)=0A= camelized +=3D parts[i].charAt(0).toUpperCase() + = parts[i].substring(1);=0A= =0A= return camelized;=0A= },=0A= =0A= capitalize: function() {=0A= return this.charAt(0).toUpperCase() + = this.substring(1).toLowerCase();=0A= },=0A= =0A= underscore: function() {=0A= return this.gsub(/::/, = '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{= 1}_#{2}').gsub(/-/,'_').toLowerCase();=0A= },=0A= =0A= dasherize: function() {=0A= return this.gsub(/_/,'-');=0A= },=0A= =0A= inspect: function(useDoubleQuotes) {=0A= var escapedString =3D this.gsub(/[\x00-\x1f\\]/, function(match) {=0A= var character =3D String.specialChar[match[0]];=0A= return character ? character : '\\u00' + = match[0].charCodeAt().toPaddedString(2, 16);=0A= });=0A= if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') = + '"';=0A= return "'" + escapedString.replace(/'/g, '\\\'') + "'";=0A= },=0A= =0A= toJSON: function() {=0A= return this.inspect(true);=0A= },=0A= =0A= unfilterJSON: function(filter) {=0A= return this.sub(filter || Prototype.JSONFilter, '#{1}');=0A= },=0A= =0A= isJSON: function() {=0A= var str =3D this;=0A= if (str.blank()) return false;=0A= str =3D this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');=0A= return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);=0A= },=0A= =0A= evalJSON: function(sanitize) {=0A= var json =3D this.unfilterJSON();=0A= try {=0A= if (!sanitize || json.isJSON()) return eval('(' + json + ')');=0A= } catch (e) { }=0A= throw new SyntaxError('Badly formed JSON string: ' + this.inspect());=0A= },=0A= =0A= include: function(pattern) {=0A= return this.indexOf(pattern) > -1;=0A= },=0A= =0A= startsWith: function(pattern) {=0A= return this.indexOf(pattern) =3D=3D=3D 0;=0A= },=0A= =0A= endsWith: function(pattern) {=0A= var d =3D this.length - pattern.length;=0A= return d >=3D 0 && this.lastIndexOf(pattern) =3D=3D=3D d;=0A= },=0A= =0A= empty: function() {=0A= return this =3D=3D '';=0A= },=0A= =0A= blank: function() {=0A= return /^\s*$/.test(this);=0A= },=0A= =0A= interpolate: function(object, pattern) {=0A= return new Template(this, pattern).evaluate(object);=0A= }=0A= });=0A= =0A= if (Prototype.Browser.WebKit || Prototype.Browser.IE) = Object.extend(String.prototype, {=0A= escapeHTML: function() {=0A= return = this.replace(/&/g,'&').replace(//g,'>');=0A= },=0A= unescapeHTML: function() {=0A= return = this.stripTags().replace(/&/g,'&').replace(/</g,'<').replace(/>= /g,'>');=0A= }=0A= });=0A= =0A= String.prototype.gsub.prepareReplacement =3D function(replacement) {=0A= if (Object.isFunction(replacement)) return replacement;=0A= var template =3D new Template(replacement);=0A= return function(match) { return template.evaluate(match) };=0A= };=0A= =0A= String.prototype.parseQuery =3D String.prototype.toQueryParams;=0A= =0A= Object.extend(String.prototype.escapeHTML, {=0A= div: document.createElement('div'),=0A= text: document.createTextNode('')=0A= });=0A= =0A= String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.t= ext);=0A= =0A= var Template =3D Class.create({=0A= initialize: function(template, pattern) {=0A= this.template =3D template.toString();=0A= this.pattern =3D pattern || Template.Pattern;=0A= },=0A= =0A= evaluate: function(object) {=0A= if (Object.isFunction(object.toTemplateReplacements))=0A= object =3D object.toTemplateReplacements();=0A= =0A= return this.template.gsub(this.pattern, function(match) {=0A= if (object =3D=3D null) return '';=0A= =0A= var before =3D match[1] || '';=0A= if (before =3D=3D '\\') return match[2];=0A= =0A= var ctx =3D object, expr =3D match[3];=0A= var pattern =3D /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;=0A= match =3D pattern.exec(expr);=0A= if (match =3D=3D null) return before;=0A= =0A= while (match !=3D null) {=0A= var comp =3D match[1].startsWith('[') ? match[2].gsub('\\\\]', = ']') : match[1];=0A= ctx =3D ctx[comp];=0A= if (null =3D=3D ctx || '' =3D=3D match[3]) break;=0A= expr =3D expr.substring('[' =3D=3D match[3] ? match[1].length : = match[0].length);=0A= match =3D pattern.exec(expr);=0A= }=0A= =0A= return before + String.interpret(ctx);=0A= });=0A= }=0A= });=0A= Template.Pattern =3D /(^|.|\r|\n)(#\{(.*?)\})/;=0A= =0A= var $break =3D { };=0A= =0A= var Enumerable =3D {=0A= each: function(iterator, context) {=0A= var index =3D 0;=0A= try {=0A= this._each(function(value) {=0A= iterator.call(context, value, index++);=0A= });=0A= } catch (e) {=0A= if (e !=3D $break) throw e;=0A= }=0A= return this;=0A= },=0A= =0A= eachSlice: function(number, iterator, context) {=0A= var index =3D -number, slices =3D [], array =3D this.toArray();=0A= if (number < 1) return array;=0A= while ((index +=3D number) < array.length)=0A= slices.push(array.slice(index, index+number));=0A= return slices.collect(iterator, context);=0A= },=0A= =0A= all: function(iterator, context) {=0A= iterator =3D iterator || Prototype.K;=0A= var result =3D true;=0A= this.each(function(value, index) {=0A= result =3D result && !!iterator.call(context, value, index);=0A= if (!result) throw $break;=0A= });=0A= return result;=0A= },=0A= =0A= any: function(iterator, context) {=0A= iterator =3D iterator || Prototype.K;=0A= var result =3D false;=0A= this.each(function(value, index) {=0A= if (result =3D !!iterator.call(context, value, index))=0A= throw $break;=0A= });=0A= return result;=0A= },=0A= =0A= collect: function(iterator, context) {=0A= iterator =3D iterator || Prototype.K;=0A= var results =3D [];=0A= this.each(function(value, index) {=0A= results.push(iterator.call(context, value, index));=0A= });=0A= return results;=0A= },=0A= =0A= detect: function(iterator, context) {=0A= var result;=0A= this.each(function(value, index) {=0A= if (iterator.call(context, value, index)) {=0A= result =3D value;=0A= throw $break;=0A= }=0A= });=0A= return result;=0A= },=0A= =0A= findAll: function(iterator, context) {=0A= var results =3D [];=0A= this.each(function(value, index) {=0A= if (iterator.call(context, value, index))=0A= results.push(value);=0A= });=0A= return results;=0A= },=0A= =0A= grep: function(filter, iterator, context) {=0A= iterator =3D iterator || Prototype.K;=0A= var results =3D [];=0A= =0A= if (Object.isString(filter))=0A= filter =3D new RegExp(filter);=0A= =0A= this.each(function(value, index) {=0A= if (filter.match(value))=0A= results.push(iterator.call(context, value, index));=0A= });=0A= return results;=0A= },=0A= =0A= include: function(object) {=0A= if (Object.isFunction(this.indexOf))=0A= if (this.indexOf(object) !=3D -1) return true;=0A= =0A= var found =3D false;=0A= this.each(function(value) {=0A= if (value =3D=3D object) {=0A= found =3D true;=0A= throw $break;=0A= }=0A= });=0A= return found;=0A= },=0A= =0A= inGroupsOf: function(number, fillWith) {=0A= fillWith =3D Object.isUndefined(fillWith) ? null : fillWith;=0A= return this.eachSlice(number, function(slice) {=0A= while(slice.length < number) slice.push(fillWith);=0A= return slice;=0A= });=0A= },=0A= =0A= inject: function(memo, iterator, context) {=0A= this.each(function(value, index) {=0A= memo =3D iterator.call(context, memo, value, index);=0A= });=0A= return memo;=0A= },=0A= =0A= invoke: function(method) {=0A= var args =3D $A(arguments).slice(1);=0A= return this.map(function(value) {=0A= return value[method].apply(value, args);=0A= });=0A= },=0A= =0A= max: function(iterator, context) {=0A= iterator =3D iterator || Prototype.K;=0A= var result;=0A= this.each(function(value, index) {=0A= value =3D iterator.call(context, value, index);=0A= if (result =3D=3D null || value >=3D result)=0A= result =3D value;=0A= });=0A= return result;=0A= },=0A= =0A= min: function(iterator, context) {=0A= iterator =3D iterator || Prototype.K;=0A= var result;=0A= this.each(function(value, index) {=0A= value =3D iterator.call(context, value, index);=0A= if (result =3D=3D null || value < result)=0A= result =3D value;=0A= });=0A= return result;=0A= },=0A= =0A= partition: function(iterator, context) {=0A= iterator =3D iterator || Prototype.K;=0A= var trues =3D [], falses =3D [];=0A= this.each(function(value, index) {=0A= (iterator.call(context, value, index) ?=0A= trues : falses).push(value);=0A= });=0A= return [trues, falses];=0A= },=0A= =0A= pluck: function(property) {=0A= var results =3D [];=0A= this.each(function(value) {=0A= results.push(value[property]);=0A= });=0A= return results;=0A= },=0A= =0A= reject: function(iterator, context) {=0A= var results =3D [];=0A= this.each(function(value, index) {=0A= if (!iterator.call(context, value, index))=0A= results.push(value);=0A= });=0A= return results;=0A= },=0A= =0A= sortBy: function(iterator, context) {=0A= return this.map(function(value, index) {=0A= return {=0A= value: value,=0A= criteria: iterator.call(context, value, index)=0A= };=0A= }).sort(function(left, right) {=0A= var a =3D left.criteria, b =3D right.criteria;=0A= return a < b ? -1 : a > b ? 1 : 0;=0A= }).pluck('value');=0A= },=0A= =0A= toArray: function() {=0A= return this.map();=0A= },=0A= =0A= zip: function() {=0A= var iterator =3D Prototype.K, args =3D $A(arguments);=0A= if (Object.isFunction(args.last()))=0A= iterator =3D args.pop();=0A= =0A= var collections =3D [this].concat(args).map($A);=0A= return this.map(function(value, index) {=0A= return iterator(collections.pluck(index));=0A= });=0A= },=0A= =0A= size: function() {=0A= return this.toArray().length;=0A= },=0A= =0A= inspect: function() {=0A= return '#';=0A= }=0A= };=0A= =0A= Object.extend(Enumerable, {=0A= map: Enumerable.collect,=0A= find: Enumerable.detect,=0A= select: Enumerable.findAll,=0A= filter: Enumerable.findAll,=0A= member: Enumerable.include,=0A= entries: Enumerable.toArray,=0A= every: Enumerable.all,=0A= some: Enumerable.any=0A= });=0A= function $A(iterable) {=0A= if (!iterable) return [];=0A= if (iterable.toArray) return iterable.toArray();=0A= var length =3D iterable.length || 0, results =3D new Array(length);=0A= while (length--) results[length] =3D iterable[length];=0A= return results;=0A= }=0A= =0A= if (Prototype.Browser.WebKit) {=0A= $A =3D function(iterable) {=0A= if (!iterable) return [];=0A= // In Safari, only use the `toArray` method if it's not a NodeList.=0A= // A NodeList is a function, has an function `item` property, and a = numeric=0A= // `length` property. Adapted from Google Doctype.=0A= if (!(typeof iterable =3D=3D=3D 'function' && typeof iterable.length = =3D=3D=3D=0A= 'number' && typeof iterable.item =3D=3D=3D 'function') && = iterable.toArray)=0A= return iterable.toArray();=0A= var length =3D iterable.length || 0, results =3D new Array(length);=0A= while (length--) results[length] =3D iterable[length];=0A= return results;=0A= };=0A= }=0A= =0A= Array.from =3D $A;=0A= =0A= Object.extend(Array.prototype, Enumerable);=0A= =0A= if (!Array.prototype._reverse) Array.prototype._reverse =3D = Array.prototype.reverse;=0A= =0A= Object.extend(Array.prototype, {=0A= _each: function(iterator) {=0A= for (var i =3D 0, length =3D this.length; i < length; i++)=0A= iterator(this[i]);=0A= },=0A= =0A= clear: function() {=0A= this.length =3D 0;=0A= return this;=0A= },=0A= =0A= first: function() {=0A= return this[0];=0A= },=0A= =0A= last: function() {=0A= return this[this.length - 1];=0A= },=0A= =0A= compact: function() {=0A= return this.select(function(value) {=0A= return value !=3D null;=0A= });=0A= },=0A= =0A= flatten: function() {=0A= return this.inject([], function(array, value) {=0A= return array.concat(Object.isArray(value) ?=0A= value.flatten() : [value]);=0A= });=0A= },=0A= =0A= without: function() {=0A= var values =3D $A(arguments);=0A= return this.select(function(value) {=0A= return !values.include(value);=0A= });=0A= },=0A= =0A= reverse: function(inline) {=0A= return (inline !=3D=3D false ? this : this.toArray())._reverse();=0A= },=0A= =0A= reduce: function() {=0A= return this.length > 1 ? this : this[0];=0A= },=0A= =0A= uniq: function(sorted) {=0A= return this.inject([], function(array, value, index) {=0A= if (0 =3D=3D index || (sorted ? array.last() !=3D value : = !array.include(value)))=0A= array.push(value);=0A= return array;=0A= });=0A= },=0A= =0A= intersect: function(array) {=0A= return this.uniq().findAll(function(item) {=0A= return array.detect(function(value) { return item =3D=3D=3D value = });=0A= });=0A= },=0A= =0A= clone: function() {=0A= return [].concat(this);=0A= },=0A= =0A= size: function() {=0A= return this.length;=0A= },=0A= =0A= inspect: function() {=0A= return '[' + this.map(Object.inspect).join(', ') + ']';=0A= },=0A= =0A= toJSON: function() {=0A= var results =3D [];=0A= this.each(function(object) {=0A= var value =3D Object.toJSON(object);=0A= if (!Object.isUndefined(value)) results.push(value);=0A= });=0A= return '[' + results.join(', ') + ']';=0A= }=0A= });=0A= =0A= // use native browser JS 1.6 implementation if available=0A= if (Object.isFunction(Array.prototype.forEach))=0A= Array.prototype._each =3D Array.prototype.forEach;=0A= =0A= if (!Array.prototype.indexOf) Array.prototype.indexOf =3D function(item, = i) {=0A= i || (i =3D 0);=0A= var length =3D this.length;=0A= if (i < 0) i =3D length + i;=0A= for (; i < length; i++)=0A= if (this[i] =3D=3D=3D item) return i;=0A= return -1;=0A= };=0A= =0A= if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf =3D = function(item, i) {=0A= i =3D isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;=0A= var n =3D this.slice(0, i).reverse().indexOf(item);=0A= return (n < 0) ? n : i - n - 1;=0A= };=0A= =0A= Array.prototype.toArray =3D Array.prototype.clone;=0A= =0A= function $w(string) {=0A= if (!Object.isString(string)) return [];=0A= string =3D string.strip();=0A= return string ? string.split(/\s+/) : [];=0A= }=0A= =0A= if (Prototype.Browser.Opera){=0A= Array.prototype.concat =3D function() {=0A= var array =3D [];=0A= for (var i =3D 0, length =3D this.length; i < length; i++) = array.push(this[i]);=0A= for (var i =3D 0, length =3D arguments.length; i < length; i++) {=0A= if (Object.isArray(arguments[i])) {=0A= for (var j =3D 0, arrayLength =3D arguments[i].length; j < = arrayLength; j++)=0A= array.push(arguments[i][j]);=0A= } else {=0A= array.push(arguments[i]);=0A= }=0A= }=0A= return array;=0A= };=0A= }=0A= Object.extend(Number.prototype, {=0A= toColorPart: function() {=0A= return this.toPaddedString(2, 16);=0A= },=0A= =0A= succ: function() {=0A= return this + 1;=0A= },=0A= =0A= times: function(iterator, context) {=0A= $R(0, this, true).each(iterator, context);=0A= return this;=0A= },=0A= =0A= toPaddedString: function(length, radix) {=0A= var string =3D this.toString(radix || 10);=0A= return '0'.times(length - string.length) + string;=0A= },=0A= =0A= toJSON: function() {=0A= return isFinite(this) ? this.toString() : 'null';=0A= }=0A= });=0A= =0A= $w('abs round ceil floor').each(function(method){=0A= Number.prototype[method] =3D Math[method].methodize();=0A= });=0A= function $H(object) {=0A= return new Hash(object);=0A= };=0A= =0A= var Hash =3D Class.create(Enumerable, (function() {=0A= =0A= function toQueryPair(key, value) {=0A= if (Object.isUndefined(value)) return key;=0A= return key + '=3D' + encodeURIComponent(String.interpret(value));=0A= }=0A= =0A= return {=0A= initialize: function(object) {=0A= this._object =3D Object.isHash(object) ? object.toObject() : = Object.clone(object);=0A= },=0A= =0A= _each: function(iterator) {=0A= for (var key in this._object) {=0A= var value =3D this._object[key], pair =3D [key, value];=0A= pair.key =3D key;=0A= pair.value =3D value;=0A= iterator(pair);=0A= }=0A= },=0A= =0A= set: function(key, value) {=0A= return this._object[key] =3D value;=0A= },=0A= =0A= get: function(key) {=0A= // simulating poorly supported hasOwnProperty=0A= if (this._object[key] !=3D=3D Object.prototype[key])=0A= return this._object[key];=0A= },=0A= =0A= unset: function(key) {=0A= var value =3D this._object[key];=0A= delete this._object[key];=0A= return value;=0A= },=0A= =0A= toObject: function() {=0A= return Object.clone(this._object);=0A= },=0A= =0A= keys: function() {=0A= return this.pluck('key');=0A= },=0A= =0A= values: function() {=0A= return this.pluck('value');=0A= },=0A= =0A= index: function(value) {=0A= var match =3D this.detect(function(pair) {=0A= return pair.value =3D=3D=3D value;=0A= });=0A= return match && match.key;=0A= },=0A= =0A= merge: function(object) {=0A= return this.clone().update(object);=0A= },=0A= =0A= update: function(object) {=0A= return new Hash(object).inject(this, function(result, pair) {=0A= result.set(pair.key, pair.value);=0A= return result;=0A= });=0A= },=0A= =0A= toQueryString: function() {=0A= return this.inject([], function(results, pair) {=0A= var key =3D encodeURIComponent(pair.key), values =3D pair.value;=0A= =0A= if (values && typeof values =3D=3D 'object') {=0A= if (Object.isArray(values))=0A= return results.concat(values.map(toQueryPair.curry(key)));=0A= } else results.push(toQueryPair(key, values));=0A= return results;=0A= }).join('&');=0A= },=0A= =0A= inspect: function() {=0A= return '#';=0A= },=0A= =0A= toJSON: function() {=0A= return Object.toJSON(this.toObject());=0A= },=0A= =0A= clone: function() {=0A= return new Hash(this);=0A= }=0A= }=0A= })());=0A= =0A= Hash.prototype.toTemplateReplacements =3D Hash.prototype.toObject;=0A= Hash.from =3D $H;=0A= var ObjectRange =3D Class.create(Enumerable, {=0A= initialize: function(start, end, exclusive) {=0A= this.start =3D start;=0A= this.end =3D end;=0A= this.exclusive =3D exclusive;=0A= },=0A= =0A= _each: function(iterator) {=0A= var value =3D this.start;=0A= while (this.include(value)) {=0A= iterator(value);=0A= value =3D value.succ();=0A= }=0A= },=0A= =0A= include: function(value) {=0A= if (value < this.start)=0A= return false;=0A= if (this.exclusive)=0A= return value < this.end;=0A= return value <=3D this.end;=0A= }=0A= });=0A= =0A= var $R =3D function(start, end, exclusive) {=0A= return new ObjectRange(start, end, exclusive);=0A= };=0A= =0A= var Ajax =3D {=0A= getTransport: function() {=0A= return Try.these(=0A= function() {return new XMLHttpRequest()},=0A= function() {return new ActiveXObject('Msxml2.XMLHTTP')},=0A= function() {return new ActiveXObject('Microsoft.XMLHTTP')}=0A= ) || false;=0A= },=0A= =0A= activeRequestCount: 0=0A= };=0A= =0A= Ajax.Responders =3D {=0A= responders: [],=0A= =0A= _each: function(iterator) {=0A= this.responders._each(iterator);=0A= },=0A= =0A= register: function(responder) {=0A= if (!this.include(responder))=0A= this.responders.push(responder);=0A= },=0A= =0A= unregister: function(responder) {=0A= this.responders =3D this.responders.without(responder);=0A= },=0A= =0A= dispatch: function(callback, request, transport, json) {=0A= this.each(function(responder) {=0A= if (Object.isFunction(responder[callback])) {=0A= try {=0A= responder[callback].apply(responder, [request, transport, = json]);=0A= } catch (e) { }=0A= }=0A= });=0A= }=0A= };=0A= =0A= Object.extend(Ajax.Responders, Enumerable);=0A= =0A= Ajax.Responders.register({=0A= onCreate: function() { Ajax.activeRequestCount++ },=0A= onComplete: function() { Ajax.activeRequestCount-- }=0A= });=0A= =0A= Ajax.Base =3D Class.create({=0A= initialize: function(options) {=0A= this.options =3D {=0A= method: 'post',=0A= asynchronous: true,=0A= contentType: 'application/x-www-form-urlencoded',=0A= encoding: 'UTF-8',=0A= parameters: '',=0A= evalJSON: true,=0A= evalJS: true=0A= };=0A= Object.extend(this.options, options || { });=0A= =0A= this.options.method =3D this.options.method.toLowerCase();=0A= =0A= if (Object.isString(this.options.parameters))=0A= this.options.parameters =3D = this.options.parameters.toQueryParams();=0A= else if (Object.isHash(this.options.parameters))=0A= this.options.parameters =3D this.options.parameters.toObject();=0A= }=0A= });=0A= =0A= Ajax.Request =3D Class.create(Ajax.Base, {=0A= _complete: false,=0A= =0A= initialize: function($super, url, options) {=0A= $super(options);=0A= this.transport =3D Ajax.getTransport();=0A= this.request(url);=0A= },=0A= =0A= request: function(url) {=0A= this.url =3D url;=0A= this.method =3D this.options.method;=0A= var params =3D Object.clone(this.options.parameters);=0A= =0A= if (!['get', 'post'].include(this.method)) {=0A= // simulate other verbs over post=0A= params['_method'] =3D this.method;=0A= this.method =3D 'post';=0A= }=0A= =0A= this.parameters =3D params;=0A= =0A= if (params =3D Object.toQueryString(params)) {=0A= // when GET, append parameters to URL=0A= if (this.method =3D=3D 'get')=0A= this.url +=3D (this.url.include('?') ? '&' : '?') + params;=0A= else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))=0A= params +=3D '&_=3D';=0A= }=0A= =0A= try {=0A= var response =3D new Ajax.Response(this);=0A= if (this.options.onCreate) this.options.onCreate(response);=0A= Ajax.Responders.dispatch('onCreate', this, response);=0A= =0A= this.transport.open(this.method.toUpperCase(), this.url,=0A= this.options.asynchronous);=0A= =0A= if (this.options.asynchronous) = this.respondToReadyState.bind(this).defer(1);=0A= =0A= this.transport.onreadystatechange =3D = this.onStateChange.bind(this);=0A= this.setRequestHeaders();=0A= =0A= this.body =3D this.method =3D=3D 'post' ? (this.options.postBody = || params) : null;=0A= this.transport.send(this.body);=0A= =0A= /* Force Firefox to handle ready state 4 for synchronous requests = */=0A= if (!this.options.asynchronous && this.transport.overrideMimeType)=0A= this.onStateChange();=0A= =0A= }=0A= catch (e) {=0A= this.dispatchException(e);=0A= }=0A= },=0A= =0A= onStateChange: function() {=0A= var readyState =3D this.transport.readyState;=0A= if (readyState > 1 && !((readyState =3D=3D 4) && this._complete))=0A= this.respondToReadyState(this.transport.readyState);=0A= },=0A= =0A= setRequestHeaders: function() {=0A= var headers =3D {=0A= 'X-Requested-With': 'XMLHttpRequest',=0A= 'X-Prototype-Version': Prototype.Version,=0A= 'Accept': 'text/javascript, text/html, application/xml, text/xml, = */*'=0A= };=0A= =0A= if (this.method =3D=3D 'post') {=0A= headers['Content-type'] =3D this.options.contentType +=0A= (this.options.encoding ? '; charset=3D' + this.options.encoding = : '');=0A= =0A= /* Force "Connection: close" for older Mozilla browsers to work=0A= * around a bug where XMLHttpRequest sends an incorrect=0A= * Content-length header. See Mozilla Bugzilla #246651.=0A= */=0A= if (this.transport.overrideMimeType &&=0A= (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < = 2005)=0A= headers['Connection'] =3D 'close';=0A= }=0A= =0A= // user-defined headers=0A= if (typeof this.options.requestHeaders =3D=3D 'object') {=0A= var extras =3D this.options.requestHeaders;=0A= =0A= if (Object.isFunction(extras.push))=0A= for (var i =3D 0, length =3D extras.length; i < length; i +=3D 2)=0A= headers[extras[i]] =3D extras[i+1];=0A= else=0A= $H(extras).each(function(pair) { headers[pair.key] =3D = pair.value });=0A= }=0A= =0A= for (var name in headers)=0A= this.transport.setRequestHeader(name, headers[name]);=0A= },=0A= =0A= success: function() {=0A= var status =3D this.getStatus();=0A= return !status || (status >=3D 200 && status < 300);=0A= },=0A= =0A= getStatus: function() {=0A= try {=0A= return this.transport.status || 0;=0A= } catch (e) { return 0 }=0A= },=0A= =0A= respondToReadyState: function(readyState) {=0A= var state =3D Ajax.Request.Events[readyState], response =3D new = Ajax.Response(this);=0A= =0A= if (state =3D=3D 'Complete') {=0A= try {=0A= this._complete =3D true;=0A= (this.options['on' + response.status]=0A= || this.options['on' + (this.success() ? 'Success' : 'Failure')]=0A= || Prototype.emptyFunction)(response, response.headerJSON);=0A= } catch (e) {=0A= this.dispatchException(e);=0A= }=0A= =0A= var contentType =3D response.getHeader('Content-type');=0A= if (this.options.evalJS =3D=3D 'force'=0A= || (this.options.evalJS && this.isSameOrigin() && contentType=0A= && = contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s= *$/i)))=0A= this.evalResponse();=0A= }=0A= =0A= try {=0A= (this.options['on' + state] || Prototype.emptyFunction)(response, = response.headerJSON);=0A= Ajax.Responders.dispatch('on' + state, this, response, = response.headerJSON);=0A= } catch (e) {=0A= this.dispatchException(e);=0A= }=0A= =0A= if (state =3D=3D 'Complete') {=0A= // avoid memory leak in MSIE: clean up=0A= this.transport.onreadystatechange =3D Prototype.emptyFunction;=0A= }=0A= },=0A= =0A= isSameOrigin: function() {=0A= var m =3D this.url.match(/^\s*https?:\/\/[^\/]*/);=0A= return !m || (m[0] =3D=3D = '#{protocol}//#{domain}#{port}'.interpolate({=0A= protocol: location.protocol,=0A= domain: document.domain,=0A= port: location.port ? ':' + location.port : ''=0A= }));=0A= },=0A= =0A= getHeader: function(name) {=0A= try {=0A= return this.transport.getResponseHeader(name) || null;=0A= } catch (e) { return null }=0A= },=0A= =0A= evalResponse: function() {=0A= try {=0A= return eval((this.transport.responseText || '').unfilterJSON());=0A= } catch (e) {=0A= this.dispatchException(e);=0A= }=0A= },=0A= =0A= dispatchException: function(exception) {=0A= (this.options.onException || Prototype.emptyFunction)(this, = exception);=0A= Ajax.Responders.dispatch('onException', this, exception);=0A= }=0A= });=0A= =0A= Ajax.Request.Events =3D=0A= ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];=0A= =0A= Ajax.Response =3D Class.create({=0A= initialize: function(request){=0A= this.request =3D request;=0A= var transport =3D this.transport =3D request.transport,=0A= readyState =3D this.readyState =3D transport.readyState;=0A= =0A= if((readyState > 2 && !Prototype.Browser.IE) || readyState =3D=3D 4) = {=0A= this.status =3D this.getStatus();=0A= this.statusText =3D this.getStatusText();=0A= this.responseText =3D String.interpret(transport.responseText);=0A= this.headerJSON =3D this._getHeaderJSON();=0A= }=0A= =0A= if(readyState =3D=3D 4) {=0A= var xml =3D transport.responseXML;=0A= this.responseXML =3D Object.isUndefined(xml) ? null : xml;=0A= this.responseJSON =3D this._getResponseJSON();=0A= }=0A= },=0A= =0A= status: 0,=0A= statusText: '',=0A= =0A= getStatus: Ajax.Request.prototype.getStatus,=0A= =0A= getStatusText: function() {=0A= try {=0A= return this.transport.statusText || '';=0A= } catch (e) { return '' }=0A= },=0A= =0A= getHeader: Ajax.Request.prototype.getHeader,=0A= =0A= getAllHeaders: function() {=0A= try {=0A= return this.getAllResponseHeaders();=0A= } catch (e) { return null }=0A= },=0A= =0A= getResponseHeader: function(name) {=0A= return this.transport.getResponseHeader(name);=0A= },=0A= =0A= getAllResponseHeaders: function() {=0A= return this.transport.getAllResponseHeaders();=0A= },=0A= =0A= _getHeaderJSON: function() {=0A= var json =3D this.getHeader('X-JSON');=0A= if (!json) return null;=0A= json =3D decodeURIComponent(escape(json));=0A= try {=0A= return json.evalJSON(this.request.options.sanitizeJSON ||=0A= !this.request.isSameOrigin());=0A= } catch (e) {=0A= this.request.dispatchException(e);=0A= }=0A= },=0A= =0A= _getResponseJSON: function() {=0A= var options =3D this.request.options;=0A= if (!options.evalJSON || (options.evalJSON !=3D 'force' &&=0A= !(this.getHeader('Content-type') || = '').include('application/json')) ||=0A= this.responseText.blank())=0A= return null;=0A= try {=0A= return this.responseText.evalJSON(options.sanitizeJSON ||=0A= !this.request.isSameOrigin());=0A= } catch (e) {=0A= this.request.dispatchException(e);=0A= }=0A= }=0A= });=0A= =0A= Ajax.Updater =3D Class.create(Ajax.Request, {=0A= initialize: function($super, container, url, options) {=0A= this.container =3D {=0A= success: (container.success || container),=0A= failure: (container.failure || (container.success ? null : = container))=0A= };=0A= =0A= options =3D Object.clone(options);=0A= var onComplete =3D options.onComplete;=0A= options.onComplete =3D (function(response, json) {=0A= this.updateContent(response.responseText);=0A= if (Object.isFunction(onComplete)) onComplete(response, json);=0A= }).bind(this);=0A= =0A= $super(url, options);=0A= },=0A= =0A= updateContent: function(responseText) {=0A= var receiver =3D this.container[this.success() ? 'success' : = 'failure'],=0A= options =3D this.options;=0A= =0A= if (!options.evalScripts) responseText =3D = responseText.stripScripts();=0A= =0A= if (receiver =3D $(receiver)) {=0A= if (options.insertion) {=0A= if (Object.isString(options.insertion)) {=0A= var insertion =3D { }; insertion[options.insertion] =3D = responseText;=0A= receiver.insert(insertion);=0A= }=0A= else options.insertion(receiver, responseText);=0A= }=0A= else receiver.update(responseText);=0A= }=0A= }=0A= });=0A= =0A= Ajax.PeriodicalUpdater =3D Class.create(Ajax.Base, {=0A= initialize: function($super, container, url, options) {=0A= $super(options);=0A= this.onComplete =3D this.options.onComplete;=0A= =0A= this.frequency =3D (this.options.frequency || 2);=0A= this.decay =3D (this.options.decay || 1);=0A= =0A= this.updater =3D { };=0A= this.container =3D container;=0A= this.url =3D url;=0A= =0A= this.start();=0A= },=0A= =0A= start: function() {=0A= this.options.onComplete =3D this.updateComplete.bind(this);=0A= this.onTimerEvent();=0A= },=0A= =0A= stop: function() {=0A= this.updater.options.onComplete =3D undefined;=0A= clearTimeout(this.timer);=0A= (this.onComplete || Prototype.emptyFunction).apply(this, arguments);=0A= },=0A= =0A= updateComplete: function(response) {=0A= if (this.options.decay) {=0A= this.decay =3D (response.responseText =3D=3D this.lastText ?=0A= this.decay * this.options.decay : 1);=0A= =0A= this.lastText =3D response.responseText;=0A= }=0A= this.timer =3D this.onTimerEvent.bind(this).delay(this.decay * = this.frequency);=0A= },=0A= =0A= onTimerEvent: function() {=0A= this.updater =3D new Ajax.Updater(this.container, this.url, = this.options);=0A= }=0A= });=0A= function $(element) {=0A= if (arguments.length > 1) {=0A= for (var i =3D 0, elements =3D [], length =3D arguments.length; i < = length; i++)=0A= elements.push($(arguments[i]));=0A= return elements;=0A= }=0A= if (Object.isString(element))=0A= element =3D document.getElementById(element);=0A= return Element.extend(element);=0A= }=0A= =0A= if (Prototype.BrowserFeatures.XPath) {=0A= document._getElementsByXPath =3D function(expression, parentElement) {=0A= var results =3D [];=0A= var query =3D document.evaluate(expression, $(parentElement) || = document,=0A= null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);=0A= for (var i =3D 0, length =3D query.snapshotLength; i < length; i++)=0A= results.push(Element.extend(query.snapshotItem(i)));=0A= return results;=0A= };=0A= }=0A= =0A= /*-----------------------------------------------------------------------= ---*/=0A= =0A= if (!window.Node) var Node =3D { };=0A= =0A= if (!Node.ELEMENT_NODE) {=0A= // DOM level 2 ECMAScript Language Binding=0A= Object.extend(Node, {=0A= ELEMENT_NODE: 1,=0A= ATTRIBUTE_NODE: 2,=0A= TEXT_NODE: 3,=0A= CDATA_SECTION_NODE: 4,=0A= ENTITY_REFERENCE_NODE: 5,=0A= ENTITY_NODE: 6,=0A= PROCESSING_INSTRUCTION_NODE: 7,=0A= COMMENT_NODE: 8,=0A= DOCUMENT_NODE: 9,=0A= DOCUMENT_TYPE_NODE: 10,=0A= DOCUMENT_FRAGMENT_NODE: 11,=0A= NOTATION_NODE: 12=0A= });=0A= }=0A= =0A= (function() {=0A= var element =3D this.Element;=0A= this.Element =3D function(tagName, attributes) {=0A= attributes =3D attributes || { };=0A= tagName =3D tagName.toLowerCase();=0A= var cache =3D Element.cache;=0A= if (Prototype.Browser.IE && attributes.name) {=0A= tagName =3D '<' + tagName + ' name=3D"' + attributes.name + '">';=0A= delete attributes.name;=0A= return Element.writeAttribute(document.createElement(tagName), = attributes);=0A= }=0A= if (!cache[tagName]) cache[tagName] =3D = Element.extend(document.createElement(tagName));=0A= return Element.writeAttribute(cache[tagName].cloneNode(false), = attributes);=0A= };=0A= Object.extend(this.Element, element || { });=0A= if (element) this.Element.prototype =3D element.prototype;=0A= }).call(window);=0A= =0A= Element.cache =3D { };=0A= =0A= Element.Methods =3D {=0A= visible: function(element) {=0A= return $(element).style.display !=3D 'none';=0A= },=0A= =0A= toggle: function(element) {=0A= element =3D $(element);=0A= Element[Element.visible(element) ? 'hide' : 'show'](element);=0A= return element;=0A= },=0A= =0A= hide: function(element) {=0A= element =3D $(element);=0A= element.style.display =3D 'none';=0A= return element;=0A= },=0A= =0A= show: function(element) {=0A= element =3D $(element);=0A= element.style.display =3D '';=0A= return element;=0A= },=0A= =0A= remove: function(element) {=0A= element =3D $(element);=0A= element.parentNode.removeChild(element);=0A= return element;=0A= },=0A= =0A= update: function(element, content) {=0A= element =3D $(element);=0A= if (content && content.toElement) content =3D content.toElement();=0A= if (Object.isElement(content)) return = element.update().insert(content);=0A= content =3D Object.toHTML(content);=0A= element.innerHTML =3D content.stripScripts();=0A= content.evalScripts.bind(content).defer();=0A= return element;=0A= },=0A= =0A= replace: function(element, content) {=0A= element =3D $(element);=0A= if (content && content.toElement) content =3D content.toElement();=0A= else if (!Object.isElement(content)) {=0A= content =3D Object.toHTML(content);=0A= var range =3D element.ownerDocument.createRange();=0A= range.selectNode(element);=0A= content.evalScripts.bind(content).defer();=0A= content =3D range.createContextualFragment(content.stripScripts());=0A= }=0A= element.parentNode.replaceChild(content, element);=0A= return element;=0A= },=0A= =0A= insert: function(element, insertions) {=0A= element =3D $(element);=0A= =0A= if (Object.isString(insertions) || Object.isNumber(insertions) ||=0A= Object.isElement(insertions) || (insertions && = (insertions.toElement || insertions.toHTML)))=0A= insertions =3D {bottom:insertions};=0A= =0A= var content, insert, tagName, childNodes;=0A= =0A= for (var position in insertions) {=0A= content =3D insertions[position];=0A= position =3D position.toLowerCase();=0A= insert =3D Element._insertionTranslations[position];=0A= =0A= if (content && content.toElement) content =3D content.toElement();=0A= if (Object.isElement(content)) {=0A= insert(element, content);=0A= continue;=0A= }=0A= =0A= content =3D Object.toHTML(content);=0A= =0A= tagName =3D ((position =3D=3D 'before' || position =3D=3D 'after')=0A= ? element.parentNode : element).tagName.toUpperCase();=0A= =0A= childNodes =3D Element._getContentFromAnonymousElement(tagName, = content.stripScripts());=0A= =0A= if (position =3D=3D 'top' || position =3D=3D 'after') = childNodes.reverse();=0A= childNodes.each(insert.curry(element));=0A= =0A= content.evalScripts.bind(content).defer();=0A= }=0A= =0A= return element;=0A= },=0A= =0A= wrap: function(element, wrapper, attributes) {=0A= element =3D $(element);=0A= if (Object.isElement(wrapper))=0A= $(wrapper).writeAttribute(attributes || { });=0A= else if (Object.isString(wrapper)) wrapper =3D new Element(wrapper, = attributes);=0A= else wrapper =3D new Element('div', wrapper);=0A= if (element.parentNode)=0A= element.parentNode.replaceChild(wrapper, element);=0A= wrapper.appendChild(element);=0A= return wrapper;=0A= },=0A= =0A= inspect: function(element) {=0A= element =3D $(element);=0A= var result =3D '<' + element.tagName.toLowerCase();=0A= $H({'id': 'id', 'className': 'class'}).each(function(pair) {=0A= var property =3D pair.first(), attribute =3D pair.last();=0A= var value =3D (element[property] || '').toString();=0A= if (value) result +=3D ' ' + attribute + '=3D' + = value.inspect(true);=0A= });=0A= return result + '>';=0A= },=0A= =0A= recursivelyCollect: function(element, property) {=0A= element =3D $(element);=0A= var elements =3D [];=0A= while (element =3D element[property])=0A= if (element.nodeType =3D=3D 1)=0A= elements.push(Element.extend(element));=0A= return elements;=0A= },=0A= =0A= ancestors: function(element) {=0A= return $(element).recursivelyCollect('parentNode');=0A= },=0A= =0A= descendants: function(element) {=0A= return $(element).select("*");=0A= },=0A= =0A= firstDescendant: function(element) {=0A= element =3D $(element).firstChild;=0A= while (element && element.nodeType !=3D 1) element =3D = element.nextSibling;=0A= return $(element);=0A= },=0A= =0A= immediateDescendants: function(element) {=0A= if (!(element =3D $(element).firstChild)) return [];=0A= while (element && element.nodeType !=3D 1) element =3D = element.nextSibling;=0A= if (element) return [element].concat($(element).nextSiblings());=0A= return [];=0A= },=0A= =0A= previousSiblings: function(element) {=0A= return $(element).recursivelyCollect('previousSibling');=0A= },=0A= =0A= nextSiblings: function(element) {=0A= return $(element).recursivelyCollect('nextSibling');=0A= },=0A= =0A= siblings: function(element) {=0A= element =3D $(element);=0A= return = element.previousSiblings().reverse().concat(element.nextSiblings());=0A= },=0A= =0A= match: function(element, selector) {=0A= if (Object.isString(selector))=0A= selector =3D new Selector(selector);=0A= return selector.match($(element));=0A= },=0A= =0A= up: function(element, expression, index) {=0A= element =3D $(element);=0A= if (arguments.length =3D=3D 1) return $(element.parentNode);=0A= var ancestors =3D element.ancestors();=0A= return Object.isNumber(expression) ? ancestors[expression] :=0A= Selector.findElement(ancestors, expression, index);=0A= },=0A= =0A= down: function(element, expression, index) {=0A= element =3D $(element);=0A= if (arguments.length =3D=3D 1) return element.firstDescendant();=0A= return Object.isNumber(expression) ? = element.descendants()[expression] :=0A= Element.select(element, expression)[index || 0];=0A= },=0A= =0A= previous: function(element, expression, index) {=0A= element =3D $(element);=0A= if (arguments.length =3D=3D 1) return = $(Selector.handlers.previousElementSibling(element));=0A= var previousSiblings =3D element.previousSiblings();=0A= return Object.isNumber(expression) ? previousSiblings[expression] :=0A= Selector.findElement(previousSiblings, expression, index);=0A= },=0A= =0A= next: function(element, expression, index) {=0A= element =3D $(element);=0A= if (arguments.length =3D=3D 1) return = $(Selector.handlers.nextElementSibling(element));=0A= var nextSiblings =3D element.nextSiblings();=0A= return Object.isNumber(expression) ? nextSiblings[expression] :=0A= Selector.findElement(nextSiblings, expression, index);=0A= },=0A= =0A= select: function() {=0A= var args =3D $A(arguments), element =3D $(args.shift());=0A= return Selector.findChildElements(element, args);=0A= },=0A= =0A= adjacent: function() {=0A= var args =3D $A(arguments), element =3D $(args.shift());=0A= return Selector.findChildElements(element.parentNode, = args).without(element);=0A= },=0A= =0A= identify: function(element) {=0A= element =3D $(element);=0A= var id =3D element.readAttribute('id'), self =3D arguments.callee;=0A= if (id) return id;=0A= do { id =3D 'anonymous_element_' + self.counter++ } while ($(id));=0A= element.writeAttribute('id', id);=0A= return id;=0A= },=0A= =0A= readAttribute: function(element, name) {=0A= element =3D $(element);=0A= if (Prototype.Browser.IE) {=0A= var t =3D Element._attributeTranslations.read;=0A= if (t.values[name]) return t.values[name](element, name);=0A= if (t.names[name]) name =3D t.names[name];=0A= if (name.include(':')) {=0A= return (!element.attributes || !element.attributes[name]) ? null = :=0A= element.attributes[name].value;=0A= }=0A= }=0A= return element.getAttribute(name);=0A= },=0A= =0A= writeAttribute: function(element, name, value) {=0A= element =3D $(element);=0A= var attributes =3D { }, t =3D Element._attributeTranslations.write;=0A= =0A= if (typeof name =3D=3D 'object') attributes =3D name;=0A= else attributes[name] =3D Object.isUndefined(value) ? true : value;=0A= =0A= for (var attr in attributes) {=0A= name =3D t.names[attr] || attr;=0A= value =3D attributes[attr];=0A= if (t.values[attr]) name =3D t.values[attr](element, value);=0A= if (value =3D=3D=3D false || value =3D=3D=3D null)=0A= element.removeAttribute(name);=0A= else if (value =3D=3D=3D true)=0A= element.setAttribute(name, name);=0A= else element.setAttribute(name, value);=0A= }=0A= return element;=0A= },=0A= =0A= getHeight: function(element) {=0A= return $(element).getDimensions().height;=0A= },=0A= =0A= getWidth: function(element) {=0A= return $(element).getDimensions().width;=0A= },=0A= =0A= classNames: function(element) {=0A= return new Element.ClassNames(element);=0A= },=0A= =0A= hasClassName: function(element, className) {=0A= if (!(element =3D $(element))) return;=0A= var elementClassName =3D element.className;=0A= return (elementClassName.length > 0 && (elementClassName =3D=3D = className ||=0A= new RegExp("(^|\\s)" + className + = "(\\s|$)").test(elementClassName)));=0A= },=0A= =0A= addClassName: function(element, className) {=0A= if (!(element =3D $(element))) return;=0A= if (!element.hasClassName(className))=0A= element.className +=3D (element.className ? ' ' : '') + className;=0A= return element;=0A= },=0A= =0A= removeClassName: function(element, className) {=0A= if (!(element =3D $(element))) return;=0A= element.className =3D element.className.replace(=0A= new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();=0A= return element;=0A= },=0A= =0A= toggleClassName: function(element, className) {=0A= if (!(element =3D $(element))) return;=0A= return element[element.hasClassName(className) ?=0A= 'removeClassName' : 'addClassName'](className);=0A= },=0A= =0A= // removes whitespace-only text node children=0A= cleanWhitespace: function(element) {=0A= element =3D $(element);=0A= var node =3D element.firstChild;=0A= while (node) {=0A= var nextNode =3D node.nextSibling;=0A= if (node.nodeType =3D=3D 3 && !/\S/.test(node.nodeValue))=0A= element.removeChild(node);=0A= node =3D nextNode;=0A= }=0A= return element;=0A= },=0A= =0A= empty: function(element) {=0A= return $(element).innerHTML.blank();=0A= },=0A= =0A= descendantOf: function(element, ancestor) {=0A= element =3D $(element), ancestor =3D $(ancestor);=0A= =0A= if (element.compareDocumentPosition)=0A= return (element.compareDocumentPosition(ancestor) & 8) =3D=3D=3D 8;=0A= =0A= if (ancestor.contains)=0A= return ancestor.contains(element) && ancestor !=3D=3D element;=0A= =0A= while (element =3D element.parentNode)=0A= if (element =3D=3D ancestor) return true;=0A= =0A= return false;=0A= },=0A= =0A= scrollTo: function(element) {=0A= element =3D $(element);=0A= var pos =3D element.cumulativeOffset();=0A= window.scrollTo(pos[0], pos[1]);=0A= return element;=0A= },=0A= =0A= getStyle: function(element, style) {=0A= element =3D $(element);=0A= style =3D style =3D=3D 'float' ? 'cssFloat' : style.camelize();=0A= var value =3D element.style[style];=0A= if (!value || value =3D=3D 'auto') {=0A= var css =3D document.defaultView.getComputedStyle(element, null);=0A= value =3D css ? css[style] : null;=0A= }=0A= if (style =3D=3D 'opacity') return value ? parseFloat(value) : 1.0;=0A= return value =3D=3D 'auto' ? null : value;=0A= },=0A= =0A= getOpacity: function(element) {=0A= return $(element).getStyle('opacity');=0A= },=0A= =0A= setStyle: function(element, styles) {=0A= element =3D $(element);=0A= var elementStyle =3D element.style, match;=0A= if (Object.isString(styles)) {=0A= element.style.cssText +=3D ';' + styles;=0A= return styles.include('opacity') ?=0A= element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : = element;=0A= }=0A= for (var property in styles)=0A= if (property =3D=3D 'opacity') = element.setOpacity(styles[property]);=0A= else=0A= elementStyle[(property =3D=3D 'float' || property =3D=3D = 'cssFloat') ?=0A= (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : = 'styleFloat') :=0A= property] =3D styles[property];=0A= =0A= return element;=0A= },=0A= =0A= setOpacity: function(element, value) {=0A= element =3D $(element);=0A= element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? = '' :=0A= (value < 0.00001) ? 0 : value;=0A= return element;=0A= },=0A= =0A= getDimensions: function(element) {=0A= element =3D $(element);=0A= var display =3D element.getStyle('display');=0A= if (display !=3D 'none' && display !=3D null) // Safari bug=0A= return {width: element.offsetWidth, height: element.offsetHeight};=0A= =0A= // All *Width and *Height properties give 0 on elements with display = none,=0A= // so enable the element temporarily=0A= var els =3D element.style;=0A= var originalVisibility =3D els.visibility;=0A= var originalPosition =3D els.position;=0A= var originalDisplay =3D els.display;=0A= els.visibility =3D 'hidden';=0A= els.position =3D 'absolute';=0A= els.display =3D 'block';=0A= var originalWidth =3D element.clientWidth;=0A= var originalHeight =3D element.clientHeight;=0A= els.display =3D originalDisplay;=0A= els.position =3D originalPosition;=0A= els.visibility =3D originalVisibility;=0A= return {width: originalWidth, height: originalHeight};=0A= },=0A= =0A= makePositioned: function(element) {=0A= element =3D $(element);=0A= var pos =3D Element.getStyle(element, 'position');=0A= if (pos =3D=3D 'static' || !pos) {=0A= element._madePositioned =3D true;=0A= element.style.position =3D 'relative';=0A= // Opera returns the offset relative to the positioning context, = when an=0A= // element is position relative but top and left have not been = defined=0A= if (Prototype.Browser.Opera) {=0A= element.style.top =3D 0;=0A= element.style.left =3D 0;=0A= }=0A= }=0A= return element;=0A= },=0A= =0A= undoPositioned: function(element) {=0A= element =3D $(element);=0A= if (element._madePositioned) {=0A= element._madePositioned =3D undefined;=0A= element.style.position =3D=0A= element.style.top =3D=0A= element.style.left =3D=0A= element.style.bottom =3D=0A= element.style.right =3D '';=0A= }=0A= return element;=0A= },=0A= =0A= makeClipping: function(element) {=0A= element =3D $(element);=0A= if (element._overflow) return element;=0A= element._overflow =3D Element.getStyle(element, 'overflow') || = 'auto';=0A= if (element._overflow !=3D=3D 'hidden')=0A= element.style.overflow =3D 'hidden';=0A= return element;=0A= },=0A= =0A= undoClipping: function(element) {=0A= element =3D $(element);=0A= if (!element._overflow) return element;=0A= element.style.overflow =3D element._overflow =3D=3D 'auto' ? '' : = element._overflow;=0A= element._overflow =3D null;=0A= return element;=0A= },=0A= =0A= cumulativeOffset: function(element) {=0A= var valueT =3D 0, valueL =3D 0;=0A= do {=0A= valueT +=3D element.offsetTop || 0;=0A= valueL +=3D element.offsetLeft || 0;=0A= element =3D element.offsetParent;=0A= } while (element);=0A= return Element._returnOffset(valueL, valueT);=0A= },=0A= =0A= positionedOffset: function(element) {=0A= var valueT =3D 0, valueL =3D 0;=0A= do {=0A= valueT +=3D element.offsetTop || 0;=0A= valueL +=3D element.offsetLeft || 0;=0A= element =3D element.offsetParent;=0A= if (element) {=0A= if (element.tagName.toUpperCase() =3D=3D 'BODY') break;=0A= var p =3D Element.getStyle(element, 'position');=0A= if (p !=3D=3D 'static') break;=0A= }=0A= } while (element);=0A= return Element._returnOffset(valueL, valueT);=0A= },=0A= =0A= absolutize: function(element) {=0A= element =3D $(element);=0A= if (element.getStyle('position') =3D=3D 'absolute') return element;=0A= // Position.prepare(); // To be done manually by Scripty when it = needs it.=0A= =0A= var offsets =3D element.positionedOffset();=0A= var top =3D offsets[1];=0A= var left =3D offsets[0];=0A= var width =3D element.clientWidth;=0A= var height =3D element.clientHeight;=0A= =0A= element._originalLeft =3D left - parseFloat(element.style.left || = 0);=0A= element._originalTop =3D top - parseFloat(element.style.top || = 0);=0A= element._originalWidth =3D element.style.width;=0A= element._originalHeight =3D element.style.height;=0A= =0A= element.style.position =3D 'absolute';=0A= element.style.top =3D top + 'px';=0A= element.style.left =3D left + 'px';=0A= element.style.width =3D width + 'px';=0A= element.style.height =3D height + 'px';=0A= return element;=0A= },=0A= =0A= relativize: function(element) {=0A= element =3D $(element);=0A= if (element.getStyle('position') =3D=3D 'relative') return element;=0A= // Position.prepare(); // To be done manually by Scripty when it = needs it.=0A= =0A= element.style.position =3D 'relative';=0A= var top =3D parseFloat(element.style.top || 0) - = (element._originalTop || 0);=0A= var left =3D parseFloat(element.style.left || 0) - = (element._originalLeft || 0);=0A= =0A= element.style.top =3D top + 'px';=0A= element.style.left =3D left + 'px';=0A= element.style.height =3D element._originalHeight;=0A= element.style.width =3D element._originalWidth;=0A= return element;=0A= },=0A= =0A= cumulativeScrollOffset: function(element) {=0A= var valueT =3D 0, valueL =3D 0;=0A= do {=0A= valueT +=3D element.scrollTop || 0;=0A= valueL +=3D element.scrollLeft || 0;=0A= element =3D element.parentNode;=0A= } while (element);=0A= return Element._returnOffset(valueL, valueT);=0A= },=0A= =0A= getOffsetParent: function(element) {=0A= if (element.offsetParent) return $(element.offsetParent);=0A= if (element =3D=3D document.body) return $(element);=0A= =0A= while ((element =3D element.parentNode) && element !=3D = document.body)=0A= if (Element.getStyle(element, 'position') !=3D 'static')=0A= return $(element);=0A= =0A= return $(document.body);=0A= },=0A= =0A= viewportOffset: function(forElement) {=0A= var valueT =3D 0, valueL =3D 0;=0A= =0A= var element =3D forElement;=0A= do {=0A= valueT +=3D element.offsetTop || 0;=0A= valueL +=3D element.offsetLeft || 0;=0A= =0A= // Safari fix=0A= if (element.offsetParent =3D=3D document.body &&=0A= Element.getStyle(element, 'position') =3D=3D 'absolute') break;=0A= =0A= } while (element =3D element.offsetParent);=0A= =0A= element =3D forElement;=0A= do {=0A= if (!Prototype.Browser.Opera || (element.tagName && = (element.tagName.toUpperCase() =3D=3D 'BODY'))) {=0A= valueT -=3D element.scrollTop || 0;=0A= valueL -=3D element.scrollLeft || 0;=0A= }=0A= } while (element =3D element.parentNode);=0A= =0A= return Element._returnOffset(valueL, valueT);=0A= },=0A= =0A= clonePosition: function(element, source) {=0A= var options =3D Object.extend({=0A= setLeft: true,=0A= setTop: true,=0A= setWidth: true,=0A= setHeight: true,=0A= offsetTop: 0,=0A= offsetLeft: 0=0A= }, arguments[2] || { });=0A= =0A= // find page position of source=0A= source =3D $(source);=0A= var p =3D source.viewportOffset();=0A= =0A= // find coordinate system to use=0A= element =3D $(element);=0A= var delta =3D [0, 0];=0A= var parent =3D null;=0A= // delta [0,0] will do fine with position: fixed elements,=0A= // position:absolute needs offsetParent deltas=0A= if (Element.getStyle(element, 'position') =3D=3D 'absolute') {=0A= parent =3D element.getOffsetParent();=0A= delta =3D parent.viewportOffset();=0A= }=0A= =0A= // correct by body offsets (fixes Safari)=0A= if (parent =3D=3D document.body) {=0A= delta[0] -=3D document.body.offsetLeft;=0A= delta[1] -=3D document.body.offsetTop;=0A= }=0A= =0A= // set position=0A= if (options.setLeft) element.style.left =3D (p[0] - delta[0] + = options.offsetLeft) + 'px';=0A= if (options.setTop) element.style.top =3D (p[1] - delta[1] + = options.offsetTop) + 'px';=0A= if (options.setWidth) element.style.width =3D source.offsetWidth + = 'px';=0A= if (options.setHeight) element.style.height =3D source.offsetHeight = + 'px';=0A= return element;=0A= }=0A= };=0A= =0A= Element.Methods.identify.counter =3D 1;=0A= =0A= Object.extend(Element.Methods, {=0A= getElementsBySelector: Element.Methods.select,=0A= childElements: Element.Methods.immediateDescendants=0A= });=0A= =0A= Element._attributeTranslations =3D {=0A= write: {=0A= names: {=0A= className: 'class',=0A= htmlFor: 'for'=0A= },=0A= values: { }=0A= }=0A= };=0A= =0A= if (Prototype.Browser.Opera) {=0A= Element.Methods.getStyle =3D Element.Methods.getStyle.wrap(=0A= function(proceed, element, style) {=0A= switch (style) {=0A= case 'left': case 'top': case 'right': case 'bottom':=0A= if (proceed(element, 'position') =3D=3D=3D 'static') return = null;=0A= case 'height': case 'width':=0A= // returns '0px' for hidden elements; we want it to return null=0A= if (!Element.visible(element)) return null;=0A= =0A= // returns the border-box dimensions rather than the = content-box=0A= // dimensions, so we subtract padding and borders from the = value=0A= var dim =3D parseInt(proceed(element, style), 10);=0A= =0A= if (dim !=3D=3D element['offset' + style.capitalize()])=0A= return dim + 'px';=0A= =0A= var properties;=0A= if (style =3D=3D=3D 'height') {=0A= properties =3D ['border-top-width', 'padding-top',=0A= 'padding-bottom', 'border-bottom-width'];=0A= }=0A= else {=0A= properties =3D ['border-left-width', 'padding-left',=0A= 'padding-right', 'border-right-width'];=0A= }=0A= return properties.inject(dim, function(memo, property) {=0A= var val =3D proceed(element, property);=0A= return val =3D=3D=3D null ? memo : memo - parseInt(val, 10);=0A= }) + 'px';=0A= default: return proceed(element, style);=0A= }=0A= }=0A= );=0A= =0A= Element.Methods.readAttribute =3D Element.Methods.readAttribute.wrap(=0A= function(proceed, element, attribute) {=0A= if (attribute =3D=3D=3D 'title') return element.title;=0A= return proceed(element, attribute);=0A= }=0A= );=0A= }=0A= =0A= else if (Prototype.Browser.IE) {=0A= // IE doesn't report offsets correctly for static elements, so we = change them=0A= // to "relative" to get the values, then change them back.=0A= Element.Methods.getOffsetParent =3D = Element.Methods.getOffsetParent.wrap(=0A= function(proceed, element) {=0A= element =3D $(element);=0A= // IE throws an error if element is not in document=0A= try { element.offsetParent }=0A= catch(e) { return $(document.body) }=0A= var position =3D element.getStyle('position');=0A= if (position !=3D=3D 'static') return proceed(element);=0A= element.setStyle({ position: 'relative' });=0A= var value =3D proceed(element);=0A= element.setStyle({ position: position });=0A= return value;=0A= }=0A= );=0A= =0A= $w('positionedOffset viewportOffset').each(function(method) {=0A= Element.Methods[method] =3D Element.Methods[method].wrap(=0A= function(proceed, element) {=0A= element =3D $(element);=0A= try { element.offsetParent }=0A= catch(e) { return Element._returnOffset(0,0) }=0A= var position =3D element.getStyle('position');=0A= if (position !=3D=3D 'static') return proceed(element);=0A= // Trigger hasLayout on the offset parent so that IE6 reports=0A= // accurate offsetTop and offsetLeft values for position: fixed.=0A= var offsetParent =3D element.getOffsetParent();=0A= if (offsetParent && offsetParent.getStyle('position') =3D=3D=3D = 'fixed')=0A= offsetParent.setStyle({ zoom: 1 });=0A= element.setStyle({ position: 'relative' });=0A= var value =3D proceed(element);=0A= element.setStyle({ position: position });=0A= return value;=0A= }=0A= );=0A= });=0A= =0A= Element.Methods.cumulativeOffset =3D = Element.Methods.cumulativeOffset.wrap(=0A= function(proceed, element) {=0A= try { element.offsetParent }=0A= catch(e) { return Element._returnOffset(0,0) }=0A= return proceed(element);=0A= }=0A= );=0A= =0A= Element.Methods.getStyle =3D function(element, style) {=0A= element =3D $(element);=0A= style =3D (style =3D=3D 'float' || style =3D=3D 'cssFloat') ? = 'styleFloat' : style.camelize();=0A= var value =3D element.style[style];=0A= if (!value && element.currentStyle) value =3D = element.currentStyle[style];=0A= =0A= if (style =3D=3D 'opacity') {=0A= if (value =3D (element.getStyle('filter') || = '').match(/alpha\(opacity=3D(.*)\)/))=0A= if (value[1]) return parseFloat(value[1]) / 100;=0A= return 1.0;=0A= }=0A= =0A= if (value =3D=3D 'auto') {=0A= if ((style =3D=3D 'width' || style =3D=3D 'height') && = (element.getStyle('display') !=3D 'none'))=0A= return element['offset' + style.capitalize()] + 'px';=0A= return null;=0A= }=0A= return value;=0A= };=0A= =0A= Element.Methods.setOpacity =3D function(element, value) {=0A= function stripAlpha(filter){=0A= return filter.replace(/alpha\([^\)]*\)/gi,'');=0A= }=0A= element =3D $(element);=0A= var currentStyle =3D element.currentStyle;=0A= if ((currentStyle && !currentStyle.hasLayout) ||=0A= (!currentStyle && element.style.zoom =3D=3D 'normal'))=0A= element.style.zoom =3D 1;=0A= =0A= var filter =3D element.getStyle('filter'), style =3D element.style;=0A= if (value =3D=3D 1 || value =3D=3D=3D '') {=0A= (filter =3D stripAlpha(filter)) ?=0A= style.filter =3D filter : style.removeAttribute('filter');=0A= return element;=0A= } else if (value < 0.00001) value =3D 0;=0A= style.filter =3D stripAlpha(filter) +=0A= 'alpha(opacity=3D' + (value * 100) + ')';=0A= return element;=0A= };=0A= =0A= Element._attributeTranslations =3D {=0A= read: {=0A= names: {=0A= 'class': 'className',=0A= 'for': 'htmlFor'=0A= },=0A= values: {=0A= _getAttr: function(element, attribute) {=0A= return element.getAttribute(attribute, 2);=0A= },=0A= _getAttrNode: function(element, attribute) {=0A= var node =3D element.getAttributeNode(attribute);=0A= return node ? node.value : "";=0A= },=0A= _getEv: function(element, attribute) {=0A= attribute =3D element.getAttribute(attribute);=0A= return attribute ? attribute.toString().slice(23, -2) : null;=0A= },=0A= _flag: function(element, attribute) {=0A= return $(element).hasAttribute(attribute) ? attribute : null;=0A= },=0A= style: function(element) {=0A= return element.style.cssText.toLowerCase();=0A= },=0A= title: function(element) {=0A= return element.title;=0A= }=0A= }=0A= }=0A= };=0A= =0A= Element._attributeTranslations.write =3D {=0A= names: Object.extend({=0A= cellpadding: 'cellPadding',=0A= cellspacing: 'cellSpacing'=0A= }, Element._attributeTranslations.read.names),=0A= values: {=0A= checked: function(element, value) {=0A= element.checked =3D !!value;=0A= },=0A= =0A= style: function(element, value) {=0A= element.style.cssText =3D value ? value : '';=0A= }=0A= }=0A= };=0A= =0A= Element._attributeTranslations.has =3D {};=0A= =0A= $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +=0A= 'encType maxLength readOnly longDesc = frameBorder').each(function(attr) {=0A= Element._attributeTranslations.write.names[attr.toLowerCase()] =3D = attr;=0A= Element._attributeTranslations.has[attr.toLowerCase()] =3D attr;=0A= });=0A= =0A= (function(v) {=0A= Object.extend(v, {=0A= href: v._getAttr,=0A= src: v._getAttr,=0A= type: v._getAttr,=0A= action: v._getAttrNode,=0A= disabled: v._flag,=0A= checked: v._flag,=0A= readonly: v._flag,=0A= multiple: v._flag,=0A= onload: v._getEv,=0A= onunload: v._getEv,=0A= onclick: v._getEv,=0A= ondblclick: v._getEv,=0A= onmousedown: v._getEv,=0A= onmouseup: v._getEv,=0A= onmouseover: v._getEv,=0A= onmousemove: v._getEv,=0A= onmouseout: v._getEv,=0A= onfocus: v._getEv,=0A= onblur: v._getEv,=0A= onkeypress: v._getEv,=0A= onkeydown: v._getEv,=0A= onkeyup: v._getEv,=0A= onsubmit: v._getEv,=0A= onreset: v._getEv,=0A= onselect: v._getEv,=0A= onchange: v._getEv=0A= });=0A= })(Element._attributeTranslations.read.values);=0A= }=0A= =0A= else if (Prototype.Browser.Gecko && = /rv:1\.8\.0/.test(navigator.userAgent)) {=0A= Element.Methods.setOpacity =3D function(element, value) {=0A= element =3D $(element);=0A= element.style.opacity =3D (value =3D=3D 1) ? 0.999999 :=0A= (value =3D=3D=3D '') ? '' : (value < 0.00001) ? 0 : value;=0A= return element;=0A= };=0A= }=0A= =0A= else if (Prototype.Browser.WebKit) {=0A= Element.Methods.setOpacity =3D function(element, value) {=0A= element =3D $(element);=0A= element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? = '' :=0A= (value < 0.00001) ? 0 : value;=0A= =0A= if (value =3D=3D 1)=0A= if(element.tagName.toUpperCase() =3D=3D 'IMG' && element.width) {=0A= element.width++; element.width--;=0A= } else try {=0A= var n =3D document.createTextNode(' ');=0A= element.appendChild(n);=0A= element.removeChild(n);=0A= } catch (e) { }=0A= =0A= return element;=0A= };=0A= =0A= // Safari returns margins on body which is incorrect if the child is = absolutely=0A= // positioned. For performance reasons, redefine = Element#cumulativeOffset for=0A= // KHTML/WebKit only.=0A= Element.Methods.cumulativeOffset =3D function(element) {=0A= var valueT =3D 0, valueL =3D 0;=0A= do {=0A= valueT +=3D element.offsetTop || 0;=0A= valueL +=3D element.offsetLeft || 0;=0A= if (element.offsetParent =3D=3D document.body)=0A= if (Element.getStyle(element, 'position') =3D=3D 'absolute') = break;=0A= =0A= element =3D element.offsetParent;=0A= } while (element);=0A= =0A= return Element._returnOffset(valueL, valueT);=0A= };=0A= }=0A= =0A= if (Prototype.Browser.IE || Prototype.Browser.Opera) {=0A= // IE and Opera are missing .innerHTML support for TABLE-related and = SELECT elements=0A= Element.Methods.update =3D function(element, content) {=0A= element =3D $(element);=0A= =0A= if (content && content.toElement) content =3D content.toElement();=0A= if (Object.isElement(content)) return = element.update().insert(content);=0A= =0A= content =3D Object.toHTML(content);=0A= var tagName =3D element.tagName.toUpperCase();=0A= =0A= if (tagName in Element._insertionTranslations.tags) {=0A= $A(element.childNodes).each(function(node) { = element.removeChild(node) });=0A= Element._getContentFromAnonymousElement(tagName, = content.stripScripts())=0A= .each(function(node) { element.appendChild(node) });=0A= }=0A= else element.innerHTML =3D content.stripScripts();=0A= =0A= content.evalScripts.bind(content).defer();=0A= return element;=0A= };=0A= }=0A= =0A= if ('outerHTML' in document.createElement('div')) {=0A= Element.Methods.replace =3D function(element, content) {=0A= element =3D $(element);=0A= =0A= if (content && content.toElement) content =3D content.toElement();=0A= if (Object.isElement(content)) {=0A= element.parentNode.replaceChild(content, element);=0A= return element;=0A= }=0A= =0A= content =3D Object.toHTML(content);=0A= var parent =3D element.parentNode, tagName =3D = parent.tagName.toUpperCase();=0A= =0A= if (Element._insertionTranslations.tags[tagName]) {=0A= var nextSibling =3D element.next();=0A= var fragments =3D Element._getContentFromAnonymousElement(tagName, = content.stripScripts());=0A= parent.removeChild(element);=0A= if (nextSibling)=0A= fragments.each(function(node) { parent.insertBefore(node, = nextSibling) });=0A= else=0A= fragments.each(function(node) { parent.appendChild(node) });=0A= }=0A= else element.outerHTML =3D content.stripScripts();=0A= =0A= content.evalScripts.bind(content).defer();=0A= return element;=0A= };=0A= }=0A= =0A= Element._returnOffset =3D function(l, t) {=0A= var result =3D [l, t];=0A= result.left =3D l;=0A= result.top =3D t;=0A= return result;=0A= };=0A= =0A= Element._getContentFromAnonymousElement =3D function(tagName, html) {=0A= var div =3D new Element('div'), t =3D = Element._insertionTranslations.tags[tagName];=0A= if (t) {=0A= div.innerHTML =3D t[0] + html + t[1];=0A= t[2].times(function() { div =3D div.firstChild });=0A= } else div.innerHTML =3D html;=0A= return $A(div.childNodes);=0A= };=0A= =0A= Element._insertionTranslations =3D {=0A= before: function(element, node) {=0A= element.parentNode.insertBefore(node, element);=0A= },=0A= top: function(element, node) {=0A= element.insertBefore(node, element.firstChild);=0A= },=0A= bottom: function(element, node) {=0A= element.appendChild(node);=0A= },=0A= after: function(element, node) {=0A= element.parentNode.insertBefore(node, element.nextSibling);=0A= },=0A= tags: {=0A= TABLE: ['', '
', 1],=0A= TBODY: ['', '
', 2],=0A= TR: ['', '
', 3],=0A= TD: ['
', '
', 4],=0A= SELECT: ['', 1]=0A= }=0A= };=0A= =0A= (function() {=0A= Object.extend(this.tags, {=0A= THEAD: this.tags.TBODY,=0A= TFOOT: this.tags.TBODY,=0A= TH: this.tags.TD=0A= });=0A= }).call(Element._insertionTranslations);=0A= =0A= Element.Methods.Simulated =3D {=0A= hasAttribute: function(element, attribute) {=0A= attribute =3D Element._attributeTranslations.has[attribute] || = attribute;=0A= var node =3D $(element).getAttributeNode(attribute);=0A= return !!(node && node.specified);=0A= }=0A= };=0A= =0A= Element.Methods.ByTag =3D { };=0A= =0A= Object.extend(Element, Element.Methods);=0A= =0A= if (!Prototype.BrowserFeatures.ElementExtensions &&=0A= document.createElement('div')['__proto__']) {=0A= window.HTMLElement =3D { };=0A= window.HTMLElement.prototype =3D = document.createElement('div')['__proto__'];=0A= Prototype.BrowserFeatures.ElementExtensions =3D true;=0A= }=0A= =0A= Element.extend =3D (function() {=0A= if (Prototype.BrowserFeatures.SpecificElementExtensions)=0A= return Prototype.K;=0A= =0A= var Methods =3D { }, ByTag =3D Element.Methods.ByTag;=0A= =0A= var extend =3D Object.extend(function(element) {=0A= if (!element || element._extendedByPrototype ||=0A= element.nodeType !=3D 1 || element =3D=3D window) return element;=0A= =0A= var methods =3D Object.clone(Methods),=0A= tagName =3D element.tagName.toUpperCase(), property, value;=0A= =0A= // extend methods for specific tags=0A= if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);=0A= =0A= for (property in methods) {=0A= value =3D methods[property];=0A= if (Object.isFunction(value) && !(property in element))=0A= element[property] =3D value.methodize();=0A= }=0A= =0A= element._extendedByPrototype =3D Prototype.emptyFunction;=0A= return element;=0A= =0A= }, {=0A= refresh: function() {=0A= // extend methods for all tags (Safari doesn't need this)=0A= if (!Prototype.BrowserFeatures.ElementExtensions) {=0A= Object.extend(Methods, Element.Methods);=0A= Object.extend(Methods, Element.Methods.Simulated);=0A= }=0A= }=0A= });=0A= =0A= extend.refresh();=0A= return extend;=0A= })();=0A= =0A= Element.hasAttribute =3D function(element, attribute) {=0A= if (element.hasAttribute) return element.hasAttribute(attribute);=0A= return Element.Methods.Simulated.hasAttribute(element, attribute);=0A= };=0A= =0A= Element.addMethods =3D function(methods) {=0A= var F =3D Prototype.BrowserFeatures, T =3D Element.Methods.ByTag;=0A= =0A= if (!methods) {=0A= Object.extend(Form, Form.Methods);=0A= Object.extend(Form.Element, Form.Element.Methods);=0A= Object.extend(Element.Methods.ByTag, {=0A= "FORM": Object.clone(Form.Methods),=0A= "INPUT": Object.clone(Form.Element.Methods),=0A= "SELECT": Object.clone(Form.Element.Methods),=0A= "TEXTAREA": Object.clone(Form.Element.Methods)=0A= });=0A= }=0A= =0A= if (arguments.length =3D=3D 2) {=0A= var tagName =3D methods;=0A= methods =3D arguments[1];=0A= }=0A= =0A= if (!tagName) Object.extend(Element.Methods, methods || { });=0A= else {=0A= if (Object.isArray(tagName)) tagName.each(extend);=0A= else extend(tagName);=0A= }=0A= =0A= function extend(tagName) {=0A= tagName =3D tagName.toUpperCase();=0A= if (!Element.Methods.ByTag[tagName])=0A= Element.Methods.ByTag[tagName] =3D { };=0A= Object.extend(Element.Methods.ByTag[tagName], methods);=0A= }=0A= =0A= function copy(methods, destination, onlyIfAbsent) {=0A= onlyIfAbsent =3D onlyIfAbsent || false;=0A= for (var property in methods) {=0A= var value =3D methods[property];=0A= if (!Object.isFunction(value)) continue;=0A= if (!onlyIfAbsent || !(property in destination))=0A= destination[property] =3D value.methodize();=0A= }=0A= }=0A= =0A= function findDOMClass(tagName) {=0A= var klass;=0A= var trans =3D {=0A= "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",=0A= "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": = "DList",=0A= "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": = "Heading",=0A= "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",=0A= "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", = "CAPTION":=0A= "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":=0A= "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", = "TR":=0A= "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":=0A= "FrameSet", "IFRAME": "IFrame"=0A= };=0A= if (trans[tagName]) klass =3D 'HTML' + trans[tagName] + 'Element';=0A= if (window[klass]) return window[klass];=0A= klass =3D 'HTML' + tagName + 'Element';=0A= if (window[klass]) return window[klass];=0A= klass =3D 'HTML' + tagName.capitalize() + 'Element';=0A= if (window[klass]) return window[klass];=0A= =0A= window[klass] =3D { };=0A= window[klass].prototype =3D = document.createElement(tagName)['__proto__'];=0A= return window[klass];=0A= }=0A= =0A= if (F.ElementExtensions) {=0A= copy(Element.Methods, HTMLElement.prototype);=0A= copy(Element.Methods.Simulated, HTMLElement.prototype, true);=0A= }=0A= =0A= if (F.SpecificElementExtensions) {=0A= for (var tag in Element.Methods.ByTag) {=0A= var klass =3D findDOMClass(tag);=0A= if (Object.isUndefined(klass)) continue;=0A= copy(T[tag], klass.prototype);=0A= }=0A= }=0A= =0A= Object.extend(Element, Element.Methods);=0A= delete Element.ByTag;=0A= =0A= if (Element.extend.refresh) Element.extend.refresh();=0A= Element.cache =3D { };=0A= };=0A= =0A= document.viewport =3D {=0A= getDimensions: function() {=0A= var dimensions =3D { }, B =3D Prototype.Browser;=0A= $w('width height').each(function(d) {=0A= var D =3D d.capitalize();=0A= if (B.WebKit && !document.evaluate) {=0A= // Safari <3.0 needs self.innerWidth/Height=0A= dimensions[d] =3D self['inner' + D];=0A= } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) {=0A= // Opera <9.5 needs document.body.clientWidth/Height=0A= dimensions[d] =3D document.body['client' + D]=0A= } else {=0A= dimensions[d] =3D document.documentElement['client' + D];=0A= }=0A= });=0A= return dimensions;=0A= },=0A= =0A= getWidth: function() {=0A= return this.getDimensions().width;=0A= },=0A= =0A= getHeight: function() {=0A= return this.getDimensions().height;=0A= },=0A= =0A= getScrollOffsets: function() {=0A= return Element._returnOffset(=0A= window.pageXOffset || document.documentElement.scrollLeft || = document.body.scrollLeft,=0A= window.pageYOffset || document.documentElement.scrollTop || = document.body.scrollTop);=0A= }=0A= };=0A= /* Portions of the Selector class are derived from Jack Slocum's = DomQuery,=0A= * part of YUI-Ext version 0.40, distributed under the terms of an = MIT-style=0A= * license. Please see http://www.yui-ext.com/ for more information. */=0A= =0A= var Selector =3D Class.create({=0A= initialize: function(expression) {=0A= this.expression =3D expression.strip();=0A= =0A= if (this.shouldUseSelectorsAPI()) {=0A= this.mode =3D 'selectorsAPI';=0A= } else if (this.shouldUseXPath()) {=0A= this.mode =3D 'xpath';=0A= this.compileXPathMatcher();=0A= } else {=0A= this.mode =3D "normal";=0A= this.compileMatcher();=0A= }=0A= =0A= },=0A= =0A= shouldUseXPath: function() {=0A= if (!Prototype.BrowserFeatures.XPath) return false;=0A= =0A= var e =3D this.expression;=0A= =0A= // Safari 3 chokes on :*-of-type and :empty=0A= if (Prototype.Browser.WebKit &&=0A= (e.include("-of-type") || e.include(":empty")))=0A= return false;=0A= =0A= // XPath can't do namespaced attributes, nor can it read=0A= // the "checked" property from DOM nodes=0A= if ((/(\[[\w-]*?:|:checked)/).test(e))=0A= return false;=0A= =0A= return true;=0A= },=0A= =0A= shouldUseSelectorsAPI: function() {=0A= if (!Prototype.BrowserFeatures.SelectorsAPI) return false;=0A= =0A= if (!Selector._div) Selector._div =3D new Element('div');=0A= =0A= // Make sure the browser treats the selector as valid. Test on an=0A= // isolated element to minimize cost of this check.=0A= try {=0A= Selector._div.querySelector(this.expression);=0A= } catch(e) {=0A= return false;=0A= }=0A= =0A= return true;=0A= },=0A= =0A= compileMatcher: function() {=0A= var e =3D this.expression, ps =3D Selector.patterns, h =3D = Selector.handlers,=0A= c =3D Selector.criteria, le, p, m;=0A= =0A= if (Selector._cache[e]) {=0A= this.matcher =3D Selector._cache[e];=0A= return;=0A= }=0A= =0A= this.matcher =3D ["this.matcher =3D function(root) {",=0A= "var r =3D root, h =3D Selector.handlers, c =3D = false, n;"];=0A= =0A= while (e && le !=3D e && (/\S/).test(e)) {=0A= le =3D e;=0A= for (var i in ps) {=0A= p =3D ps[i];=0A= if (m =3D e.match(p)) {=0A= this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :=0A= new Template(c[i]).evaluate(m));=0A= e =3D e.replace(m[0], '');=0A= break;=0A= }=0A= }=0A= }=0A= =0A= this.matcher.push("return h.unique(n);\n}");=0A= eval(this.matcher.join('\n'));=0A= Selector._cache[this.expression] =3D this.matcher;=0A= },=0A= =0A= compileXPathMatcher: function() {=0A= var e =3D this.expression, ps =3D Selector.patterns,=0A= x =3D Selector.xpath, le, m;=0A= =0A= if (Selector._cache[e]) {=0A= this.xpath =3D Selector._cache[e]; return;=0A= }=0A= =0A= this.matcher =3D ['.//*'];=0A= while (e && le !=3D e && (/\S/).test(e)) {=0A= le =3D e;=0A= for (var i in ps) {=0A= if (m =3D e.match(ps[i])) {=0A= this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :=0A= new Template(x[i]).evaluate(m));=0A= e =3D e.replace(m[0], '');=0A= break;=0A= }=0A= }=0A= }=0A= =0A= this.xpath =3D this.matcher.join('');=0A= Selector._cache[this.expression] =3D this.xpath;=0A= },=0A= =0A= findElements: function(root) {=0A= root =3D root || document;=0A= var e =3D this.expression, results;=0A= =0A= switch (this.mode) {=0A= case 'selectorsAPI':=0A= // querySelectorAll queries document-wide, then filters to = descendants=0A= // of the context element. That's not what we want.=0A= // Add an explicit context to the selector if necessary.=0A= if (root !=3D=3D document) {=0A= var oldId =3D root.id, id =3D $(root).identify();=0A= e =3D "#" + id + " " + e;=0A= }=0A= =0A= results =3D $A(root.querySelectorAll(e)).map(Element.extend);=0A= root.id =3D oldId;=0A= =0A= return results;=0A= case 'xpath':=0A= return document._getElementsByXPath(this.xpath, root);=0A= default:=0A= return this.matcher(root);=0A= }=0A= },=0A= =0A= match: function(element) {=0A= this.tokens =3D [];=0A= =0A= var e =3D this.expression, ps =3D Selector.patterns, as =3D = Selector.assertions;=0A= var le, p, m;=0A= =0A= while (e && le !=3D=3D e && (/\S/).test(e)) {=0A= le =3D e;=0A= for (var i in ps) {=0A= p =3D ps[i];=0A= if (m =3D e.match(p)) {=0A= // use the Selector.assertions methods unless the selector=0A= // is too complex.=0A= if (as[i]) {=0A= this.tokens.push([i, Object.clone(m)]);=0A= e =3D e.replace(m[0], '');=0A= } else {=0A= // reluctantly do a document-wide search=0A= // and look for a match in the array=0A= return this.findElements(document).include(element);=0A= }=0A= }=0A= }=0A= }=0A= =0A= var match =3D true, name, matches;=0A= for (var i =3D 0, token; token =3D this.tokens[i]; i++) {=0A= name =3D token[0], matches =3D token[1];=0A= if (!Selector.assertions[name](element, matches)) {=0A= match =3D false; break;=0A= }=0A= }=0A= =0A= return match;=0A= },=0A= =0A= toString: function() {=0A= return this.expression;=0A= },=0A= =0A= inspect: function() {=0A= return "#";=0A= }=0A= });=0A= =0A= Object.extend(Selector, {=0A= _cache: { },=0A= =0A= xpath: {=0A= descendant: "//*",=0A= child: "/*",=0A= adjacent: "/following-sibling::*[1]",=0A= laterSibling: '/following-sibling::*',=0A= tagName: function(m) {=0A= if (m[1] =3D=3D '*') return '';=0A= return "[local-name()=3D'" + m[1].toLowerCase() +=0A= "' or local-name()=3D'" + m[1].toUpperCase() + "']";=0A= },=0A= className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",=0A= id: "[@id=3D'#{1}']",=0A= attrPresence: function(m) {=0A= m[1] =3D m[1].toLowerCase();=0A= return new Template("[@#{1}]").evaluate(m);=0A= },=0A= attr: function(m) {=0A= m[1] =3D m[1].toLowerCase();=0A= m[3] =3D m[5] || m[6];=0A= return new Template(Selector.xpath.operators[m[2]]).evaluate(m);=0A= },=0A= pseudo: function(m) {=0A= var h =3D Selector.xpath.pseudos[m[1]];=0A= if (!h) return '';=0A= if (Object.isFunction(h)) return h(m);=0A= return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);=0A= },=0A= operators: {=0A= '=3D': "[@#{1}=3D'#{3}']",=0A= '!=3D': "[@#{1}!=3D'#{3}']",=0A= '^=3D': "[starts-with(@#{1}, '#{3}')]",=0A= '$=3D': "[substring(@#{1}, (string-length(@#{1}) - = string-length('#{3}') + 1))=3D'#{3}']",=0A= '*=3D': "[contains(@#{1}, '#{3}')]",=0A= '~=3D': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",=0A= '|=3D': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"=0A= },=0A= pseudos: {=0A= 'first-child': '[not(preceding-sibling::*)]',=0A= 'last-child': '[not(following-sibling::*)]',=0A= 'only-child': '[not(preceding-sibling::* or = following-sibling::*)]',=0A= 'empty': "[count(*) =3D 0 and (count(text()) =3D 0)]",=0A= 'checked': "[@checked]",=0A= 'disabled': "[(@disabled) and (@type!=3D'hidden')]",=0A= 'enabled': "[not(@disabled) and (@type!=3D'hidden')]",=0A= 'not': function(m) {=0A= var e =3D m[6], p =3D Selector.patterns,=0A= x =3D Selector.xpath, le, v;=0A= =0A= var exclusion =3D [];=0A= while (e && le !=3D e && (/\S/).test(e)) {=0A= le =3D e;=0A= for (var i in p) {=0A= if (m =3D e.match(p[i])) {=0A= v =3D Object.isFunction(x[i]) ? x[i](m) : new = Template(x[i]).evaluate(m);=0A= exclusion.push("(" + v.substring(1, v.length - 1) + ")");=0A= e =3D e.replace(m[0], '');=0A= break;=0A= }=0A= }=0A= }=0A= return "[not(" + exclusion.join(" and ") + ")]";=0A= },=0A= 'nth-child': function(m) {=0A= return = Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);=0A= },=0A= 'nth-last-child': function(m) {=0A= return = Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);=0A= },=0A= 'nth-of-type': function(m) {=0A= return Selector.xpath.pseudos.nth("position() ", m);=0A= },=0A= 'nth-last-of-type': function(m) {=0A= return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", = m);=0A= },=0A= 'first-of-type': function(m) {=0A= m[6] =3D "1"; return Selector.xpath.pseudos['nth-of-type'](m);=0A= },=0A= 'last-of-type': function(m) {=0A= m[6] =3D "1"; return = Selector.xpath.pseudos['nth-last-of-type'](m);=0A= },=0A= 'only-of-type': function(m) {=0A= var p =3D Selector.xpath.pseudos; return p['first-of-type'](m) + = p['last-of-type'](m);=0A= },=0A= nth: function(fragment, m) {=0A= var mm, formula =3D m[6], predicate;=0A= if (formula =3D=3D 'even') formula =3D '2n+0';=0A= if (formula =3D=3D 'odd') formula =3D '2n+1';=0A= if (mm =3D formula.match(/^(\d+)$/)) // digit only=0A= return '[' + fragment + "=3D " + mm[1] + ']';=0A= if (mm =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b=0A= if (mm[1] =3D=3D "-") mm[1] =3D -1;=0A= var a =3D mm[1] ? Number(mm[1]) : 1;=0A= var b =3D mm[2] ? Number(mm[2]) : 0;=0A= predicate =3D "[((#{fragment} - #{b}) mod #{a} =3D 0) and " +=0A= "((#{fragment} - #{b}) div #{a} >=3D 0)]";=0A= return new Template(predicate).evaluate({=0A= fragment: fragment, a: a, b: b });=0A= }=0A= }=0A= }=0A= },=0A= =0A= criteria: {=0A= tagName: 'n =3D h.tagName(n, r, "#{1}", c); c =3D false;',=0A= className: 'n =3D h.className(n, r, "#{1}", c); c =3D false;',=0A= id: 'n =3D h.id(n, r, "#{1}", c); c =3D false;',=0A= attrPresence: 'n =3D h.attrPresence(n, r, "#{1}", c); c =3D false;',=0A= attr: function(m) {=0A= m[3] =3D (m[5] || m[6]);=0A= return new Template('n =3D h.attr(n, r, "#{1}", "#{3}", "#{2}", = c); c =3D false;').evaluate(m);=0A= },=0A= pseudo: function(m) {=0A= if (m[6]) m[6] =3D m[6].replace(/"/g, '\\"');=0A= return new Template('n =3D h.pseudo(n, "#{1}", "#{6}", r, c); c = =3D false;').evaluate(m);=0A= },=0A= descendant: 'c =3D "descendant";',=0A= child: 'c =3D "child";',=0A= adjacent: 'c =3D "adjacent";',=0A= laterSibling: 'c =3D "laterSibling";'=0A= },=0A= =0A= patterns: {=0A= // combinators must be listed first=0A= // (and descendant needs to be last combinator)=0A= laterSibling: /^\s*~\s*/,=0A= child: /^\s*>\s*/,=0A= adjacent: /^\s*\+\s*/,=0A= descendant: /^\s/,=0A= =0A= // selectors follow=0A= tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,=0A= id: /^#([\w\-\*]+)(\b|$)/,=0A= className: /^\.([\w\-\*]+)(\b|$)/,=0A= pseudo:=0A= /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis= )abled|not)(\((.*?)\))?(\b|$|(?=3D\s|[:+~>]))/,=0A= attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/,=0A= attr: = /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=3D)\s*((['"])([^\4]*?)\4|([^'"][^= \]]*?)))?\]/=0A= },=0A= =0A= // for Selector.match and Element#match=0A= assertions: {=0A= tagName: function(element, matches) {=0A= return matches[1].toUpperCase() =3D=3D = element.tagName.toUpperCase();=0A= },=0A= =0A= className: function(element, matches) {=0A= return Element.hasClassName(element, matches[1]);=0A= },=0A= =0A= id: function(element, matches) {=0A= return element.id =3D=3D=3D matches[1];=0A= },=0A= =0A= attrPresence: function(element, matches) {=0A= return Element.hasAttribute(element, matches[1]);=0A= },=0A= =0A= attr: function(element, matches) {=0A= var nodeValue =3D Element.readAttribute(element, matches[1]);=0A= return nodeValue && Selector.operators[matches[2]](nodeValue, = matches[5] || matches[6]);=0A= }=0A= },=0A= =0A= handlers: {=0A= // UTILITY FUNCTIONS=0A= // joins two collections=0A= concat: function(a, b) {=0A= for (var i =3D 0, node; node =3D b[i]; i++)=0A= a.push(node);=0A= return a;=0A= },=0A= =0A= // marks an array of nodes for counting=0A= mark: function(nodes) {=0A= var _true =3D Prototype.emptyFunction;=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= node._countedByPrototype =3D _true;=0A= return nodes;=0A= },=0A= =0A= unmark: function(nodes) {=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= node._countedByPrototype =3D undefined;=0A= return nodes;=0A= },=0A= =0A= // mark each child node with its position (for nth calls)=0A= // "ofType" flag indicates whether we're indexing for nth-of-type=0A= // rather than nth-child=0A= index: function(parentNode, reverse, ofType) {=0A= parentNode._countedByPrototype =3D Prototype.emptyFunction;=0A= if (reverse) {=0A= for (var nodes =3D parentNode.childNodes, i =3D nodes.length - = 1, j =3D 1; i >=3D 0; i--) {=0A= var node =3D nodes[i];=0A= if (node.nodeType =3D=3D 1 && (!ofType || = node._countedByPrototype)) node.nodeIndex =3D j++;=0A= }=0A= } else {=0A= for (var i =3D 0, j =3D 1, nodes =3D parentNode.childNodes; node = =3D nodes[i]; i++)=0A= if (node.nodeType =3D=3D 1 && (!ofType || = node._countedByPrototype)) node.nodeIndex =3D j++;=0A= }=0A= },=0A= =0A= // filters out duplicates and extends all nodes=0A= unique: function(nodes) {=0A= if (nodes.length =3D=3D 0) return nodes;=0A= var results =3D [], n;=0A= for (var i =3D 0, l =3D nodes.length; i < l; i++)=0A= if (!(n =3D nodes[i])._countedByPrototype) {=0A= n._countedByPrototype =3D Prototype.emptyFunction;=0A= results.push(Element.extend(n));=0A= }=0A= return Selector.handlers.unmark(results);=0A= },=0A= =0A= // COMBINATOR FUNCTIONS=0A= descendant: function(nodes) {=0A= var h =3D Selector.handlers;=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)=0A= h.concat(results, node.getElementsByTagName('*'));=0A= return results;=0A= },=0A= =0A= child: function(nodes) {=0A= var h =3D Selector.handlers;=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {=0A= for (var j =3D 0, child; child =3D node.childNodes[j]; j++)=0A= if (child.nodeType =3D=3D 1 && child.tagName !=3D '!') = results.push(child);=0A= }=0A= return results;=0A= },=0A= =0A= adjacent: function(nodes) {=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {=0A= var next =3D this.nextElementSibling(node);=0A= if (next) results.push(next);=0A= }=0A= return results;=0A= },=0A= =0A= laterSibling: function(nodes) {=0A= var h =3D Selector.handlers;=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)=0A= h.concat(results, Element.nextSiblings(node));=0A= return results;=0A= },=0A= =0A= nextElementSibling: function(node) {=0A= while (node =3D node.nextSibling)=0A= if (node.nodeType =3D=3D 1) return node;=0A= return null;=0A= },=0A= =0A= previousElementSibling: function(node) {=0A= while (node =3D node.previousSibling)=0A= if (node.nodeType =3D=3D 1) return node;=0A= return null;=0A= },=0A= =0A= // TOKEN FUNCTIONS=0A= tagName: function(nodes, root, tagName, combinator) {=0A= var uTagName =3D tagName.toUpperCase();=0A= var results =3D [], h =3D Selector.handlers;=0A= if (nodes) {=0A= if (combinator) {=0A= // fastlane for ordinary descendant combinators=0A= if (combinator =3D=3D "descendant") {=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= h.concat(results, node.getElementsByTagName(tagName));=0A= return results;=0A= } else nodes =3D this[combinator](nodes);=0A= if (tagName =3D=3D "*") return nodes;=0A= }=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= if (node.tagName.toUpperCase() =3D=3D=3D uTagName) = results.push(node);=0A= return results;=0A= } else return root.getElementsByTagName(tagName);=0A= },=0A= =0A= id: function(nodes, root, id, combinator) {=0A= var targetNode =3D $(id), h =3D Selector.handlers;=0A= if (!targetNode) return [];=0A= if (!nodes && root =3D=3D document) return [targetNode];=0A= if (nodes) {=0A= if (combinator) {=0A= if (combinator =3D=3D 'child') {=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= if (targetNode.parentNode =3D=3D node) return [targetNode];=0A= } else if (combinator =3D=3D 'descendant') {=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= if (Element.descendantOf(targetNode, node)) return = [targetNode];=0A= } else if (combinator =3D=3D 'adjacent') {=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= if (Selector.handlers.previousElementSibling(targetNode) = =3D=3D node)=0A= return [targetNode];=0A= } else nodes =3D h[combinator](nodes);=0A= }=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= if (node =3D=3D targetNode) return [targetNode];=0A= return [];=0A= }=0A= return (targetNode && Element.descendantOf(targetNode, root)) ? = [targetNode] : [];=0A= },=0A= =0A= className: function(nodes, root, className, combinator) {=0A= if (nodes && combinator) nodes =3D this[combinator](nodes);=0A= return Selector.handlers.byClassName(nodes, root, className);=0A= },=0A= =0A= byClassName: function(nodes, root, className) {=0A= if (!nodes) nodes =3D Selector.handlers.descendant([root]);=0A= var needle =3D ' ' + className + ' ';=0A= for (var i =3D 0, results =3D [], node, nodeClassName; node =3D = nodes[i]; i++) {=0A= nodeClassName =3D node.className;=0A= if (nodeClassName.length =3D=3D 0) continue;=0A= if (nodeClassName =3D=3D className || (' ' + nodeClassName + ' = ').include(needle))=0A= results.push(node);=0A= }=0A= return results;=0A= },=0A= =0A= attrPresence: function(nodes, root, attr, combinator) {=0A= if (!nodes) nodes =3D root.getElementsByTagName("*");=0A= if (nodes && combinator) nodes =3D this[combinator](nodes);=0A= var results =3D [];=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= if (Element.hasAttribute(node, attr)) results.push(node);=0A= return results;=0A= },=0A= =0A= attr: function(nodes, root, attr, value, operator, combinator) {=0A= if (!nodes) nodes =3D root.getElementsByTagName("*");=0A= if (nodes && combinator) nodes =3D this[combinator](nodes);=0A= var handler =3D Selector.operators[operator], results =3D [];=0A= for (var i =3D 0, node; node =3D nodes[i]; i++) {=0A= var nodeValue =3D Element.readAttribute(node, attr);=0A= if (nodeValue =3D=3D=3D null) continue;=0A= if (handler(nodeValue, value)) results.push(node);=0A= }=0A= return results;=0A= },=0A= =0A= pseudo: function(nodes, name, value, root, combinator) {=0A= if (nodes && combinator) nodes =3D this[combinator](nodes);=0A= if (!nodes) nodes =3D root.getElementsByTagName("*");=0A= return Selector.pseudos[name](nodes, value, root);=0A= }=0A= },=0A= =0A= pseudos: {=0A= 'first-child': function(nodes, value, root) {=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {=0A= if (Selector.handlers.previousElementSibling(node)) continue;=0A= results.push(node);=0A= }=0A= return results;=0A= },=0A= 'last-child': function(nodes, value, root) {=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {=0A= if (Selector.handlers.nextElementSibling(node)) continue;=0A= results.push(node);=0A= }=0A= return results;=0A= },=0A= 'only-child': function(nodes, value, root) {=0A= var h =3D Selector.handlers;=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)=0A= if (!h.previousElementSibling(node) && = !h.nextElementSibling(node))=0A= results.push(node);=0A= return results;=0A= },=0A= 'nth-child': function(nodes, formula, root) {=0A= return Selector.pseudos.nth(nodes, formula, root);=0A= },=0A= 'nth-last-child': function(nodes, formula, root) {=0A= return Selector.pseudos.nth(nodes, formula, root, true);=0A= },=0A= 'nth-of-type': function(nodes, formula, root) {=0A= return Selector.pseudos.nth(nodes, formula, root, false, true);=0A= },=0A= 'nth-last-of-type': function(nodes, formula, root) {=0A= return Selector.pseudos.nth(nodes, formula, root, true, true);=0A= },=0A= 'first-of-type': function(nodes, formula, root) {=0A= return Selector.pseudos.nth(nodes, "1", root, false, true);=0A= },=0A= 'last-of-type': function(nodes, formula, root) {=0A= return Selector.pseudos.nth(nodes, "1", root, true, true);=0A= },=0A= 'only-of-type': function(nodes, formula, root) {=0A= var p =3D Selector.pseudos;=0A= return p['last-of-type'](p['first-of-type'](nodes, formula, root), = formula, root);=0A= },=0A= =0A= // handles the an+b logic=0A= getIndices: function(a, b, total) {=0A= if (a =3D=3D 0) return b > 0 ? [b] : [];=0A= return $R(1, total).inject([], function(memo, i) {=0A= if (0 =3D=3D (i - b) % a && (i - b) / a >=3D 0) memo.push(i);=0A= return memo;=0A= });=0A= },=0A= =0A= // handles nth(-last)-child, nth(-last)-of-type, and = (first|last)-of-type=0A= nth: function(nodes, formula, root, reverse, ofType) {=0A= if (nodes.length =3D=3D 0) return [];=0A= if (formula =3D=3D 'even') formula =3D '2n+0';=0A= if (formula =3D=3D 'odd') formula =3D '2n+1';=0A= var h =3D Selector.handlers, results =3D [], indexed =3D [], m;=0A= h.mark(nodes);=0A= for (var i =3D 0, node; node =3D nodes[i]; i++) {=0A= if (!node.parentNode._countedByPrototype) {=0A= h.index(node.parentNode, reverse, ofType);=0A= indexed.push(node.parentNode);=0A= }=0A= }=0A= if (formula.match(/^\d+$/)) { // just a number=0A= formula =3D Number(formula);=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= if (node.nodeIndex =3D=3D formula) results.push(node);=0A= } else if (m =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // = an+b=0A= if (m[1] =3D=3D "-") m[1] =3D -1;=0A= var a =3D m[1] ? Number(m[1]) : 1;=0A= var b =3D m[2] ? Number(m[2]) : 0;=0A= var indices =3D Selector.pseudos.getIndices(a, b, nodes.length);=0A= for (var i =3D 0, node, l =3D indices.length; node =3D nodes[i]; = i++) {=0A= for (var j =3D 0; j < l; j++)=0A= if (node.nodeIndex =3D=3D indices[j]) results.push(node);=0A= }=0A= }=0A= h.unmark(nodes);=0A= h.unmark(indexed);=0A= return results;=0A= },=0A= =0A= 'empty': function(nodes, value, root) {=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) {=0A= // IE treats comments as element nodes=0A= if (node.tagName =3D=3D '!' || node.firstChild) continue;=0A= results.push(node);=0A= }=0A= return results;=0A= },=0A= =0A= 'not': function(nodes, selector, root) {=0A= var h =3D Selector.handlers, selectorType, m;=0A= var exclusions =3D new Selector(selector).findElements(root);=0A= h.mark(exclusions);=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)=0A= if (!node._countedByPrototype) results.push(node);=0A= h.unmark(exclusions);=0A= return results;=0A= },=0A= =0A= 'enabled': function(nodes, value, root) {=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)=0A= if (!node.disabled && (!node.type || node.type !=3D=3D 'hidden'))=0A= results.push(node);=0A= return results;=0A= },=0A= =0A= 'disabled': function(nodes, value, root) {=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)=0A= if (node.disabled) results.push(node);=0A= return results;=0A= },=0A= =0A= 'checked': function(nodes, value, root) {=0A= for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++)=0A= if (node.checked) results.push(node);=0A= return results;=0A= }=0A= },=0A= =0A= operators: {=0A= '=3D': function(nv, v) { return nv =3D=3D v; },=0A= '!=3D': function(nv, v) { return nv !=3D v; },=0A= '^=3D': function(nv, v) { return nv =3D=3D v || nv && = nv.startsWith(v); },=0A= '$=3D': function(nv, v) { return nv =3D=3D v || nv && = nv.endsWith(v); },=0A= '*=3D': function(nv, v) { return nv =3D=3D v || nv && nv.include(v); = },=0A= '$=3D': function(nv, v) { return nv.endsWith(v); },=0A= '*=3D': function(nv, v) { return nv.include(v); },=0A= '~=3D': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + = ' '); },=0A= '|=3D': function(nv, v) { return ('-' + (nv || "").toUpperCase() +=0A= '-').include('-' + (v || "").toUpperCase() + '-'); }=0A= },=0A= =0A= split: function(expression) {=0A= var expressions =3D [];=0A= expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, = function(m) {=0A= expressions.push(m[1].strip());=0A= });=0A= return expressions;=0A= },=0A= =0A= matchElements: function(elements, expression) {=0A= var matches =3D $$(expression), h =3D Selector.handlers;=0A= h.mark(matches);=0A= for (var i =3D 0, results =3D [], element; element =3D elements[i]; = i++)=0A= if (element._countedByPrototype) results.push(element);=0A= h.unmark(matches);=0A= return results;=0A= },=0A= =0A= findElement: function(elements, expression, index) {=0A= if (Object.isNumber(expression)) {=0A= index =3D expression; expression =3D false;=0A= }=0A= return Selector.matchElements(elements, expression || '*')[index || = 0];=0A= },=0A= =0A= findChildElements: function(element, expressions) {=0A= expressions =3D Selector.split(expressions.join(','));=0A= var results =3D [], h =3D Selector.handlers;=0A= for (var i =3D 0, l =3D expressions.length, selector; i < l; i++) {=0A= selector =3D new Selector(expressions[i].strip());=0A= h.concat(results, selector.findElements(element));=0A= }=0A= return (l > 1) ? h.unique(results) : results;=0A= }=0A= });=0A= =0A= if (Prototype.Browser.IE) {=0A= Object.extend(Selector.handlers, {=0A= // IE returns comment nodes on getElementsByTagName("*").=0A= // Filter them out.=0A= concat: function(a, b) {=0A= for (var i =3D 0, node; node =3D b[i]; i++)=0A= if (node.tagName !=3D=3D "!") a.push(node);=0A= return a;=0A= },=0A= =0A= // IE improperly serializes _countedByPrototype in (inner|outer)HTML.=0A= unmark: function(nodes) {=0A= for (var i =3D 0, node; node =3D nodes[i]; i++)=0A= node.removeAttribute('_countedByPrototype');=0A= return nodes;=0A= }=0A= });=0A= }=0A= =0A= function $$() {=0A= return Selector.findChildElements(document, $A(arguments));=0A= }=0A= var Form =3D {=0A= reset: function(form) {=0A= $(form).reset();=0A= return form;=0A= },=0A= =0A= serializeElements: function(elements, options) {=0A= if (typeof options !=3D 'object') options =3D { hash: !!options };=0A= else if (Object.isUndefined(options.hash)) options.hash =3D true;=0A= var key, value, submitted =3D false, submit =3D options.submit;=0A= =0A= var data =3D elements.inject({ }, function(result, element) {=0A= if (!element.disabled && element.name) {=0A= key =3D element.name; value =3D $(element).getValue();=0A= if (value !=3D null && element.type !=3D 'file' && (element.type = !=3D 'submit' || (!submitted &&=0A= submit !=3D=3D false && (!submit || key =3D=3D submit) && = (submitted =3D true)))) {=0A= if (key in result) {=0A= // a key is already present; construct an array of values=0A= if (!Object.isArray(result[key])) result[key] =3D = [result[key]];=0A= result[key].push(value);=0A= }=0A= else result[key] =3D value;=0A= }=0A= }=0A= return result;=0A= });=0A= =0A= return options.hash ? data : Object.toQueryString(data);=0A= }=0A= };=0A= =0A= Form.Methods =3D {=0A= serialize: function(form, options) {=0A= return Form.serializeElements(Form.getElements(form), options);=0A= },=0A= =0A= getElements: function(form) {=0A= return $A($(form).getElementsByTagName('*')).inject([],=0A= function(elements, child) {=0A= if (Form.Element.Serializers[child.tagName.toLowerCase()])=0A= elements.push(Element.extend(child));=0A= return elements;=0A= }=0A= );=0A= },=0A= =0A= getInputs: function(form, typeName, name) {=0A= form =3D $(form);=0A= var inputs =3D form.getElementsByTagName('input');=0A= =0A= if (!typeName && !name) return $A(inputs).map(Element.extend);=0A= =0A= for (var i =3D 0, matchingInputs =3D [], length =3D inputs.length; i = < length; i++) {=0A= var input =3D inputs[i];=0A= if ((typeName && input.type !=3D typeName) || (name && input.name = !=3D name))=0A= continue;=0A= matchingInputs.push(Element.extend(input));=0A= }=0A= =0A= return matchingInputs;=0A= },=0A= =0A= disable: function(form) {=0A= form =3D $(form);=0A= Form.getElements(form).invoke('disable');=0A= return form;=0A= },=0A= =0A= enable: function(form) {=0A= form =3D $(form);=0A= Form.getElements(form).invoke('enable');=0A= return form;=0A= },=0A= =0A= findFirstElement: function(form) {=0A= var elements =3D $(form).getElements().findAll(function(element) {=0A= return 'hidden' !=3D element.type && !element.disabled;=0A= });=0A= var firstByIndex =3D elements.findAll(function(element) {=0A= return element.hasAttribute('tabIndex') && element.tabIndex >=3D 0;=0A= }).sortBy(function(element) { return element.tabIndex }).first();=0A= =0A= return firstByIndex ? firstByIndex : elements.find(function(element) = {=0A= return ['input', 'select', = 'textarea'].include(element.tagName.toLowerCase());=0A= });=0A= },=0A= =0A= focusFirstElement: function(form) {=0A= form =3D $(form);=0A= form.findFirstElement().activate();=0A= return form;=0A= },=0A= =0A= request: function(form, options) {=0A= form =3D $(form), options =3D Object.clone(options || { });=0A= =0A= var params =3D options.parameters, action =3D = form.readAttribute('action') || '';=0A= if (action.blank()) action =3D window.location.href;=0A= options.parameters =3D form.serialize(true);=0A= =0A= if (params) {=0A= if (Object.isString(params)) params =3D params.toQueryParams();=0A= Object.extend(options.parameters, params);=0A= }=0A= =0A= if (form.hasAttribute('method') && !options.method)=0A= options.method =3D form.method;=0A= =0A= return new Ajax.Request(action, options);=0A= }=0A= };=0A= =0A= /*-----------------------------------------------------------------------= ---*/=0A= =0A= Form.Element =3D {=0A= focus: function(element) {=0A= $(element).focus();=0A= return element;=0A= },=0A= =0A= select: function(element) {=0A= $(element).select();=0A= return element;=0A= }=0A= };=0A= =0A= Form.Element.Methods =3D {=0A= serialize: function(element) {=0A= element =3D $(element);=0A= if (!element.disabled && element.name) {=0A= var value =3D element.getValue();=0A= if (value !=3D undefined) {=0A= var pair =3D { };=0A= pair[element.name] =3D value;=0A= return Object.toQueryString(pair);=0A= }=0A= }=0A= return '';=0A= },=0A= =0A= getValue: function(element) {=0A= element =3D $(element);=0A= var method =3D element.tagName.toLowerCase();=0A= return Form.Element.Serializers[method](element);=0A= },=0A= =0A= setValue: function(element, value) {=0A= element =3D $(element);=0A= var method =3D element.tagName.toLowerCase();=0A= Form.Element.Serializers[method](element, value);=0A= return element;=0A= },=0A= =0A= clear: function(element) {=0A= $(element).value =3D '';=0A= return element;=0A= },=0A= =0A= present: function(element) {=0A= return $(element).value !=3D '';=0A= },=0A= =0A= activate: function(element) {=0A= element =3D $(element);=0A= try {=0A= element.focus();=0A= if (element.select && (element.tagName.toLowerCase() !=3D 'input' = ||=0A= !['button', 'reset', 'submit'].include(element.type)))=0A= element.select();=0A= } catch (e) { }=0A= return element;=0A= },=0A= =0A= disable: function(element) {=0A= element =3D $(element);=0A= element.disabled =3D true;=0A= return element;=0A= },=0A= =0A= enable: function(element) {=0A= element =3D $(element);=0A= element.disabled =3D false;=0A= return element;=0A= }=0A= };=0A= =0A= /*-----------------------------------------------------------------------= ---*/=0A= =0A= var Field =3D Form.Element;=0A= var $F =3D Form.Element.Methods.getValue;=0A= =0A= /*-----------------------------------------------------------------------= ---*/=0A= =0A= Form.Element.Serializers =3D {=0A= input: function(element, value) {=0A= switch (element.type.toLowerCase()) {=0A= case 'checkbox':=0A= case 'radio':=0A= return Form.Element.Serializers.inputSelector(element, value);=0A= default:=0A= return Form.Element.Serializers.textarea(element, value);=0A= }=0A= },=0A= =0A= inputSelector: function(element, value) {=0A= if (Object.isUndefined(value)) return element.checked ? = element.value : null;=0A= else element.checked =3D !!value;=0A= },=0A= =0A= textarea: function(element, value) {=0A= if (Object.isUndefined(value)) return element.value;=0A= else element.value =3D value;=0A= },=0A= =0A= select: function(element, value) {=0A= if (Object.isUndefined(value))=0A= return this[element.type =3D=3D 'select-one' ?=0A= 'selectOne' : 'selectMany'](element);=0A= else {=0A= var opt, currentValue, single =3D !Object.isArray(value);=0A= for (var i =3D 0, length =3D element.length; i < length; i++) {=0A= opt =3D element.options[i];=0A= currentValue =3D this.optionValue(opt);=0A= if (single) {=0A= if (currentValue =3D=3D value) {=0A= opt.selected =3D true;=0A= return;=0A= }=0A= }=0A= else opt.selected =3D value.include(currentValue);=0A= }=0A= }=0A= },=0A= =0A= selectOne: function(element) {=0A= var index =3D element.selectedIndex;=0A= return index >=3D 0 ? this.optionValue(element.options[index]) : = null;=0A= },=0A= =0A= selectMany: function(element) {=0A= var values, length =3D element.length;=0A= if (!length) return null;=0A= =0A= for (var i =3D 0, values =3D []; i < length; i++) {=0A= var opt =3D element.options[i];=0A= if (opt.selected) values.push(this.optionValue(opt));=0A= }=0A= return values;=0A= },=0A= =0A= optionValue: function(opt) {=0A= // extend element because hasAttribute may not be native=0A= return Element.extend(opt).hasAttribute('value') ? opt.value : = opt.text;=0A= }=0A= };=0A= =0A= /*-----------------------------------------------------------------------= ---*/=0A= =0A= Abstract.TimedObserver =3D Class.create(PeriodicalExecuter, {=0A= initialize: function($super, element, frequency, callback) {=0A= $super(callback, frequency);=0A= this.element =3D $(element);=0A= this.lastValue =3D this.getValue();=0A= },=0A= =0A= execute: function() {=0A= var value =3D this.getValue();=0A= if (Object.isString(this.lastValue) && Object.isString(value) ?=0A= this.lastValue !=3D value : String(this.lastValue) !=3D = String(value)) {=0A= this.callback(this.element, value);=0A= this.lastValue =3D value;=0A= }=0A= }=0A= });=0A= =0A= Form.Element.Observer =3D Class.create(Abstract.TimedObserver, {=0A= getValue: function() {=0A= return Form.Element.getValue(this.element);=0A= }=0A= });=0A= =0A= Form.Observer =3D Class.create(Abstract.TimedObserver, {=0A= getValue: function() {=0A= return Form.serialize(this.element);=0A= }=0A= });=0A= =0A= /*-----------------------------------------------------------------------= ---*/=0A= =0A= Abstract.EventObserver =3D Class.create({=0A= initialize: function(element, callback) {=0A= this.element =3D $(element);=0A= this.callback =3D callback;=0A= =0A= this.lastValue =3D this.getValue();=0A= if (this.element.tagName.toLowerCase() =3D=3D 'form')=0A= this.registerFormCallbacks();=0A= else=0A= this.registerCallback(this.element);=0A= },=0A= =0A= onElementEvent: function() {=0A= var value =3D this.getValue();=0A= if (this.lastValue !=3D value) {=0A= this.callback(this.element, value);=0A= this.lastValue =3D value;=0A= }=0A= },=0A= =0A= registerFormCallbacks: function() {=0A= Form.getElements(this.element).each(this.registerCallback, this);=0A= },=0A= =0A= registerCallback: function(element) {=0A= if (element.type) {=0A= switch (element.type.toLowerCase()) {=0A= case 'checkbox':=0A= case 'radio':=0A= Event.observe(element, 'click', = this.onElementEvent.bind(this));=0A= break;=0A= default:=0A= Event.observe(element, 'change', = this.onElementEvent.bind(this));=0A= break;=0A= }=0A= }=0A= }=0A= });=0A= =0A= Form.Element.EventObserver =3D Class.create(Abstract.EventObserver, {=0A= getValue: function() {=0A= return Form.Element.getValue(this.element);=0A= }=0A= });=0A= =0A= Form.EventObserver =3D Class.create(Abstract.EventObserver, {=0A= getValue: function() {=0A= return Form.serialize(this.element);=0A= }=0A= });=0A= if (!window.Event) var Event =3D { };=0A= =0A= Object.extend(Event, {=0A= KEY_BACKSPACE: 8,=0A= KEY_TAB: 9,=0A= KEY_RETURN: 13,=0A= KEY_ESC: 27,=0A= KEY_LEFT: 37,=0A= KEY_UP: 38,=0A= KEY_RIGHT: 39,=0A= KEY_DOWN: 40,=0A= KEY_DELETE: 46,=0A= KEY_HOME: 36,=0A= KEY_END: 35,=0A= KEY_PAGEUP: 33,=0A= KEY_PAGEDOWN: 34,=0A= KEY_INSERT: 45,=0A= =0A= cache: { },=0A= =0A= relatedTarget: function(event) {=0A= var element;=0A= switch(event.type) {=0A= case 'mouseover': element =3D event.fromElement; break;=0A= case 'mouseout': element =3D event.toElement; break;=0A= default: return null;=0A= }=0A= return Element.extend(element);=0A= }=0A= });=0A= =0A= Event.Methods =3D (function() {=0A= var isButton;=0A= =0A= if (Prototype.Browser.IE) {=0A= var buttonMap =3D { 0: 1, 1: 4, 2: 2 };=0A= isButton =3D function(event, code) {=0A= return event.button =3D=3D buttonMap[code];=0A= };=0A= =0A= } else if (Prototype.Browser.WebKit) {=0A= isButton =3D function(event, code) {=0A= switch (code) {=0A= case 0: return event.which =3D=3D 1 && !event.metaKey;=0A= case 1: return event.which =3D=3D 1 && event.metaKey;=0A= default: return false;=0A= }=0A= };=0A= =0A= } else {=0A= isButton =3D function(event, code) {=0A= return event.which ? (event.which =3D=3D=3D code + 1) : = (event.button =3D=3D=3D code);=0A= };=0A= }=0A= =0A= return {=0A= isLeftClick: function(event) { return isButton(event, 0) },=0A= isMiddleClick: function(event) { return isButton(event, 1) },=0A= isRightClick: function(event) { return isButton(event, 2) },=0A= =0A= element: function(event) {=0A= event =3D Event.extend(event);=0A= =0A= var node =3D event.target,=0A= type =3D event.type,=0A= currentTarget =3D event.currentTarget;=0A= =0A= if (currentTarget && currentTarget.tagName) {=0A= // Firefox screws up the "click" event when moving between radio = buttons=0A= // via arrow keys. It also screws up the "load" and "error" = events on images,=0A= // reporting the document as the target instead of the original = image.=0A= if (type =3D=3D=3D 'load' || type =3D=3D=3D 'error' ||=0A= (type =3D=3D=3D 'click' && currentTarget.tagName.toLowerCase() = =3D=3D=3D 'input'=0A= && currentTarget.type =3D=3D=3D 'radio'))=0A= node =3D currentTarget;=0A= }=0A= if (node.nodeType =3D=3D Node.TEXT_NODE) node =3D node.parentNode;=0A= return Element.extend(node);=0A= },=0A= =0A= findElement: function(event, expression) {=0A= var element =3D Event.element(event);=0A= if (!expression) return element;=0A= var elements =3D [element].concat(element.ancestors());=0A= return Selector.findElement(elements, expression, 0);=0A= },=0A= =0A= pointer: function(event) {=0A= var docElement =3D document.documentElement,=0A= body =3D document.body || { scrollLeft: 0, scrollTop: 0 };=0A= return {=0A= x: event.pageX || (event.clientX +=0A= (docElement.scrollLeft || body.scrollLeft) -=0A= (docElement.clientLeft || 0)),=0A= y: event.pageY || (event.clientY +=0A= (docElement.scrollTop || body.scrollTop) -=0A= (docElement.clientTop || 0))=0A= };=0A= },=0A= =0A= pointerX: function(event) { return Event.pointer(event).x },=0A= pointerY: function(event) { return Event.pointer(event).y },=0A= =0A= stop: function(event) {=0A= Event.extend(event);=0A= event.preventDefault();=0A= event.stopPropagation();=0A= event.stopped =3D true;=0A= }=0A= };=0A= })();=0A= =0A= Event.extend =3D (function() {=0A= var methods =3D Object.keys(Event.Methods).inject({ }, function(m, = name) {=0A= m[name] =3D Event.Methods[name].methodize();=0A= return m;=0A= });=0A= =0A= if (Prototype.Browser.IE) {=0A= Object.extend(methods, {=0A= stopPropagation: function() { this.cancelBubble =3D true },=0A= preventDefault: function() { this.returnValue =3D false },=0A= inspect: function() { return "[object Event]" }=0A= });=0A= =0A= return function(event) {=0A= if (!event) return false;=0A= if (event._extendedByPrototype) return event;=0A= =0A= event._extendedByPrototype =3D Prototype.emptyFunction;=0A= var pointer =3D Event.pointer(event);=0A= Object.extend(event, {=0A= target: event.srcElement,=0A= relatedTarget: Event.relatedTarget(event),=0A= pageX: pointer.x,=0A= pageY: pointer.y=0A= });=0A= return Object.extend(event, methods);=0A= };=0A= =0A= } else {=0A= Event.prototype =3D Event.prototype || = document.createEvent("HTMLEvents")['__proto__'];=0A= Object.extend(Event.prototype, methods);=0A= return Prototype.K;=0A= }=0A= })();=0A= =0A= Object.extend(Event, (function() {=0A= var cache =3D Event.cache;=0A= =0A= function getEventID(element) {=0A= if (element._prototypeEventID) return element._prototypeEventID[0];=0A= arguments.callee.id =3D arguments.callee.id || 1;=0A= return element._prototypeEventID =3D [++arguments.callee.id];=0A= }=0A= =0A= function getDOMEventName(eventName) {=0A= if (eventName && eventName.include(':')) return "dataavailable";=0A= return eventName;=0A= }=0A= =0A= function getCacheForID(id) {=0A= return cache[id] =3D cache[id] || { };=0A= }=0A= =0A= function getWrappersForEventName(id, eventName) {=0A= var c =3D getCacheForID(id);=0A= return c[eventName] =3D c[eventName] || [];=0A= }=0A= =0A= function createWrapper(element, eventName, handler) {=0A= var id =3D getEventID(element);=0A= var c =3D getWrappersForEventName(id, eventName);=0A= if (c.pluck("handler").include(handler)) return false;=0A= =0A= var wrapper =3D function(event) {=0A= if (!Event || !Event.extend ||=0A= (event.eventName && event.eventName !=3D eventName))=0A= return false;=0A= =0A= Event.extend(event);=0A= handler.call(element, event);=0A= };=0A= =0A= wrapper.handler =3D handler;=0A= c.push(wrapper);=0A= return wrapper;=0A= }=0A= =0A= function findWrapper(id, eventName, handler) {=0A= var c =3D getWrappersForEventName(id, eventName);=0A= return c.find(function(wrapper) { return wrapper.handler =3D=3D = handler });=0A= }=0A= =0A= function destroyWrapper(id, eventName, handler) {=0A= var c =3D getCacheForID(id);=0A= if (!c[eventName]) return false;=0A= c[eventName] =3D c[eventName].without(findWrapper(id, eventName, = handler));=0A= }=0A= =0A= function destroyCache() {=0A= for (var id in cache)=0A= for (var eventName in cache[id])=0A= cache[id][eventName] =3D null;=0A= }=0A= =0A= =0A= // Internet Explorer needs to remove event handlers on page unload=0A= // in order to avoid memory leaks.=0A= if (window.attachEvent) {=0A= window.attachEvent("onunload", destroyCache);=0A= }=0A= =0A= // Safari has a dummy event handler on page unload so that it won't=0A= // use its bfcache. Safari <=3D 3.1 has an issue with restoring the = "document"=0A= // object when page is returned to via the back button using its = bfcache.=0A= if (Prototype.Browser.WebKit) {=0A= window.addEventListener('unload', Prototype.emptyFunction, false);=0A= }=0A= =0A= return {=0A= observe: function(element, eventName, handler) {=0A= element =3D $(element);=0A= var name =3D getDOMEventName(eventName);=0A= =0A= var wrapper =3D createWrapper(element, eventName, handler);=0A= if (!wrapper) return element;=0A= =0A= if (element.addEventListener) {=0A= element.addEventListener(name, wrapper, false);=0A= } else {=0A= element.attachEvent("on" + name, wrapper);=0A= }=0A= =0A= return element;=0A= },=0A= =0A= stopObserving: function(element, eventName, handler) {=0A= element =3D $(element);=0A= var id =3D getEventID(element), name =3D = getDOMEventName(eventName);=0A= =0A= if (!handler && eventName) {=0A= getWrappersForEventName(id, eventName).each(function(wrapper) {=0A= element.stopObserving(eventName, wrapper.handler);=0A= });=0A= return element;=0A= =0A= } else if (!eventName) {=0A= Object.keys(getCacheForID(id)).each(function(eventName) {=0A= element.stopObserving(eventName);=0A= });=0A= return element;=0A= }=0A= =0A= var wrapper =3D findWrapper(id, eventName, handler);=0A= if (!wrapper) return element;=0A= =0A= if (element.removeEventListener) {=0A= element.removeEventListener(name, wrapper, false);=0A= } else {=0A= element.detachEvent("on" + name, wrapper);=0A= }=0A= =0A= destroyWrapper(id, eventName, handler);=0A= =0A= return element;=0A= },=0A= =0A= fire: function(element, eventName, memo) {=0A= element =3D $(element);=0A= if (element =3D=3D document && document.createEvent && = !element.dispatchEvent)=0A= element =3D document.documentElement;=0A= =0A= var event;=0A= if (document.createEvent) {=0A= event =3D document.createEvent("HTMLEvents");=0A= event.initEvent("dataavailable", true, true);=0A= } else {=0A= event =3D document.createEventObject();=0A= event.eventType =3D "ondataavailable";=0A= }=0A= =0A= event.eventName =3D eventName;=0A= event.memo =3D memo || { };=0A= =0A= if (document.createEvent) {=0A= element.dispatchEvent(event);=0A= } else {=0A= element.fireEvent(event.eventType, event);=0A= }=0A= =0A= return Event.extend(event);=0A= }=0A= };=0A= })());=0A= =0A= Object.extend(Event, Event.Methods);=0A= =0A= Element.addMethods({=0A= fire: Event.fire,=0A= observe: Event.observe,=0A= stopObserving: Event.stopObserving=0A= });=0A= =0A= Object.extend(document, {=0A= fire: Element.Methods.fire.methodize(),=0A= observe: Element.Methods.observe.methodize(),=0A= stopObserving: Element.Methods.stopObserving.methodize(),=0A= loaded: false=0A= });=0A= =0A= (function() {=0A= /* Support for the DOMContentLoaded event is based on work by Dan Webb,=0A= Matthias Miller, Dean Edwards and John Resig. */=0A= =0A= var timer;=0A= =0A= function fireContentLoadedEvent() {=0A= if (document.loaded) return;=0A= if (timer) window.clearInterval(timer);=0A= document.fire("dom:loaded");=0A= document.loaded =3D true;=0A= }=0A= =0A= if (document.addEventListener) {=0A= if (Prototype.Browser.WebKit) {=0A= timer =3D window.setInterval(function() {=0A= if (/loaded|complete/.test(document.readyState))=0A= fireContentLoadedEvent();=0A= }, 0);=0A= =0A= Event.observe(window, "load", fireContentLoadedEvent);=0A= =0A= } else {=0A= document.addEventListener("DOMContentLoaded",=0A= fireContentLoadedEvent, false);=0A= }=0A= =0A= } else {=0A= document.write("');=0A= },=0A= load: function() {=0A= if((typeof Prototype=3D=3D'undefined') || =0A= (typeof Element =3D=3D 'undefined') || =0A= (typeof Element.Methods=3D=3D'undefined') ||=0A= parseFloat(Prototype.Version.split(".")[0] + "." +=0A= Prototype.Version.split(".")[1]) < 1.5)=0A= throw("script.aculo.us requires the Prototype JavaScript = framework >=3D 1.5.0");=0A= =0A= $A(document.getElementsByTagName("script")).findAll( function(s) {=0A= return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))=0A= }).each( function(s) {=0A= var path =3D s.src.replace(/scriptaculous\.js(\?.*)?$/,'');=0A= var includes =3D s.src.match(/\?.*load=3D([a-z,]*)/);=0A= (includes ? includes[1] : = 'builder,effects,dragdrop,controls,slider').split(',').each(=0A= function(include) { Scriptaculous.require(path+include+'.js') });=0A= });=0A= }=0A= }=0A= =0A= Scriptaculous.load();=0A= ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://opac.rero.ch/gw_48_1_10m/html/uc/fr-ch/common_files/js/cookie.js /*-----------------------------------------------------------------------= -----\=0A= | cookie.js = |=0A= |------------------------------------------------------------------------= -----|=0A= | Created by Bertrand Zuchuat = |=0A= |------------------------------------------------------------------------= -----|=0A= | Copyright (c) 2007 RERO, Martigny = |=0A= |------------------------------------------------------------------------= -----|=0A= | 2007-01-08 | First working version = |=0A= | 2007-04-10 | Add function getSessionId and loadCookie = |=0A= \------------------------------------------------------------------------= ----*/=0A= =0A= =0A= function savePrefs(form, name)=0A= {=0A= var vcookie =3D '';=0A= vcookie +=3D 'sessionid::session::' + getCookie('sessionid') + '-->';=0A= =0A= for (var i =3D 0; i < form.length; i++) {=0A= if(form[i].type =3D=3D "select-one")=0A= {=0A= vcookie +=3D form[i].name + '::select::' + form[i].selectedIndex + = '-->';=0A= }=0A= else if(form[i].type =3D=3D "select-multiple")=0A= {=0A= var ValueSelected =3D '';=0A= =0A= for (var a =3D 0; a < form[i].length; a++)=0A= {=0A= if (form[i][a].selected)=0A= {=0A= ValueSelected +=3D a + ',';=0A= }=0A= }=0A= =0A= if(ValueSelected.length > 0)=0A= {=0A= ValueSelected =3D ValueSelected.substring(0,ValueSelected.length-1);=0A= =0A= vcookie +=3D form[i].name + '::select-multiple::' + ValueSelected + = '-->';=0A= }=0A= }=0A= else if(form[i].type =3D=3D "text")=0A= {=0A= vcookie +=3D form[i].name + '::text::' + safeChars(form[i].value) + = '-->';=0A= }=0A= else if(form[i].type =3D=3D "checkbox" && form[i].checked)=0A= {=0A= vcookie +=3D form[i].name + '::checkbox::' + '-->';=0A= }=0A= else if(form[i].type =3D=3D "radio" && form[i].checked)=0A= {=0A= vcookie +=3D form[i].name + '::radio::' + form[i].id + '-->';=0A= }=0A= }=0A= =0A= setCookie(name, vcookie, 0, "/");=0A= }=0A= =0A= =0A= function loadCookie(name)=0A= {=0A= var prefStr =3D getCookie(name);=0A= var result =3D null;=0A= =0A= if (prefStr !=3D null)=0A= {=0A= result =3D prefStr.split('-->');=0A= }=0A= return result;=0A= }=0A= =0A= =0A= function getPrefs(form, name)=0A= {=0A= var prefArray =3D loadCookie(name);=0A= =0A= if(prefArray !=3D null)=0A= {=0A= for (var i =3D 0; i < prefArray.length; i++)=0A= {=0A= var currPref =3D prefArray[i].split('::');=0A= =0A= if(currPref[1] =3D=3D "select")=0A= {=0A= form[currPref[0]].selectedIndex =3D currPref[2];=0A= }=0A= else if (currPref[1] =3D=3D "select-multiple")=0A= {=0A= var currSelect =3D currPref[2].split(',');=0A= =0A= for (var a =3D 0; a < currSelect.length; a++)=0A= {=0A= form[currPref[0]][currSelect[a]].selected =3D true;=0A= }=0A= }=0A= else if (currPref[1] =3D=3D "text")=0A= {=0A= form[currPref[0]].value =3D currPref[2];=0A= }=0A= else if (currPref[1] =3D=3D "checkbox")=0A= {=0A= form[currPref[0]].checked =3D currPref[2];=0A= }=0A= else if (currPref[1] =3D=3D "radio")=0A= {=0A= form[currPref[2]].checked =3D true;=0A= }=0A= }=0A= return true;=0A= }=0A= else=0A= {=0A= return false;=0A= }=0A= }=0A= =0A= =0A= function getSessionId(name)=0A= {=0A= var sessionid =3D '';=0A= =0A= var prefArray =3D loadCookie(name);=0A= =0A= if(prefArray !=3D null)=0A= {=0A= for (var i =3D 0; i < prefArray.length; i++)=0A= {=0A= var currPref =3D prefArray[i].split('::');=0A= if (currPref[1] =3D=3D "session")=0A= {=0A= sessionid =3D currPref[2];=0A= }=0A= }=0A= }=0A= return sessionid;=0A= }=0A= =0A= =0A= function safeChars(str)=0A= {=0A= return str.replace('/::|=3D|-->/g', ':;');=0A= }=0A= =0A= =0A= =0A= // ---------------------------- cookie functions = ---------------------------- //=0A= =0A= function getCookie( name ) {=0A= var start =3D document.cookie.indexOf( name + "=3D" );=0A= var len =3D start + name.length + 1;=0A= if ( ( !start ) && ( name !=3D document.cookie.substring( 0, = name.length ) ) ) {=0A= return null;=0A= }=0A= if ( start =3D=3D -1 ) return null;=0A= var end =3D document.cookie.indexOf( ";", len );=0A= if ( end =3D=3D -1 ) end =3D document.cookie.length;=0A= return unescape( document.cookie.substring( len, end ) );=0A= }=0A= =0A= =0A= function setCookie( name, value, expires, path, domain, secure )=0A= {=0A= var today =3D new Date()=0A= today.setTime( today.getTime() )=0A= if (expires)=0A= expires =3D expires * 1000 * 60=0A= else=0A= expires =3D 0=0A= =0A= var expires_date =3D new Date( today.getTime() + (expires) )=0A= var curCookie =3D name + "=3D" + escape( value ) +=0A= ((expires) ? ";expires=3D" + expires_date.toGMTString() : "" ) + = //expires.toGMTString()=0A= ((path) ? ";path=3D" + path : "" ) +=0A= ((domain) ? ";domain=3D" + domain : "" ) +=0A= ((secure) ? ";secure" : "" )=0A= document.cookie =3D curCookie=0A= }=0A= =0A= =0A= function deleteCookie( name, path, domain ) {=0A= if ( getCookie( name ) ) document.cookie =3D name + "=3D" +=0A= ( ( path ) ? ";path=3D" + path : "") +=0A= ( ( domain ) ? ";domain=3D" + domain : "" ) +=0A= ";expires=3DThu, 01-Jan-1970 00:00:01 GMT";=0A= }=0A= =0A= ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://opac.rero.ch/gw_48_1_10m/html/uc/fr-ch/common_files/js/pngfix.js function correctPNG() // correctly handle PNG transparency in Win IE 5.5 = or higher.=0A= {=0A= for(var i=3D0; i" =0A= img.outerHTML =3D strNewHTML=0A= i =3D i-1=0A= }=0A= }=0A= }=0A= window.attachEvent("onload", correctPNG);=0A= =0A= ------=_NextPart_000_0000_01CA9DE2.4D9C5060 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://opac.rero.ch/gw_48_1_10m/html/uc/fr-ch/common_files/js/toggle.js =0A= var last;=0A= =0A= function toggleElement(u) =0A= {=0A= var r; var y =3D "block"; var z =3D "none";=0A= if(document.all) =0A= {=0A= r =3D eval('document.all["' + u + '"]');=0A= if(r =3D=3D null) =0A= {=0A= return;=0A= }=0A= if (last !=3D null && last !=3D r ) =0A= {=0A= last.style.display =3D z;=0A= }=0A= =0A= if(r.style.display !=3D z) =0A= {=0A= r.style.display =3D z;=0A= } =0A= else =0A= {=0A= r.style.display =3D y;=0A= last =3D r;=0A= }=0A= }=0A= else if(document.getElementById)=0A= {=0A= r =3D document.getElementById(u);=0A= if(r =3D=3D null) =0A= {=0A= return;=0A= }=0A= if (last !=3D null && last !=3D r) =0A= {=0A= last.style.display =3D z; =0A= last.isShowing =3D false;=0A= }=0A= if(r.isShowing) =0A= { =0A= r.style.display =3D z; =0A= r.isShowing =3D false; =0A= }=0A= else =0A= { =0A= r.style.display =3D y; =0A= r.isShowing =3D true;=0A= }=0A= last =3D r;=0A= }=0A= }=0A= =0A= =0A= function switchElementShowing(o, n)=0A= {=0A= var oldElement; var newElement; =0A= var y =3D "block"; var z =3D "none";=0A= =0A= if(document.all) =0A= {=0A= oldElement =3D eval('document.all["' + o + '"]');=0A= newElement =3D eval('document.all["' + n + '"]');=0A= =0A= if(oldElement =3D=3D null || newElement =3D=3D null) =0A= {=0A= return;=0A= }=0A= =0A= oldElement.style.display =3D z;=0A= newElement.style.display =3D y;=0A= }=0A= else if(document.getElementById)=0A= {=0A= oldElement =3D document.getElementById(o);=0A= newElement =3D document.getElementById(n);=0A= if(oldElement =3D=3D null || newElement =3D=3D null) =0A= {=0A= return;=0A= }=0A= =0A= oldElement.style.display =3D z;=0A= oldElement.isShowing =3D false;=0A= newElement.style.display =3D y;=0A= newElement.isShowing =3D true;=0A= }=0A= }=0A= ------=_NextPart_000_0000_01CA9DE2.4D9C5060--