// JavaScript Document
function mousetable(tablename,color1,color2,colorover,colorclick){
	var t=document.getElementById(tablename).getElementsByTagName("tr");
	for(var i=1;i<t.length;i++){
		t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?color1:color2;
		t[i].onclick=function(){
			if(this.x!="1"){
				this.x="1";//本来打算直接用背景色判断，FF获取到的背景是RGB值，不好判断
				this.style.backgroundColor=colorclick;
			}else{
				this.x="0";
				this.style.backgroundColor=(this.sectionRowIndex%2==0)?color1:color2;
			}
		}
		t[i].onmouseover=function(){
			if(this.x!="1")this.style.backgroundColor=colorover;
		}
		t[i].onmouseout=function(){
			if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?color1:color2;
		}
	}
}
