function trclick(tr){
	var tag = tr.childNodes[0].childNodes[0];
	if (tag.checked){
		tag.checked = false;
		tr.style.backgroundImage = '';
	}
	else{
		tag.checked = true;
		tr.style.backgroundImage = 'url(images/tr_bg.gif)';
	}
}
function init(){ 
	var chkBox = document.getElementsByTagName("input"); 
	for(var i=1;i<chkBox.length;i++){
		if(chkBox[i].type=='checkbox'){ 
			chkBox[i].onclick = function(){
				if(this.checked)
					this.parentNode.parentNode.style.backgroundImage = 'url(images/tr_bg.gif)';
				else
					this.parentNode.parentNode.style.backgroundImage = '';
				}
		}
	}
	var selall = document.getElementById("selAll");
	if (selall != null){
	selall.onclick= function(){
		for(var i=1;i<chkBox.length;i++){
			if(chkBox[i].type=='checkbox' && chkBox[i]!=this){
				if(this.checked){
					chkBox[i].checked = this.checked;
					chkBox[i].parentNode.parentNode.style.backgroundImage = 'url(images/tr_bg.gif)';
				}else{ 
					chkBox[i].checked = this.checked; 
					chkBox[i].parentNode.parentNode.style.backgroundImage = ''; 
				} 
			} 
		}
	}
	} 
}
function ConfirmDel()
{
   if(confirm("确定要删除选中吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;
	 
}