// JavaScript Document

if((screen.width<820))
{document.writeln('<link rel=stylesheet type=text/css href=style800.css />')}
if((screen.width<1050)&&(screen.width>821))
{document.writeln('<link rel=stylesheet type=text/css href=style1024.css />')}
if((screen.width>1050))
{document.writeln('<link rel=stylesheet type=text/css href=style.css />')}
function barraUsuarios()
{if(document.getElementeById("busqueda").left==0)
{document.getElementeById("busqueda").left=-10}
else
{document.getElementeById("busqueda").left=0}}
function tipoMapa(tipoMapa)
{if(tipoMapa==1)
{map.setMapType(G_NORMAL_MAP);}
else
{map.setMapType(G_HYBRID_MAP);}}
var highlightCircle;var map;var gdir;var geocoder=null;var iconBlue=new GIcon();var customIcons=[];var chosen=[];var markerGroups={"0":[],"702":[],"704":[],"303":[],"601":[],"200":[],"202":[],"204":[],"205":[],"206":[],"300":[],"302":[],"303":[],"401":[],"402":[],"304":[],"203":[],"306":[],"1307":[],"400":[],"1401":[],"403":[],"404":[],"405":[],"1406":[],"407":[],"406":[],"408":[],"500":[],"501":[],"503":[],"302":[],"301":[],"1503":[],"1504":[],"505":[],"600":[],"601":[],"303":[],"307":[],"604":[],"605":[],"606":[],"700":[],"502":[],"703":[],"605":[],"1402":[],"504":[],"801":[],"802":[],"803":[],"804":[],"805":[],"806":[],"807":[],"808":[],"901":[],"902":[],"903":[],"904":[],"107":[],"3066":[],"666":[]};a
function resizeMapa(){alturaPantalla=document.getElementeById("rightpanel").style.heigh
porcentajeAltura=alturaPantalla/100
document.getElementeById("rightpanel").style.heigh=porcentajeAltura*60}
function quitarIntersecciones()
{if(document.getElementById("prov").value=="Capital Federal")
{document.getElementById("interseccionesTR").style.display="";}
else
{document.getElementById("interseccionesTR").style.display="none";}}
function intersecciones()
{var calle1=document.getElementById("barrio").value;do{calle1=calle1.replace(' ','%20');calle1=calle1.replace("'",'%20');}
while(calle1.indexOf(' ')>=0);var calle2=document.getElementById("InterseccionC").value;do{calle2=calle2.replace(' ','%20');calle2=calle2.replace("'",'%20');}
while(calle2.indexOf(' ')>=0);urls="http://www.minnus.com.ar/kmlIntersecciones.php?calle1="+calle1+"&calle2="+calle2;geoXml=new GGeoXml(urls);map.addOverlay(geoXml);}
function a()
{var coordenada=document.getElementById("coordenada").value;var coordenada1=coordenada.replace("(","");var coordenada=coordenada1.replace(")","");coordenada1=coordenada.replace(" ","");var coordenadaICO=document.getElementById("marca").value;var coordenada1ICO=coordenadaICO.replace("(","");var coordenadaICO=coordenada1ICO.replace(")","");coordenada1ICO=coordenada.replace(" ","");if(document.getElementById("recorrido").checked==true)
{calleUno=document.getElementById("barrio").value+"%20"+document.getElementById("provincia").value+","+document.getElementById("prov").value
for(i=0;i<calleUno.length;i++){calleUno=calleUno.replace(" ","%20")}
calleDos=document.getElementById("barrio2").value+"%20"+document.getElementById("provincia2").value+","+document.getElementById("prov2").value
for(i=0;i<calleDos.length;i++){calleDos=calleDos.replace(" ","%20")}
coordenada1=coordenada1+"&altura="+document.getElementById("altura").value+"&posiIcono="+document.getElementById("marca").value+"&recorrido=si&calleIda="+calleUno+"&calleVuelta="+calleDos}
else
{coordenada1=coordenada1+"&altura="+document.getElementById("altura").value+"&posiIcono="+document.getElementById("marca").value}
return coordenada1}
function highlightCurrentMarker(){var markerPoint=currentMarker.getPoint();var polyPoints=Array();if(highlightCircle){map.removeOverlay(highlightCircle);}
var mapNormalProj=G_NORMAL_MAP.getProjection();var mapZoom=map.getZoom();var clickedPixel=mapNormalProj.fromLatLngToPixel(markerPoint,mapZoom);var polySmallRadius=20;var polyNumSides=20;var polySideLength=18;for(var a=0;a<(polyNumSides+1);a++){var aRad=polySideLength*a*(Math.PI/180);var polyRadius=polySmallRadius;var pixelX=clickedPixel.x+polyRadius*Math.cos(aRad);var pixelY=clickedPixel.y+polyRadius*Math.sin(aRad);var polyPixel=new GPoint(pixelX,pixelY);var polyPoint=mapNormalProj.fromPixelToLatLng(polyPixel,mapZoom);polyPoints.push(polyPoint);}
highlightCircle=new GPolygon(polyPoints,"#000000",0.4,0.0,"#666666",.2);map.addOverlay(highlightCircle);}
function borraTodo()
{var categorias=document.getElementById("fCategoria").value;var categoria=categorias.split(",");for(var a=0;a<categoria.length;a++)
{var categoriaH=categoria[a]
for(var i=0;i<markerGroups[categoriaH].length;i++){var marker=markerGroups[categoriaH][i];marker.hide();}}
document.getElementById("kml-categoria").value=0
document.getElementById("fCategoria").value=0}
function reTraz()
{if(document.getElementById("direccionTrazado").style.display=="none"){document.getElementById("direccionTrazado").style.display="";document.getElementById("recorridoTrazado").checked=true;}
else{document.getElementById("direccionTrazado").style.display="none";document.getElementById("recorridoTrazado").checked=false;}}
function cargaPosicion(lat,long)
{map.panTo(new GLatLng(long,lat),document.getElementById("altura").value);var latlng=new GLatLng(long,lat);map.setCenter(new GLatLng(long,lat),document.getElementById("altura").value);gdir=new GDirections(map,document.getElementById("directions"));map.addOverlay(new GMarker(latlng));}
function irPosicion(lat,long,ID)
{urls="http://www.minnus.com.ar/linksMaps/php1.php?categoria="+ID
GDownloadUrl(urls,function(data)
{var xml=GXml.parse(data);var markers=xml.documentElement.getElementsByTagName("marker");for(var i=0;i<markers.length;i++)
{var iconBlue=new GIcon();var name=markers[i].getAttribute("name");var address=markers[i].getAttribute("address");var type=markers[i].getAttribute("type");var point=new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")),parseFloat(document.getElementById("altura").value));iconBlue.image=markers[i].getAttribute("Icono_afuera");imagen=markers[i].getAttribute("Icono_afuera");Telefono=markers[i].getAttribute("Telefono");idBanner=markers[i].getAttribute("idBanner");Banner=markers[i].getAttribute("banner");categoria=markers[i].getAttribute("categoria");Web=markers[i].getAttribute("Web");iconBlue.iconSize=new GSize(32,32);iconBlue.iconAnchor=new GPoint(32,32);iconBlue.infoWindowAnchor=new GPoint(2,1);customIcons["carga"]=iconBlue;var marker=createMarkerONE(point,name,address,type,imagen,Telefono,idBanner,Banner,categoria,Web);var lati=parseFloat(markers[i].getAttribute("lat"))
var longi=parseFloat(markers[i].getAttribute("lng"))
itemSeleccionado(lati,longi,0.025,"#333333",0.7,0.1,"#666666",.5);map.addOverlay(marker)}});map.panTo(new GLatLng(lat,long));map.setCenter(new GLatLng(lat,long),16);}
function itemSeleccionado(lat,lng,radius,strokeColor,strokeWidth,strokeOpacity,fillColor,fillOpacity){var d2r=Math.PI/180;var r2d=180/Math.PI;var Clat=radius*0.014483;var Clng=Clat/Math.cos(lat*d2r);var Cpoints=[];for(var i=0;i<33;i++){var theta=Math.PI*(i/16);Cy=lat+(Clat*Math.sin(theta));Cx=lng+(Clng*Math.cos(theta));var P=new GPoint(Cx,Cy);Cpoints.push(P);}
var polygon=new GPolygon(Cpoints,strokeColor,strokeWidth,strokeOpacity,fillColor,fillOpacity);map.addOverlay(polygon);}
function vaciaBarrio(){document.getElementById('barrio').value=''}
function vaciaProvincia(){document.getElementById('provincia').value=''}
function vaciaBarrio2(){document.getElementById('barrio2').value=''}
function vaciaProvincia2(){document.getElementById('provincia2').value=''}
function viTran(){if(document.getElementById("ckTransito").checked==true)
{document.getElementById("ckTransito").checked=false}
else
{document.getElementById("ckTransito").checked=true}
clickk('ckTransito','mod_3d_M')}
function MoreControl(){};MoreControl.prototype=new GControl();MoreControl.prototype.initialize=function(map){}
MoreControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(678,7));}
var progressBar;function clicks(boton,id){if(document.getElementById(boton).checked==false)
{var nada=document.getElementById('kml-categoria').value
document.getElementById('kml-categoria').value=nada.replace(","+id,"")
document.getElementById('fCategoria').value=document.getElementById('kml-categoria').value
for(var i=0;i<markerGroups[id].length;i++){var marker=markerGroups[id][i];marker.hide();}}
else
{visualizarMensaje('buscarComercios')
for(var i=0;i<markerGroups[id].length;i++)
{var marker=markerGroups[id][i];marker.show();}
document.getElementById('kml-categoria').value=document.getElementById('kml-categoria').value+","+id;document.getElementById('fCategoria').value=document.getElementById('kml-categoria').value
cargaDatos()}}
function addAddressToMap(response){map.clearOverlays();if(!response||response.Status.code!=200){mensaje("Lo siento pero esa direccion no existe, intenta de vuelta");}else{place=response.Placemark[0];point=new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);map.setCenter(new GLatLng(place.Point.coordinates[0],place.Point.coordinates[1]),parseFloat(document.getElementById("altura").value));gdir=new GDirections(map,document.getElementById("directions"));marker=new GMarker(point);map.addOverlay(marker);marker.openInfoWindowHtml(place.address);document.getElementById("marca").value=place.Point.coordinates[1]+","+place.Point.coordinates[0]}}
function handleErrors(){if(gdir.getStatus().code==G_GEO_UNKNOWN_ADDRESS)
{if(document.getElementById("repruebaDireccion").value>20){if(document.getElementById("recorrido").checked==true)
{document.getElementById("provincia").value=parseInt(document.getElementById("provincia").value)+1
document.getElementById("provincia2").value=parseInt(document.getElementById("provincia2").value)+1
document.getElementById("repruebaDireccion").value=parseInt(document.getElementById("repruebaDireccion").value)+1
if(document.getElementById("partido").value=="")
{fromAddress=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("prov").value
fromAddress2=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("prov").value}
else
{fromAddress=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("partido").value+", "+document.getElementById("prov").value
fromAddress2=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("partido").value+", "+document.getElementById("prov").value}
if(document.getElementById("partido2").value=="")
{toAddress=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("prov2").value
toAddress2=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("prov2").value}
else
{toAddress=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("partido2").value+", "+document.getElementById("prov2").value
toAddress2=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("partido2").value+", "+document.getElementById("prov2").value}
gdir.load("from: "+fromAddress+" to: "+toAddress,{"locale":"es"});}}
else
{alert("Disculpa pero no encontramos una de las direcciones cargadas :( ")}}}
function armadoBusqueda(){if(document.getElementById("partido").value=="Barrio/Partido")
{document.getElementById("partido").value=""}
if(document.getElementById("partido2").value=="Barrio/Partido")
{document.getElementById("partido2").value=""}
if(document.getElementById("recorrido").checked==true)
{if(document.getElementById("partido").value=="")
{fromAddress=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("prov").value
fromAddress2=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("prov").value}
else
{fromAddress=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("partido").value+", "+document.getElementById("prov").value
fromAddress2=document.getElementById("barrio").value+" "+document.getElementById("provincia").value+", "+document.getElementById("partido").value+", "+document.getElementById("prov").value}
if(document.getElementById("partido2").value=="")
{toAddress=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("prov2").value
toAddress2=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("prov2").value}
else
{toAddress=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("partido2").value+", "+document.getElementById("prov2").value
toAddress2=document.getElementById("barrio2").value+" "+document.getElementById("provincia2").value+", "+document.getElementById("partido2").value+", "+document.getElementById("prov2").value}
document.getElementById("repruebaDireccion").value=0
gdir.load("from: "+fromAddress+" to: "+toAddress,{"locale":"es"});}
else
{direccionMin=document.getElementById("barrio").value.toLowerCase();partidoMin=document.getElementById("partido").value.toLowerCase();switch(direccionMin)
{case"o'higgins":calleBusqueda=direccionMin.replace("o'higgins","higgins");break;case"libertador":calleBusqueda=direccionMin.replace("libertador","del libertador");break;default:calleBusqueda=direccionMin}
switch(partidoMin)
{case"capital":partidoBusqueda=partidoMin.replace("capital","Capital Federal");break;case"partido":partidoBusqueda=partidoMin.replace("partido","Capital Federal");break;default:partidoBusqueda=partidoMin}
if(document.getElementById("prov").value=="Capital Federal"&&partidoBusqueda=="Capital Federal")
{if(partidoBusqueda!="Capital Federal")
{var address=document.getElementById("provincia").value+" "+calleBusqueda+","+partidoBusqueda+","+document.getElementById("prov").value+", argentina";}
else
{var address=document.getElementById("provincia").value+" "+calleBusqueda+","+document.getElementById("prov").value+", argentina";}}
else
{var address=document.getElementById("provincia").value+" "+calleBusqueda+","+partidoBusqueda+","+document.getElementById("prov").value+", argentina";}
geocoder.getLocations(address,addAddressToMap);var coordenada=document.getElementById("coordenada").value;var coordenada1=coordenada.replace("(","");var coordenada=coordenada1.replace(")","");coordenada1=coordenada.replace(" ","");coordenada=coordenada1.split(",",2);map.setCenter(new GLatLng(parseFloat(coordenada[0]),parseFloat(coordenada[1])),parseFloat(16));}}
function mensaje(mens)
{alert(mens)}
function cambiaBusqueda()
{if(document.getElementById("armadoRuta").style.display=="none"){document.getElementById("desde").style.display="";document.getElementById("armadoRuta").style.display="";document.getElementById("buscar").style.display="none";document.getElementById("recorrido").checked=true;document.getElementById("interseccionesTR").style.display="none";}
else{document.getElementById("buscar").style.display="";document.getElementById("armadoRuta").style.display="none";document.getElementById("desde").style.display="none";document.getElementById("recorrido").checked=false;document.getElementById("interseccionesTR").style.display="";}}
function onGDirectionsLoad(){var poly=gdir.getPolyline();if(poly.getVertexCount()>500){alert("La mejor ruta es muy complicada, esta es mas sencilla");return;}
var params=[];var markersArray=[];markersArray.push(poly.getVertex(0).toUrlValue(5)+",greena");markersArray.push(poly.getVertex(poly.getVertexCount()-1).toUrlValue(5)+",greenb");params.push("markers="+markersArray.join("|"));var polyParams="rgba:0x0000FF80,weight:5|";var polyLatLngs=[];}
function onEnter(ev){if(ev==13)
{if(document.getElementById("interseccion").checked!=false)
{intersecciones()}
else
{if(isNaN(document.getElementById("provincia").value)==true)
{intersecciones()
document.getElementById("provincia").value=""}

armadoBusqueda();}}}
function showAddress(){direccionMin=document.getElementById("barrio").value.toLowerCase();partidoMin=document.getElementById("partido").value.toLowerCase();switch(direccionMin)
{case"o'higgins":calleBusqueda=direccionMin.replace("o'higgins","higgins");break;case"libertador":calleBusqueda=direccionMin.replace("libertador","del libertador");break;default:calleBusqueda=direccionMin}
switch(partidoMin)
{case"capital":partidoBusqueda=partidoMin.replace("capital","Capital Federal");break;case"partido":partidoBusqueda=partidoMin.replace("partido","Capital Federal");break;default:partidoBusqueda=partidoMin}
if(document.getElementById("prov").value=="Capital Federal"&&partidoBusqueda=="Capital Federal")
{if(partidoBusqueda!="Capital Federal")
{direccion=document.getElementById("provincia").value+" "+calleBusqueda+","+partidoBusqueda+","+document.getElementById("prov").value+", argentina";}
else
{direccion=document.getElementById("provincia").value+" "+calleBusqueda+","+document.getElementById("prov").value+", argentina";}}
else
{direccion=document.getElementById("provincia").value+" "+calleBusqueda+","+partidoBusqueda+","+document.getElementById("prov").value+", argentina";}
vueloDireccions(direccion);}
var layers={"cos":{"url":"http://links.minnus.com.ar/protejeLinkKML.php?aleato=cos","name":"cos"},"ba_cal":{"url":"http://links.minnus.com.ar/protejeLinkKML.php?aleato=ba_cal","name":"ba_cal"},"mod_3d_M":{"url":"http://links.minnus.com.ar/protejeLinkKML.php?aleato=mod_3d_M","name":"mod_3d_M"},"ca_foo":{"url":"http://links.minnus.com.ar/protejeLinkKML.php?aleato=ca_foo","name":"ca_foo"},"sus":{"url":"http://links.minnus.com.ar/protejeLinkKML.php?aleato=sus","name":"sus"},"trur":{"url":"http://links.minnus.com.ar/protejeLinkKML.php?aleato=trur","name":"trur"},"trl":{"url":"http://links.minnus.com.ar/protejeLinkKML.php?aleato=trl","name":"trl"}};function clickk(boton,id){if(document.getElementById(boton).checked==false)
{var nada=document.getElementById('kml-categoriaK').value
document.getElementById('kml-categoriaK').value=nada.replace(","+id,"")
map.removeOverlay(layers[id].geoXml);}
else
{document.getElementById('kml-categoriaK').value=document.getElementById('kml-categoriaK').value+","+id;var geoXml=new GGeoXml(layers[id].url);GEvent.addListener(geoXml,'load',function(){if(geoXml.loadedCorrectly()){geoXml.gotoDefaultViewport(map);layers[id].geoxml=geoXml;}});layers[id].geoXml=geoXml;map.addOverlay(layers[id].geoXml);}}
function cargaDatos()
{urls="http://www.minnus.com.ar/linksMaps/php19.php?categoria="+document.getElementById('kml-categoria').value
GDownloadUrl(urls,function(data)
{var xml=GXml.parse(data);var iconBlue=new GIcon();var markers=xml.documentElement.getElementsByTagName("marker");for(var i=0;i<markers.length;i++)
{var name=markers[i].getAttribute("name");var address=markers[i].getAttribute("address");var type=markers[i].getAttribute("type");var point=new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")),parseFloat(document.getElementById("altura").value));iconBlue.image=markers[i].getAttribute("Icono_afuera");imagen=markers[i].getAttribute("Icono_afuera");Telefono=markers[i].getAttribute("Telefono");idBanner=markers[i].getAttribute("idBanner");Banner=markers[i].getAttribute("banner");categoria=markers[i].getAttribute("categoria");Web=markers[i].getAttribute("Web");iconBlue.iconSize=new GSize(32,32);iconBlue.iconAnchor=new GPoint(32,32);iconBlue.infoWindowAnchor=new GPoint(2,1);customIcons["carga"]=iconBlue;var marker=createMarker(point,name,address,type,imagen,Telefono,idBanner,Banner,categoria,Web);map.addOverlay(marker)}});var t=setTimeout("cargaRestantes()",5000);kmls=new Array(document.getElementById('kml-categoriaK').value);var col_array=document.getElementById('kml-categoriaK').value.split(",");var part_num=0;for(var i=0;i<col_array.length;i++)
{if(i!=0)
{}}
var coordenada=document.getElementById("marca").value;var coordenada1=coordenada.replace("(","");var coordenada=coordenada1.replace(")","");coordenada1=coordenada.replace(" ","");coordenada=coordenada1.split(",",2);point=new GLatLng(parseFloat(coordenada[1]),parseFloat(coordenada[0]),parseFloat(document.getElementById("altura").value));marker=new GMarker(point);map.addOverlay(marker);}
function cargaRestantes(){urls="http://www.minnus.com.ar/linksMaps/php20.php?categoria="+document.getElementById('kml-categoria').value
GDownloadUrl(urls,function(data)
{var xml=GXml.parse(data);var markers=xml.documentElement.getElementsByTagName("marker");for(var i=0;i<markers.length;i++)
{var iconBlue=new GIcon();var name=markers[i].getAttribute("name");var address=markers[i].getAttribute("address");var type=markers[i].getAttribute("type");var point=new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")),parseFloat(document.getElementById("altura").value));iconBlue.image=markers[i].getAttribute("Icono_afuera");imagen=markers[i].getAttribute("Icono_afuera");Telefono=markers[i].getAttribute("Telefono");idBanner=markers[i].getAttribute("idBanner");Banner=markers[i].getAttribute("banner");categoria=markers[i].getAttribute("categoria");Web=markers[i].getAttribute("Web");iconBlue.iconSize=new GSize(12,12);iconBlue.iconAnchor=new GPoint(12,12);iconBlue.infoWindowAnchor=new GPoint(2,1);customIcons["carga"]=iconBlue;var marker=createMarker(point,name,address,type,imagen,Telefono,idBanner,Banner,categoria,Web);map.addOverlay(marker)}})}
function createMarker(point,name,address,type,imagen,Telefono,idBanner,banners,categoria,Web)
{var marker=new GMarker(point,customIcons["carga"]);markerGroups[categoria].push(marker);if(Web=="null")
{Web="";}
var html='<table width="384" border="0" align="center" cellpadding="0" cellspacing="6" class="globo">  <tr>    <td colspan="2" class="Nombre">'+name+'</td>    <td width="183" rowspan="7" align="center"><table width="29%" border="0">      <tr>        <td align="right" class="style1"></td>      </tr>    </table>      <span class="logo"><img src="'+imagen+'" width="121" height="121"  /><br>  <br></span><a href="http://banners.minnus.com.ar/mapsLink.php?idBanner='+idBanner+'"><img src="'+banners+'" width="141" style="height:61px; width:161px" border="0" /></a></td>  </tr>  <tr>    <td colspan="2" align="left" class="style1">'+address+'</td>    </tr>  <tr>    <td width="40" class="titulos">Tel:</td>    <td width="137" align="left" class="info">'+Telefono+'</td>  </tr>  <tr>    <td class="titulos">Mail:</td>    <td class="info">&nbsp;</td>  </tr>  <tr>    <td class="titulos">Web:</td>    <td align="left" class="info">'+Web+'</td>  </tr>  <tr>    <td colspan="2" class="titulos">Descripci&oacute;n:</td>    </tr>  <tr>    <td colspan="2" valign="top" class="info"><p>'+type+'</p></td>  </tr>    <tr>    <td colspan="3" align="left" class="LinkVentanas"><a href="http://minnus.com.ar/'+name+'">http://minnus.com.ar/'+name+'</a></td>  </tr></table>';GEvent.addListener(marker,'click',function(){marker.openExtInfoWindow(map,"extInfoWindow_coolBlues",html,{beakOffset:18})});GEvent.addListener(marker,"mouseover",function(){currentMarker=marker;highlightCurrentMarker();});return marker;}
function createMarkerONE(point,name,address,type,imagen,Telefono,idBanner,banners,categoria,Web)
{var marker=new GMarker(point,customIcons["carga"]);markerGroups[categoria].push(marker);if(Web=="null")
{Web="";}
var html='<table width="384" border="0" align="center" cellpadding="0" cellspacing="6" class="globo">  <tr>    <td colspan="2" class="Nombre">'+name+'</td>    <td width="183" rowspan="7" align="center"><table width="29%" border="0">      <tr>        <td align="right" class="style1"></td>      </tr>    </table>      <span class="logo"><img src="'+imagen+'" width="121" height="121"  /><br>  <br></span><a href="http://banners.minnus.com.ar/mapsLink.php?idBanner='+idBanner+'"><img src="'+banners+'" width="141" style="height:61px; width:161px" border="0" /></a></td>  </tr>  <tr>    <td colspan="2" align="left" class="style1">'+address+'</td>    </tr>  <tr>    <td width="40" class="titulos">Tel:</td>    <td width="137" align="left" class="info">'+Telefono+'</td>  </tr>  <tr>    <td class="titulos">Mail:</td>    <td class="info">&nbsp;</td>  </tr>  <tr>    <td class="titulos">Web:</td>    <td align="left" class="info">'+Web+'</td>  </tr>  <tr>    <td colspan="2" class="titulos">Descripci&oacute;n:</td>    </tr>  <tr>    <td colspan="2" valign="top" class="info"><p>'+type+'</p></td>  </tr>    <tr>    <td colspan="3" align="left" class="LinkVentanas"><a href="http://minnus.com.ar/'+name+'">http://minnus.com.ar/'+name+'</a></td>  </tr></table>';GEvent.addListener(marker,'click',function(){marker.openExtInfoWindow(map,"extInfoWindow_coolBlues",html,{beakOffset:18})});GEvent.addListener(marker,"mouseover",function(){currentMarker=marker;highlightCurrentMarker();});return marker;}
function BorraNube()
{document.getElementById('kml-categoriaNube').value="";cargaDatos()}
function clicksNube(id)
{document.getElementById('kml-categoriaNube').value=id;cargaDatos()}
$(document).ready(function(){$().ajaxStart(function(){$('#loading').show();$('#result').hide();}).ajaxStop(function(){$('#loading').hide();$('#result').fadeIn('slow');});$('#form, #fat, #fo3').submit
(function()
{$.ajax({type:'POST',url:$(this).attr('action'),data:$(this).serialize(),success:function(data)
{$('#result').html(data);}})
return false;});})
$(document).ready(function(){$().ajaxStart(function(){$('#loading').show();$('#resultDireccion').hide();}).ajaxStop(function(){$('#loading').hide();$('#resultDireccion').fadeIn('slow');});$('#form, #fat, #fo4').submit
(function()
{$.ajax({type:'POST',url:$(this).attr('action'),data:$(this).serialize(),success:function(data)
{$('#resultDireccion').html(data);if(document.getElementById("interseccion").checked!=false)
{intersecciones()}
else
{if(isNaN(document.getElementById("provincia").value)==true)
{intersecciones()
document.getElementById("provincia").value=""}
armadoBusqueda();}}})
return false;});})
function irDireccionRecomendadaD(direccion)
{var objetoID='desde'+direccion
document.getElementById("barrio").value=document.getElementById(objetoID).value}
function irDireccionRecomendadaH(direccion)
{var objetoID='hasta'+direccion
document.getElementById("barrio2").value=document.getElementById(objetoID).value}
function initialize(){if(GBrowserIsCompatible()){var nom=navigator.appName;if(nom!="Microsoft Internet Explorer")
{if((screen.width<820))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-112
document.getElementById('map').style.height=porcentajeAltura+"px";}
if((screen.width<1050)&&(screen.width>821))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-110
document.getElementById('map').style.height=porcentajeAltura+"px";}
if((screen.width>1050))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-157
document.getElementById('map').style.height=porcentajeAltura+"px";}}
else
{if((screen.width<820))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-112
document.getElementById('map').style.height=porcentajeAltura;}
if((screen.width<1050)&&(screen.width>821))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-110
document.getElementById('map').style.height=porcentajeAltura;}
if((screen.width>1050))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-155
document.getElementById('map').style.height=porcentajeAltura;}}
geocoder=new GClientGeocoder();map=new GMap2(document.getElementById("map"));if(document.getElementById("coordenada").value!=""){var coordenada=document.getElementById("coordenada").value;var coordenada1=coordenada.replace("(","");var coordenada=coordenada1.replace(")","");coordenada1=coordenada.replace(" ","");coordenada=coordenada1.split(",",2);map.setCenter(new GLatLng(parseFloat(coordenada[0]),parseFloat(coordenada[1])),parseFloat(12));}
else
{map.setCenter(new GLatLng(-34.6043230749,-58.4118109526),12);}
document.getElementById("coordenada").value=map.getCenter();gdir=new GDirections(map,document.getElementById("directions"));GEvent.addListener(gdir,"addoverlay",onGDirectionsLoad);if(nom!="Microsoft Internet Explorer")
{var opts2={zoomInBtnTitle:"Aumentar",zoomOutBtnTitle:"Reducir",moveNorthBtnTitle:"Vista panor଩ca hacia arriba",moveSouthBtnTitle:"Vista panor଩ca hacia abajo",moveEastBtnTitle:"Vista panor଩ca a la derecha",moveWestBtnTitle:"Vista panor଩ca a la izquierda",homeBtnTitle:"Volver al �o resultado"};if((screen.width<820))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GSmallMapControl());}
if((screen.width<1050)&&(screen.width>821))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=true;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);}
if((screen.width>1050))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=true;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);}}
else
{map.addControl(new ContextMenuControl());if((screen.width<820))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GSmallMapControl());}
if((screen.width<1050)&&(screen.width>821))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GLargeMapControl());}
if((screen.width>1050))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GLargeMapControl());}}
gdir=new GDirections(map,document.getElementById("direcciones"));GEvent.addListener(gdir,"load",onGDirectionsLoad);GEvent.addListener(gdir,"error",handleErrors);GEvent.addListener(map,"moveend",function()
{var center=map.getCenter();document.getElementById("altura").value=map.getZoom();document.getElementById("coordenada").value=center.toString();})}
var Url=location.href;Url=Url.replace(/.*\?(.*?)/,"$1");Variables=Url.split("&");if(Variables!="http://www.minnus.com.ar/simple.php"){if(Variables!="http://www.minnus.com.ar/"){if(Variables!="http://minnus.com.ar/"){for(i=0;i<Variables.length;i++){Separ=Variables[i].split("=");eval('var '+Separ[0]+'="'+Separ[1]+'"');}
categoria=0
categorias=0
if(id!="")
{document.getElementById("kml-Directo").value=id;urls="http://www.minnus.com.ar/linksMaps/phpUNO.php?categoria="+document.getElementById("kml-Directo").value
GDownloadUrl(urls,function(data)
{var xml=GXml.parse(data);var markers=xml.documentElement.getElementsByTagName("marker");var i
var categorias=0
var AntCategoria=0
var posicionLat
var posicionLong
for(i=0;i<markers.length;i++){var name=markers[i].getAttribute("name");var address=markers[i].getAttribute("address");var type=markers[i].getAttribute("type");var point=new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")),parseFloat(document.getElementById("altura").value));posicionLat=parseFloat(markers[i].getAttribute("lat"))
posicionLong=parseFloat(markers[i].getAttribute("lng"))
iconBlue.image=markers[i].getAttribute("Icono_afuera");imagen=markers[i].getAttribute("Icono_afuera");Telefono=markers[i].getAttribute("Telefono");idBanner=markers[i].getAttribute("idBanner");Banner=markers[i].getAttribute("banner");categoria=markers[i].getAttribute("categoria")
Web=markers[i].getAttribute("Web")
iconBlue.iconSize=new GSize(32,32);iconBlue.iconAnchor=new GPoint(32,32);iconBlue.infoWindowAnchor=new GPoint(2,1);customIcons["carga"]=iconBlue;if(AntCategoria!=markers[i].getAttribute("categoria"))
{categorias=categorias+","+markers[i].getAttribute("categoria")}
document.getElementById("kml-Sel").value=document.getElementById("kml-Sel").value+1
var marker=createMarker(point,name,address,type,imagen,Telefono,idBanner,Banner,categoria,Web);map.addOverlay(marker);AntCategoria=markers[i].getAttribute("categoria")}
if(markers.length==1)
{map.setCenter(new GLatLng(posicionLat,posicionLong),16);}
else
{map.setCenter(new GLatLng(-34.6043230749,-58.4118109526),12);}
document.getElementById("fCategoria").value=categorias
document.getElementById("fLugar").value=id});}}}}}
$().ready(function(){function formatItem(row){return row[0]+" (<strong>id: "+row[1]+"</strong>)";}
function formatResult(row){return row[0].replace(/(<.+?>)/gi,'');}
$("#barrio").focus().autocomplete(cities);$("#barrio2").focus().autocomplete(cities);$("#InterseccionC").focus().autocomplete(cities);$("#scrollChange").click(changeScrollHeight);$("#clear").click(function(){$(":input").unautocomplete();});});function changeOptions(){var max=parseInt(window.prompt('Please type number of items to display:',jQuery.Autocompleter.defaults.max));if(max>0){$("#barrio").setOptions({max:max});}
if(max>0){$("#InterseccionC").setOptions({max:max});}}
function changeScrollHeight(){var h=parseInt(window.prompt('Please type new scroll height (number in pixels):',jQuery.Autocompleter.defaults.scrollHeight));if(h>0){$("#barrio").setOptions({scrollHeight:h});$("#barrio2").setOptions({scrollHeight:h});$("#InterseccionC").setOptions({scrollHeight:h});}}
function guardaCookie()
{document.cookie="miGalleta="+document.getElementById("coordenada").value}
function irPosicionInicial(){map.setCenter(new GLatLng(-34.6043230749,-58.4118109526),12);cerrarDiv()}
function cerrarDiv(){$("#AnuncioAnterior").fadeOut('slow');}
function cambioInterseccion()
{if(document.getElementById("interseccion").checked)
{document.getElementById("InterseccionC").style.display=""
document.getElementById("provincia").style.display="none"
visualizarMensaje("buscarIntersecciones")}
else
{
document.getElementById("InterseccionC").style.display="none"
document.getElementById("provincia").style.display=""
ocultarMensaje("buscarIntersecciones")}}
var valorDivs
function visualizarMensaje(divVisible)
{document.getElementById(divVisible).style.display=""
switch(divVisible)
{case"buscarIntersecciones":var t=setTimeout("ocultaMensaje('buscarIntersecciones')",1999);break
case"buscarComercios":var t=setTimeout("ocultaMensaje('buscarComercios')",4999);case"sumarCantidadComercios":var t=setTimeout("ocultaMensaje('sumarCantidadComercios')",4999);break
case"avisarChecks":var t=setTimeout("ocultaMensaje('avisarChecks')",4999);break}}
function eliminaAnuncio(){var t=setTimeout("cerrarDiv()",5999);}
function ocultaMensaje(valorDiv)
{divOculto="#"+valorDiv
$(divOculto).fadeOut('slow');}
function ocultarMensaje(valorDiv)
{document.getElementById(valorDiv).style.display="none"}
function loadMap(){if(GBrowserIsCompatible()){var nom=navigator.appName;if(nom!="Microsoft Internet Explorer")
{if((screen.width<820))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-112
document.getElementById('map').style.height=porcentajeAltura+"px";}
if((screen.width<1050)&&(screen.width>821))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-110
document.getElementById('map').style.height=porcentajeAltura+"px";}
if((screen.width>1050))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-157
document.getElementById('map').style.height=porcentajeAltura+"px";}}
else
{if((screen.width<820))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-112
document.getElementById('map').style.height=porcentajeAltura;}
if((screen.width<1050)&&(screen.width>821))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-110
document.getElementById('map').style.height=porcentajeAltura;}
if((screen.width>1050))
{porcentajeAltura=document.getElementById('rightpanel').offsetHeight-155
document.getElementById('map').style.height=porcentajeAltura;}}
geocoder=new GClientGeocoder();map=new GMap2(document.getElementById("map"));if(document.getElementById("coordenada").value!=""){var coordenada=document.getElementById("coordenada").value;var coordenada1=coordenada.replace("(","");var coordenada=coordenada1.replace(")","");coordenada1=coordenada.replace(" ","");coordenada=coordenada1.split(",",2);map.setCenter(new GLatLng(parseFloat(coordenada[0]),parseFloat(coordenada[1])),parseFloat(12));}
else
{map.setCenter(new GLatLng(-34.6043230749,-58.4118109526),12);}
document.getElementById("coordenada").value=map.getCenter();gdir=new GDirections(map,document.getElementById("directions"));GEvent.addListener(gdir,"addoverlay",onGDirectionsLoad);if(nom!="Microsoft Internet Explorer")
{var opts2={zoomInBtnTitle:"Aumentar",zoomOutBtnTitle:"Reducir",moveNorthBtnTitle:"Vista panor଩ca hacia arriba",moveSouthBtnTitle:"Vista panor଩ca hacia abajo",moveEastBtnTitle:"Vista panor଩ca a la derecha",moveWestBtnTitle:"Vista panor଩ca a la izquierda",homeBtnTitle:"Volver al �o resultado"};if((screen.width<820))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GSmallMapControl());}
if((screen.width<1050)&&(screen.width>821))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=true;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);}
if((screen.width>1050))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=true;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);}}
else
{map.addControl(new ContextMenuControl());if((screen.width<820))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GSmallMapControl());}
if((screen.width<1050)&&(screen.width>821))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GLargeMapControl());}
if((screen.width>1050))
{var customUI=map.getDefaultUI();customUI.controls.largemapcontrol3d=false;customUI.maptypes.satellite=false;customUI.maptypes.hybrid=false;customUI.maptypes.physical=false;customUI.controls.scalecontrol=false;map.setUI(customUI);map.addControl(new GLargeMapControl());}}
gdir=new GDirections(map,document.getElementById("direcciones"));GEvent.addListener(gdir,"load",onGDirectionsLoad);GEvent.addListener(gdir,"error",handleErrors);GEvent.addListener(map,"moveend",function()
{var center=map.getCenter();document.getElementById("altura").value=map.getZoom();document.getElementById("coordenada").value=center.toString();})}

map.addControl(new ContextMenuControl()); var Url=location.href;Url=Url.replace(/.*\?(.*?)/,"$1");Variables=Url.split("&");if(Variables!="http://www.minnus.com.ar/index.php"){if(Variables!="http://www.minnus.com.ar/"){if(Variables!="http://minnus.com.ar/"){for(i=0;i<Variables.length;i++){Separ=Variables[i].split("=");eval('var '+Separ[0]+'="'+Separ[1]+'"');}

categoria=0
categorias=0
if (idAnda!="")
{
	document.getElementById("kml-Directo").value=idAnda;urls="http://www.minnus.com.ar/linksMaps/phpPartner.php?id="+document.getElementById("kml-Directo").value
	GDownloadUrl(urls,function(data)
	{var xml=GXml.parse(data);var markers=xml.documentElement.getElementsByTagName("marker");var i
	var categorias=0
	var AntCategoria=0
	var posicionLat
	var posicionLong
	for(i=0;i<markers.length;i++){var name=markers[i].getAttribute("name");var address=markers[i].getAttribute("address");var type=markers[i].getAttribute("type");var point=new GLatLng(parseFloat(markers[i].getAttribute("lng")),parseFloat(markers[i].getAttribute("lat")),parseFloat(document.getElementById("altura").value));posicionLat=parseFloat(markers[i].getAttribute("lat"))
	posicionLong=parseFloat(markers[i].getAttribute("lng"))
	iconBlue.image=markers[i].getAttribute("Icono_afuera");imagen=markers[i].getAttribute("Icono_afuera");Telefono=markers[i].getAttribute("Telefono");idBanner=markers[i].getAttribute("idBanner");Banner=markers[i].getAttribute("banner");categoria=markers[i].getAttribute("categoria")
	Web=markers[i].getAttribute("Web")
	iconBlue.iconSize=new GSize(32,32);iconBlue.iconAnchor=new GPoint(32,32);iconBlue.infoWindowAnchor=new GPoint(2,1);customIcons["carga"]=iconBlue;if(AntCategoria!=markers[i].getAttribute("categoria"))
	{categorias=categorias+","+markers[i].getAttribute("categoria")}
	document.getElementById("kml-Sel").value=document.getElementById("kml-Sel").value+1
	var marker=createMarker(point,name,address,type,imagen,Telefono,idBanner,Banner,categoria,Web);map.addOverlay(marker);AntCategoria=markers[i].getAttribute("categoria")}
	if(markers.length==1)
	{map.setCenter(new GLatLng(posicionLong,posicionLat),16);}
	else
	{map.setCenter(new GLatLng(-34.6043230749,-58.4118109526),12);}
	document.getElementById("fCategoria").value=categorias
	document.getElementById("fLugar").value=idAnda});
	}
if (id!="")
{document.getElementById("kml-Directo").value=id;urls="http://www.minnus.com.ar/linksMaps/phpUNO.php?categoria="+document.getElementById("kml-Directo").value
GDownloadUrl(urls,function(data)
{var xml=GXml.parse(data);var markers=xml.documentElement.getElementsByTagName("marker");var i
var categorias=0
var AntCategoria=0
var posicionLat
var posicionLong
for(i=0;i<markers.length;i++){var name=markers[i].getAttribute("name");var address=markers[i].getAttribute("address");var type=markers[i].getAttribute("type");var point=new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")),parseFloat(document.getElementById("altura").value));posicionLat=parseFloat(markers[i].getAttribute("lat"))
posicionLong=parseFloat(markers[i].getAttribute("lng"))
iconBlue.image=markers[i].getAttribute("Icono_afuera");imagen=markers[i].getAttribute("Icono_afuera");Telefono=markers[i].getAttribute("Telefono");idBanner=markers[i].getAttribute("idBanner");Banner=markers[i].getAttribute("banner");categoria=markers[i].getAttribute("categoria")
Web=markers[i].getAttribute("Web")
iconBlue.iconSize=new GSize(32,32);iconBlue.iconAnchor=new GPoint(32,32);iconBlue.infoWindowAnchor=new GPoint(2,1);customIcons["carga"]=iconBlue;if(AntCategoria!=markers[i].getAttribute("categoria"))
{categorias=categorias+","+markers[i].getAttribute("categoria")}
document.getElementById("kml-Sel").value=document.getElementById("kml-Sel").value+1
var marker=createMarker(point,name,address,type,imagen,Telefono,idBanner,Banner,categoria,Web);map.addOverlay(marker);AntCategoria=markers[i].getAttribute("categoria")}
if(markers.length==1)
{map.setCenter(new GLatLng(posicionLat,posicionLong),16);}
else
{map.setCenter(new GLatLng(-34.6043230749,-58.4118109526),12);}
document.getElementById("fCategoria").value=categorias
document.getElementById("fLugar").value=id});}}}}}

function irPosicionDescuentos(lat,long,ID)
{urls="http://www.minnus.com.ar/linksMaps/php1.php?categoria="+ID
GDownloadUrl(urls,function(data)
{var xml=GXml.parse(data);var markers=xml.documentElement.getElementsByTagName("marker");for(var i=0;i<markers.length;i++)
{var iconBlue=new GIcon();var name=markers[i].getAttribute("name");var address=markers[i].getAttribute("address");var type=markers[i].getAttribute("type");var point=new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")),parseFloat(document.getElementById("altura").value));iconBlue.image=markers[i].getAttribute("Icono_afuera");imagen=markers[i].getAttribute("Icono_afuera");Telefono=markers[i].getAttribute("Telefono");idBanner=markers[i].getAttribute("idBanner");Banner=markers[i].getAttribute("banner");categoria=markers[i].getAttribute("categoria");Web=markers[i].getAttribute("Web");iconBlue.iconSize=new GSize(32,32);iconBlue.iconAnchor=new GPoint(32,32);iconBlue.infoWindowAnchor=new GPoint(2,1);customIcons["carga"]=iconBlue;var marker=createMarkerONE(point,name,address,type,imagen,Telefono,idBanner,Banner,categoria,Web);var lati=parseFloat(markers[i].getAttribute("lat"))
var longi=parseFloat(markers[i].getAttribute("lng"))
itemSeleccionado(lati,longi,0.025,"#333333",0.7,0.1,"#666666",.5);map.addOverlay(marker)}});map.panTo(new GLatLng(lat,long));map.setCenter(new GLatLng(lat,long),16);}