var map;function createMarker(point, baseIcon, index, html) {var icono = new GIcon(baseIcon);icono.shadow = "http://d.tiempo.hvimg.com/img/shadow.png";icono.image = "http://d.tiempo.hvimg.com/img/" + index + ".png";markerOptions = { icon:icono };var marker = new GMarker(point, markerOptions);GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});return marker;}function chinchetasCercanas(doc, flagZoom){var xmlDoc = GXml.parse(doc);var markers = xmlDoc.getElementsByTagName("marker");map.clearOverlays();for (var i = 0; i < markers.length; i++) {var lat = parseFloat(markers[i].getAttribute("lat"));var lng = parseFloat(markers[i].getAttribute("lng"));var point = new GLatLng(lat,lng);var indice = markers[i].getAttribute("name");var html = GXml.value(markers[i].getElementsByTagName("html")[0]);var baseIcon = new GIcon(G_DEFAULT_ICON);baseIcon.iconSize = new GSize(35, 35);var marker = createMarker(point,baseIcon,indice,html);map.addOverlay(marker);}}function initialize(){if (GBrowserIsCompatible()) {map = new GMap2(document.getElementById("mapa"));map.setCenter(new GLatLng(8, -66), 4, G_PHYSICAL_MAP);map.setUIToDefault();map.enableDoubleClickZoom();map.disableScrollWheelZoom();}GEvent.addListener(map, "dragend", function() {var center = map.getCenter();var coor= map.getBounds();url = "/mapajax.phtml?id=arrastrar&coor="+coor;GDownloadUrl(url, function(doc, responseCode) {if(responseCode == 200) {chinchetasCercanas(doc,0);}});});GEvent.addListener(map, "zoomend", function (){var center = map.getCenter();var coor= map.getBounds();url = "/mapajax.phtml?id=arrastrar&coor="+coor;GDownloadUrl(url, function(doc, responseCode) {if(responseCode == 200) {chinchetasCercanas(doc,0);}});});var baseIcon = new GIcon(G_DEFAULT_ICON);baseIcon.iconSize = new GSize(35, 35);var latlng = new GLatLng(8.62917, -70.2072);map.addOverlay(createMarker(latlng, baseIcon, '30', 'Barinas
| Domingo 5 |  | Máx.:34ºC / Mín.: 23ºC |
| Lunes 6 |  | Máx.:34ºC / Mín.: 23ºC |
| Martes 7 |  | Máx.:33ºC / Mín.: 24ºC |
| Miércoles 8 |  | Máx.:33ºC / Mín.: 24ºC |
| Jueves 9 |  | Máx.:34ºC / Mín.: 24ºC |
'));var latlng = new GLatLng(10.0739, -69.3228);map.addOverlay(createMarker(latlng, baseIcon, '28', 'Barquisimeto| Domingo 5 |  | Máx.:28ºC / Mín.: 19ºC |
| Lunes 6 |  | Máx.:30ºC / Mín.: 20ºC |
| Martes 7 |  | Máx.:30ºC / Mín.: 20ºC |
| Miércoles 8 |  | Máx.:29ºC / Mín.: 20ºC |
| Jueves 9 |  | Máx.:30ºC / Mín.: 20ºC |
'));var latlng = new GLatLng(10.4019, -71.4461);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Cabimas| Domingo 5 |  | Máx.:33ºC / Mín.: 24ºC |
| Lunes 6 |  | Máx.:34ºC / Mín.: 24ºC |
| Martes 7 |  | Máx.:34ºC / Mín.: 24ºC |
| Miércoles 8 |  | Máx.:34ºC / Mín.: 24ºC |
| Jueves 9 |  | Máx.:34ºC / Mín.: 24ºC |
'));var latlng = new GLatLng(10.5, -66.9167);map.addOverlay(createMarker(latlng, baseIcon, '30', 'Caracas| Domingo 5 |  | Máx.:27ºC / Mín.: 16ºC |
| Lunes 6 |  | Máx.:28ºC / Mín.: 16ºC |
| Martes 7 |  | Máx.:27ºC / Mín.: 17ºC |
| Miércoles 8 |  | Máx.:27ºC / Mín.: 17ºC |
| Jueves 9 |  | Máx.:27ºC / Mín.: 17ºC |
'));var latlng = new GLatLng(8.35333, -62.6528);map.addOverlay(createMarker(latlng, baseIcon, '30', 'Ciudad Guayana| Domingo 5 |  | Máx.:27ºC / Mín.: 21ºC |
| Lunes 6 |  | Máx.:28ºC / Mín.: 21ºC |
| Martes 7 |  | Máx.:28ºC / Mín.: 22ºC |
| Miércoles 8 |  | Máx.:28ºC / Mín.: 22ºC |
| Jueves 9 |  | Máx.:28ºC / Mín.: 22ºC |
'));var latlng = new GLatLng(11.4092, -69.6672);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Coro| Domingo 5 |  | Máx.:31ºC / Mín.: 24ºC |
| Lunes 6 |  | Máx.:31ºC / Mín.: 24ºC |
| Martes 7 |  | Máx.:31ºC / Mín.: 24ºC |
| Miércoles 8 |  | Máx.:30ºC / Mín.: 24ºC |
| Jueves 9 |  | Máx.:31ºC / Mín.: 24ºC |
'));var latlng = new GLatLng(10.4667, -64.1667);map.addOverlay(createMarker(latlng, baseIcon, '47', 'Cumana| Domingo 5 |  | Máx.:31ºC / Mín.: 23ºC |
| Lunes 6 |  | Máx.:32ºC / Mín.: 23ºC |
| Martes 7 |  | Máx.:32ºC / Mín.: 23ºC |
| Miércoles 8 |  | Máx.:31ºC / Mín.: 23ºC |
| Jueves 9 |  | Máx.:31ºC / Mín.: 23ºC |
'));var latlng = new GLatLng(10.6317, -71.6406);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Maracaibo| Domingo 5 |  | Máx.:33ºC / Mín.: 23ºC |
| Lunes 6 |  | Máx.:34ºC / Mín.: 23ºC |
| Martes 7 |  | Máx.:34ºC / Mín.: 23ºC |
| Miércoles 8 |  | Máx.:33ºC / Mín.: 23ºC |
| Jueves 9 |  | Máx.:33ºC / Mín.: 23ºC |
'));var latlng = new GLatLng(10.2469, -67.5958);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Maracay| Domingo 5 |  | Máx.:32ºC / Mín.: 19ºC |
| Lunes 6 |  | Máx.:34ºC / Mín.: 20ºC |
| Martes 7 |  | Máx.:33ºC / Mín.: 21ºC |
| Miércoles 8 |  | Máx.:33ºC / Mín.: 21ºC |
| Jueves 9 |  | Máx.:33ºC / Mín.: 20ºC |
'));var latlng = new GLatLng(0, 0);map.addOverlay(createMarker(latlng, baseIcon, '47', 'Maturín| Domingo 5 |  | Máx.:29ºC / Mín.: 23ºC |
| Lunes 6 |  | Máx.:30ºC / Mín.: 23ºC |
| Martes 7 |  | Máx.:29ºC / Mín.: 24ºC |
| Miércoles 8 |  | Máx.:29ºC / Mín.: 24ºC |
| Jueves 9 |  | Máx.:31ºC / Mín.: 24ºC |
'));var latlng = new GLatLng(0, 0);map.addOverlay(createMarker(latlng, baseIcon, '30', 'Puerto La Cruz| Domingo 5 |  | Máx.:31ºC / Mín.: 22ºC |
| Lunes 6 |  | Máx.:33ºC / Mín.: 22ºC |
| Martes 7 |  | Máx.:32ºC / Mín.: 22ºC |
| Miércoles 8 |  | Máx.:31ºC / Mín.: 22ºC |
| Jueves 9 |  | Máx.:32ºC / Mín.: 22ºC |
'));var latlng = new GLatLng(0, 0);map.addOverlay(createMarker(latlng, baseIcon, '30', 'San Fernando| Domingo 5 |  | Máx.:33ºC / Mín.: 23ºC |
| Lunes 6 |  | Máx.:33ºC / Mín.: 24ºC |
| Martes 7 |  | Máx.:33ºC / Mín.: 24ºC |
| Miércoles 8 |  | Máx.:33ºC / Mín.: 24ºC |
| Jueves 9 |  | Máx.:34ºC / Mín.: 24ºC |
'));}