function copyToList(from, to)
{
  fromList = eval('document.forms[2].' + from);
  toList = eval('document.forms[2].' + to);
  var sel = false;
  for (i = 0; i < fromList.options.length; i++)
  {
    var current = fromList.options[i];
    if (current.selected)
    {
      sel = true;
      txt = current.text;
      val = current.value;
      toList.options[toList.length] = new Option(txt,val);
      fromList.options[i] = null;
      i--;
    }
  }
  if (!sel) alert ('You haven\'t selected any options!');
}

function allSelect()
{
  List = document.forms[2].chosen;
  for (i = 0; i < List.length; i++)
  {
     List.options[i].selected = true;
	 document.forms[2].mappings.value += List.options[i].value + "|";
  }
}
