// JavaScript Document
// Script per consentire il :Focus dei campi del form in IE

window.onload=function(){
if(document.getElementsByTagName)
    Focus();
}

function Focus(){
var inp=document.getElementsByTagName("input");
var inp2=document.getElementsByTagName("textarea");
for(i=0;i<inp.length;i++){
  if(inp[i].type!='reset' && inp[i].type!='button' && inp[i].type!='submit'){ // esclude i pulsanti
    inp[i].onfocus=function(){this.style.backgroundColor="#ECE6F9"; this.style.borderColor="#333"};
    inp[i].onblur=function(){this.style.backgroundColor="#FFF"; this.style.borderColor="#999"};
    }
  }
for(i=0;i<inp2.length;i++){ 
  inp2[i].onfocus=function(){this.style.backgroundColor="#ECE6F9"; this.style.borderColor="#333"}; 
  inp2[i].onblur=function(){this.style.backgroundColor="#FFF"; this.style.borderColor="#999"}; 
  }
}

