function addOverHandlers(root) {
  for (var i = 0; i < root.length; i++) {
    var node = root[i];
    if (node.className == "buttonBase") {
      node.onmouseover = function() {
        this.className += " over";
      }
      node.onmouseout = function() {
        this.className = this.className.replace(" over", "");
      }
    }
  }
}

window.onload = function() {
  if (document.all && document.getElementById) {
    addOverHandlers(document.getElementsByTagName("input"));
  }
}
