function setPointer(objekt, objekt_type, objekt_num, akce, barva_def, barva_over, barva_click) {
   //** definice promennych
   var marked_objekt = new Array;
   var theCells = null;
   var domDetect = null;
   var currentColor = null;
   var newColor = null;

   //** pokud nejsou zadany barvy nebo nejsou podporovany styly -> END
   if ((barva_over == '' && barva_click == '') || typeof(objekt.style) == 'undefined')
      return false;
   
   if (objekt_type == 'rows') {
   //** natazeni pole bunek
   // pokud se jedna o radek tabulky - natazeni pole bunek
      if (typeof(document.getElementsByTagName) != 'undefined')
         theCells = objekt.getElementsByTagName('td');
      else if (typeof(objekt.cells) != 'undefined')
         theCells = objekt.cells;
      else
         return false;
   }

   //** zjištění aktuální barvy
   if (objekt_type != 'rows') {
   //* pokud se NEjedna o radek tabulky
      if (typeof(window.opera) == 'undefined' && typeof(objekt.getAttribute) != 'undefined') { // Opera
         currentColor = objekt.getAttribute('bgcolor');
         domDetect = true;
      } else // ostatní prohlížeče
         currentColor = objekt.style.backgroundColor;
   } else {
   //* pokud se jedna o radek tabulky
      var rowCellsCnt = theCells.length;
      if (typeof(window.opera) == 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') { // Opera
         currentColor = theCells[0].getAttribute('bgcolor');
         domDetect = true;
      } else { // ostatní prohlížeče
         currentColor = theCells[0].style.backgroundColor;
         domDetect = false;
      }
   }

   //** definice nových barev
   if (currentColor == '' || currentColor.toLowerCase() == barva_def.toLowerCase()) {
   // aktualni barva odpovida DEFAULTNI barve
      if (akce == 'over' && barva_over != '')
         newColor = barva_over;
      else if (akce == 'click' && barva_click != '') {
         newColor = barva_click;
         marked_objekt[objekt_num] = true;
      }
   }
   // aktualni barva odpovida OVER barve
   else if (currentColor.toLowerCase() == barva_over.toLowerCase()) {
      if (akce == 'out')
         newColor = barva_def;
      else if (akce == 'click' && barva_click != '') {
         newColor = barva_click;
         marked_objekt[objekt_num] = true;
      }
   }
   // aktualni barva odpovida CLICK barve
   else if (currentColor.toLowerCase() == barva_click.toLowerCase()) {
      if (akce == 'click') {
         newColor = (barva_over != '')? barva_over : barva_def;
         marked_objekt[objekt_num] = (typeof(marked_objekt[objekt_num]) == 'undefined' || !marked_objekt[objekt_num])? true : null;
      }
   }

   //** nastaveni nove barvy
   if (newColor) {
      if (objekt_type != 'rows') {
      //* pokud se NEjedna o radek tabulky
         if (domDetect) // Opera
             objekt.setAttribute('bgcolor', newColor, 0);
         else // ostatní prohlížeče
             objekt.style.backgroundColor = newColor;
      } else {
      //* pokud se jedna o radek tabulky
         var c = null;
         for (c = 0; c < rowCellsCnt; c++) {
            if (domDetect) // Opera
                theCells[c].setAttribute('bgcolor', newColor, 0);
            else // ostatní prohlížeče
                theCells[c].style.backgroundColor = newColor;
         }
      }
   }
}
