function altrows() {

var nix="#ffffff";
//if(top.mac==1){alert("A Mac!");nix=""}

var firstColor="#D7EECB";
var secondColor="#F3FAEF";

if(self.location.href.match(/distribution/)){firstColor="#F3FAEF";secondColor="#D7EECB"}

var tableElements = document.getElementsByTagName("TABLE");

for (t=1;t<tableElements.length-2;t++){
		//alert(tableElements[t].id)

		rows = tableElements[t].getElementsByTagName("tr") ;
		var counter = 0

		//rows[0].childNodes[0].style.borderColor='#ffffff';
		//rows[0].childNodes[0].style.borderRightColor='#E4E4E4';

	//	alert("Rows: "+rows.length);

		for( i = 0; i < rows.length; i=i+2) {
			//alert(i+":"+rows[i].innerHTML)
				rows[i].style.backgroundColor = firstColor;
			//if(rows[i].childNodes[1]){
			//	rows[i].childNodes[0].style.backgroundColor = 'red';
		//		rows[i].childNodes[1].style.borderColor='white';
			//	rows[i].childNodes[1].style.borderRightColor='#E4E4E4'
				//alert(i+":"+rows[i].childNodes[1].innerText)
		//}

				if(i==rows.length-1){//alert("LUST");
				//for(c=1;c<rows[i].childNodes.length;c++){
					//rows[i].childNodes[c].style.borderBottomWidth='1px'
					//rows[i].childNodes[c].style.borderBottomColor='#E4E4E4'
				//}
				continue

			}


			if(rows[i+1].childNodes[0]){
			var p = eval(i+1)
			//alert(p+":"+rows[p].childNodes[1].innerText)
				//rows[i+1].childNodes[0].style.backgroundColor = nix;
				if(rows[i+1].childNodes){
				//	alert(1)
			//	rows[i+1].childNodes[0].style.borderColor='#ffffff'
			//	rows[i+1].childNodes[0].style.borderRightColor='#E4E4E4'
				rows[i+1].bgColor = secondColor ;
				}

				if(p==rows.length-1){
					//alert("LAUNE");

					//rows[i+1].childNodes[0].style.borderBottomColor='#E4E4E4'
					//rows[i+1].childNodes[0].style.borderBottomWidth='1px'

			//	for(c=1;c<rows[i+1].childNodes.length;c++){
				//		if(rows[i+1].childNodes[c]){
						//	rows[i+1].childNodes[c].style.borderBottomWidth='1px'
						//	rows[i+1].childNodes[c].style.borderBottomColor='#E4E4E4'
						//	}
				//}
				continue

			}

		}

	}
 }
}

altrows();
