//Used to display/hide collapsible tables when the header with div id 'name' is clicked on
function toggleTbl(name,status,e) {
	var tbl=document.getElementById(name);

	if (typeof(status)!='undefined' && status!='') { //eg. toggleTbl(name, 'hide') was called from <body onload="initFrm(x)">
		if (status=='hide') tbl.style.display='none'; //toggle based on forced command from 'status'
		else tbl.style.display='';
	}
	else if (e) { //toggleTbl(name,'',event) was called by clicking on the CB directly
		var cb= e.srcElement ? e.srcElement : e.target; //this holds the checkbox being clicked
		if (!cb.checked) tbl.style.display='none'; //toggle based on CB checked status
		else tbl.style.display='';
	}
	else { //toggleTbl(name) was called (can be called frm anywhere)
		if (tbl.style.display=='') tbl.style.display='none'; //toggle based on tbl display style
		else tbl.style.display='';
	}
}
