// Farbe in Tabellenzeile ändern

function colorClick(){
 if(document.all){
  if (this.style.backgroundColor == '#eee'){
   this.style.backgroundColor = '#fff';	
  }
  else{
   this.style.backgroundColor = '#eee';	 
  }
 }
 else{
  if (this.style.backgroundColor == 'rgb(238, 238, 238)'){
   this.style.backgroundColor = '#fff';	
  }
  else{
   this.style.backgroundColor = '#eee';	
  }
 }
}

function colorOver(){
 if(document.all){
  if (this.style.backgroundColor == '#eee'){
   this.style.backgroundColor = '#eee';
  }
  else{
   this.style.backgroundColor = '#efefef';	
  }
 }
 else{
  if (this.style.backgroundColor == 'rgb(238, 238, 238)'){
   this.style.backgroundColor = '#eee';	
  }
  else{
   this.style.backgroundColor = '#efefef';	
  }
 }
}

function colorOut(){
 if(document.all){
  if (this.style.backgroundColor == '#eee'){
   this.style.backgroundColor = '#eee';	
  }
  else{
   this.style.backgroundColor = '#fff';	 
  }
 }
 else{
  if (this.style.backgroundColor == 'rgb(238, 238, 238)'){
   this.style.backgroundColor = '#eee';	
  }
  else{
   this.style.backgroundColor = '#fff';	
  }
 }
}

function colorHover() {
 var row = document.getElementsByTagName('tr');

 for (var i=0; i<row.length; i++){
  if (!row[i].getElementsByTagName('th')[0] && row[i].getElementsByTagName('td').length >1){
	 row[i].onmouseover = colorOver;
	 row[i].onmouseout = colorOut;
	 row[i].onclick = colorClick;
	}
 }
}
