var arSelected = new Array();
var arSelected2 = new Array();
var arSelected3 = new Array();

function getMultiple1(ob) {
  arSelected.length=0;

  while (ob.selectedIndex != -1) {
    //if (ob.selectedIndex != 0)
      arSelected.push(ob.options[ob.selectedIndex].value);
      ob.options[ob.selectedIndex].selected = false;
  } // You can use the arSelected array for further processing.
}

function getMultiple2(ob) {
    arSelected2.length=0;
  
  while (ob.selectedIndex != -1){
    //if (ob.selectedIndex != 0)
    arSelected2.push(ob.options[ob.selectedIndex].value);
    ob.options[ob.selectedIndex].selected = false;
  } // You can use the arSelected array for further processing.
}


function getMultiple3(ob) {
    arSelected3.length=0;
  
  while (ob.selectedIndex != -1){
    //if (ob.selectedIndex != 0)
    arSelected3.push(ob.options[ob.selectedIndex].value);
    ob.options[ob.selectedIndex].selected = false;
  } // You can use the arSelected array for further processing.
}

function setKategorie() {
  getMultiple1(document.frmSelect.category0);
  document.frmSelect.tmp.value=arSelected.toString();
  //return confirm("You have selected: " + arSelected.toString());
}

function setKategorie_media(){
  getMultiple1(document.frmSelect.preferowana_forma_kontaktu);
  document.frmSelect.tmp.value=arSelected.toString();
  //return confirm("You have selected: " + arSelected.toString());
}
var COUNTEREK2=0;
function setKategorie_whoIsWho(){
  COUNTEREK2=0
  getMultiple1(document.frmSelect.okreslenie);
  COUNTEREK2=arSelected.length;
  document.frmSelect.tmp.value=arSelected.toString();
  //return confirm("You have selected: " + arSelected.toString());
}

var COUNTEREK1=0;
function setKategorie_whoIsWho2(){
  COUNTEREK1=0;
  getMultiple2(document.frmSelect.branza);
  COUNTEREK1=arSelected2.length;
  document.frmSelect.tmp2.value=arSelected2.toString();
  //return confirm("You have selected: " + arSelected.toString());
}

var COUNTEREK3=0;
function setKategorieAgencje(){
  COUNTEREK3=0;
  getMultiple3(document.frmSelect.lstMenu);
  COUNTEREK3=arSelected3.length;
  document.frmSelect.tmp.value=arSelected3.toString();
  //return confirm("You have selected: " + arSelected.toString());
}


function setKategorie_ProtonyZgloszenie(){
  getMultiple1(document.frmComment.kategoria_glosowania);
  document.frmComment.tmp.value=arSelected.toString();
  //return confirm("You have selected: " + arSelected.toString());
}

function setKategorie_PraktykaPR(){
  getMultiple1(document.subscr.category0);
  document.subscr.tmp.value=arSelected.toString();
  //return confirm("You have selected: " + arSelected.toString());
}

