rem: document.forms[0].elements[i].focus(); break; 
add: if (field.elements[i].id) { obj = get_object('ar_'+field.elements[i].id); if (obj && obj.style.display!=='none') { document.forms[0].elements[i].focus(); break; } } 
context: function placeFocus(){  if (document.forms.length > 0)   {    var field = document.forms[0];    for (i = 0; i < field.length; i++)     {      if ((field.elements[i].type == "text") || (field.elements[i].type =="textarea") || (field.elements[i].type.toString().charAt(0) == "s"))       {        document.forms[0].elements[i].focus();        break;      }    }  }}
meta: 1654	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1654/c79166b43c0771a004e6471acdda7001c92aa2c7/formfocus.js/buggy/javascript/formfocus.js