
	var isDOM = (document.getElementById ? true : false); 
	var isIE4 = ((document.all && !isDOM) ? true : false);
	var isNS4 = (document.layers ? true : false);
	var isNS = navigator.appName == "Netscape";

	function getRef(id) {
		if (isDOM) return document.getElementById(id);
		if (isIE4) return document.all[id];
		if (isNS4) return document.layers[id];
	}

	function getSty(id) {
		x = getRef(id);
		return (isNS4 ? getRef(id) : getRef(id).style);
	}

	function moveRightEdge() {
		var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

		if (isNS4) {
			yMenuFrom   = btn_top.top;    
			yMenuTo     = windows.pageYOffset + 400;   
		} else if (isDOM) {
			yMenuFrom   = parseInt (btn_top.style.top, 10);
			yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) + 400; 
		}
		timeoutNextCheck = 500;

		if (yMenuFrom != yMenuTo) {
			yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
			if (yMenuTo < yMenuFrom)
				yOffset = -yOffset;
			if (isNS4)
				btn_top.top += yOffset;
			else if (isDOM)
				btn_top.style.top = parseInt (btn_top.style.top, 10) + yOffset;
				timeoutNextCheck = 10;
		}
		setTimeout ("moveRightEdge()", timeoutNextCheck);
	}
	
	
