document.write("<div id='rightcont'>");
document.write("\
<div id='Topgo' style='position:absolute; top:"+rightcont.offsetHeight+50+"; text-align:right; width:865px; height:21; z-index:1;visibility:visible;'><table border='0' cellspacing='0' cellpadding='0'><tr><td><a href='javascript:ScrollTop();'><img src='top_nav/logo.gif' width='62' height='38' border='0'/></a></td></tr><tr><td width='62' align='center'><a href='../index.htm'target='_parent'><img src='top_nav/eng/top_01.gif' name='Image2' width='62' height='16' border='0' id='Image' /></a></td></tr><tr><td width='62' align='center'><a href='../JP/index.htm'target='_parent'><img src='top_nav/eng/top_02.gif' name='Image2' width='62' height='16' border='0' id='Image2' /></a></td></tr><tr><td width='62' align='center'><a href='copyright.htm'><img src='top_nav/eng/top_03.gif' name='Image3' width='62' height='16' border='0' id='Image3'/></a></td></tr><tr><td width='62' align='center'><a href='links.htm'><img src='top_nav/eng/top_04.gif' name='Image4' width='62' height='16' border='0' id='Image4' /></a></td></tr><tr><td width='62' align='center'><a href='contactus.htm' target='_parent'><img src='top_nav/eng/top_05.gif' name='Image5' width='62' height='16' border='0' id='Image5' /></a></td></tr></table></div>\
");
document.write("</div>");

var stmnBASE = rightcont.offsetHeight+50;
var stmnGAP = 550;
var stmnTop = rightcont.offsetHeight;
var stmnLeft;
var stmnBTTM = 50;
var stmnActivateSpeed = 2;
var stmnScrollSpeed = 2;
var stmnTimer;
var bMove = 1;


// 0.5 sec after action
setTimeout("InitializeTopgo();",10);

function InitializeTopgo() {
//	if ( document.body.scrollHeight < 1000 ) return;
	Topgo.style.display = "inline";
	Topgo.style.top = stmnBASE;
	RefreshTopgo();
	if(BODYCONT.offsetHeight<rightcont.offsetHeight) BODYCONT.style.height = rightcont.offsetHeight;
}


function RefreshTopgo() {
	stmnBASE = rightcont.offsetHeight+10;

	topNum = Topgo.style.top
	topNum = topNum.replace('px','')

	if ((rightcont.offsetHeight+10)>parseInt(topNum)){
		Topgo.style.top = rightcont.offsetHeight+10;
		stmnTop = rightcont.offsetHeight+10;
	}
	if(BODYCONT.offsetHeight<rightcont.offsetHeight+5) BODYCONT.style.height = rightcont.offsetHeight+5;


	if(document.body.clientWidth < 760){
//		document.getElementById("toparea").style.width = 995;
		document.getElementById("BODYCONT").style.width = 760;
	}else{
//		document.getElementById("toparea").style.width = 100+"%";
		document.getElementById("BODYCONT").style.width = 100+"%";
	}

	if (!bMove) return

	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
	stmnStartPoint = parseInt(Topgo.style.top, 10);
	stmnEndPoint = document.body.scrollTop + stmnGAP;

	if (stmnEndPoint < stmnBASE) stmnEndPoint = stmnBASE;
	stmnRefreshTimer = stmnActivateSpeed;
	if ( stmnStartPoint != stmnEndPoint && stmnEndPoint <= (document.body.scrollHeight - stmnBTTM) ) {
		stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
		Topgo.style.top = parseInt(Topgo.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
		stmnRefreshTimer = stmnScrollSpeed;
	}
	stmnTimer = setTimeout ("RefreshTopgo();", stmnRefreshTimer);
}


function ScrollTop(){
	self.window.scroll(0,0);
}
