From: Subject: =?iso-2022-jp?B?GyRCRWw1fj83SjkbKEI6GyRCJG8kRiREJUglbSVDJTMhIkgvPFYhKiEhRTcwZiRLQDE2dT1QOD0bKEI6GyRCNzJHTxsoQihUT0tZTyBXZWIp?= Date: Sun, Apr 04 2010 19:45:07 GMT+0900 MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_000_0000_7D604B50.8A619716"; type="text/html" ------=_NextPart_000_0000_7D604B50.8A619716 Content-Type: text/html; charset="Shift_JIS" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.tokyo-np.co.jp/article/gunma/20100404/CK2010040402000094.html =93=8C=8B=9E=90V=95=B7:=82=ED=82=C4=82=C2=83g=83=8D=83b=83R=81A=94= =AD=8E=D4=81I=81@=93V=88=E4=82=C9=90=AF=8B=F3=8Fo=8C=BB:=8CQ=94n(TOKYO Web)=
3D"=93=8C=8B=9E=90V=95=B7=82=CC=83j=83=85=81[=83X=83T=83C=83g=
3D"=93=8C=8B=9E=90V=95=B7=81@TOKYO
|=82=BD=82=DF=82=B5=82=E6=82=DD=81E=90V=95=B7=8Dw=93=C7|=83T=83C=83g=83}=83b=83v| =95=B6=8E=9A=81i0=81j 3D"=91=E5=82=AB=82=AD=82=B7=82=E9" 3D"=8F=AC=82=B3=
=20
3D"=93=8C=

=83g=83b=83v > =8CQ=94n > 4=8C=8E4=93=FA=82=CC=8BL=8E= =96=88=EA=97=97 > =8BL=8E=96

3D"=82=B1=82=B1=82=A9=82=E7=96{=95=B6"=

=81y=8CQ=94n=81z

=82=ED=82=C4=82=C2=83g=83=8D=83b=83R=81A=94=AD=8E=D4=81I=81@=93V=88=E4= =82=C9=90=AF=8B=F3=8Fo=8C=BB

2010=94N4=8C=8E4=93=FA

=93V=88=E4=82=C9=81u=93V=82=CC=90=EC=81v=82=AA=8Fo=8C=BB=82=B5=82=BD=83g= =83=8D=83b=83R=97=F1=8E=D4=81=81=82=DD=82=C7=82=E8=8Es=82=CC=91=90=96=D8=83= g=83=93=83l=83=8B=82=C5

3D"=8E=CA=90^"

=81@=82=ED=82=BD=82=E7=82=B9=8Ck=92J=93S=93=B9=81i=82=DD=82=C7=82=E8=8Es= =81j=82=CD=8EO=93=FA=81A=8A=CF=8C=F5=8Bq=82=C9=90l=8BC=82=CC=83g=83=8D=83b= =83R=97=F1=8E=D4=82=CC=8D=A1=83V=81[=83Y=83=93=82=CC=89^=8Ds=82=F0=8En=82= =DF=82=BD=81B=90V=82=BD=82=C9=8E=D4=93=E0=82=CC=93V=88=E4=82=F0=96=F1=94=AA= =90=E7=8C=C2=82=CC=94=AD=8C=F5=83_=83C=83I=81[=83h=81i=82k=82d=82c=81j=82= =C5=8F=FC=82=E8=95t=82=AF=81A=8Ck=92J=82=CC=95=97=8Ci=82=C9=89=C1=82=A6=82= =C4=83g=83=93=83l=83=8B=93=E0=82=C5=82=E0=8Ay=82=B5=82=DF=82=E9=82=E6=82=A4= =8DH=95v=82=B5=82=BD=81B

=81@=91=E5=8A=D4=81X=89w=94=AD=82=CC=89=BA=82=E8=90=FC=82=CD=82=D9=82=DA= =91O=94N=95=C0=82=DD=82=CC=95S=8C=DC=90l=82=AA=8F=E6=8E=D4=81B=97=F1=8E=D4= =82=AA=90_=8C=CB=89w=82=F0=89=DF=82=AC=81A=8D=C5=82=E0=92=B7=82=A2=91=90=96= =D8=83g=83=93=83l=83=8B=81i=8C=DC=90=E7=93=F1=95S=8El=8F\=93=F1=83=81=81[= =83g=83=8B=81j=82=C9=93=FC=82=E9=82=C6=81A=90=C2=90F=82=C6=94=92=90F=82=CC= =82k=82d=82c=82=AA=88=EA=90=C4=82=C9=93_=93=94=82=B5=81A=92=8B=8A=D4=82=C8= =82=CC=82=C9=81g=96=E9=8B=F3=81h=82=AA=8Fo=8C=BB=81B=8F=E6=8Bq=82=A9=82=E7= =81u=82=A8=81[=81v=81u=82=B7=82=B2=82=A2=81v=82=C8=82=C7=82=C6=8A=BD=90=BA= =82=AA=8F=E3=82=AA=82=C1=82=BD=81B

=81@=92=86=8Aw=8DZ=93=FC=8Aw=92=BC=91O=82=C9=8F=AC=8Aw=8DZ=82=CC=8D=91= =8C=EA=82=CC=8E=F6=8B=C6=82=C5=8Aw=82=F1=82=BE=91=AB=94=F6=93=BA=8ER=81i=93= =C8=96=D8=8C=A7=93=FA=8C=F5=8Es=81j=82=F0=97F=90l=8El=90l=82=C5=8C=A9=82=C9= =8Ds=82=AD=82=C6=82=A2=82=A4=93=8C=8B=9E=93s=90=A2=93c=92J=8B=E6=82=CC=8D]= =96{=91=81=90D=82=B3=82=F1=81i=82P=82Q=81j=82=CD=81u=90=AF=82=CC=82=E6=82= =A4=82=C5=82=AB=82=EA=82=A2=82=BE=82=C1=82=BD=81v=81A=91=81=90=EC=E4=BB=8Eq= =82=B3=82=F1=81i=82P=82Q=81j=82=CD=81u=83v=83=89=83l=83^=83=8A=83E=83=80=82= =DD=82=BD=82=A2=81v=82=C6=8A=B4=8C=83=82=B5=82=C4=82=A2=82=BD=81B

=81@=82k=82d=82c=82=CC=91=E5=94=BC=82=CD=81A=8D=82=8D=E8=8Es=82=CC=91=A2= =89=80=89=EF=8E=D0=81u=82=B5=82=DD=82=C3=94_=89=80=81v=82=AA=81u=82=ED=82= =BD=82=E7=82=B9=8Ck=92J=93S=93=B9=82=C9=8B=A6=97=CD=82=B5=82=BD=82=A2=81v= =82=C6=96=B3=8F=9E=92=F1=8B=9F=81B=8EO=8C=8E=82=C9=8E=D0=88=F5=82=AA=90=DD= =92u=82=B5=82=BD=81B=93=AF=93S=93=B9=82=CC=8A=92=91=F2=96L=8E=D0=92=B7=82= =CD=81u=90V=82=BD=82=C8=8Ay=82=B5=82=DD=82=C6=82=B5=82=C4=95]=94=BB=82=C9= =82=C8=82=C1=82=C4=82=D9=82=B5=82=A2=81v=82=C6=98b=82=B5=82=C4=82=A2=82=BD= =81B

=81@=83g=83=8D=83b=83R=97=F1=8E=D4=82=CD=8FT=96=96=82=C6=8Fj=8Bx=93=FA= =82=C8=82=C7=8F\=88=EA=8C=8E=93=F1=8F\=94=AA=93=FA=82=DC=82=C5=95S=8F\=8EO= =93=FA=89^=8Ds=81B=91=E5=8A=D4=81X=81|=91=AB=94=F6=89w=8A=D4=82=F0=88=EA=93= =FA=88=EA=89=9D=95=9C=82=B7=82=E9=81B=8F=E6=8E=D4=82=C9=82=CD=8F=E6=8E=D4= =8C=94=82=CC=82=D9=82=A9=82=C9=90=AE=97=9D=8C=94=82=AA=95K=97v=81B=96=E2=82= =A2=8D=87=82=ED=82=B9=82=CD=81A=93=AF=93S=93=B9=81=81=81i=93d=81j=82O=82Q= =82V=82V=81i=82V=82R=81j=82Q=82P=82P=82O=81=81=82=D6=81B=81@=81i=89=C1=93= =A1=89v=8F=E4=81j

 

=82=B1=82=CC=8BL=8E= =96=82=F0=88=F3=8D=FC=82=B7=82=E9

3D"=8DL=8D=90"  =8B=E2=8D=C0=82=CC=8F=A0=82=AA=8Eg=82=A4=91f=8D=DE=82=AA=82=B1=82= =F1=82=C8=82=E0=82=CC=82=C9=81I=81H=81y=82S=82V=82b=82k=82t=82a=81z 3D"=8DL=8D=90"/  =8B=E2=8D=C0=82=CC=8F=A0=82=AA=8Eg=82=A4=91f=8D=DE=82= =AA=82=B1=82=F1=82=C8=82=E0=82=CC=82=C9=81I=81H=81y=82S=82V=82b=82k=82t=82a= =81z
3D""=
3D"=82=BD=82=DF=82=B5=82=E6=82=DD=81E=90V=95=B7=8Dw=93=C7=82==20
3D""=

=8A=E9=89=E6=93=C1=8FW

Copyright © The Chunichi Shimbun, All Rights Reser= ved.
SBMChatebudeliciousldclippookmarkbuzzurln= ifty<= /xhtml:div> ------=_NextPart_000_0000_7D604B50.8A619716 Content-Type: text/css Content-Transfer-Encoding: quoted-printable Content-Location: http://www.tokyo-np.co.jp/css/old_brows.css @charset "shift_jis"; body{margin:0;padding:0; color:#333333; background:#ffffff;} a{color:#024cc6;text-decoration:none;} a:visited{color:#853ebd;text-decoration:none;} a:hover{color:#0000cc;text-decoration:underline;} ------=_NextPart_000_0000_7D604B50.8A619716 Content-Type: text/css Content-Transfer-Encoding: quoted-printable Content-Location: http://www.tokyo-np.co.jp/css/import.css @charset "shift_jis"; @import url(basic.css); @import url(share.css); ------=_NextPart_000_0000_7D604B50.8A619716 Content-Type: text/css Content-Transfer-Encoding: quoted-printable Content-Location: http://www.tokyo-np.co.jp/css/common.css @charset "shift_jis"; /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =81@=81@=92=86=96=CA=8B=A4=97p=83X=83^=83C=83=8B =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =20 =8DX=90V=97=9A=97=F0 */ /* ------------------------------- =81y=8BL=8E=96 =83X=83^=83C=83=8B=8B=E6=95=AA=81z .Category-top =81c=8Ae=83J=83e=83S=83=8A=83g=83b=83v =8BL=8E=96=95=94=95=AA .Group-top =81c=83O=83=8B=81[=83v=83g=83b=83v =8BL=8E=96=95=94=95=AA .News-detail =81c=8BL=8E=96=8F=DA=8D=D7=83y=81[=83W .Shimen =81c=8Ae=83J=83e=83S=83=8A=83g=83b=83v =81u=8E=86=96=CA=82=A9=82= =E7=82=CC=83j=83=85=81[=83X=81v .Chiki-news =81c=8Ae=92n=88=E6=83J=83e=83S=83=8A=83g=83b=83v =81y=83=8A=83X=83g =83X=83^=83C=83=8B=8B=E6=95=AA=81z .Newslist =81c=83j=83=85=81[=83X=83=8A=83X=83g .Newslist-sub =81c=83j=83=85=81[=83X=83=8A=83X=83g=81i3=92i=91g=81j .newitem =81c=90V=8F=A4=95i =81y=94=C4=97p=83f=81[=83^=83G=83=8A=83A=81z .gaiyo =81c=94=C4=97p=8BL=8E=96=83G=83=8A=83A=81i1=81j .data-area03=81c=94=C4=97p=8BL=8E=96=83G=83=8A=83A=81i2=81j=89=BA=90=FC=81i= =94j=90=FC=81j=95t=82=AB-1 .data-area04=81c=94=C4=97p=8BL=8E=96=83G=83=8A=83A=81i3=81j=89=BA=90=FC=81i= =94j=90=FC=81j=95t=82=AB-2 .data-area01=81c=94=C4=97p=8BL=8E=96=83G=83=8A=83A=81i4=81j=94w=8Ci=83O=83= =8C=81[ .data-area02=81c=98g=95t=82=AB .link-area01=81c=83o=83i=81[=97L=82=E8=83=8A=83=93=83N .post-form=81@=81c=83t=83H=81[=83=80=97p=83e=81[=83u=83=8B .PR =81y=82=BB=82=CC=91=BC=81z .page-move=81@=81c=81u=91O=82=D6=81v=81u=8E=9F=82=D6=81v .partition=81@=81c=83=8A=83=93=83N=8A=D4=8B=E6=90=D8=82=E8 ------------------------------- */ .block .head1{ } .block .head2{ padding-left:1em; } .block .head3{ line-height:120%; } .block .title h2 a, .block .title h3 a{ text-decoration:none; } .block .title h2 a:hover, .block .title h3 a:hover{ border-bottom:1px solid #016cef; } /*Category-top=81c=8BL=8E=96=95=94=95=AA=83X=83^=83C=83=8B*/ /*.Category-top .newslist-title=81c=8Ae=83u=83=89=83E=83U=8A=D4=95\=8E=A6= =92=B2=90=AE=82=CC=82=BD=82=DF=8D=C5=8FI=8Ds=82=C9=8BL=8Fq*/ .Category-top .newslist-title h2{ font-size:85%; font-weight:bold; color:#666666; padding:3px 0 0 0.6em; float:left; } .Category-top .newslist-title .ichiran{ padding:2px 5px 2px 0; float:right; } .Category-top .newslist-title h2 a{ padding:3px 0 0 0.6em; background:url(/image/ico_title.gif) no-repeat left; } .Category-top .newslist-title2 h3{ font-size:85%; font-weight:bold; text-align:left; line-height:150%; margin:18px 0 10px 8px; padding:0 0 0 1.2em; background:url(/image/icon_tit01.gif) no-repeat top left; } .Category-top .block{ margin:0 11px; padding:10px 0; } .Category-top h2, .Category-top h3{ font-size:120%; font-weight:bold; margin:0; padding:0 0 10px 0; } .Category-top .block p{ font-size:85%; line-height:150%; } .Category-top .block ul{ margin:0 0 0 0.6em; padding:0 0 0 0.6em; list-style:disc; } .Category-top .block ol{ margin:0 0 0 0.9em; padding:0 0 0 0.9em; list-style:decimal; } .Category-top .block li{ font-size:85%; line-height:150%; margin:0; padding:0; border:none; background:none; } .Category-top .photo{ margin:0 0 0 22px; float:right; } .Category-top .photo img{ padding:0 0 0 0; border:6px solid #eaeaea; } .Category-top div.image{ margin:0 0 0 22px; float:right; } .Category-top .caption{ font-size:75%; font-weight:bold; line-height:150%; margin:1em 0 3px 0; } .Category-top .post{ margin:10px 0 5px 0; padding:0; } .Category-top .partition{ color:#cccccc; } /*.Category-top =8EO=92i=91g=82=DD*/ .Category-top .right{ width:49%; margin:0 0 0 2%; float:left; } .Category-top .left{ width:49%; float:left; } /*Group-top=81c=8BL=8E=96=95=94=95=AA=83X=83^=83C=83=8B*/ .Group-top .block{ margin:0; padding:10px 0; } .Group-top .block .clear{ clear:none; } .Group-top .block .head1, .Group-top .block .head2{ padding:0; display:block; } #Contents .Group-top .block .title h2 a{ color:#333333; text-decoration:none; } #Contents .Group-top .block .title h2 a:visited{ color:#333333; text-decoration:none; } #Contents .Group-top .block .title h2 a:hover{ color:#016cef; border-bottom:0; } #Contents .Group-top .block .title h2 a:hover .head1, #Contents .Group-top .block .title h2 a:hover .head2{ text-decoration:underline; border-bottom:0; } .Group-top h2{ font-size:130%; font-weight:bold; line-height:120%; padding:8px 12px 5px 12px; background:#ededed; } .Group-top .block p{ font-size:85%; line-height:150%; } .Group-top .block ul{ margin:0 0 0 0.6em; padding:0 0 0 0.6em; list-style:disc; } .Group-top .block ol{ margin:0 0 0 0.9em; padding:0 0 0 0.9em; list-style:decimal; } .Group-top .block li{ font-size:85%; line-height:150%; margin:0; padding:0; border:none; background:none; } .Group-top p{ font-size:85%; line-height:150%; margin:0 0 5px 0; padding:10px 5px 0px 5px; } .Group-top .picnews-area{ width:220px; text-align:right; padding:0 0 9px 9px; background:#ffffff; float:right; } .Group-top .picnews{ text-align:center; margin:10px 0 0 0; padding:0; border:7px solid #eaeaea; } .Group-top .picnews h3{ padding:7px 8px; } .Group-top .picnews .pic{ padding:0 8px 7px 8px; text-align:center; } .Group-top .picnews .caption{ font-size:75%; font-weight:bold; text-align:left; line-height:130%; margin:0 8px 8px 7px; padding:6px 0 0 0; border-top:1px solid #cccccc; } .Group-top .picnews .caption a{ font-weight:normal; } .Group-top table.photo{ margin:0 8px 7px 8px; text-align:center; } .Group-top table.photo td.image{ padding-bottom:6px; } .Group-top table.photo td.caption{ font-size:75%; font-weight:bold; text-align:left; line-height:130%; padding-top:6px; border-top:1px solid #cccccc; } .Group-top ul{ margin:5px 0 5px 0; padding:10px 11px 7px 0; border-top:1px dotted #666666; list-style:none; } .Group-top li{ font-size:85%; line-height:150%; margin:0; padding:1px 0 2px 1.3em; background:url(/image/ico_list02.gif) no-repeat top left; } .Group-top li img{ margin:0 0 0 5px; vertical-align:middle; } /*News-detail=81c=8BL=8E=96=8F=DA=8D=D7=83X=83^=83C=83=8B 070202*/ .News-headarea{ margin:0 0 17px 0; padding:0 10px; border-bottom:1px dotted #666666; } .News-headarea h1{ font-size:125%; line-height:150%; font-weight:bold; padding:5px 0 10px 0; } /* .News-headarea h2{ font-size:125%; font-weight:bold; padding:0 0 10px 0; } */ .News-headarea .data{ font-size:85%; text-align:right; margin:0; padding:0 0 8px 0; } .News-textarea{ padding:0 10px; } .News-textarea .Lead{ font-size:100%; line-height:140%; padding:0 0 8px 0; } .News-textarea h2.Headline1, .News-textarea h3.Headline1{ font-size:125%; font-weight:bold; line-height:130%; padding:0 0 20px 0; } .News-textarea h2.Headline2, .News-textarea h3.Headline2{ font-size:120%; font-weight:bold; line-height:130%; padding:0 0 10px 0; } .News-textarea h2.Headline3, .News-textarea h3.Headline3{ font-size:100%; font-weight:bold; line-height:130%; padding:0 0 10px 0; } .News-textarea .newslist-title2 h3{ font-size:85%; font-weight:bold; text-align:left; line-height:150%; margin:18px 0 10px 0; padding:0 0 0 1.2em; background:url(/image/icon_tit01.gif) no-repeat top left; } .News-textarea .Text{ font-size:100%; line-height:150%; margin:0; padding:0; } .News-textarea .Text p{ margin:0; padding:0 0 1em 0; } .News-textarea .post{ margin:10px 0; padding:0; } .News-textarea .Creditline{ font-size:90%; line-height:150%; margin:0; padding:0; clear:both; } .News-textarea .Creditline p{ margin:0; padding:0 0 1em 0; } /*-----photo---*/ .News-textarea .Photo-right{ margin:0 10px 9px 0; float:left; } .News-textarea .Photo-left, .News-textarea .Photo-undefine{ margin:0 0 9px 10px; float:right; } .News-textarea .Photo-right, .News-textarea .Photo-left, .News-textarea .Photo-undefine{ border:1px solid #cccccc; } .News-textarea .Photo-right img, .News-textarea .Photo-left img, .News-textarea .Photo-undefine img{ margin:7px; } .News-textarea .Photo-right td, .News-textarea .Photo-left td, .News-textarea .Photo-undefine td{ background:#f7f7f7; } .News-textarea .Photo-right .Etoki p, .News-textarea .Photo-left .Etoki p, .News-textarea .Photo-undefine .Etoki p{ font-size:75%; font-weight:bold; line-height:150%; padding:0 7px 5px 7px; margin:0; } /*-----explanation--- 070202*/ .Explanation{ margin:0.5em 0 1em 0px; padding:10px; background:#f7f7f7; clear:both; } .Explanation .title{ font-weight:bold; margin:0; padding:0 0 0.5em 1.5em; background:url(/image/ico_head02.gif) no-repeat top left; } .Explanation p{ font-size:85%; line-height:140%; } /*-----Attention---*/ .Attention{ margin:0 0 0.7em 0px; padding:10px 15px 7px 15px; background:#f7f7f7; clear:both; } .Attention .title{ font-weight:bold; color:#ef4c36; margin:0; padding:0 0 0.5em 0; } .Attention p{ font-size:85%; line-height:140%; } /*-----print--- 070205*/ .print{ font-size:75%; text-align:right; margin:1em 5px 1.5em 0; padding:0 5px 0 0; clear:both; } .print a{ padding:0 0 0 1.9em; background:url(/image/ico_print.gif) no-repeat left; } /*Shimen=81c=8E=86=96=CA=82=A9=82=E7=82=CC=83j=83=85=81[=83X*/ .Shimen{ margin:0 0 10px 0; clear:both; } .Shimen h2{ font-size:85%; font-weight:bold; color:#7e6254; margin:0; padding:7px 5px 5px 30px; background:#ececde url(/image/ico_shimen.gif) no-repeat left; border-bottom:2px solid #ffffff; } .Shimen h3{ padding:12px; font-size:100%; font-weight:bold; line-height:150%; background:#f5f8ea; } .Shimen p{ font-size:85%; line-height:150%; padding:0 11px; } .Shimen .block{ /*070119=95=CF=8DX=81c.news=81=A8.block=82=C9*/ width:100%; padding:0 0 10px 0; background:#f5f8ea; border-bottom:3px solid #ffffff; } .Shimen .block .caption{ /*070119=95=CF=8DX=81c.news=81=A8.block=82=C9*/ padding:0 11px; } .Shimen .photo{ width:135px; text-align:center; padding:0 0 10px 0; float:right; } .Shimen .photo img{ border:1px solid #999999; } /*Chiki-news=81c=92n=88=E6=83J=83e=83S=83=8A*/ .Chiki-news .block{ margin:0 0 10px 0; padding:16px 11px 15px 11px; background:#f5f8ea; clear:both; } .Chiki-news .block h2{ font-size:120%; font-weight:bold; margin:0; padding:0; background:#f5f8ea; } .Chiki-news .block .news{ width:100%; padding:5px 0 0 0; } .Chiki-news .block p{ font-size:85%; line-height:150%; padding:0; } .Chiki-news .block .photo{ padding:0 10px 0 20px; float:right; } .Chiki-news .block .photo img{ border:6px solid #eaeaea; } /*=83j=83=85=81[=83X4=8C=8F*/ .Chiki-news .left{ width:50%; background:url(/image/chiikilist_bg.gif) repeat-x top; float:left; } .Chiki-news .right{ width:49.5%; background:url(/image/chiikilist_bg.gif) repeat-x top; float:right; } .Chiki-news h2{ font-size:85%; line-height:150%; font-weight:bold; padding:13px 10px 7px 13px; } .Chiki-news h2 .date{ font-size:100%; font-weight:normal; padding:0 0 0 0.3em; } .Chiki-news .news{ padding:0 0 20px 13px; } .Chiki-news .left .photo, .Chiki-news .right .photo{ width:126px; text-align:center; padding:0 0 20px 0; float:right; } .Chiki-news .photo img{ border:1px solid #999999; } /* ------------------------------------ Newslist=81c=83j=83=85=81[=83X=83=8A=83X=83g Newslist-sub=81c=83j=83=85=81[=83X=83=8A=83X=83g=81i3=92i=91g=81j ------------------------------------ */ /*Newslist=81ANewslist-sub=81F=8B=A4=97p*/ .Newslist, .Newslist-sub{ margin:0; padding:0; clear:both; } .Newslist .newslist-title, .Newslist-sub .newslist-title{ width:100%; margin:0 0 10px 0; padding:3px 0 4px 0; background:#f2f2f2; border:1px solid #cccccc; display:table; } * html .Newslist .newslist-title, * html .Newslist-sub .newslist-title{ padding:3px 0; } .Newslist .newslist-title h2, .Newslist-sub .newslist-title h2{ font-size:85%; font-weight:bold; color:#666666; padding:3px 0 0 0.6em; float:left; } .Newslist .newslist-title .ichiran, .Newslist-sub .newslist-title .ichiran{ padding:2px 5px 2px 0; float:right; } .Newslist .newslist-title h2 a, .Newslist-sub .newslist-title h2 a{ padding:3px 0 0 0.6em; background:url(/image/ico_title.gif) no-repeat left; } .Newslist .button, .Newslist-sub .button{ margin:-20px 0 25px 0; padding:0; } .Newslist .button img, .Newslist-sub .button img{ margin:0 5px 0 7px; padding:0; } .Newslist .newslist-title2 h3, .Newslist-sub .newslist-title2 h3{ font-size:85%; font-weight:bold; text-align:left; line-height:150%; margin:18px 0 10px 10px; padding:0 0 0 1.2em; background:url(/image/icon_tit01.gif) no-repeat top left; } /*Newslist-sub=81F=90=EA=97p*/ .Newslist-sub .left{ width:49%; float:left; } .Newslist-sub .right{ width:49%; float:right; } /*newitem=81c=90V=8F=A4=95i*/ .newitem{ background:#f7f7f7 url(/image/newitem_bg.gif) repeat-y center; } .newitem .list-top{ height:1px; font-size:1px; line-height:0%; margin:0; padding:0; background:#ffffff; } .newitem .left{ width:49%; float:left; } .newitem .right{ width:49%; float:right; } .newitem .photo{ width:65px; margin:0 5px 0 0; text-align:center; float:right; } .newitem .photo img{ margin:11px 0 10px 0; } .newitem .title{ float:left; padding:10px 10px 5px 10px; font-size:85%; line-height:150%; margin:0; } .newitem .clear{ border-top:2px solid #ffffff; } /* ------------------------------- =83=8A=83X=83g=83X=83^=83C=83=8B ------------------------------- */ /*Newslist*/ .Newslist ul, .Newslist-sub ul{ margin:0 0 25px 0; padding:0 11px 0 0; list-style:none; clear:both; } /*Chiki-news*/ .Chiki-news ul{ margin:0 0 15px 6px; padding:25px 11px 0 0; background:url(/image/chiikilist_bg2.gif) repeat-x top; list-style:none; clear:both; } /* =81u.Newslist=81v=82=C6=81u.Chiki-news=81v=82=C9=82=C2=82=A2=82=C4 =91=BC=83=8A=83X=83g=83X=83^=83C=83=8B=82=CD=81ushare.css=81v=82=C9=8BL=8Fq= =81i=83g=83b=83v=83y=81[=83W=82=C6=8B=A4=97p=81j */ /*Category-top*/ .Category-top ul{ margin:5px 0 0.5em 0; padding:0; list-style:none; } .Category-top li{ font-size:85%; line-height:150%; margin:0 0 0.3em 0; padding:0 0 0.3em 1.3em; background:url(/image/ico_list02.gif) no-repeat top left; border-bottom:1px dotted #666666; } .Category-top li img, .Category-top li.line img{ margin:0 0 0 5px; vertical-align:middle; } .Category-top li.line{ margin:1em 0 0.3em 0; padding:0 0 0.3em 1.3em; } /*Shimen*/ .Shimen ul{ margin:0; padding:0; list-style:none; background:#f5f8ea } .Shimen li{ font-size:85%; line-height:150%; margin:0; padding:5px 0 5px 1.4em; background:url(/image/ico_list01.gif) no-repeat top left; border-bottom:2px solid #ffffff; } .Shimen li img{ margin:0 0 0 5px; } /* ------------------------------- =82=BB=82=CC=91=BC=8B=9F=97p=83X=83^=83C=83=8B ------------------------------- */ .page-move{ margin:0 10px 10px 0; padding:1em 0 0 0; clear:both; } .page-move p{ font-size:85%; font-weight:bold; margin:0; padding:15px 0 0 0; } .page-move span{ color:#cccccc; padding:0 5px; } .page-move a{ color:#3a5caa; } .page-move a:visited{ color:#3a5caa; } .page-move a:hover{ color:#016cef; } .page-move a.next{ padding:0 11px 0 0; background:url(/image/ico_list02.gif) no-repeat right; } .page-move a.pre{ padding:0 0 0 11px; background:url(/image/ico_list04.gif) no-repeat left; } .partition{ color:#cccccc; } /* ------------------------------- =94=C4=97p=83G=83=8A=83A ------------------------------- */ /*=94=C4=97p=8BL=8E=96=83G=83=8A=83A=81i1=81j=81c=81u.gaiyo=81v*/ .gaiyo{ padding:13px 11px 0 11px; } .gaiyo-top{ margin:17px 0 15px 0; padding:3px 15px 0 15px; } .gaiyo-top h3, .gaiyo h3{ font-size:100%; font-weight:bold; line-height:150%; margin:0 0 5px 0; padding:0; } /* =81=A6=81y.gaiyo h3=81z =81ubook.css=81v=82=C9=93=AF=82=B6=93=E0=97e=82=F0=8BL=8D=DA=81i=90=DD=92= =E8=8F=E3=8F=91=82=AB=82=CC=82=BD=82=DF=81j=81B =81@=8FC=90=B3=8E=9E=82=C9=82=CD=96Y=82=EA=82=B8=82=C9=81ubook.css=81v=82= =C9=93=E0=97e=82=F0=83R=83s=81[=82=B7=82=E9=82=B1=82=C6=81B */ .gaiyo-top .photo, .gaiyo-top .banner, .gaiyo .photo, .gaiyo .banner{ text-align:left; margin:0 12px 8px 0; padding:0; float:left; } .gaiyo-top .image, .gaiyo .image{ text-align:right; margin:0 0 8px 10px; padding:0; float:right; } .gaiyo-top .photo img, .gaiyo .photo img{ margin:0; padding:0; border:1px solid #999999; } .gaiyo-top .banner img, .gaiyo .banner img, .gaiyo-top .image img, .gaiyo .image img{ margin:0; padding:0; border:none; } .gaiyo-top .gaiyo-text, .gaiyo .gaiyo-text{ margin:0 0 5px 0; padding:0; } .gaiyo-top .gaiyo-text p, .gaiyo .gaiyo-text p{ font-size:85%; line-height:150%; margin:0; padding:0 0 0.2em 0; } .gaiyo-top .link, .gaiyo .link{ font-size:75%; line-height:150%; font-weight:bold; text-align:right; margin:0; padding:0; } .gaiyo-top .link a, .gaiyo .link a{ text-decoration:underline; } .gaiyo-top .link a:visited, .gaiyo .link a:visited{ text-decoration:underline; } .gaiyo-top .post, .gaiyo .post{ font-size:75%; line-height:150%; margin:5px 0 0 0; padding:0 0 2px 0; } .gaiyo-top .post img, .gaiyo .post img{ border:0; } .gaiyo-top .gaiyo-text-sub, .gaiyo .gaiyo-text-sub{ /*=83e=81[=83u=83=8B=81A=81u.post=81v=82=CC=89=BA= =82=C9.text-area=82=AA=93=FC=82=E9=8F=EA=8D=87=82=C9=8Eg=97p*/ margin:7px 0 3px 0; } .gaiyo-top table.type01, .gaiyo table.type01, .gaiyo-top table.type01-full, .gaiyo table.type01-full{ margin:5px 0; } /*.gaiyo=81c=83=8A=83X=83g=90=DD=92=E8*/ .gaiyo-top dl, .gaiyo dl{ margin:0; padding:0; } .gaiyo-top ul, .gaiyo-top ol, .gaiyo ul, .gaiyo ol{ margin:0 0 0 0.7em; padding:0 0 0 0.7em; } .gaiyo-top ul, .gaiyo ul{ list-style:disc; } .gaiyo-top ol, .gaiyo ol{ list-style:decimal; } .gaiyo-top dt, .gaiyo dt{ font-size:85%; font-weight:bold; line-height:150%; margin:0; padding:0 0 5px 0; } .gaiyo-top dd, .gaiyo dd{ font-size:85%; line-height:150%; margin:0; padding:0; } .gaiyo-top li, .gaiyo li{ font-size:85%; margin:0; padding:0 0 0.2em 0; border:none; background:0; } /*.gaiyo=81c=92=86=83^=83C=83g=83=8B=81i=83A=83C=83R=83=93=95t=82=AB=81j =81=A6=81ufctokyo.css=81v=82=CC=8FI=92[=95t=8B=DF=82=C9=89=C1=82=A6=82=E9= =82=B1=82=C6 =81@=81i=92l=82=CC=8F=E3=8F=91=82=AB=82=CC=82=BD=82=DF=82=C9=95K=97v=82=C5= =82=B7=81j */ .gaiyo .newslist-title2 h3{ margin:0 0 7px -1px; } /* =94w=8Ci=83O=83=8C=81[=83G=83=8A=83A */ .data-area01{ margin:0 0 20px 0; padding:15px 15px 5px 15px; border-bottom:2px solid #ffffff; background:#f7f7f7; } .Category-top .data-area01{ margin:0; } * html .data-area01{ width:100%; } .data-area01 h3{ font-size:85%; font-weight:bold; line-height:150%; margin:0; padding:0 0 3px 0; } .data-area01 h3 .data{ font-weight:normal; } .data-area01 p{ font-size:85%; line-height:150%; } .data-area01 img{ margin:0 0 3px 0; } .data-area01 .left-img{ padding:0 10px 0 0; float:left; } .data-area01 .right-img{ padding:0 0 0 10px; float:right; } .data-area01 .left-img img, .data-area01 .right-img img{ border:1px solid #999999; } /* =81=A6=81ubook.css=81v=82=C9=93=AF=82=B6=93=E0=97e=82=F0=8BL=8D=DA=81i=90= =DD=92=E8=8F=E3=8F=91=82=AB=82=CC=82=BD=82=DF=81j=81B =81@=8FC=90=B3=8E=9E=82=C9=82=CD=96Y=82=EA=82=B8=82=C9=81ubook.css=81v=82= =C9=93=E0=97e=82=F0=83R=83s=81[=82=B7=82=E9=82=B1=82=C6=81B */ /*-------------------------------*/ /* =98g=90=FC=95t=82=AB */ .data-area02{ margin:0; padding:10px 13px; border:1px solid #cccccc; clear:both; } .data-area02 h3{ padding:0 0 7px 0; } .data-area02 p{ font-size:85%; line-height:150%; } /*-------------------------------*/ /* =89=BA=94j=90=FC=95t=82=AB 070201 */ .data-area03{ margin:10px 0; padding:5px 11px; border-bottom:1px dotted #666666; } * html .data-area03{ width:100%; } .data-area03 h3{ font-size:85%; font-weight:bold; color:#ef4c36; margin:0; padding:0 0 5px 0; } .data-area03 .left-img, .data-area03 .banner{ padding:0 10px 10px 0; float:left; } .data-area03 .left-img img{ border:1px solid #999999; } .data-area03 .right-img, .data-area03 .right-banner{ padding:0 0 10px 10px; float:right; } .data-area03 .right-img img{ border:1px solid #999999; } .data-area03 p{ font-size:85%; line-height:150%; } .data-area03 dt{ font-size:85%; font-weight:bold; line-height:150%; margin:0; padding:0 0 5px 0; } .data-area03 dd{ font-size:85%; line-height:150%; margin:0; padding:0; } .data-area03 .post{ padding:0 0 7px 0; } .data-area03 .post img{ border:0; } .data-area03 .link{ font-size:75%; font-weight:bold; text-align:right; margin:0; padding:5px; } .data-area03 .link a{ text-decoration:underline; } .data-area03 .link a:visited{ text-decoration:underline; } /*-------------------------------*/ /* =89=BA=94j=90=FC=95t=82=AB-2 */ .data-area04{ margin:0 0 10px 0; padding:5px 13px 4px 13px; border-bottom:1px dotted #666666; } .data-area04 h3{ font-size:85%; font-weight:bold; color:#ef4c36; margin:0; padding:0 0 5px 0; } .data-area04 .left-img{ padding:0 10px 10px 0; float:left; } .data-area04 img{ border:1px solid #999999; } .data-area04 p{ font-size:85%; line-height:150%; } .data-area04 .post{ padding:5px 0 3px 0; } .data-area04 .post img{ border:0; } /*-------------------------------*/ /* =83o=83i=81[=97L=82=E8=83=8A=83=93=83N */ .link-area01{ padding:10px 0; clear:both; } .link-area01 dl{ margin:0; padding:0; border:1px solid #cccccc; } .link-area01 dt{ font-size:85%; font-weight:bold; margin:1px; padding:12px 0 8px 11px; border-top:4px solid #f2f2f2; } .link-area01 dt a{ padding:5px 0 0 0.8em; background:url(/image/ico_title.gif) no-repeat left; } .link-area01 dd{ font-size:85%; line-height:150%; padding:0 11px 0 5px; } .link-area01 dd img{ margin:0 10px 7px 0; float:left; } /*-------------------------------*/ /*=94=C4=97p=83G=83=8A=83A=81@UL=83f=83t=83H=83=8B=83g=89=BB*/ .gaiyo dl ul, .data-area01 dl ul, .data-area02 dl ul, .data-area03 dl ul, .data-area04 dl ul{ font-size:100%; margin:0 0 0 1em; padding:0 0 0.1em 0.5em; border:none; background:none; list-style:disc; } .gaiyo dl li, .data-area01 dl li, .data-area02 dl li, .data-area03 dl li, .data-area04 dl li{ font-size:100%; line-height:150%; margin:0; padding:0; border:none; background:0; } /*PR 070205*/ #Contents .PR{ margin:0 0 17px 0; } /* .news-list=81F=8Ae=83u=83=89=83E=83U=91=CE=89=9E --------------------------------------------------- */ .Category-top .newslist-title{ /*Safari*/ width:100%; margin:17px 0 5px 0; padding:3px 0 4px 0; background:#f2f2f2; border:1px solid #cccccc; display:table; } .Category-top .newslist-title{ /*FireFOX*/ margin:10px 0 5px 0;# } * html .Category-top .newslist-title{ /*IE*/ margin:17px 0 5px 0; padding:3px 0; } /* --------------------------------------------------- */ ------=_NextPart_000_0000_7D604B50.8A619716 Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.tokyo-np.co.jp/js/set.js //******************* JsFile LoadChk **************** var this_url =3D location.href; var jsload =3D true; var js_noload =3D new Array(); //JsFile NOLOAD URL LIST js_noload[0] =3D "/tochu/fctokyo/photo/"; js_noload[1] =3D "/tochigi/watarase/"; js_noload[2] =3D "/photoservice/"; js_noload[3] =3D "/event/"; js_noload[4] =3D "/feature/"; js_noload[5] =3D "/thatu/"; //--JsFile NOLOAD URL LIST for (var i =3D 0; i < js_noload.length; i++) if(this_url.indexOf(js_noload[= i]) >=3D 0) jsload =3D false; if(jsload){ document.write(''); document.write(''); document.write(''); document.write(''); } //******************* /JsFile LoadChk/ **************** //************************************************ //******************* Setting ******************** //---- entame News Xml //var entameNewsXmlFile =3D "/article/topdata/entamovie/entamovie.xml"; var entameNewsXmlFile =3D "/mxtv/mxnews.xml"; var entameNewsLink =3D " "; //*******************/ Setting End *************** //************************************************ var host =3D "/"; var css_dir =3D host + "css/"; var indexNewsListContent =3D 0; //---- *************** ONLOAD *************** window.onload=3Dfunction(){ slideSetting("picnewsId","shuffle"); slideSetting("newsId","none"); slideSetting("rankId","none"); slideSetting("skiId","none"); =09 if(jsload){ if(entameNewsContent=3D=3D1) entameNewsFstSet(); //---js/index_news.js if(indexNewsType!=3D"") newsXmlSet(indexNewsType); //---js/index_news.js if(indexNewsListContent=3D=3D1) newsListUp(0,"refresh"); //---js/index_ne= ws_list.js } }; //---- *************** /ONLOAD *************** //************************************************ // *************** Browser Check ************** var useragent =3D navigator.userAgent.toLowerCase(); var os =3D ""; var ie =3D false; if(useragent.match(/(win|mac)/)) os =3D RegExp.$1; if(useragent.match(/msie[\/\s](\d+\.\d+)/)) ie =3D true; // *************** Cookie ************** function readCookie(name){ var cookieValue =3D ""; var val; var clist =3D document.cookie.split(';'); for(var i=3D0; i'; var fontLicon =3D '3D"=91='; var txtsize =3D eval(readCookie("t-size")); if(!txtsize) txtsize =3D fonrcssDefault; var cssrel; for (var i=3D1;i<=3DfontcssMax;i++){ if(i=3D=3Dtxtsize) cssrel =3D "stylesheet";else cssrel =3D "alternate styl= esheet"; document.write (''); } function setTxtSizeBtn(){ document.write(''); document.write(getTxtSizeBtnTxt()); document.write(''); } function getTxtSizeBtnTxt(){ var txt =3D "" txt +=3D '=95=B6=8E=9A=81i' +(txtsize-3)+ '=81j '; if(txtsize <7){ txt +=3D '' +f= ontLicon+ ' '; }else{ txt +=3D fontLicon+ ' '; } if(txtsize >1){ txt +=3D '' +f= ontSicon+ ' '; }else{ txt +=3D fontSicon+ ' '; } return txt; } function setTxtSize(num){ txtsize +=3D num; if(txtsize < 1) {txtsize=3D1;return;} if(txtsize > fontcssMax) {txtsize=3DfontcssMax;return;} writeCookie("t-size", txtsize); var i,a; for(i=3D0; (a =3D document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") !=3D -1 && a.getAttribute("titl= e")) { a.disabled =3D true; if(a.getAttribute("title") =3D=3D "txtsize" + txtsize) a.disabled =3D fa= lse; } } set_write("textsize", getTxtSizeBtnTxt()); } // *************** div write ************** function set_write(div, str){ if(document.all){=20 document.all(div).innerHTML =3D str; } else if (document.getElementById) { document.getElementById(div).innerHTML =3D str; } else if (document.layers) { with(document.layers[div]){ //withStart document.open(); document.write(str); document.close(); }=20 } } // *************** print css Set ************** var this_url =3D location.href; var print_chk =3D "#print"; if(this_url.length - this_url.lastIndexOf(print_chk) =3D=3D print_chk.lengt= h){ document.write (''); } // *************** Set Qid ************** var qid =3D readCookie("qid"); if(!qid){ var rdmList =3D "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu= vwxyz"; var rdmCD =3D ""; for (var i =3D 0, k =3D rdmList.length; i < 30; i++){ rdmCD +=3D rdmList.charAt(Math.floor(k * Math.random())); } writeCookie("qid", rdmCD); } // *************** TabMenu Set ************** var slideList =3D new Array(); function slideSetting(setIdName ,mode){ if(!document.getElementById(setIdName + "1")){return false;} var divlist =3D new Array(); var i =3D 1; if(!document.getElementById || !document.getElementsByTagName) return; =09 while (document.getElementById(setIdName + "" +i)) { divlist.push(document.getElementById(setIdName + "" +i)); i++; } if (mode =3D=3D"shuffle") divlist.shuffle(); slideList[setIdName] =3D divlist; slideList[setIdName+"_no"] =3D 0; slideShow(setIdName,0); } function slideShowLoop(setIdName,mode){ if(!document.getElementById || !document.getElementsByTagName) return; var no =3D slideList[setIdName+"_no"]; no =3D (mode =3D=3D 'next') ? no+1:no-1; if(no >=3D slideList[setIdName].length) no =3D 0; if(no < 0) no =3D slideList[setIdName].length-1; slideShow(setIdName,no) } function slideShow(setIdName,no){ if(!document.getElementById || !document.getElementsByTagName) return; slideList[setIdName+"_no"] =3D no; for(i=3D0;i -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgen= t.indexOf('KHTML') =3D=3D -1, MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) }, BrowserFeatures: { XPath: !!document.evaluate, ElementExtensions: !!window.HTMLElement, SpecificElementExtensions: document.createElement('div').__proto__ && document.createElement('div').__proto__ !=3D=3D document.createElement('form').__proto__ }, ScriptFragment: ']*>([\\S\\s]*?)<\/script>', JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, emptyFunction: function() { }, K: function(x) { return x } }; if (Prototype.Browser.MobileSafari) Prototype.BrowserFeatures.SpecificElementExtensions =3D false; if (Prototype.Browser.WebKit) Prototype.BrowserFeatures.XPath =3D false; /* Based on Alex Arnell's inheritance implementation. */ var Class =3D { create: function() { var parent =3D null, properties =3D $A(arguments); if (Object.isFunction(properties[0])) parent =3D properties.shift(); function klass() { this.initialize.apply(this, arguments); } Object.extend(klass, Class.Methods); klass.superclass =3D parent; klass.subclasses =3D []; if (parent) { var subclass =3D function() { }; subclass.prototype =3D parent.prototype; klass.prototype =3D new subclass; parent.subclasses.push(klass); } for (var i =3D 0; i < properties.length; i++) klass.addMethods(properties[i]); if (!klass.prototype.initialize) klass.prototype.initialize =3D Prototype.emptyFunction; klass.prototype.constructor =3D klass; return klass; } }; Class.Methods =3D { addMethods: function(source) { var ancestor =3D this.superclass && this.superclass.prototype; var properties =3D Object.keys(source); if (!Object.keys({ toString: true }).length) properties.push("toString", "valueOf"); for (var i =3D 0, length =3D properties.length; i < length; i++) { var property =3D properties[i], value =3D source[property]; if (ancestor && Object.isFunction(value) && value.argumentNames().first() =3D=3D "$super") { var method =3D value, value =3D Object.extend((function(m) { return function() { return ancestor[m].apply(this, arguments) }; })(property).wrap(method), { valueOf: function() { return method }, toString: function() { return method.toString() } }); } this.prototype[property] =3D value; } return this; } }; var Abstract =3D { }; Object.extend =3D function(destination, source) { for (var property in source) destination[property] =3D source[property]; return destination; }; Object.extend(Object, { inspect: function(object) { try { if (object =3D=3D=3D undefined) return 'undefined'; if (object =3D=3D=3D null) return 'null'; return object.inspect ? object.inspect() : object.toString(); } catch (e) { if (e instanceof RangeError) return '...'; throw e; } }, toJSON: function(object) { var type =3D typeof object; switch (type) { case 'undefined': case 'function': case 'unknown': return; case 'boolean': return object.toString(); } if (object =3D=3D=3D null) return 'null'; if (object.toJSON) return object.toJSON(); if (Object.isElement(object)) return; var results =3D []; for (var property in object) { var value =3D Object.toJSON(object[property]); if (value !=3D=3D undefined) results.push(property.toJSON() + ': ' + value); } return '{' + results.join(', ') + '}'; }, toQueryString: function(object) { return $H(object).toQueryString(); }, toHTML: function(object) { return object && object.toHTML ? object.toHTML() : String.interpret(obj= ect); }, keys: function(object) { var keys =3D []; for (var property in object) keys.push(property); return keys; }, values: function(object) { var values =3D []; for (var property in object) values.push(object[property]); return values; }, clone: function(object) { return Object.extend({ }, object); }, isElement: function(object) { return object && object.nodeType =3D=3D 1; }, isArray: function(object) { return object && object.constructor =3D=3D=3D Array; }, isHash: function(object) { return object instanceof Hash; }, isFunction: function(object) { return typeof object =3D=3D "function"; }, isString: function(object) { return typeof object =3D=3D "string"; }, isNumber: function(object) { return typeof object =3D=3D "number"; }, isUndefined: function(object) { return typeof object =3D=3D "undefined"; } }); Object.extend(Function.prototype, { argumentNames: function() { var names =3D this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1= ].split(",").invoke("strip"); return names.length =3D=3D 1 && !names[0] ? [] : names; }, bind: function() { if (arguments.length < 2 && arguments[0] =3D=3D=3D undefined) return th= is; var __method =3D this, args =3D $A(arguments), object =3D args.shift(); return function() { return __method.apply(object, args.concat($A(arguments))); } }, bindAsEventListener: function() { var __method =3D this, args =3D $A(arguments), object =3D args.shift(); return function(event) { return __method.apply(object, [event || window.event].concat(args)); } }, curry: function() { if (!arguments.length) return this; var __method =3D this, args =3D $A(arguments); return function() { return __method.apply(this, args.concat($A(arguments))); } }, delay: function() { var __method =3D this, args =3D $A(arguments), timeout =3D args.shift()= * 1000; return window.setTimeout(function() { return __method.apply(__method, args); }, timeout); }, wrap: function(wrapper) { var __method =3D this; return function() { return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)= )); } }, methodize: function() { if (this._methodized) return this._methodized; var __method =3D this; return this._methodized =3D function() { return __method.apply(null, [this].concat($A(arguments))); }; } }); Function.prototype.defer =3D Function.prototype.delay.curry(0.01); Date.prototype.toJSON =3D function() { return '"' + this.getUTCFullYear() + '-' + (this.getUTCMonth() + 1).toPaddedString(2) + '-' + this.getUTCDate().toPaddedString(2) + 'T' + this.getUTCHours().toPaddedString(2) + ':' + this.getUTCMinutes().toPaddedString(2) + ':' + this.getUTCSeconds().toPaddedString(2) + 'Z"'; }; var Try =3D { these: function() { var returnValue; for (var i =3D 0, length =3D arguments.length; i < length; i++) { var lambda =3D arguments[i]; try { returnValue =3D lambda(); break; } catch (e) { } } return returnValue; } }; RegExp.prototype.match =3D RegExp.prototype.test; RegExp.escape =3D function(str) { return String(str).replace(/([.*+?^=3D!:${}()|[\]\/\\])/g, '\\$1'); }; /*-------------------------------------------------------------------------= -*/ var PeriodicalExecuter =3D Class.create({ initialize: function(callback, frequency) { this.callback =3D callback; this.frequency =3D frequency; this.currentlyExecuting =3D false; this.registerCallback(); }, registerCallback: function() { this.timer =3D setInterval(this.onTimerEvent.bind(this), this.frequency= * 1000); }, execute: function() { this.callback(this); }, stop: function() { if (!this.timer) return; clearInterval(this.timer); this.timer =3D null; }, onTimerEvent: function() { if (!this.currentlyExecuting) { try { this.currentlyExecuting =3D true; this.execute(); } finally { this.currentlyExecuting =3D false; } } } }); Object.extend(String, { interpret: function(value) { return value =3D=3D null ? '' : String(value); }, specialChar: { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '\\': '\\\\' } }); Object.extend(String.prototype, { gsub: function(pattern, replacement) { var result =3D '', source =3D this, match; replacement =3D arguments.callee.prepareReplacement(replacement); while (source.length > 0) { if (match =3D source.match(pattern)) { result +=3D source.slice(0, match.index); result +=3D String.interpret(replacement(match)); source =3D source.slice(match.index + match[0].length); } else { result +=3D source, source =3D ''; } } return result; }, sub: function(pattern, replacement, count) { replacement =3D this.gsub.prepareReplacement(replacement); count =3D count =3D=3D=3D undefined ? 1 : count; return this.gsub(pattern, function(match) { if (--count < 0) return match[0]; return replacement(match); }); }, scan: function(pattern, iterator) { this.gsub(pattern, iterator); return String(this); }, truncate: function(length, truncation) { length =3D length || 30; truncation =3D truncation =3D=3D=3D undefined ? '...' : truncation; return this.length > length ? this.slice(0, length - truncation.length) + truncation : String(this); }, strip: function() { return this.replace(/^\s+/, '').replace(/\s+$/, ''); }, stripTags: function() { return this.replace(/<\/?[^>]+>/gi, ''); }, stripScripts: function() { return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); }, extractScripts: function() { var matchAll =3D new RegExp(Prototype.ScriptFragment, 'img'); var matchOne =3D new RegExp(Prototype.ScriptFragment, 'im'); return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1]; }); }, evalScripts: function() { return this.extractScripts().map(function(script) { return eval(script)= }); }, escapeHTML: function() { var self =3D arguments.callee; self.text.data =3D this; return self.div.innerHTML; }, unescapeHTML: function() { var div =3D new Element('div'); div.innerHTML =3D this.stripTags(); return div.childNodes[0] ? (div.childNodes.length > 1 ? $A(div.childNodes).inject('', function(memo, node) { return memo+node= .nodeValue }) : div.childNodes[0].nodeValue) : ''; }, toQueryParams: function(separator) { var match =3D this.strip().match(/([^?#]*)(#.*)?$/); if (!match) return { }; return match[1].split(separator || '&').inject({ }, function(hash, pair= ) { if ((pair =3D pair.split('=3D'))[0]) { var key =3D decodeURIComponent(pair.shift()); var value =3D pair.length > 1 ? pair.join('=3D') : pair[0]; if (value !=3D undefined) value =3D decodeURIComponent(value); if (key in hash) { if (!Object.isArray(hash[key])) hash[key] =3D [hash[key]]; hash[key].push(value); } else hash[key] =3D value; } return hash; }); }, toArray: function() { return this.split(''); }, succ: function() { return this.slice(0, this.length - 1) + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); }, times: function(count) { return count < 1 ? '' : new Array(count + 1).join(this); }, camelize: function() { var parts =3D this.split('-'), len =3D parts.length; if (len =3D=3D 1) return parts[0]; var camelized =3D this.charAt(0) =3D=3D '-' ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) : parts[0]; for (var i =3D 1; i < len; i++) camelized +=3D parts[i].charAt(0).toUpperCase() + parts[i].substring(= 1); return camelized; }, capitalize: function() { return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); }, underscore: function() { return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gs= ub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); }, dasherize: function() { return this.gsub(/_/,'-'); }, inspect: function(useDoubleQuotes) { var escapedString =3D this.gsub(/[\x00-\x1f\\]/, function(match) { var character =3D String.specialChar[match[0]]; return character ? character : '\\u00' + match[0].charCodeAt().toPadd= edString(2, 16); }); if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') += '"'; return "'" + escapedString.replace(/'/g, '\\\'') + "'"; }, toJSON: function() { return this.inspect(true); }, unfilterJSON: function(filter) { return this.sub(filter || Prototype.JSONFilter, '#{1}'); }, isJSON: function() { var str =3D this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); }, evalJSON: function(sanitize) { var json =3D this.unfilterJSON(); try { if (!sanitize || json.isJSON()) return eval('(' + json + ')'); } catch (e) { } throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); }, include: function(pattern) { return this.indexOf(pattern) > -1; }, startsWith: function(pattern) { return this.indexOf(pattern) =3D=3D=3D 0; }, endsWith: function(pattern) { var d =3D this.length - pattern.length; return d >=3D 0 && this.lastIndexOf(pattern) =3D=3D=3D d; }, empty: function() { return this =3D=3D ''; }, blank: function() { return /^\s*$/.test(this); }, interpolate: function(object, pattern) { return new Template(this, pattern).evaluate(object); } }); if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.= prototype, { escapeHTML: function() { return this.replace(/&/g,'&').replace(//g,'&g= t;'); }, unescapeHTML: function() { return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,= '>'); } }); String.prototype.gsub.prepareReplacement =3D function(replacement) { if (Object.isFunction(replacement)) return replacement; var template =3D new Template(replacement); return function(match) { return template.evaluate(match) }; }; String.prototype.parseQuery =3D String.prototype.toQueryParams; Object.extend(String.prototype.escapeHTML, { div: document.createElement('div'), text: document.createTextNode('') }); with (String.prototype.escapeHTML) div.appendChild(text); var Template =3D Class.create({ initialize: function(template, pattern) { this.template =3D template.toString(); this.pattern =3D pattern || Template.Pattern; }, evaluate: function(object) { if (Object.isFunction(object.toTemplateReplacements)) object =3D object.toTemplateReplacements(); return this.template.gsub(this.pattern, function(match) { if (object =3D=3D null) return ''; var before =3D match[1] || ''; if (before =3D=3D '\\') return match[2]; var ctx =3D object, expr =3D match[3]; var pattern =3D /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match =3D= pattern.exec(expr); if (match =3D=3D null) return before; while (match !=3D null) { var comp =3D match[1].startsWith('[') ? match[2].gsub('\\\\]', ']')= : match[1]; ctx =3D ctx[comp]; if (null =3D=3D ctx || '' =3D=3D match[3]) break; expr =3D expr.substring('[' =3D=3D match[3] ? match[1].length : mat= ch[0].length); match =3D pattern.exec(expr); } return before + String.interpret(ctx); }.bind(this)); } }); Template.Pattern =3D /(^|.|\r|\n)(#\{(.*?)\})/; var $break =3D { }; var Enumerable =3D { each: function(iterator, context) { var index =3D 0; iterator =3D iterator.bind(context); try { this._each(function(value) { iterator(value, index++); }); } catch (e) { if (e !=3D $break) throw e; } return this; }, eachSlice: function(number, iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var index =3D -number, slices =3D [], array =3D this.toArray(); while ((index +=3D number) < array.length) slices.push(array.slice(index, index+number)); return slices.collect(iterator, context); }, all: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result =3D true; this.each(function(value, index) { result =3D result && !!iterator(value, index); if (!result) throw $break; }); return result; }, any: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result =3D false; this.each(function(value, index) { if (result =3D !!iterator(value, index)) throw $break; }); return result; }, collect: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var results =3D []; this.each(function(value, index) { results.push(iterator(value, index)); }); return results; }, detect: function(iterator, context) { iterator =3D iterator.bind(context); var result; this.each(function(value, index) { if (iterator(value, index)) { result =3D value; throw $break; } }); return result; }, findAll: function(iterator, context) { iterator =3D iterator.bind(context); var results =3D []; this.each(function(value, index) { if (iterator(value, index)) results.push(value); }); return results; }, grep: function(filter, iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var results =3D []; if (Object.isString(filter)) filter =3D new RegExp(filter); this.each(function(value, index) { if (filter.match(value)) results.push(iterator(value, index)); }); return results; }, include: function(object) { if (Object.isFunction(this.indexOf)) if (this.indexOf(object) !=3D -1) return true; var found =3D false; this.each(function(value) { if (value =3D=3D object) { found =3D true; throw $break; } }); return found; }, inGroupsOf: function(number, fillWith) { fillWith =3D fillWith =3D=3D=3D undefined ? null : fillWith; return this.eachSlice(number, function(slice) { while(slice.length < number) slice.push(fillWith); return slice; }); }, inject: function(memo, iterator, context) { iterator =3D iterator.bind(context); this.each(function(value, index) { memo =3D iterator(memo, value, index); }); return memo; }, invoke: function(method) { var args =3D $A(arguments).slice(1); return this.map(function(value) { return value[method].apply(value, args); }); }, max: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { value =3D iterator(value, index); if (result =3D=3D undefined || value >=3D result) result =3D value; }); return result; }, min: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { value =3D iterator(value, index); if (result =3D=3D undefined || value < result) result =3D value; }); return result; }, partition: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var trues =3D [], falses =3D []; this.each(function(value, index) { (iterator(value, index) ? trues : falses).push(value); }); return [trues, falses]; }, pluck: function(property) { var results =3D []; this.each(function(value) { results.push(value[property]); }); return results; }, reject: function(iterator, context) { iterator =3D iterator.bind(context); var results =3D []; this.each(function(value, index) { if (!iterator(value, index)) results.push(value); }); return results; }, sortBy: function(iterator, context) { iterator =3D iterator.bind(context); return this.map(function(value, index) { return {value: value, criteria: iterator(value, index)}; }).sort(function(left, right) { var a =3D left.criteria, b =3D right.criteria; return a < b ? -1 : a > b ? 1 : 0; }).pluck('value'); }, toArray: function() { return this.map(); }, zip: function() { var iterator =3D Prototype.K, args =3D $A(arguments); if (Object.isFunction(args.last())) iterator =3D args.pop(); var collections =3D [this].concat(args).map($A); return this.map(function(value, index) { return iterator(collections.pluck(index)); }); }, size: function() { return this.toArray().length; }, inspect: function() { return '#'; } }; Object.extend(Enumerable, { map: Enumerable.collect, find: Enumerable.detect, select: Enumerable.findAll, filter: Enumerable.findAll, member: Enumerable.include, entries: Enumerable.toArray, every: Enumerable.all, some: Enumerable.any }); function $A(iterable) { if (!iterable) return []; if (iterable.toArray) return iterable.toArray(); var length =3D iterable.length, results =3D new Array(length); while (length--) results[length] =3D iterable[length]; return results; } if (Prototype.Browser.WebKit) { function $A(iterable) { if (!iterable) return []; if (!(Object.isFunction(iterable) && iterable =3D=3D '[object NodeList]= ') && iterable.toArray) return iterable.toArray(); var length =3D iterable.length, results =3D new Array(length); while (length--) results[length] =3D iterable[length]; return results; } } Array.from =3D $A; Object.extend(Array.prototype, Enumerable); if (!Array.prototype._reverse) Array.prototype._reverse =3D Array.prototype= .reverse; Object.extend(Array.prototype, { _each: function(iterator) { for (var i =3D 0, length =3D this.length; i < length; i++) iterator(this[i]); }, clear: function() { this.length =3D 0; return this; }, first: function() { return this[0]; }, last: function() { return this[this.length - 1]; }, compact: function() { return this.select(function(value) { return value !=3D null; }); }, flatten: function() { return this.inject([], function(array, value) { return array.concat(Object.isArray(value) ? value.flatten() : [value]); }); }, without: function() { var values =3D $A(arguments); return this.select(function(value) { return !values.include(value); }); }, reverse: function(inline) { return (inline !=3D=3D false ? this : this.toArray())._reverse(); }, reduce: function() { return this.length > 1 ? this : this[0]; }, uniq: function(sorted) { return this.inject([], function(array, value, index) { if (0 =3D=3D index || (sorted ? array.last() !=3D value : !array.incl= ude(value))) array.push(value); return array; }); }, intersect: function(array) { return this.uniq().findAll(function(item) { return array.detect(function(value) { return item =3D=3D=3D value }); }); }, clone: function() { return [].concat(this); }, size: function() { return this.length; }, inspect: function() { return '[' + this.map(Object.inspect).join(', ') + ']'; }, toJSON: function() { var results =3D []; this.each(function(object) { var value =3D Object.toJSON(object); if (value !=3D=3D undefined) results.push(value); }); return '[' + results.join(', ') + ']'; } }); // use native browser JS 1.6 implementation if available if (Object.isFunction(Array.prototype.forEach)) Array.prototype._each =3D Array.prototype.forEach; if (!Array.prototype.indexOf) Array.prototype.indexOf =3D function(item, i)= { i || (i =3D 0); var length =3D this.length; if (i < 0) i =3D length + i; for (; i < length; i++) if (this[i] =3D=3D=3D item) return i; return -1; }; if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf =3D function(= item, i) { i =3D isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; var n =3D this.slice(0, i).reverse().indexOf(item); return (n < 0) ? n : i - n - 1; }; Array.prototype.toArray =3D Array.prototype.clone; function $w(string) { if (!Object.isString(string)) return []; string =3D string.strip(); return string ? string.split(/\s+/) : []; } if (Prototype.Browser.Opera){ Array.prototype.concat =3D function() { var array =3D []; for (var i =3D 0, length =3D this.length; i < length; i++) array.push(t= his[i]); for (var i =3D 0, length =3D arguments.length; i < length; i++) { if (Object.isArray(arguments[i])) { for (var j =3D 0, arrayLength =3D arguments[i].length; j < arrayLen= gth; j++) array.push(arguments[i][j]); } else { array.push(arguments[i]); } } return array; }; } Object.extend(Number.prototype, { toColorPart: function() { return this.toPaddedString(2, 16); }, succ: function() { return this + 1; }, times: function(iterator) { $R(0, this, true).each(iterator); return this; }, toPaddedString: function(length, radix) { var string =3D this.toString(radix || 10); return '0'.times(length - string.length) + string; }, toJSON: function() { return isFinite(this) ? this.toString() : 'null'; } }); $w('abs round ceil floor').each(function(method){ Number.prototype[method] =3D Math[method].methodize(); }); function $H(object) { return new Hash(object); }; var Hash =3D Class.create(Enumerable, (function() { if (function() { var i =3D 0, Test =3D function(value) { this.key =3D value }; Test.prototype.key =3D 'foo'; for (var property in new Test('bar')) i++; return i > 1; }()) { function each(iterator) { var cache =3D []; for (var key in this._object) { var value =3D this._object[key]; if (cache.include(key)) continue; cache.push(key); var pair =3D [key, value]; pair.key =3D key; pair.value =3D value; iterator(pair); } } } else { function each(iterator) { for (var key in this._object) { var value =3D this._object[key], pair =3D [key, value]; pair.key =3D key; pair.value =3D value; iterator(pair); } } } function toQueryPair(key, value) { if (Object.isUndefined(value)) return key; return key + '=3D' + encodeURIComponent(String.interpret(value)); } return { initialize: function(object) { this._object =3D Object.isHash(object) ? object.toObject() : Object.c= lone(object); }, _each: each, set: function(key, value) { return this._object[key] =3D value; }, get: function(key) { return this._object[key]; }, unset: function(key) { var value =3D this._object[key]; delete this._object[key]; return value; }, toObject: function() { return Object.clone(this._object); }, keys: function() { return this.pluck('key'); }, values: function() { return this.pluck('value'); }, index: function(value) { var match =3D this.detect(function(pair) { return pair.value =3D=3D=3D value; }); return match && match.key; }, merge: function(object) { return this.clone().update(object); }, update: function(object) { return new Hash(object).inject(this, function(result, pair) { result.set(pair.key, pair.value); return result; }); }, toQueryString: function() { return this.map(function(pair) { var key =3D encodeURIComponent(pair.key), values =3D pair.value; if (values && typeof values =3D=3D 'object') { if (Object.isArray(values)) return values.map(toQueryPair.curry(key)).join('&'); } return toQueryPair(key, values); }).join('&'); }, inspect: function() { return '#'; }, toJSON: function() { return Object.toJSON(this.toObject()); }, clone: function() { return new Hash(this); } } })()); Hash.prototype.toTemplateReplacements =3D Hash.prototype.toObject; Hash.from =3D $H; var ObjectRange =3D Class.create(Enumerable, { initialize: function(start, end, exclusive) { this.start =3D start; this.end =3D end; this.exclusive =3D exclusive; }, _each: function(iterator) { var value =3D this.start; while (this.include(value)) { iterator(value); value =3D value.succ(); } }, include: function(value) { if (value < this.start) return false; if (this.exclusive) return value < this.end; return value <=3D this.end; } }); var $R =3D function(start, end, exclusive) { return new ObjectRange(start, end, exclusive); }; var Ajax =3D { getTransport: function() { return Try.these( function() {return new XMLHttpRequest()}, function() {return new ActiveXObject('Msxml2.XMLHTTP')}, function() {return new ActiveXObject('Microsoft.XMLHTTP')} ) || false; }, activeRequestCount: 0 }; Ajax.Responders =3D { responders: [], _each: function(iterator) { this.responders._each(iterator); }, register: function(responder) { if (!this.include(responder)) this.responders.push(responder); }, unregister: function(responder) { this.responders =3D this.responders.without(responder); }, dispatch: function(callback, request, transport, json) { this.each(function(responder) { if (Object.isFunction(responder[callback])) { try { responder[callback].apply(responder, [request, transport, json]); } catch (e) { } } }); } }; Object.extend(Ajax.Responders, Enumerable); Ajax.Responders.register({ onCreate: function() { Ajax.activeRequestCount++ }, onComplete: function() { Ajax.activeRequestCount-- } }); Ajax.Base =3D Class.create({ initialize: function(options) { this.options =3D { method: 'post', asynchronous: true, contentType: 'application/x-www-form-urlencoded', encoding: 'UTF-8', parameters: '', evalJSON: true, evalJS: true }; Object.extend(this.options, options || { }); this.options.method =3D this.options.method.toLowerCase(); if (Object.isString(this.options.parameters)) this.options.parameters =3D this.options.parameters.toQueryParams(); } }); Ajax.Request =3D Class.create(Ajax.Base, { _complete: false, initialize: function($super, url, options) { $super(options); this.transport =3D Ajax.getTransport(); this.request(url); }, request: function(url) { this.url =3D url; this.method =3D this.options.method; var params =3D Object.clone(this.options.parameters); if (!['get', 'post'].include(this.method)) { // simulate other verbs over post params['_method'] =3D this.method; this.method =3D 'post'; } this.parameters =3D params; if (params =3D Object.toQueryString(params)) { // when GET, append parameters to URL if (this.method =3D=3D 'get') this.url +=3D (this.url.include('?') ? '&' : '?') + params; else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) params +=3D '&_=3D'; } try { var response =3D new Ajax.Response(this); if (this.options.onCreate) this.options.onCreate(response); Ajax.Responders.dispatch('onCreate', this, response); this.transport.open(this.method.toUpperCase(), this.url, this.options.asynchronous); if (this.options.asynchronous) this.respondToReadyState.bind(this).de= fer(1); this.transport.onreadystatechange =3D this.onStateChange.bind(this); this.setRequestHeaders(); this.body =3D this.method =3D=3D 'post' ? (this.options.postBody ||= params) : null; this.transport.send(this.body); /* Force Firefox to handle ready state 4 for synchronous requests */ if (!this.options.asynchronous && this.transport.overrideMimeType) this.onStateChange(); } catch (e) { this.dispatchException(e); } }, onStateChange: function() { var readyState =3D this.transport.readyState; if (readyState > 1 && !((readyState =3D=3D 4) && this._complete)) this.respondToReadyState(this.transport.readyState); }, setRequestHeaders: function() { var headers =3D { 'X-Requested-With': 'XMLHttpRequest', 'X-Prototype-Version': Prototype.Version, 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' }; if (this.method =3D=3D 'post') { headers['Content-type'] =3D this.options.contentType + (this.options.encoding ? '; charset=3D' + this.options.encoding := ''); /* Force "Connection: close" for older Mozilla browsers to work * around a bug where XMLHttpRequest sends an incorrect * Content-length header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 20= 05) headers['Connection'] =3D 'close'; } // user-defined headers if (typeof this.options.requestHeaders =3D=3D 'object') { var extras =3D this.options.requestHeaders; if (Object.isFunction(extras.push)) for (var i =3D 0, length =3D extras.length; i < length; i +=3D 2) headers[extras[i]] =3D extras[i+1]; else $H(extras).each(function(pair) { headers[pair.key] =3D pair.value= }); } for (var name in headers) this.transport.setRequestHeader(name, headers[name]); }, success: function() { var status =3D this.getStatus(); return !status || (status >=3D 200 && status < 300); }, getStatus: function() { try { return this.transport.status || 0; } catch (e) { return 0 } }, respondToReadyState: function(readyState) { var state =3D Ajax.Request.Events[readyState], response =3D new Ajax.Re= sponse(this); if (state =3D=3D 'Complete') { try { this._complete =3D true; (this.options['on' + response.status] || this.options['on' + (this.success() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(response, response.headerJSON); } catch (e) { this.dispatchException(e); } var contentType =3D response.getHeader('Content-type'); if (this.options.evalJS =3D=3D 'force' || (this.options.evalJS && contentType && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)scr= ipt(;.*)?\s*$/i))) this.evalResponse(); } try { (this.options['on' + state] || Prototype.emptyFunction)(response, res= ponse.headerJSON); Ajax.Responders.dispatch('on' + state, this, response, response.heade= rJSON); } catch (e) { this.dispatchException(e); } if (state =3D=3D 'Complete') { // avoid memory leak in MSIE: clean up this.transport.onreadystatechange =3D Prototype.emptyFunction; } }, getHeader: function(name) { try { return this.transport.getResponseHeader(name); } catch (e) { return null } }, evalResponse: function() { try { return eval((this.transport.responseText || '').unfilterJSON()); } catch (e) { this.dispatchException(e); } }, dispatchException: function(exception) { (this.options.onException || Prototype.emptyFunction)(this, exception); Ajax.Responders.dispatch('onException', this, exception); } }); Ajax.Request.Events =3D ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; Ajax.Response =3D Class.create({ initialize: function(request){ this.request =3D request; var transport =3D this.transport =3D request.transport, readyState =3D this.readyState =3D transport.readyState; if((readyState > 2 && !Prototype.Browser.IE) || readyState =3D=3D 4) { this.status =3D this.getStatus(); this.statusText =3D this.getStatusText(); this.responseText =3D String.interpret(transport.responseText); this.headerJSON =3D this._getHeaderJSON(); } if(readyState =3D=3D 4) { var xml =3D transport.responseXML; this.responseXML =3D xml =3D=3D=3D undefined ? null : xml; this.responseJSON =3D this._getResponseJSON(); } }, status: 0, statusText: '', getStatus: Ajax.Request.prototype.getStatus, getStatusText: function() { try { return this.transport.statusText || ''; } catch (e) { return '' } }, getHeader: Ajax.Request.prototype.getHeader, getAllHeaders: function() { try { return this.getAllResponseHeaders(); } catch (e) { return null } }, getResponseHeader: function(name) { return this.transport.getResponseHeader(name); }, getAllResponseHeaders: function() { return this.transport.getAllResponseHeaders(); }, _getHeaderJSON: function() { var json =3D this.getHeader('X-JSON'); if (!json) return null; json =3D decodeURIComponent(escape(json)); try { return json.evalJSON(this.request.options.sanitizeJSON); } catch (e) { this.request.dispatchException(e); } }, _getResponseJSON: function() { var options =3D this.request.options; if (!options.evalJSON || (options.evalJSON !=3D 'force' && !(this.getHeader('Content-type') || '').include('application/json'))) return null; try { return this.transport.responseText.evalJSON(options.sanitizeJSON); } catch (e) { this.request.dispatchException(e); } } }); Ajax.Updater =3D Class.create(Ajax.Request, { initialize: function($super, container, url, options) { this.container =3D { success: (container.success || container), failure: (container.failure || (container.success ? null : container)) }; options =3D options || { }; var onComplete =3D options.onComplete; options.onComplete =3D (function(response, param) { this.updateContent(response.responseText); if (Object.isFunction(onComplete)) onComplete(response, param); }).bind(this); $super(url, options); }, updateContent: function(responseText) { var receiver =3D this.container[this.success() ? 'success' : 'failure'], options =3D this.options; if (!options.evalScripts) responseText =3D responseText.stripScripts(); if (receiver =3D $(receiver)) { if (options.insertion) { if (Object.isString(options.insertion)) { var insertion =3D { }; insertion[options.insertion] =3D responseT= ext; receiver.insert(insertion); } else options.insertion(receiver, responseText); } else receiver.update(responseText); } if (this.success()) { if (this.onComplete) this.onComplete.bind(this).defer(); } } }); Ajax.PeriodicalUpdater =3D Class.create(Ajax.Base, { initialize: function($super, container, url, options) { $super(options); this.onComplete =3D this.options.onComplete; this.frequency =3D (this.options.frequency || 2); this.decay =3D (this.options.decay || 1); this.updater =3D { }; this.container =3D container; this.url =3D url; this.start(); }, start: function() { this.options.onComplete =3D this.updateComplete.bind(this); this.onTimerEvent(); }, stop: function() { this.updater.options.onComplete =3D undefined; clearTimeout(this.timer); (this.onComplete || Prototype.emptyFunction).apply(this, arguments); }, updateComplete: function(response) { if (this.options.decay) { this.decay =3D (response.responseText =3D=3D this.lastText ? this.decay * this.options.decay : 1); this.lastText =3D response.responseText; } this.timer =3D this.onTimerEvent.bind(this).delay(this.decay * this.fre= quency); }, onTimerEvent: function() { this.updater =3D new Ajax.Updater(this.container, this.url, this.option= s); } }); function $(element) { if (arguments.length > 1) { for (var i =3D 0, elements =3D [], length =3D arguments.length; i < len= gth; i++) elements.push($(arguments[i])); return elements; } if (Object.isString(element)) element =3D document.getElementById(element); return Element.extend(element); } if (Prototype.BrowserFeatures.XPath) { document._getElementsByXPath =3D function(expression, parentElement) { var results =3D []; var query =3D document.evaluate(expression, $(parentElement) || documen= t, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i =3D 0, length =3D query.snapshotLength; i < length; i++) results.push(Element.extend(query.snapshotItem(i))); return results; }; } /*-------------------------------------------------------------------------= -*/ if (!window.Node) var Node =3D { }; if (!Node.ELEMENT_NODE) { // DOM level 2 ECMAScript Language Binding Object.extend(Node, { ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5, ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12 }); } (function() { var element =3D this.Element; this.Element =3D function(tagName, attributes) { attributes =3D attributes || { }; tagName =3D tagName.toLowerCase(); var cache =3D Element.cache; if (Prototype.Browser.IE && attributes.name) { tagName =3D '<' + tagName + ' name=3D"' + attributes.name + '">'; delete attributes.name; return Element.writeAttribute(document.createElement(tagName), attrib= utes); } if (!cache[tagName]) cache[tagName] =3D Element.extend(document.createE= lement(tagName)); return Element.writeAttribute(cache[tagName].cloneNode(false), attribut= es); }; Object.extend(this.Element, element || { }); }).call(window); Element.cache =3D { }; Element.Methods =3D { visible: function(element) { return $(element).style.display !=3D 'none'; }, toggle: function(element) { element =3D $(element); Element[Element.visible(element) ? 'hide' : 'show'](element); return element; }, hide: function(element) { $(element).style.display =3D 'none'; return element; }, show: function(element) { $(element).style.display =3D ''; return element; }, remove: function(element) { element =3D $(element); element.parentNode.removeChild(element); return element; }, update: function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) return element.update().insert(content); content =3D Object.toHTML(content); element.innerHTML =3D content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }, replace: function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); else if (!Object.isElement(content)) { content =3D Object.toHTML(content); var range =3D element.ownerDocument.createRange(); range.selectNode(element); content.evalScripts.bind(content).defer(); content =3D range.createContextualFragment(content.stripScripts()); } element.parentNode.replaceChild(content, element); return element; }, insert: function(element, insertions) { element =3D $(element); if (Object.isString(insertions) || Object.isNumber(insertions) || Object.isElement(insertions) || (insertions && (insertions.toElemen= t || insertions.toHTML))) insertions =3D {bottom:insertions}; var content, t, range; for (position in insertions) { content =3D insertions[position]; position =3D position.toLowerCase(); t =3D Element._insertionTranslations[position]; if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) { t.insert(element, content); continue; } content =3D Object.toHTML(content); range =3D element.ownerDocument.createRange(); t.initializeRange(element, range); t.insert(element, range.createContextualFragment(content.stripScripts= ())); content.evalScripts.bind(content).defer(); } return element; }, wrap: function(element, wrapper, attributes) { element =3D $(element); if (Object.isElement(wrapper)) $(wrapper).writeAttribute(attributes || { }); else if (Object.isString(wrapper)) wrapper =3D new Element(wrapper, att= ributes); else wrapper =3D new Element('div', wrapper); if (element.parentNode) element.parentNode.replaceChild(wrapper, element); wrapper.appendChild(element); return wrapper; }, inspect: function(element) { element =3D $(element); var result =3D '<' + element.tagName.toLowerCase(); $H({'id': 'id', 'className': 'class'}).each(function(pair) { var property =3D pair.first(), attribute =3D pair.last(); var value =3D (element[property] || '').toString(); if (value) result +=3D ' ' + attribute + '=3D' + value.inspect(true); }); return result + '>'; }, recursivelyCollect: function(element, property) { element =3D $(element); var elements =3D []; while (element =3D element[property]) if (element.nodeType =3D=3D 1) elements.push(Element.extend(element)); return elements; }, ancestors: function(element) { return $(element).recursivelyCollect('parentNode'); }, descendants: function(element) { return $A($(element).getElementsByTagName('*')).each(Element.extend); }, firstDescendant: function(element) { element =3D $(element).firstChild; while (element && element.nodeType !=3D 1) element =3D element.nextSibl= ing; return $(element); }, immediateDescendants: function(element) { if (!(element =3D $(element).firstChild)) return []; while (element && element.nodeType !=3D 1) element =3D element.nextSibl= ing; if (element) return [element].concat($(element).nextSiblings()); return []; }, previousSiblings: function(element) { return $(element).recursivelyCollect('previousSibling'); }, nextSiblings: function(element) { return $(element).recursivelyCollect('nextSibling'); }, siblings: function(element) { element =3D $(element); return element.previousSiblings().reverse().concat(element.nextSiblings= ()); }, match: function(element, selector) { if (Object.isString(selector)) selector =3D new Selector(selector); return selector.match($(element)); }, up: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return $(element.parentNode); var ancestors =3D element.ancestors(); return expression ? Selector.findElement(ancestors, expression, index) : ancestors[index || 0]; }, down: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return element.firstDescendant(); var descendants =3D element.descendants(); return expression ? Selector.findElement(descendants, expression, index= ) : descendants[index || 0]; }, previous: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return $(Selector.handlers.previousEleme= ntSibling(element)); var previousSiblings =3D element.previousSiblings(); return expression ? Selector.findElement(previousSiblings, expression,= index) : previousSiblings[index || 0]; }, next: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return $(Selector.handlers.nextElementSi= bling(element)); var nextSiblings =3D element.nextSiblings(); return expression ? Selector.findElement(nextSiblings, expression, inde= x) : nextSiblings[index || 0]; }, select: function() { var args =3D $A(arguments), element =3D $(args.shift()); return Selector.findChildElements(element, args); }, adjacent: function() { var args =3D $A(arguments), element =3D $(args.shift()); return Selector.findChildElements(element.parentNode, args).without(ele= ment); }, identify: function(element) { element =3D $(element); var id =3D element.readAttribute('id'), self =3D arguments.callee; if (id) return id; do { id =3D 'anonymous_element_' + self.counter++ } while ($(id)); element.writeAttribute('id', id); return id; }, readAttribute: function(element, name) { element =3D $(element); if (Prototype.Browser.IE) { var t =3D Element._attributeTranslations.read; if (t.values[name]) return t.values[name](element, name); if (t.names[name]) name =3D t.names[name]; if (name.include(':')) { return (!element.attributes || !element.attributes[name]) ? null : element.attributes[name].value; } } return element.getAttribute(name); }, writeAttribute: function(element, name, value) { element =3D $(element); var attributes =3D { }, t =3D Element._attributeTranslations.write; if (typeof name =3D=3D 'object') attributes =3D name; else attributes[name] =3D value =3D=3D=3D undefined ? true : value; for (var attr in attributes) { var name =3D t.names[attr] || attr, value =3D attributes[attr]; if (t.values[attr]) name =3D t.values[attr](element, value); if (value =3D=3D=3D false || value =3D=3D=3D null) element.removeAttribute(name); else if (value =3D=3D=3D true) element.setAttribute(name, name); else element.setAttribute(name, value); } return element; }, getHeight: function(element) { return $(element).getDimensions().height; }, getWidth: function(element) { return $(element).getDimensions().width; }, classNames: function(element) { return new Element.ClassNames(element); }, hasClassName: function(element, className) { if (!(element =3D $(element))) return; var elementClassName =3D element.className; return (elementClassName.length > 0 && (elementClassName =3D=3D classNa= me || new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))= ); }, addClassName: function(element, className) { if (!(element =3D $(element))) return; if (!element.hasClassName(className)) element.className +=3D (element.className ? ' ' : '') + className; return element; }, removeClassName: function(element, className) { if (!(element =3D $(element))) return; element.className =3D element.className.replace( new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); return element; }, toggleClassName: function(element, className) { if (!(element =3D $(element))) return; return element[element.hasClassName(className) ? 'removeClassName' : 'addClassName'](className); }, // removes whitespace-only text node children cleanWhitespace: function(element) { element =3D $(element); var node =3D element.firstChild; while (node) { var nextNode =3D node.nextSibling; if (node.nodeType =3D=3D 3 && !/\S/.test(node.nodeValue)) element.removeChild(node); node =3D nextNode; } return element; }, empty: function(element) { return $(element).innerHTML.blank(); }, descendantOf: function(element, ancestor) { element =3D $(element), ancestor =3D $(ancestor); if (element.compareDocumentPosition) return (element.compareDocumentPosition(ancestor) & 8) =3D=3D=3D 8; if (element.sourceIndex && !Prototype.Browser.Opera) { var e =3D element.sourceIndex, a =3D ancestor.sourceIndex, nextAncestor =3D ancestor.nextSibling; if (!nextAncestor) { do { ancestor =3D ancestor.parentNode; } while (!(nextAncestor =3D ancestor.nextSibling) && ancestor.parentN= ode); } if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex); } while (element =3D element.parentNode) if (element =3D=3D ancestor) return true; return false; }, scrollTo: function(element) { element =3D $(element); var pos =3D element.cumulativeOffset(); window.scrollTo(pos[0], pos[1]); return element; }, getStyle: function(element, style) { element =3D $(element); style =3D style =3D=3D 'float' ? 'cssFloat' : style.camelize(); var value =3D element.style[style]; if (!value) { var css =3D document.defaultView.getComputedStyle(element, null); value =3D css ? css[style] : null; } if (style =3D=3D 'opacity') return value ? parseFloat(value) : 1.0; return value =3D=3D 'auto' ? null : value; }, getOpacity: function(element) { return $(element).getStyle('opacity'); }, setStyle: function(element, styles) { element =3D $(element); var elementStyle =3D element.style, match; if (Object.isString(styles)) { element.style.cssText +=3D ';' + styles; return styles.include('opacity') ? element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : ele= ment; } for (var property in styles) if (property =3D=3D 'opacity') element.setOpacity(styles[property]); else elementStyle[(property =3D=3D 'float' || property =3D=3D 'cssFloat'= ) ? (elementStyle.styleFloat =3D=3D=3D undefined ? 'cssFloat' : 'styl= eFloat') : property] =3D styles[property]; return element; }, setOpacity: function(element, value) { element =3D $(element); element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? ''= : (value < 0.00001) ? 0 : value; return element; }, getDimensions: function(element) { element =3D $(element); var display =3D $(element).getStyle('display'); if (display !=3D 'none' && display !=3D null) // Safari bug return {width: element.offsetWidth, height: element.offsetHeight}; // All *Width and *Height properties give 0 on elements with display no= ne, // so enable the element temporarily var els =3D element.style; var originalVisibility =3D els.visibility; var originalPosition =3D els.position; var originalDisplay =3D els.display; els.visibility =3D 'hidden'; els.position =3D 'absolute'; els.display =3D 'block'; var originalWidth =3D element.clientWidth; var originalHeight =3D element.clientHeight; els.display =3D originalDisplay; els.position =3D originalPosition; els.visibility =3D originalVisibility; return {width: originalWidth, height: originalHeight}; }, makePositioned: function(element) { element =3D $(element); var pos =3D Element.getStyle(element, 'position'); if (pos =3D=3D 'static' || !pos) { element._madePositioned =3D true; element.style.position =3D 'relative'; // Opera returns the offset relative to the positioning context, when= an // element is position relative but top and left have not been defined if (window.opera) { element.style.top =3D 0; element.style.left =3D 0; } } return element; }, undoPositioned: function(element) { element =3D $(element); if (element._madePositioned) { element._madePositioned =3D undefined; element.style.position =3D element.style.top =3D element.style.left =3D element.style.bottom =3D element.style.right =3D ''; } return element; }, makeClipping: function(element) { element =3D $(element); if (element._overflow) return element; element._overflow =3D Element.getStyle(element, 'overflow') || 'auto'; if (element._overflow !=3D=3D 'hidden') element.style.overflow =3D 'hidden'; return element; }, undoClipping: function(element) { element =3D $(element); if (!element._overflow) return element; element.style.overflow =3D element._overflow =3D=3D 'auto' ? '' : eleme= nt._overflow; element._overflow =3D null; return element; }, cumulativeOffset: function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; element =3D element.offsetParent; } while (element); return Element._returnOffset(valueL, valueT); }, positionedOffset: function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; element =3D element.offsetParent; if (element) { if (element.tagName =3D=3D 'BODY') break; var p =3D Element.getStyle(element, 'position'); if (p =3D=3D 'relative' || p =3D=3D 'absolute') break; } } while (element); return Element._returnOffset(valueL, valueT); }, absolutize: function(element) { element =3D $(element); if (element.getStyle('position') =3D=3D 'absolute') return; // Position.prepare(); // To be done manually by Scripty when it needs= it. var offsets =3D element.positionedOffset(); var top =3D offsets[1]; var left =3D offsets[0]; var width =3D element.clientWidth; var height =3D element.clientHeight; element._originalLeft =3D left - parseFloat(element.style.left || 0); element._originalTop =3D top - parseFloat(element.style.top || 0); element._originalWidth =3D element.style.width; element._originalHeight =3D element.style.height; element.style.position =3D 'absolute'; element.style.top =3D top + 'px'; element.style.left =3D left + 'px'; element.style.width =3D width + 'px'; element.style.height =3D height + 'px'; return element; }, relativize: function(element) { element =3D $(element); if (element.getStyle('position') =3D=3D 'relative') return; // Position.prepare(); // To be done manually by Scripty when it needs= it. element.style.position =3D 'relative'; var top =3D parseFloat(element.style.top || 0) - (element._originalTo= p || 0); var left =3D parseFloat(element.style.left || 0) - (element._originalLe= ft || 0); element.style.top =3D top + 'px'; element.style.left =3D left + 'px'; element.style.height =3D element._originalHeight; element.style.width =3D element._originalWidth; return element; }, cumulativeScrollOffset: function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.scrollTop || 0; valueL +=3D element.scrollLeft || 0; element =3D element.parentNode; } while (element); return Element._returnOffset(valueL, valueT); }, getOffsetParent: function(element) { if (element.offsetParent) return $(element.offsetParent); if (element =3D=3D document.body) return $(element); while ((element =3D element.parentNode) && element !=3D document.body) if (Element.getStyle(element, 'position') !=3D 'static') return $(element); return $(document.body); }, viewportOffset: function(forElement) { var valueT =3D 0, valueL =3D 0; var element =3D forElement; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; // Safari fix if (element.offsetParent =3D=3D document.body && Element.getStyle(element, 'position') =3D=3D 'absolute') break; } while (element =3D element.offsetParent); element =3D forElement; do { if (!Prototype.Browser.Opera || element.tagName =3D=3D 'BODY') { valueT -=3D element.scrollTop || 0; valueL -=3D element.scrollLeft || 0; } } while (element =3D element.parentNode); return Element._returnOffset(valueL, valueT); }, clonePosition: function(element, source) { var options =3D Object.extend({ setLeft: true, setTop: true, setWidth: true, setHeight: true, offsetTop: 0, offsetLeft: 0 }, arguments[2] || { }); // find page position of source source =3D $(source); var p =3D source.viewportOffset(); // find coordinate system to use element =3D $(element); var delta =3D [0, 0]; var parent =3D null; // delta [0,0] will do fine with position: fixed elements, // position:absolute needs offsetParent deltas if (Element.getStyle(element, 'position') =3D=3D 'absolute') { parent =3D element.getOffsetParent(); delta =3D parent.viewportOffset(); } // correct by body offsets (fixes Safari) if (parent =3D=3D document.body) { delta[0] -=3D document.body.offsetLeft; delta[1] -=3D document.body.offsetTop; } // set position if (options.setLeft) element.style.left =3D (p[0] - delta[0] + optio= ns.offsetLeft) + 'px'; if (options.setTop) element.style.top =3D (p[1] - delta[1] + optio= ns.offsetTop) + 'px'; if (options.setWidth) element.style.width =3D source.offsetWidth + 'px= '; if (options.setHeight) element.style.height =3D source.offsetHeight += 'px'; return element; } }; Element.Methods.identify.counter =3D 1; Object.extend(Element.Methods, { getElementsBySelector: Element.Methods.select, childElements: Element.Methods.immediateDescendants }); Element._attributeTranslations =3D { write: { names: { className: 'class', htmlFor: 'for' }, values: { } } }; if (!document.createRange || Prototype.Browser.Opera) { Element.Methods.insert =3D function(element, insertions) { element =3D $(element); if (Object.isString(insertions) || Object.isNumber(insertions) || Object.isElement(insertions) || (insertions && (insertions.toElemen= t || insertions.toHTML))) insertions =3D { bottom: insertions }; var t =3D Element._insertionTranslations, content, position, pos, tagNa= me; for (position in insertions) { content =3D insertions[position]; position =3D position.toLowerCase(); pos =3D t[position]; if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) { pos.insert(element, content); continue; } content =3D Object.toHTML(content); tagName =3D ((position =3D=3D 'before' || position =3D=3D 'after') ? element.parentNode : element).tagName.toUpperCase(); if (t.tags[tagName]) { var fragments =3D Element._getContentFromAnonymousElement(tagName,= content.stripScripts()); if (position =3D=3D 'top' || position =3D=3D 'after') fragments.rev= erse(); fragments.each(pos.insert.curry(element)); } else element.insertAdjacentHTML(pos.adjacency, content.stripScripts()= ); content.evalScripts.bind(content).defer(); } return element; }; } if (Prototype.Browser.Opera) { Element.Methods._getStyle =3D Element.Methods.getStyle; Element.Methods.getStyle =3D function(element, style) { switch(style) { case 'left': case 'top': case 'right': case 'bottom': if (Element._getStyle(element, 'position') =3D=3D 'static') return= null; default: return Element._getStyle(element, style); } }; Element.Methods._readAttribute =3D Element.Methods.readAttribute; Element.Methods.readAttribute =3D function(element, attribute) { if (attribute =3D=3D 'title') return element.title; return Element._readAttribute(element, attribute); }; } else if (Prototype.Browser.IE) { $w('positionedOffset getOffsetParent viewportOffset').each(function(metho= d) { Element.Methods[method] =3D Element.Methods[method].wrap( function(proceed, element) { element =3D $(element); var position =3D element.getStyle('position'); if (position !=3D 'static') return proceed(element); element.setStyle({ position: 'relative' }); var value =3D proceed(element); element.setStyle({ position: position }); return value; } ); }); Element.Methods.getStyle =3D function(element, style) { element =3D $(element); style =3D (style =3D=3D 'float' || style =3D=3D 'cssFloat') ? 'styleFlo= at' : style.camelize(); var value =3D element.style[style]; if (!value && element.currentStyle) value =3D element.currentStyle[styl= e]; if (style =3D=3D 'opacity') { if (value =3D (element.getStyle('filter') || '').match(/alpha\(opacit= y=3D(.*)\)/)) if (value[1]) return parseFloat(value[1]) / 100; return 1.0; } if (value =3D=3D 'auto') { if ((style =3D=3D 'width' || style =3D=3D 'height') && (element.getSt= yle('display') !=3D 'none')) return element['offset' + style.capitalize()] + 'px'; return null; } return value; }; Element.Methods.setOpacity =3D function(element, value) { function stripAlpha(filter){ return filter.replace(/alpha\([^\)]*\)/gi,''); } element =3D $(element); var currentStyle =3D element.currentStyle; if ((currentStyle && !currentStyle.hasLayout) || (!currentStyle && element.style.zoom =3D=3D 'normal')) element.style.zoom =3D 1; var filter =3D element.getStyle('filter'), style =3D element.style; if (value =3D=3D 1 || value =3D=3D=3D '') { (filter =3D stripAlpha(filter)) ? style.filter =3D filter : style.removeAttribute('filter'); return element; } else if (value < 0.00001) value =3D 0; style.filter =3D stripAlpha(filter) + 'alpha(opacity=3D' + (value * 100) + ')'; return element; }; Element._attributeTranslations =3D { read: { names: { 'class': 'className', 'for': 'htmlFor' }, values: { _getAttr: function(element, attribute) { return element.getAttribute(attribute, 2); }, _getAttrNode: function(element, attribute) { var node =3D element.getAttributeNode(attribute); return node ? node.value : ""; }, _getEv: function(element, attribute) { var attribute =3D element.getAttribute(attribute); return attribute ? attribute.toString().slice(23, -2) : null; }, _flag: function(element, attribute) { return $(element).hasAttribute(attribute) ? attribute : null; }, style: function(element) { return element.style.cssText.toLowerCase(); }, title: function(element) { return element.title; } } } }; Element._attributeTranslations.write =3D { names: Object.clone(Element._attributeTranslations.read.names), values: { checked: function(element, value) { element.checked =3D !!value; }, style: function(element, value) { element.style.cssText =3D value ? value : ''; } } }; Element._attributeTranslations.has =3D {}; $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + 'encType maxLength readOnly longDesc').each(function(attr) { Element._attributeTranslations.write.names[attr.toLowerCase()] =3D attr; Element._attributeTranslations.has[attr.toLowerCase()] =3D attr; }); (function(v) { Object.extend(v, { href: v._getAttr, src: v._getAttr, type: v._getAttr, action: v._getAttrNode, disabled: v._flag, checked: v._flag, readonly: v._flag, multiple: v._flag, onload: v._getEv, onunload: v._getEv, onclick: v._getEv, ondblclick: v._getEv, onmousedown: v._getEv, onmouseup: v._getEv, onmouseover: v._getEv, onmousemove: v._getEv, onmouseout: v._getEv, onfocus: v._getEv, onblur: v._getEv, onkeypress: v._getEv, onkeydown: v._getEv, onkeyup: v._getEv, onsubmit: v._getEv, onreset: v._getEv, onselect: v._getEv, onchange: v._getEv }); })(Element._attributeTranslations.read.values); } else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent))= { Element.Methods.setOpacity =3D function(element, value) { element =3D $(element); element.style.opacity =3D (value =3D=3D 1) ? 0.999999 : (value =3D=3D=3D '') ? '' : (value < 0.00001) ? 0 : value; return element; }; } else if (Prototype.Browser.WebKit) { Element.Methods.setOpacity =3D function(element, value) { element =3D $(element); element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? ''= : (value < 0.00001) ? 0 : value; if (value =3D=3D 1) if(element.tagName =3D=3D 'IMG' && element.width) { element.width++; element.width--; } else try { var n =3D document.createTextNode(' '); element.appendChild(n); element.removeChild(n); } catch (e) { } return element; }; // Safari returns margins on body which is incorrect if the child is abso= lutely // positioned. For performance reasons, redefine Position.cumulativeOffs= et for // KHTML/WebKit only. Element.Methods.cumulativeOffset =3D function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; if (element.offsetParent =3D=3D document.body) if (Element.getStyle(element, 'position') =3D=3D 'absolute') break; element =3D element.offsetParent; } while (element); return Element._returnOffset(valueL, valueT); }; } if (Prototype.Browser.IE || Prototype.Browser.Opera) { // IE and Opera are missing .innerHTML support for TABLE-related and SELE= CT elements Element.Methods.update =3D function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) return element.update().insert(content); content =3D Object.toHTML(content); var tagName =3D element.tagName.toUpperCase(); if (tagName in Element._insertionTranslations.tags) { $A(element.childNodes).each(function(node) { element.removeChild(node= ) }); Element._getContentFromAnonymousElement(tagName, content.stripScripts= ()) .each(function(node) { element.appendChild(node) }); } else element.innerHTML =3D content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }; } if (document.createElement('div').outerHTML) { Element.Methods.replace =3D function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) { element.parentNode.replaceChild(content, element); return element; } content =3D Object.toHTML(content); var parent =3D element.parentNode, tagName =3D parent.tagName.toUpperCa= se(); if (Element._insertionTranslations.tags[tagName]) { var nextSibling =3D element.next(); var fragments =3D Element._getContentFromAnonymousElement(tagName, co= ntent.stripScripts()); parent.removeChild(element); if (nextSibling) fragments.each(function(node) { parent.insertBefore(node, nextSibli= ng) }); else fragments.each(function(node) { parent.appendChild(node) }); } else element.outerHTML =3D content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }; } Element._returnOffset =3D function(l, t) { var result =3D [l, t]; result.left =3D l; result.top =3D t; return result; }; Element._getContentFromAnonymousElement =3D function(tagName, html) { var div =3D new Element('div'), t =3D Element._insertionTranslations.tags= [tagName]; div.innerHTML =3D t[0] + html + t[1]; t[2].times(function() { div =3D div.firstChild }); return $A(div.childNodes); }; Element._insertionTranslations =3D { before: { adjacency: 'beforeBegin', insert: function(element, node) { element.parentNode.insertBefore(node, element); }, initializeRange: function(element, range) { range.setStartBefore(element); } }, top: { adjacency: 'afterBegin', insert: function(element, node) { element.insertBefore(node, element.firstChild); }, initializeRange: function(element, range) { range.selectNodeContents(element); range.collapse(true); } }, bottom: { adjacency: 'beforeEnd', insert: function(element, node) { element.appendChild(node); } }, after: { adjacency: 'afterEnd', insert: function(element, node) { element.parentNode.insertBefore(node, element.nextSibling); }, initializeRange: function(element, range) { range.setStartAfter(element); } }, tags: { TABLE: ['', '
', 1], TBODY: ['', '
', 2], TR: ['', '
', 3], TD: ['
', '
', 4], SELECT: ['', 1] } }; (function() { this.bottom.initializeRange =3D this.top.initializeRange; Object.extend(this.tags, { THEAD: this.tags.TBODY, TFOOT: this.tags.TBODY, TH: this.tags.TD }); }).call(Element._insertionTranslations); Element.Methods.Simulated =3D { hasAttribute: function(element, attribute) { attribute =3D Element._attributeTranslations.has[attribute] || attribut= e; var node =3D $(element).getAttributeNode(attribute); return node && node.specified; } }; Element.Methods.ByTag =3D { }; Object.extend(Element, Element.Methods); if (!Prototype.BrowserFeatures.ElementExtensions && document.createElement('div').__proto__) { window.HTMLElement =3D { }; window.HTMLElement.prototype =3D document.createElement('div').__proto__; Prototype.BrowserFeatures.ElementExtensions =3D true; } Element.extend =3D (function() { if (Prototype.BrowserFeatures.SpecificElementExtensions) return Prototype.K; var Methods =3D { }, ByTag =3D Element.Methods.ByTag; var extend =3D Object.extend(function(element) { if (!element || element._extendedByPrototype || element.nodeType !=3D 1 || element =3D=3D window) return element; var methods =3D Object.clone(Methods), tagName =3D element.tagName, property, value; // extend methods for specific tags if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); for (property in methods) { value =3D methods[property]; if (Object.isFunction(value) && !(property in element)) element[property] =3D value.methodize(); } element._extendedByPrototype =3D Prototype.emptyFunction; return element; }, { refresh: function() { // extend methods for all tags (Safari doesn't need this) if (!Prototype.BrowserFeatures.ElementExtensions) { Object.extend(Methods, Element.Methods); Object.extend(Methods, Element.Methods.Simulated); } } }); extend.refresh(); return extend; })(); Element.hasAttribute =3D function(element, attribute) { if (element.hasAttribute) return element.hasAttribute(attribute); return Element.Methods.Simulated.hasAttribute(element, attribute); }; Element.addMethods =3D function(methods) { var F =3D Prototype.BrowserFeatures, T =3D Element.Methods.ByTag; if (!methods) { Object.extend(Form, Form.Methods); Object.extend(Form.Element, Form.Element.Methods); Object.extend(Element.Methods.ByTag, { "FORM": Object.clone(Form.Methods), "INPUT": Object.clone(Form.Element.Methods), "SELECT": Object.clone(Form.Element.Methods), "TEXTAREA": Object.clone(Form.Element.Methods) }); } if (arguments.length =3D=3D 2) { var tagName =3D methods; methods =3D arguments[1]; } if (!tagName) Object.extend(Element.Methods, methods || { }); else { if (Object.isArray(tagName)) tagName.each(extend); else extend(tagName); } function extend(tagName) { tagName =3D tagName.toUpperCase(); if (!Element.Methods.ByTag[tagName]) Element.Methods.ByTag[tagName] =3D { }; Object.extend(Element.Methods.ByTag[tagName], methods); } function copy(methods, destination, onlyIfAbsent) { onlyIfAbsent =3D onlyIfAbsent || false; for (var property in methods) { var value =3D methods[property]; if (!Object.isFunction(value)) continue; if (!onlyIfAbsent || !(property in destination)) destination[property] =3D value.methodize(); } } function findDOMClass(tagName) { var klass; var trans =3D { "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR= ": "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": "FrameSet", "IFRAME": "IFrame" }; if (trans[tagName]) klass =3D 'HTML' + trans[tagName] + 'Element'; if (window[klass]) return window[klass]; klass =3D 'HTML' + tagName + 'Element'; if (window[klass]) return window[klass]; klass =3D 'HTML' + tagName.capitalize() + 'Element'; if (window[klass]) return window[klass]; window[klass] =3D { }; window[klass].prototype =3D document.createElement(tagName).__proto__; return window[klass]; } if (F.ElementExtensions) { copy(Element.Methods, HTMLElement.prototype); copy(Element.Methods.Simulated, HTMLElement.prototype, true); } if (F.SpecificElementExtensions) { for (var tag in Element.Methods.ByTag) { var klass =3D findDOMClass(tag); if (Object.isUndefined(klass)) continue; copy(T[tag], klass.prototype); } } Object.extend(Element, Element.Methods); delete Element.ByTag; if (Element.extend.refresh) Element.extend.refresh(); Element.cache =3D { }; }; document.viewport =3D { getDimensions: function() { var dimensions =3D { }; $w('width height').each(function(d) { var D =3D d.capitalize(); dimensions[d] =3D self['inner' + D] || (document.documentElement['client' + D] || document.body['client' += D]); }); return dimensions; }, getWidth: function() { return this.getDimensions().width; }, getHeight: function() { return this.getDimensions().height; }, getScrollOffsets: function() { return Element._returnOffset( window.pageXOffset || document.documentElement.scrollLeft || document= .body.scrollLeft, window.pageYOffset || document.documentElement.scrollTop || document.= body.scrollTop); } }; /* Portions of the Selector class are derived from Jack Slocum=E2=80=99s Do= mQuery, * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style * license. Please see http://www.yui-ext.com/ for more information. */ var Selector =3D Class.create({ initialize: function(expression) { this.expression =3D expression.strip(); this.compileMatcher(); }, compileMatcher: function() { // Selectors with namespaced attributes can't use the XPath version if (Prototype.BrowserFeatures.XPath && !(/(\[[\w-]*?:|:checked)/).test(= this.expression)) return this.compileXPathMatcher(); var e =3D this.expression, ps =3D Selector.patterns, h =3D Selector.han= dlers, c =3D Selector.criteria, le, p, m; if (Selector._cache[e]) { this.matcher =3D Selector._cache[e]; return; } this.matcher =3D ["this.matcher =3D function(root) {", "var r =3D root, h =3D Selector.handlers, c =3D false,= n;"]; while (e && le !=3D e && (/\S/).test(e)) { le =3D e; for (var i in ps) { p =3D ps[i]; if (m =3D e.match(p)) { this.matcher.push(Object.isFunction(c[i]) ? c[i](m) : new Template(c[i]).evaluate(m)); e =3D e.replace(m[0], ''); break; } } } this.matcher.push("return h.unique(n);\n}"); eval(this.matcher.join('\n')); Selector._cache[this.expression] =3D this.matcher; }, compileXPathMatcher: function() { var e =3D this.expression, ps =3D Selector.patterns, x =3D Selector.xpath, le, m; if (Selector._cache[e]) { this.xpath =3D Selector._cache[e]; return; } this.matcher =3D ['.//*']; while (e && le !=3D e && (/\S/).test(e)) { le =3D e; for (var i in ps) { if (m =3D e.match(ps[i])) { this.matcher.push(Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m)); e =3D e.replace(m[0], ''); break; } } } this.xpath =3D this.matcher.join(''); Selector._cache[this.expression] =3D this.xpath; }, findElements: function(root) { root =3D root || document; if (this.xpath) return document._getElementsByXPath(this.xpath, root); return this.matcher(root); }, match: function(element) { this.tokens =3D []; var e =3D this.expression, ps =3D Selector.patterns, as =3D Selector.as= sertions; var le, p, m; while (e && le !=3D=3D e && (/\S/).test(e)) { le =3D e; for (var i in ps) { p =3D ps[i]; if (m =3D e.match(p)) { // use the Selector.assertions methods unless the selector // is too complex. if (as[i]) { this.tokens.push([i, Object.clone(m)]); e =3D e.replace(m[0], ''); } else { // reluctantly do a document-wide search // and look for a match in the array return this.findElements(document).include(element); } } } } var match =3D true, name, matches; for (var i =3D 0, token; token =3D this.tokens[i]; i++) { name =3D token[0], matches =3D token[1]; if (!Selector.assertions[name](element, matches)) { match =3D false; break; } } return match; }, toString: function() { return this.expression; }, inspect: function() { return "#"; } }); Object.extend(Selector, { _cache: { }, xpath: { descendant: "//*", child: "/*", adjacent: "/following-sibling::*[1]", laterSibling: '/following-sibling::*', tagName: function(m) { if (m[1] =3D=3D '*') return ''; return "[local-name()=3D'" + m[1].toLowerCase() + "' or local-name()=3D'" + m[1].toUpperCase() + "']"; }, className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", id: "[@id=3D'#{1}']", attrPresence: "[@#{1}]", attr: function(m) { m[3] =3D m[5] || m[6]; return new Template(Selector.xpath.operators[m[2]]).evaluate(m); }, pseudo: function(m) { var h =3D Selector.xpath.pseudos[m[1]]; if (!h) return ''; if (Object.isFunction(h)) return h(m); return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); }, operators: { '=3D': "[@#{1}=3D'#{3}']", '!=3D': "[@#{1}!=3D'#{3}']", '^=3D': "[starts-with(@#{1}, '#{3}')]", '$=3D': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3= }') + 1))=3D'#{3}']", '*=3D': "[contains(@#{1}, '#{3}')]", '~=3D': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", '|=3D': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" }, pseudos: { 'first-child': '[not(preceding-sibling::*)]', 'last-child': '[not(following-sibling::*)]', 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', 'empty': "[count(*) =3D 0 and (count(text()) =3D 0 or translate= (text(), ' \t\r\n', '') =3D '')]", 'checked': "[@checked]", 'disabled': "[@disabled]", 'enabled': "[not(@disabled)]", 'not': function(m) { var e =3D m[6], p =3D Selector.patterns, x =3D Selector.xpath, le, m, v; var exclusion =3D []; while (e && le !=3D e && (/\S/).test(e)) { le =3D e; for (var i in p) { if (m =3D e.match(p[i])) { v =3D Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).= evaluate(m); exclusion.push("(" + v.substring(1, v.length - 1) + ")"); e =3D e.replace(m[0], ''); break; } } } return "[not(" + exclusion.join(" and ") + ")]"; }, 'nth-child': function(m) { return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*)= + 1) ", m); }, 'nth-last-child': function(m) { return Selector.xpath.pseudos.nth("(count(./following-sibling::*)= + 1) ", m); }, 'nth-of-type': function(m) { return Selector.xpath.pseudos.nth("position() ", m); }, 'nth-last-of-type': function(m) { return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); }, 'first-of-type': function(m) { m[6] =3D "1"; return Selector.xpath.pseudos['nth-of-type'](m); }, 'last-of-type': function(m) { m[6] =3D "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); }, 'only-of-type': function(m) { var p =3D Selector.xpath.pseudos; return p['first-of-type'](m) + p[= 'last-of-type'](m); }, nth: function(fragment, m) { var mm, formula =3D m[6], predicate; if (formula =3D=3D 'even') formula =3D '2n+0'; if (formula =3D=3D 'odd') formula =3D '2n+1'; if (mm =3D formula.match(/^(\d+)$/)) // digit only return '[' + fragment + "=3D " + mm[1] + ']'; if (mm =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b if (mm[1] =3D=3D "-") mm[1] =3D -1; var a =3D mm[1] ? Number(mm[1]) : 1; var b =3D mm[2] ? Number(mm[2]) : 0; predicate =3D "[((#{fragment} - #{b}) mod #{a} =3D 0) and " + "((#{fragment} - #{b}) div #{a} >=3D 0)]"; return new Template(predicate).evaluate({ fragment: fragment, a: a, b: b }); } } } }, criteria: { tagName: 'n =3D h.tagName(n, r, "#{1}", c); c =3D false;', className: 'n =3D h.className(n, r, "#{1}", c); c =3D false;', id: 'n =3D h.id(n, r, "#{1}", c); c =3D false;', attrPresence: 'n =3D h.attrPresence(n, r, "#{1}"); c =3D false;', attr: function(m) { m[3] =3D (m[5] || m[6]); return new Template('n =3D h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = =3D false;').evaluate(m); }, pseudo: function(m) { if (m[6]) m[6] =3D m[6].replace(/"/g, '\\"'); return new Template('n =3D h.pseudo(n, "#{1}", "#{6}", r, c); c =3D= false;').evaluate(m); }, descendant: 'c =3D "descendant";', child: 'c =3D "child";', adjacent: 'c =3D "adjacent";', laterSibling: 'c =3D "laterSibling";' }, patterns: { // combinators must be listed first // (and descendant needs to be last combinator) laterSibling: /^\s*~\s*/, child: /^\s*>\s*/, adjacent: /^\s*\+\s*/, descendant: /^\s/, // selectors follow tagName: /^\s*(\*|[\w\-]+)(\b|$)?/, id: /^#([\w\-\*]+)(\b|$)/, className: /^\.([\w\-\*]+)(\b|$)/, pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty= |checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=3D\s)|(?=3D:))/, attrPresence: /^\[([\w]+)\]/, attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=3D)\s*((['"])([^\= 4]*?)\4|([^'"][^\]]*?)))?\]/ }, // for Selector.match and Element#match assertions: { tagName: function(element, matches) { return matches[1].toUpperCase() =3D=3D element.tagName.toUpperCase(); }, className: function(element, matches) { return Element.hasClassName(element, matches[1]); }, id: function(element, matches) { return element.id =3D=3D=3D matches[1]; }, attrPresence: function(element, matches) { return Element.hasAttribute(element, matches[1]); }, attr: function(element, matches) { var nodeValue =3D Element.readAttribute(element, matches[1]); return Selector.operators[matches[2]](nodeValue, matches[3]); } }, handlers: { // UTILITY FUNCTIONS // joins two collections concat: function(a, b) { for (var i =3D 0, node; node =3D b[i]; i++) a.push(node); return a; }, // marks an array of nodes for counting mark: function(nodes) { for (var i =3D 0, node; node =3D nodes[i]; i++) node._counted =3D true; return nodes; }, unmark: function(nodes) { for (var i =3D 0, node; node =3D nodes[i]; i++) node._counted =3D undefined; return nodes; }, // mark each child node with its position (for nth calls) // "ofType" flag indicates whether we're indexing for nth-of-type // rather than nth-child index: function(parentNode, reverse, ofType) { parentNode._counted =3D true; if (reverse) { for (var nodes =3D parentNode.childNodes, i =3D nodes.length - 1,= j =3D 1; i >=3D 0; i--) { var node =3D nodes[i]; if (node.nodeType =3D=3D 1 && (!ofType || node._counted)) node.no= deIndex =3D j++; } } else { for (var i =3D 0, j =3D 1, nodes =3D parentNode.childNodes; node = =3D nodes[i]; i++) if (node.nodeType =3D=3D 1 && (!ofType || node._counted)) node.no= deIndex =3D j++; } }, // filters out duplicates and extends all nodes unique: function(nodes) { if (nodes.length =3D=3D 0) return nodes; var results =3D [], n; for (var i =3D 0, l =3D nodes.length; i < l; i++) if (!(n =3D nodes[i])._counted) { n._counted =3D true; results.push(Element.extend(n)); } return Selector.handlers.unmark(results); }, // COMBINATOR FUNCTIONS descendant: function(nodes) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) h.concat(results, node.getElementsByTagName('*')); return results; }, child: function(nodes) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { for (var j =3D 0, children =3D [], child; child =3D node.childNodes= [j]; j++) if (child.nodeType =3D=3D 1 && child.tagName !=3D '!') results.pu= sh(child); } return results; }, adjacent: function(nodes) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { var next =3D this.nextElementSibling(node); if (next) results.push(next); } return results; }, laterSibling: function(nodes) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) h.concat(results, Element.nextSiblings(node)); return results; }, nextElementSibling: function(node) { while (node =3D node.nextSibling) if (node.nodeType =3D=3D 1) return node; return null; }, previousElementSibling: function(node) { while (node =3D node.previousSibling) if (node.nodeType =3D=3D 1) return node; return null; }, // TOKEN FUNCTIONS tagName: function(nodes, root, tagName, combinator) { tagName =3D tagName.toUpperCase(); var results =3D [], h =3D Selector.handlers; if (nodes) { if (combinator) { // fastlane for ordinary descendant combinators if (combinator =3D=3D "descendant") { for (var i =3D 0, node; node =3D nodes[i]; i++) h.concat(results, node.getElementsByTagName(tagName)); return results; } else nodes =3D this[combinator](nodes); if (tagName =3D=3D "*") return nodes; } for (var i =3D 0, node; node =3D nodes[i]; i++) if (node.tagName.toUpperCase() =3D=3D tagName) results.push(node); return results; } else return root.getElementsByTagName(tagName); }, id: function(nodes, root, id, combinator) { var targetNode =3D $(id), h =3D Selector.handlers; if (!targetNode) return []; if (!nodes && root =3D=3D document) return [targetNode]; if (nodes) { if (combinator) { if (combinator =3D=3D 'child') { for (var i =3D 0, node; node =3D nodes[i]; i++) if (targetNode.parentNode =3D=3D node) return [targetNode]; } else if (combinator =3D=3D 'descendant') { for (var i =3D 0, node; node =3D nodes[i]; i++) if (Element.descendantOf(targetNode, node)) return [targetNod= e]; } else if (combinator =3D=3D 'adjacent') { for (var i =3D 0, node; node =3D nodes[i]; i++) if (Selector.handlers.previousElementSibling(targetNode) =3D= =3D node) return [targetNode]; } else nodes =3D h[combinator](nodes); } for (var i =3D 0, node; node =3D nodes[i]; i++) if (node =3D=3D targetNode) return [targetNode]; return []; } return (targetNode && Element.descendantOf(targetNode, root)) ? [targ= etNode] : []; }, className: function(nodes, root, className, combinator) { if (nodes && combinator) nodes =3D this[combinator](nodes); return Selector.handlers.byClassName(nodes, root, className); }, byClassName: function(nodes, root, className) { if (!nodes) nodes =3D Selector.handlers.descendant([root]); var needle =3D ' ' + className + ' '; for (var i =3D 0, results =3D [], node, nodeClassName; node =3D nodes= [i]; i++) { nodeClassName =3D node.className; if (nodeClassName.length =3D=3D 0) continue; if (nodeClassName =3D=3D className || (' ' + nodeClassName + ' ').i= nclude(needle)) results.push(node); } return results; }, attrPresence: function(nodes, root, attr) { if (!nodes) nodes =3D root.getElementsByTagName("*"); var results =3D []; for (var i =3D 0, node; node =3D nodes[i]; i++) if (Element.hasAttribute(node, attr)) results.push(node); return results; }, attr: function(nodes, root, attr, value, operator) { if (!nodes) nodes =3D root.getElementsByTagName("*"); var handler =3D Selector.operators[operator], results =3D []; for (var i =3D 0, node; node =3D nodes[i]; i++) { var nodeValue =3D Element.readAttribute(node, attr); if (nodeValue =3D=3D=3D null) continue; if (handler(nodeValue, value)) results.push(node); } return results; }, pseudo: function(nodes, name, value, root, combinator) { if (nodes && combinator) nodes =3D this[combinator](nodes); if (!nodes) nodes =3D root.getElementsByTagName("*"); return Selector.pseudos[name](nodes, value, root); } }, pseudos: { 'first-child': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { if (Selector.handlers.previousElementSibling(node)) continue; results.push(node); } return results; }, 'last-child': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { if (Selector.handlers.nextElementSibling(node)) continue; results.push(node); } return results; }, 'only-child': function(nodes, value, root) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) results.push(node); return results; }, 'nth-child': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root); }, 'nth-last-child': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root, true); }, 'nth-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root, false, true); }, 'nth-last-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root, true, true); }, 'first-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, "1", root, false, true); }, 'last-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, "1", root, true, true); }, 'only-of-type': function(nodes, formula, root) { var p =3D Selector.pseudos; return p['last-of-type'](p['first-of-type'](nodes, formula, root), fo= rmula, root); }, // handles the an+b logic getIndices: function(a, b, total) { if (a =3D=3D 0) return b > 0 ? [b] : []; return $R(1, total).inject([], function(memo, i) { if (0 =3D=3D (i - b) % a && (i - b) / a >=3D 0) memo.push(i); return memo; }); }, // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-ty= pe nth: function(nodes, formula, root, reverse, ofType) { if (nodes.length =3D=3D 0) return []; if (formula =3D=3D 'even') formula =3D '2n+0'; if (formula =3D=3D 'odd') formula =3D '2n+1'; var h =3D Selector.handlers, results =3D [], indexed =3D [], m; h.mark(nodes); for (var i =3D 0, node; node =3D nodes[i]; i++) { if (!node.parentNode._counted) { h.index(node.parentNode, reverse, ofType); indexed.push(node.parentNode); } } if (formula.match(/^\d+$/)) { // just a number formula =3D Number(formula); for (var i =3D 0, node; node =3D nodes[i]; i++) if (node.nodeIndex =3D=3D formula) results.push(node); } else if (m =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b if (m[1] =3D=3D "-") m[1] =3D -1; var a =3D m[1] ? Number(m[1]) : 1; var b =3D m[2] ? Number(m[2]) : 0; var indices =3D Selector.pseudos.getIndices(a, b, nodes.length); for (var i =3D 0, node, l =3D indices.length; node =3D nodes[i]; i+= +) { for (var j =3D 0; j < l; j++) if (node.nodeIndex =3D=3D indices[j]) results.push(node); } } h.unmark(nodes); h.unmark(indexed); return results; }, 'empty': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { // IE treats comments as element nodes if (node.tagName =3D=3D '!' || (node.firstChild && !node.innerHTML.= match(/^\s*$/))) continue; results.push(node); } return results; }, 'not': function(nodes, selector, root) { var h =3D Selector.handlers, selectorType, m; var exclusions =3D new Selector(selector).findElements(root); h.mark(exclusions); for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (!node._counted) results.push(node); h.unmark(exclusions); return results; }, 'enabled': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (!node.disabled) results.push(node); return results; }, 'disabled': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (node.disabled) results.push(node); return results; }, 'checked': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (node.checked) results.push(node); return results; } }, operators: { '=3D': function(nv, v) { return nv =3D=3D v; }, '!=3D': function(nv, v) { return nv !=3D v; }, '^=3D': function(nv, v) { return nv.startsWith(v); }, '$=3D': function(nv, v) { return nv.endsWith(v); }, '*=3D': function(nv, v) { return nv.include(v); }, '~=3D': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + '= '); }, '|=3D': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include= ('-' + v.toUpperCase() + '-'); } }, matchElements: function(elements, expression) { var matches =3D new Selector(expression).findElements(), h =3D Selector= .handlers; h.mark(matches); for (var i =3D 0, results =3D [], element; element =3D elements[i]; i++) if (element._counted) results.push(element); h.unmark(matches); return results; }, findElement: function(elements, expression, index) { if (Object.isNumber(expression)) { index =3D expression; expression =3D false; } return Selector.matchElements(elements, expression || '*')[index || 0]; }, findChildElements: function(element, expressions) { var exprs =3D expressions.join(','), expressions =3D []; exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { expressions.push(m[1].strip()); }); var results =3D [], h =3D Selector.handlers; for (var i =3D 0, l =3D expressions.length, selector; i < l; i++) { selector =3D new Selector(expressions[i].strip()); h.concat(results, selector.findElements(element)); } return (l > 1) ? h.unique(results) : results; } }); function $$() { return Selector.findChildElements(document, $A(arguments)); } var Form =3D { reset: function(form) { $(form).reset(); return form; }, serializeElements: function(elements, options) { if (typeof options !=3D 'object') options =3D { hash: !!options }; else if (options.hash =3D=3D=3D undefined) options.hash =3D true; var key, value, submitted =3D false, submit =3D options.submit; var data =3D elements.inject({ }, function(result, element) { if (!element.disabled && element.name) { key =3D element.name; value =3D $(element).getValue(); if (value !=3D null && (element.type !=3D 'submit' || (!submitted && submit !=3D=3D false && (!submit || key =3D=3D submit) && (subm= itted =3D true)))) { if (key in result) { // a key is already present; construct an array of values if (!Object.isArray(result[key])) result[key] =3D [result[key]]; result[key].push(value); } else result[key] =3D value; } } return result; }); return options.hash ? data : Object.toQueryString(data); } }; Form.Methods =3D { serialize: function(form, options) { return Form.serializeElements(Form.getElements(form), options); }, getElements: function(form) { return $A($(form).getElementsByTagName('*')).inject([], function(elements, child) { if (Form.Element.Serializers[child.tagName.toLowerCase()]) elements.push(Element.extend(child)); return elements; } ); }, getInputs: function(form, typeName, name) { form =3D $(form); var inputs =3D form.getElementsByTagName('input'); if (!typeName && !name) return $A(inputs).map(Element.extend); for (var i =3D 0, matchingInputs =3D [], length =3D inputs.length; i <= length; i++) { var input =3D inputs[i]; if ((typeName && input.type !=3D typeName) || (name && input.name != =3D name)) continue; matchingInputs.push(Element.extend(input)); } return matchingInputs; }, disable: function(form) { form =3D $(form); Form.getElements(form).invoke('disable'); return form; }, enable: function(form) { form =3D $(form); Form.getElements(form).invoke('enable'); return form; }, findFirstElement: function(form) { var elements =3D $(form).getElements().findAll(function(element) { return 'hidden' !=3D element.type && !element.disabled; }); var firstByIndex =3D elements.findAll(function(element) { return element.hasAttribute('tabIndex') && element.tabIndex >=3D 0; }).sortBy(function(element) { return element.tabIndex }).first(); return firstByIndex ? firstByIndex : elements.find(function(element) { return ['input', 'select', 'textarea'].include(element.tagName.toLowe= rCase()); }); }, focusFirstElement: function(form) { form =3D $(form); form.findFirstElement().activate(); return form; }, request: function(form, options) { form =3D $(form), options =3D Object.clone(options || { }); var params =3D options.parameters, action =3D form.readAttribute('actio= n') || ''; if (action.blank()) action =3D window.location.href; options.parameters =3D form.serialize(true); if (params) { if (Object.isString(params)) params =3D params.toQueryParams(); Object.extend(options.parameters, params); } if (form.hasAttribute('method') && !options.method) options.method =3D form.method; return new Ajax.Request(action, options); } }; /*-------------------------------------------------------------------------= -*/ Form.Element =3D { focus: function(element) { $(element).focus(); return element; }, select: function(element) { $(element).select(); return element; } }; Form.Element.Methods =3D { serialize: function(element) { element =3D $(element); if (!element.disabled && element.name) { var value =3D element.getValue(); if (value !=3D undefined) { var pair =3D { }; pair[element.name] =3D value; return Object.toQueryString(pair); } } return ''; }, getValue: function(element) { element =3D $(element); var method =3D element.tagName.toLowerCase(); return Form.Element.Serializers[method](element); }, setValue: function(element, value) { element =3D $(element); var method =3D element.tagName.toLowerCase(); Form.Element.Serializers[method](element, value); return element; }, clear: function(element) { $(element).value =3D ''; return element; }, present: function(element) { return $(element).value !=3D ''; }, activate: function(element) { element =3D $(element); try { element.focus(); if (element.select && (element.tagName.toLowerCase() !=3D 'input' || !['button', 'reset', 'submit'].include(element.type))) element.select(); } catch (e) { } return element; }, disable: function(element) { element =3D $(element); element.blur(); element.disabled =3D true; return element; }, enable: function(element) { element =3D $(element); element.disabled =3D false; return element; } }; /*-------------------------------------------------------------------------= -*/ var Field =3D Form.Element; var $F =3D Form.Element.Methods.getValue; /*-------------------------------------------------------------------------= -*/ Form.Element.Serializers =3D { input: function(element, value) { switch (element.type.toLowerCase()) { case 'checkbox': case 'radio': return Form.Element.Serializers.inputSelector(element, value); default: return Form.Element.Serializers.textarea(element, value); } }, inputSelector: function(element, value) { if (value =3D=3D=3D undefined) return element.checked ? element.value= : null; else element.checked =3D !!value; }, textarea: function(element, value) { if (value =3D=3D=3D undefined) return element.value; else element.value =3D value; }, select: function(element, index) { if (index =3D=3D=3D undefined) return this[element.type =3D=3D 'select-one' ? 'selectOne' : 'selectMany'](element); else { var opt, value, single =3D !Object.isArray(index); for (var i =3D 0, length =3D element.length; i < length; i++) { opt =3D element.options[i]; value =3D this.optionValue(opt); if (single) { if (value =3D=3D index) { opt.selected =3D true; return; } } else opt.selected =3D index.include(value); } } }, selectOne: function(element) { var index =3D element.selectedIndex; return index >=3D 0 ? this.optionValue(element.options[index]) : null; }, selectMany: function(element) { var values, length =3D element.length; if (!length) return null; for (var i =3D 0, values =3D []; i < length; i++) { var opt =3D element.options[i]; if (opt.selected) values.push(this.optionValue(opt)); } return values; }, optionValue: function(opt) { // extend element because hasAttribute may not be native return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; } }; /*-------------------------------------------------------------------------= -*/ Abstract.TimedObserver =3D Class.create(PeriodicalExecuter, { initialize: function($super, element, frequency, callback) { $super(callback, frequency); this.element =3D $(element); this.lastValue =3D this.getValue(); }, execute: function() { var value =3D this.getValue(); if (Object.isString(this.lastValue) && Object.isString(value) ? this.lastValue !=3D value : String(this.lastValue) !=3D String(valu= e)) { this.callback(this.element, value); this.lastValue =3D value; } } }); Form.Element.Observer =3D Class.create(Abstract.TimedObserver, { getValue: function() { return Form.Element.getValue(this.element); } }); Form.Observer =3D Class.create(Abstract.TimedObserver, { getValue: function() { return Form.serialize(this.element); } }); /*-------------------------------------------------------------------------= -*/ Abstract.EventObserver =3D Class.create({ initialize: function(element, callback) { this.element =3D $(element); this.callback =3D callback; this.lastValue =3D this.getValue(); if (this.element.tagName.toLowerCase() =3D=3D 'form') this.registerFormCallbacks(); else this.registerCallback(this.element); }, onElementEvent: function() { var value =3D this.getValue(); if (this.lastValue !=3D value) { this.callback(this.element, value); this.lastValue =3D value; } }, registerFormCallbacks: function() { Form.getElements(this.element).each(this.registerCallback, this); }, registerCallback: function(element) { if (element.type) { switch (element.type.toLowerCase()) { case 'checkbox': case 'radio': Event.observe(element, 'click', this.onElementEvent.bind(this)); break; default: Event.observe(element, 'change', this.onElementEvent.bind(this)); break; } } } }); Form.Element.EventObserver =3D Class.create(Abstract.EventObserver, { getValue: function() { return Form.Element.getValue(this.element); } }); Form.EventObserver =3D Class.create(Abstract.EventObserver, { getValue: function() { return Form.serialize(this.element); } }); if (!window.Event) var Event =3D { }; Object.extend(Event, { KEY_BACKSPACE: 8, KEY_TAB: 9, KEY_RETURN: 13, KEY_ESC: 27, KEY_LEFT: 37, KEY_UP: 38, KEY_RIGHT: 39, KEY_DOWN: 40, KEY_DELETE: 46, KEY_HOME: 36, KEY_END: 35, KEY_PAGEUP: 33, KEY_PAGEDOWN: 34, KEY_INSERT: 45, cache: { }, relatedTarget: function(event) { var element; switch(event.type) { case 'mouseover': element =3D event.fromElement; break; case 'mouseout': element =3D event.toElement; break; default: return null; } return Element.extend(element); } }); Event.Methods =3D (function() { var isButton; if (Prototype.Browser.IE) { var buttonMap =3D { 0: 1, 1: 4, 2: 2 }; isButton =3D function(event, code) { return event.button =3D=3D buttonMap[code]; }; } else if (Prototype.Browser.WebKit) { isButton =3D function(event, code) { switch (code) { case 0: return event.which =3D=3D 1 && !event.metaKey; case 1: return event.which =3D=3D 1 && event.metaKey; default: return false; } }; } else { isButton =3D function(event, code) { return event.which ? (event.which =3D=3D=3D code + 1) : (event.button= =3D=3D=3D code); }; } return { isLeftClick: function(event) { return isButton(event, 0) }, isMiddleClick: function(event) { return isButton(event, 1) }, isRightClick: function(event) { return isButton(event, 2) }, element: function(event) { var node =3D Event.extend(event).target; return Element.extend(node.nodeType =3D=3D Node.TEXT_NODE ? node.pare= ntNode : node); }, findElement: function(event, expression) { var element =3D Event.element(event); return element.match(expression) ? element : element.up(expression); }, pointer: function(event) { return { x: event.pageX || (event.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)= ), y: event.pageY || (event.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) }; }, pointerX: function(event) { return Event.pointer(event).x }, pointerY: function(event) { return Event.pointer(event).y }, stop: function(event) { Event.extend(event); event.preventDefault(); event.stopPropagation(); event.stopped =3D true; } }; })(); Event.extend =3D (function() { var methods =3D Object.keys(Event.Methods).inject({ }, function(m, name) { m[name] =3D Event.Methods[name].methodize(); return m; }); if (Prototype.Browser.IE) { Object.extend(methods, { stopPropagation: function() { this.cancelBubble =3D true }, preventDefault: function() { this.returnValue =3D false }, inspect: function() { return "[object Event]" } }); return function(event) { if (!event) return false; if (event._extendedByPrototype) return event; event._extendedByPrototype =3D Prototype.emptyFunction; var pointer =3D Event.pointer(event); Object.extend(event, { target: event.srcElement, relatedTarget: Event.relatedTarget(event), pageX: pointer.x, pageY: pointer.y }); return Object.extend(event, methods); }; } else { Event.prototype =3D Event.prototype || document.createEvent("HTMLEvents= ").__proto__; Object.extend(Event.prototype, methods); return Prototype.K; } })(); Object.extend(Event, (function() { var cache =3D Event.cache; function getEventID(element) { if (element._eventID) return element._eventID; arguments.callee.id =3D arguments.callee.id || 1; return element._eventID =3D ++arguments.callee.id; } function getDOMEventName(eventName) { if (eventName && eventName.include(':')) return "dataavailable"; return eventName; } function getCacheForID(id) { return cache[id] =3D cache[id] || { }; } function getWrappersForEventName(id, eventName) { var c =3D getCacheForID(id); return c[eventName] =3D c[eventName] || []; } function createWrapper(element, eventName, handler) { var id =3D getEventID(element); var c =3D getWrappersForEventName(id, eventName); if (c.pluck("handler").include(handler)) return false; var wrapper =3D function(event) { if (!Event || !Event.extend || (event.eventName && event.eventName !=3D eventName)) return false; Event.extend(event); handler.call(element, event) }; wrapper.handler =3D handler; c.push(wrapper); return wrapper; } function findWrapper(id, eventName, handler) { var c =3D getWrappersForEventName(id, eventName); return c.find(function(wrapper) { return wrapper.handler =3D=3D handler= }); } function destroyWrapper(id, eventName, handler) { var c =3D getCacheForID(id); if (!c[eventName]) return false; c[eventName] =3D c[eventName].without(findWrapper(id, eventName, handle= r)); } function destroyCache() { for (var id in cache) for (var eventName in cache[id]) cache[id][eventName] =3D null; } if (window.attachEvent) { window.attachEvent("onunload", destroyCache); } return { observe: function(element, eventName, handler) { element =3D $(element); var name =3D getDOMEventName(eventName); var wrapper =3D createWrapper(element, eventName, handler); if (!wrapper) return element; if (element.addEventListener) { element.addEventListener(name, wrapper, false); } else { element.attachEvent("on" + name, wrapper); } return element; }, stopObserving: function(element, eventName, handler) { element =3D $(element); var id =3D getEventID(element), name =3D getDOMEventName(eventName); if (!handler && eventName) { getWrappersForEventName(id, eventName).each(function(wrapper) { element.stopObserving(eventName, wrapper.handler); }); return element; } else if (!eventName) { Object.keys(getCacheForID(id)).each(function(eventName) { element.stopObserving(eventName); }); return element; } var wrapper =3D findWrapper(id, eventName, handler); if (!wrapper) return element; if (element.removeEventListener) { element.removeEventListener(name, wrapper, false); } else { element.detachEvent("on" + name, wrapper); } destroyWrapper(id, eventName, handler); return element; }, fire: function(element, eventName, memo) { element =3D $(element); if (element =3D=3D document && document.createEvent && !element.dispa= tchEvent) element =3D document.documentElement; if (document.createEvent) { var event =3D document.createEvent("HTMLEvents"); event.initEvent("dataavailable", true, true); } else { var event =3D document.createEventObject(); event.eventType =3D "ondataavailable"; } event.eventName =3D eventName; event.memo =3D memo || { }; if (document.createEvent) { element.dispatchEvent(event); } else { element.fireEvent(event.eventType, event); } return event; } }; })()); Object.extend(Event, Event.Methods); Element.addMethods({ fire: Event.fire, observe: Event.observe, stopObserving: Event.stopObserving }); Object.extend(document, { fire: Element.Methods.fire.methodize(), observe: Element.Methods.observe.methodize(), stopObserving: Element.Methods.stopObserving.methodize() }); (function() { /* Support for the DOMContentLoaded event is based on work by Dan Webb, Matthias Miller, Dean Edwards and John Resig. */ var timer, fired =3D false; function fireContentLoadedEvent() { if (fired) return; if (timer) window.clearInterval(timer); document.fire("dom:loaded"); fired =3D true; } if (document.addEventListener) { if (Prototype.Browser.WebKit) { timer =3D window.setInterval(function() { if (/loaded|complete/.test(document.readyState)) fireContentLoadedEvent(); }, 0); Event.observe(window, "load", fireContentLoadedEvent); } else { document.addEventListener("DOMContentLoaded", fireContentLoadedEvent, false); } } else { document.write("'); document.write(''); // *************** entame News First Setting ************** var entameNewsContent =3D 0; var entameNewsId =3D "entameNewsId"; function entameNewsFstSet(){ var httpObj =3D new JKL.ParseXML.DOM( entameNewsXmlFile ); httpObj.async(entameNewsFstSet2);=20 httpObj.onerror(entameNewsErr);=20 myRequest =3D httpObj.parse(); } function entameNewsFstSet2(myRequest, httpObj) { var dataList =3D new Array(); xmlDomFormat(myRequest,"div",-1,false,dataList); var newsCnt =3D dataList.length; var strHtml =3D ''; var idCnt =3D 0; for(var i=3D0;i'; strHtml +=3D '
'; }else{ strHtml +=3D '
'; =09 } =09 strHtml +=3D '

'; if(dataList[i]["img"]){ strHtml +=3D ''; strHtml +=3D dataList[i]["img"]; strHtml +=3D ''; } strHtml +=3D '

'; strHtml +=3D '

'+txt+'

'; strHtml +=3D '
'; =09 if(i%2 =3D=3D 1){ strHtml +=3D '
'; } } if(i%2 =3D=3D 0){ strHtml +=3D ''; } $("entameNewsArea").innerHTML =3D strHtml; slideSetting(entameNewsId,"none"); } function entameNewsErr(){ var strHtml =3D ""; strHtml +=3D '
'; strHtml +=3D '

'; strHtml +=3D '=93=AE=89=E6=83j=83=85=81[=83= X=88=EA=97=97'; strHtml +=3D '

'; strHtml +=3D '
'; =09 $("entameNewsArea").innerHTML =3D strHtml; slideSetting(entameNewsId,"none"); } // *************** Index News Setting ****************** var indexNewsType =3D ""; var newsSltNo; var newsList; var newsAreaNo =3D 0; var newsXmlData; var newsXmlList; var newsXmlAreaList; var newsCookieName; function newsXmlSet(type){ switch(type){ case "chinichi": newsXmlList =3D newsXmlList_chu; newsXmlAreaList =3D newsXmlAreaList_chu; newsCookieName =3D "news_chu"; break; case "tokyo": newsXmlList =3D newsXmlList_tokyo; newsXmlAreaList =3D newsXmlAreaList_tokyo; newsCookieName =3D "news_tokyo"; break; default: return false; break; } newsLinkSet(); } //--- news link set function newsLinkSet(){ //--- getcookie =81inewsNo-newsNo-newsNo.../areaNo=81j var newsset =3D readCookie(newsCookieName); if(!newsset) newsset =3D "0-1-2-3/0"; var newssetTxt =3D newsset.split("/"); newsAreaNo =3D newssetTxt[1]; newsList =3D newssetTxt[0].split("-"); newsChg(newsList[0]); } function newsChg(no){ newsSltNo =3D no;=20 newsTabChg(no); var httpObj =3D new JKL.ParseXML.DOM(newsXmlList[no][1]); httpObj.async(newsChgSet);=20 httpObj.onerror(newsChgErr);=20 myRequest =3D httpObj.parse(); } //*************************************************** var dataList =3D new Array(); function newsChgSet(myRequest) { dataList =3D new Array(); newsXmlData=3D myRequest; var DivClass =3D ""; var strHtml =3D ''; var listHtml =3D ''; =09 switch(newsXmlList[newsSltNo][2]){ case 1: //---TextNews --------------------------------- xmlDomFormat(myRequest,"li",-1,false,dataList); DivClass =3D "default-news"; =09 listHtml +=3D ''; break; =09 case 2: //---AreaNews newsXmlAreaList Read -------------- dataList =3D new Object(); //Object Change xmlDomFormat(myRequest,"ul",-1,true,dataList); DivClass =3D "local-news"; =09 if(newsXmlAreaList[newsAreaNo][2]=3D=3D1){ //All Class First 1 Read for (var i in dataList) { //080526 listHtml +=3D '