<!--
window.onresize = docReload

function docReload()
{
	if (document.layers)
		history.go(0);
}
//calculate date
var mts =new Array(12)
mts[0]= 'Jan'; mts[1]= 'Feb'; mts[2]= 'Mar'; mts[3]= 'Apr'; mts[4]= 'May'; mts[5]= 'Jun'; mts[6]= 'Jul'; mts[7]= 'Aug'; mts[8]= 'Sep'; mts[9]= 'Oct'; mts[10]= 'Nov'; mts[11]= 'Dec';
var objDate = new Date()
var dd=objDate.getDate()
var mm=mts[objDate.getMonth()];
var yy=""
yy=yy+objDate.getFullYear()
yy=(yy.substr(yy.length-2,yy.length))

//initialiase menu, set it to '' if no menu needs to be highlighted 
var menuitem=''

function rollover(imgId,imgSrc)
{
	if (((!((imgId=='DocumentsRed')&&(DocumentsState)))&&(!((imgId=='TopicsRed')&&(TopicsState))))&&(initialised)&&(imgId!=menuitem))
		eval("document.images['"+imgId+"'].src='"+imgSrc+"'")
}
	
var	imgDocumentsPress
var	imgTopicsPress
var	imgDocumentsOff
var	imgDocumentsOn
var	imgTopicsOff
var	imgTopicsOn
var imgItemMarker
var objimgNewsRoomSpeeches
var objimgEconomicData
var objimgConsultations
var objimgCareers
var objimgOtherHMT
var objimgSiteMap
var objimgHelpWithSite
var objimgAboutHMT
var objimgTextOnly
var objimgBudget
var objimgPreBudgetReport
var objimgSpendingReview
var objimgEuro

var TopicsState=false
var DocumentsState=false
var initialised=false

function imgPreload()
{
	//left Navigation
	objimgNewsRoomSpeeches = new Image();
	objimgNewsRoomSpeeches.src = graphics_unique + '/menu_newsroom_lit.gif';
	objimgEconomicData = new Image();
	objimgEconomicData.src = graphics_unique + '/menu_econdata_lit.gif';
	objimgConsultations = new Image();
	objimgConsultations.src = graphics_unique + '/menu_consultations_lit.gif';
	objimgCareers = new Image();
	objimgCareers.src = graphics_unique + '/menu_careers_lit.gif';
	objimgOtherHMT = new Image();
	objimgOtherHMT.src = graphics_unique + '/menu_othersites_lit.gif';
	
	//Main Navigation
	objimgSiteMap = new Image();
	objimgSiteMap.src = graphics_unique + '/topmenu_lit_03.gif';
	objimgHelpWithSite = new Image();
	objimgHelpWithSite.src = graphics_unique + '/topmenu_lit_04.gif';
	objimgAboutHMT = new Image();
	objimgAboutHMT.src = graphics_unique + '/topmenu_lit_05.gif';
	objimgTextOnly = new Image();
	objimgTextOnly.src = graphics_unique + '/Topmenu_lit_LIT.gif';
	
	//Secondary Navigation
	objimgBudget = new Image();
	objimgBudget.src = graphics_unique + '/transparant_2_03_lit.gif';
	objimgPreBudgetReport = new Image();
	objimgPreBudgetReport.src = graphics_unique + '/transparant_2_07_lit.gif';
	objimgSpendingReview = new Image();
	objimgSpendingReview.src = graphics_unique + '/transparant_2_09_lit.gif';
	objimgEuro = new Image();
	objimgEuro.src = graphics_unique + '/transparant_2_11_lit.gif';
	
	//Left Menu Sections
	imgDocumentsPress = new Image
	imgDocumentsPress.src = graphics_unique + '/folders_press_03.gif';
	imgDocumentsOff = new Image
	imgDocumentsOff.src = graphics_unique + '/folders_unlit_03.gif';
	imgDocumentsOn = new Image
	imgDocumentsOn.src = graphics_unique + '/folder_rollover_03.gif';
	imgTopicsPress = new Image
	imgTopicsPress.src = graphics_unique + '/folders_press_06.gif';
	imgTopicsOff = new Image
	imgTopicsOff.src = graphics_unique + '/folders_unlit_06.gif';
	imgTopicsOn = new Image		
	imgTopicsOn.src = graphics_unique + '/folder_rollover_06.gif';
	imgItemMarker = new Image
	imgItemMarker.src = graphics_common + '/000000pix.gif';
}

function findObj(n,d) { 
	var p,i,x;  
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) 
	{
	    	d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
	//Case IE
	if(!(x=d[n])&&d.all) 
		x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) 
		x=d.forms[i][n];
	//Case NN
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
		x=this.findObj(n,d.layers[i].document);
	//Case NN6
	if(!x && d.getElementById) 
		x=d.getElementById(n); 
	return x;
}

function init()
{
	//Preload the images for rollover
	imgPreload();
	
	//check if any menu item needs to be highlighted and preset veriable to open 
	//menu section if needed
	if (menuitem.indexOf('t')==0)
	{	
		TopicsState=true;
		document.images['TopicsRed'].src=imgTopicsPress.src
	}
	if (menuitem.indexOf('d')==0)
	{
		DocumentsState=true;
		document.images['DocumentsRed'].src=imgDocumentsPress.src
	}
	
	if (menuitem=='jl')
	{
		if ((menuitem.indexOf('t')==0)||(menuitem.indexOf('d')==0))
		{
			document.images[menuitem].src=graphics_unique + '/990000pix.gif';
			obja = eval("findObj('a"+menuitem+"')")
			if (obja)
				obja.className='aon';
		}
		else
		{
			eval("document.images[menuitem].src=obj"+menuitem+".src");
		}
	}
	
	//open menu sections if needed
	if ((document.all) || (document.defaultView))
	{
		if (!DocumentsState)
		{
			objDocumentsMenu = findObj('divDocumentsMenu');
			objDocumentsMenu.style.display="none"
		}
		
		if(!TopicsState)
		{
			objTopicsMenu = findObj('divTopicsMenu');
			objTopicsMenu.style.display="none"
		}
	}
	else
	{
		document.images['DocumentsRed'].src=imgDocumentsPress.src
		document.images['TopicsRed'].src=imgTopicsPress.src
		TopicsState=true;
		DocumentsState=true;
	}
	initialised=true;
}

function showMenu(which)
{
	if ((initialised)&&((document.all) || (document.defaultView)))
	{
		eval("document.images['"+which+"Red'].src=(!"+which+"State)?img"+which+"Press.src:img"+which+"On.src")	
		objMenu = eval("findObj('div"+which+"Menu')");
		objMenu.style.display=(eval("!"+which+"State"))?"":"none";
		eval(which+"State=!"+which+"State")
	}
}
//-->



