<!--
function ToggleSearchBox(){
// Hides / Shows search box and updates link graphic

	var SearchItem=document.getElementsByName("SearchBox");
	for(var i=0;i<SearchItem.length;i++){
		if(SearchItem[i].style.display == "none"){
			SearchItem[i].style.display = "block";
			document.getElementById('ToggleLink').innerHTML='<img src="images/close-panel.gif" border="0" />';
			createCookie('SearchPan','1',7);
		}else{
			SearchItem[i].style.display = "none";
			document.getElementById('ToggleLink').innerHTML='<img src="images/open-panel.gif" width="148" border="0" />';
			createCookie('SearchPan','0',7);
		}
	}
}

function createCookie(name,value,days){
// Creates a named cookie to expire in x days
	var expires = "";
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		 expires = "; expires="+date.toGMTString();
	}
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name){
// Reads the value of the named cookie
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name){
// Erases the named cookie by setting it to expire 1 day ago
	createCookie(name,"",-1);
}

function SetupPage(){
// Called by all the pages with a search box to hide / show the pannel as apropriate
	if (readCookie('SearchPan') == '0' ){
		ToggleSearchBox();
	}
}

-->