function load() {
	if (GBrowserIsCompatible()) {
	      var map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallZoomControl());
	var icon = new GIcon();
	icon.image = "http://maps.google.com/mapfiles/kml/pal2/icon13.png";
	icon.shadow = "http://maps.google.com/mapfiles/kml/pal2/icon13s.png";
	   icon.iconSize=new GSize(32,32);
	                            icon.shadowSize=new GSize(56,32);
	                            icon.iconAnchor=new GPoint(16,32);
	                            icon.infoWindowAnchor=new GPoint(16,0);
	map.setCenter(new GLatLng(49.30543,-117.20), 9);
	

	
}

function open1() {
var open1 =
window.open('http://www.golfcastlegar.com','','scrollbars=yes,height=600,width=800,resizable=yes');
}
function open2() {
var open2 =
window.open('http://www.granitepointe.ca','','scrollbars=yes,height=600,width=800,resizable=yes');
}
function open3() {
var open3 =
window.open('http://www.rosslandtrailcountryclub.com/','','scrollbars=yes,height=600,width=800,resizable=yes');
}

		

getCourse('castlegar', '49.30543', '-117.61904', "<h2>Castlegar Golf Course</h2>1602 Aaron Road<br />Castlegar, BC<br />V1N 4L6<br />Toll free: 1-800-666-0324<br /> ");

getCourse('Granite', '49.465', '-117.303343', "<h2>Granite Pointe</h2>1133 W Richards<br />Nelson, BC V1L 3K3<br />(250) 352-5918");

getCourse('Balfour', '49.627448', '-116.961018', "<h2>Balfour Golf Course</h2>602 Queens Bay Rd<br />Balfour, BC V1L 5P6<br />(250) 229-4672");

getCourse('Kokanee', '49.627448', '-116.811619', "<h2>Kokanee Springs Golf Course</h2>16082 Woolgar Rd<br />Crawford Bay, BC V0B 1E0<br />(250) 227-9226");

getCourse('Creston', '49.046617', '-116.495977', "<h2>Creston Golf Club</h2>1800 Mallory Rd<br />Creston BC, V0B 1G2<br />(250) 428-5515");

getCourse('Redstone', '49.067130', '-117.788461', "<h2>Redstone Golf Resort</h2>400 Golf course Rd<br />Rossland BC, V0G 1Y0<br />(250) 362-9141");

getCourse('RT', '49.170261', '-117.709945', "<h2>Rossland Trail Country Club</h2>400 Golf course Rd<br />Rossland BC, V0G 1Y0<br />(250) 362-9141");

getCourse('Christina', '49.018909', '-118.205619', "<h2>Christina Lake Golf Club</h2>Christina Lake, BC V0H 1E0<br />(250) 447-9313");

function getCourse(name, jb_lat, jb_long, info){
	
	
	var castlegarInfo = "Castlegar Golf Course";
	
	point = new GLatLng(jb_lat, jb_long);
	
	
	
	window['marker_' + name] = new GMarker(point, {icon: icon});
	map.addOverlay(window['marker_' + name]);
	
	GEvent.addListener(window['marker_' + name], "click", function() {
		window['marker_' + name].openInfoWindowHtml(info);
	});
}

}


		

