See this link:
http://chowsreview.takeforce.net/rev/menu.php?vid=6
In works perfect in Firefox, but when you open it in IE...

The principle is based on changing CSS-class of the item group. I use Yahoo library for changing class and it works well everywhere. The thing I am stuck with is the following code:
Code JavaScript:
switch (sectionEl.className)
        {
            case "sectionExpanded":
                    oldClass = "sectionExpanded";
                    newClass = "sectionCollapsed";
                    break;
            case "sectionCollapsed":
                    oldClass = "sectionCollapsed";
                    newClass = "sectionExpanded";
                    break;
            case "subSectionExpanded":
                    oldClass = "subSectionExpanded";
                    newClass = "subSectionCollapsed";
                    break;
            case "subSectionCollapsed":
                    oldClass = "subSectionCollapsed";
                    newClass = "subSectionExpanded";
                    break;
        }
What happens. Script is loaded, everything is OK. User clicks some control, it identifies which section we are working with (sectionEl element) Then depending on the currect class we detect, which class to set. This works well for the frst time. I click the group, it collapses or expands - ok. When I click it next time, className is OK (when I alert() it), but it doesn't fit any condition.

Situation is stupid:
Code JavaScript:
alert(sectionEl.className)
outputs (for instance):
sectionExpanded
but after this switch(), newClass is undefined

But in FireFox it works well. What am I doing wrong?

I even tried to change switch() to if():
Code JavaScript:
alert(sectionEl.className);
        alert(typeof sectionEl.className);
        oldClass = sectionEl.className;
        if (oldClass == "sectionExpanded")
        {
            newClass = "sectionCollapsed";
        }
        if (oldClass == "sectionCollapsed")
        {
            newClass = "sectionExpanded";
        }
        if (oldClass == "subSectionExpanded")
        {
            newClass = "subSectionCollapsed";
        }
        if (oldClass == "subSectionCollapsed")
        {
            newClass = "subSectionExpanded";
        }
        alert("old class: "+oldClass);
        alert("new class: "+newClass);
        YAHOO.util.Dom.replaceClass(sectionEl, oldClass, newClass);
        alert("result class: "+sectionEl.className);
But it does the same. Works well for the first time. I checked type of the className - it's OK, it is string. It is compared to the string, but why comparison fails??? It fails in a strange way - first time it's OK, and next - fails.

Any ideas?

Thanks beforehand!

PS. Is there any good debugger for IE like FireBug for FF?