>I'm supporting IE only and as such I'll give your second script a try. This is much easier to understand. As I said before, I don't know much about Javascript and my previous "complicated" code worked ok at the time:)
Note that this will only work for 5 and 6. With IE 4, I believe that is not supported.