﻿/* Date: 08/09/2010 */
/* Filename: dropmenu.js */
/* Description: Because IE6 doesn't support the ':hover' psudo-class, we have to
 *             add a javascript implementation of this.
 */

startList = function () {
    if (!(window.XMLHttpRequest)) { //for older browsers           
        
        navRoot = document.getElementById("nav");

        for (i = 0; i < navRoot.childNodes.length; i++) {
            node = navRoot.childNodes[i];

            if (node.nodeName == "LI") {
                /* Add mouse over and mouseout events */
                node.onmouseover = function () {
                    this.className += " over";                    
                }

                node.onmouseout = function () {
                    this.className = this.className.replace(" over", "");
                }
            }
        }
    }
}
window.onload = startList;
