2
* Sets/unsets the pointer in browse mode
4
* @param object the table row
5
* @param object the color to use for this row
6
* @param object the background color
8
* @return boolean whether pointer is set or not
10
function setPointer(theRow, thePointerColor, theNormalBgColor)
14
if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
17
if (typeof(document.getElementsByTagName) != 'undefined') {
18
theCells = theRow.getElementsByTagName('th');
20
else if (typeof(theRow.cells) != 'undefined') {
21
theCells = theRow.cells;
27
var rowCellsCnt = theCells.length;
28
var currentColor = null;
30
// Opera does not return valid values with "getAttribute"
31
if (typeof(window.opera) == 'undefined'
32
&& typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
33
currentColor = theCells[0].getAttribute('bgcolor');
34
newColor = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
37
for (var c = 0; c < rowCellsCnt; c++) {
38
theCells[c].setAttribute('bgcolor', newColor, 0);
42
currentColor = theCells[0].style.backgroundColor;
43
newColor = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
46
for (var c = 0; c < rowCellsCnt; c++) {
47
theCells[c].style.backgroundColor = newColor;
51
// --------------------
52
if (typeof(document.getElementsByTagName) != 'undefined') {
53
theCells = theRow.getElementsByTagName('td');
55
else if (typeof(theRow.cells) != 'undefined') {
56
theCells = theRow.cells;
62
var rowCellsCnt = theCells.length;
63
var currentColor = null;
65
// Opera does not return valid values with "getAttribute"
66
if (typeof(window.opera) == 'undefined'
67
&& typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
68
currentColor = theCells[0].getAttribute('bgcolor');
69
newColor = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
72
for (var c = 0; c < rowCellsCnt; c++) {
73
theCells[c].setAttribute('bgcolor', newColor, 0);
77
currentColor = theCells[0].style.backgroundColor;
78
newColor = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
81
for (var c = 0; c < rowCellsCnt; c++) {
82
theCells[c].style.backgroundColor = newColor;
87
} // end of the 'setPointer()' function
91
sealWin=window.open(url,"win",'toolbar=no,width=570,height=200');