var tx_projet972_pi1_iconPlus = "fileadmin/icons/plus.gif";
var tx_projet972_pi1_iconMinus = "fileadmin/icons/minus.gif";

/**
 * toggle PROJECT Items
 *
 * @param id 		the id of the project 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 tx_projet972_toggleItem(id, single) {

	if (single) {
		// show only one Q+A at a time
		//tx_projet972_toggleAll(false);
		tx_projet972_showHideItem(id, true);
	}
	else {
		// open as many Q+A as you like
		var hidden = (document.getElementById('css_theme_a_'+id).className == 'tx-projet972-dynans-hidden');
		tx_projet972_showHideItem(id, hidden);
		
	}
}

/**
 * shows or hides a PROJECT item at a time depending on the given status
 *
 * @param id 		the id of the PROJECT item to hide or show
 * @param show	true to show the item, false to hide it
 */
function tx_projet972_showHideItem(id, show) {
	var a_id = 'css_theme_a_'+id; //answer
	var pm_id  = 'css_theme_pm_'+id; // plus/minus icon
		
	if (show) {
		document.getElementById(a_id).className = 'tx-projet972-dynans-visible';
		document.getElementById(pm_id).src = tx_projet972_pi1_iconMinus;
		//alert(pm_id);
	}
	else {
		document.getElementById(a_id).className = 'tx-projet972-dynans-hidden';
		document.getElementById(pm_id).src = tx_projet972_pi1_iconPlus;
	}
}

/**
 * shows or hides all PROJECT items with one click
 *
 * @param mode	true to show the items, false to hide them
 */
/* 
function tx_projet972_toggleAll(mode, hash, count) {
	for (i = 0; i < count; i++) {
		tx_projet972_showHideItem(i+1, mode, hash);
	}
}
*/
