this is a guess, but i think you can replace
Code:
function getMouseXY(e)
{
if (IE)
{
// grab the x-y pos.s if browser is IE
tempX = event.clientX + document.body.scrollLeft
tempY = event.clientY + document.body.scrollTop
}
else
{
// grab the x-y pos.s if browser is NS
tempX = e.pageX
tempY = e.pageY
}
// catch possible negative values in NS4
if (tempX < 0){tempX = 0}
if (tempY < 0){tempY = 0}
moveDiv(tempX);
return true
}
function moveDiv(tempX)
{
for (var i=0;i<objectArray.length;i++)
{
var yourDivPositionX = objectArray[i][3] * (0.5 * windowWidth - tempX) + objectArray[i][1];
objectArray[i][0].style.left = yourDivPositionX + 'px';
}
}
with
Code:
var pos=0;
if (IE){
var getMouseXY=function xy(e){
// grab the x-y pos.s if browser is IE
tempX = event.clientX + document.body.scrollLeft
// catch possible negative values in NS4
if (tempX < 0){tempX = 0}
pos=tempX;
return true
}//end xy() ie
}else{
var getMouseXY=function (e){
// grab the x-y pos.s if browser is NS
tempX = e.pageX
// catch possible negative values in NS4
if (tempX < 0){tempX = 0}
pos= tempX;
}//end xy() ns
}
function moveDiv(){
var tempX=pos;
for (var i=0;i<objectArray.length;i++)
{
var yourDivPositionX = objectArray[i][3] * (0.5 * windowWidth - tempX) + objectArray[i][1];
objectArray[i][0].style.left = yourDivPositionX + 'px';
}
}
setInterval(moveDiv, 100);
but move the new code the top-ish part of the file, so that
getMouseXY() is defined after
IE and just before before calling:
Code:
// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;
breaking up the IE and W3 code will drastically lower the CPU usage, resulting in a smoother animation. play with the 100 to adjust the timing.
i don't know how to help you show/hide certain images at certain points....