function stripeTablesByClassName(){
    var tables = document.getElementsByClassName("striped");
    for (i=0; i<tables.length; i++) {
        var odd=false;
        var rows = tables[i].getElementsByTagName("tr");
        for(j=0; j<rows.length; j++){
            rows[j].onmouseover = function(){
                this.style.backgroundColor = "#FFB200";
            }
            if (odd == true){
                rows[j].style.backgroundColor = "#ffc";
                odd = false;
                rows[j].onmouseout = function(){
                    this.style.backgroundColor =  "#ffc";
                }
            } else {
                odd = true;
                rows[j].onmouseout = function(){
                    this.style.backgroundColor =  "#fff";
                }
            }
        }
    }
}

function stripeAllTables(){
    if (!document.getElementsByTagName) return false;
    var tables = document.getElementsByTagName("table");
    for (i=0; i<tables.length; i++) {
        var odd=false;
        var rows = tables[i].getElementsByTagName("tr");
        for(j=0; j<rows.length; j++){
            rows[j].onmouseover = function(){
                this.style.backgroundColor = "#ccc";
            }
            if (odd == true){
                rows[j].style.backgroundColor = "#ffc";
                odd = false;
                rows[j].onmouseout = function(){
                    this.style.backgroundColor =  "#ffc";
                }
            } else {
                odd = true;
                rows[j].onmouseout = function(){
                    this.style.backgroundColor =  "#fff";
                }
            }
        }
    }
}

addLoadEvent(stripeTablesByClassName);
//addEvent(window,'load',stripeTablesByClassName);
//addEvent(window,'load',stripeAllTables);