<!-- // Activate cloak for old browsers

/*-------------------------------------------------------------------------+
 Function Name: isSelected

   Description: Check a SELECT tag to make sure a valid OPTION item has
                been selected.

       Returns: TRUE if at least one item is selected, FALSE if not.
+--------------------------------------------------------------------------+
|                             A r g u m e n t s                            |
+--------------------------------------------------------------------------+
 Name               I/O  Description
 ================== ===  ==================================================
 oControl            I   The option control to examine.
 szControlName       I   The display name of the control.
 szIgnoreValue       I   A value that do not count as a valid entry.
 fHideAlert          I   True to hide alert; false, null, or leave out to
                          show alert.
+-------------------------------------------------------------------------*/
function isSelected(oControl, szControlName, szIgnoreValue, fHideAlert)
  {
  var fReturn = false;
  var iOption;

  // Loop through each option
  for (iOption = 0; iOption < oControl.options.length; iOption++)
    {
    // Find out if this option is selected. Be sure to check for values that
    // should be ignored
    if ((oControl.options[iOption].selected) &&
        (oControl.options[iOption].value != szIgnoreValue))
      {
      // We found one valid item, set the return value to true and exit loop
      fReturn = true;
      break;
      }
    }

  if ((! fReturn) && (! fHideAlert))
    {
    if (oControl.type == "select-multiple")
      alert("Please select at least one item from the '" + szControlName + "' list.");
    else
      alert("Please select an item from the '" + szControlName + "' drop-down.");

    oControl.focus();
    }

  return (fReturn);
  }

// Deactivate cloak -->
