﻿/*Side nav*/
function ItemOn(img) {
	if (img.src.indexOf("Expanded") == -1) img.src = img.src.replace(".gif", "Expanded.gif");
}

function ItemOff(img) {
	var id = img.id.substring(img.id.indexOf("imgItem") + 7);
	
	if (!document.getElementById("divItem" + id) || document.getElementById("divItem" + id).style.display == "none")
		img.src = img.src.replace("Expanded", "");
}

function ItemClick(img) {
	var id = img.id.substring(img.id.indexOf("imgItem") + 7);
	
	if (document.getElementById("divItem" + id).style.display == "block") {
		ItemOff(img);
		document.getElementById("divItem" + id).style.display = "none";
	} else document.getElementById("divItem" + id).style.display = "block";
}
