Event.observe(window,'resize',mcheight);

var xyM = new Array; var xyC = new Array;

function startit() {
	Intro();
	mcheight ();
	
}

function mcheight () {
	VPheight = $("main").offsetHeight;
	VPwidth = $("main").offsetWidth;
	cleft = (VPwidth / 2) -346;
	Mainheight= VPheight-252;
	$("contentwrapper").style.height = Mainheight + "px";
	$("content").style.left = cleft + "px";	
	$("content").style.visibility = "visible";
}

function menuIN (menid,subid) {
	var subtest = $(subid);	
	if (subtest.style.visibility != "visible" ) {		
		var idelem = $(menid);
		yoff = $(menid).getHeight();		
		xyC = Position.page(idelem);
		$(subid).style.left = xyC[0] + 8 +"px";
		$(subid).style.top = (xyC[1] + yoff-4) + "px";
		$(subid).style.visibility = "visible";
	}
}
function menuOUT (menid,subid,myEvent) {
		if(navigator.appName == "Netscape"){
			menx = Event.pointerX(myEvent);
			meny = Event.pointerY(myEvent);
			if (!Position.within($(subid),menx,meny)) { 
				$(menid).setStyle({
					backgroundColor: 'transparent'
				});
				$(subid).style.visibility = "hidden";
			}
		}else{
			$(menid).setStyle({
					backgroundColor: 'transparent'
				});
				$(subid).style.visibility = "hidden";
		}		
}
function menupOUT (menid,subid,myEvent) {
			menx = Event.pointerX(myEvent);
			meny = Event.pointerY(myEvent);
			if (!Position.within($(subid),menx,meny)) { 
				$(menid).setStyle({
					backgroundColor: 'transparent'
				});
				$(subid).style.visibility = "hidden";
			}
}

function Intro() {
	 $('anim').style.display = "none";
	 new Effect.Appear('topframe',{duration:1});
	 new Effect.Appear('content',{delay:0.5,duration:1.2});
}


