function setVariables() {
	if (navigator.appName == "Netscape") {
		v = ".top=";
		h = ".left=";
		dS = "document.";
		sD = "";
		y = "window.pageYOffset";
		x = "window.pageXOffset";
		iW = "window.innerWidth";
		iH = "window.innerHeight";
	}else{
		h = ".pixelLeft=";
		v = ".pixelTop=";
		dS = "";
		sD = ".style";
		y = "document.body.scrollTop";
		x = "document.body.scrollLeft";
		iW = "document.body.clientWidth";
		iH = "document.body.clientHeight";
	}
	object = "topButton";
	checkLocationA();
}

movex = 0;
movey = 0;
xdiff = 0;
ydiff = 0;
ystart = 0;
xstart = 0;

function checkLocation() {
	if (screen.width > 800) 
		{
			var showwidth = (860);
			var showht = (233);
		}
	else
		{
			var showwidth = (746);
			var showht = (addposition);
		}
	yy = eval(y);
	xx = eval(x);
	ydiff = ystart - yy;
	xdiff = xstart - xx;
	if ((ydiff < (-1)) || (ydiff > (1))) movey = Math.round(ydiff / 10), ystart -= movey;
	if ((xdiff < (-1)) || (xdiff > (1))) movex = Math.round(xdiff / 10), xstart -= movex;
	if (document.all) {
		document.all.topButton.style.pixelTop = (ystart + (eval(iH) - showht));
		document.all.topButton.style.pixelLeft = showwidth ;
	}
	else if (document.layers) {
		document.topButton.Top = (ystart + (eval(iH) - showht));
		document.topButton.left = showwidth ;
	}
	else if (document.getElementById) {
		document.getElementById('topButton').style.top = (ystart + (eval(iH) - showht)) + 'px';
		document.getElementById('topButton').style.left = showwidth  + 'px';
	}
	setTimeout("checkLocation()", 2);
}
function checkLocationA() {
	ystart = eval(y);
	xstart=eval(x);
	addposition = AnchorPosition_getPageOffsetTop(document.getElementById('topadd'));	
	//alert(addposition);
}
function AnchorPosition_getPageOffsetTop (el) 
	{
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}

