function winLoad(){ if (window.addEventListener) { //for W3C DOM window.addEventListener("load", EffSat, false); }else if (window.attachEvent) { //for IE window.attachEvent("onload", EffSat); }else { window.onload = EffSat; } } function winReSize(){ if (window.addEventListener) { //for W3C DOM window.addEventListener("resize", setWinReSize, false); }else if (window.attachEvent) { //for IE window.attachEvent("onresize", setWinReSize); }else { window.onresize = setWinReSize; } } function DispFloat(idname){ document.write('
'); document.write('
'); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('
loadingただいま処理中です。
'); document.write(' しばらくお待ちください。
'); document.write('
'); document.write('
'); document.write(''); myEff(idname); } function Float(idname){ DispFloat(idname); myClose() winLoad(); } var flt, ifm, cls; function myEff(idname){ var flt_idname = "flt_main"; if( document.getElementById ( idname ) ){ flt_idname = idname; } if ( document.getElementById ){ flt = document.getElementById ( flt_idname ); ifm = document.getElementById ( "flt_ifm" ); ifm_f = document.getElementById ( "ifm_frame" ); cls = document.getElementById ( "btnCls" ); }else{ flt = document.all [flt_idname]; ifm = document.all ["flt_ifm"]; ifm_f = document.all ["ifm_frame"]; cls = document.all ["btnCls"]; } } function EffSat(){ moveStop = 0; //表示位置設定 setPosition(); //リサイズを準備 winReSize(); } //表示位置 var setX = 0, setY = 0; //現在地 var Px = -1000, Py = -1000; //閉じるボタン var setCls = 1; //ドラッグ可能 var setDrag = 0; //位置保持 var setKeep = 1; //テーブル幅 //var tblWidth = 0, tblHeight = 0; //表示位置選択 var Ps = 1; //表示位置種別 var Pk = 4; // ウィンドウサイズ var winH = 0, winW = 0; function setPosition(){ ReSize = 0; startEff = 0; flt.style.top = Py + 'px'; flt.style.left = Px + 'px'; flt.style.display = ""; flt.onselectstart = function(){ return false; } //閉じるボタン if( cls && setCls ){ cls.style.display = ""; } //ウィンドウ幅を取得 getWinSize() //テーブル幅を取得 tblWidth = getDivWidth(flt); tblHeight = getDivHeight(flt); //重なり var zIn; zIn = flt.style.zIndex; if( zIn <= 0 ){ zIn = 999; flt.style.zIndex = zIn; } zIn -= 1; ifm_f.style.zIndex = zIn; //準備 flt.style.display = "none"; flt.style.filter = 'alpha(opacity=100)'; flt.style.MozOpacity = 1; flt.style.opacity = 1; //iframeを準備 resizeDivTo(ifm_f,tblWidth,tblHeight); resizeDivTo(ifm,tblWidth,tblHeight); flt.style.left = -tblWidth; if( Ps ){ var num = Pk -0; switch ( num ){ //左上 case 0: setLeftTop(); break; //左下 case 1: setLeftBottom(); break; //右上 case 2: setRightTop(); break; //右下 case 3: setRightBottom(); break; //中央 case 4: setCenter(); break; // 特殊 case 5: if( Original ) Original(); break; } Py = setY; Px = setX; } flt.style.top = Py + 'px'; flt.style.left = Px + 'px'; ifm.style.top = Py + 'px'; ifm.style.left = Px + 'px'; myKeep(); } var ReSize = 0; function setLeftTop(){ setY = 0; setX = 0; } function setLeftBottom(){ if( moveStop ){ return; } setY = winH - tblHeight; setX = 0; if( Ps ){ if( ReSize ){ Py = setY; Px = setX; }else{ setReSize(); } sLB = setTimeout("setLeftBottom();",300); } } function setRightTop(){ if( moveStop ){ return; } setY = 0; setX = winW - tblWidth; if( Ps ){ if( ReSize ){ Py = setY; Px = setX; }else{ setReSize(); } sRT = setTimeout("setRightTop();",300); } } function setRightBottom(){ if( moveStop ){ return; } setY = winH - tblHeight; setX = winW - tblWidth; if( Ps ){ if( ReSize ){ Py = setY; Px = setX; }else{ setReSize(); } sRB = setTimeout("setRightBottom();",300); } } function setCenter(){ if( moveStop ){ return; } setY = (winH - tblHeight) / 2; setX = (winW - tblWidth) / 2; if( Ps ){ if( ReSize ){ Py = setY; Px = setX; }else{ setReSize(); } sC = setTimeout("setCenter();",300); } } function getWinSize(){ winW = getWindowWidth(); winH = getWindowHeight(); } function setWinReSize(){ if( !setKeep ){ return; } if( flt.style.display == "none" ){ return; } flt.style.display = "none"; ifm.style.display = "none"; flt.style.top = -tblHeight; flt.style.left = -tblWidth; ifm.style.top = -tblHeight; ifm.style.left = -tblWidth; getWinSize(); flt.style.display = ""; ifm.style.display = ""; } function setReSize(){ Py = setY; Px = setX; } function getWindowWidth(){ var w = window, b = document.body, e = document.documentElement, dcM = document.compatMode == "CSS1Compat" && !window.opera; if( window.opera ){ return b.clientWidth; } // opera, netscape を除く標準モードの場合 else if(dcM && !window.opera && e && e.clientWidth ){ return e.clientWidth; } // opera, netscape と、互換モードの場合 else if(b && b.clientHeight && b.clientWidth){ return b.clientWidth; } // その他 else if( w.innerWidth ){ // inner??? と offset??? がある場合 if( e && e.offsetHeight && e.offsetWidth ){ return (w.innerHeight < e.offsetHeight ) ? w.innerWidth - 14 : w.innerWidth; } // inner??? がある場合 else{ return w.innerWidth; } } // どうにもならない場合 else{ return 0; } } function getWindowHeight(){ var w = window, b = document.body, e = document.documentElement, dcM = document.compatMode == "CSS1Compat" && !window.opera; if( window.opera ){ return b.clientHeight; } // opera, netscape を除く標準モードの場合 else if(dcM && !window.opera && e && e.clientHeight ){ return e.clientHeight; } // opera, netscape と、互換モードの場合 else if(b && b.clientHeight && b.clientWidth){ return b.clientHeight; } // その他 else if( w.innerHeight ){ // inner??? と offset??? がある場合 if( e && e.offsetHeight && e.offsetWidth ){ return (w.innerWidth < e.offsetWidth ) ? w.innerHeight - 14 : w.innerHeight; } // inner??? がある場合 else{ return w.innerHeight; } } // どうにもならない場合 else{ return 0; } } function getDivWidth (div){ return document.layers? div.clip.width:(div.offsetWidth||div.style.pixelWidth||0); } function getDivHeight(div){ return document.layers? div.clip.height:(div.offsetHeight||div.style.pixelHeight||0); } function resizeDivTo(div,width,height){ if(document.layers) { // NN4 div.resizeTo(width,height); } // IE5+, Mozilla, Opera 7 else if(typeof div.style.width!="undefined"&& typeof div.style.width=="string"){ div.style.width =width +'px'; div.style.height=height+'px'; } else if(typeof div.style.pixelWidth!="undefined"){ // IE4, Opera 6 div.style.pixelWidth = width; div.style.pixelHeight = height; } } function moveX ( ) { return ( ( document.body.scrollLeft ) ? document.body.scrollLeft : document.documentElement.scrollLeft ) + Px + 'px'; } function moveY ( ) { return ( ( document.body.scrollTop ) ? document.body.scrollTop : document.documentElement.scrollTop ) + Py + 'px'; } //表示位置保持 var Kclatime; var sLB; var sRT; var sRB; var sC; var mEFF; var fdin; function myKeep(){ if( setKeep ){ ifm.style.top = moveY ( ); ifm.style.left = moveX ( ); flt.style.top = moveY ( ); flt.style.left = moveX ( ); } Kclatime = setTimeout ( "myKeep();", 100 ); } //閉じる function myClose(){ flt.style.display = "none"; ifm.style.display = "none"; } function Enable(){ flt.style.display = ''; ifm.style.display = ''; }