function addMarkers(){
mySelect = document.getElementById('selection');
Graham = [];Asheville = [];Washington = [];Dublin = [];Flat_Rock = [];Supply = [];Concord = [];Hudson = [];Wilmington = [];Charlotte = [];Morehead_City = [];Hickory = [];Sanford = [];Shelby = [];Jacksonville = [];Elizabeth_City = [];New_Bern = [];Thomasville = [];Durham = [];Tarboro = [];Fayetteville = [];Winston_Salem = [];Dallas = [];Jamestown = [];Weldon = [];Clyde = [];Spindale = [];Kenansville = [];Smithfield = [];Kinston = [];Louisburg = [];Williamston = [];Spruce_Pine = [];Marion = [];Statesville = [];Troy = [];Rocky_Mount = [];Grantsboro = [];Roxboro = [];Winterville = [];Asheboro = [];Hamlet = [];Ahoskie = [];Lumberton = [];Wentworth = [];Salisbury = [];Clinton = [];Pinehurst = [];Polkton = [];Whiteville = [];Sylva = [];Albemarle = [];Dobson = [];Murphy = [];Henderson = [];Raleigh = [];Goldsboro = [];Morganton = [];Wilkesboro = [];Wilson = [];mySelect.options[mySelect.options.length] = new Option("Ahoskie Schools",'all=Ahoskie');
mySelect.options[mySelect.options.length] = new Option("Albemarle Schools",'all=Albemarle');
mySelect.options[mySelect.options.length] = new Option("Asheboro Schools",'all=Asheboro');
mySelect.options[mySelect.options.length] = new Option("Asheville Schools",'all=Asheville');
mySelect.options[mySelect.options.length] = new Option("Charlotte Schools",'all=Charlotte');
mySelect.options[mySelect.options.length] = new Option("Clinton Schools",'all=Clinton');
mySelect.options[mySelect.options.length] = new Option("Clyde Schools",'all=Clyde');
mySelect.options[mySelect.options.length] = new Option("Concord Schools",'all=Concord');
mySelect.options[mySelect.options.length] = new Option("Dallas Schools",'all=Dallas');
mySelect.options[mySelect.options.length] = new Option("Dobson Schools",'all=Dobson');
mySelect.options[mySelect.options.length] = new Option("Dublin Schools",'all=Dublin');
mySelect.options[mySelect.options.length] = new Option("Durham Schools",'all=Durham');
mySelect.options[mySelect.options.length] = new Option("Elizabeth City Schools",'all=Elizabeth_City');
mySelect.options[mySelect.options.length] = new Option("Fayetteville Schools",'all=Fayetteville');
mySelect.options[mySelect.options.length] = new Option("Flat Rock Schools",'all=Flat_Rock');
mySelect.options[mySelect.options.length] = new Option("Goldsboro Schools",'all=Goldsboro');
mySelect.options[mySelect.options.length] = new Option("Graham Schools",'all=Graham');
mySelect.options[mySelect.options.length] = new Option("Grantsboro Schools",'all=Grantsboro');
mySelect.options[mySelect.options.length] = new Option("Hamlet Schools",'all=Hamlet');
mySelect.options[mySelect.options.length] = new Option("Henderson Schools",'all=Henderson');
mySelect.options[mySelect.options.length] = new Option("Hickory Schools",'all=Hickory');
mySelect.options[mySelect.options.length] = new Option("Hudson Schools",'all=Hudson');
mySelect.options[mySelect.options.length] = new Option("Jacksonville Schools",'all=Jacksonville');
mySelect.options[mySelect.options.length] = new Option("Jamestown Schools",'all=Jamestown');
mySelect.options[mySelect.options.length] = new Option("Kenansville Schools",'all=Kenansville');
mySelect.options[mySelect.options.length] = new Option("Kinston Schools",'all=Kinston');
mySelect.options[mySelect.options.length] = new Option("Louisburg Schools",'all=Louisburg');
mySelect.options[mySelect.options.length] = new Option("Lumberton Schools",'all=Lumberton');
mySelect.options[mySelect.options.length] = new Option("Marion Schools",'all=Marion');
mySelect.options[mySelect.options.length] = new Option("Morehead City Schools",'all=Morehead_City');
mySelect.options[mySelect.options.length] = new Option("Morganton Schools",'all=Morganton');
mySelect.options[mySelect.options.length] = new Option("Murphy Schools",'all=Murphy');
mySelect.options[mySelect.options.length] = new Option("New Bern Schools",'all=New_Bern');
mySelect.options[mySelect.options.length] = new Option("Pinehurst Schools",'all=Pinehurst');
mySelect.options[mySelect.options.length] = new Option("Polkton Schools",'all=Polkton');
mySelect.options[mySelect.options.length] = new Option("Raleigh Schools",'all=Raleigh');
mySelect.options[mySelect.options.length] = new Option("Rocky Mount Schools",'all=Rocky_Mount');
mySelect.options[mySelect.options.length] = new Option("Roxboro Schools",'all=Roxboro');
mySelect.options[mySelect.options.length] = new Option("Salisbury Schools",'all=Salisbury');
mySelect.options[mySelect.options.length] = new Option("Sanford Schools",'all=Sanford');
mySelect.options[mySelect.options.length] = new Option("Shelby Schools",'all=Shelby');
mySelect.options[mySelect.options.length] = new Option("Smithfield Schools",'all=Smithfield');
mySelect.options[mySelect.options.length] = new Option("Spindale Schools",'all=Spindale');
mySelect.options[mySelect.options.length] = new Option("Spruce Pine Schools",'all=Spruce_Pine');
mySelect.options[mySelect.options.length] = new Option("Statesville Schools",'all=Statesville');
mySelect.options[mySelect.options.length] = new Option("Supply Schools",'all=Supply');
mySelect.options[mySelect.options.length] = new Option("Sylva Schools",'all=Sylva');
mySelect.options[mySelect.options.length] = new Option("Tarboro Schools",'all=Tarboro');
mySelect.options[mySelect.options.length] = new Option("Thomasville Schools",'all=Thomasville');
mySelect.options[mySelect.options.length] = new Option("Troy Schools",'all=Troy');
mySelect.options[mySelect.options.length] = new Option("Washington Schools",'all=Washington');
mySelect.options[mySelect.options.length] = new Option("Weldon Schools",'all=Weldon');
mySelect.options[mySelect.options.length] = new Option("Wentworth Schools",'all=Wentworth');
mySelect.options[mySelect.options.length] = new Option("Whiteville Schools",'all=Whiteville');
mySelect.options[mySelect.options.length] = new Option("Wilkesboro Schools",'all=Wilkesboro');
mySelect.options[mySelect.options.length] = new Option("Williamston Schools",'all=Williamston');
mySelect.options[mySelect.options.length] = new Option("Wilmington Schools",'all=Wilmington');
mySelect.options[mySelect.options.length] = new Option("Wilson Schools",'all=Wilson');
mySelect.options[mySelect.options.length] = new Option("Winston Salem Schools",'all=Winston_Salem');
mySelect.options[mySelect.options.length] = new Option("Winterville Schools",'all=Winterville');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
var tmpLatLng=0;
var tmpLen=0;
tmpLatLng=new GLatLng(36.05156000000000204,-79.3571850000000011);
tmpLen=Graham.length;
Graham[tmpLen] = createMarker(tmpLatLng,"
",iconGr);
Graham[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Alamance Community College",'Graham=' + Graham.length);
tmpLatLng=new GLatLng(35.57193600000000088,-82.5545989999999960);
tmpLen=Asheville.length;
Asheville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Asheville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Asheville-buncombe Technical Community College",'Asheville=' + Asheville.length);
tmpLatLng=new GLatLng(35.54544099999999673,-77.0527880000000067);
tmpLen=Washington.length;
Washington[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Washington[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Beaufort County Community College",'Washington=' + Washington.length);
tmpLatLng=new GLatLng(34.64476599999999706,-78.7269950000000022);
tmpLen=Dublin.length;
Dublin[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Dublin[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Bladen Community College",'Dublin=' + Dublin.length);
tmpLatLng=new GLatLng(35.30406700000000341,-82.4157479999999935);
tmpLen=Flat_Rock.length;
Flat_Rock[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Flat_Rock[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Blue Ridge Community College",'Flat_Rock=' + Flat_Rock.length);
tmpLatLng=new GLatLng(34.01748299999999858,-78.2683490000000006);
tmpLen=Supply.length;
Supply[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Supply[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Brunswick Community College",'Supply=' + Supply.length);
tmpLatLng=new GLatLng(35.43872600000000261,-80.6015890000000041);
tmpLen=Concord.length;
Concord[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Concord[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Cabarrus College Of Health Sciences",'Concord=' + Concord.length);
tmpLatLng=new GLatLng(35.85502900000000181,-81.4830539999999956);
tmpLen=Hudson.length;
Hudson[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Hudson[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Caldwell Community College And Technical Institute",'Hudson=' + Hudson.length);
tmpLatLng=new GLatLng(34.22653999999999996,-77.9450230000000061);
tmpLen=Wilmington.length;
Wilmington[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Wilmington[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Cape Fear Community College",'Wilmington=' + Wilmington.length);
tmpLatLng=new GLatLng(35.20149899999999831,-80.8378419999999948);
tmpLen=Charlotte.length;
Charlotte[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Charlotte[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Carolinas College Of Health Sciences",'Charlotte=' + Charlotte.length);
tmpLatLng=new GLatLng(34.72439099999999712,-76.7552629999999993);
tmpLen=Morehead_City.length;
Morehead_City[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Morehead_City[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Carteret Community College",'Morehead_City=' + Morehead_City.length);
tmpLatLng=new GLatLng(35.73282999999999987,-81.3398969999999934);
tmpLen=Hickory.length;
Hickory[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Hickory[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Catawba Valley Community College",'Hickory=' + Hickory.length);
tmpLatLng=new GLatLng(35.47088800000000219,-79.1434449999999998);
tmpLen=Sanford.length;
Sanford[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Sanford[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Central Carolina Community College",'Sanford=' + Sanford.length);
tmpLatLng=new GLatLng(35.21734200000000214,-80.8311929999999989);
tmpLen=Charlotte.length;
Charlotte[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Charlotte[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Central Piedmont Community College",'Charlotte=' + Charlotte.length);
tmpLatLng=new GLatLng(35.28247100000000102,-81.4923000000000001);
tmpLen=Shelby.length;
Shelby[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Shelby[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Cleveland Community College",'Shelby=' + Shelby.length);
tmpLatLng=new GLatLng(34.77336199999999877,-77.3884829999999936);
tmpLen=Jacksonville.length;
Jacksonville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Jacksonville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Coastal Carolina Community College",'Jacksonville=' + Jacksonville.length);
tmpLatLng=new GLatLng(36.33056899999999700,-76.2265730000000019);
tmpLen=Elizabeth_City.length;
Elizabeth_City[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Elizabeth_City[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("College Of Albemarle",'Elizabeth_City=' + Elizabeth_City.length);
tmpLatLng=new GLatLng(35.11044199999999904,-77.1012439999999941);
tmpLen=New_Bern.length;
New_Bern[tmpLen] = createMarker(tmpLatLng,"",iconGr);
New_Bern[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Craven Community College",'New_Bern=' + New_Bern.length);
tmpLatLng=new GLatLng(35.82376899999999864,-80.2535929999999950);
tmpLen=Thomasville.length;
Thomasville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Thomasville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Davidson County Community College",'Thomasville=' + Thomasville.length);
tmpLatLng=new GLatLng(35.97389799999999837,-78.8804300000000040);
tmpLen=Durham.length;
Durham[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Durham[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Durham Technical Community College",'Durham=' + Durham.length);
tmpLatLng=new GLatLng(35.88381799999999799,-77.5695050000000065);
tmpLen=Tarboro.length;
Tarboro[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Tarboro[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Edgecombe Community College",'Tarboro=' + Tarboro.length);
tmpLatLng=new GLatLng(35.06356300000000203,-78.9184479999999979);
tmpLen=Fayetteville.length;
Fayetteville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Fayetteville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Fayetteville Technical Community College",'Fayetteville=' + Fayetteville.length);
tmpLatLng=new GLatLng(36.06980000000000075,-80.2713439999999991);
tmpLen=Winston_Salem.length;
Winston_Salem[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Winston_Salem[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Forsyth Technical Community College",'Winston_Salem=' + Winston_Salem.length);
tmpLatLng=new GLatLng(35.29816499999999734,-81.1879380000000026);
tmpLen=Dallas.length;
Dallas[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Dallas[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Gaston College",'Dallas=' + Dallas.length);
tmpLatLng=new GLatLng(36.05973500000000342,-79.8268869999999992);
tmpLen=Jamestown.length;
Jamestown[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Jamestown[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Guilford Technical Community College",'Jamestown=' + Jamestown.length);
tmpLatLng=new GLatLng(36.43072200000000293,-77.6196929999999980);
tmpLen=Weldon.length;
Weldon[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Weldon[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Halifax Community College",'Weldon=' + Weldon.length);
tmpLatLng=new GLatLng(35.52521099999999876,-82.9280270000000001);
tmpLen=Clyde.length;
Clyde[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Clyde[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Haywood Community College",'Clyde=' + Clyde.length);
tmpLatLng=new GLatLng(35.36019900000000149,-81.9296719999999965);
tmpLen=Spindale.length;
Spindale[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Spindale[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Isothermal Community College",'Spindale=' + Spindale.length);
tmpLatLng=new GLatLng(34.96237899999999854,-77.9619519999999965);
tmpLen=Kenansville.length;
Kenansville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Kenansville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("James Sprunt Community College",'Kenansville=' + Kenansville.length);
tmpLatLng=new GLatLng(35.50851099999999860,-78.3395079999999950);
tmpLen=Smithfield.length;
Smithfield[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Smithfield[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Johnston Community College",'Smithfield=' + Smithfield.length);
tmpLatLng=new GLatLng(35.22258300000000019,-77.5768900000000058);
tmpLen=Kinston.length;
Kinston[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Kinston[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Lenoir Community College",'Kinston=' + Kinston.length);
tmpLatLng=new GLatLng(36.10344500000000067,-78.2978619999999949);
tmpLen=Louisburg.length;
Louisburg[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Louisburg[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Louisburg College",'Louisburg=' + Louisburg.length);
tmpLatLng=new GLatLng(35.83671999999999968,-77.0968050000000033);
tmpLen=Williamston.length;
Williamston[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Williamston[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Martin Community College",'Williamston=' + Williamston.length);
tmpLatLng=new GLatLng(35.93092099999999788,-82.0112689999999986);
tmpLen=Spruce_Pine.length;
Spruce_Pine[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Spruce_Pine[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Mayland Community College",'Spruce_Pine=' + Spruce_Pine.length);
tmpLatLng=new GLatLng(35.61500000000000199,-81.9756000000000000);
tmpLen=Marion.length;
Marion[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Marion[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Mcdowell Technical Community College",'Marion=' + Marion.length);
tmpLatLng=new GLatLng(34.22546899999999681,-77.8802469999999971);
tmpLen=Wilmington.length;
Wilmington[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Wilmington[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Miller-motte Technical College",'Wilmington=' + Wilmington.length);
tmpLatLng=new GLatLng(35.78297200000000088,-80.8939000000000021);
tmpLen=Statesville.length;
Statesville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Statesville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Mitchell Community College",'Statesville=' + Statesville.length);
tmpLatLng=new GLatLng(35.36751999999999895,-79.8820400000000034);
tmpLen=Troy.length;
Troy[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Troy[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Montgomery Community College",'Troy=' + Troy.length);
tmpLatLng=new GLatLng(35.98584400000000016,-77.9014420000000029);
tmpLen=Rocky_Mount.length;
Rocky_Mount[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Rocky_Mount[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Nash Community College",'Rocky_Mount=' + Rocky_Mount.length);
tmpLatLng=new GLatLng(35.13991200000000247,-76.8424839999999989);
tmpLen=Grantsboro.length;
Grantsboro[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Grantsboro[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Pamlico Community College",'Grantsboro=' + Grantsboro.length);
tmpLatLng=new GLatLng(36.42695299999999747,-78.9766929999999973);
tmpLen=Roxboro.length;
Roxboro[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Roxboro[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Piedmont Community College",'Roxboro=' + Roxboro.length);
tmpLatLng=new GLatLng(35.54820000000000135,-77.4060999999999950);
tmpLen=Winterville.length;
Winterville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Winterville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Pitt Community College",'Winterville=' + Winterville.length);
tmpLatLng=new GLatLng(35.67264899999999983,-79.8303729999999944);
tmpLen=Asheboro.length;
Asheboro[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Asheboro[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Randolph Community College",'Asheboro=' + Asheboro.length);
tmpLatLng=new GLatLng(34.90240800000000120,-79.7115830000000045);
tmpLen=Hamlet.length;
Hamlet[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Hamlet[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Richmond Community College",'Hamlet=' + Hamlet.length);
tmpLatLng=new GLatLng(36.32356000000000051,-77.0244600000000048);
tmpLen=Ahoskie.length;
Ahoskie[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Ahoskie[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Roanoke-chowan Community College",'Ahoskie=' + Ahoskie.length);
tmpLatLng=new GLatLng(34.66775799999999918,-79.0037370000000009);
tmpLen=Lumberton.length;
Lumberton[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Lumberton[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Robeson Community College",'Lumberton=' + Lumberton.length);
tmpLatLng=new GLatLng(36.40034099999999739,-79.7741319999999944);
tmpLen=Wentworth.length;
Wentworth[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Wentworth[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Rockingham Community College",'Wentworth=' + Wentworth.length);
tmpLatLng=new GLatLng(35.66239999999999810,-80.4647999999999967);
tmpLen=Salisbury.length;
Salisbury[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Salisbury[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Rowan-cabarrus Community College",'Salisbury=' + Salisbury.length);
tmpLatLng=new GLatLng(34.9974899999999991,-78.3239820000000008);
tmpLen=Clinton.length;
Clinton[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Clinton[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Sampson Community College",'Clinton=' + Clinton.length);
tmpLatLng=new GLatLng(35.22473600000000004,-79.4059809999999970);
tmpLen=Pinehurst.length;
Pinehurst[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Pinehurst[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Sandhills Community College",'Pinehurst=' + Pinehurst.length);
tmpLatLng=new GLatLng(35.57441000000000030,-82.6146889999999984);
tmpLen=Asheville.length;
Asheville[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Asheville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("South College-asheville",'Asheville=' + Asheville.length);
tmpLatLng=new GLatLng(35.00209999999999865,-80.2108000000000060);
tmpLen=Polkton.length;
Polkton[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Polkton[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("South Piedmont Community College",'Polkton=' + Polkton.length);
tmpLatLng=new GLatLng(34.33389300000000332,-78.7516880000000014);
tmpLen=Whiteville.length;
Whiteville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Whiteville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Southeastern Community College",'Whiteville=' + Whiteville.length);
tmpLatLng=new GLatLng(35.35260000000000246,-83.1890999999999962);
tmpLen=Sylva.length;
Sylva[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Sylva[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Southwestern Community College",'Sylva=' + Sylva.length);
tmpLatLng=new GLatLng(35.33798000000000172,-80.2330199999999962);
tmpLen=Albemarle.length;
Albemarle[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Albemarle[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Stanly Community College",'Albemarle=' + Albemarle.length);
tmpLatLng=new GLatLng(36.38788000000000266,-80.7176319999999947);
tmpLen=Dobson.length;
Dobson[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Dobson[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Surry Community College",'Dobson=' + Dobson.length);
tmpLatLng=new GLatLng(35.08089999999999975,-84.0046999999999997);
tmpLen=Murphy.length;
Murphy[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Murphy[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Tri-county Community College",'Murphy=' + Murphy.length);
tmpLatLng=new GLatLng(36.32710000000000150,-78.4047999999999944);
tmpLen=Henderson.length;
Henderson[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Henderson[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Vance-granville Community College",'Henderson=' + Henderson.length);
tmpLatLng=new GLatLng(35.71286200000000121,-78.6574449999999956);
tmpLen=Raleigh.length;
Raleigh[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Raleigh[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Wake Technical Community College",'Raleigh=' + Raleigh.length);
tmpLatLng=new GLatLng(35.39993900000000337,-77.9556500000000056);
tmpLen=Goldsboro.length;
Goldsboro[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Goldsboro[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Wayne Community College",'Goldsboro=' + Goldsboro.length);
tmpLatLng=new GLatLng(35.72286700000000081,-81.6936369999999953);
tmpLen=Morganton.length;
Morganton[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Morganton[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Western Piedmont Community College",'Morganton=' + Morganton.length);
tmpLatLng=new GLatLng(36.13845799999999997,-81.1802959999999984);
tmpLen=Wilkesboro.length;
Wilkesboro[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Wilkesboro[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Wilkes Community College",'Wilkesboro=' + Wilkesboro.length);
tmpLatLng=new GLatLng(35.73063499999999947,-77.8962910000000050);
tmpLen=Wilson.length;
Wilson[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Wilson[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Wilson Technical Community College",'Wilson=' + Wilson.length);
getPoly("","state","","NC");}
// End addStateMarkers JavaScript Function
//open all when map is defined
function openAll() {
if (map) {
selectChange("all");
} else {
setTimeout("openAll()",200);
}
}
// 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].point.x;
var markLat = myArray[i].point.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].point.x;
maxLat = myArray[0].point.y;
minLng = myArray[0].point.x;
minLat = myArray[0].point.y;
}
// Recenter map based on global max/mins
function reCenterMap(){
//alert('#' + minLat + '#' + minLng + '#' + maxLat + '#' + maxLng);
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) {
if (selection.options) {
var _openNewWindow=true;
var myVal = selection.options[selection.selectedIndex].value;
} else {
var _openNewWindow=false;
var myVal=selection;
}
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('schools-by-distance') == -1)
window.open(location.href + '/map/all');
else
window.open('/search////all');
map.removeOverlays(Ahoskie);
map.removeOverlays(Albemarle);
map.removeOverlays(Asheboro);
map.removeOverlays(Asheville);
map.removeOverlays(Charlotte);
map.removeOverlays(Clinton);
map.removeOverlays(Clyde);
map.removeOverlays(Concord);
map.removeOverlays(Dallas);
map.removeOverlays(Dobson);
map.removeOverlays(Dublin);
map.removeOverlays(Durham);
map.removeOverlays(Elizabeth_City);
map.removeOverlays(Fayetteville);
map.removeOverlays(Flat_Rock);
map.removeOverlays(Goldsboro);
map.removeOverlays(Graham);
map.removeOverlays(Grantsboro);
map.removeOverlays(Hamlet);
map.removeOverlays(Henderson);
map.removeOverlays(Hickory);
map.removeOverlays(Hudson);
map.removeOverlays(Jacksonville);
map.removeOverlays(Jamestown);
map.removeOverlays(Kenansville);
map.removeOverlays(Kinston);
map.removeOverlays(Louisburg);
map.removeOverlays(Lumberton);
map.removeOverlays(Marion);
map.removeOverlays(Morehead_City);
map.removeOverlays(Morganton);
map.removeOverlays(Murphy);
map.removeOverlays(New_Bern);
map.removeOverlays(Pinehurst);
map.removeOverlays(Polkton);
map.removeOverlays(Raleigh);
map.removeOverlays(Rocky_Mount);
map.removeOverlays(Roxboro);
map.removeOverlays(Salisbury);
map.removeOverlays(Sanford);
map.removeOverlays(Shelby);
map.removeOverlays(Smithfield);
map.removeOverlays(Spindale);
map.removeOverlays(Spruce_Pine);
map.removeOverlays(Statesville);
map.removeOverlays(Supply);
map.removeOverlays(Sylva);
map.removeOverlays(Tarboro);
map.removeOverlays(Thomasville);
map.removeOverlays(Troy);
map.removeOverlays(Washington);
map.removeOverlays(Weldon);
map.removeOverlays(Wentworth);
map.removeOverlays(Whiteville);
map.removeOverlays(Wilkesboro);
map.removeOverlays(Williamston);
map.removeOverlays(Wilmington);
map.removeOverlays(Wilson);
map.removeOverlays(Winston_Salem);
map.removeOverlays(Winterville);
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(Graham);map.removeOverlays(Ahoskie);
map.removeOverlays(Albemarle);
map.removeOverlays(Asheboro);
map.removeOverlays(Asheville);
map.removeOverlays(Charlotte);
map.removeOverlays(Clinton);
map.removeOverlays(Clyde);
map.removeOverlays(Concord);
map.removeOverlays(Dallas);
map.removeOverlays(Dobson);
map.removeOverlays(Dublin);
map.removeOverlays(Durham);
map.removeOverlays(Elizabeth_City);
map.removeOverlays(Fayetteville);
map.removeOverlays(Flat_Rock);
map.removeOverlays(Goldsboro);
map.removeOverlays(Graham);
map.removeOverlays(Grantsboro);
map.removeOverlays(Hamlet);
map.removeOverlays(Henderson);
map.removeOverlays(Hickory);
map.removeOverlays(Hudson);
map.removeOverlays(Jacksonville);
map.removeOverlays(Jamestown);
map.removeOverlays(Kenansville);
map.removeOverlays(Kinston);
map.removeOverlays(Louisburg);
map.removeOverlays(Lumberton);
map.removeOverlays(Marion);
map.removeOverlays(Morehead_City);
map.removeOverlays(Morganton);
map.removeOverlays(Murphy);
map.removeOverlays(New_Bern);
map.removeOverlays(Pinehurst);
map.removeOverlays(Polkton);
map.removeOverlays(Raleigh);
map.removeOverlays(Rocky_Mount);
map.removeOverlays(Roxboro);
map.removeOverlays(Salisbury);
map.removeOverlays(Sanford);
map.removeOverlays(Shelby);
map.removeOverlays(Smithfield);
map.removeOverlays(Spindale);
map.removeOverlays(Spruce_Pine);
map.removeOverlays(Statesville);
map.removeOverlays(Supply);
map.removeOverlays(Sylva);
map.removeOverlays(Tarboro);
map.removeOverlays(Thomasville);
map.removeOverlays(Troy);
map.removeOverlays(Washington);
map.removeOverlays(Weldon);
map.removeOverlays(Wentworth);
map.removeOverlays(Whiteville);
map.removeOverlays(Wilkesboro);
map.removeOverlays(Williamston);
map.removeOverlays(Wilmington);
map.removeOverlays(Wilson);
map.removeOverlays(Winston_Salem);
map.removeOverlays(Winterville);
map.addOverlays(Ahoskie);
centerByArray(Ahoskie, false, false);
cntMarker += Ahoskie.length;
map.addOverlays(Albemarle);
centerByArray(Albemarle, false, false);
cntMarker += Albemarle.length;
map.addOverlays(Asheboro);
centerByArray(Asheboro, false, false);
cntMarker += Asheboro.length;
map.addOverlays(Asheville);
centerByArray(Asheville, false, false);
cntMarker += Asheville.length;
map.addOverlays(Charlotte);
centerByArray(Charlotte, false, false);
cntMarker += Charlotte.length;
map.addOverlays(Clinton);
centerByArray(Clinton, false, false);
cntMarker += Clinton.length;
map.addOverlays(Clyde);
centerByArray(Clyde, false, false);
cntMarker += Clyde.length;
map.addOverlays(Concord);
centerByArray(Concord, false, false);
cntMarker += Concord.length;
map.addOverlays(Dallas);
centerByArray(Dallas, false, false);
cntMarker += Dallas.length;
map.addOverlays(Dobson);
centerByArray(Dobson, false, false);
cntMarker += Dobson.length;
map.addOverlays(Dublin);
centerByArray(Dublin, false, false);
cntMarker += Dublin.length;
map.addOverlays(Durham);
centerByArray(Durham, false, false);
cntMarker += Durham.length;
map.addOverlays(Elizabeth_City);
centerByArray(Elizabeth_City, false, false);
cntMarker += Elizabeth_City.length;
map.addOverlays(Fayetteville);
centerByArray(Fayetteville, false, false);
cntMarker += Fayetteville.length;
map.addOverlays(Flat_Rock);
centerByArray(Flat_Rock, false, false);
cntMarker += Flat_Rock.length;
map.addOverlays(Goldsboro);
centerByArray(Goldsboro, false, false);
cntMarker += Goldsboro.length;
map.addOverlays(Graham);
centerByArray(Graham, false, false);
cntMarker += Graham.length;
map.addOverlays(Grantsboro);
centerByArray(Grantsboro, false, false);
cntMarker += Grantsboro.length;
map.addOverlays(Hamlet);
centerByArray(Hamlet, false, false);
cntMarker += Hamlet.length;
map.addOverlays(Henderson);
centerByArray(Henderson, false, false);
cntMarker += Henderson.length;
map.addOverlays(Hickory);
centerByArray(Hickory, false, false);
cntMarker += Hickory.length;
map.addOverlays(Hudson);
centerByArray(Hudson, false, false);
cntMarker += Hudson.length;
map.addOverlays(Jacksonville);
centerByArray(Jacksonville, false, false);
cntMarker += Jacksonville.length;
map.addOverlays(Jamestown);
centerByArray(Jamestown, false, false);
cntMarker += Jamestown.length;
map.addOverlays(Kenansville);
centerByArray(Kenansville, false, false);
cntMarker += Kenansville.length;
map.addOverlays(Kinston);
centerByArray(Kinston, false, false);
cntMarker += Kinston.length;
map.addOverlays(Louisburg);
centerByArray(Louisburg, false, false);
cntMarker += Louisburg.length;
map.addOverlays(Lumberton);
centerByArray(Lumberton, false, false);
cntMarker += Lumberton.length;
map.addOverlays(Marion);
centerByArray(Marion, false, false);
cntMarker += Marion.length;
map.addOverlays(Morehead_City);
centerByArray(Morehead_City, false, false);
cntMarker += Morehead_City.length;
map.addOverlays(Morganton);
centerByArray(Morganton, false, false);
cntMarker += Morganton.length;
map.addOverlays(Murphy);
centerByArray(Murphy, false, false);
cntMarker += Murphy.length;
map.addOverlays(New_Bern);
centerByArray(New_Bern, false, false);
cntMarker += New_Bern.length;
map.addOverlays(Pinehurst);
centerByArray(Pinehurst, false, false);
cntMarker += Pinehurst.length;
map.addOverlays(Polkton);
centerByArray(Polkton, false, false);
cntMarker += Polkton.length;
map.addOverlays(Raleigh);
centerByArray(Raleigh, false, false);
cntMarker += Raleigh.length;
map.addOverlays(Rocky_Mount);
centerByArray(Rocky_Mount, false, false);
cntMarker += Rocky_Mount.length;
map.addOverlays(Roxboro);
centerByArray(Roxboro, false, false);
cntMarker += Roxboro.length;
map.addOverlays(Salisbury);
centerByArray(Salisbury, false, false);
cntMarker += Salisbury.length;
map.addOverlays(Sanford);
centerByArray(Sanford, false, false);
cntMarker += Sanford.length;
map.addOverlays(Shelby);
centerByArray(Shelby, false, false);
cntMarker += Shelby.length;
map.addOverlays(Smithfield);
centerByArray(Smithfield, false, false);
cntMarker += Smithfield.length;
map.addOverlays(Spindale);
centerByArray(Spindale, false, false);
cntMarker += Spindale.length;
map.addOverlays(Spruce_Pine);
centerByArray(Spruce_Pine, false, false);
cntMarker += Spruce_Pine.length;
map.addOverlays(Statesville);
centerByArray(Statesville, false, false);
cntMarker += Statesville.length;
map.addOverlays(Supply);
centerByArray(Supply, false, false);
cntMarker += Supply.length;
map.addOverlays(Sylva);
centerByArray(Sylva, false, false);
cntMarker += Sylva.length;
map.addOverlays(Tarboro);
centerByArray(Tarboro, false, false);
cntMarker += Tarboro.length;
map.addOverlays(Thomasville);
centerByArray(Thomasville, false, false);
cntMarker += Thomasville.length;
map.addOverlays(Troy);
centerByArray(Troy, false, false);
cntMarker += Troy.length;
map.addOverlays(Washington);
centerByArray(Washington, false, false);
cntMarker += Washington.length;
map.addOverlays(Weldon);
centerByArray(Weldon, false, false);
cntMarker += Weldon.length;
map.addOverlays(Wentworth);
centerByArray(Wentworth, false, false);
cntMarker += Wentworth.length;
map.addOverlays(Whiteville);
centerByArray(Whiteville, false, false);
cntMarker += Whiteville.length;
map.addOverlays(Wilkesboro);
centerByArray(Wilkesboro, false, false);
cntMarker += Wilkesboro.length;
map.addOverlays(Williamston);
centerByArray(Williamston, false, false);
cntMarker += Williamston.length;
map.addOverlays(Wilmington);
centerByArray(Wilmington, false, false);
cntMarker += Wilmington.length;
map.addOverlays(Wilson);
centerByArray(Wilson, false, false);
cntMarker += Wilson.length;
map.addOverlays(Winston_Salem);
centerByArray(Winston_Salem, false, false);
cntMarker += Winston_Salem.length;
map.addOverlays(Winterville);
centerByArray(Winterville, false, false);
cntMarker += Winterville.length;
reCenterMap();
//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');
}
}
function createMarker(point, label, icon){
var marker = new GMarker(point, icon);
var html = label;
GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); });
return marker;
}