<!--
//コントロールしたいレイヤーのタグ内に　id="L1"　がないと連動しません。
//ホームページ作成ソフトでは、たいてい　id="layer1"　などとなっていますので、" "内の書き換えが必要です。

function idou() {
	setInterval('w_s2()',5)
	}
	window.onload = idou

function w_s2() {
//--レイヤーサイズ取得--------------------------------
//自動取得　ここから
/*
var c2
var c22
var c
var d2
var d22
var d

if(navigator.appName.charAt(0) =="N" && navigator.appVersion.charAt(0) ==4){ //NNver4用　IE5.0で、"layers"を読むとエラーが発生するため
			c2 = document.layers["L1"].width ;
			c22 = c2.indexOf('p') ;
			c = parseInt(c2.substring(0,c22));
			d2 = document.layers["L1"].height ;
			d22 = d2.indexOf('p') ;
			d = parseInt(d2.substring(0,d22));
			}
	else if(document.all){ //IE4用
			c2 = document.all('L1').style.width ;
			c22 = c2.indexOf('p') ;
			c = parseInt(c2.substring(0,c22));
			d2 = document.all('L1').style.height ;
			d22 = d2.indexOf('p') ;
			d = parseInt(d2.substring(0,d22));
			}
	else if(document.getElementById){ //NN6,IE5用
			c2 = document.getElementById('L1').style.width ;	
			c22 = c2.indexOf('p') ;
			c = parseInt(c2.substring(0,c22));
			
			d2= document.getElementById('L1').style.height ;
			d22 = d2.indexOf('p') ;
			d = parseInt(d2.substring(0,d22));
			}
//自動取得　ここまで
*/

//固定入力設定　ここから

	var c = 187 ; //レイヤーの幅
	var d = 330//354 ; //レイヤーの高さ

//固定入力設定　ここまで

//---レイヤーサイズ取得ここまで------------------------------------------------------
	var a 
	var b 
	var a2
	var a22 
	var b22 
	var aa
	var bb
if(document.all){//IE
	 a = document.body.clientWidth
	 b = document.body.clientHeight
	 aa = document.body.scrollLeft
	 bb = document.body.scrollTop
	}
else if(document.layers || document.getElementById){//NN
	 a = window.innerWidth
	 b = window.innerHeight
	 aa = window.pageXOffset
	 bb = window.pageYOffset
	}
//横位置
		 a22 = 0 //横デフォルト位置
			 aa = 0 //はみ出し時の不動設定
//上位置
	 b22 = 115 ; //上デフォルト位置

	if(b<=d){
		bb = 0 ; //はみ出し時の不動設定
		}
		else if(bb<=b22){//上デフォルト位置の含み分移動
			b22 = b22-bb
			}
		else if(bb>b22){
			b22 = 0
			}
		
		
//レイヤー移動
if(navigator.appName.charAt(0) =="N" && navigator.appVersion.charAt(0) ==4){ //NNver4用　IE5.0で、"layers"を読むとエラーが発生するため
			var A = a22 + aa + 8
			var B = b22 + bb + 8
			document.layers["L1"].moveTo(A,B)
			}
	else if(document.all){ //IE4用
			document.all('L1').style.posLeft = a22 + aa ;
			document.all('L1').style.posTop = b22 + bb;
			}
	else if(document.getElementById){ //NN6,IE5用
			document.getElementById('L1').style.left = a22 + aa ;	
			document.getElementById('L1').style.top = b22 + bb	}
}
//-------------------------●for Netscape4
function NcReload(){window.document.location.reload()}
if(document.layers) window.onresize = NcReload
//-->

//以下の行の削除を禁ず------------------------------------------------------
//move-layer-L ver1.1
//制作：加藤　丈雄(FIVE CRAFT)
//--------------------------------------------------------------------------