javascript floatmenu

Joined
Oct 13, 2001
Messages
977
I need some help with javascript. I'm trying to make a floating toolbar but am having a problem with the sidemenu command. I get the error: sidemenu.style is null or not an object. What's wrong??

Here's the code I'm using:

<script language = "javascript">
<!--



var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0


if(ie){var sidemenu = document.all.floatmenu;}
if(ns){var sidemenu = document.floatmenu;}


if(!ie){sidemenu.visibility = "hidden"}


function FixY(){
if(ie){sidemenu.style.top = document.body.scrollTop+10}
if(ns){sidemenu.top = window.pageYOffset+10}
}


setInterval("FixY()",100);

//-->
</script>

What's the problem??
Thanks,

BFL :sheep:
 
Back
Top Bottom