function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
var eventTimer;	//タイマー変数
var restScroll=0;	//スクロール残量

function Scroll(base,move){

	//移動元(base)要素＆オブジェクトを取得
	var obj_base  = getElemPosition(base);

	//移動先(move)要素＆オブジェクトを取得
	var elem_move = document.getElementById(move);
	var obj_move  = getElemPosition(elem_move);

	restScroll = obj_move.y-obj_base.y;
	eventTimer = setInterval(setScrollPosition,10);
}
function setScrollPosition() {

	var moveValue=0;
	if(Math.abs(restScroll)>80){
		moveValue = (restScroll>0)?30:-30;
	}else{
		moveValue = Math.round(restScroll/4);
	}
	parent.scrollBy(0,moveValue);
	restScroll = (restScroll>0)?restScroll-moveValue:restScroll-moveValue;
	if(moveValue==0){
		clearInterval(eventTimer);
		restScroll=0;
	}
}

function getElemPosition(elem) {
	var obj = new Object();
	obj.x = elem.offsetLeft;
	obj.y = elem.offsetTop;

	while(elem.offsetParent) {
		elem = elem.offsetParent;
		obj.x += elem.offsetLeft;
		obj.y += elem.offsetTop;
	}
	return obj;
}
function dispWindow(url){
	window.open(url, "pop", "width=620,height=620,scrollbars=yes");
}
function dispWindow2(url){
	window.open(url, "pop2", "width=620,height=620,scrollbars=yes");
}