function hideID (id) {
	document.getElementById(id).style.display='none';
	document.getElementById(id).style.visibility='hidden';
}
function showID (id) {
	document.getElementById(id).style.display='block';
	document.getElementById(id).style.visibility='visible';
}

function hideOthers(id, total){
	for(j=1; j <= total; j++) {
		var itm = 'item_'+j;
		if(id != itm) {
			document.getElementById(itm).style.display='none';
		}
	}
}

function showOrHide(id, total) {
	if(document.getElementById(id).style.display=='none') {
		showID(id);
		hideOthers(id, total);
	} else {
		hideID(id);
	}
}