//= y)) || ((this.getVertex(j).lat() < y) && (this.getVertex(i).lat() >= y)) ) { if ( this.getVertex(i).lng() + (y - this.getVertex(i).lat()) / (this.getVertex(j).lat()-this.getVertex(i).lat()) * (this.getVertex(j).lng() - this.getVertex(i).lng())"; popHTML += "
"; popHTML += ""; popHTML += "
Want to Save up to $600
"; popHTML += "
on Auto Insurance
"; popHTML += "
in " + "New Mexico" + "?
"; popHTML += "
Enter your Zip Code:
"; popHTML += ""; popHTML += "
"; var map = new GMap2(document.getElementById("map")); var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(0,0)); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl(),topRight); map.addControl(new GOverviewMapControl(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(5, 5))); var center = new GLatLng(34.669359,-105.578613); //new GLatLng(47.391700,-121.570800); map.setCenter(center,6); myIcon = new GIcon(); // marker image myIcon.image ="http://www.autoquotenow.com/images/marker.png"; myIcon.iconSize = new GSize(45, 17); myIcon.iconAnchor = new GPoint(45, 17); myIcon.infoWindowAnchor = new GPoint(43,17); var marker = new GMarker(center, myIcon) map.addOverlay(marker); var myEvent = GEvent.addListener(marker,"mouseover", function() { marker.openInfoWindowHtml(popHTML); map.panTo(new GLatLng(35.669359,-105.578613)); // GEvent.removeListener(myEvent); }); var label = "New Mexico"; var color = "#88ff00"; var pts = []; pts[0] = new GLatLng (36.9971,-109.0448); pts[1] = new GLatLng (31.3337,-109.0489); pts[2] = new GLatLng (31.3349,-108.2140); pts[3] = new GLatLng (31.7795,-108.2071); pts[4] = new GLatLng (31.7830,-106.5317); pts[5] = new GLatLng (32.0034,-106.6223); pts[6] = new GLatLng (31.9999,-103.0696); pts[7] = new GLatLng (36.9982,-103.0023); pts[8] = new GLatLng (36.9982,-109.0475); var poly = new GPolygon(pts,"#333399",3,1,color,.1); polys.push(poly); labels.push(label); map.addOverlay(poly); } else { alert("Sorry, Google Maps is not compatible with this browser."); } } //]]>