function pageScrollToTop(){
	var speed1 = 2;
	var speed2 = 5;
	var sec = 20;
	var y;
	var cy;
	var gy = 0;
	var scrollEngine;
	if(document.all){
		cy = document.body.scrollTop;
	}
	else if(document.layers || document.getElementById){
		cy = pageYOffset;
	}
	y = cy-gy;
	if(Math.abs(y)>50){
		cy = Math.round(cy-(y/speed1));
		window.scroll(0,cy);
		scrollEngine = setTimeout("pageScrollToTop()",sec);	
	}else if(Math.abs(y)>2){
		cy = Math.round(cy-(y/speed2));
		window.scroll(0,cy);
		scrollEngine = setTimeout("pageScrollToTop()",sec);	
	}else{
		window.scroll(0,0);
		clearTimeout(scrollEngine);
	}
}

function openDetail(wUrl,wWidth,wHeight){
	wWidth = 640;
	wHeight = 600;
	scWidthCenter = screen.availWidth / 2;
	scHeightCenter = screen.availHeight / 2;
	wOption =
	"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + wWidth + ",height=" + wHeight + ",left=" + (scWidthCenter - (wWidth / 2)) + ",top=" + (scHeightCenter - (wHeight / 2));

	detailwin = window.open(wUrl,"detail",wOption);
	detailwin.window.focus();
}
