function stripeTables() {
  if (document.getElementsByTagName) {
    var tables = document.getElementsByTagName("table");
    for (var i=0; i<tables.length; i++) {
      var rows = tables[i].getElementsByTagName("tr");
      for (var j=0; j<rows.length; j=j+2) {
        rows[j].style.backgroundColor = "#e1e1e1";
      }
    }
  }
}

window.onload = stripeTables;