function zIndexWorkaround()
{
    // If the browser is IE,
    if(isIE())
    {
        /*
        ** For each div with class menu (i.e.,
        ** the thing we want to be on top),
        */
        $$("div.assistext").each(function(menu) {
            // For each of its ancestors,
            menu.ancestors().each(function (a) {
                var pos = a.getStyle("position");
 
                // If it's positioned,
                if(pos == "relative" ||
                   pos == "absolute" ||
                   pos == "fixed")
                {
                    /*
                    ** Add the "on-top" class name when the
                    ** mouse is hovering over it,
                    */
                    Event.observe(a, "mouseover", function() {
                        a.addClassName("on-top");
                    });
                    // And remove it when the mouse leaves.
                    Event.observe(a, "mouseout", function() {
                        a.removeClassName("on-top");
                    });
                }
            });
        });
    }
}


function isIE()
{
    if(navigator.userAgent.match(/MSIE \d\.\d+/))
        return true;
    return false;
}


