function windowonlod(){
  toThisTopLinkAdd();
}

function toThisTopLinkAdd(){
	if (document.getElementById) {
		var linkElms = document.getElementsByTagName('a');
		for(i = 0; i < linkElms.length; i++){
			if(linkElms[i].href.match(/#WRAPPER$/)){
				linkElms[i].onclick = function(){toThisTop(); return false;}
			}
		}
	}
}
function toThisTop() {
	var x1 = x2 = x3 = 0;
	var y1 = y2 = y3 = 0;
	if (document.documentElement) {
		x1 = document.documentElement.scrollLeft || 0;
		y1 = document.documentElement.scrollTop || 0;
	}else if (document.body) {
		x2 = document.body.scrollLeft || 0;
		y2 = document.body.scrollTop || 0;
	}
	x3 = window.scrollX || 0;
	y3 = window.scrollY || 0;
	var x = Math.max(x1, Math.max(x2, x3));
	var y = Math.max(y1, Math.max(y2, y3));
	window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
	if (x > 0 || y > 0) {
		window.setTimeout("toThisTop()", 20);
	}
}

function topicsimg(){
	var topicsElm = document.getElementById("tokuban");
	topicsElm.onmouseover = function(){
		clearInterval(topicsImgTimerID);
	}
	topicsElm.onmouseout = function(){
		topicsImgTimerID = setInterval('topicsimgchange()',3000);
	}
	//topicsimgchangnum = 0;

	topicsimgchanghtml = new Array(
		'<img src="img/artist/alfred.jpg" alt="アーティスト：ALFRED" width="280" height="240" />',
		'<img src="img/artist/overthedogs.jpg" alt="アーティスト：OverTheDogs" width="280" height="240" />',
		'<img src="img/artist/oz.jpg" alt="アーティスト：オズ" width="280" height="240" />',
		'<img src="img/artist/onmtp.jpg" alt="アーティスト：オノマトペ" width="280" height="240" />',
		'<img src="img/artist/orange_pekoe.jpg" alt="アーティスト：orange pekoe" width="280" height="240" />',
		'<img src="img/artist/colorbottle.jpg" alt="アーティスト：カラーボトル" width="280" height="240" />',
		'<img src="img/artist/senri_kawaguchi-.jpg" alt="アーティスト：川口千里" width="280" height="240" />',
		'<img src="img/artist/kimitomocandy.jpg" alt="アーティスト：きみともキャンディ" width="280" height="240" />',
		'<img src="img/artist/kumagai193.jpg" alt="アーティスト：熊谷育美" width="280" height="240" />',
		'<img src="img/artist/chicago_poodle.jpg" alt="アーティスト：Chicago Poodle" width="280" height="240" />',
		'<img src="img/artist/jamosa.jpg" alt="アーティスト：JAMOSA" width="280" height="240" />',
		'<img src="img/artist/dienoji.jpg" alt="アーティスト：ダイノジ" width="280" height="240" />',
		'<img src="img/artist/tee.jpg" alt="アーティスト：TEE" width="280" height="240" />',
		'<img src="img/artist/norange.jpg" alt="アーティスト：NORANGE" width="280" height="240" />',
		'<img src="img/artist/nikiie.jpg" alt="アーティスト：NIKIIE" width="280" height="240" />',
		'<img src="img/artist/nipporihito.jpg" alt="アーティスト：ニッポ・リヒト" width="280" height="240" />',
		'<img src="img/artist/himekyun.jpg" alt="アーティスト：ひめキュンフルーツ缶" width="280" height="240" />',
		'<img src="img/artist/paige.jpg" alt="アーティスト：PAIGE" width="280" height="240" />',
		'<img src="img/artist/mido_shin.jpg" alt="アーティスト：ミドリカワ書房" width="280" height="240" />',
		'<img src="img/artist/yuke.jpg" alt="アーティスト：ユケ" width="280" height="240" />',
		'<img src="img/artist/lunkhead.jpg" alt="アーティスト：LUNKHEAD" width="280" height="240" />',
		'<img src="img/artist/yui_watanabe.jpg" alt="アーティスト：渡部優衣" width="280" height="240" />',
		'<img src="img/artist/nn_dura.jpg" alt="アーティスト：NN〜DURA" width="280" height="240" />'
			);
	//topicsimgchangnum = Math.floor(Math.random()*(topicsimgchanghtml.length));
	topicsimgchangnum = 0;
	//topicsimgchange();
	topicsImgTimerID = setInterval('topicsimgchange()',3000);
}
function topicsimgchange(){
	topicsimgchangnum ++;
	var num = topicsimgchangnum % topicsimgchanghtml.length;
	document.getElementById("tokuban").innerHTML = topicsimgchanghtml[num];
}

