var isOpen = false;

function moveHandler(e) {
	var theX = 0;
	var theY = 0;
	
	if (!e) var e = window.event;
	
	if (IE) { // grab the x-y pos.s if browser is IE
		theX = event.clientX + document.body.scrollLeft;
		theY = event.clientY + document.body.scrollTop;
	} else {  // grab the x-y pos.s if browser is NS
		theX = e.pageX;
		theY = e.pageY;
	}
	
	if (theY < 30) {
		if (!isOpen) {
			document.getElementById("navbar-iframe").style.top = "0px";
			isOpen = true;
		}
	} else {
		if (isOpen) {
			document.getElementById("navbar-iframe").style.top = "-30px";
			isOpen = false;
		}
	}
}

var IE = document.all ? true : false;
if (!IE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = moveHandler;