function set_focus()
{
 var bFound = false;


  // for each form
  for (f=0; f < document.forms.length; f++)
  {

    // for each element in each form
    for(i=0; i < document.forms[f].length; i++)
    if (document.forms[f][i].tagName=="INPUT")
      // if it's not a hidden element
      if (document.forms[f][i].type == "text")
        // and it's not disabled
        if (document.forms[f][i].disabled != true)
	{
            document.forms[f][i].focus();
            return;
    	}
  }
}

