<!--

if ( top != self )
{
	top.location.href = self.location.href;
}

var picwin = false;

var imgPageButtons = new Array(aryPageButtons.length);
var imgPageButtonsLit = new Array(aryPageButtons.length);

var strPageImgPath = "/Eurofighter/images/menu/main-options/";
var strImgType = ".gif";
var strLit = "-lit";

function open_picture_window(img_key, img_width, img_height, pic_series)
{
	if( picwin )
	{
		if( !picwin.closed )
			picwin.close();
		picwin = false;
	}

	if( pic_series )
		win_height = img_height + 96;
	else
		win_height = img_height + 68;

	picwin = window.open("/scripts/display_picture.php?img=" + escape(img_key), "_pics", "HEIGHT=" + win_height + ",resizable=yes,WIDTH=" + ( img_width + 36 ));

	picwin.focus();
}

function openTermswin(strID)
{
	if(strID)
		var termsURL = "/common/terms.html#" + strID;
	else
		var termsURL = "/common/terms.html";
		
	termswin = window.open(termsURL, "_airterms", "HEIGHT=400,resizable=yes,scrollbars=yes,WIDTH=500");
}
function openWeblinksWin()
{
	weblinkswin = window.open("/common/weblinks.php", "_weblinks", "LEFT=2,HEIGHT=470,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,TOP=2,WIDTH=720");
}
	
function button(strItemName, btnStatus)
{
	if(page_loaded)
	{
		if(btnStatus == "lit")
		{
			document.images[strItemName].src = imgPageButtonsLit[strItemName].src
		}
		else if(btnStatus == "unlit")
		{
			document.images[strItemName].src = imgPageButtons[strItemName].src
		} 
		return true;
	}
	else
	{
		return false;
	}
}

function finishedLoading()
{
	for(i = 0;i < aryPageButtons.length; i++)
	{
		imgPageButtons[aryPageButtons[i]] = new Image();
		imgPageButtonsLit[aryPageButtons[i]] = new Image();

		imgPageButtons[aryPageButtons[i]].src = strPageImgPath + aryPageButtons[i] + strImgType;
		imgPageButtonsLit[aryPageButtons[i]].src = strPageImgPath + aryPageButtons[i] + strLit + strImgType;
	}

	page_loaded = true;
	return true;
}

//-->