// VHA-IMCSS Table Row Toggle
// Developed by: Jose Santa-Maria
// Copyrights: Valley Hope Association
// October 27, 2006

function poorman_toggle(id)
	{
	var tr = document.getElementById(id);
	if (tr==null) { return; }
	var bExpand = tr.style.display == '';
	tr.style.display = (bExpand ? 'none' : '');
	}
		
function poorman_changeimage(id, sMinus, sPlus)
	{
	var img = document.getElementById(id);
	if (img!=null)
		{
		var bExpand = img.src.indexOf(sPlus) >= 0;
		if (!bExpand)
		img.src = sPlus;
		else
		img.src = sMinus;
		}
	}
		
function Toggle_trGrpHeader1()
	{
	//poorman_changeimage('trGrpHeader1_Img', 'http://www.vhaimcss.com/images/tab_less.jpg', 'http://www.vhaimcss.com/images/tab_more.jpg');
	poorman_changeimage('trGrpHeader1_Img', 'http://www.vhaimcss.com/images/tab_less.jpg', 'http://www.vhaimcss.com/images/tab_more.jpg');
	poorman_toggle('toggle_winpims');
	poorman_toggle('toggle_accountingmaintenance');
	poorman_toggle('toggle_accounting');
	poorman_toggle('toggle_arsummary');
	poorman_toggle('toggle_bluereport');
	poorman_toggle('toggle_security');
	}
		
function Toggle_trGrpHeader2()
	{
	poorman_changeimage('trGrpHeader2_Img', 'http://www.vhaimcss.com/images/tab_less.jpg', 'http://www.vhaimcss.com/images/tab_more.jpg');
	poorman_toggle('toggle_batchproc');
	poorman_toggle('toggle_billing');
	poorman_toggle('toggle_outpatientservices');
	}
		
function Toggle_trGrpHeader3()
	{
	poorman_changeimage('trGrpHeader3_Img', 'http://www.vhaimcss.com/images/tab_less.jpg', 'http://www.vhaimcss.com/images/tab_more.jpg');
	poorman_toggle('toggle_insuranceadmin');
	poorman_toggle('toggle_crud');
	poorman_toggle('toggle_insuranceadminviewer');
	poorman_toggle('toggle_insurancebenefits');
	}
		
function Toggle_trGrpHeader4()
	{
	poorman_changeimage('trGrpHeader4_Img', 'http://www.vhaimcss.com/images/tab_less.jpg', 'http://www.vhaimcss.com/images/tab_more.jpg');
	poorman_toggle('toggle_episodeanalysis');
	poorman_toggle('toggle_phu');
	}
		
function Toggle_trGrpHeader5()
	{
	poorman_changeimage('trGrpHeader5_Img', 'http://www.vhaimcss.com/images/tab_less.jpg', 'http://www.vhaimcss.com/images/tab_more.jpg');
	poorman_toggle('toggle_ecr');
	poorman_toggle('toggle_progressnotes');
	poorman_toggle('toggle_treatmentplan');
	poorman_toggle('toggle_admissions');
	poorman_toggle('toggle_dischargesummary');
	poorman_toggle('toggle_groupprogressnotes');
	poorman_toggle('toggle_medicationadmin');
	}
		
function Toggle_trGrpHeader6()
	{
	poorman_changeimage('trGrpHeader6_Img', 'http://www.vhaimcss.com/images/tab_less.jpg', 'http://www.vhaimcss.com/images/tab_more.jpg');
	poorman_toggle('toggle_budget');
	poorman_toggle('toggle_projectadmin');
	poorman_toggle('toggle_cantrack');
	poorman_toggle('toggle_positionrequisition');
	poorman_toggle('toggle_timecard');
	poorman_toggle('toggle_documentadmin');
	poorman_toggle('toggle_serviceproviders');
	}
	
// Toggle checkboxes

function CheckAll() {
document.forms[0].cb_batchproc.checked = true;
document.forms[0].cb_billing.checked = true;
document.forms[0].cb_outpatientservices.checked = true;
//document.forms[0].cb_insuranceadmin.checked = true;
//document.forms[0].cb_insurancebenefits.checked = true;
document.forms[0].cb_episodeanalysis.checked = true;
document.forms[0].cb_phu.checked = true;
document.forms[0].cb_ecr.checked = true;
}

function UnCheckAll() {
document.forms[0].cb_batchproc.checked = false;
document.forms[0].cb_billing.checked = false;
document.forms[0].cb_outpatientservices.checked = false;
document.forms[0].cb_insuranceadmin.checked = false;
document.forms[0].cb_insurancebenefits.checked = false;
document.forms[0].cb_episodeanalysis.checked = false;
document.forms[0].cb_phu.checked = false;
document.forms[0].cb_ecr.checked = false;
}