IE an Moz count in different ways the childNodes (and the next/previous Sibling as well):
see also:
http://www.codingforums.com/showthread.php?t=109445&highlight=gaps#3
http://www.codingforums.com/showthread.php?t=84797&highlight=gaps#3