PDA

View Full Version : page scrolling menu not working in mozilla



benaya
09-13-2007, 11:24 AM
<SCRIPT language=javascript>
function allBlur() {
for (i = 0; i < document.links.length; i++)
document.links[i].onfocus = document.links[i].blur;
}
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
var NS,IE;

function init1(){
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
if(NS || IE) action = window.setInterval('heartBeat1();',1);
}


function heartBeat1() {
if(IE) {
diffY = document.body.scrollTop;
diffX = 0;
}
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.remotelayer1.style.pixelTop += percent;
if(NS) document.remotelayer1.top += percent;
lastScrollY = lastScrollY + percent;
}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.remotelayer1.style.pixelLeft += percent;
if(NS) document.remotelayer1.top += percent;
lastScrollY = lastScrollY + percent;
}
}



-->
</SCRIPT>
<BODY bgColor=#fbf8e8 leftMargin=0 topMargin=0 onload=allBlur();init1();
marginwidth="0" marginheight="0">
<DIV id=remotelayer1
style="Z-INDEX: 1; LEFT: 8px; WIDTH: 995px; POSITION: absolute; TOP: 5px; HEIGHT: 221px">
<DIV style="FLOAT: left"><IMG src="next_files/logo.gif"></DIV>
<DIV style="FLOAT: right"><IMG src="next_files/executive.gif"></DIV></DIV>
</body>


the above code is not working in mozilla but its working in IE.