function sideMenu(hnd, oContent, cContent, states){
	this.hnd = hnd;
	this.oContent = oContent;
	this.cContent = cContent;
	this.states = states;
	
	this.toggle = function (index){
		if(states[index]){
			this.close(index);
		}else{
			this.open(index);
		}
		states[index] ^= true;
	}
	
	this.open = function (index){
		var row = document.getElementById("sideMenuRow_" + hnd + "_" + index);
		var arrow = document.getElementById("sideMenuArrow_" + hnd +"_" + index);
		row.innerHTML = oContent[index];
		arrow.className = "infoRowArrowUp";
	}
	
	this.close = function (index){
		var row = document.getElementById("sideMenuRow_" + hnd + "_" + index);
		var arrow = document.getElementById("sideMenuArrow_" + hnd +"_" + index);
		row.innerHTML = cContent[index];
		arrow.className = "infoRowArrowDown";
	}
}
