/****************************************************************************************************
	ロールオーバー
****************************************************************************************************/

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);
}


function pageTopScroll() {
var scrj = 1;
var scdist = document.body.parentNode.scrollTop;
if(scrj<50 && scdist) {
scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
scrj++;
scrollBy(0,-scdist);
setTimeout("pageTopScroll()",20);
} else {
scrollTo(0,0);
scrj = 1;
}
}

/****************************************************************************************************
	ページトップ
****************************************************************************************************/
function pageTopScroll() {
var scrj = 1;
var scdist = document.body.parentNode.scrollTop;
if(scrj<50 && scdist) {
scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
scrj++;
scrollBy(0,-scdist);
setTimeout("pageTopScroll()",20);
} else {
scrollTo(0,0);
scrj = 1;
}
}
/****************************************************************************************************
	new window
****************************************************************************************************/
function subWin1(url){
	sw1=window.open(url,"window1","width=540,height=650,scrollbars=0,status=0,resizable=0");
	if(navigator.appName.charAt(0) == "N" && navigator.appVersion.charAt(0) >= 3){
	sw1.focus();
	}
}