<!--
function removeItem_onclick(i) {
  var list1 = i;
  var counter = 0;

  if (list1.selectedIndex == -1) {
    alert("Please select an item to remove");
  } else if (list1.options[list1.selectedIndex].value == '-') {
    //Do nothing      
  } else {
    //Remove the items
    while(counter < list1.length) {        
      if (list1.options[counter].selected) {
        list1.options[counter] = null;
        counter = 0; //reset counter since list count has changed            
      } else {
        counter ++;
      }
    }       
  }
}

function addItem_onclick(objname, objname2) {
  //var i = c
  var present = false
  var isSelected = false
  var list1 = objname
  var list2 = objname2
  var opt
  for (var x=0; x < list2.length; x++) {
    if (list2.options[x].selected ) {
      opt = new Option(list2.options[x].text, list2.options[x].value);          
      for (y=0; y < list1.length; y++) {
        if (opt.value == list1.options[y].value) present = true;
      }        
      if (present == false) {
        if (list1.length == 1) {
          if (list1.options[0].value=="-") list1.options[0] = null;
        }
        list1.options[list1.options.length] = opt;
      }
      isSelected = true;
      present = false;
    }
  }
  if (isSelected == false) {
    alert("Please select an item to add");
  }
}

function selectAll(i) {
  var list1 = i;
  for (var x=0; x < list1.length; x++) {
    if (list1.options[x].value != "") {
      list1.options[x].selected = true;
    }
  }
}
//-->