//Needs to be called when the document has been fully loaded. Typically in the onLoad function of the body tag.
	function load(){
		
		//uncomment following line to initialize the result location
		try{loadProgramResults();}catch(e){}
		
		//uncomment following line to initialize the satellite locations
		try{loadSatelliteLocations();}catch(e){}
	}
	
	function loadProgramResults(){
		var startPoint = new GLatLng(46.862496, 103.846656);
		var startDistance = 5;
		var mapId = "mapper";
		
		
		//Data for the program results
		var items = [
		{ id: 'p1', lat : 49.171425, lang : 104.827303, title: 'Baruunburen Soum School', project: 'Textbook Program', reached : 260, date : '2006', type : 'textbook'},
		{ id: 'p2', lat : 46.196444, lang : 100.717856, title: 'Bayankhongor Aimag', project: 'Textbook Program', reached : 'Three schools in desert areas.', date : '2006', type : 'textbook'},
		{ id: 'p3', lat : 46.371731, lang : 96.255936, title: 'Esonbulag Soum School', project: 'Textbook Program', reached : '500+', date : '2006', type : 'textbook'},
		{ id: 'p4', lat : 44.617069, lang : 94.918128, title: 'Altai Soum School', project: 'School Library/Textbooks', reached : 400	, date : '2007', type : 'library'},
		{ id: 'p5', lat : 45.825875, lang : 94.81805, title: 'Togrog Soum School', project: 'School Library/Textbooks', reached : 600, date : '2007', type : 'textbook'},
		{ id: 'p6', lat : 45.930642, lang : 96.162236, title: 'Khaliun Soum School', project: 'School Library/Textbooks', reached : 390, date : '2007', type : 'library'},
		{ id: 'p7', lat : 46.371731, lang : 96.255936, title: 'Esonbulag 11-Year School', project: 'School Library/Textbooks', reached : 390, date : '2007', type : 'library'},
		{ id: 'p8', lat : 46.371731, lang : 96.255936, title: 'Esonbulag Complex School', project: 'School Library/Textbooks', reached : '1,300'	, date : '2007', type : 'library'},
		{ id: 'p9', lat : 49.781001, lang : 91.899884, title: 'Tarialan Soum School', project: 'School Library/Textbooks', reached : '900', date : '2008', type : 'library'},
		];
		
		init(items, mapId, startPoint, startDistance);
	}
	
	function loadSatelliteLocations(){
		var startPoint = new GLatLng(33.431441, 1.757813);
		var startDistance = 1;
		var mapId = "mapper2";

		//Data for the sattelite locations. I just copied loadProgramResults'.
		var items = [
		{ id: '10', lat : 44.055025, lang : -123.10112, title: 'Eugene, Oregon', project: 'Textbook Program', reached : 260, date : '2006', type : 'textbook'},
		{ id: '11', lat : 45.541946, lang :-122.34787, title: 'Portland, Oregon', project: 'Textbook Program', reached : 'Three schools in desert areas.', date : '2006', type : 'textbook'},
		{ id: '12', lat : 47.63856, lang : -122.34787, title: 'Seattle, Washington', project: 'Textbook Program', reached : '500+', date : '2006', type : 'textbook'},
		{ id: '13', lat : 37.785368, lang : -122.419281, title: 'San Francisco, California', project: 'School Library/Textbooks', reached : 400	, date : '2007', type : 'library'},
		{ id: '14', lat : 34.095885, lang : -118.243103, title: 'Los Angeles, California', project: 'School Library/Textbooks', reached : 600, date : '2007', type : 'textbook'},
		{ id: '15', lat : -27.465023, lang : 153.027878, title: 'Brisbane, Australia', project: 'School Library/Textbooks', reached : 390, date : '2007', type : 'library'},
		];
		
		init(items, mapId, startPoint, startDistance);
	}

	function loadSatelliteLocations(){
		var startPoint = new GLatLng(42.650122, -119.20166);
		var startDistance = 6;
		var mapId = "mapper3";

		//Data for Nathan Blair races'.
		var items = [
		{ id: '16', lat : 38.887859490561205, lang : -121.02006912231445, title: 'Way Too Cool 50k', distance : '50k (31 miles)', racedate : 'March 14, 2009', finishtime : '5\:53\:01', placement : '221 of 449', type : 'race2'},
		{ id: '17', lat : 45.33112076223416, lang :-121.7100191116333, title: 'Mt Hood Pacific Crest Trail Ultramarathon', distance : '50 miles', racedate : 'July 25, 2009', type : 'race'},
		{ id: '18', lat : 43.600517, lang : -122.03697, title: 'Where\'s Waldo 100k', distance : '100k (62 miles)', racedate : 'August 22, 2009', type : 'race'},
		{ id: '19', lat : 45.098639, lang : -121.751057, title: 'Hundred in the Hood Ultra 100 Miler', distance : '100 miles', racedate : 'September 26-27, 2009', type : 'race'},
		];
		
		init(items, mapId, startPoint, startDistance);
	}

function loadSatelliteLocations(){
		var startPoint = new GLatLng(44.042594, -123.074212);
		var startDistance = 15;
		var mapId = "mapper4";

		//Data for Books for Books'.
		var items = [
		{ id: 'b1', lat : 44.046454, lang : -123.072238, title: 'Yamada Language Center', address : 'Inside Pacific Hall, UO Campus', type : 'b4b'},
		{ id: 'b2', lat : 44.040635, lang :-123.075269, title: 'The Onyx House', address : '1850 Onyx Street', type : 'b4b'},
		{ id: 'b3', lat : 44.046061, lang : -123.077908, title: 'The Glenwood Cafe', address : '1340 Alder Street', type : 'b4b'},
		];
		
		init(items, mapId, startPoint, startDistance);
	}