Adding onmouseover to table rows through DOM (javascript)?

Hello guys.

I have the following problem:

I’ve generated a table through javascript using the appendChild method, and added at the same time unique row, column and cell IDs so I can easily fetch them later.

I’m trying to add (through a different loop) alternating row colors (easily done, it’s not the annoying bit) which change when onmouseover’ed .

Here’s my code (which doesn’t work)

		//m = (a % 2)*10;
		curRow = document.getElementById('rowRow'+a);
		curRow.onmouseover = function(){'rgb('+a*10+','+a*10+','+a*10+')'};
		curRow.onmouseout = function(){'#fefefe'};

Can you see what I’m doing wrong ?



edit: I’ve posted a more complete explanation on I’ll post the answer here if they answer faster. I’m still trying to figure it out.