site_url = 'index.html';

hide_map_related_objects = function()
{
	document.getElementById('map1').style.display='none';
	document.getElementById('map2').style.display='none';
	document.getElementById('map3').style.display='none';
	document.getElementById('map4').style.display='none';
	document.getElementById('map5').style.display='none';
	document.getElementById('map6').style.display='none';
	document.getElementById('map7').style.display='none';
	document.getElementById('map8').style.display='none';
}

show_map_related_objects = function(num)
{
	hide_map_related_objects();
	document.getElementById(num).style.display='block';	
}

swap_video = function()
{
document.getElementById('video_player1').style.display='none';
document.getElementById('video_player2').style.display='block';
}

/*
	Standards Compliant Rollover Script
	Author : Daniel Nolan
	http://www.bleedingego.co.uk/webdev.php
*/

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_on'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_on'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;

function myCallBackOnFinish () {

document.getElementById('mySearchBox').style.visibility='visible';
document.getElementById('mySearchBox').style.display='block';

}

function myCallBackOnFinishHidden () {

document.getElementById('mySearchBox').style.visibility='hidden';
document.getElementById('mySearchBox').style.display='none';
document.getElementById('topRightNavHidden').style.visibility='hidden';
document.getElementById('topRightNavHidden').style.display='none';
document.getElementById('topRightNav').style.visibility='visible';
document.getElementById('topRightNav').style.display='block';

}

function pullSearchMenu (myLayer) {

document.getElementById('topRightNav').style.visibility='hidden';
document.getElementById('topRightNav').style.display='none';
document.getElementById('topRightNavHidden').style.visibility='visible';
document.getElementById('topRightNavHidden').style.display='block';

	new Effect.MoveBy(myLayer, 30, 0,
	{ duration: 0.5,
	
	afterFinish: myCallBackOnFinish });
}

function removeSearchMenu (myLayer) {

		new Effect.MoveBy(myLayer, -30, 0,
	{ duration: 0.5,
	
	afterFinish: myCallBackOnFinishHidden });

}

// preload rollover images
<!--

shelter_nav_off = new Image();      
shelter_nav_off.src = site_url + "images/static/shelter_nav_off.gif";

shelter_nav_on = new Image();      
shelter_nav_on.src = site_url + "images/static/shelter_nav_on.gif";

health_nav_off = new Image();      
health_nav_off.src = site_url + "images/static/health_nav_off.gif";

health_nav_on = new Image();      
health_nav_on.src = site_url + "images/static/health_nav_on.gif";

water_nav_off = new Image();      
water_nav_off.src = site_url + "images/static/water_nav_off.gif";

water_nav_on = new Image();      
water_nav_on.src = site_url + "images/static/water_nav_on.gif";

education_nav_off = new Image();      
education_nav_off.src = site_url + "images/static/education_nav_off.gif";

education_nav_on = new Image();      
education_nav_on.src = site_url + "images/static/education_nav_on.gif";

energy_nav_off = new Image();      
energy_nav_off.src = site_url + "images/static/energy_nav_off.gif";

energy_nav_on = new Image();      
energy_nav_on.src = site_url + "images/static/energy_nav_on.gif";

transport_nav_off = new Image();      
transport_nav_off.src = site_url + "images/static/transport_nav_off.gif";

transport_nav_on = new Image();      
transport_nav_on.src = site_url + "images/static/transport_nav_on.gif";






  
  
function rollOn(imgName) {
		
	document[imgName].src = eval(imgName + "_on.src");	

}

function rollOff(imgName) {
		
	document[imgName].src = eval(imgName + "_off.src");
	
}	
	
	
	function swapBgColorOn(whatDiv) {
	document.getElementById(whatDiv).style.backgroundColor = '#1481d4';
	}

	function swapBgColorOff(whatDiv) {
	document.getElementById(whatDiv).style.backgroundColor = '#D27000';
	}
	

