<!--
function confirmDeletion()
{
  if ( confirm("Proceed to delete record(s)?") )
  {
  return true;
  }
  else
  {
  return false;
  }
}
function getRequired(form,fieldName)
{
  if ( form[fieldName].type == 'checkbox' )
  {
  if ( form[fieldName].checked )
  {
    return 'true';
  }
  else
  {
    return 'false';
  }
  }
  else if ( form[fieldName].type == 'radio' )
  {
  if ( form[fieldName].checked )
  {
    return 'true';
  }
  else
  {
    return 'false';
  }
  }

  var iCount = form[fieldName].length;
  if ( iCount != null )
  {
  for ( i=0; i<iCount; i++ )
  {
    if ( form[fieldName][i].type == 'checkbox' && form[fieldName][i].checked )
    {
    return 'true';
    } 
    if ( form[fieldName][i].type == 'radio' && form[fieldName][i].checked )
    {
    return 'true';
    } 
  }
  }
  return 'false';
}

function toggleCheckboxes(checkboxes, isChecked) {

  if (checkboxes != null) {
    if (checkboxes.length != undefined) {
      var numCheckboxes = checkboxes.length;
      for (index = 0; index < numCheckboxes; index++) {
        if (!checkboxes[index].disabled) {
          checkboxes[index].checked = isChecked;
        }
      }
    }
    else {
      if (checkboxes.disabled != undefined && !checkboxes.disabled) {
        checkboxes.checked = isChecked;
      }
    }
  }
}

function toggleMasterCheckbox(masterCheckbox, isChecked, checkboxes) {

  if (isChecked == false) {
    masterCheckbox.checked = false;
  }
  else if (masterCheckbox.checked == false) {
    if (checkboxes.length != undefined) {
      var numCheckboxes = checkboxes.length;
      var allChecked = true;
      for (index = 0; index < numCheckboxes && allChecked; index++) {
        if (!checkboxes[index].disabled && checkboxes[index].checked == false) {
          allChecked = false;
        }
      }
      if (allChecked) {
        masterCheckbox.checked = true;
      }
    }
    else {
      masterCheckbox.checked = isChecked;
    }
  }
}

function setWindowTitleJS(titleStr) {
  top.document.title=titleStr;
}

function addSelectBoxOption(theSel, theText, theValue)
{
  var newOpt = new Option(theText, theValue);
  var selLength = 0;
  if (theSel != null && theSel.length) {
  	selLength = theSel.length;
  }
  theSel.options[selLength] = newOpt;
}

function deleteSelectBoxOption(theSel, theIndex)
{ 
  var selLength = 0;
  if (theSel != null && theSel.length) {
  	selLength = theSel.length;
  }
  if(selLength>0)
  {
    theSel.options[theIndex] = null;
  }
}

function moveSelectBoxOptions(theSelFrom, theSelTo)
{
  var selLength = 0;
  if (theSelFrom != null && theSelFrom.length) {
  	selLength = theSelFrom.length;
  }
  var selectedText = new Array();
  var selectedValues = new Array();
  var selectedCount = 0;
  
  var i;
  
  // Find the selected Options in reverse order
  // and delete them from the 'from' Select.
  for(i=selLength-1; i>=0; i--)
  {
    if(theSelFrom.options[i].selected)
    {
      selectedText[selectedCount] = theSelFrom.options[i].text;
      selectedValues[selectedCount] = theSelFrom.options[i].value;
      deleteSelectBoxOption(theSelFrom, i);
      selectedCount++;
    }
  }
  
  // Add the selected text/values in reverse order.
  // This will add the Options to the 'to' Select
  // in the same order as they were in the 'from' Select.
  for(i=selectedCount-1; i>=0; i--)
  {
    addSelectBoxOption(theSelTo, selectedText[i], selectedValues[i]);
  }
}

-->


