activateMenu = function(nav) {
    var navroot = document.getElementById(nav);
    var lis = navroot.getElementsByTagName("LI");
    for (i=0 ; i < lis.length ; i++) {
        if (lis[i].lastChild.tagName == "UL") {
            lis[i].onmouseover = function() {
                this.className += " over";
            }
            lis[i].onmouseout=function() {
                this.className = this.className.replace(" over", "");
            }
        }
    }
}
window.onload= function() {
    /* Ho carrego aquí, però potser s'hauria de fer des de la pàgina html, sinó no serà tan reutilitzable. En tot cas no oblidar els IE conditional comments */
    activateMenu('mainNav');
}

