/* TriOpSys | mymenu */
/* (c) 2009 TriOpSys */

// Class handling menu visibility
function clsMenuItem(sItem) {
	// Properties
	this.sItem= sItem;
	this.sLayer= new String("sub_"+this.sItem);

	// Methods
	this.showIt= showIt;
	this.hideIt= hideIt;
	this.moveIt= moveIt;
	this.toggleIt= toggleIt;
}

// Class clsMenuItem - methods
function showIt() {
	this.moveIt(true);
	this.toggleIt(true);
}

function hideIt() {
	this.moveIt(false);
	this.toggleIt(false);
}

function toggleIt(bStatus) {
	document.getElementById(this.sLayer).style.visibility = bStatus ? "visible" : "hidden";
}

function moveIt(bStatus) {
	document.getElementById(this.sLayer).style.top = bStatus ? "30px" : "-300px";
}