
//TO PAGE TOP------------------------------------------------------

function TOP() {
	var aTagList = document.getElementsByTagName('a');
	for (var i = 0; i < aTagList.length; i++) {
		if (aTagList[i].href.match(/#top/i)) {
			aTagList[i].onclick = goPageTop;
		}
	}
}
var MOVE = 20;
var POSITION;
function goPageTop() {
	var yPos = document.body.scrollTop || document.documentElement.scrollTop;
	mObj(yPos);
	return false;
}
function mObj(y, s) {
	if (s) MOVE = s;
	POSITION = parseInt(y - y * 2 / MOVE);
	scrollTo(0, POSITION);
	if (POSITION > 0) setTimeout('mObj(POSITION, MOVE)', 1);
}
if (window.addEventListener) window.addEventListener('load', TOP, false);
if (window.attachEvent) window.attachEvent('onload', TOP);

