//<![CDATA[
// 1
GMap2.prototype.hoverControls = function(opt_noCloseIw){
	var theMap = this;
	theMap.hideControls();
	GEvent.addListener(theMap, "mouseover", function(){
		theMap.showControls();
	});
	GEvent.addListener(theMap, "mouseout", function(){
		theMap.hideControls();
	});
	theMap.libraryCard = 19162;
}
GMap.prototype.hoverControls = GMap2.prototype.hoverControls;

// 2
function createMarker(point,tipo_est,nom_esta,descripcion_iw,icono_url,ic,VOI) { 
	var baseIcon = new GIcon();
	baseIcon.iconSize = new GSize(24,24);
	baseIcon.shadowSize = new GSize(24,24);
	baseIcon.iconAnchor = new GPoint(12,12);
	baseIcon.infoWindowAnchor = new GPoint(24,0);
	var icono = new GIcon(baseIcon, icono_url);
	var marker = new GMarker(point, {icon: icono, draggable:false });
	GEvent.addListener(marker, "click", function() {
		html_info_window = creaInfoWindow(nom_esta, descripcion_iw, point,VOI); 
		movimientoxClick = true;
		marker.openInfoWindowHtml(html_info_window);
		});
	// save the info we need to use later for the side_bar
	objGmarkers[VOI][i] = marker;
	html_info_window = creaInfoWindow(nom_esta, descripcion_iw, point,VOI);
	objHtmls[VOI][i]= html_info_window;			
	// add a line to the side_bar html
	if (side_bar_html[ic] == undefined){
		side_bar_html[ic] = '<li><span class="nombre_item" onclick="javascript:muestraInfo(' + i + ',\'' + VOI + '\')">' + nom_esta + '</span></li>';
		//side_bar_html[ic] = '-&nbsp;<span class="nombre_item" onclick="javascript:muestraInfo(' + i + ')">' + nom_esta + i + '</span><br>';
	} else {
		side_bar_html[ic] += '<li><span class="nombre_item" onclick="javascript:muestraInfo(' + i + ',\'' + VOI + '\')">' + nom_esta + '</span></li>';
	}
	i++;
	return marker;
}
/*
function poneIcono(icono_url,opcion){
	var baseIcon = new GIcon();
	switch(opcion){
		case "S":
			
			baseIcon.iconSize = new GSize(16,16);
			baseIcon.shadowSize = new GSize(16,16);
			baseIcon.iconAnchor = new GPoint(8,16);
			baseIcon.infoWindowAnchor = new GPoint(16,0);
			break;
		case "M":

			baseIcon.iconSize = new GSize(24,24);//GSize(32,32);
			baseIcon.shadowSize = new GSize(24,24);//GSize(32,32);
			baseIcon.iconAnchor = new GPoint(12,24);//GPoint(16,32);
			baseIcon.infoWindowAnchor = new GPoint(12,0);//GPoint(16,0);
			break;
		case "L":

			baseIcon.iconSize = new GSize(32,32);
			baseIcon.shadowSize = new GSize(32,32);
			baseIcon.iconAnchor = new GPoint(16,32);
			baseIcon.infoWindowAnchor = new GPoint(16,0);
			break;
		default:

			baseIcon.iconSize = new GSize(32,32);
			baseIcon.shadowSize = new GSize(32,32);
			baseIcon.iconAnchor = new GPoint(16,32);
			baseIcon.infoWindowAnchor = new GPoint(16,0);
	}

	var icono_adhoc = new GIcon(baseIcon, icono_url);
	return icono_adhoc;
}

// 3
	function separaParametros(get){
//			alert(get);
		var arrSeparados = new Array;
		var arrJuntos = get.split("&");
//			alert("chk 2");
		for (i=0; i < arrJuntos.length;i++)
		{	
			arrSeparados[i] = new Array(1);
//				alert("chk 2."+i+ "    " + arrJuntos[i]);
			var arrPreSeparados = arrJuntos[i].split("=");
//				alert("chk 2."+i+"arrPreSeparados"+ "    " + arrPreSeparados[0] + " " + arrPreSeparados[1]);
			arrSeparados[i][0] = arrPreSeparados[0];
			arrSeparados[i][1] = arrPreSeparados[1];
//				alert("chk 2."+i+"arrSeparados"+ "    " + arrSeparados[i][0] + " " + arrSeparados[i][1]);
		}
//			alert("chk 3");
		return arrSeparados;
	}

// 4 
	function ponePtoInico(id){
		var latitud = null;
		var longitud = null;
		switch(id)
		{
			case 1:
				latitud=-33.42898;
				longitud=-70.6192389999;
				break;
			case 4:
				latitud=-33.422640;
				longitud=-70.613085;
				break;
			case 5:
				latitud=-33.462532;
				longitud=-70.660813;
				break;
			case 6:
				latitud=-33.440756;
				longitud=-70.647606;
				break;
			case 7:
				latitud=-33.384345;
				longitud=-70.622717;
				break;
			case 8:
				latitud=-33.456592;
				longitud=-70.649623;
				break;
			case 9:
				latitud=-33.462608;
				longitud=-70.664632;
				break;
			default:
				latitud=-33.428995;
				longitud=-70.609275;
		}
		punto = new GLatLng(latitud,longitud);
		return punto;
	}

// 5
	function poneNivelZoom(id){
		var nivel = null;
		switch(id)
		{
			case 1:
				nivel=18;
				break;
			case 4:
				nivel=18;
				break;
			case 5:
				nivel=15;
				break;
			case 6:
				nivel=18;
				break;
			case 7:
				nivel=16;
				break;
			case 8:
				nivel=18;
				break;
			case 9:
				nivel=16;
				break;
			default:
				nivel=13;
		}
		return nivel;
	}
	*/
// 6

//]]>
