function init(){
	document.getElementById("hideLoading").style.display = 'none';
}
function loading() {
	document.getElementById("hideLoading").style.display = '';
}
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, close, open) { 
	var img = document.getElementById(id); 
	if (img!=null){ 
		var bExpand = img.src.indexOf(open) >= 0; 
		if (!bExpand) 
			img.src = open; 
		else 
			img.src = close; 
	} 
}   
function openClose(menuId) { 
	poorman_changeimage('menu'+menuId, 'images/arrow_closed.gif', 'images/arrow_open.gif'); 
	poorman_toggle('component'+menuId);
}

function initMenus(menu1State, menu2State, menu3State, menu4State, menu5State, menu6State) {
	if(menu1State == 'open'){
		poorman_changeimage('menu1', 'images/arrow_closed.gif', 'images/arrow_open.gif'); 
		poorman_toggle('component1');
	}
	if(menu2State == 'open'){
		poorman_changeimage('menu2', 'images/arrow_closed.gif', 'images/arrow_open.gif'); 
		poorman_toggle('component2');
	}
	if(menu3State == 'open'){
		poorman_changeimage('menu3', 'images/arrow_closed.gif', 'images/arrow_open.gif'); 
		poorman_toggle('component3');
	}
	if(menu4State == 'open'){
		poorman_changeimage('menu4', 'images/arrow_closed.gif', 'images/arrow_open.gif'); 
		poorman_toggle('component4');
	}
	if(menu5State == 'open'){
		poorman_changeimage('menu5', 'images/arrow_closed.gif', 'images/arrow_open.gif'); 
		poorman_toggle('component5');
	}
	if(menu6State == 'open'){
		poorman_changeimage('menu6', 'images/arrow_closed.gif', 'images/arrow_open.gif'); 
		poorman_toggle('component6');
	}
}