flg=0;
dd=(mado+",,,,,,").split(",");
space=dd[2];fg_color=dd[1];bg_color=dd[0];bg_img=dd[3];scroll_bar=dd[5];
if(dd[4]==""){fg_size="14";}else{fg_size=dd[4];}
spd=(speed+",,,,").split(",");
if(spd[4]=="0"){scroll_bar="0";}
x=0;rl=spd[0]*1;
syasin=new Array();
for(i=1;i<=n;i++){
dd=(dt[i]+",,,,,").split(",");
syasin[i]=new Image();syasin[i].src=ur+dd[0];
}

tm="";
function stp(){
if(flg==1){clearTimeout(tm);flg=0;return;}
mv();
}
//スタート
function start(){
img_check();
mv();
setTimeout("img_check()",10000);
}
function img_check(){
img_ww1=0;img_hh1=0;
for(i=1;i<=n;i++){
dd=(dt[i]+",,,,,").split(",");
dw=syasin[i].width;if(dd[3]!=""){dw=dd[3]*1;}
dh=syasin[i].height;if(dd[4]!=""){dh=dd[4]*1;}
img_ww1+=dw;
if(img_hh1<dh){img_hh1=dh;}

}
if(img_ww<img_ww1){
img_ww=img_ww1;
en=img_ww+n*space;
}
if(img_hh<img_hh1){
img_hh=img_hh1;
bar_hh=20;if(scroll_bar=="0"){bar_hh=0;}
document.getElementById("win").height=img_hh+space*2+bar_hh+com_hh;
}
}
//エンドレススクロール
function mv(){
flg=1;
x=x+rl;
if(x>en){x=0;}
if(x<0){x=en;}
win.scroll(x,0);   	//frame1はスクロールさせるフレーム名


tm=setTimeout("mv()",20);
}
	
function mv_rl(d,s){
rl= d;
x=x+s;
if(flg==0){mv();return;}
}
function mv_off(){

clearTimeout(tm);
flg=0;
}
function mv_r(){
if(flg==1){
clearTimeout(tm);
flg=0;
}
x=en-screen.width;win.scroll(x,0);
}
function mv_l(){
if(flg==1){
clearTimeout(tm);
flg=0;
}
x=0;win.scroll(x,0);
}
function rl_chang(){
rl=rl*-1;
}
function win_set(){
ww='<html>\n<head>\n<title></title>\n';
ww+='<scr';
ww+='ipt language="javascript">\n';
ww+='function rl_chg(){\n';
ww+='parent.rl_chang();\n';
ww+='if(window.event){window.event.returnValue=false;}else{return false;}\n';
ww+='}\n';
ww+='</scr';
ww+='ipt>\n';
ww+='</head>\n';
ww+='<body bgcolor='+bg_color+' text='+fg_color;
if(bg_img!=""){ww+=' background="'+bg_img+'"';}
ww+=' style="margin:0">\n';
ww+='<table border=0 cellspacing='+space+' cellpadding=0 onContextmenu="rl_chg()" onClick="parent.stp()"><tr>';
for(j=0;j<=1;j++){
for(i=1;i<=n;i++){
dd=(dt[i]+",,,,,").split(",");
ww+='<td align=center style="font-size:'+fg_size+'">';
//ww+='<img src="'+syasin[i].src+'" border=0 galleryimg="no" ';
ww+='<img src="'+ur+dd[0]+'" border=0 galleryimg="no" ';
if(dd[3]!=""){ww+='width='+dd[3]+' ';}
if(dd[4]!=""){ww+='height='+dd[4]+' ';}
if(dd[2]=="1"){
ww+='style="filter:flipH(enabled=1) flipV(enabled=0);"';
}
if(dd[2]=="2"){
ww+='style="filter:Alpha(Style=2,Opacity=100,FinishOpacity=0);"';
}
if(dd[2]=="3"){
ww+='style="filter:gray(enabled=1);"';
}
ww+='><br>'+dd[1]+'</td>\n';
}
}
ww+='</tr></table></body></html>\n';
win.document.open();
win.document.write(ww);
win.document.close();

img_ww=0;img_hh=0;com_hh=0;
for(i=1;i<=n;i++){
dd=(dt[i]+",,,,,").split(",");
dw=syasin[i].width;if(dd[3]!=""){dw=dd[3]*1;}
dh=syasin[i].height;if(dd[4]!=""){dh=dd[4]*1;}

img_ww+=dw;
if(img_hh<dh){img_hh=dh;}
if(dd[1]!=""){com_hh=20;}
}
en=img_ww+n*space;
bar_hh=20;if(scroll_bar=="0"){bar_hh=0;}
document.getElementById("win").height=img_hh+space*2+bar_hh+com_hh;

setTimeout("start()",2000);
}

//document.write('<form name="button">\n');
document.write('<iframe id="win" name="win" width='+screen.width+' height=450 frameborder=0 style="border-color:'+bg_color+'" ');
if(scroll_bar=="0"){
document.write('scrolling="no"');
}
document.write('></iframe>\n');
d="cursor:hand;";
if(spd[2]!=""){d+='background-color:'+spd[2]+';';}
if(spd[3]!=""){d+='color:'+spd[3]+';';}
if(spd[2]=="transparent"){d+='border-width:0;';}
document.write('<table border=0 cellpadding=0 width=100%><tr><td width=160><br></td><td align=center>\n');

document.write('<input type="button" value="|<" style="width:30;'+d+'" onClick="mv_l()">\n');

document.write('<input type="button" value="<<" style="width:30;'+d+'" onClick="mv_rl(-'+spd[1]+',0)">\n');
document.write('<input type="button" value="<" style="width:30;'+d+'"  onClick="mv_rl(-'+spd[0]+' ,0)">\n');
document.write('<input type="button" value="||" style="width:30;'+d+'"  onClick="mv_off()">\n');
document.write('<input type="button" value=">" style="width:30;'+d+'"  onClick="mv_rl('+spd[0]+' ,0)">\n');
document.write('<input type="button" value=">>" style="width:30;'+d+'"   onClick="mv_rl('+spd[1]+' ,0)">\n');
document.write('<input type="button" value=">|" style="width:30;'+d+'" onClick="mv_r()">\n');
document.write('</td><td align=center width=160><a href="http://www2a.biglobe.ne.jp/~qpon/js/index.htm?http://qpon.quu.cc/java/scroll/scroll01_b.htm" target="_qpon"><font size=1 color='+fg_color+'>システム提供：ＱＰＯＮ</font></a>');
document.write('</td></tr></table>\n');
//document.write('</form>\n');
document.write('<a href="http://www.ne.jp/asahi/qpon/b/java/url_chg.htm" target="_qpon"><font color=#ff000 size=2>ページ管理者様：このシステムを提供していますサーバーを閉鎖します、ここをクリックして新しいサーバーに入れ替えてください。ＱＰＯＮ</font></a><br>');

