var tar;var mw = 982;var iniH = 1198;function iniFlashSize(){	tar = document.getElementById("flash");	checkWin();	tar.style.height = iniH + "px";}function setTimer(){	var _timer = setTimeout("checkWin()", 100);}function checkWin(){	var size = getWinsize();	tar.style.width = (size.w > mw)? "100%": mw + "px";	setTimer();}function getWinsize(){	var _obj = new Object();	if(window.innerHeight){		_obj.w = window.innerWidth;		_obj.h = window.innerHeight;	}else if (document.all && document.getElementById && (document.compatMode=='CSS1Compat')) {		_obj.w = window.clientWidth;		_obj.h = document.documentElement.clientHeight;	}else if(document.body.clientHeight){		_obj.w = document.body.clientWidth;		_obj.h = document.body.clientHeight;	}else{		_obj.w = 0;		_obj.h = 0;	}	return _obj;}// 高さの変更function changeHeight(h) {	tar.style.height = h + "px";//	alert(h)}function changeBackColor(color){//	so.addParam("bgcolor", "#FFFFFF");
	
}

var scInterval = 20;
var scTargetY = 200;
var scPrevY = null;

// 定位置までスクロール
function scrolling(y) {
	scTargetY = y;
	scrollLoop();
}

function scrollLoop(){
	var currentY = document.body.scrollTop;
	var vy = (scTargetY - currentY) / 5;
	var nextY = currentY + vy;
	if((Math.abs(vy) < 0.5) || ( scPrevY == currentY)){	// 目標座標付近に到達していたら終了
		scrollTo(0, scTargetY);
		scPrevY = null;
		return;
	}else{
		// 繰り返し
		scrollTo(0, parseInt(nextY));
		scPrevY = currentY;
		setTimeout(function(){scrollLoop()},scInterval);
	}
}

function getWinH(){
	var o = getWinsize();
	return o.h;
}

function getScrollY(){
	return document.body.scrollTop;
}
