var marked = new Array;

 function setPointer(theRow, theRowNum, theAction)
 {
 
     var theDefaultColor = '#FFFFFF';
     var thePointerColor = '#F7FFFF';
     var theMarkColor = '#F9F4EB';
     var theCells = null;
 
     if ((thePointerColor == '' && theMarkColor == '')
         || typeof(theRow.style) == 'undefined') {
         return false;
     }
 
     if (typeof(document.getElementsByTagName) != 'undefined') 	{	theCells = theRow.getElementsByTagName('td'); }
     else if (typeof(theRow.cells) != 'undefined') 		{	theCells = theRow.cells; }
     else { return false; }
 
     var domDetect    = null;
     var currentColor = null;
     var newColor     = null;
     if (typeof(window.opera) == 'undefined'
         && typeof(theRow.getAttribute) != 'undefined') {
         currentColor = theRow.getAttribute('bgcolor');
         domDetect    = true;
     }
     else {
         currentColor = theRow.style.backgroundColor;
         domDetect    = false;
     }

 
     if (currentColor == ''
         || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
         if (theAction == 'over' && thePointerColor != '') {
             newColor              = thePointerColor;
             //marked[theRowNum] = false;
         }
         else if (theAction == 'click' && theMarkColor != '') {
             newColor              = theMarkColor;
             marked[theRowNum] = true;
         }
     }
     else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
              && (typeof(marked[theRowNum]) == 'undefined' || !marked[theRowNum])) {
         if (theAction == 'out') {
             newColor              = theDefaultColor;
         }
         else if (theAction == 'click' && theMarkColor != '') {
             newColor              = theMarkColor;
             marked[theRowNum] = true;
         }
     }
     else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
         if (theAction == 'click') {
             newColor              = (thePointerColor != '')
                                   ? thePointerColor
                                   : theDefaultColor;
             marked[theRowNum] = (typeof(marked[theRowNum]) == 'undefined' || !marked[theRowNum])
                                   ? true
                                   : null;
         }
     }

     if (newColor) {
         var c = null;
         if (domDetect) {	theRow.setAttribute('bgcolor', newColor, 0); }
         else 		{	theRow.style.backgroundColor = newColor;     }
     }
 
     return true;
}