// JavaScript Document
/* This script moves the quick nav layer up and down */

var ypos=-207;
var endPos = -1;
var Id=0;
var direction = "down"
var topMenu = "up";

function startmove(dir) {
	// set direction and start
	direction = dir;
	if (direction == "down") {
		MM_showHideLayers('qnd','','hide');
		MM_showHideLayers('qnu','','show');
		endPos = -1;
		//playFlash("false");
	} else {
		MM_showHideLayers('qnd','','show');
		MM_showHideLayers('qnu','','hide');
		endPos = -207;
	}
	if (!Id) {
		movemenu();
	}	
}

function movemenu() {
	yPos1 = ypos;
	yPos2 = endPos;
	yTotalDist = yPos2-yPos1;
	ySpeed = yTotalDist/4;
	ypos += ySpeed;
	if (document.layers) {
		document.hContainer.top=ypos;
	}
	if (document.all) {
		document.all.hContainer.style.top=ypos;
	}
	if (!document.all && document.getElementById) {
		document.getElementById("hContainer").style.top=ypos+"px";
	}
	if ((ypos>=(endPos-1) && direction == "down") || (ypos<=(endPos+1) && direction == "up")) {
		window.clearTimeout(Id);Id=0;
		if (document.layers) {
			document.hContainer.top=endPos;
		}
		if (document.all) {
			document.all.hContainer.style.top=endPos;
		}
		if (!document.all && document.getElementById) {
			document.getElementById("hContainer").style.top=endPos+"px";
		}
		
		if (direction == "down") {
			opacity("hCont", 0, 100, 500);
			topMenu = "down";
			
		} else {
			topMenu = "up";
			//playFlash("true");
		}
	} else {
		Id = window.setTimeout("movemenu();",50);
	}
}

setOpacity(0, "hCont");
