function InitializeCustomAttributes() {
    var oElements = document.getElementsByTagName("*");
    for (var i = 0; i<oElements.length; i++) {
        var oElement = oElements[i];
        
        if (oElement.getAttribute("altclass") != null) {
            oElement.setAttribute("firstclass", oElement.className);

            oElement.onmouseover = function (oEvent) { SwapClass(this, "over"); };
            oElement.onmouseout = function (oEvent) { SwapClass(this, "out"); };
        }
    }
}

function SwapClass(oElement, action) {
    switch(action) {
        case "over":
            oElement.className = oElement.getAttribute("altclass");
            break;
        case "out":
            oElement.className = oElement.getAttribute("firstclass");
            break;
    }
}
