- // 3. Gets the current color...
- var rowCellsCnt = theCells.length;
- var domDetect = null;
- var currentColor = null;
- var newColor = null;
- // 3.1 ... with DOM compatible browsers except Opera that does not return
- // valid values with "getAttribute"
- if (typeof(window.opera) == 'undefined'
- && typeof(theCells[0].getAttribute) != 'undefined') {
- currentColor = theCells[0].getAttribute('bgcolor');
- domDetect = true;
- }
- // 3.2 ... with other browsers
- else {
- currentColor = theCells[0].style.backgroundColor;
- domDetect = false;
- } // end 3
-
- // 3.3 ... Opera changes colors set via HTML to rgb(r,g,b) format so fix it
- if (currentColor.indexOf("rgb") >= 0)
- {
- var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1,
- currentColor.indexOf(')'));
- var rgbValues = rgbStr.split(",");
- currentColor = "#";
- var hexChars = "0123456789ABCDEF";
- for (var i = 0; i < 3; i++)
- {
- var v = rgbValues[i].valueOf();
- currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16);
- }
- }
-
- // 4. Defines the new color
- // 4.1 Current color is the default one
- if (currentColor == ''
- || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
- if (theAction == 'over' && thePointerColor != '') {
- newColor = thePointerColor;
+ // 3. Gets the current CSS class...
+ var newClass = null;
+ var currentClass = getCSSClass(theRow);
+ if (currentClass.indexOf("clicked_") == 0)
+ currentClass = 'clicked';
+
+ // 4. Defines the new class
+ // 4.1 Current class is the default one
+ if (currentClass == ''
+ || currentClass.toLowerCase() == defaultClass.toLowerCase()) {
+ if (theAction == 'over' && mouseoverClass != '') {
+ newClass = mouseoverClass;