

/* for google maps */

/*
The following code displays a map of the 
local area with pan and zoom controls and 
a marker indicating the position of WNC
*/

function load()
{
	setTabHighlight();
	/*
	var vMapControl = document.getElementById("wnc_location");
	if (GBrowserIsCompatible() && vMapControl) 
	{
		var map = new GMap2(vMapControl);
         
        map.addControl(new GLargeMapControl()); //Adds pan, zoom bar and centre controls
		map.addControl(new GMapTypeControl()); //Adds buttons for switching between Map/Satellite/Hybrid
        map.setCenter(new GLatLng(-33.813500, 151.005300), 15); //Centres map on this long/lat and zooms to 15th zoom level
        map.addControl(new GScaleControl()); //Shows map scale at bottom of map
        map.addControl(new GOverviewMapControl()); //Adds large scale map in bottom right
        
        if(window.addMapOverlays) addMapOverlays(map); //Calls this function if it exists. This effectivly determines which map is being displayed, Home page or PC Support page and displays (or doesn't) the shaded overlay

       var point = new GLatLng(-33.81326279020718, 151.0058213630915); 
       var marker = new GMarker(point); 
       map.addOverlay(marker);  //Inserts a marker at the given lat/long in the previous lines
       //marker.openInfoWindowHtml("<img src=\"logo_wnc.gif\">"); //Dislays an info window when map opens -- No longer needed
       GEvent.addListener(marker, "click", function() //Reopens info window when you click on the marker if the window has been closed
		{marker.openInfoWindowHtml("<img src=\"1_Horwood_Pl.jpg\">");});
    }*/
}

function setTabHighlight()
{
	var vHomeActive = document.getElementById("tabHomeActive");
	if(vHomeActive)
	{
		var vTab = document.getElementById("tabHome");
		vTab.className = "active-tab";
	}
	
	var vHistoryActive = document.getElementById("tabHistoryActive");
	if(vHistoryActive)
	{
		var vTab = document.getElementById("tabHistory");
		vTab.className = "active-tab";
	}
	
	var vProductsActive = document.getElementById("tabProductsActive");
	if(vProductsActive)
	{
		var vTab = document.getElementById("tabProducts");
		vTab.className = "active-tab";
	}
	
		
	var vContactActive = document.getElementById("tabContactActive");
	if(vContactActive)
	{
		var vTab = document.getElementById("tabContact");
		vTab.className = "active-tab";
	}
}

