
//var ids = new Array('LandingPage','HeartInst','History','17-Foot','FastFact','HeritageWall','Chapel','Story','AudioVideo','MapsWayfinding','ClinicalExcellence');
var ids = new Array('GrandOpening','LandingPage','HeartInst','History','17-Foot','Chapel','MapsWayfinding','ClinicalExcellence','ThankYou');


function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
		document.getElementById(id+'Select').className = 'none';
		
	}
	
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

// JavaScript Document
function toggleLayer(whichLayer) {
hideallids();
var elem, vis;
if(document.getElementById) // this is the way the standards work
elem = document.getElementById(whichLayer);
else if(document.all) // this is the way old msie versions work
elem = document.all[whichLayer];
else if(document.layers) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style; // if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
vis.display = (vis.display==''||vis.display=='block')?'none':'block';

document.getElementById(whichLayer+'Select').className = 'selected';
}