I\'m currently writing an accordion and running into the same problem as described in nextSibling difference between IE and FF? - specifically differences between Microsoft\
Firefox nextSibling returns whitespace \n while Internet Explorer does not.
Before nextElementSibling was introduced, we had to do something like this:
var element2 = document.getElementById("xxx").nextSibling; while (element2.nodeType !=1) { element2 = element2.nextSibling; }