function addMarkers()
{
mySelect = document.getElementById('selection');
New_Brunswick = [];Monroe_Township = [];Old_Bridge = [];Perth_Amboy = [];Piscataway = [];Parlin = [];North_Brunswick = [];Avenel = [];Monroe_Twp = [];Highland_Park = [];Edison = [];E_Brunswick = [];Monmouth_Junction = [];Kendall_Park = [];Metuchen = [];Carteret = [];East_Brunswick = [];Matawan = [];Colonia = [];Plainsboro = [];Cranbury = [];Dayton = [];Dunellen = [];Spotswood = [];Fords = [];South_Plainfield = [];Jamesburg = [];Middlesex = [];Iselin = [];Milltown = [];Cliffwood_Beach = [];Sewaren = [];Woodbridge = [];Laurence_Harbor = [];Port_Reading = [];Sayreville = [];South_Amboy = [];South_River = [];mySelect.options[mySelect.options.length] = new Option("Avenel schools",'all=Avenel');
mySelect.options[mySelect.options.length] = new Option("Carteret schools",'all=Carteret');
mySelect.options[mySelect.options.length] = new Option("Cliffwood Beach schools",'all=Cliffwood_Beach');
mySelect.options[mySelect.options.length] = new Option("Colonia schools",'all=Colonia');
mySelect.options[mySelect.options.length] = new Option("Cranbury schools",'all=Cranbury');
mySelect.options[mySelect.options.length] = new Option("Dayton schools",'all=Dayton');
mySelect.options[mySelect.options.length] = new Option("Dunellen schools",'all=Dunellen');
mySelect.options[mySelect.options.length] = new Option("E Brunswick schools",'all=E_Brunswick');
mySelect.options[mySelect.options.length] = new Option("East Brunswick schools",'all=East_Brunswick');
mySelect.options[mySelect.options.length] = new Option("Edison schools",'all=Edison');
mySelect.options[mySelect.options.length] = new Option("Fords schools",'all=Fords');
mySelect.options[mySelect.options.length] = new Option("Highland Park schools",'all=Highland_Park');
mySelect.options[mySelect.options.length] = new Option("Iselin schools",'all=Iselin');
mySelect.options[mySelect.options.length] = new Option("Jamesburg schools",'all=Jamesburg');
mySelect.options[mySelect.options.length] = new Option("Kendall Park schools",'all=Kendall_Park');
mySelect.options[mySelect.options.length] = new Option("Laurence Harbor schools",'all=Laurence_Harbor');
mySelect.options[mySelect.options.length] = new Option("Matawan schools",'all=Matawan');
mySelect.options[mySelect.options.length] = new Option("Metuchen schools",'all=Metuchen');
mySelect.options[mySelect.options.length] = new Option("Middlesex schools",'all=Middlesex');
mySelect.options[mySelect.options.length] = new Option("Milltown schools",'all=Milltown');
mySelect.options[mySelect.options.length] = new Option("Monmouth Junction schools",'all=Monmouth_Junction');
mySelect.options[mySelect.options.length] = new Option("Monroe Township schools",'all=Monroe_Township');
mySelect.options[mySelect.options.length] = new Option("Monroe Twp schools",'all=Monroe_Twp');
mySelect.options[mySelect.options.length] = new Option("New Brunswick schools",'all=New_Brunswick');
mySelect.options[mySelect.options.length] = new Option("North Brunswick schools",'all=North_Brunswick');
mySelect.options[mySelect.options.length] = new Option("Old Bridge schools",'all=Old_Bridge');
mySelect.options[mySelect.options.length] = new Option("Parlin schools",'all=Parlin');
mySelect.options[mySelect.options.length] = new Option("Perth Amboy schools",'all=Perth_Amboy');
mySelect.options[mySelect.options.length] = new Option("Piscataway schools",'all=Piscataway');
mySelect.options[mySelect.options.length] = new Option("Plainsboro schools",'all=Plainsboro');
mySelect.options[mySelect.options.length] = new Option("Port Reading schools",'all=Port_Reading');
mySelect.options[mySelect.options.length] = new Option("Sayreville schools",'all=Sayreville');
mySelect.options[mySelect.options.length] = new Option("Sewaren schools",'all=Sewaren');
mySelect.options[mySelect.options.length] = new Option("South Amboy schools",'all=South_Amboy');
mySelect.options[mySelect.options.length] = new Option("South Plainfield schools",'all=South_Plainfield');
mySelect.options[mySelect.options.length] = new Option("South River schools",'all=South_River');
mySelect.options[mySelect.options.length] = new Option("Spotswood schools",'all=Spotswood');
mySelect.options[mySelect.options.length] = new Option("Woodbridge schools",'all=Woodbridge');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.45169830,40.48590469),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("A Chester Redshaw Elementary School",'New_Brunswick=' + New_Brunswick.length);
Monroe_Township[Monroe_Township.length] = createMarker(new GPoint(-74.29718781,40.45450592),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Academy Learning Center",'Monroe_Township=' + Monroe_Township.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.31191254,40.39892578),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Alan B Shepard Elementary School",'Old_Bridge=' + Old_Bridge.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.41429901,40.52030182),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alternative School",'New_Brunswick=' + New_Brunswick.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.26504600,40.51407400),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Anthony V Ceres School",'Perth_Amboy=' + Perth_Amboy.length);
Monroe_Township[Monroe_Township.length] = createMarker(new GPoint(-74.55623627,40.33795929),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Applegarth Middle School",'Monroe_Township=' + Monroe_Township.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.44690000,40.59059300),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Arbor Middle School",'Piscataway=' + Piscataway.length);
Parlin[Parlin.length] = createMarker(new GPoint(-74.30669403,40.46790695),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Arleth Elementary School",'Parlin=' + Parlin.length);
North_Brunswick[North_Brunswick.length] = createMarker(new GPoint(-74.47296143,40.44820023),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Arthur M. Judd Elementary School",'North_Brunswick=' + North_Brunswick.length);
Avenel[Avenel.length] = createMarker(new GPoint(-74.27760315,40.58129883),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Avenel Middle School",'Avenel=' + Avenel.length);
Avenel[Avenel.length] = createMarker(new GPoint(-74.27760315,40.58129883),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Avenel Street Elementary School",'Avenel=' + Avenel.length);
Monroe_Twp[Monroe_Twp.length] = createMarker(new GPoint(-74.44129944,40.33840179),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Barclay Brook Elementary School",'Monroe_Twp=' + Monroe_Twp.length);
Highland_Park[Highland_Park.length] = createMarker(new GPoint(-74.42278290,40.49564743),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bartle School",'Highland_Park=' + Highland_Park.length);
Edison[Edison.length] = createMarker(new GPoint(-74.36340332,40.57680130),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Benjamin Franklin Elementary School",'Edison=' + Edison.length);
E_Brunswick[E_Brunswick.length] = createMarker(new GPoint(-74.36810303,40.41299057),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bowne-munro Elementary School",'E_Brunswick=' + E_Brunswick.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.48989868,40.52650452),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bright Beginnings Lrn Cnt",'Piscataway=' + Piscataway.length);
Monmouth_Junction[Monmouth_Junction.length] = createMarker(new GPoint(-74.54879761,40.39089966),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brooks Crossing Elementary School",'Monmouth_Junction=' + Monmouth_Junction.length);
Monroe_Township[Monroe_Township.length] = createMarker(new GPoint(-74.44129944,40.33840179),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brookside School",'Monroe_Township=' + Monroe_Township.length);
Kendall_Park[Kendall_Park.length] = createMarker(new GPoint(-74.53129578,40.43430328),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brunswick Acres Elementary School",'Kendall_Park=' + Kendall_Park.length);
Kendall_Park[Kendall_Park.length] = createMarker(new GPoint(-74.56314087,40.41874313),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cambridge Elementary School",'Kendall_Park=' + Kendall_Park.length);
Metuchen[Metuchen.length] = createMarker(new GPoint(-74.35710144,40.54280090),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Campbell Elementary School",'Metuchen=' + Metuchen.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.32559967,40.39550018),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Carl Sandburg Middle School",'Old_Bridge=' + Old_Bridge.length);
Carteret[Carteret.length] = createMarker(new GPoint(-74.22699738,40.58080673),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Carteret High School",'Carteret=' + Carteret.length);
Carteret[Carteret.length] = createMarker(new GPoint(-74.23419952,40.58190536),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Carteret Middle School",'Carteret=' + Carteret.length);
East_Brunswick[East_Brunswick.length] = createMarker(new GPoint(-74.39711761,40.43555832),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'East_Brunswick=' + East_Brunswick.length);
Matawan[Matawan.length] = createMarker(new GPoint(-74.23960114,40.41199875),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cheesequake Elementary School",'Matawan=' + Matawan.length);
E_Brunswick[E_Brunswick.length] = createMarker(new GPoint(-74.37509155,40.42630768),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chittick Elementary School",'E_Brunswick=' + E_Brunswick.length);
E_Brunswick[E_Brunswick.length] = createMarker(new GPoint(-74.41158295,40.45924759),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Churchill Jr",'E_Brunswick=' + E_Brunswick.length);
Colonia[Colonia.length] = createMarker(new GPoint(-74.31439972,40.59249878),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Claremont Avenue Elementary School",'Colonia=' + Colonia.length);
Colonia[Colonia.length] = createMarker(new GPoint(-74.31439972,40.59249878),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Colonia High School",'Colonia=' + Colonia.length);
Colonia[Colonia.length] = createMarker(new GPoint(-74.31439972,40.59249878),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Colonia Middle School",'Colonia=' + Colonia.length);
Carteret[Carteret.length] = createMarker(new GPoint(-74.22136688,40.57342148),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Columbus Elementary School",'Carteret=' + Carteret.length);
Plainsboro[Plainsboro.length] = createMarker(new GPoint(-74.58499908,40.33179855),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Community Middle School",'Plainsboro=' + Plainsboro.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.47835541,40.53439331),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Conackamack Middle School",'Piscataway=' + Piscataway.length);
Kendall_Park[Kendall_Park.length] = createMarker(new GPoint(-74.57334137,40.41154861),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Constable Elementary School",'Kendall_Park=' + Kendall_Park.length);
Cranbury[Cranbury.length] = createMarker(new GPoint(-74.51618195,40.31155777),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cranbury Elementary School",'Cranbury=' + Cranbury.length);
Monmouth_Junction[Monmouth_Junction.length] = createMarker(new GPoint(-74.53550720,40.39246750),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Crossroads Middle School",'Monmouth_Junction=' + Monmouth_Junction.length);
Dayton[Dayton.length] = createMarker(new GPoint(-74.51016998,40.37271881),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dayton Elementary School",'Dayton=' + Dayton.length);
Dunellen[Dunellen.length] = createMarker(new GPoint(-74.46823883,40.59252167),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dunellen High School",'Dunellen=' + Dunellen.length);
Parlin[Parlin.length] = createMarker(new GPoint(-74.29273987,40.45508194),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dwight D Eisenhower Elementary School",'Parlin=' + Parlin.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.45178223,40.56318665),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dwight D Eisenhower Elementary School",'Piscataway=' + Piscataway.length);
Spotswood[Spotswood.length] = createMarker(new GPoint(-74.39450073,40.39379883),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("E Raymond Appleby Elementary School",'Spotswood=' + Spotswood.length);
E_Brunswick[E_Brunswick.length] = createMarker(new GPoint(-74.40048218,40.43392563),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("East Brunswick High School",'E_Brunswick=' + E_Brunswick.length);
Metuchen[Metuchen.length] = createMarker(new GPoint(-74.35710144,40.54280090),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Edgar Middle School",'Metuchen=' + Metuchen.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Edison High School",'Edison=' + Edison.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.26728821,40.51810455),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Edward J. Patten Elementary School",'Perth_Amboy=' + Perth_Amboy.length);
Fords[Fords.length] = createMarker(new GPoint(-74.31050110,40.53590012),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ford Avenue Elementary School",'Fords=' + Fords.length);
Fords[Fords.length] = createMarker(new GPoint(-74.31050110,40.53590012),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Fords Middle School",'Fords=' + Fords.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.41718700,40.58494900),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franklin",'South_Plainfield=' + South_Plainfield.length);
East_Brunswick[East_Brunswick.length] = createMarker(new GPoint(-74.39979553,40.41078568),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Frost Elementary School",'East_Brunswick=' + East_Brunswick.length);
Spotswood[Spotswood.length] = createMarker(new GPoint(-74.39221954,40.40255356),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("G Austin Schoenly Elementary School",'Spotswood=' + Spotswood.length);
Jamesburg[Jamesburg.length] = createMarker(new GPoint(-74.43769836,40.35200882),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Grace M Breckwedel Middle School",'Jamesburg=' + Jamesburg.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.47284698,40.56689835),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Grandview Elementary School",'Piscataway=' + Piscataway.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.41500092,40.57780075),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Grant Central Sixth School",'South_Plainfield=' + South_Plainfield.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.44148254,40.48594284),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greater Brunswick Charter School",'New_Brunswick=' + New_Brunswick.length);
Kendall_Park[Kendall_Park.length] = createMarker(new GPoint(-74.55030060,40.42850494),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greenbrook Elementary School",'Kendall_Park=' + Kendall_Park.length);
E_Brunswick[E_Brunswick.length] = createMarker(new GPoint(-74.39305878,40.41889572),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hammarskjold Middle School",'E_Brunswick=' + E_Brunswick.length);
Parlin[Parlin.length] = createMarker(new GPoint(-74.30280304,40.46070099),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harry S Truman Elementary School",'Parlin=' + Parlin.length);
Middlesex[Middlesex.length] = createMarker(new GPoint(-74.50017000,40.57863400),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hazelwood",'Middlesex=' + Middlesex.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Herbert Hoover Middle School",'Edison=' + Edison.length);
Highland_Park[Highland_Park.length] = createMarker(new GPoint(-74.42469788,40.50160217),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Highland Park High School",'Highland_Park=' + Highland_Park.length);
Highland_Park[Highland_Park.length] = createMarker(new GPoint(-74.42467400,40.50244000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Highland Park Middle School",'Highland_Park=' + Highland_Park.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.26825400,40.51881800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ignacio Cruz Ecc",'Perth_Amboy=' + Perth_Amboy.length);
Dayton[Dayton.length] = createMarker(new GPoint(-74.51096344,40.37462616),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Indian Fields Elementary School",'Dayton=' + Dayton.length);
Iselin[Iselin.length] = createMarker(new GPoint(-74.31670380,40.57089996),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Indiana Avenue Elementary School",'Iselin=' + Iselin.length);
Highland_Park[Highland_Park.length] = createMarker(new GPoint(-74.41759491,40.50190353),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Irving Elementary School",'Highland_Park=' + Highland_Park.length);
East_Brunswick[East_Brunswick.length] = createMarker(new GPoint(-74.40499878,40.43190002),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Irwin School",'East_Brunswick=' + East_Brunswick.length);
Iselin[Iselin.length] = createMarker(new GPoint(-74.31670380,40.57089996),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Iselin Middle School",'Iselin=' + Iselin.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("J P Stevens High School",'Edison=' + Edison.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.28656769,40.53311920),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("James J. Flynn Elementary School",'Perth_Amboy=' + Perth_Amboy.length);
Edison[Edison.length] = createMarker(new GPoint(-74.36340332,40.57680130),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("James Madison Inter Elementary School",'Edison=' + Edison.length);
Edison[Edison.length] = createMarker(new GPoint(-74.36340332,40.57680130),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("James Madison Prim Elementary School",'Edison=' + Edison.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.32559967,40.39550018),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("James Mc Divitt Elementary School",'Old_Bridge=' + Old_Bridge.length);
Edison[Edison.length] = createMarker(new GPoint(-74.34010315,40.52930069),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("James Monroe Elementary School",'Edison=' + Edison.length);
North_Brunswick[North_Brunswick.length] = createMarker(new GPoint(-74.48981476,40.46590805),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John Adams Elementary School",'North_Brunswick=' + North_Brunswick.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("John Adams Middle School",'Edison=' + Edison.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.40467834,40.59499359),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John E Riley Elementary School",'South_Plainfield=' + South_Plainfield.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.39794159,40.58588028),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John F Kennedy Elementary School",'South_Plainfield=' + South_Plainfield.length);
Iselin[Iselin.length] = createMarker(new GPoint(-74.31670380,40.57089996),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("John F Kennedy Mem High School",'Iselin=' + Iselin.length);
Jamesburg[Jamesburg.length] = createMarker(new GPoint(-74.44129944,40.33840179),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John F. Kennedy Elementary School",'Jamesburg=' + Jamesburg.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John Marshall Elementary School",'Edison=' + Edison.length);
Dunellen[Dunellen.length] = createMarker(new GPoint(-74.46694183,40.58258057),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John P Faber Elementary School",'Dunellen=' + Dunellen.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.32559967,40.39550018),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jonas Salk Middle School",'Old_Bridge=' + Old_Bridge.length);
Milltown[Milltown.length] = createMarker(new GPoint(-74.43987274,40.45168686),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Joyce Kilmer Middle School",'Milltown=' + Milltown.length);
Iselin[Iselin.length] = createMarker(new GPoint(-74.31670380,40.57089996),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kennedy Park Elementary School",'Iselin=' + Iselin.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.48797607,40.53876495),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Knollwood Elementary School",'Piscataway=' + Piscataway.length);
Fords[Fords.length] = createMarker(new GPoint(-74.31050110,40.53590012),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lafayette Est 25 Elementary School",'Fords=' + Fords.length);
E_Brunswick[E_Brunswick.length] = createMarker(new GPoint(-74.41684723,40.46250534),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lawrence Brook Elementary School",'E_Brunswick=' + E_Brunswick.length);
Cliffwood_Beach[Cliffwood_Beach.length] = createMarker(new GPoint(-74.23802948,40.44664383),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Leroy Gordon Cooper Elementary School",'Cliffwood_Beach=' + Cliffwood_Beach.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Edison=' + Edison.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.45381927,40.50032806),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'New_Brunswick=' + New_Brunswick.length);
Dunellen[Dunellen.length] = createMarker(new GPoint(-74.46795654,40.59296036),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lincoln Middle School",'Dunellen=' + Dunellen.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lindeneau Elementary School",'Edison=' + Edison.length);
North_Brunswick[North_Brunswick.length] = createMarker(new GPoint(-74.46066284,40.46980286),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Linwood Middle School",'North_Brunswick=' + North_Brunswick.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.44390106,40.48830032),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Livingston Elementary School",'New_Brunswick=' + New_Brunswick.length);
North_Brunswick[North_Brunswick.length] = createMarker(new GPoint(-74.48130035,40.45100021),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Livingston Park Elementary School",'North_Brunswick=' + North_Brunswick.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-119.88195801,39.62412643),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lord Stirling Elementary School",'New_Brunswick=' + New_Brunswick.length);
Colonia[Colonia.length] = createMarker(new GPoint(-74.31439972,40.59249878),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lynn Crest Elementary School",'Colonia=' + Colonia.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.36199188,40.40910721),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("M Scott Carpenter Elementary School",'Old_Bridge=' + Old_Bridge.length);
Parlin[Parlin.length] = createMarker(new GPoint(-74.30738831,40.45170593),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Madison Park Elementary School",'Parlin=' + Parlin.length);
Edison[Edison.length] = createMarker(new GPoint(-74.36340332,40.57680130),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Martin Luther King Elementary School",'Edison=' + Edison.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.48115540,40.53350067),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Martin Luther King Middle School",'Piscataway=' + Piscataway.length);
Sewaren[Sewaren.length] = createMarker(new GPoint(-74.25959778,40.55519867),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Matthew Jago Elementary School",'Sewaren=' + Sewaren.length);
Woodbridge[Woodbridge.length] = createMarker(new GPoint(-74.28649902,40.55450058),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mawbey Street Elementary School",'Woodbridge=' + Woodbridge.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.26853180,40.50766754),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mc Ginnis Middle School",'Perth_Amboy=' + Perth_Amboy.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.44380900,40.49477000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mckinley Comm",'New_Brunswick=' + New_Brunswick.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mdsex City V0c Acd Sci/eng High School",'Edison=' + Edison.length);
East_Brunswick[East_Brunswick.length] = createMarker(new GPoint(-74.38419342,40.41970444),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mdsex City V0c E Brunswick High School",'East_Brunswick=' + East_Brunswick.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.46440125,40.55300140),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mdsex City Voc-piscataway High School",'Piscataway=' + Piscataway.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.28517151,40.52046585),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mdsex City Vocational Perth Amboy High School",'Perth_Amboy=' + Perth_Amboy.length);
Woodbridge[Woodbridge.length] = createMarker(new GPoint(-74.27719116,40.54390335),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mdsex City Vocational Woodbridge High School",'Woodbridge=' + Woodbridge.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.45988464,40.50217819),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mdsex Cty Voc N Brunswick",'New_Brunswick=' + New_Brunswick.length);
E_Brunswick[E_Brunswick.length] = createMarker(new GPoint(-74.41995239,40.43438721),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Memorial Elementary School",'E_Brunswick=' + E_Brunswick.length);
Laurence_Harbor[Laurence_Harbor.length] = createMarker(new GPoint(-74.25009155,40.44622421),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Memorial Elementary School",'Laurence_Harbor=' + Laurence_Harbor.length);
Edison[Edison.length] = createMarker(new GPoint(-74.36340332,40.57680130),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Menlo Park Elementary School",'Edison=' + Edison.length);
Metuchen[Metuchen.length] = createMarker(new GPoint(-74.35710144,40.54280090),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Menlo Park Terr Elementary School",'Metuchen=' + Metuchen.length);
Metuchen[Metuchen.length] = createMarker(new GPoint(-74.35637665,40.55242157),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Metuchen High School",'Metuchen=' + Metuchen.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.41397095,40.52468872),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Middlesex Co Academy High School",'Old_Bridge=' + Old_Bridge.length);
Middlesex[Middlesex.length] = createMarker(new GPoint(-74.45394897,40.58880615),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Middlesex High School",'Middlesex=' + Middlesex.length);
Metuchen[Metuchen.length] = createMarker(new GPoint(-74.35710144,40.54280090),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mildred B. Moss Elementary School",'Metuchen=' + Metuchen.length);
Monroe_Twp[Monroe_Twp.length] = createMarker(new GPoint(-74.37834167,40.36671829),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mill Lake Elementary School",'Monroe_Twp=' + Monroe_Twp.length);
Carteret[Carteret.length] = createMarker(new GPoint(-74.23738098,40.59838104),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Minue Elementary School",'Carteret=' + Carteret.length);
Monmouth_Junction[Monmouth_Junction.length] = createMarker(new GPoint(-74.54920197,40.37790680),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Monmouth Junction Elementary School",'Monmouth_Junction=' + Monmouth_Junction.length);
Monroe_Township[Monroe_Township.length] = createMarker(new GPoint(-74.44027710,40.34381104),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Monroe Township High School",'Monroe_Township=' + Monroe_Township.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.41899872,40.53270340),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("N J Reg Day-piscataway",'Piscataway=' + Piscataway.length);
Carteret[Carteret.length] = createMarker(new GPoint(-74.22236633,40.58468628),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nathan Hale School",'Carteret=' + Carteret.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.46599579,40.47240448),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New Brunswick High School",'New_Brunswick=' + New_Brunswick.length);
North_Brunswick[North_Brunswick.length] = createMarker(new GPoint(-74.46499634,40.45050430),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North Brunswick Township High School",'North_Brunswick=' + North_Brunswick.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.27854919,40.51189804),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Number 10 Elementary School",'Perth_Amboy=' + Perth_Amboy.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.27239227,40.50410461),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Number 7 Elementary School",'Perth_Amboy=' + Perth_Amboy.length);
Colonia[Colonia.length] = createMarker(new GPoint(-74.31439972,40.59249878),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Ridge Heights Elementary School",'Colonia=' + Colonia.length);
Matawan[Matawan.length] = createMarker(new GPoint(-74.35499573,40.41020584),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Old Bridge High School",'Matawan=' + Matawan.length);
Middlesex[Middlesex.length] = createMarker(new GPoint(-74.50039673,40.57580185),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Parker Elementary School",'Middlesex=' + Middlesex.length);
Milltown[Milltown.length] = createMarker(new GPoint(-74.42979431,40.45100403),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Parkview Elementary School",'Milltown=' + Milltown.length);
North_Brunswick[North_Brunswick.length] = createMarker(new GPoint(-74.45809937,40.47440338),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Parsons Elementary School",'North_Brunswick=' + North_Brunswick.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.44479370,40.48250580),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Paul Robeson Community Elementary School",'New_Brunswick=' + New_Brunswick.length);
Colonia[Colonia.length] = createMarker(new GPoint(-74.31439972,40.59249878),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pennsylvania Ave School",'Colonia=' + Colonia.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.27809906,40.52249908),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Perth Amboy High School",'Perth_Amboy=' + Perth_Amboy.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.26842499,40.50788879),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Peterson Elementary School",'Perth_Amboy=' + Perth_Amboy.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.47539520,40.54650116),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Piscataway Township High School",'Piscataway=' + Piscataway.length);
Port_Reading[Port_Reading.length] = createMarker(new GPoint(-74.24800110,40.56940079),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Port Reading Elementary School",'Port_Reading=' + Port_Reading.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.45195007,40.57395172),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Quibbletown Middle School",'Piscataway=' + Piscataway.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.46440125,40.55300140),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Randolphville Elementary School",'Piscataway=' + Piscataway.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.41778564,40.53093719),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Raritan Valley Academy",'Piscataway=' + Piscataway.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.36179352,40.38860703),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Raymond E Voorhees Elementary School",'Old_Bridge=' + Old_Bridge.length);
Iselin[Iselin.length] = createMarker(new GPoint(-74.31670380,40.57089996),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Robert Mascenik School",'Iselin=' + Iselin.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.27558899,40.50140381),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Robert N. Wilentz Elementary School",'Perth_Amboy=' + Perth_Amboy.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.44676971,40.49068069),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'New_Brunswick=' + New_Brunswick.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.41815948,40.57218552),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'South_Plainfield=' + South_Plainfield.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.43069458,40.59160233),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt/administration Elementary School",'South_Plainfield=' + South_Plainfield.length);
Woodbridge[Woodbridge.length] = createMarker(new GPoint(-74.28649902,40.55450058),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ross Street Elementary School",'Woodbridge=' + Woodbridge.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.26574100,40.50642000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Saint Mary's Ec Center",'Perth_Amboy=' + Perth_Amboy.length);
Perth_Amboy[Perth_Amboy.length] = createMarker(new GPoint(-74.27397156,40.52112198),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Samuel E Shull Middle School",'Perth_Amboy=' + Perth_Amboy.length);
Parlin[Parlin.length] = createMarker(new GPoint(-74.32176971,40.46297455),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sayreville Middle School",'Parlin=' + Parlin.length);
Parlin[Parlin.length] = createMarker(new GPoint(-74.29505400,40.45959600),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sayreville Upper Es",'Parlin=' + Parlin.length);
Sayreville[Sayreville.length] = createMarker(new GPoint(-74.34339905,40.46379852),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Selover School",'Sayreville=' + Sayreville.length);
Monmouth_Junction[Monmouth_Junction.length] = createMarker(new GPoint(-74.52229309,40.38939667),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("So Brunswick Upper Elementary School",'Monmouth_Junction=' + Monmouth_Junction.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.41500092,40.57780075),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("So Plainfield Middle School",'South_Plainfield=' + South_Plainfield.length);
South_Amboy[South_Amboy.length] = createMarker(new GPoint(-74.28060913,40.48136902),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("South Amboy Elementary School",'South_Amboy=' + South_Amboy.length);
South_Amboy[South_Amboy.length] = createMarker(new GPoint(-74.27729797,40.46720123),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South Amboy High School",'South_Amboy=' + South_Amboy.length);
Monmouth_Junction[Monmouth_Junction.length] = createMarker(new GPoint(-74.54879761,40.39089966),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South Brunswick High School",'Monmouth_Junction=' + Monmouth_Junction.length);
South_Plainfield[South_Plainfield.length] = createMarker(new GPoint(-74.41949463,40.58970261),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South Plainfield High School",'South_Plainfield=' + South_Plainfield.length);
South_River[South_River.length] = createMarker(new GPoint(-74.38165283,40.44116974),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("South River Elementary School",'South_River=' + South_River.length);
South_River[South_River.length] = createMarker(new GPoint(-74.38142395,40.43795776),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South River High School",'South_River=' + South_River.length);
South_River[South_River.length] = createMarker(new GPoint(-74.38140106,40.43775558),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("South River Middle School",'South_River=' + South_River.length);
South_River[South_River.length] = createMarker(new GPoint(-74.38328600,40.44019800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South River Primary School",'South_River=' + South_River.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.35059357,40.40580750),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Southwood Elementary School",'Old_Bridge=' + Old_Bridge.length);
Spotswood[Spotswood.length] = createMarker(new GPoint(-74.38596344,40.39839935),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Spotswood High School",'Spotswood=' + Spotswood.length);
Spotswood[Spotswood.length] = createMarker(new GPoint(-74.38602448,40.39850235),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Spotswood Memorial School",'Spotswood=' + Spotswood.length);
Piscataway[Piscataway.length] = createMarker(new GPoint(-74.46826935,40.56237793),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Theodore Schor Middle School",'Piscataway=' + Piscataway.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson Middle School",'Edison=' + Edison.length);
Plainsboro[Plainsboro.length] = createMarker(new GPoint(-74.57684326,40.32915878),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Town Center Elementary School",'Plainsboro=' + Plainsboro.length);
Plainsboro[Plainsboro.length] = createMarker(new GPoint(-74.59359741,40.32279968),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Upper Elementary School",'Plainsboro=' + Plainsboro.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.31989288,40.39150620),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Virgil Grissom Elementary School",'Old_Bridge=' + Old_Bridge.length);
Middlesex[Middlesex.length] = createMarker(new GPoint(-74.50039673,40.57580185),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Von E Mauger Middle School",'Middlesex=' + Middlesex.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.30859375,40.39670563),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Walter Schirra Elementary School",'Old_Bridge=' + Old_Bridge.length);
Parlin[Parlin.length] = createMarker(new GPoint(-74.31397247,40.46441269),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("War Memorial High School",'Parlin=' + Parlin.length);
East_Brunswick[East_Brunswick.length] = createMarker(new GPoint(-74.43189240,40.42194748),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Warnsdorfer Elementary School",'East_Brunswick=' + East_Brunswick.length);
Edison[Edison.length] = createMarker(new GPoint(-74.39600372,40.51570129),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Edison=' + Edison.length);
Middlesex[Middlesex.length] = createMarker(new GPoint(-74.50039673,40.57580185),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Watchung Elementary School",'Middlesex=' + Middlesex.length);
Old_Bridge[Old_Bridge.length] = createMarker(new GPoint(-74.35939026,40.41040802),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William A Miller Elementary School",'Old_Bridge=' + Old_Bridge.length);
Sayreville[Sayreville.length] = createMarker(new GPoint(-74.34339905,40.46379852),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wilson Elementary School",'Sayreville=' + Sayreville.length);
Avenel[Avenel.length] = createMarker(new GPoint(-74.27760315,40.58129883),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Woodbine Avenue Elementary School",'Avenel=' + Avenel.length);
Woodbridge[Woodbridge.length] = createMarker(new GPoint(-74.28649902,40.55450058),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Woodbridge High School",'Woodbridge=' + Woodbridge.length);
Woodbridge[Woodbridge.length] = createMarker(new GPoint(-74.28649902,40.55450058),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Woodbridge Middle School",'Woodbridge=' + Woodbridge.length);
Edison[Edison.length] = createMarker(new GPoint(-74.36340332,40.57680130),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Woodbrook Elementary School",'Edison=' + Edison.length);
Monroe_Township[Monroe_Township.length] = createMarker(new GPoint(-74.38401794,40.39830017),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Woodland Middle School",'Monroe_Township=' + Monroe_Township.length);
New_Brunswick[New_Brunswick.length] = createMarker(new GPoint(-74.40471649,40.48545456),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Woodrow Wilson Elementary School",'New_Brunswick=' + New_Brunswick.length);
Edison[Edison.length] = createMarker(new GPoint(-74.36340332,40.57680130),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Woodrow Wilson Middle School",'Edison=' + Edison.length);
Plainsboro[Plainsboro.length] = createMarker(new GPoint(-74.58683014,40.31782150),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wwphs-north Campus High School",'Plainsboro=' + Plainsboro.length);
} // End addStateMarkers JavaScript Function
// Takes an array of markers and centers/zooms map based on marker range
function centerByArray(myArray, recenter, newMaxMin)
{
if (newMaxMin == true)
reMaxMin(myArray);
for (var i = 0; i < myArray.length; i++)
{
var markLng = myArray[i].getPoint().x;
var markLat = myArray[i].getPoint().y;
if (markLat > maxLat) maxLat = markLat;
if (markLng > maxLng) maxLng = markLng;
if (markLat < minLat) minLat = markLat;
if (markLng < minLng) minLng = markLng;
}
if (recenter)
reCenterMap();
}
// Reinit max/mins
function reMaxMin(myArray)
{
maxLng = myArray[0].getPoint().x;
maxLat = myArray[0].getPoint().y;
minLng = myArray[0].getPoint().x;
minLat = myArray[0].getPoint().y;
}
// Recenter map based on global max/mins
function reCenterMap()
{
var bounds = new GLatLngBounds();
bounds.extend(new GLatLng(minLat, minLng));
bounds.extend(new GLatLng(maxLat, maxLng));
var center_lat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) / 2.0;
var center_lng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) / 2.0;
var center = new GLatLng(center_lat, center_lng);
var zoom = map.getBoundsZoomLevel(bounds);
map.setCenter(center,zoom);
//map.setCenter(center,10);
/*
var center = new GPoint( (maxLng + minLng)/2, (maxLat+minLat)/2 );
var delta = new GSize(maxLng - minLng, maxLat - minLat);
var minZoom = map.spec.getLowestZoomLevel(center, delta, map.viewSize);
if (minZoom < 4) minZoom = 4; // Lowest possible zoom is 4
map.centerAndZoom(center, minZoom);
*/
}
// Fires when drop down list of schools changes
function selectChange(selection)
{
var myVal = selection.options[selection.selectedIndex].value;
map.closeInfoWindow();
// Add entire array based on variable type
if (myVal.indexOf('all') != -1 && myVal != 'all')
{
var temp = myVal.split('=');
var showArray = temp[1];
// If Array is > X amount of markers, then open in a new page
if (eval(showArray).length > 20)
// New window depends on whether or not we're on the search page
if (location.href.indexOf('nearby_schools.php') == -1)
window.open(location.href + '/map/' + showArray);
else
window.open('/search////' + showArray);
map.removeOverlays(Avenel);
map.removeOverlays(Carteret);
map.removeOverlays(Cliffwood_Beach);
map.removeOverlays(Colonia);
map.removeOverlays(Cranbury);
map.removeOverlays(Dayton);
map.removeOverlays(Dunellen);
map.removeOverlays(E_Brunswick);
map.removeOverlays(East_Brunswick);
map.removeOverlays(Edison);
map.removeOverlays(Fords);
map.removeOverlays(Highland_Park);
map.removeOverlays(Iselin);
map.removeOverlays(Jamesburg);
map.removeOverlays(Kendall_Park);
map.removeOverlays(Laurence_Harbor);
map.removeOverlays(Matawan);
map.removeOverlays(Metuchen);
map.removeOverlays(Middlesex);
map.removeOverlays(Milltown);
map.removeOverlays(Monmouth_Junction);
map.removeOverlays(Monroe_Township);
map.removeOverlays(Monroe_Twp);
map.removeOverlays(New_Brunswick);
map.removeOverlays(North_Brunswick);
map.removeOverlays(Old_Bridge);
map.removeOverlays(Parlin);
map.removeOverlays(Perth_Amboy);
map.removeOverlays(Piscataway);
map.removeOverlays(Plainsboro);
map.removeOverlays(Port_Reading);
map.removeOverlays(Sayreville);
map.removeOverlays(Sewaren);
map.removeOverlays(South_Amboy);
map.removeOverlays(South_Plainfield);
map.removeOverlays(South_River);
map.removeOverlays(Spotswood);
map.removeOverlays(Woodbridge);
map.addOverlays(eval(showArray));
centerByArray(eval(showArray), true, true); // Center and zoom on set of markers
}
// Add individual markers
if (myVal.indexOf('all') == -1 && myVal != 'all' && myVal.length)
{
var temp = myVal.split('=');
var myArray = temp[0];
var myIndex = parseInt(temp[1]) - 1;
document.getElementById('map').width = "750";
map.removeOverlay(eval(myArray)[myIndex]);
map.addOverlay(eval(myArray)[myIndex]);
GEvent.trigger(eval(myArray)[myIndex],'click');
}
// Show all markers
if (myVal == 'all')
{
cntMarker = 0;
reMaxMin(New_Brunswick);map.removeOverlays(Avenel);
map.removeOverlays(Carteret);
map.removeOverlays(Cliffwood_Beach);
map.removeOverlays(Colonia);
map.removeOverlays(Cranbury);
map.removeOverlays(Dayton);
map.removeOverlays(Dunellen);
map.removeOverlays(E_Brunswick);
map.removeOverlays(East_Brunswick);
map.removeOverlays(Edison);
map.removeOverlays(Fords);
map.removeOverlays(Highland_Park);
map.removeOverlays(Iselin);
map.removeOverlays(Jamesburg);
map.removeOverlays(Kendall_Park);
map.removeOverlays(Laurence_Harbor);
map.removeOverlays(Matawan);
map.removeOverlays(Metuchen);
map.removeOverlays(Middlesex);
map.removeOverlays(Milltown);
map.removeOverlays(Monmouth_Junction);
map.removeOverlays(Monroe_Township);
map.removeOverlays(Monroe_Twp);
map.removeOverlays(New_Brunswick);
map.removeOverlays(North_Brunswick);
map.removeOverlays(Old_Bridge);
map.removeOverlays(Parlin);
map.removeOverlays(Perth_Amboy);
map.removeOverlays(Piscataway);
map.removeOverlays(Plainsboro);
map.removeOverlays(Port_Reading);
map.removeOverlays(Sayreville);
map.removeOverlays(Sewaren);
map.removeOverlays(South_Amboy);
map.removeOverlays(South_Plainfield);
map.removeOverlays(South_River);
map.removeOverlays(Spotswood);
map.removeOverlays(Woodbridge);
map.addOverlays(Avenel);
centerByArray(Avenel, false, false);
cntMarker += Avenel.length;
map.addOverlays(Carteret);
centerByArray(Carteret, false, false);
cntMarker += Carteret.length;
map.addOverlays(Cliffwood_Beach);
centerByArray(Cliffwood_Beach, false, false);
cntMarker += Cliffwood_Beach.length;
map.addOverlays(Colonia);
centerByArray(Colonia, false, false);
cntMarker += Colonia.length;
map.addOverlays(Cranbury);
centerByArray(Cranbury, false, false);
cntMarker += Cranbury.length;
map.addOverlays(Dayton);
centerByArray(Dayton, false, false);
cntMarker += Dayton.length;
map.addOverlays(Dunellen);
centerByArray(Dunellen, false, false);
cntMarker += Dunellen.length;
map.addOverlays(E_Brunswick);
centerByArray(E_Brunswick, false, false);
cntMarker += E_Brunswick.length;
map.addOverlays(East_Brunswick);
centerByArray(East_Brunswick, false, false);
cntMarker += East_Brunswick.length;
map.addOverlays(Edison);
centerByArray(Edison, false, false);
cntMarker += Edison.length;
map.addOverlays(Fords);
centerByArray(Fords, false, false);
cntMarker += Fords.length;
map.addOverlays(Highland_Park);
centerByArray(Highland_Park, false, false);
cntMarker += Highland_Park.length;
map.addOverlays(Iselin);
centerByArray(Iselin, false, false);
cntMarker += Iselin.length;
map.addOverlays(Jamesburg);
centerByArray(Jamesburg, false, false);
cntMarker += Jamesburg.length;
map.addOverlays(Kendall_Park);
centerByArray(Kendall_Park, false, false);
cntMarker += Kendall_Park.length;
map.addOverlays(Laurence_Harbor);
centerByArray(Laurence_Harbor, false, false);
cntMarker += Laurence_Harbor.length;
map.addOverlays(Matawan);
centerByArray(Matawan, false, false);
cntMarker += Matawan.length;
map.addOverlays(Metuchen);
centerByArray(Metuchen, false, false);
cntMarker += Metuchen.length;
map.addOverlays(Middlesex);
centerByArray(Middlesex, false, false);
cntMarker += Middlesex.length;
map.addOverlays(Milltown);
centerByArray(Milltown, false, false);
cntMarker += Milltown.length;
map.addOverlays(Monmouth_Junction);
centerByArray(Monmouth_Junction, false, false);
cntMarker += Monmouth_Junction.length;
map.addOverlays(Monroe_Township);
centerByArray(Monroe_Township, false, false);
cntMarker += Monroe_Township.length;
map.addOverlays(Monroe_Twp);
centerByArray(Monroe_Twp, false, false);
cntMarker += Monroe_Twp.length;
map.addOverlays(New_Brunswick);
centerByArray(New_Brunswick, false, false);
cntMarker += New_Brunswick.length;
map.addOverlays(North_Brunswick);
centerByArray(North_Brunswick, false, false);
cntMarker += North_Brunswick.length;
map.addOverlays(Old_Bridge);
centerByArray(Old_Bridge, false, false);
cntMarker += Old_Bridge.length;
map.addOverlays(Parlin);
centerByArray(Parlin, false, false);
cntMarker += Parlin.length;
map.addOverlays(Perth_Amboy);
centerByArray(Perth_Amboy, false, false);
cntMarker += Perth_Amboy.length;
map.addOverlays(Piscataway);
centerByArray(Piscataway, false, false);
cntMarker += Piscataway.length;
map.addOverlays(Plainsboro);
centerByArray(Plainsboro, false, false);
cntMarker += Plainsboro.length;
map.addOverlays(Port_Reading);
centerByArray(Port_Reading, false, false);
cntMarker += Port_Reading.length;
map.addOverlays(Sayreville);
centerByArray(Sayreville, false, false);
cntMarker += Sayreville.length;
map.addOverlays(Sewaren);
centerByArray(Sewaren, false, false);
cntMarker += Sewaren.length;
map.addOverlays(South_Amboy);
centerByArray(South_Amboy, false, false);
cntMarker += South_Amboy.length;
map.addOverlays(South_Plainfield);
centerByArray(South_Plainfield, false, false);
cntMarker += South_Plainfield.length;
map.addOverlays(South_River);
centerByArray(South_River, false, false);
cntMarker += South_River.length;
map.addOverlays(Spotswood);
centerByArray(Spotswood, false, false);
cntMarker += Spotswood.length;
map.addOverlays(Woodbridge);
centerByArray(Woodbridge, false, false);
cntMarker += Woodbridge.length;
centerByArray(New_Brunswick,true, false);
if (cntMarker > 20)
// New window depends on whether or not we're on the search page
if (location.href.indexOf('schools-by-distance') == -1)
window.open(location.href + '/map/all');
else
window.open('/search////all');
}
}