// JavaScript Document
window.onload=function(){
	var check;
	var tr=document.getElementById("tabls").getElementsByTagName("tr");
	for(var i=1;i<tr.length;i++){
		check=tr[i].getElementsByTagName("input")[0];
		if(check&&(check.type=='checkbox'||check.type=='radio')){
			check.fu=tr[i];
			if(check.checked){
				tr[i].style.backgroundColor="#fffbe4";
			}else{
				tr[i].style.backgroundColor="";
				tr[i].onmouseover=function(){
					if(this.style.backgroundColor!="#fffbe4") this.style.backgroundColor="#f3f3f3";
				}
				tr[i].onmouseout=function(){
					if(this.style.backgroundColor!="#fffbe4") this.style.backgroundColor=""
				}
			}
			check.onclick=function(){
				if(this.type=='radio')
				{
					cleartr=document.getElementById("tabls").getElementsByTagName("tr");
					for(var j=1;j<cleartr.length;j++)
					{
						cleartr[j].style.backgroundColor="";
					}
				}
				if(this.checked){
					this.fu.style.backgroundColor="#fffbe4";
					
					if(this.name=='edcheck')
					{
					  	//alert(this.name);
						selectalled(findpro,'1');
						
					}
				}else{
					this.fu.style.backgroundColor="";
					if(this.name=='edcheck')
					{
					  	//alert(this.name);
						selectalled(findpro,'1');
						
					}
				}
			}
		}else{
			tr[i].onmouseover=function(){
				if(this.style.backgroundColor!="#fffbe4") this.style.backgroundColor="#f3f3f3";
			}
			tr[i].onmouseout=function(){
				if(this.style.backgroundColor!="#fffbe4") this.style.backgroundColor=""
			}
			
		}
		
	}
}