function initDefault(){
	if(isDef('init'))init()
}
onload=initDefault

function mOver(){
	this.style.backgroundColor = colorOver[0];
	this.getElementsByTagName("td")[1].style.color = colorOver[1];
	this.getElementsByTagName("img")[0].src = this.getAttribute("strSrc")+"seta_"+colorOver[2]+".gif";
	this.getElementsByTagName("span")[0].style.color = colorOver[3];
}

function mOut(){
	
	if(this.getAttribute("bClick")=="false"){
		this.style.backgroundColor = colorOut[0];
		this.getElementsByTagName("td")[1].style.color = colorOut[1];
		this.getElementsByTagName("img")[0].src = this.getAttribute("strSrc")+"seta_"+colorOut[2]+".gif";
		this.getElementsByTagName("span")[0].style.color = colorOut[3];
	}
}

function mClick(){
	if(this.getAttribute("bClick")=="false"){
		if(tbClicked!=this){
			if(tbClicked!=null){
				tbClicked.setAttribute("bClick","false");
				tbClicked.style.backgroundColor = colorOut[0];
				tbClicked.getElementsByTagName("td")[1].style.color = colorOut[1];
				tbClicked.getElementsByTagName("img")[0].src = this.getAttribute("strSrc")+"seta_"+colorOut[2]+".gif";
				tbClicked.getElementsByTagName("span")[0].style.color = colorOut[3];
			}
			tbClicked = this
			this.setAttribute("bClick","true");

		}
	}
}

function init(){
	loadColors();
	elementTr = document.getElementsByTagName("tr");
	if(!isDef("tbClicked")){tbClicked = null;}
	for(i=0;i<elementTr.length;i++){
		if(elementTr[i].getAttribute("id")=="case_tr"){
			var setas = elementTr[i].getElementsByTagName("img")[0].src;
			strSrc = setas.match(/[(\a\D\d)]*.\//);
			elementTr[i].setAttribute("strSrc",strSrc[0]);		
			elementTr[i].setAttribute("sId",i);
			if(tbClicked != elementTr[i]){
				elementTr[i].setAttribute("bClick","false");
			}
			elementTr[i].onmouseover = mOver;
			elementTr[i].onmouseout = mOut;
			elementTr[i].onmousedown = mClick;

		};
	}
	preloadImages();

}