strList="
 Our Lady`s School (0 miles)
Zoom on map | View full information
 St Gerard`s School Trust School (0.2 miles)
Zoom on map | View full information
 Our Lady and St James (0.3 miles)
Zoom on map | View full information
 Bangor University Catholic Chaplaincy (0.4 miles)
Zoom on map | View full information
 Our Lady Queen of Martyrs (3.5 miles)
Zoom on map | View full information
 Ysgol Santes Helen RC Primary School (7.8 miles)
Zoom on map | View full information
 St David and St Helen (7.8 miles)
Zoom on map | View full information
";
function showResults()
{
document.getElementById("mapList").style.display="block";
}
var records = new Array(new Array('Our Lady`s School (38461-36565)',53.221358,-4.135205,'School'),new Array('St Gerard`s School Trust School (38463-36567)',53.224218,-4.137669,'School'),new Array('Our Lady and St James (60058-65089)',53.2251351,-4.1350993,'ParishChurch'),new Array('Bangor University Catholic Chaplaincy (70992-32901)',53.22739929999999,-4.139235999999983,'Other'),new Array('Our Lady Queen of Martyrs (60063-65091)',53.2641859,-4.0917439,'ParishChurch'),new Array('Ysgol Santes Helen RC Primary School (39092-37198)',53.142164,-4.270004,'School'),new Array('St David and St Helen (60072-65094)',53.142164,-4.270004,'ParishChurch'),new Array('St Mary, Porthmadog Church (60121-65116)',53.082825,-4.103949,'ParishChurch'),new Array('St Michael and All Angels (60081-65098)',53.280061,-3.831287,'ParishChurch'),new Array('The Most Holy Family (60098-65106)',53.28511,-3.812121,'ParishChurch'),new Array('Blessed William Davies School (38452-36556)',53.312092,-3.821385,'School'),new Array('Our Lady Star Of The Sea (60096-65105)',53.323334,-3.832194,'ParishChurch'),new Array('Y Bugail Da  Church (60105-65109)',53.140761,-3.795153,'ParishChurch'),new Array('Our Lady Star Of The Sea And St Winefride (60053-65087)',53.412048,-4.355396,'ParishChurch'),new Array('St Joseph`s School (38451-36555)',53.296218,-3.73626,'School'),new Array('St Joseph (60077-65096)',53.296986,-3.73353,'ParishChurch'),new Array('St Mary Magdalene (60067-65092)',52.995671,-3.934145,'ParishChurch'),new Array('Sacred Heart, Old Colwyn Church (60112-65112)',53.290306,-3.692241,'ParishChurch'),new Array('The Most Holy Redeemer (60120-65118)',52.92432,-4.132738,'ParishChurch'),new Array('The Most Holy Redeemer (60120-65116)',52.92432,-4.132738,'ParishChurch'),new Array('Holy Cross Church (60164-65140)',52.940836,-3.957831,'Church'),new Array('The Holy Spirit, Porthmadog Church (60122-65116)',52.922346,-4.234204,'ParishChurch'),new Array('St Mary Help Of Christians (60091-65103)',53.308851,-4.634692,'ParishChurch'),new Array('St Mary`s School (38450-36554)',53.308851,-4.634692,'School'),new Array('St Therese Of Lisieux (60048-65086)',53.287293,-3.580328,'ParishChurch'),new Array('Christ the King Church (60154-65130)',53.298123,-3.5337,'Church'),new Array('St Joseph, Pwllheli Church (60127-65118)',52.881598,-4.416871,'ParishChurch'),new Array('Our Lady Of The Assumption (60132-65120)',53.316641,-3.496249,'ParishChurch'),new Array('Our Lady and St Cynfil (60118-65115)',52.879588,-4.475987,'ParishChurch'),new Array('St Mary`s School (38453-36557)',53.313801,-3.475284,'School'),new Array('Blessed Edward Jones School (38454-36558)',53.314463,-3.477694,'School'),new Array('Christ the Word School (71096-75089)',53.3145548,-3.4776832,'School'),new Array('St Illtyd Church (66518-65148)',53.295731,-3.46806,'Church'),new Array('St Winefride`s RC Primary School (39091-37197)',53.257616,-3.451103,'School'),new Array('St Joseph`s (60083-65099)',53.180311,-3.426824,'ParishChurch'));
//    var IMAGES = [ "parishChurchMarker", "ChurchMarker", "PresbyteryMarker", "OtherPresbyteryMarker", "SchoolMarker", "HallMarker" ];
 //   var ICONS = [];
	var markers = []; // declared EXTERNALLY 
//    var map = null;
 //   var mgr = null;
  //  var mgr2 = null;
   // var mgr3 = null;		
 
function initialize() {
    var map = new google.maps.Map(
      document.getElementById('map_canvas'), {
        center: new google.maps.LatLng(records[0][1],records[0][2]),
        zoom: 13,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    });
	var markerName;
	for (var rows=0; rows < 8; rows++)
	{
		markerName=records[rows][3];
		if(markerName=="ParishChurch")
			markerName="Parish-Church"	
		var marker = new google.maps.Marker({
			animation: google.maps.Animation.DROP,
			position: new google.maps.LatLng(records[rows][1],records[rows][2]),
			map: map, icon: "https://www.catholicdirectory.org/Pictures/map/" + markerName + "-Marker.png", 
			title: records[rows][0]
		});
			
 		var infowindow = new google.maps.InfoWindow(); 
		google.maps.event.addListener(marker, 'click', function() {
		   load_content(map, this, infowindow);
		});
		markers.push(marker);				   
	}
}	  
function load_content(map,marker,infowindow){
   $.ajax({
     url: 'mapinfowindow.asp?var1='+marker.title,
     success: function(data){
       infowindow.setContent(""+data+"
");
       infowindow.open(map, marker);
     }
   });
}
function launchInfoWindow(x) {
    // window.scroll(0, 0);
    // markers[x].setMap(map);
    google.maps.event.trigger(markers[x], "click");
}
google.maps.event.addDomListener(window, 'load', initialize);
function loadPage(a)
{
	if(document.getElementById("frame_"+a).style.display=="none")
	{
		document.getElementById("tab_"+a).className="tab_selected";		
		document.getElementById("frame_"+a).style.display="block";	
		for (var i=0;i<3;i++)
		{
			if(i!=a)
			{
				document.getElementById("tab_"+i).className="tab"
				document.getElementById("frame_"+i).style.display="none";
			}
		}
	}
}
function sendEmail(a,b)
{
document.getElementById("CCToEmailID").value=a;
document.getElementById("CCEmailName").innerText=b;
document.getElementById('CCEmailWindow').style.display='block';
}
    //