If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

The menulen variable is global because it has no var keyword when declared. So when a link is mouseovered, it gets the value of the global variable.

for (var menulen=0; menulen<menu.length; menulen++)

It's better to use the menulen<menu.length than menulen!=menu.length.
Using your original conditional operator !=, there is a chance that you would have an endless loop if inside the loop, you accidentally set the iterator variable menulen to a value greater than the menu length.

While I think the tone of some of these responses is condescending (hemebond, that's directed at you -- you could have said it a little more kindly, or not said it at all), that doesn't warrant your language here mrtanooki. If you have a problem with someone's response, handle it with the appropriate language -- this forum is used by all ages, and if that language gets found on here, codingforums will be blocked for all types of users -- meaning, your careless remark can potentially ruin the chances of other younger members getting their questions answered.

In short, if you can't respond in a mature manner, than one of us will be happy to do that for you, otherwise, let it go, or learn a new method of communciation.