﻿  function setPointer(theRow)
  {
    var theCells = null;
    var maxcell;

    var theNormalBgColor = '#EEEEEE';
    var thePointerColor  = '#DDFFDD';

    if (arguments[1] == maxcell)  // undefiniert
    {
      maxcell = 1;
    }
    else
    {
      maxcell = arguments[1];
    }

    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') { return false; } // if

    if (typeof(document.getElementsByTagName) != 'undefined') {
      theCells = theRow.getElementsByTagName('td');
    } else
      if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
      } else {
        return false;
    } // if

    var rowCellsCnt  = theCells.length;
    var currentColor = null;
    var newColor     = null; // Opera does not return valid values with "getAttribute"

    if (rowCellsCnt > maxcell)
    {
      rowCellsCnt = maxcell;
    }

    if (typeof(window.opera) == 'undefined' && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
      currentColor = theCells[0].getAttribute('bgcolor');
      newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase()) ? theNormalBgColor : thePointerColor;
      for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].setAttribute('bgcolor', newColor, 0);
      } // end for
    } else {
      currentColor = theCells[0].style.backgroundColor;
      newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase()) ? theNormalBgColor : thePointerColor;
      for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = newColor;
      } // for
    } // if
    return true;
  } // end of the 'setPointer()' function


function goto(href)
{
  window.open(href, '_self');
}

