// Farbe in Tabellenzeile ändern

function colorClick(){
 if(document.all){
  if (this.style.backgroundColor == '#7f98ca'){
   this.style.backgroundColor = '#ffffff';
	 this.style.color = '#000000';
  }
  else{
   this.style.backgroundColor = '#7f98ca';
	 this.style.color = '#ffffff';
  }
 }
 else{
  if (this.style.backgroundColor == 'rgb(127, 152, 202)'){
   this.style.backgroundColor = '#ffffff';
	 this.style.color = '#000000';
  }
  else{
   this.style.backgroundColor = '#7f98ca';
	 this.style.color = '#ffffff';
  }
 }
}

function colorOver(){
 if(document.all){
  if (this.style.backgroundColor == '#7f98ca'){
   this.style.backgroundColor = '#7f98ca';
	 this.style.color = '#ffffff';
  }
  else{
   this.style.backgroundColor = '#efefef';
	 this.style.color = '#000000';
  }
 }
 else{
  if (this.style.backgroundColor == 'rgb(127, 152, 202)'){
   this.style.backgroundColor = '#7f98ca';
	 this.style.color = '#ffffff';
  }
  else{
   this.style.backgroundColor = '#efefef';
	 this.style.color = '#000000';
  }
 }
}

function colorOut(){
 if(document.all){
  if (this.style.backgroundColor == '#7f98ca'){
   this.style.backgroundColor = '#7f98ca';
	 this.style.color = '#ffffff';
  }
  else{
   this.style.backgroundColor = '#ffffff';
	 this.style.color = '#000000';
  }
 }
 else{
  if (this.style.backgroundColor == 'rgb(127, 152, 202)'){
   this.style.backgroundColor = '#7f98ca';
	 this.style.color = '#ffffff';
  }
  else{
   this.style.backgroundColor = '#ffffff';
	 this.style.color = '#000000';
  }
 }
}

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;
	}
 }
}