function hide(y)
{
	for (i=0; i<y; ++i)
	{
		el = "panel"+i;
  		document.getElementById(el).style.display = 'none';
	}
}

function show(x,y)
{
		hide(y);
		el = "panel"+x;
  		document.getElementById(el).style.display = 'block';
}

var subNav = new Array('fleetNav','financeNav','schoolNav')//
var subNav2 = new Array('chooseNav');
var subNavSchool = new Array('fleetNav','financeNav')//

var disappearSet = 0;

function showSubNav(id)
{
	hideSubNav();
	if(disappearSet == 1)
	{
		clearTimeout(disappear);
	}
	document.getElementById(id).style.display = "block";
}

function showSubNav2(id)
{
	hideSubNav2();
	if(disappearSet == 1)
	{
		clearTimeout(disappear);
	}
	document.getElementById(id).style.display = "block";
}

function showSubNavSchool(id)
{
	hideSubNavSchool();
	if(disappearSet == 1)
	{
		clearTimeout(disappear);
	}
	document.getElementById(id).style.display = "block";
}

function hideSubNav()
{		
	for (i=0; i<subNav.length; ++i)
	{
		document.getElementById(subNav[i]).style.display = 'none';
	}
	hideSubNav2();
}

function hideSubNav2()
{				
	for (i=0; i<subNav2.length; ++i)
	{
		document.getElementById(subNav2[i]).style.display = 'none';
	}
}

function hideSubNavSchool()
{		
	for (i=0; i<subNavSchool.length; ++i)
	{
		document.getElementById(subNavSchool[i]).style.display = 'none';
	}
	hideSubNav2();
}

function stay()
{
	clearTimeout(disappear);
}

function stay2()
{
	clearTimeout(disappear);
	clearTimeout(disappear2);
}

function leave()
{
	disappear = setTimeout("hideSubNav()",1500);
	disappearSet = 1;
}

function leave2()
{
	disappear = setTimeout("hideSubNavSchool()",1500);
	disappear2 = setTimeout("hideSubNav2()",1500);
	disappearSet = 1;
}

function changeImage(x)
{
	document.getElementById('aircraftVideo').style.display='none';
	document.getElementById('galleryImage').src=x;
	document.getElementById('galleryImage').style.display='block';
}


function showVideo()
{
	document.getElementById('aircraftVideo').style.display='block';
	document.getElementById('galleryImage').style.display='none';
}