// JavaScript Document
// ref: http://www.netmag.co.uk/zine/ajax/working-with-google-maps
// http://code.google.com/apis/maps/documentation/examples/tile-detector.html
// http://googlemapsapi.blogspot.com/2005/11/happy-turkey-day.html
function load () {
	var map = document.getElementById("map");
	if (GBrowserIsCompatible()) {
		var gmap = new GMap2(map);
		gmap.addControl(new GSmallMapControl());
		gmap.addControl(new GMapTypeControl());
		gmap.setCenter(new GLatLng(28.033886, 1.659626), 2);
		gmap.setMapType(G_HYBRID_MAP);
		
		/*function createMarker(point,html) {
			var marker = new GMarker(point);
			GEvent.addListener(marker, "click", function() {
				marker.openInfoWindowHtml(html);
			});
			return marker;
		}*/
		
		/*Create custom icon*/
		
		function makeIcon () {
			var icon = new GIcon();
			icon.image = "images/map_icon2.png";
			icon.shadow = "images/map_icon_shadow2.png";
			icon.iconSize = new GSize(24, 35);
			icon.shadowSize = new GSize(56, 35);
			icon.iconAnchor = new GPoint(10, 35);
			icon.infoShadowAnchor = new GPoint(0, 0);
			icon.infoWindowAnchor = new GPoint(8, 1);
			return icon;
		}
		
		function createMarker(point,html1,html2) {
			/*var marker = new GMarker(point);*/
			var marker = new GMarker(point, makeIcon());
			var tabs_array = [ new GInfoWindowTab("Info", html1),
			new GInfoWindowTab("Photos", html2) ];
			GEvent.addListener(marker, "click", function() {
				marker.openInfoWindowTabsHtml(tabs_array);
			});
			return marker;
		}
		
		//Ipact HQ Aberdeen
		var point = new GLatLng(57.156690476438364, -2.134547531604767);
		var marker = createMarker(point,'<p><strong>Ipact</strong><br/>Health Sciences Building<br/>Foresterhill<br/>Aberdeen</p>','<p>Photos...</p>');
		gmap.addOverlay(marker);
		
		//Afghanistan
		var point = new GLatLng(34.51264799912868, 69.19246315956116);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Afghanistan – August 2007-August 2008</h2><h3>Review of maternal and neonatal health programmes in South Asia</h3><p>This review was undertaken to provide evidence to inform future policy, programme design and implementation for maternal and neonatal mortality reduction in South Asia.  Document review, interviews and field visits were undertaken to provide a systematic description of the design and implementation of selected maternal and neonatal mortality reduction programmes; review of programme effect and assessment of programme efficiency and sustainability.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Angola
		var point = new GLatLng(-8.813005175829508,13.230489492416382);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Angola - June 2008–ongoing </h2><h3>Planning and management of health resources</h3><p>Ipact is working in collaboration with Oxford Policy Management to provide technical advice to the Ministry of Health in Angola to strengthen its planning and management of resources, within the framework of an EC programme of support to the health sector. The work will provide an analysis of how financial resources flow through the system. Quality of spending and budget execution rates will be strengthened and assistance provided to implement planning and budgeting tools at both national and provincial level. Targeting and management of public investments will be improved.</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Bangladesh
		var point = new GLatLng(23.71088677623496, 90.40158033370972);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Bangladesh – August 2007-August 2008</h2><h3>Review of maternal and neonatal health programmes in South Asia</h3><p>This review was undertaken to provide evidence to inform future policy, programme design and implementation for maternal and neonatal mortality reduction in South Asia.  Document review, interviews and field visits were undertaken to provide a systematic description of the design and implementation of selected maternal and neonatal mortality reduction programmes; review of programme effect and assessment of programme efficiency and sustainability.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Bangladesh BRAC
		var point = new GLatLng(25.778406771440693, 88.89765501022339);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Bangladesh – 2008-2012</h2><h3>Monitoring and evaluation of maternal and neonatal health</h3><p>In partnership with BRAC, Ipact will assist in the measurement of effects of the BRAC MNCH programme. The partnership will strengthen the monitoring and implementation of the programme and contribute to capacity strengthening, especially in the assessment of maternal health and economic evaluation. Missions and field trips to BRAC\'s programme areas in Bangladesh will be undertaken over the course of the five years to develop the design and indicators for monitoring and evaluation.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Ghana
		var point = new GLatLng(5.549077786374753,-0.19290447235107422);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Ghana – March 2007</h2><h3>Health sector review (maternal health component)</h3><p>As part of a larger sector-wide review, Ipact was responsible for assessing the 5 year sectoral progress in achieving millennium development goal 5 for maternal health. Changes in maternity care indicators were reviewed, interviews and focus group sessions conducted and district visits undertaken. The findings of the review contributed to policy development for the subsequent national health plan.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//India
		var point = new GLatLng(19.036440097486082, 72.85984754562378);
		var marker = createMarker(point,'<div style="width:650px;"><h2>India – August 2007-August 2008</h2><h3>Review of maternal and neonatal health programmes in South Asia</h3><p>This review was undertaken to provide evidence to inform future policy, programme design and implementation for maternal and neonatal mortality reduction in South Asia.  Document review, interviews and field visits were undertaken to provide a systematic description of the design and implementation of selected maternal and neonatal mortality reduction programmes; review of programme effect and assessment of programme efficiency and sustainability.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Indonesia
		var point = new GLatLng(-10.161342571096625, 123.57652544975281);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Indonesia - 2006-2009</h2><h3>Monitoring and evaluation of maternal health programs in Indonesia</h3><p>This assignment aims to assess progress of two large-scale maternal, newborn and child health programmes in Indonesia. The Ipact team is responsible for the maternal health assessment and conducts regular field trips to the programmes, assessing the extent to which each have achieved their objectives as set out in their respective logical frameworks and supporting documents. The work is expected to: improve monitoring of programme progress; assess the range and utility of data collected as part of the programme implementation; build programme managers capacity to critically self-examine programme cohesion and efficiency of monitoring systems; engender effective use of data by policy makers at district and at provincial level.</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Indonesia Training
		var point = new GLatLng(-6.175403641033214, 106.82700991630554);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Ipact Training in Indonesia - July 2008</h2><h3>Training in monitoring and evaluation of maternal health programmes</h3><p>Ipact conducts training courses in association with locally based institutes. The courses aim to equip programme managers with the skills to systematically monitor and analyse the implementation of maternal and neonatal health programmes. Teaching is based on a combination of theoretical and practical exercises, using case studies with real data sourced from participants own country programmes.</p><h3>What do participants say about the course?</h3><p>"This course has brought me so much" "I have learned a lot" "Very satisfied with the course, the material and experience shared among participants" "Thank you for what has been shared during this course"</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Morocco
		var point = new GLatLng(34.00861143245376,-6.8542563915252686);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Ipact Training in Morocco - January 2008</h2><h3>Training in monitoring and evaluation of maternal health programmes</h3><p>Ipact conducts training courses in association with locally based institutes. The courses aim to equip programme managers with the skills to systematically monitor and analyse the implementation of maternal and neonatal health programmes. Teaching is based on a combination of theoretical and practical exercises, using case studies with real data sourced from participants own country programmes.</p><h3>What do participants say about the course?</h3><p>"This course has brought me so much" "I have learned a lot" "Very satisfied with the course, the material and experience shared among participants" "Thank you for what has been shared during this course"</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Nepal
		var point = new GLatLng(27.704760030950688, 85.31333327293396);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Nepal – August 2007-August 2008</h2><h3>Review of maternal and neonatal health programmes in South Asia</h3><p>This review was undertaken to provide evidence to inform future policy, programme design and implementation for maternal and neonatal mortality reduction in South Asia.  Document review, interviews and field visits were undertaken to provide a systematic description of the design and implementation of selected maternal and neonatal mortality reduction programmes; review of programme effect and assessment of programme efficiency and sustainability.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Nicaragua
		var point = new GLatLng(13.090628707264411,-85.99897563457489);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Nicaragua - 2007</h2><h3>Evaluating emergency obstetric care in Nicaragua</h3><p>Ipact together with UNFPA headquarters and UNFPA/Nicaragua was asked to conduct two separate assessments to investigate the availability and use of emergency obstetric care in Nicaragua, based on the goals associated with the UN process indicators.</p><p>The first project involved a national level assessment gathering data from all health facilities providing obstetric care in the year 2006. While the second, was based on the assessment of a three year Emergency Obstetric Care (EmOC) Project jointly sponsored by the Ministry of Health (MOH), UNFPA and the Averting Maternal Death and Disability project at Columbia University.</p><p>This project was carried out between 2002 and 2005 in the three administrative units (also know as SILAIS in Nicaragua) of Chontales, Jinotega and Rio San Juan.</p><p>The objective of the projects were to improve quality of care and to strengthen EmOC services in ten MOH health facilities, within these SILAIS, and to increase access to and demand for EmOC services in the health facilities targeted for improvement.</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Pakistan
		var point = new GLatLng(24.84989492482596,67.00548648834229);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Pakistan – August 2007 - August 2008</h2><h3>Review of maternal and neonatal health programmes in South Asia</h3><p>This review was undertaken to provide evidence to inform future policy, programme design and implementation for maternal and neonatal mortality reduction in South Asia.  Document review, interviews and field visits were undertaken to provide a systematic description of the design and implementation of selected maternal and neonatal mortality reduction programmes; review of programme effect and assessment of programme efficiency and sustainability.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Senegal
		var point = new GLatLng(14.694245329986943,-17.448343634605408);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Senegal - 2008</h2><h3>Reducing Barriers to Obstetric Care in Senegal</h3><p>In Senegal, at the request of the Ministry of Health and in collaboration with United Nations Population Fund, (UNFPA) and the Centre de Formation et de Recherche en Santé de la Reproduction (CEFOREP), Ipact scientists conducted an evaluation of two policies aimed at reducing barriers to obstetric care, one on free delivery care and another on the delegation of obstetric surgery to general practitioners. The delegation of obstetrical surgical tasks to a non specialized team showed immediate effect on access to comprehensive emergency obstetric care.</p><p>The study required close collaboration of scientists and practitioners from different disciplines. The perspectives of clinicians, policy makers, programme managers, health economists, clinicians and epidemiologists were considered in this evaluation. By bringing together individuals from these diverse backgrounds, the evaluation provided policy relevant findings which allowed reinforcement and accelerated implementation of the most beneficial components of the interventions.</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Tajikistan
		var point = new GLatLng(38.55846865727948,68.76190423965454);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Tajikistan – April–October 2008</h2><h3>Baseline household survey on a financial strategy to improve access to maternal and child health care</h3><p>The Ipact team provided technical assistance for the design and conduct of a household baseline survey to assess patient access, equity of access and provider incentives on maternal and child health services. The baseline survey is being conducted in preparation for introduction of a new basic benefits package which will define health services offered to groups of the population at specified costs.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Tunisia
		var point = new GLatLng(36.774814372186505, 10.184412002563477);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Tunisia – March 2008</h2><h3>Measuring maternal mortality</h3><p>The objective of the assignment was to determine the best approach for measuring the national maternal mortality ratio in Tunisia. Optional methods for obtaining a national maternal mortality ratio were identified through conduct of interviews, review of documents and assessments of civil and health facility registration systems, census information and existing surveys and surveillance sites.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
		
		//Uganda
		var point = new GLatLng(0.31321607987180666,32.5713837146759);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Ipact Training in Uganda - April 2008</h2><h3>Training in monitoring and evaluation of maternal health programmes</h3><p>Ipact conducts training courses in association with locally based institutes. The courses aim to equip programme managers with the skills to systematically monitor and analyse the implementation of maternal and neonatal health programmes. Teaching is based on a combination of theoretical and practical exercises, using case studies with real data sourced from participants own country programmes.</p><h3>What do participants say about the course?</h3><p>"This course has brought me so much" "I have learned a lot" "Very satisfied with the course, the material and experience shared among participants" "Thank you for what has been shared during this course"</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Vietnam
		var point = new GLatLng(21.035560464181284,105.83266139030457);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Vietnam - May-August 2008</h2><h3>Designing a national survey on maternal and neonatal mortality</h3><p>Ipact provided assistance to the national survey team to design a survey to estimate national and regional levels of maternal and neonatal mortality. Specific survey objectives were refined, and advice provided on survey methodology, sample size and sampling procedures, data collection tools, quality assurance procedures and data analysis plans. Assistance was also provided in finalizing the survey tools and implementation plan for the survey after the initial field test. Past and current initiatives to measure and record maternal and neonatal mortality were assessed to provide advice on future strategies for the long term tracking of maternal and neonatal mortality.</p></div>','<p>Not yet available...</p>');
		gmap.addOverlay(marker);
		
		//Zimbabwe
		var point = new GLatLng(-17.82585807053453,31.049187183380127);
		var marker = createMarker(point,'<div style="width:650px;"><h2>Zimbabwe – April 2007</h2><h3>Scientific review of a protocol to measure maternal and perinatal mortality and morbidity</h3><p>An assignment requiring an independent, desk based scientific review of a maternal and perinatal mortality and morbidity study proposal.  Recommendations were provided to improve the study design, research methods and instruments for measurement of maternal and perinatal outcomes.</p></div>','<p>Not available...</p>');
		gmap.addOverlay(marker);
	}
	else {
		alert("Sorry, your browser cannot display Google Maps");
	}
}
window.onload = load;
window.onunload = GUnload;
