
var s1 = '';

function ShowHideDiv(id) {
		
		obj = document.getElementById(id);

		if ('none' == obj.style.display) {
			obj.style.display = 'block';
		} else {
			obj.style.display = 'none';
		}
		
		return true;
}


function ShowDiv(id) {

		obj = document.getElementById(id);
		if (obj) {
			//document.getElementById('debug').innerHTML = document.getElementById('debug').innerHTML + "<br/>show: " + id;
			obj.style.display = 'block';
		}
		
		return true;
}

function HideDiv(id) {
		
		

		if (id) {
			//document.getElementById('debug').innerHTML = document.getElementById('debug').innerHTML + "<br/>hide: " + id;
			obj = document.getElementById(id);
			if (obj) {
				
				obj.style.display = 'none';
			}
		}
		
		return true;
}

function SwitchClass(id, classname) {
		
		obj = document.getElementById(id);
		obj.className = classname;
		
		return true;
}

function hideMenu(id, showActive) {


	if (hidem) {
		HideDiv(id);
		if (showActive && activeParentId >= 0) {
			ShowDiv('m'+activeParentId);
		}

		SwitchClass('menuline','bg'+activeBackground);

	} else {
		clearTimeout(s1);
	}

}

function HoldDiv() {
	clearTimeout(s1);
	hidem = false;
}

