document.write("<div id='rightcont'>");
document.write("\
<div id='Topgo' style='position:absolute; top:"+rightcont.offsetHeight+215+"; text-align:right; width:850px; height:21; z-index:1;visibility:visible;'><a href='javascript:ScrollTop();'><img src='/eng/img/common/btn_top.gif'></a></div>\
");
document.write("</div>");
//-----따라다니는 탑버튼 

var stmnBASE = rightcont.offsetHeight+215;
var stmnGAP = 400;
var stmnTop = rightcont.offsetHeight+215;
var stmnLeft;
var stmnBTTM = 150;
var stmnActivateSpeed = 2;
var stmnScrollSpeed = 2;
var stmnTimer;
var bMove = 1;

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

function InitializeTopgo() {
//	if ( document.body.scrollHeight < 1000 ) return;
	Topgo.style.display = "inline";
	Topgo.style.top = stmnBASE;
	RefreshTopgo();
	if(NonL_BODYCONT.offsetHeight<rightcont.offsetHeight+200) NonL_BODYCONT.style.height = rightcont.offsetHeight+180;//컨텐츠 height 사이즈 조절
}

function RefreshTopgo() {
	stmnBASE = rightcont.offsetHeight+10;
	topNum = Topgo.style.top
	topNum = topNum.replace('px','')
	//-----pull up 버튼이 bottom Background에 내려오지 않게 컨텐츠 height 사이즈 조절
	if ((rightcont.offsetHeight+10)>parseInt(topNum)){
		Topgo.style.top = rightcont.offsetHeight+10;
		stmnTop = rightcont.offsetHeight+10;
	}
	if(NonL_BODYCONT.offsetHeight<rightcont.offsetHeight+100) NonL_BODYCONT.style.height = rightcont.offsetHeight+100;

	//-----스크린 사이즈가 작을경우 스크롤생겼을때의 컨텐츠 width값조절
	if(document.body.clientWidth < 995){
//		document.getElementById("toparea").style.width = 995;
		document.getElementById("NonL_BODYCONT").style.width = 550;
	}else{
//		document.getElementById("toparea").style.width = 100+"%";
		document.getElementById("NonL_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);
}
//-----따라다니는 탑버튼 

