in ur function use the row object to get the rows to loop over them and return them to there default color
function ChangeRowColor(row)
{
var rows = row.parentNode.getElementsByTagName('TR');
//loop over all rows and set there colors to default
for(var i =0;i