//function trsetcolor(theRow, thePointerColor, theNormalBgColor)
//{
//    var theCells = null;
//
//    if (thePointerColor == '' || 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 rowCellsCnt  = theCells.length;
//    var currentColor = null;
//    var newColor     = null;
//    // Opera does not return valid values with "getAttribute"
//    if (typeof(window.opera) == 'undefined' && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') 
//    {
//        currentColor = theCells[0].getAttribute('bgcolor');
//        
//        if (!currentColor>"")
//        	currentColor="";
//        	
//        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
//                     ? theNormalBgColor
//                     : thePointerColor;
//
//        for (var c = 0; c < rowCellsCnt; c++)
//            theCells[c].setAttribute('bgcolor', newColor, 0);
//    }
//    else
//    {
//        currentColor = theCells[0].style.backgroundColor;
//
//        if (!currentColor>"")
//        	currentColor="";
//        	
//        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
//                     ? theNormalBgColor
//                     : thePointerColor;
//                     
//        for (var c = 0; c < rowCellsCnt; c++)
//            theCells[c].style.backgroundColor = newColor;
//    }
//
//    return true;
//}



function tablesetcolor(theData, thePointerColor, theNormalBgColor)
{
    if (thePointerColor == '' || typeof(theData.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) == 'undefined') {
        return false;
    }

    var currentColor = null;
    var newColor     = null;

    if (typeof(window.opera) == 'undefined' && typeof(theData.getAttribute) != 'undefined' && typeof(theData.getAttribute) != 'undefined') 
    {
        currentColor = theData.getAttribute('bgcolor');

        if (!currentColor>"")
        	currentColor="";
        	
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;

        theData.setAttribute('bgcolor', newColor, 0);
    }
    else 
    {
        currentColor = theData.style.backgroundColor;

        if (!currentColor>"")
        	currentColor="";
        	
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
                     
        theData.style.backgroundColor = newColor;
    }

    return true;
}

function trsetcolor(theData, thePointerColor, theNormalBgColor)
{
    if (thePointerColor == '' || typeof(theData.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) == 'undefined') {
        return false;
    }

    var currentColor = null;
    var newColor     = null;

    if (typeof(window.opera) == 'undefined' && typeof(theData.getAttribute) != 'undefined' && typeof(theData.getAttribute) != 'undefined') 
    {
        currentColor = theData.getAttribute('bgcolor');

        if (!currentColor>"")
        	currentColor="";
        	
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;

        theData.setAttribute('bgcolor', newColor, 0);
    }
    else 
    {
        currentColor = theData.style.backgroundColor;

        if (!currentColor>"")
        	currentColor="";
        	
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
                     
        theData.style.backgroundColor = newColor;
    }

    return true;
}

function tdsetcolor(theData, thePointerColor, theNormalBgColor)
{
    if (thePointerColor == '' || typeof(theData.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) == 'undefined') {
        return false;
    }

    var currentColor = null;
    var newColor     = null;

    if (typeof(window.opera) == 'undefined' && typeof(theData.getAttribute) != 'undefined' && typeof(theData.getAttribute) != 'undefined') 
    {
        currentColor = theData.getAttribute('bgcolor');

        if (!currentColor>"")
        	currentColor="";
        	
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;

        theData.setAttribute('bgcolor', newColor, 0);
    }
    else 
    {
        currentColor = theData.style.backgroundColor;

        if (!currentColor>"")
        	currentColor="";
        	
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
                     
        theData.style.backgroundColor = newColor;
    }

    return true;
}