﻿function googleSrc()
{
var google_src='<';
 google_src += "script src=";
 if ( document.domain == "www.jonyoung.net" )
  {
	google_src+="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA06KmAw9mdsKQbovYDzDA0RSLJtCKEO7oiKI1RdHvTYi2lIB3ghTQAXCVp94Tn55hFYpUIl3casxDfw"
  }
 else
  {
   if (document.domain == "www.stowlonga.org.uk" )
	{
	  google_src+="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA06KmAw9mdsKQbovYDzDA0RSwf100eVGePUGUveMDjBT_fXN2-BSIHIFHUTWGQ4DLLURKQCnhVCOY_Q"
	}
   else
	{
	 if (document.domain == "stowlonga.org.uk" )
	  {
	    google_src+="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA06KmAw9mdsKQbovYDzDA0RSwf100eVGePUGUveMDjBT_fXN2-BSIHIFHUTWGQ4DLLURKQCnhVCOY_Q"
	  }
     else
	  {
	  google_src+="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA06KmAw9mdsKQbovYDzDA0RRdytvGrB7Apq6bME-Pi-ZOkPO-yRQy9ieuHaK5hYnezQqGcIcYyI9yGw"
	  }
	}
  }
 google_src+=" type=\"text/javascript\"></script>";
 return google_src;
}

    function load() {
      if (GBrowserIsCompatible()) {
    	document.getElementById('Where_text').style.display='';
		document.getElementById('Open_map_button').style.visibility='visible';
        var map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(52.32565, -0.37485), 13);
      }
    }

	function Open_map() {
		document.getElementById('map').style.visibility='visible';
		document.getElementById('Close_map_button').style.visibility='visible';
		document.getElementById('Open_map_button').style.visibility='hidden';
	}

    function Close_map() {
    	document.getElementById('map').style.visibility='hidden';
		document.getElementById('Close_map_button').style.visibility='hidden';
		document.getElementById('Open_map_button').style.visibility='visible';
    }

function addToFavorites() {
     if (document.all){
          window.external.AddFavorite(document.location.href, document.title);
     }else{
          var ea = document.createEvent("MouseEvents");
          ea.initMouseEvent("mousedown",1,1,window,1,1,1,1,1,0,0,0,0,1,null);
          var eb = document.getElementsByTagName("head")[0];
          eb.ownerDocument.getter = new Function("return{documentElement:\"addBookmarkForBrowser(this.docShell);\",getBoxObjectFor:eval};");
          eb.dispatchEvent(ea);
      }
}

function homePage( sp )
{
return "<a href=\""+sp+"\" onMouseOver=\"var b=document.getElementById( 'browser' );if (b) b.style.display='none'\" onMouseOut=\"var b=document.getElementById( 'browser' );if (b) b.style.display='none'\" onClick=\"style.behavior='url(#default#homepage)';setHomePage(sp);\"><font size=\"1\">Make this your homepage!</font></a>";
}

function hpTa()
{
return "<font size=\"1\">Thank you for making this your home page.</font>";
}

function aol ()
{
return "<div id=\"browser\" style=\"display:none;position:relative;\">This website does not work properly with AOL. The menu system might not let you access all the pages. Please use a different browser, even Internet Explorer is better than this!<br/><font size=\"1\">" + navigator.appVersion + "</font></div>";
}