function CollectOptions ( BaseString, frm, ResultField, displayWarning )
  // McAdoo - 02/06/2001 - this will build a comma,deliminated list base on BaseString and place the results in ResultField
  // McAdoo - 07/18/2001 - added message when options not selected
  // McAdoo - 07/19/2001 - added the display warning message
  // McAdoo - 07/23/2001 - fixed typo to the display warning message
  {
    // allocate flag
    var result = false;
    var i;

    // blank out the original value
    ResultField.value = "";

    // loop through the list
    for ( i = 0; i < frm.elements.length; i++)
      {
        // check for matching name
        if ( frm.elements [i].name == BaseString )
          {
            // check if it's a checkbox
            if ( frm.elements [i].type == "checkbox" )
              {
                // the name matches, check if it's checked
                if ( frm.elements [i].checked )
                  {
                    // check for any previous values
                    if ( result )
                      {
                        // since there is a previous match, save with a comma
                        ResultField.value = ResultField.value + "," + frm.elements [i].value;
                      }
                    else
                      {
                        // add the first ID
                        ResultField.value = frm.elements [i].value;

                        // set the result to true
                        result = true;                 
                      }

                  }
              }
          }
      }

    // check for message needed
    if ( ( !result ) && ( displayWarning == true ) )
      {
        // display message
        window.alert ( 'Items must be selected to submit' );
      }

    // return the result
    return ( result );
  }