isDOM = ( (parseInt(navigator.appVersion) >= 5) || (navigator.appVersion.indexOf("MSIE 5") != -1) ) ? 1 : 0; isNS4 = (document.layers) ? 1 : 0; isIE4 = (document.all) ? 1 : 0; function checkBrowserVersion(){ var x = navigator.appVersion; y = x.substring(0,4); if (y>=4) setVariables(),checkLocation(); } function setVariables() { if (isNS4) { 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"; } innerX = eval(iW) - 110; // change the distance from the side of the window innerY = eval(iH) - 85; // change the distance from the bottom of the window object = "toparrow"; checkLocationA(); } movex = 0; movey = 0; xdiff = 0; ydiff = 0; ystart = 0; xstart = 0; function checkLocation() { 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; eval(dS + object + sD + v + (ystart + innerY)); eval(dS + object + sD + h + (xstart + innerX)); setTimeout("checkLocation()", 5); } function checkLocationA() { ystart = eval(y); xstart=eval(x); }