    // Place focus in the first field
    function PlaceFocus(give_focus, focus_field)
    {
      if  (focus_field != "" && typeof focus_field != "undefined")
      {
//        var ff = eval("document.forms[0]." + focus_field);
        var ff = document.getElementById(focus_field);
        ff.focus();
        if ((ff.type == "text") || (ff.type == "textarea"))
          ff.select();
//        if  (give_focus) window.focus();
        return true;
      }
      if (document.forms.length > 0)
      {
        var field = document.forms[0];
        var type = "";
        for (i = 0; i < field.length; i++)
        {
          name = field.elements[i].name;
          type = field.elements[i].type;
          disptype = field.elements[i].style.display;
          if (((type == "file") || (type == "text") || (type == "textarea") || type == "password" || (field.elements[i].type.toString().charAt(0) == "s") || (field.elements[i].type == "checkbox")) && (!field.elements[i].disabled) && (disptype != "none"))
          {
            try{
              document.forms[0].elements[i].focus();
              if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea"))
              {
                document.forms[0].elements[i].select();
              }
              break;
            }
            catch(e){}
          }
        }
      }
//      if  (give_focus) window.focus();
    }

