// Javascript fix for the google tool bar yellow text fields
if (window.addEventListener) { //DOM method for binding an event
  window.addEventListener("load", setListeners, false)
} else if (window.attachEvent) { //IE exclusive method for binding an event
  window.attachEvent)("onload", setListeners)
} else if (document.getElementById) { //support older modern browsers
  window.onload=setListeners
}  

function setListeners(){
  inputList = document.getElementsByTagName("INPUT"); 
  for(i=0;i<inputList.length;i++){
    if (window.addEventListener) { //DOM method for binding an event
      inputList[i].addEventListener("onpropertychange",restoreStyles, false);
      inputList[i].style.backgroundColor = "";
    } else if (window.attachEvent) { //IE exclusive method for binding an event
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }  
  }
  selectList = document.getElementsByTagName("SELECT");
  for(i=0;i<selectList.length;i++){
    if (window.addEventListener) { //DOM method for binding an event
      selectList[i].addEventListener("onpropertychange",restoreStyles, false);
      selectList[i].style.backgroundColor = "";
    } else if (window.attachEvent) { //IE exclusive method for binding an event
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }
}

function restoreStyles(){
  if(event.srcElement.style.backgroundColor != ""){
    event.srcElement.style.backgroundColor = "";
  }
}
//-->
