This is a _very_ dangerous example. The var i used in the for-loop is a global. If count() is called within a for-loop with var i itself, the inner usage of i will overwrite the "outer i". You should...
Javascript Guru Douglas Crockford says, you should prefer the dot-notation. The other notation requires a little more work on the js-engines as there is always a new string to handle with...
Interesting problem. I think, this is feature of Firefox to prevent your browsing-history being spammed with advertising content addresses. But this is only a guess.
Fetch the <body>-element (e.g. with document.getElementById()), or better to a deeper encapsulating element, and then go recursive through any child of the dom that fits to your choice and look out...
The standard error messages of the ie are really bad. Do you know the development tools of the IE8? There you have a debugger that is very similar to Firebug and can be used for IE7 purposes as well,...
The warning says that there it is not an array that you are trying to walk through with foreach. You should ensure that you have the right datatype being used in your vars or the superglobals.
mootools is a fine, lightweight javascript framework, but it is quite bad to use with other frameworks. imho you should bet on a bigger fw that covers all your needs. unfortunately it is a downside...
Take a look at YUI, the YAHOO User Interface. It has several datamanagement components and a comfortable, but simple to learn AJAX-component. You will find everything you need there.