
// general handlers to turn on mouseovers for form input buttons

// this only will work if the elements only have the target CSS classes of btn200 or btn
function initButtons() {
  var fElts = document.getElementsByTagName("input");
  for (var i=0; i<fElts.length; i++) {
    switch (fElts[i].className) {
      case "btn200":
      case "btn":
        fElts[i].onmouseover=btnOver;
        fElts[i].onmouseout=btnOut;
        break;
    }
  }
}

function btnOver() {
  switch (this.className) {
    case "btn200":
      this.style.backgroundPosition = "-211px 0";
      this.style.color = "#999999";
      break;
    case "btn":
      this.style.backgroundPosition = "-141px 0";
      this.style.color = "#999999";
      break;
  }
}

function btnOut() {
  this.style.backgroundPosition = "0 0";
  this.style.color = "#FFFFFF";
}


window.addEventListener?window.addEventListener("load",initButtons,false):window.attachEvent("onload",initButtons);

