function ToggleHelp(rValue)
{ 	
    var helpDiv = document.getElementById(rValue);
    helpDiv.style.display = (helpDiv.style.display == "none" || helpDiv.style.display == "") ? "block" : "none";
}

function ClearSearch(rValue)
{
    if(rValue != null)
    {
        if(rValue.value == "search")
        {
	        rValue.value = "";
        }
        else
        {
	        rValue.select();
        }
    }
}

function CancelEventBubble()
{
    if (!e)
    { 
	    var e = window.event;
    }
	
    e.cancelBubble = true;
	
    if (e.stopPropagation)
    { 
	    e.stopPropagation();
    }
}

function load() 
{
    if (GBrowserIsCompatible()) 
    {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());           //navigation & zoom controls
        map.addControl(new GMapTypeControl());            //view maptype control - [map, satellite, hybrid]
        map.setCenter(new GLatLng(53.43635, -2.16588), 13); //set center [our address]
        map.addOverlay(new GMarker(map.getCenter()));     //set marker on center
    }
}

function Initialise()
{
    var element = document.getElementById("pageNavTabs");

    if(element != null)
    {
        for(index in element.children)
        {
            if(element.children[index].tagName == "LI")
            {
                element.children[index].onmouseover = NavigationTabOver;
                element.children[index].onmouseout = NavigationTabOut;
                element.children[index].onfocus = NavigationTabOver;
                element.children[index].onblur = NavigationTabOut;
            }
        }
    }
}

function pageLoad()
{
    Initialise();
    
    if(document.getElementById("map") != null)
    {
        load();
        window.onunload = GUnload;
    }
}