function loadImages() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
	if (document.layers) {  // Netscape 4
	document.hidepage.visibility = 'hidden';
	}
	else {  // IE 4
	document.all.hidepage.style.visibility = 'hidden';
	}
   }
	document.getElementById('loadBanner').style.visibility = 'visible';
}

var currently_open;
currently_open = 6;

function Collapse(which) {
	if (currently_open == which) {
		domCollapseAll(0);
		currently_open = 6;
	} else {
		domCollapseAll(0); 
		domCollapse(which);
		currently_open = which;
	}
}

function domCollapse(which){
	if (document.getElementById && document.createTextNode){
		if (which=="dispall") {domCollapseAll(1);}
		else if (which=="hideall") {domCollapseAll(0);}
		else {
			m=document.getElementById("menu");
			trig=m.getElementsByTagName("div").item(which).style.display;
			t=m.getElementsByTagName("span").item(which);
			h=t.getElementsByTagName("a").item(0).firstChild;
			if (trig=="block") trig="none";
			else if (trig=="" || trig=="none") trig="block";
			if (trig=="none"){
				/*h.nodeValue=h.nodeValue.replace(highlighttext,normaltext);
				t.style.background=normalbackground;
				t.style.color=normalcolour;*/
				}
			else {
				/*h.nodeValue=h.nodeValue.replace(normaltext,highlighttext);
				t.style.background=highlightbackground;
				t.style.color=highlightcolour;*/
				}
			m.getElementsByTagName("div").item(which).style.display=trig;
		}
	}
} 

/*
	function domCollapseAll(show)
	Written by Christian Heilmann
	- collapses or displays all <div></div> elements in the "menu" div of the document.
	- changes the colour and the background of all <p></p> elements in the "menu" div.
	- changes the text content of the <a></a> inside the <p></p> elements
	
	Variables:
	show:	0 > collapse all divs,set all colours to normal
			1 > show all divs,set all colours to highlight
*/
function domCollapseAll(show){
	if (document.getElementById && document.createTextNode){
		m=document.getElementById("menu");
		for (i=0;i<m.getElementsByTagName("div").length;i++){
			t=m.getElementsByTagName("span").item(i);
			h=t.getElementsByTagName("a").item(0).firstChild;
			if (show==1){
				/*h.nodeValue=h.nodeValue.replace(normaltext,highlighttext);
				t.style.background=highlightbackground;
				t.style.color=highlightcolour;
				*/
				m.getElementsByTagName("div").item(i).style.display="block";
			}
			else {
				/*h.nodeValue=h.nodeValue.replace(highlighttext,normaltext);
				t.style.background=normalbackground;
				t.style.color=normalcolour;
				*/
				m.getElementsByTagName("div").item(i).style.display="none";
			}
		}
	}
}
// Adding backwards compatibility
if (document.getElementById && document.createTextNode){
	document.write('<style type="text/css">#menu div{display:none;}</style>')
	}

