<!--
var band_iconPlus = "typo3conf/ext/irfaq/res/plus.gif";
var band_iconMinus = "typo3conf/ext/irfaq/res/minus.gif";
// -->

/**
 * toggle FAQ Items
 *
 * @param id 		the id of the FAQ item to hide or show
 * @param single	true to show only one item at a time, false the open as many as you want
 */
function toggleBands(id, single, hash) {	
		
	if(single) {
		//show only one Q+A at a time
		//toggleAll(false, hash);		
		showHideBand(id, true, hash);
	}
	else {
		//open as many Q+A as you like		
		if(document.getElementById('band_'+id+'_'+hash).style.display == 'none') {
			showHideBand(id, true, hash);
		}
		else {
			showHideBand(id, false, hash);
		}		
	}	
}

/**
 * shows or hides a FAQ item at a time depending on the given status
 *
 * @param id 		the id of the FAQ item to hide or show
 * @param status	true to show the item, false to hide it
 */
function showHideBand(id, status, hash) {
	var bandid_id = 'band_'+id+'_'+hash; //answer
	var pm_id  = 'band_pm_'+id+'_'+hash; // plus/minus icon
	
	if(status) {
		document.getElementById(bandid_id).style.display = 'inline';
		//document.getElementById(band_pm_id).src = band_iconMinus;
	}
	else {
		document.getElementById(bandid_id).style.display = 'none';	
		//document.getElementById(band_pm_id).src = band_iconPlus;
	}
}

