 function move(fbox, tbox) {   
      var arrFbox = new Array();     
      var arrTbox = new Array();     
      var arrLookup = new Array();
      var addColor = new Array(), keepColor = new Array();     
      var i;   
      
     for (i = 0; i < tbox.options.length; i++) {     
         arrLookup[tbox.options[i].text] = tbox.options[i].value;
         arrTbox[i] = tbox.options[i].text;
         // tuto farbu presuvame
       //  addColor[i] = tbox.options[i].style.color;
      }   
      
      var fLength = 0;     
      var tLength = arrTbox.length;
         
      for(i = 0; i < fbox.options.length; i++) { 
         arrLookup[fbox.options[i].text] = fbox.options[i].value;
         // zapiseme si vsetky farby a ich poradie
         keepColor[i] = fbox.options[i].style.color;   
         
         if (fbox.options[i].selected && fbox.options[i].value == "x") {alert('Musíte zvoliť konkrétnu podkategóriu');return }
            
         if (fbox.options[i].selected && fbox.options[i].value != "") {     
             arrTbox[tLength] = fbox.options[i].text;
            // tuto farbu presuvame
            addColor[tLength] = fbox.options[i].style.color;
            // a zaroven ju dame prec lebo nam ostali zvysne dve
            keepColor[fLength] = fbox.options[i].style.color;
            
            if (arrTbox.length>3) {alert('Môžete pridať maximálne 3 kategórie!'); return}   
            tLength++;     
         } else {     
            arrFbox[fLength] = fbox.options[i].text;
            keepColor[fLength] = fbox.options[i].style.color;   
            fLength++;     
         }     
      }
           
    //  arrFbox.sort();     
   //   arrTbox.sort();
      // sort
    //  keepColor.sort();
    //  addColor.sort();
           
      fbox.length = 0;   
      tbox.length = 0;   
      
      var c;     
      for(c = 0; c < arrFbox.length; c++) {   
         var no = new Option();     
         no.value = arrLookup[arrFbox[c]];     
         no.text = arrFbox[c];
         // tieto farby na ostali
         no.style.color = keepColor[c];
         fbox[c] = no;     
      }   
      for(c = 0; c < arrTbox.length; c++) {   
         var no = new Option();     
         no.value = arrLookup[arrTbox[c]];     
         no.text = arrTbox[c];
         // tuto farbu sme presunuli
         no.style.color = addColor[c];     
         tbox[c] = no;     
      }     
   }      
     function selectAll(box) {     for(var i=0; i<box.length; i++) {     box[i].selected = true;     }     }  
