// JavaScript Document
    var states =new Array()
    states['AL']='<a href=\'/alabama.html\'>Alabama State</a>';
    states['AZ']='<a href=\'/arizona.html\'>Arizona State</a>';
    states['AR']='<a href=\'/arkansas.html\'>Arkansas State</a>'; 
    states['CA']='<a href=\'/california.html\'>California State</a>';
    states['CO']='<a href=\'/colorado.html\'>Colorado State</a>';
    states['CT']='<a href=\'/connecticut.html\'>Connecticut State</a>';
    states['DE']='<a href=\'/delaware.html\'>Delaware State</a>';
    states['FL']='<a href=\'/florida.html\'>Florida State</a>';
    states['GA']='<a href=\'/georgia.html\'>Georgia State</a>';
    states['ID']='<a href=\'/idaho.html\'>Idaho State</a>';
    states['IL']='<a href=\'/illinois.html\'>Illinois State</a>';
    states['IN']='<a href=\'/indiana.html\'>Indiana State</a>';
    states['IA']='<a href=\'/iowa.html\'>Iowa State</a>';
    states['KS']='<a href=\'/kansas.html\'>Kansas State</a>';
    states['KY']='<a href=\'/kentucky.html\'>Kentucky State</a>';
    states['LA']='<a href=\'/louisiana.html\'>Louisiana State</a>';
    states['ME']='<a href=\'/maine.html\'>Maine State</a>';
    states['MD']='<a href=\'/maryland.html\'>Maryland State</a>';
    states['MA']='<a href=\'/massachusetts.html\'>Massachusetts State</a>';
    states['MI']='<a href=\'/michigan.html\'>Michigan State</a>';
    states['MN']='<a href=\'/minnesota.html\'>Minnesota State</a>';
    states['MS']='<a href=\'/mississippi.html\'>Mississippi State</a>';
    states['MO']='<a href=\'/missouri.html\'>Missouri State</a>';
    states['MT']='<a href=\'/montana.html\'>Montana State</a>';
    states['NE']='<a href=\'/nebraska.html\'>Nebraska State</a>';
    states['NV']='<a href=\'/nevada.html\'>Nevada State</a>';
    states['NH']='<a href=\'new-hampshire.html\'>New Hampshire State</a>';
    states['NJ']='<a href=\'/new-jersey\'>New Jersey State</a>';
    states['NM']='<a href=\'/new-mexico.html\'>New Mexico State</a>';
    states['NY']='<a href=\'/new-york.html\'>New York State</a>';
    states['NC']='<a href=\'/north-carolina.html\'>North Carolina State</a>';
    states['ND']='<a href=\'/north-dakota.html\'>North Dakota State</a>';
    states['OH']='<a href=\'/ohio.html\'>Ohio State</a>';
    states['OK']='<a href=\'/oklahoma.html\'>Oklahoma State </a>';
    states['OR']='<a href=\'/oregon.html\'>Oregon Pool State</a>';
    states['PA']='<a href=\'/pennsylvania.html\'>Pennsylvania State</a>';
    states['RI']='<a href=\'/rhode-island.html\'>Rhode Island State</a>';
    states['SC']='<a href=\'/south-carolina\'>South Carolina State</a>';
    states['SD']='<a href=\'/south-dakota\'>South Dakota State</a>';
    states['TN']='<a href=\'/tennessee.html\'>Tennessee State</a>';
    states['TX']='<a href=\'texas.html\'>Texas State</a>';
    states['UT']='<a href=\'utah.html\'>Utah State</a>';
    states['VT']='<a href=\'vermont.html\'>Vermont  State</a>';
    states['VA']='<a href=\'virginia.html\'>Virginia State</a>';
    states['WA']='Washington State';
    states['WV']='<a href=\'/west-virginia.html\'>West Virginia State </a>';
    states['WI']='<a href=\'/wisconsin.html\'>Wisconsin  state</a>';
    states['WY']='<a href=\'/Wyoming.html\'>Wyoming State</a>';
     var map;
      function initialize() {
        if (GBrowserIsCompatible()) {
          map = new GMap2(document.getElementById("map_canvas"), {draggableCursor: "crosshair"});
          map.setCenter(new GLatLng(42, -99), 3);
          map.addControl(new GSmallMapControl());
          map.addControl(new GMapTypeControl());
       	  var label = new ELabel(new GLatLng(55.400032, -130.628906), "<a href='http://www.poolrooms.com/submit-pool-room.html'>Add New Pool Room</a>", "style1", new GSize(-40,0), 60 );
          map.addOverlay(label); 
           for (stateCode in stateBorders) { 
            var polygon = createPoly(stateCode);
            map.addOverlay(polygon);
          }
         }
        }    
    function createPoly(stateCode)
     {
         var polygon = new GPolygon(stateBorders[stateCode], "#f33f00", 0, 0, "#ff0000", 0.01);
         GEvent.addListener(polygon, "click", function(latlng) {
         map.openInfoWindow(latlng,states[stateCode]+"<br><br>Find with PoolRooms.com Pages Pool Hall In "+states[stateCode]);
       });
       return polygon;
    }
