<!--
//<![CDATA[
		 
var map = null;
var bounds = null;
var firstlink = false;

$(document).ready(function() {	
						   	
	//Undo Zebra striping
	$("tr:nth-child(odd)").removeClass("odd");	
	
	//Hover class for table
	$("#locatorresults tr").hover(
		function() {
			$(this).addClass("tablehover");
			$(this).find("img.map_icon").attr("src", "/gfx/icon_map_on.gif");
		},
		function() {
			$(this).removeClass("tablehover");
			$(this).find("img.map_icon").attr("src", "/gfx/icon_map.gif");
		}
	);

	//Initialize map
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map_panel"));
		map.setUIToDefault();
		map.setCenter(new GLatLng(54,-2), 5);
	}

	// Click class for table
	$("#locatorresults tr").click(function () {
		
	   	//get lat/long from div
		var coord = $(this).attr("rel").split("|");
	   	var point = new GLatLng(coord[0],coord[1]);
		var marker = new GMarker(point)
		var elid = $(this).attr('id');
	   
	   	//stick a point on map
		map.addOverlay(marker)
		map.setCenter(point, 13);

		//stick a bubble on that point
		marker.openInfoWindow($("#d_" + elid + "").html());
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml($("#d_" + elid + "").html());	
		});
		
	   	//stick more info and related documents on page
	   	$("#moreInfo").html($("#e_" + elid + "").html());
		$("#related").html($("#f_" + elid + "").html());
		
	});
	
	$("#link0").click();
	
});
//]]>
-->	


