var currentPageMenu = 0;
var ua = navigator.userAgent.toLowerCase();
			
if (ua.indexOf("msie") != -1) {
	var isIE = true;
} else {
	var isIE = false;
}
openPageMenu = function(n)
{
	// turn on/off section link colours
	var parentNodeOutgoing = document.getElementById('section_'+currentPageMenu);
	var parentNodeIncoming = document.getElementById('section_'+n);
	var iLeftPos;
	var iLeftPos;


	// display menu of page links
	var pagesMenuOutgoing	= document.getElementById('pagesOfSection_'+currentPageMenu);
	var pagesMenuIncoming	= document.getElementById('pagesOfSection_'+n);

	if (pagesMenuOutgoing)
	{ 
	    pagesMenuOutgoing.style.display = 'none'; 
	    
		/*
	    //extra code to display hidden form elements, see below
	    if (ua.indexOf("msie 6.") != -1)
		{
	        var dd = document.getElementById("domDate1")
	        var md = document.getElementById("monDate1")
			    
	        dd.style.display = 'block';
	        md.style.display = 'block';    
	    }
		*/
	}
	
	if (parentNodeOutgoing && parentNodeOutgoing.childNodes)
	{
		for (i=0; i<parentNodeOutgoing.childNodes.length; i++)
		{
			if (parentNodeOutgoing.childNodes[i].tagName == 'A')
			{ parentNodeOutgoing.childNodes[i].className = ''; }
		}
	}

	if (n != currentPageMenu)
	{
		// only turn on if not repeating a link
		if (parentNodeIncoming && parentNodeIncoming.childNodes)
		{
			for (i=0; i<parentNodeIncoming.childNodes.length; i++)
			{
				if (parentNodeIncoming.childNodes[i].tagName == 'A')
				{ parentNodeIncoming.childNodes[i].className = 'on'; }
			}
		}
	
		if (pagesMenuIncoming)
		{
			switch(n)
			{ 
				case 1854: if(isIE) { iLeftPos = 0;} else {iLeftPos = 0;} break;
				case 1855: if(isIE) { iLeftPos = 54;} else {iLeftPos = 54;} break;
				case 1856: if(isIE) { iLeftPos = 195;} else {iLeftPos = 195;} break;
				case 1857: if(isIE) { iLeftPos = 279;} else {iLeftPos = 279;} break;
				case 1858: if(isIE) { iLeftPos = 381;} else {iLeftPos = 381;} break;
				case 1860: if(isIE) { iLeftPos = 468;} else {iLeftPos = 468;} break;
				case 1862: if(isIE) { iLeftPos = 621;} else {iLeftPos = 621;} break;
				case 1863: if(isIE) { iLeftPos = 694;} else {iLeftPos = 694;} break;
				
				default:    iLeftPos = 0;
			
			}
						
			pagesMenuIncoming.style.top =  '30px';
			pagesMenuIncoming.style.left =  iLeftPos + 'px';
			//pagesMenuIncoming.style.margin = '-13px 0 0 ' + '160' + 'px';
			pagesMenuIncoming.style.display = 'block';
			currentPageMenu = n;
		}
	}
	else
	{ currentPageMenu = 0; }
}

closePageMenu = function()
{
	var pagesMenuIncoming	= document.getElementById('pagesOfSection_'+currentPageMenu);
	pagesMenuIncoming.style.display = 'none';
}