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(4, -72), 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(10.9639, -74.7964);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Barranquilla
| 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.:29ºC / Mín.: 24ºC |
'));var latlng = new GLatLng(6.33889, -75.5622);map.addOverlay(createMarker(latlng, baseIcon, '47', 'Bello| Domingo 5 |  | Máx.:25ºC / Mín.: 16ºC |
| Lunes 6 |  | Máx.:26ºC / Mín.: 16ºC |
| Martes 7 |  | Máx.:25ºC / Mín.: 17ºC |
| Miércoles 8 |  | Máx.:25ºC / Mín.: 18ºC |
| Jueves 9 |  | Máx.:24ºC / Mín.: 17ºC |
'));var latlng = new GLatLng(4.7, -74.13);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Bogotá| Domingo 5 |  | Máx.:21ºC / Mín.: 9ºC |
| Lunes 6 |  | Máx.:20ºC / Mín.: 11ºC |
| Martes 7 |  | Máx.:19ºC / Mín.: 11ºC |
| Miércoles 8 |  | Máx.:19ºC / Mín.: 10ºC |
| Jueves 9 |  | Máx.:19ºC / Mín.: 10ºC |
'));var latlng = new GLatLng(7.12972, -73.1258);map.addOverlay(createMarker(latlng, baseIcon, '47', 'Bucaramanga| Domingo 5 |  | Máx.:26ºC / Mín.: 19ºC |
| Lunes 6 |  | Máx.:26ºC / Mín.: 19ºC |
| Martes 7 |  | Máx.:25ºC / Mín.: 18ºC |
| Miércoles 8 |  | Máx.:24ºC / Mín.: 19ºC |
| Jueves 9 |  | Máx.:24ºC / Mín.: 18ºC |
'));var latlng = new GLatLng(3.43722, -76.5225);map.addOverlay(createMarker(latlng, baseIcon, '47', 'Cali| Domingo 5 |  | Máx.:28ºC / Mín.: 19ºC |
| Lunes 6 |  | Máx.:29ºC / Mín.: 19ºC |
| Martes 7 |  | Máx.:29ºC / Mín.: 20ºC |
| Miércoles 8 |  | Máx.:30ºC / Mín.: 20ºC |
| Jueves 9 |  | Máx.:28ºC / Mín.: 19ºC |
'));var latlng = new GLatLng(10.3997, -75.5144);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Cartagena| Domingo 5 |  | Máx.:31ºC / Mín.: 23ºC |
| Lunes 6 |  | Máx.:31ºC / Mín.: 23ºC |
| Martes 7 |  | Máx.:30ºC / Mín.: 23ºC |
| Miércoles 8 |  | Máx.:30ºC / Mín.: 23ºC |
| Jueves 9 |  | Máx.:29ºC / Mín.: 23ºC |
'));var latlng = new GLatLng(7.93, -72.52);map.addOverlay(createMarker(latlng, baseIcon, '30', 'Cúcuta| Domingo 5 |  | Máx.:30ºC / Mín.: 21ºC |
| Lunes 6 |  | Máx.:31ºC / Mín.: 21ºC |
| Martes 7 |  | Máx.:31ºC / Mín.: 21ºC |
| Miércoles 8 |  | Máx.:30ºC / Mín.: 20ºC |
| Jueves 9 |  | Máx.:31ºC / Mín.: 20ºC |
'));var latlng = new GLatLng(0, 0);map.addOverlay(createMarker(latlng, baseIcon, '30', 'Ibagué| Domingo 5 |  | Máx.:28ºC / Mín.: 19ºC |
| Lunes 6 |  | Máx.:29ºC / Mín.: 20ºC |
| Martes 7 |  | Máx.:28ºC / Mín.: 20ºC |
| Miércoles 8 |  | Máx.:28ºC / Mín.: 20ºC |
| Jueves 9 |  | Máx.:28ºC / Mín.: 20ºC |
'));var latlng = new GLatLng(5.07, -75.5206);map.addOverlay(createMarker(latlng, baseIcon, '11', 'Manizales| Domingo 5 |  | Máx.:21ºC / Mín.: 12ºC |
| Lunes 6 |  | Máx.:22ºC / Mín.: 13ºC |
| Martes 7 |  | Máx.:22ºC / Mín.: 12ºC |
| Miércoles 8 |  | Máx.:22ºC / Mín.: 13ºC |
| Jueves 9 |  | Máx.:21ºC / Mín.: 13ºC |
'));var latlng = new GLatLng(6.22, -75.6);map.addOverlay(createMarker(latlng, baseIcon, '47', 'Medellín| Domingo 5 |  | Máx.:27ºC / Mín.: 19ºC |
| Lunes 6 |  | Máx.:28ºC / Mín.: 19ºC |
| Martes 7 |  | Máx.:27ºC / Mín.: 19ºC |
| Miércoles 8 |  | Máx.:27ºC / Mín.: 20ºC |
| Jueves 9 |  | Máx.:27ºC / Mín.: 19ºC |
'));var latlng = new GLatLng(1.21361, -77.2811);map.addOverlay(createMarker(latlng, baseIcon, '11', 'Pasto| Domingo 5 |  | Máx.:22ºC / Mín.: 13ºC |
| Lunes 6 |  | Máx.:22ºC / Mín.: 13ºC |
| Martes 7 |  | Máx.:22ºC / Mín.: 14ºC |
| Miércoles 8 |  | Máx.:22ºC / Mín.: 14ºC |
| Jueves 9 |  | Máx.:21ºC / Mín.: 14ºC |
'));var latlng = new GLatLng(4.81333, -75.6961);map.addOverlay(createMarker(latlng, baseIcon, '30', 'Pereira| Domingo 5 |  | Máx.:26ºC / Mín.: 16ºC |
| Lunes 6 |  | Máx.:27ºC / Mín.: 17º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.:26ºC / Mín.: 17ºC |
'));var latlng = new GLatLng(11.2472, -74.2017);map.addOverlay(createMarker(latlng, baseIcon, '29', 'Santa Marta| Domingo 5 |  | Máx.:31ºC / Mín.: 23ºC |
| Lunes 6 |  | Máx.:32ºC / Mín.: 22ºC |
| Martes 7 |  | Máx.:32ºC / Mín.: 22ºC |
| Miércoles 8 |  | Máx.:32ºC / Mín.: 22ºC |
| Jueves 9 |  | Máx.:31ºC / Mín.: 22ºC |
'));}