var _lastMouseOut=null;
var _timeOut=null;

function removeClass(target, className){
	var currentClasses=target.className.split(" ");
	var newClasses="";
	for(var i=0; i<currentClasses.length; i++){
		if(currentClasses[i]!=className){
			newClasses+=" "+currentClasses[i];
		}
	}
	target.className=newClasses;
}

function clearHighlight(name){
	_lastMouseOut=name;
	_timeOut=window.setTimeout("highlightNothing();", 300);
}

function highlightNothing() {
	window.clearTimeout(_timeOut);
	_timeOut=null;
	_lastMouseOut=null;
	//document.getElementById('boatHighlightWakefield').src="/custom/templates/page/shared/images/pilots/null.gif"; 
	removeClass(document.getElementById('jetPilot1'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto1').src="/custom/templates/page/shared/images/pilots/pilot-simon.jpg";
	removeClass(document.getElementById('jetPilot2'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto2').src="/custom/templates/page/shared/images/pilots/pilot-nick.jpg";
	removeClass(document.getElementById('jetPilot3'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto3').src="/custom/templates/page/shared/images/pilots/pilot-mike.jpg";
	removeClass(document.getElementById('jetPilot4'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto4').src="/custom/templates/page/shared/images/pilots/pilot-alexander.jpg";
	removeClass(document.getElementById('jetPilot5'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto5').src="/custom/templates/page/shared/images/pilots/pilot-clay.jpg";
	removeClass(document.getElementById('jetPilot6'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto6').src="/custom/templates/page/shared/images/pilots/pilot-michael.jpg";
	removeClass(document.getElementById('jetPilot7'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto7').src="/custom/templates/page/shared/images/pilots/pilot-glenn.jpg";
	removeClass(document.getElementById('jetPilot8'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto8').src="/custom/templates/page/shared/images/pilots/pilot-murray.jpg";
	removeClass(document.getElementById('jetPilot9'),"jetPilotsHighlightOn");
	document.getElementById('jetPilotPhoto9').src="/custom/templates/page/shared/images/pilots/pilot-glen.jpg";
	//removeClass(document.getElementById('jetPilot10'),"jetPilotsHighlightOn");
//	document.getElementById('jetPilotPhoto10').src="/custom/templates/page/shared/images/pilots/pilot-10.jpg";
	
	
	
	document.getElementById('jetPilotOverview').className+=" jetPilotsHighlightOn";
	
	
	
	
	
	//setTimeout("self.close()", 5000 ) // after 5 seconds
}


function highlightJetPilot1() {
	if(_lastMouseOut=="highlightJetPilot1"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot1').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto1').src="/custom/templates/page/shared/images/pilots/hi/pilot-simon.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

function highlightJetPilot2() {
	if(_lastMouseOut=="highlightJetPilot2"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot2').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto2').src="/custom/templates/page/shared/images/pilots/hi/pilot-nick.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

function highlightJetPilot3() {
	if(_lastMouseOut=="highlightJetPilot3"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot3').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto3').src="/custom/templates/page/shared/images/pilots/hi/pilot-mike.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

function highlightJetPilot4() {
	if(_lastMouseOut=="highlightJetPilot4"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot4').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto4').src="/custom/templates/page/shared/images/pilots/hi/pilot-alexander.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

function highlightJetPilot5() {
	if(_lastMouseOut=="highlightJetPilot5"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot5').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto5').src="/custom/templates/page/shared/images/pilots/hi/pilot-clay.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

function highlightJetPilot6() {
	if(_lastMouseOut=="highlightJetPilot6"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot6').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto6').src="/custom/templates/page/shared/images/pilots/hi/pilot-michael.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

function highlightJetPilot7() {
	if(_lastMouseOut=="highlightJetPilot7"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot7').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto7').src="/custom/templates/page/shared/images/pilots/hi/pilot-glenn.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}


function highlightJetPilot8() {
	if(_lastMouseOut=="highlightJetPilot8"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot8').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto8').src="/custom/templates/page/shared/images/pilots/hi/pilot-murray.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

function highlightJetPilot9() {
	if(_lastMouseOut=="highlightJetPilot6"){
		window.clearTimeout(_timeOut);
	}else{
		highlightNothing();
	}
	document.getElementById('jetPilot9').className+=" jetPilotsHighlightOn";
	document.getElementById('jetPilotPhoto9').src="/custom/templates/page/shared/images/pilots/hi/pilot-glen.jpg";
	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
}

//function highlightJetPilot10() {
//	if(_lastMouseOut=="highlightJetPilot10"){
//		window.clearTimeout(_timeOut);
//	}else{
//		highlightNothing();
//	}
//	document.getElementById('jetPilot10').className+=" jetPilotsHighlightOn";
//	document.getElementById('jetPilotPhoto10').src="/custom/templates/page/shared/images/pilots/hi/pilot-10.jpg";
//	removeClass(document.getElementById('jetPilotOverview'),"jetPilotsHighlightOn");
//}