/*******************************************
	Flyout menus using CSS and JavaScript
	Written by John Simons
	Based on code from Jessett.com
*******************************************/

var timerID = 101;
var timerOn = false;
var timecount = 250;

var layers = new Array("port")

// Turns the layers on and off
function showLayer(layerName){
	document.getElementById(layerName).style.display = "block";
}
function hideLayer(layerName){
	document.getElementById(layerName).style.display = "none";
}
function hideAll() {
	for (var i = 0; i < layers.length; i++) {
		hideLayer(layers[i]);
	}
}
function startTime() {
	  if (timerOn == false) {
			 timerID = setTimeout("hideAll()" , timecount);
			 timerOn = true;
	  }
}
function stopTime() {
	if (timerOn) {
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}
function mouseOver(id) {
	hideAll(); 
	showLayer(id); 
	stopTime();
}
function mouseOut() {
	startTime();
}