// 	Map locator DHTML functions
//	###########################################################
// 	showDetails('id'); should be called by the event handler 
//	(passing through the id of the <div> we want to display)
//

function showDetails(area,name) 
{
	if(document.getElementById)
	{
		var hiddenID = document.getElementById('hiddenID').value;	//get the name of the div that is currently displayed
		document.getElementById(hiddenID).style.display = 'none';	//hide this div that is currently displayed
		document.getElementById(name).style.display = 'block';		//show the div that the user has clicked on
		document.getElementById('hiddenID').value = name;			//reset the name of the div that is displayed to the new name
	}
	else
	{
		// in case the current url is already at an internal link,
		// split it by # and use the first object of the subsequent array
		// as the base url

		var theUrl = document.location.href.split("#");
		document.location.href = theUrl[0] + "#" + (name);
	}
}

//-->

// open map window, pass id of <div>, width and height

function showMap(name,w,h)
{
	var winh = parseInt(h) + 25; // to cater for close window button
	name = name.toLowerCase();
	mapwin=window.open("/popup/index.php?map="+(name)+"&width="+(w)+"&height="+(h),"mapWin","width="+(w)+",height="+(winh)+",resizable=no");
	mapwin.focus();
}

//-->