/* ページトップへスクロール */
function backToTop(){
	var scrj = 1;

	if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat"){
		var scdist = document.body.parentNode.scrollTop;
	}
	else{
		var scdist = document.body.scrollTop;
	}

	if(scrj<50 && scdist){
		scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
		scrj++;
		scrollBy(0,-scdist);
		setTimeout("backToTop()",20);
	}
	else{
		scrollTo(0,0);
		scrj = 1;
	}
}


/* アクセス解析タグ */
function acclog(){
	document.write("<img src='/acc/acclog.cgi?");
	document.write("referrer="+document.referrer+"&");
	document.write("width="+screen.width+"&");
	document.write("height="+screen.height+"&");
	document.write("color="+screen.colorDepth+"'>");
}


/* ページ内検索 */
function search(str){
	if(!str)return;
		find = document.body.createTextRange();
	if(!find.findText(str))alert("「"+str+"」はありません");
	while (find.findText(str)){
		find.select();
		if(confirm("次を検索しますか?"))find.collapse(false);
		else break;
	}
}


/* Flash */
function viewSwf(){
	document.write('<object type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="791" height="256" id="top_visual" />\n');
	document.write('<param name="movie" value="swf/top_j.swf" />\n');
	document.write('<param name="loop" value="false" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<embed src="swf/top_j.swf" type="application/x-shockwave-flash" loop="false" quality="high" width="791" height="256" name="top_visual" pluginspage="http://www.macromedia.com/jp/software/ flashplayer/" />\n');
	document.write('</object>\n');
}