//支援
hlp=(document.location+"??").split("?");
helper=0;
if(hlp[1]=="help"){helper=1;}
if(hlp[1]=="help1"){helper=1;}
if(hlp[1]=="help2"){helper=2;}
if(hlp[1]=="help3"){helper=3;}
if(helper>=1){moji_size=Math.floor(moji_size*2);}
//
mdd=(kakudai+",,,").split(",");
mtt=(w_time+",,").split(",");
if(helper>0){mtt[1]=1;}//支援ならＬＯＯＰなし
mid_file=mdd[4];
nav=navigator.appName.substring(0,1);
mac=navigator.appVersion.indexOf("Mac");
if(mac>0){nav="N";}
iti=moji_align+",0";
com_iti=iti.split(",");
moji_align=com_iti[0];yohaku=com_iti[1]*1;
pn=0;pt=new Array();

pn++;pt[pn]="左下拡大,1,1.002,-0.3,-0.0,right,top,0,0";
pn++;pt[pn]="右下拡大,1,1.002,-0.0,-0.0,left,top,0,0";
pn++;pt[pn]="左上拡大,1,1.002,-0.3,-0.3,right,bottom,0,0";
pn++;pt[pn]="右上拡大,1,1.002,-0.0,-0.3,left,bottom,0,0";

pn++;pt[pn]="左中拡大,1,1.002,-0.3,-0.15,right,middle,0,0";
pn++;pt[pn]="右中拡大,1,1.002,-0.0,-0.15,left,middle,0,0";

pn++;pt[pn]="中上拡大,1,1.002,-0.15,-0.0,center,top,0,0";
pn++;pt[pn]="中下拡大,1,1.002,-0.15,-0.3,center,bottom,0,0";
pn++;pt[pn]="中中拡大,1,1.002,-0.15,-0.15,center,middle,0,0";
//
pn++;pt[pn]="右上縮小,1.3,0.998,-0.3,-0.0,right,top,0,0";
pn++;pt[pn]="左上縮小,1.3,0.998,-0.0,-0.0,left,top,0,0";

pn++;pt[pn]="右下縮小,1.3,0.998,-0.3,-0.3,right,bottom,0,0";
pn++;pt[pn]="左下縮小,1.3,0.998,-0.0,-0.3,left,bottom,0,0";

pn++;pt[pn]="右中縮小,1.3,0.998,-0.3,-0.15,right,middle,0,0";
pn++;pt[pn]="左中縮小,1.3,0.998,-0.0,-0.15,left,middle,0,0";

pn++;pt[pn]="中上縮小,1.3,0.998,-0.15,-0.0,center,top,0,0";
pn++;pt[pn]="中下縮小,1.3,0.998,-0.15,-0.3,center,bottom,0,0";
pn++;pt[pn]="中中縮小,1.3,0.998,-0.15,-0.15,center,middle,0,0";

//

pn++;pt[pn]="左へ移動,1.3,1,0,-0.15,left,top,-1,0";

pn++;pt[pn]="右へ移動,1.3,1,-0.3,-0.15,left,top,1,0";

pn++;pt[pn]="上へ移動,1.3,1,-0.15,-0.0,left,top,0,-1";
pn++;pt[pn]="下へ移動,1.3,1,-0.15,-0.3,left,top,0,1";

pn++;pt[pn]="左下移動,1.3,1,-0.0,-0.3,left,top,-1,1";

pn++;pt[pn]="右下移動,1.3,1,-0.3,-0.3,left,top,1,1";
pn++;pt[pn]="左上移動,1.3,1,-0.0,-0.0,left,top,-1,-1";
pn++;pt[pn]="右上移動,1.3,1,-0.3,-0.0,left,top,1,-1";
//pn++;pt[pn]="左へ移動,1.3,1,0,-0.15,left,top,-1,0";
pn++;pt[pn]="中央静止,1,1,0,0,left,top,0,0";
//拡大物語
function story_op(p){
//p=1;

if(!p){p=1;}
syasin_type();
p_no=p;start_no=p-1;
dd=(dt[p]+",,,").split(",");
if(scr_ww<1000 && kakudai==3){kakudai=4;}
if(mac>0){
win=window.open();
}else{
win=window.open("","quality",typ[kakudai]);
}
win.document.open();
story_write(p_no);


win.document.close();

//win.document.oncontextmenu=win.next;/////////////
open_flg=1;
if(nav_sv>0 && kakudai==2){
win.document.title="高画質写真表示（「フルスクリーン鑑賞」の設定をするとタイトルバーが消せます）";
}

}
function story_write(qq){
//qq=1;
scr_w=screen.width;scr_h=screen.height;

if(nav=="N"){
scr_h=innerHeight;
}



no=qq*1;

ddm=(dt[no]+",,,").split(",");
//
ww='<html>\n';
ww+='<head><title>高画質ストーリーショー</title>\n';
ww+='<script language="javascr';
ww+='ipt">\n';
ww+='nav="'+nav+'";\n';
ww+='ur="'+ur+'";\n';
ww+='wip='+wip+';\n';
ww+='seisi_flg=1;\n';
//ww+='seisi_flg=0;\n';
ww+='mid_file="'+mid_file+'";\n';
ww+='syasin='+syasin+';\n';
ww+='wip='+wip+';\n';
ww+='ww_time='+mtt[0]+';\n';
ww+='loop_flg="'+mtt[1]+'";\n';
ww+='dw_flg=1;\n';
ww+='n='+n+';\n';
///ww+='page_no=0;\n';
ww+='page_no='+(no-1)+';\n';
ww+='if (nav=="N"){document.captureEvents( Event.CLICK | Event.CONTEXTMENU );}\n';
if(helper>0){

ww+='document.oncontextmenu=story_cls;\n';
}else{
ww+='document.oncontextmenu=story_seisi;\n';

}
ww+='document.onclick=story_cls;\n';
ww+=('function link_focus(p){document.getElementById("menu"+p).filters["invert"].enabled=true;}\n');
ww+=('function link_blur(p){document.getElementById("menu"+p).filters["invert"].enabled=false;}\n');
ww+=('function keydw(e){;\n');
ww+=('cod=event.keyCode;\n');
if(helper==3){
ww+=('if(cod==9){story_cls();};\n');
}
ww+=('};\n');
ww+=('document.onkeydown=keydw;\n');
ww+='function next(p){\n';
ww+='document.getElementById("txt").innerHTML =story_text;\n';
ww+='if(wip>0 && nav=="M"){\n';
ww+='if(wip==23){\n';
ww+='document.getElementById("myimg").filters["blendTrans"].Apply();\n';
ww+='}else{\n';
ww+='document.getElementById("myimg").filters["revealTrans"].Apply();\n';
ww+='document.getElementById("myimg").filters["revealTrans"].Transition=(wip*1-1);\n';
ww+='}\n';
ww+='}\n';
ww+='document.myimg.src=story_image.src;\n';
ww+='myimg_ww=story_image.width;\n';
ww+='myimg_hh=story_image.height;\n';
ww+='if(syasin==0){myimg_w=screen.width;myimg_h=screen.height;}\n';
ww+='if(syasin==1){myimg_w=screen.width;myimg_h=(screen.width/myimg_ww)*myimg_hh;}\n';
ww+='if(syasin==2){myimg_w=myimg_ww;myimg_h=myimg_hh;}\n';
ww+='if(syasin==3){myimg_h=screen.height;myimg_w=(screen.height/myimg_hh)*myimg_ww;}\n';
ww+='if(wip>0 && nav=="M"){\n';
ww+='if(wip==23){\n';
ww+='document.getElementById("myimg").filters["blendTrans"].Play();\n';

ww+='}else{\n';
ww+='document.getElementById("myimg").filters["revealTrans"].Play();\n';
ww+='}\n';
ww+='}\n';
ww+='w_time=w1_time;\n';

ww+='img_story();\n';
ww+='page_no++;\n';
ww+='if(loop_flg=="1" && page_no>n){story_cls();}\n';
ww+='data=(opener.dt_call(page_no)).split(";");\n';
ww+='dd=(data[0]+",,").split(",");\n';
ww+='story_image=new Image();\n';
ww+='story_image.src=ur+dd[1];\n';
ww+='story_text=dd[3];\n';
ww+='pt_v=data[1];\n';
ww+='if(dd[5]==""){w1_time=ww_time;}else{w1_time=dd[5]*1;}\n';
ww+='}\n';
ww+='function story_cls(){\n';
ww+='if(mid_file!=""){\n';
ww+='opener.document.getElementById("win_mid").Stop();\n';
//ww+='opener.win_player(0);\n';
ww+='}\n';
ww+='opener.cls();return false;\n';
ww+='}\n';
ww+='seisi_flg=1;\n';
///
ww+='function story_seisi(){\n';
if(helper>0){ww+=('window.close();return false;\n')};

ww+=('if(event.shiftKey){return;}\n');/////////////
ww+='if(seisi_flg==0){\n';
ww+='clearTimeout(v_time);\n';
ww+='seisi_flg=1;\n';
ww+='if(mid_file!=""){\n';
ww+='opener.document.getElementById("win_mid").Pause();\n';
//ww+='opener.win_player(2);\n';
ww+='}\n';
ww+='}else{\n';
ww+='seisi_flg=0;\n';

ww+='//if(vd[1]*1>1){v_time=setTimeout("zoom()",w_time*10);}else{v_time=setTimeout("zoom1()",w_time*10);}\n';
ww+='if(zoom_ritu<1){v_time=setTimeout("zoom()",w_time*10);}\n';
ww+='if(zoom_ritu>1){v_time=setTimeout("zoom1()",w_time*10);}\n';
ww+='if(zoom_ritu==1){v_time=setTimeout("mov()",w_time*10);}\n';
ww+='if(mid_file!=""){\n';
ww+='opener.document.getElementById("win_mid").Play();\n';
//ww+='opener.win_player(1);\n';
ww+='}\n';
ww+='}\n';
ww+='if(window.event){window.event.returnValue=false;}\n';
ww+='else{return false;}\n';
ww+='}\n';

///
ww+='function story_start(){\n';
ww+='myimg_ww=document.myimg.width;\n';
ww+='myimg_hh=document.myimg.height;\n';
ww+='if(syasin==0){myimg_w=screen.width;myimg_h=screen.height;}\n';
ww+='if(syasin==1){myimg_w=screen.width;myimg_h=(screen.width/myimg_ww)*myimg_hh;}\n';
ww+='if(syasin==2){myimg_w=myimg_ww;myimg_h=myimg_hh;}\n';
ww+='if(syasin==3){myimg_h=screen.height;myimg_w=(screen.height/myimg_hh)*myimg_ww;}\n';

ww+='data=(opener.dt_call(page_no)).split(";");\n';
ww+='dd=(data[0]+",,").split(",");\n';
ww+='story_image=new Image();\n';
ww+='story_image.src=ur+dd[1];\n';
ww+='story_text=dd[3];\n';
ww+='pt_v=data[1];\n';
ww+='if(dd[5]==""){w1_time=ww_time;}else{w1_time=dd[5]*1;}\n';
ww+='w_time=w1_time;\n';
ww+='img_story();\n';
ww+='page_no++;\n';
ww+='data=(opener.dt_call(page_no)).split(";");\n';
ww+='dd=(data[0]+",,").split(",");\n';
ww+='story_image=new Image();\n';
ww+='story_image.src=ur+dd[1];\n';
ww+='story_text=dd[3];\n';
ww+='pt_v=data[1];\n';
ww+='if(dd[5]==""){w1_time=ww_time;}else{w1_time=dd[5]*1;}\n';
ww+='if(mid_file!=""){\n';
ww+='opener.document.getElementById("win_mid").Play();\n';
//ww+='opener.win_player(1);\n';
ww+='}\n';
ww+='}\n';
////
ww+='function img_story(){\n';

ww+='//v=Math.floor(Math.random()*pn)+1;\n';
ww+='//vd=pt[v].split(",");\n';
ww+='vd=pt_v.split(",");\n';
ww+='bairitu=vd[1]*1;\n';
ww+='zoom_ritu=vd[2]*1;\n';

ww+='align_rl=vd[5];\n';
ww+='align_ud=vd[6];\n';
ww+='iti_x=vd[3]*myimg_w;\n';
ww+='iti_y=vd[4]*myimg_h;\n';
ww+='sx=vd[7]*1;\n';
ww+='sy=vd[8]*1;\n';
ww+='document.myimg.width=myimg_w*bairitu;\n';
ww+='document.myimg.height=myimg_h*bairitu;\n';
ww+='document.getElementById("img_waku").style.width=myimg_w;\n';
ww+='document.getElementById("img_waku").style.height=myimg_h;\n';
ww+='document.getElementById("img_iti").style.width=myimg_w*1.3;\n';
ww+='document.getElementById("img_iti").style.height=myimg_h*1.3;\n';
ww+='document.getElementById("td_ud").style.textAlign=align_rl;\n';
ww+='document.getElementById("td_ud").style.verticalAlign=align_ud;\n';
ww+='document.getElementById("myimg").style.textAlign=align_rl;\n';
ww+='document.getElementById("myimg").style.verticalAlign=align_ud;\n';

ww+='document.getElementById("img_iti").style.left=iti_x;\n';
ww+='document.getElementById("img_iti").style.top=iti_y;\n';

ww+='if(zoom_ritu<1){vv=1.3;zoom();}\n';
ww+='if(zoom_ritu>1){vv=1;zoom1();}\n';

ww+='if(zoom_ritu==1 && bairitu!=1){vv=1.3;mov();}\n';
ww+='if(zoom_ritu==1 && bairitu==1){setTimeout("mov0()",w_time*1000);}\n';
ww+='}\n';
//ww+='}\n';
ww+='function zoom(){\n';
ww+='vv*=zoom_ritu;\n';
ww+='if(vv<=1){clearTimeout(v_time);return next(1);}\n';
ww+='document.myimg.width=myimg_w*vv;\n';
ww+='document.myimg.height=myimg_h*vv;\n';
ww+='v_time=setTimeout("zoom()",w_time*10);\n';
ww+='seisi_flg=0;\n';
ww+='}\n';
ww+='function zoom1(){\n';
ww+='vv*=zoom_ritu;\n';
ww+='if(vv>=1.3){clearTimeout(v_time);return next(1);}\n';
ww+='document.myimg.width=myimg_w*vv;\n';
ww+='document.myimg.height=myimg_h*vv;\n';
ww+='v_time=setTimeout("zoom1()",w_time*10);\n';
ww+='seisi_flg=0;\n';
ww+='}\n';
ww+='function mov(){\n';
ww+='v_time=setTimeout("mov_sub()",w_time*10);\n';
ww+='seisi_flg=0;\n';
ww+='}\n';
ww+='function mov_sub(){\n';
ww+='iti_x=iti_x+(sx*2);\n';
ww+='iti_y=iti_y+(sy*2);\n';
ww+='if(iti_x<myimg_w*-0.3 || iti_x>0 ||iti_y<myimg_h*-0.3 || iti_y>0 ){\n';
ww+='seisi_flg=1;\n';
ww+='clearTimeout(v_time);return next(1);\n';
ww+='}\n';
ww+='document.getElementById("img_iti").style.left=iti_x;\n';
ww+='document.getElementById("img_iti").style.top=iti_y;\n';
ww+='v_time=setTimeout("mov_sub()",w_time*10);\n';
ww+='seisi_flg=0;\n';
ww+='}\n';
ww+='function mov0(){\n';
ww+='return next(1);}\n'
ww+='document.title="高画質ストーリーショー（[F11]キーでフルスクリーンになります）";';
ww+='</scr';
ww+='ipt>\n';
bcg=(mdd[1]+";;").split(";");

ww+=('<style>');
ww+=('body {');
if(bcg[1]!=""){
if(bcg[2]==""){bcg[2]=0;}
	ww+=('filter: progid:DXImageTransform.Microsoft.Gradient(gradientType='+bcg[2]+',StartColorStr='+bcg[0]+',EndColorStr='+bcg[1]+');');
}else{
	if(bcg[0]!=""){
		ww+=('background-color:'+bcg[0]);
	}
}
ww+=('}');
ww+=('</style>\n');
ww+='</head>\n';
win.document.write(ww);ww="";
//ww+='<body style="cursor:crosshair" bgcolor="'+mdd[1]+'" background="'+mdd[2]+'" leftmargin="0" topmargin="0" marginheight=0 marginwidth=0 scroll="no" onLoad="opener.full_check();focus();story_start();" onUnload="opener.cls_flg();">\n';
ww+='<body style="cursor:crosshair" bgcolor="'+mdd[1]+'" background="'+mdd[2]+'" leftmargin="0" topmargin="0" marginheight=0 marginwidth=0 scroll="no" onLoad="opener.full_check();focus();story_start();" onUnload="opener.cls_flg();">\n';

ww+='<center>\n';
ww+='<div id="tp" style="position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;vertical-align:middle;filter:revealTrans(Transition=0,duration=2);margin:auto;">\n';
ww+='<table width=100% height=100% cellpadding=0 cellspacing=0><tr>\n';
ww+='<td align="center" valigin="middle" id="img_td">\n';
//ww+='<div id="img_waku" style="position:relative;width:0;height:0;background-color:#cccc00;overflow:hidden">\n';
//ww+='<div id="img_iti" style="position:absolute;background-color:888888;">\n';
ww+='<div id="img_waku" style="position:relative;width:0;height:0;overflow:hidden">\n';
ww+='<div id="img_iti" style="position:absolute;">\n';

ww+='<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td id="td_ud">\n';
if(wip>0 && nav=="M"){
if(wip==23){
ww+='<img src="'+ur+ddm[1]+'" id="myimg" name="myimg" border=0  alt="" galleryimg="no" onLord="opener.img_flg();" style="filter:blendTrans(duration=1);">\n';
}else{

ww+='<img src="'+ur+ddm[1]+'" id="myimg" name="myimg" border=0  alt="" galleryimg="no" onLord="opener.img_flg();" style="filter:revealTrans(duration=1);">\n';

}
}else{
ww+='<img src="'+ur+ddm[1]+'" id="myimg" name="myimg" border=0  alt="" galleryimg="no" onLord="opener.img_flg();">\n';

}
ww+='</td></tr></table>\n';
ww+='</div>\n';
ww+='</div>\n';
ww+='</td>\n';
ww+='</tr></table>\n';
ww+='</div>\n';
win.document.write(ww);ww="";
if(nav=="N"){
win_h=win.innerHeight-48;
}else{
win_h=win.document.body.clientHeight-36;
if(kakudai==1){win_h=win.document.body.clientHeight-54;}
}
ww+='<table width=100% cellpadding=0 style="position:absolute;top:0;left:0"><tr height=20><td valign=top>';
if(helper==0){
ww+='<span id="button" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;cursor:hand">左クリック：閉じる｜右クリック：静　止</span>\n';
}
ww+='</td></tr></table>';

//ww+='<tr><td></td></tr>';
ww+='<table width=100% cellpadding=0 style="position:absolute;bottom:0;left:0">';
ww+='<tr height=20>';
ww+='<td id="com" valign=top style="filter:blendTrans(duration=2);text-align:'+moji_align+';" >\n';
ww+='<table cellpadding=5><tr><td width=30><br></td><td id="txt" style="color:'+moji_color+';background-color:'+moji_bgcolor+';font-size:'+moji_size+'">'+ddm[3]+'<br></td><td width=30><br></td></tr></table>\n';
ww+='</td></tr></table>\n';

if(helper==3){
ww+=('<div id="h3" style="position:absolute;top:0;left:0;"><table><tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu1"><a href="javascript:history.back();" style="color:#000000;font-size:70;" onMouseOver="link_focus(1)" onMouseOut="link_blur(1)" onFocus="link_focus(1)" onBlur="link_blur(1)" id="hr1">閉</a></th></tr></table></div>\n');

}
ww+='</center></body></html>\n';
//
win.document.write(ww);

}
no=1;
function dt_call(p){
pp=(p%n)+1
dd=(dt[pp]+",,,,").split(",")
m=0;
if(dd[4]=="" || dd[4]==" "){
	no1=Math.floor(no/9);no1--;if(no1<0){no1=2;}
	if(mtt[2]*1>1){mm=9*mtt[2];}else{mm=9;}
	m=Math.floor(Math.random()*mm);
	if(m<9){
		no=(Math.floor(m)+no1*9)%27+1;
	}else{
		no=27;
	}
//no=Math.floor(Math.random()*9)+1+no1*9;
}else{
no=dd[4]*1;
}
no=((no-1)%27)+1;
return dt[pp]+",,,;"+pt[no];
}

///////////スライドショー///////////////

//---2004/06/01(12:35)---//
gc=gaku_color+",,,";
gcc=gc.split(",");
gaku_color=gcc[0];
gfont_color=gcc[1];if(gfont_color==""){gfont_color=document.fgColor;}
gfont_size=gcc[2];if(gfont_size==""){gfont_size=14;}
gaku_bgcolor=gcc[3];if(gaku_bgcolor==""){gaku_bgcolor="#cccccc";}
/*
iti=moji_align+",0";
com_iti=iti.split(",");
moji_align=com_iti[0];yohaku=com_iti[1]*1;
*/
if(sw>0 && sh>0 && gaku<4){
document.onload=wh_chack;
}
sum_w=sw;
scr=kakudai+",,,,";
scr_bg=scr.split(",");
dw_flg=scr_bg[3]*1;
kakudai=scr_bg[0]*1;
if(scr_bg[1]==""){scr_bg[1]="#000000";}
r=w_time+",0,0,";rr=r.split(",");
w_time=rr[0]*1;
w_loop=rr[1]*1;
mac=navigator.appVersion.indexOf("Mac");
nav=navigator.appName.substring(0,1);
nav_ver=navigator.appVersion;
nav_sv=nav_ver.indexOf("Windows NT 5.1; SV1");

//拡大
scr_ww=screen.width;

typ=new Array();
typ[0]="channelmode=yes";//ボタン、タイトルバー表示
typ[1]="width="+(screen.width-10)+",height="+(screen.height-52)+",top=0,left=0";//タイトルバー表示
typ[2]="fullscreen=yes,scrollbars=no";//写真のみ
typ[3]="fullscreen=yes";//[X]ボタンのみ
//写真タイプセット
function syasin_type(){

if(syasin==0){syasin_typ="width="+screen.width+" height="+screen.height;}//縦横１００％
if(syasin==1){syasin_typ="width="+screen.width;}//横１００％
if(syasin==2){syasin_typ="";}//写真原寸
if(syasin==3){syasin_typ="height="+screen.height;}//タテ１００％
if(syasin>3 && syasin<100){syasin_typ="width="+(Math.floor(syasin*screen.width*0.1));}
if(syasin>=100){syasin_typ="width="+syasin;}

}
//サムネール仕上げ
function wh_chack(){
if(n<=1){
return;
}
for(i=0;i<n;i++){
sn_l=document.mihon[i].width;
sn_h=document.mihon[i].height;
if(sn_l>sum_w){
document.mihon[i].width=sum_w;
document.mihon[i].height=(sum_w/sn_l)*sn_h;
}
}
//スライド先読み
ddd=dt[1].split(",");ddmm=new Image();ddmm.src=ur+ddd[1];
}
//サムネル
waku=new Array();
waku[0]='border=0';
waku[1]='border=2 cellpadding=6 bgcolor='+gaku_color;
//waku[2]='border=0 width='+(sw*1+8)+' height='+(sh*1+8)+' background="http://qpon.quu.cc/java/quality/back.gif"';
waku[2]='border=0 cellpadding=0 cellspacing=0 width='+(sw*1+8)+' height='+(sh*1+8)+' style="text-align:left;text-valign:top;"';

waku[3]='border=0 cellpadding=10 cellspacing=0 width='+(sw*1+8)+' height='+(sh*1+8)+' style="text-align:left;text-valign:top;filter:shadow(color='+gaku_color+',direction=135)"';

if(gaku<4 && sw>0 && sh>0){
document.write('<table width="90%" border="0" cellpadding=0>');
for(i=1;i<=n;i++){
dd=(dt[i]+",,").split(",");
if(dd[0]==""){dd[0]=dd[1];}
if(i%xn==1){document.write('<tr height="',sw,'">');}
document.write('<td align="center" valign=top>');
document.write('<table ',waku[gaku],'><tr><td ');
if(gaku!=3){document.write('bgcolor="',gaku_bgcolor,'" ');}
document.write('valign=middle align=center width="',sw,'"  height="',sh,'">');

if(document.layers || mac>0){document.write('<a href="javascript:op(',i,')">');}

//document.write('<img src="',ur,dd[0],'" width="',sw,'" height="',sh,'" border=1 onClick="op(',i,')" style="cursor:hand;border-color:#ffffff">'); 
if(helper>0){
document.write('<img src="',ur,dd[0],'" name="mihon" height="',sh,'" border=1  style="border-color:#ffffff">'); 

}else{
document.write('<div id="sum_win'+i+'" style="position:relative;top:0;left:0" onMouseOver="document.getElementById(\'st_button'+i+'\').style.visibility=\'visible\';"  onMouseOut="document.getElementById(\'st_button'+i+'\').style.visibility=\'hidden\';">');
document.write('<img src="',ur,dd[0],'" name="mihon" height="',sh,'" border=1  onContextMenu="return false;" onClick="op(',i,');" style="cursor:hand;border-color:#ffffff">'); 
document.write('<button id="st_button'+i+'" style="position:absolute;bottom:0;right:0;visibility:hidden" onClick="story_op(',i,');this.style.visibility=\'hidden\'">Start</button></div>');
}
if(document.layers || mac>0){document.write('</a>');}
if(gaku==2){
document.write('</td><td><table width=8 height=100% border=0 cellpadding=0 cellspacing=0><tr height=8><td></td></tr><tr height='+(sh-8)+'><td bgcolor='+gaku_color+'></td></tr></table>');
document.write('</td></tr><tr><td colspan=2><table width=100% height=8 border=0 cellpadding=0 cellspacing=0><tr><td width=8></td><td width='+sw+' bgcolor='+gaku_color+'></td></tr></table>');
}
document.write('</td></tr></table>');

document.write('<span style="color:',gfont_color,';font-size:',gfont_size,'">',dd[2],'</span><br>');

document.write('</td>');
if(i%xn==0){document.write('</tr>');} 
}
if(i%xn!=0){document.write('</tr>');}
document.write('<tr><td align=right colspan="'+xn+'"><br><img src="http://qpon.quu.cc/cgi-bin/week/count.cgi?story" width=0 height=0>');
document.write('<a href="http://www2a.biglobe.ne.jp/%7Eqpon/js/index.htm?http://www2a.biglobe.ne.jp/%7Eqpon/story/qponstory_b.htm" target="_qpon" title="ホームページ用ソース無料公開" style="color:'+gfont_color+';font-size:11;">システム提供：ＱＰＯＮ</a><span id="full_height"></span></td></tr>'); 

document.write('</table>');

}

document.write('<embed name="win_mid" id="win_mid" src="'+mid_file+'" autostart="false" loop="true"  width="1" height="1">\n');
//プレーヤー制御
function win_player(p){

if(p==2){document.getElementById("win_mid").Pause();}
if(p==1){document.getElementById("win_mid").Play();}
if(p==0){document.getElementById("win_mid").Stop();}
}
//障害者支援
function con_menu(){
return false;
}
me=1;

function menu_ud(){
if(helper==1&&event.button!=2){return;}
if(helper==2&&event.button==1){menu_sub();return;}
helper_bgm.src="http://qpon.quu.cc/helper/up.wav";
if(helper==1){clearTimeout(mt);}
if(me==0){roll(-1);menu_sub();return false;}
if(me==1){history.back();}
if(me==2){roll(0);story_op(1);window.blur();return false;}
if(me==3){roll(1);menu_sub();return false;}
return false;
}
me_ud=1;
function menu_sub(){

document.getElementById("menu"+me).filters["invert"].enabled=false;

if(me>=3){me=3;me_ud=-1;}
if(me<=0){me=0;me_ud= 1;}
me+=me_ud;
if(helper!=3){
document.getElementById("menu"+me).filters["invert"].enabled=true;
}
helper_bgm.src="http://qpon.quu.cc/helper/pi.wav";
if(helper==1){
mt=setTimeout("menu_sub()",2000);
}
}
function link_focus(p){
document.getElementById("menu"+p).filters["invert"].enabled=true;

}
function link_blur(p){
document.getElementById("menu"+p).filters["invert"].enabled=false;

}
menu_top=0;

function roll(s){
if(s==0){
menu_top=0;
document.getElementById("menu_table").style.top=menu_top;
return false;
}
menu_top+=(200*s);
if(menu_top<0){menu_top=0;}
document.getElementById("menu_table").style.top=menu_top;
scrollTo(0,menu_top);
}
if(helper>=1){
/*
document.write('<table id="menu_table" border=1 width=100 height=100% bgcolor=#ffffff style="position:absolute;top:0;left:0;font-size:70;z-index:9">');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu0">↑</th></tr>');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu1"><a href="javascript:history.back();" style="color:#000000;font-size:70;">閉</a></th></tr>');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu2"><a href="javascript:story_op(1);me=2;window.blur();" style="color:#000000;font-size:70;">見</th></tr>');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu3">↓</th></tr>');
document.write('<tr><th valign=bottom style="font-size:20;color:#000000">');
*/
document.write('<table id="menu_table" border=1 width=100 height=100% bgcolor=#ffffff style="position:absolute;top:0;left:0;font-size:70;z-index:9">');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu0"><a href="javascript:roll(-1);" style="background:#ffffff;color:#000000;font-size:70;" onMouseOver="link_focus(0)" onMouseOut="link_blur(0)" onFocus="link_focus(0)" onBlur="link_blur(0)" id="hr0" tabindex="1">↑</a></th></tr>');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu1"><a href="javascript:history.back();" style="background:#ffffff;color:#000000;font-size:70;" onMouseOver="link_focus(1)" onMouseOut="link_blur(1)" onFocus="link_focus(1)" onBlur="link_blur(1)" id="hr1" tabindex="2">閉</a></th></tr>');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu2"><a href="javascript:at();me=2;window.blur();" style="background:#ffffff;color:#000000;font-size:70;" onMouseOver="link_focus(2)" onMouseOut="link_blur(2)" onFocus="link_focus(2)" onBlur="link_blur(2)" id="hr2" tabindex="3">見</a></th></tr>');
document.write('<tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu3"><a href="javascript:roll(+1);" style="background:#ffffff;color:#000000;font-size:70;" onMouseOver="link_focus(3)" onMouseOut="link_blur(3)" onFocus="link_focus(3)" onBlur="link_blur(3)" id="hr3" tabindex="4">↓</a></th></tr>');
document.write('<tr><th valign=bottom style="font-size:20;background:#ffffff;color:#000000">');
if(helper==1){
document.write('移動自動<br>確定：右');
}
if(helper==2){
document.write('移動：左<br>確定：右');
}
if(helper==3){
document.write('リンク自動巡回');
}
document.write('</th></tr></table>');

document.write('<bgsound id="helper_bgm">');
document.oncontextmenu=con_menu;
document.onmousedown=menu_ud;
document.onmouseup=con_menu;
document.onload=menu_sub();
}

////////////////////////////////////
alt_dt="左：閉じる／右：次へ,左：閉じる／右：静止".split(",");
//次へ
seisi_flg=0;
function next_button(p){
if(p!=-1){p=1;}
//return event.shiftKey;
if(at_flg==0){
	p_no+=p;
if(p_no>n){p_no=1;}
if(p_no<1){p_no=n;}
//一巡したとき
	if(w_loop>0 && start_no==p_no &&p==1){
		cls();
	}
	dd=(dt[p_no]+",,").split(",");
	ww=('<img src="'+ur+dd[1]+'" name="myimg" border=0 '+syasin_typ +' alt="'+alt_dt[at_flg]+'" galleryimg="no" onLoad="opener.img_flg()">\n');
	win.document.getElementById("img_td").innerHTML =ww;
}
if(at_flg==1){
	seisi_flg++;
	seisi_flg=seisi_flg%2;
}
//win.document.oncontextmenu= win.next;/////////
}

//閉じる
at_flg=0;open_flg=0;

function cls_flg(){
if(at_flg==1){
at_flg=0;seisi_flg=0;
clearTimeout(tim);
}
}

function cls(){
if(helper>0){menu_sub();}
if(at_flg==1 && wip_flg==1){
open_flg=2;
}else{
open_flg=0;
wip_flg=0;
if(at_flg==1){
at_flg=0;seisi_flg=0;
clearTimeout(tim);
}
win.window.close();
}
}
//閉じるボタン
function close_button(){
if(kakudai==3){
	if(at_flg==0){
		if(nav=="N"){
		ww=('<a href="javascript:cls()" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;">左クリック：閉じる</a>｜<a href="javascript:opener.next_button(1)" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;">右クリック：次へ</a>');
		}else{
		ww=('左クリック：閉じる｜右クリック：次へ');

		}
	}else{
		if(nav=="N"){
		ww=('<a href="javascript:cls()" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;">左クリック：閉じる</a>｜<a href="javascript:opener.next_button(1)" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;">右クリック：静止</a>');
		}else{
	//ww=('左クリック：閉じる｜右クリック：静止');

		ww=('左クリック：閉じる');


		}
	}
	win.document.getElementById("button").innerHTML =ww;
}

}
load_flg=1;
//自動スライド
function at(p){
if(!p){p=1;}
at_flg=1;seisi_flg=1;
load_flg=1;
///op(1);
///p_no=0;
op(p);
p_no=p-1;
at_sub();
load_flg=1;
close_button();
}
//
w_step=1000;
//ホイール
function at_wheel(s){
if(s>0){
	w_step=1000;
	clearTimeout(tim);
	tim=setTimeout("at_sub()",w_time*w_step);
	}
	if(s<=0 && w_step==1000){
w_step=3000/w_time;
clearTimeout(tim);
at_sub();

}
}
//
wip_flg=0;
//

function at_sub(){

tim=setTimeout("at_sub()",w_time*w_step);
////////if(seisi_flg==0){
	if(load_flg==1 || nav=="N"){
		load_flg=0;
		p_no++;
		if(p_no>n){
			p_no=1;
			if( w_loop>0){
				open_flg=2;
			}
		}
		//先読み
		pp_no=p_no+1;if(pp_no>n){pp_no=1;}
		ddd=dt[pp_no].split(",");ddmm=new Image();ddmm.src=ur+ddd[1];
//
		dd=(dt[p_no]+",,,").split(",");
		if(open_flg==1){
			wip_flg=1;
			if(wip>0 && nav=="M"){
				if(wip==23){
					win.tp.filters["blendTrans"].Apply();
				}else{
					win.tp.filters["revealTrans"].Apply();
				}
				ww=('<img src="'+ur+dd[1]+'" name="myimg" border=0 '+syasin_typ +' alt="'+alt_dt[at_flg]+'" galleryimg="no" onLoad="opener.img_flg()">\n');
				win.document.getElementById("img_td").innerHTML =ww;

				if(wip==23){
					win.tp.filters["blendTrans"].play();
				}else{
					win.tp.filters["revealTrans"].Transition=(wip-1);
					win.tp.filters["revealTrans"].play();
				}
			}else{
				ww=('<img src="'+ur+dd[1]+'" name="myimg" border=0 '+syasin_typ +' alt="'+alt_dt[at_flg]+'" galleryimg="no" onLoad="opener.img_flg()">\n');
				win.document.getElementById("img_td").innerHTML =ww;

			}
			if(nav=="N"){
				win.document.getElementById("com").innerHTML = '<table cellpadding=5><tr><td width='+yohaku+'><br></td><td id="txt" style="color:'+moji_color+';background-color:'+moji_bgcolor+';font-size:'+moji_size+'">'+dd[3]+'</td><td width='+yohaku+'><br></td></tr></table>';
			}
			wip_flg=0;
		}
/////////	}

}
//遅いＰＣ対策
if(open_flg==2){
	open_flg=0;
	at_flg=0;
	clearTimeout(tim);
	win.window.close();
	seisi_flg=0;
//return;
}
}
//フルスクリーンチェック
function full_check(){
win_height=screen.height-win.document.body.clientHeight;
if(win_height!=0){
document.getElementById('full_height').innerHTML='<br><a href="http://www2a.biglobe.ne.jp/~qpon/html/xp_sp2.htm" style="font-size:10;color:#ff8800">フルスクリーン鑑賞法</a>';
}
}
//画像読込みチェック
function img_flg(){

img_ww=win.myimg.width;
img_hh=win.myimg.height;
if(img_ww>screen.width && img_hh>screen.height){
ww=('<img src="'+ur+dd[1]+'" name="myimg" border=0 width='+screen.width+' height='+screen.height+' alt="'+alt_dt[at_flg]+'" galleryimg="no" >\n');
win.document.getElementById("img_td").innerHTML =ww;
}else{
if(img_ww>screen.width){
ww=('<img src="'+ur+dd[1]+'" name="myimg" border=0 width='+screen.width+' alt="'+alt_dt[at_flg]+'" galleryimg="no" onLoad="opener.img_flg()">\n');
win.document.getElementById("img_td").innerHTML =ww;
}
if(img_hh>screen.height){
ww=('<img src="'+ur+dd[1]+'" name="myimg" border=0 height='+screen.height+' alt="'+alt_dt[at_flg]+'" galleryimg="no" onLoad="opener.img_flg()">\n');
win.document.getElementById("img_td").innerHTML =ww;
}
}
load_flg=1;

win.document.getElementById("com").innerHTML = '<table cellpadding=5><tr><td width='+yohaku+'><br></td><td id="txt" style="color:'+moji_color+';background-color:'+moji_bgcolor+';font-size:'+moji_size+'">'+dd[3]+'</td><td width='+yohaku+'><br></td></tr></table>';

}

//拡大ウインドウ
p_no=1;open_flg=0;start_no=1;

function op(p){
syasin_type();
p_no=p;start_no=p;
dd=(dt[p]+",,").split(",");
if(scr_ww<1000 && kakudai==3){kakudai=4;}
win=window.open("","quality",typ[kakudai]);
win.document.open();
win_write(p_no);
win.document.close();
win.document.oncontextmenu=win.next;/////////////
open_flg=1;
if(nav_sv>0 && kakudai==2){
win.document.title="高画質写真表示（「フルスクリーン鑑賞」の設定をするとタイトルバーが消せます）";
}
}

//拡大ＨＴＭＬ
function win_write(qq){

scr_w=screen.width;scr_h=screen.height;

if(nav=="N"){
scr_h=innerHeight;
}


no=qq*1;

ddm=(dt[no]+",,,").split(",");


ww =('<html>\n');
ww+=('<head><title>高画質ストーリーショー</title>\n');
ww+=('<script language="javascript">\n');
ww+=('nav=navigator.appName.substring(0,1);\n');
ww+=('dw_flg='+dw_flg+';');
ww+=('function cls(){\n');
ww+=('if(event.shiftKey){next(-1);return;}');//
ww+=('opener.cls();return false;\n');
ww+=('}\n');
ww+=('function con_menu(){\n');
ww+=('return false;\n');
ww+=('}\n');
ww+=('function next(p){\n');
if(helper>0){
ww+=('window.close();return false\n');
}else{
ww+=('if(event.shiftKey && dw_flg==1 && p!=-1){return;}\n');
ww+=('opener.next_button(p);\n');
if(helper>0){
ww+=('document.oncontextmenu=cls;\n');
ww+=('document.onmouseup=con_menu;\n');
}else{
ww+=('document.oncontextmenu=next;\n');
}
ww+=('return false;\n');
}
ww+=('}\n');

ww+=('if (nav=="N"){document.captureEvents( Event.CLICK | Event.CONTEXTMENU | Event.ONKEYDOWN);\n');
if(helper>0){
ww+=('document.oncontextmenu=cls;\n');
}else{
ww+=('document.oncontextmenu=next;\n');
}
ww+=('}else{\n');

if(helper>0){
ww+=('document.oncontextmenu=cls;\n');
}else{
ww+=('document.oncontextmenu=next;\n');
//マウスホイール
ww+=('window.document.onmousewheel=wheel_ud;\n');
}
ww+=('document.onclick=cls;\n');
ww+=('document.onkeydown=keydw;\n');
ww+=('}\n');
ww+=('function wheel_ud(){wd=window.event.wheelDelta;opener.at_wheel(wd);}\n');

ww+=('function link_focus(p){document.getElementById("menu"+p).filters["invert"].enabled=true;}');
ww+=('function link_blur(p){document.getElementById("menu"+p).filters["invert"].enabled=false;}');

ww+=('function keydw(e){;\n');
ww+=('if(nav=="N"){cod=e.which;}else{cod=event.keyCode;};\n');
ww+=('if(cod==39||cod==13){next(1);};\n');
ww+=('if(cod==38||cod==40||cod==27){cls();};\n');
ww+=('if(cod==37||cod==8){next(-1);};\n');
if(helper==3){
ww+=('if(cod==9){cls();};\n');
}
ww+=('};\n');
ww+=('document.title="高画質ストーリーショー（[F11]キーでフルスクリーンになります）";');
ww+=('</scr');
ww+=('ipt>\n');
bcg=(scr_bg[1]+";;").split(";");

ww+=('<style>');
ww+=('body {');
if(bcg[1]!=""){
if(bcg[2]==""){bcg[2]=0;}
	ww+=('filter: progid:DXImageTransform.Microsoft.Gradient(gradientType='+bcg[2]+',StartColorStr='+bcg[0]+',EndColorStr='+bcg[1]+');');
}else{
	if(bcg[0]!=""){
		ww+=('background-color:'+bcg[0]);
	}
}
ww+=('}');
ww+=('</style>\n');
ww+=('</head>\n');
ww+=('<body style="cursor:crosshair" background="'+scr_bg[2]+'" leftmargin="0" topmargin="0" marginheight=0 marginwidth=0 scroll="no" onLoad="opener.full_check();focus();" onUnload="opener.cls_flg();">\n');
//ww+=('<body style="cursor:crosshair" bgcolor="'+scr_bg[1]+'" background="'+scr_bg[2]+'" leftmargin="0" topmargin="0" marginheight=0 marginwidth=0 scroll="no" onLoad="focus();">\n');

win.document.write(ww);ww="";
ww+=('<center>\n');
//写真
if(nav=="N"){
ww+=('<div id="tp" onClick="cls()" style="position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;vertical-align:middle;filter:revealTrans(Transition='+wip+');margin:auto;">\n');

}else{
if(wip==23){
ww+=('<div id="tp" style="position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;vertical-align:middle;filter:blendTrans(duration=3);margin:auto;">\n');

}else{
ww+=('<div id="tp" style="position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;vertical-align:middle;filter:revealTrans(Transition='+wip+',duration=2);margin:auto;">\n');
}
}
ww+=('<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align="center" valigin="middle" id="img_td">');
ww+=('<img src="'+ur+ddm[1]+'" name="myimg" border=0 '+syasin_typ +' alt="左：閉じる／右：次へ" galleryimg="no" onLord="opener.img_flg();">\n');
ww+=('</td></tr></table></div>\n');
win.document.write(ww);ww="";
//
if(nav=="N"){
win_h=win.innerHeight-48;
}else{
win_h=win.document.body.clientHeight-36;
if(kakudai==1){win_h=win.document.body.clientHeight-54;}
}
ww+=('<table width=100% cellpadding=0 style="position:absolute;top:0;left:0;z-index:10"><tr height=20><td>');
//閉じるボタン表示
if(kakudai==3){
if(nav=="N"){
ww+=('<span id="button" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;cursor:hand"><a href="javascript:cls()" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;">左クリック：閉じる</a>｜<a href="javascript:opener.next_button(1)" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;">右クリック：次へ</a></span>\n');
}else{
ww+=('<span id="button" style="background-color:'+moji_bgcolor+';color:'+moji_color+';font-size:12;cursor:hand">左クリック：閉じる｜右クリック：次へ</span>\n');

}
}
ww+=('</td></tr></table>');


//ww+=('<tr><td></td></tr><tr height=20>');
//コメント配置
ww+=('<table width=100% cellpadding=0 style="position:absolute;bottom:0;left:0;z-index:10"><tr height=20>');

ww+=('<td id="com" style="filter:blendTrans(duration=2);text-align:'+moji_align+';" >\n');
ww+=('<table cellpadding=5><tr><td width='+yohaku+'><br></td><td id="txt" style="color:'+moji_color+';background-color:'+moji_bgcolor+';font-size:'+moji_size+';">'+ddm[3]+'<br></td><td width='+yohaku+'><br></td></tr></table>\n');
ww+=('</td></tr></table>\n');


if(helper==3){
ww+=('<div id="h3" style="position:absolute;top:0;left:0;"><table><tr height=100><th style="background:#ffffff;color:#000000;font-size:70;filter:invert(enabled=0);" id="menu1"><a href="javascript:history.back();" style="color:#000000;font-size:70;" onMouseOver="link_focus(1)" onMouseOut="link_blur(1)" onFocus="link_focus(1)" onBlur="link_blur(1)" id="hr1">閉</a></th></tr></table></div>\n');

}
//ww+=('<div id="f" style="position:absolute;top:30;left:100;"><form name=myform><input type=text name="f_w"><input type=text name="f_h"></form></div>\n');

if(mid_file!=""){

if(nav=="M"){
ww+='<bgsound name="win_mid" id="win_mid" src="'+mid_file+'" loop=infinite>\n';

}else{
ww+='<embed name="win_mid" id="win_mid" src="'+mid_file+'" autostart=true loop=true hidden=true>\n';
}
}

ww+=('</center></body></html>\n');
win.document.write(ww);
}

