var theMenuRef = "parent.theMenu";
var theMenu = eval(theMenuRef);
var theBrowser = parent.theBrowser;
var belowMenu = null;
var menuStart = 0;

if (theMenu) {theMenu.amBusy = true;
	if (theBrowser.hasDHTML) {
		if (document.layers) {
			with (document.ids) {
				menuTop.position = "absolute";
				menuBottom.position = "absolute";
				menuBottom.visibility = "hidden";
				statusMsgDiv.position = "absolute";
			}
		} else {
			if (document.all) {
				with (document.styleSheets["JoustStyles"]) {
					addRule ("#menuTop", "position:absolute");
					addRule ("#menuBottom", "position:absolute");
					addRule ("#menuBottom", "visibility:hidden");
					addRule ("#statusMsgDiv", "position:absolute");
				}
			}
		}
	}
}
function getDHTMLObj(objName) {
	return eval('document' + theBrowser.DHTMLRange + '.' + objName + theBrowser.DHTMLStyleObj);
}
function getDHTMLObjHeight(objName) {
	return eval('document' + theBrowser.DHTMLRange + '.' + objName + theBrowser.DHTMLDivHeight);
}
function getDHTMLObjTop(theObj) {return (theBrowser.code == "MSIE") ? theObj.pixelTop + 0 : theObj.top;}
function myVoid() { ; }
function setMenuHeight(theHeight) {
	getDHTMLObj('menuBottom').top = theHeight;
}
function drawStatusMsg() {
	if (document.layers) {
		document.ids.statusMsgDiv.top = menuStart;
	} else{
		if (document.all) {
			document.styleSheets["JoustStyles"].addRule ("#statusMsgDiv", "top:" + menuStart);
		}
	}
	document.writeln('<DIV ID="statusMsgDiv"><CENTER>Building Menu...</CENTER></DIV>');
}
function drawLimitMarker() {
	if (theMenu && theBrowser.hasDHTML && (theBrowser.code == 'NS')) {
		var limitPos = theMenu.maxHeight + menuStart + getDHTMLObjHeight('menuBottom');
		document.ids.limitMarker.position = "absolute";
		document.ids.limitMarker.visibility = "hidden";
		document.ids.limitMarker.top = limitPos;
		document.writeln('<DIV ID="limitMarker">&nbsp;</DIV>');
	}
}
function setTop() {
	if (theMenu && theBrowser.hasDHTML) {
		menuStart = getDHTMLObjHeight("menuTop");
		drawStatusMsg();
	}
}
function setBottom() {
	if (theMenu) {
		if (theBrowser.hasDHTML) {
			drawLimitMarker();
			getDHTMLObj("statusMsgDiv").visibility = 'hidden';
			theMenu.refreshDHTML();
			getDHTMLObj('menuBottom').visibility = 'visible';
		}
		theMenu.amBusy = false;
	}
}
if (self.name != 'menu') { self.location.href = 'articoli.htm'; }
