function swapDiv(whichOff, whichOn)
{
	document.getElementById(whichOn).style.display='none';
 	document.getElementById(whichOff).style.display='block';
}

function getEmailAddress(el1, el2, el3, label)
{
   	var email = el1 + "@" + el2 + "." + el3;
	var link = "<a href='mailto:"+email+"'>"+label+"</a>";
   	return link;
}

function toggleDiv (which)
{
	var displayTo="block";

	if (document.getElementById(which).style.display=="block")
	displayTo="none";
	
	document.getElementById(which).style.display=displayTo;
}

function loadMap(lat, lng) 
{
    var map = new VEMap('mapdiv');
 
    map.LoadMap(new VELatLong(lat, lng), 13);
    var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());
    shape.SetCustomIcon("<img src='/images/map_icon.png'/>");
   map.AddShape(shape);
   map.HideDashboard();
}


function showDiv(divToShow)
{
 hideDivs();
 document.getElementById(divToShow).style.display = "block";
}

function hideDivs()
{
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
			for (var i=0; i<sfEls.length; i++) 
			{
		
					sfEls[i].className=sfEls[i].className.replace(new RegExp(" sfhover\\b"), "");

			}
 
}
