function on(elmt) {
		document.getElementById(elmt).style.visibility='visible';
	}
	
function off(elmt) {
		 document.getElementById(elmt).style.visibility='hidden';
	}

function cascadedstyle(el, cssproperty, csspropertyNS){
	if (el.currentStyle) //if IE5+
		return el.currentStyle[cssproperty]
	else if (window.getComputedStyle){ //if NS6+
		var elstyle=window.getComputedStyle(el, "")
		return elstyle.getPropertyValue(csspropertyNS)
	}
}

function mOn(elmt) {
	if (elmt != 'but' + menuAlwaysOn) {
		var button = document.getElementById(elmt);
		if (button.currentStyle)
			button.style.backgroundColor = cascadedstyle(document.getElementById(elmt), "borderColor", "border-color")
		else {
			button.style.backgroundColor = '#615D5F'
		}
	}
}

function mOff(elmt) {
	if (elmt != 'but' + menuAlwaysOn) {
		document.getElementById(elmt).style.backgroundColor='transparent';
	}
}

function mHighlight(elmt) {
		document.getElementById(elmt).style.textDecoration='underline';
}

function offDelay(elmt) {
	item = document.getElementById(elmt);
	setTimeout("item.style.visibility='hidden'",750);
}
	
function spawn_window(Content,spawn,sizing) {window.open(Content,spawn,sizing)}

function switchMenu(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != "none" ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}

function _getURL(){
	return encodeURIComponent(window.location.href);
}

function _getTitle(){
	return encodeURIComponent(document.title);	
}

function _getRootURL(){
	return 'http://' + window.location.hostname;
}
