function addToList(from,to)
{
    if(from.selectedIndex >= 0) {
        isPresent = false;
        var options=to.getElementsByTagName("option");

        if(from.item(from.selectedIndex).value == "0") {
            for(i=to.options.length-1; i>= 0; i--) {
                to.removeChild(options[i]);
            }
        }
        for (i=0; i<to.options.length; i++)
        {
            if(options[i].value == from.item(from.selectedIndex).value || options[i].value == "0")
                isPresent = true;
        }
        if(!isPresent) {
            var oOption = document.createElement("option");;
            to.appendChild(oOption);
            oOption.value = from.item(from.selectedIndex).value;
            oOption.text  = from.item(from.selectedIndex).text;
        }
    }
}

function delFromList(to)
{
    if(to.selectedIndex >= 0) {
      var options=to.getElementsByTagName("option");
      to.removeChild(options[to.selectedIndex]);
    }
}

function fillListToGet(form, to)
{
    var options=to.getElementsByTagName("option");
    for (i=0; i< to.options.length; i++)
    {
        form.action += "&"+to.name+"="+options[i].value;
    }
}