  //<![CDATA[
// global variables

var gmarkers=[];
var map;
var request;
//var geocoder = null;
var geocoder;
var reasons=[];


// Create "medium" marker icon
var baseIcon = new GIcon();
baseIcon.image = "images/marker_red.png";
baseIcon.shadow = "images/shadow_medium.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
baseIcon.infoShadowAnchor = new GPoint(18, 25);
baseIcon.transparent = "images/mm_34_transparent.png";

// Create cityhall marker icon
var cityIcon = new GIcon();
cityIcon.image = "images/cityhall.png";
//cityIcon.shadow = "images/shadow_cityhall.png";
//cityIcon.iconSize = new GSize(20, 34);
//cityIcon.shadowSize = new GSize(37, 34);
cityIcon.iconAnchor = new GPoint(9, 34);
cityIcon.infoWindowAnchor = new GPoint(9, 2);
cityIcon.infoShadowAnchor = new GPoint(18, 25);
//cityIcon.transparent = "images/cityhall_trans.gif";

var icons=[];


function parseRateInfo(rateInfoString) {
   var returnString = rateInfoString.replace(/Bar/gi, "");

   if ((returnString == "none") || (returnString == "nosub"))  {
   	return "&nbsp;";
   } else {
   	return "&nbsp;" + ((returnString/10)+1);
   }
}

function coloredRideshareIcon(iconColor) {
   var color;
   if ((typeof(iconColor)=="undefined") || (iconColor==null)) {
      color = "red"
   } else {
      color = iconColor;
   }
   if (!icons[iconColor]) {

    var icon = new GIcon(baseIcon);

    icon.image = "images/marker_"+ color +".png";

    icons[iconColor]=icon;
   }


  return icons[iconColor];
}



    if (GBrowserIsCompatible()) {
      var isDOM = (document.getElementById) ? true : false;
      var isNS5 = ((navigator.userAgent.indexOf("Gecko")>-1) && isDOM) ? true: false;
      var sidebar_html = "";
      var ward_html = "";
      var gmarkers = [];
      var htmls = [];
      var i = 0;

      // A function to create the marker and set up the event window

      function createMarker(point,Name,Address,Phone,agegroup,vac_char,subsidy,_buildt,ratenut,rateinf,ratetod,ratepre,ratesch,loc_id,iconStr) {

if (isNS5) {
var labtext1 = '<div class=labtext1>Name: <font color=#000000>' + Name + '</font><br>Address: <font color=#000000>' + Address + '</font><br>Phone: <font color=#000000>' + Phone + '</font><br>Age: <font color=#000000>' + agegroup + '</font><br>Vacancy: <font color=#000000>' + vac_char + '</font><br>Subsidy: <font color=#000000>' + subsidy + '</font><br>Rating: <font color=#000000>' + subsidy + '</font><br>Building Type: <font color=#000000>' +_buildt+ '</font><br><br>For more information about this centre, please go to the child care<input type=button value=\"registry.\" STYLE=font-size:7pt;background-color:#FFFFFF;border-color:#336699;color:#336699 onClick=popitup1("dmc/webreg/gcreg'+ loc_id +'.html")></div>';
var lab0 =     '<div class=lab>Rating:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Low)&nbsp;<img src=\"dmc/OC08/imagesSml/_nbar.png\">&nbsp;(High)<br></div>';
var lab1 =     '<div class=lab><img src=\"images/marker_yellow.gif\" width="12" height="20" title="Infant"  alt="Infant">Infant:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ rateinf +'.png\" style="-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="infant" alt="click here for more info" onClick=popitup("dmc/OC08/popup/inf'+ loc_id +'.htm")>' + parseRateInfo(rateinf) + '<br>  </div>';
var lab2 =     '<div class=lab><img src=\"images/marker_orange.gif\" width="12" height="20" title="Toddler" alt="Toddler">Toddler:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratetod +'.png\" style="-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="toddler" alt="click here for more info" onClick=popitup("dmc/OC08/popup/tod'+ loc_id +'.htm")>' + parseRateInfo(ratetod) + '<br>  </div>';
var lab3 =     '<div class=lab><img src=\"images/marker_blue.gif\" width="12" height="20" title="Pre-school" alt="Pre-school">Pre-school:&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratepre +'.png\" style="-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="preschool" alt="click here for more info" onClick=popitup("dmc/OC08/popup/pre'+ loc_id +'.htm")>' + parseRateInfo(ratepre) + '<br>   </div>';
var lab4 =     '<div class=lab><img src=\"images/marker_green.gif\" width="12" height="20" title="School age" alt="School age">School age:&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratesch +'.png\" style="-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="schoolage" alt="click here for more info" onClick=popitup("dmc/OC08/popup/sch'+ loc_id +'.htm")>' + parseRateInfo(ratesch) + '<br><hr>  </div>';
var lab5 =     '<div class=lab>Nutrition: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratenut +'.png\" style="-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="nutrition" alt="click here for more info" onClick=popitup("dmc/OC08/popup/nut'+ loc_id +'.htm")>' + parseRateInfo(ratenut) + '</div>';
var lab6 =     '<div class=lab><font color=#000000>For details on individual ratings click on the bars!</font><br><font color=#000000>Rating of 3 and above meets City expectations,</font><a style="-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)"onClick=popitup1("quality.htm")> learn more...</a></div>';
var labstats = lab0 + lab1 + lab2 + lab3 + lab4 + lab5 + lab6;
var labphoto = '<div class=lab><img src=\"images/pg_cover_small.jpg\"><br><br>To view a parent\'s guide please <a onclick=\"window.open(this.href); return false;\" href=\"http://www.toronto.ca/children/pdf/guide.pdf\"><font color:#336699>click here.</a></font><img src="images/1x1.jpg" width="1" height="1"></div>'; //<img src="images/'+ loc_id +'.jpg">

}

else {
var labtext1 = '<div class=labtext1>Name: <font color=#000000>' + Name + '</font><br>Address: <font color=#000000>' + Address + '</font><br>Phone: <font color=#000000>' + Phone + '</font><br>Age: <font color=#000000>' + agegroup + '</font><br>Vacancy: <font color=#000000>' + vac_char + '</font><br>Subsidy: <font color=#000000>' + subsidy + '</font><br>Rating: <font color=#000000>' + subsidy + '</font><br>Building Type: <font color=#000000>' +_buildt+ '</font><br><br>For more information about this centre, please go to the child care<input type=button value=\"registry.\" STYLE=font-size:7pt;background-color:#FFFFFF;border-color:#336699;color:#336699 onClick=popitup1("dmc/webreg/gcreg'+ loc_id +'.html")></div>';
var lab0 =     '<div class=lab>Rating:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Low)&nbsp;<img src=\"dmc/OC08/imagesSml/_nbar.png\">&nbsp;(High)<br></div>';
var lab1 =     '<div class=lab><img src=\"images/marker_yellow.gif\" width="12" height="20" title="Infant"  alt="Infant">Infant:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ rateinf +'.png\" style="filter:alpha(opacity=90);-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="infant" alt="click here for more info" onClick=popitup("dmc/OC08/popup/inf'+ loc_id +'.htm")>' + parseRateInfo(rateinf) + '<br>  </div>';
var lab2 =     '<div class=lab><img src=\"images/marker_orange.gif\" width="12" height="20" title="Toddler" alt="Toddler">Toddler:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratetod +'.png\" style="filter:alpha(opacity=90);-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="toddler" alt="click here for more info" onClick=popitup("dmc/OC08/popup/tod'+ loc_id +'.htm")>' + parseRateInfo(ratetod) + '<br>  </div>';
var lab3 =     '<div class=lab><img src=\"images/marker_blue.gif\" width="12" height="20" title="Pre-school" alt="Pre-school">Pre-school:&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratepre +'.png\" style="filter:alpha(opacity=90);-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="preschool" alt="click here for more info" onClick=popitup("dmc/OC08/popup/pre'+ loc_id +'.htm")>' + parseRateInfo(ratepre) + '<br>   </div>';
var lab4 =     '<div class=lab><img src=\"images/marker_green.gif\" width="12" height="20" title="School age" alt="School age">School age :&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratesch +'.png\" style="filter:alpha(opacity=90);-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="schoolage" alt="click here for more info" onClick=popitup("dmc/OC08/popup/sch'+ loc_id +'.htm")>' + parseRateInfo(ratesch) + '<br><hr>  </div>';
var lab5 =     '<div class=lab>Nutrition: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src=\"dmc/OC08/imagesSml/_n'+ ratenut +'.png\" style="filter:alpha(opacity=90);-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="nutrition" alt="click here for more info" onClick=popitup("dmc/OC08/popup/nut'+ loc_id +'.htm")>' + parseRateInfo(ratenut) + '</div>';
var lab6 =     '<div class=lab><font color=#000000>For details on individual ratings click on the bars!</font><br><font color=#000000>Rating of 3 and above meets City expectations,</font><a style="filter:alpha(opacity=90);-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)"onClick=popitup1("quality.htm")> learn more...</a></div>';
var labstats = lab0 + lab1 + lab2 + lab3 + lab4 + lab5 + lab6;
var labphoto = '<div class=lab><img src=\"images/pg_cover_small.jpg\"><br><br>To view a parent\'s guide please <a onclick=\"window.open(this.href); return false;\" href=\"http://www.toronto.ca/children/pdf/guide.pdf\"><font color:#336699>click here.</a></font><img src="images/1x1.jpg" width="1" height="1"></div>'; //<img src="images/'+ loc_id +'.jpg">
//var labnut = '<div class=lab>Rating:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Low)&nbsp;<img src=\"images/_nbar.gif\">&nbsp;(High)<br><br>Nutrition: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=image src=\"images/_n'+ ratenut +'.gif\" style="filter:alpha(opacity=90);-moz-opacity:.9;" onMouseover="makevisible(this,1)" onMouseout="makevisible(this,0)" name="nutrition" alt="click here for more info" onClick=popitup("dmc/OC08/popup/nut'+ loc_id +'.htm")>' + parseRateInfo(ratenut) + '</div>';

}


var labtext = [ new GInfoWindowTab("Info", labtext1), new GInfoWindowTab("Rating", labstats), new GInfoWindowTab("Guide", labphoto)
];


              var icon = coloredRideshareIcon(iconStr);
              var marker = new GMarker(point, icon);
              gmarkers.push(marker);
              marker.type = iconStr;


   GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowTabsHtml(labtext);
        });
        gmarkers[i] = marker;
        htmls[i] = labtext;
            sidebar_html += '<a href="javascript:myclick(' + i + ')"><div style=\"white-space:nowrap;font: 7pt arial;background-color:#ffffff;\"><font color="red">--></font><font color="#336699">&nbsp;' + Name + '</font</a></div><br>';
        i++;
        return marker;
      }


      // This function picks up the click and opens the corresponding info window
      function myclick(i) {
        gmarkers[i].openInfoWindowTabsHtml(htmls[i]);
      }



var Clng="-79.3838";
var Clat="43.6528";

var citylng="-79.385236";
var citylat="43.652416";

      // create the map
    //  var geocoder = null;
      var geocoder;
      var reasons=[];

      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
  //  map.setCenter(new GLatLng( 43.7313,-79.5945), 15); // Rexdale
  //  map.setCenter(new GLatLng( 43.6461,-79.3891), 15); // Metro Hall
  //  map.setCenter(new GLatLng( 43.6528,-79.3838), 15); // City Hall
      map.setCenter(new GLatLng(citylat, citylng), 15);
      map.addControl(new GScaleControl());
      map.addControl(new GOverviewMapControl());
      geocoder = new GClientGeocoder();
      var cityPoint = new GLatLng(citylat, citylng, 15);

      // ====== Array for decoding the failure codes ======
      reasons[G_GEO_SUCCESS]            = "Success";
      reasons[G_GEO_MISSING_ADDRESS]    = "Missing Address: The address was either missing or had no value.";
      reasons[G_GEO_UNKNOWN_ADDRESS]    = "Unknown Address:  No corresponding geographic location could be found for the specified address.";
      reasons[G_GEO_UNAVAILABLE_ADDRESS]= "Unavailable Address:  The geocode for the given address cannot be returned due to legal or contractual reasons.";
      reasons[G_GEO_BAD_KEY]            = "Bad Key: The API key is either invalid or does not match the domain for which it was given";
      reasons[G_GEO_TOO_MANY_QUERIES]   = "Too Many Queries: The daily geocoding quota for this site has been exceeded.";
      reasons[G_GEO_SERVER_ERROR]       = "Server error: The geocoding request could not be successfully processed.";


      // A function to read the data
      function readMap(url) {
        var request = GXmlHttp.create();
        request.open("GET", url, true);
        request.onreadystatechange = function() {
          if (request.readyState == 4) {
            var xmlDoc = request.responseXML;
            // obtain the array of markers and loop through it
            var markers = xmlDoc.documentElement.getElementsByTagName("marker");

      var clusterer = new Clusterer(map);

            // hide the info window, otherwise it still stays open where the removed marker used to be
            map.getInfoWindow().hide();

            map.clearOverlays();

            // empty the array
            gmarkers = [];

            // reset the sidebar
            sidebar_html="";

            for (var i = 0; i < markers.length; i++) {
              // obtain the attribues of each marker
              var lat = parseFloat(markers[i].getAttribute("lat"));
              var lng = parseFloat(markers[i].getAttribute("lng"));
              var point = new GLatLng(lat,lng);
                       var color= markers[i].getAttribute("icon");
                       var Name = markers[i].getAttribute("Name");
                       var ratenut = markers[i].getAttribute("ratenut");
                       var rateinf = markers[i].getAttribute("rateinf");
                       var ratetod = markers[i].getAttribute("ratetod");
                       var ratepre = markers[i].getAttribute("ratepre");
                       var ratesch = markers[i].getAttribute("ratesch");
		               var Address = markers[i].getAttribute("Address");
		               var Phone = markers[i].getAttribute("Phone");
		               var agegroup = markers[i].getAttribute("agegroup");
		               var subsidy = markers[i].getAttribute("subsidy");
		               var vac_char = markers[i].getAttribute("vac_char");
                       var _buildt = markers[i].getAttribute("_buildt");
                       var title = markers[i].getAttribute("Name");
		               var loc_id = markers[i].getAttribute("loc_id");

		           // create the marker
var marker = createMarker(point,Name,Address,Phone,agegroup,vac_char,subsidy,_buildt,ratenut,rateinf,ratetod,ratepre,ratesch,loc_id,color);

            clusterer.AddMarker(marker, title);

           // map.addOverlay(new GMarker(cityPoint, cityIcon));

           }
            document.getElementById("sidebar").innerHTML = sidebar_html;


       // ========= Now process the polylines ===========
              var lines = xmlDoc.documentElement.getElementsByTagName("line");

              // read each line
              for (var a = 0; a < lines.length; a++) {

                // get any line attributes
                var ward = lines[a].getAttribute("ward");
                var colour = lines[a].getAttribute("colour");
                var width  = parseFloat(lines[a].getAttribute("width"));

                // read each point on that line
                var points = lines[a].getElementsByTagName("point");
                var pts = [];
                for (var i = 0; i < points.length; i++) {
                   pts[i] = new GLatLng(parseFloat(points[i].getAttribute("lat")),
                                       parseFloat(points[i].getAttribute("lng")));
                }
/**
function(showWard) {
             if (ward==input){
              map.addOverlay(new GPolyline(pts,colour,width));
              } else {
              alert ("already open");
              }
}
**/


              }
          // ================================================


            }
        }
        request.send(null);
      }
      // change to dmc/gc2data.xml
      readMap("dmc/gc2data.xml");
     //readMap("/children/gc2datatestbars.xml");
    }
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

var icon = new GIcon(baseIcon);
icon.image = "images/marker_trans.png";


    // ====== Plot a marker after positive reponse to "did you mean" ======
     function place(lat,lng) {
        var search = document.getElementById("search").value;
        var point = new GLatLng(lat,lng);
        map.setCenter(point,15);

        var marker = new GMarker(point, icon);
	map.addOverlay(marker);

	var pcodetext = '<div style=\"white-space:nowrap;font: 7pt arial;background-color:#ffffff;color: #000000;\">You are here!<br><br>For more information on child care<br>around your postal code or address <font color="#336699">' +search+ '</font><br>click on the adjacent markers.</div>';
	marker.openInfoWindowHtml(pcodetext);
        document.getElementById("message").innerHTML = "";
      }

     // ====== Geocoding ======
     function showAddress() {
        var search = document.getElementById("search").value;
        // ====== Perform the Geocoding ======
        geocoder.getLocations(search, function (result)
          {
        //    map.clearOverlays();
            if (result.Status.code == G_GEO_SUCCESS) {
              // ===== If there was more than one result, "ask did you mean" on them all =====
              if (result.Placemark.length > 1) {
                document.getElementById("message").innerHTML = "More than one address found:";
                // Loop through the results
                for (var i=0; i<result.Placemark.length; i++) {
                  var p = result.Placemark[i].Point.coordinates;
                  document.getElementById("message").innerHTML += "<br>"+(i+1)+": <a href='javascript:place(" +p[1]+","+p[0]+")'>"+ result.Placemark[i].address+"</a>";
                }
              }
              // ===== If there was a single marker =====
              else {
                document.getElementById("message").innerHTML = "";
                var p = result.Placemark[0].Point.coordinates;
                place(p[1],p[0]);
              }
            }
            // ====== Decode the error status ======
            else {
              var reason="Code "+result.Status.code;
              if (reasons[result.Status.code]) {
                reason = reasons[result.Status.code]
              }
              alert('Could not find "'+search+ '" ' + reason);
            }
          }
        );
      }

 function showWard(wards) {

var input=0 ;
var w1 = 1 ;
var w2 = 2 ;
var w3 = 3 ;
var w4 = 4 ;
var w5 = 5 ;
var w6 = 6 ;
var w7 = 7 ;
var w8 = 8 ;
var w9 = 9 ;
var w10 = 10 ;
var w11 = 11 ;
var w12 = 12 ;
var w13 = 13 ;
var w14 = 14 ;
var w15 = 15 ;
var w16 = 16 ;
var w17 = 17 ;
var w18 = 18 ;
var w19 = 19 ;
var w20 = 20 ;
var w21 = 21 ;
var w22 = 22 ;
var w23 = 23 ;
var w24 = 24 ;
var w25 = 25 ;
var w26 = 26 ;
var w27 = 27 ;
var w28 = 28 ;
var w29 = 29 ;
var w30 = 30 ;
var w31 = 31 ;
var w32 = 32 ;
var w33 = 33 ;
var w34 = 34 ;
var w35 = 35 ;
var w36 = 36 ;
var w37 = 37 ;
var w38 = 38 ;
var w39 = 39 ;
var w40 = 40 ;
var w41 = 41 ;
var w42 = 42 ;
var w43 = 43 ;
var w44 = 44 ;

var w = w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + w9 + w10 +
w11 + w12 + w13 + w14 + w15 + w16 + w17 + w18 + w19 + w20 +
w21 + w22 + w23 + w24 + w25 + w26 + w27 + w28 + w29 + w30 +
w31 + w32 + w33 + w34 + w35 + w36 + w37 + w38 + w39 + w40 +
w41 + w42 + w43 + w44;

 input=document.lala.wards.value;

 if(input == w1) {
     map.setCenter(new GLatLng( 43.7427, -79.59287), 14);
 } else if(input == w2) {
    map.setCenter(new GLatLng( 43.6973, -79.5479), 14);
 }  else if(input == w3) {
    map.setCenter(new GLatLng( 43.65125, -79.57425), 14);
 }  else if(input == w4) {
    map.setCenter(new GLatLng( 43.67399, -79.54729), 14);
 }  else if(input == w5) {
    map.setCenter(new GLatLng( 43.6338, -79.52128), 14);
 }  else if(input == w6) {
    map.setCenter(new GLatLng( 43.59815100, -79.51722903), 14);
 }  else if(input == w7) {
    map.setCenter(new GLatLng( 43.7427, -79.5467), 14);
 }  else if(input == w8) {
    map.setCenter(new GLatLng( 43.7658, -79.4994), 14);
 }  else if(input == w9) {
    map.setCenter(new GLatLng( 43.7365, -79.4823), 14);
 }  else if(input == w10) {
    map.setCenter(new GLatLng( 43.7616, -79.4410), 14);
 }  else if(input == w11) {
    map.setCenter(new GLatLng( 43.6895, -79.5000), 14);
 }  else if(input == w12) {
    map.setCenter(new GLatLng( 43.7019, -79.4603), 14);
 }  else if(input == w13) {
    map.setCenter(new GLatLng( 43.6492, -79.4821), 14);
 }  else if(input == w14) {
    map.setCenter(new GLatLng( 43.6484, -79.4426), 14);
 }  else if(input == w15) {
    map.setCenter(new GLatLng( 43.7108, -79.4500), 14);
 }  else if(input == w16) {
    map.setCenter(new GLatLng( 43.7280, -79.4162), 14);
 }  else if(input == w17) {
    map.setCenter(new GLatLng( 43.6813, -79.4511), 14);
 }  else if(input == w18) {
    map.setCenter(new GLatLng( 43.6553, -79.4409), 14);
 }  else if(input == w19) {
    map.setCenter(new GLatLng( 43.6429, -79.4165), 14);
 }  else if(input == w20) {
    map.setCenter(new GLatLng( 43.6544, -79.4009), 14);
 }  else if(input == w21) {
    map.setCenter(new GLatLng( 43.6895, -79.4242), 14);
}  else if(input == w22) {
    map.setCenter(new GLatLng( 43.6941, -79.3956), 14);
}  else if(input == w23) {
    map.setCenter(new GLatLng( 43.7735, -79.4161), 14);
}  else if(input == w24) {
    map.setCenter(new GLatLng( 43.7894, -79.3780), 14);
}  else if(input == w25) {
    map.setCenter(new GLatLng( 43.74079882, -79.36823231), 14);
}  else if(input == w26) {
    map.setCenter(new GLatLng( 43.70750241, -79.36281843), 14);
}  else if(input == w27) {
    map.setCenter(new GLatLng( 43.6728, -79.3787), 14);
}  else if(input == w28) {
    map.setCenter(new GLatLng( 43.6434, -79.3761), 14);
}  else if(input == w29) {
    map.setCenter(new GLatLng( 43.6892, -79.3473), 14);
}  else if(input == w30) {
    map.setCenter(new GLatLng( 43.66478260, -79.34179185), 14);
}  else if(input == w31) {
    map.setCenter(new GLatLng( 43.7002, -79.3106), 14);
}  else if(input == w32) {
    map.setCenter(new GLatLng( 43.6693, -79.3053), 14);
}  else if(input == w33) {
    map.setCenter(new GLatLng( 43.7843, -79.3491), 14);
}  else if(input == w34) {
    map.setCenter(new GLatLng( 43.7416, -79.3312), 14);
}  else if(input == w35) {
    map.setCenter(new GLatLng( 43.7149, -79.2666), 14);
}  else if(input == w36) {
    map.setCenter(new GLatLng( 43.7125, -79.2449), 14);
}  else if(input == w37) {
    map.setCenter(new GLatLng( 43.74682030, -79.28813880), 14);
}  else if(input == w38) {
    map.setCenter(new GLatLng( 43.7629, -79.2381), 14);
}  else if(input == w39) {
    map.setCenter(new GLatLng( 43.8030, -79.3117), 14);
}  else if(input == w40) {
    map.setCenter(new GLatLng( 43.7783, -79.3039), 14);
}  else if(input == w41) {
    map.setCenter(new GLatLng( 43.8063, -79.2707), 14);
}  else if(input == w42) {
    map.setCenter(new GLatLng( 43.81328313, -79.20659912), 14);
}  else if(input == w43) {
    map.setCenter(new GLatLng( 43.7614, -79.1983), 14);
}  else if(input == w44) {
    map.setCenter(new GLatLng( 43.77838861, -79.17455802), 14);
}  else if(input != w) {
    alert("The electoral ward # " + input + " does not exist!");
}
}

 //]]>

