No, don't.
onmouseover="style.backgroundColor='#333333';
What style variable would that be referring to, then? Relying on the browser to randomly augment the scope chain is a bad idea. Use the this operator to refer to the element:
Code:
this.style.backgroundColor = '...';
There is no 'hand' value for cursors. You mean pointer.
style.border='1 solid #CCCCCC'"
A border width of 1 what? Miles? Sheep? All non-zero length values must be followed by a unit.
As for the original question, the script doesn't consider a style sheet, so that option isn't possible (without a complete rewrite). You could define a global variable containing the colour value, and then reference that when calling the functions:
Code:
var highlightColour = '#ffcc64',
normalColour = '#ffffff';
then:
HTML Code:
<table onMouseover="changeto(event, highlightColour);" onMouseout="changeback(event, normalColour);">
Mike
Bookmarks