<!--
//
initializeGM = function (obj, lat, lon, zo) 
{
	if (obj==0 || obj==undefined)	obj = "mapa";
	if (lat==undefined)				lat = 37.4419;
	if (lon==undefined)				lon = -122.1419;
	if (zo==undefined) 				zo = 15;
	zo = 15;
	//
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById(obj));
		map.addControl(new GSmallMapControl()); 
		map.setCenter(new GLatLng(lat, lon), zo);
		map.setMapType(G_HYBRID_MAP);
		
		
		var icon0 = new GIcon();
		icon0.image = "http://www.google.com/mapfiles/marker.png";
		icon0.shadow = "http://www.google.com/mapfiles/shadow50.png";
		icon0.iconSize = new GSize(20, 34);
		icon0.shadowSize = new GSize(37, 34);
		icon0.iconAnchor = new GPoint(9, 34);
		icon0.infoWindowAnchor = new GPoint(9, 2);
		icon0.infoShadowAnchor = new GPoint(18, 25);
		
		var point = new GPoint(lon,lat);
		var marker = new GMarker(point, icon0);
		//GEvent.addListener(marker, "click", function() {
		//marker.openInfoWindowHtml(popuphtml);
		//});
		map.addOverlay(marker);
	}
}
//
$(document).ready(function(){
	$("#goMapa").click(function(){
		var o, h, b, w;
		if ($("#mapa").height()<5){
			h = 550;
			o = 1;
			b = 0;
			w = 1000;
		} else {
			h = 0;
			o = 0.2;
			b = 0;
			w = 1000;
		}
		//
		$("#mapa").animate({ 
			height: h+"px",
			opacity: o,
			borderWidth: b+"px",
			width:"1000px",
			left:205
		}, 800);
		//
		if (h==550) {
			$("#mapa").animate({
				width:'99%',
				left:"5px"
			},500);
		}
		//
		if (h==0) $("#mapa").html("");
		else setTimeout(initializeGM,'2000');
	});
	
});

verUbicacionProductoHome = function (idpanel,objsName,la,lo,zo)
{
	var arrName = objsName.split(";");
	var objPestana = document.getElementById(arrName[2]+"_"+idpanel);
	var objImg = document.getElementById(arrName[1]+"_"+idpanel);
	var objMiniMapa = document.getElementById(arrName[0]+"_"+idpanel);
	//	 
	if (objPestana.innerHTML != "Ver Foto") {
		objPestana.innerHTML 		= "Ver Foto";
		objImg.style.display 		= "none";
		objMiniMapa.style.display 	= "block";
		initializeGM(arrName[0]+"_"+idpanel, la, lo, zo);
	} else {
		objPestana.innerHTML 		= "Ubicaci&oacute;n en mapa";
		objMiniMapa.style.display 	= "none";
		objImg.style.display 		= "block";
	}
}

detectarNavegador = function ()
{
	var nVer = navigator.appVersion;
	var nAgt = navigator.userAgent;
	var browserName  = navigator.appName;
	var fullVersion  = ''+parseFloat(navigator.appVersion); 
	var majorVersion = parseInt(navigator.appVersion,10);
	var nameOffset,verOffset,ix;
	
	// In MSIE, the true version is after "MSIE" in userAgent
	if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
	 browserName = "msie";
	 fullVersion = nAgt.substring(verOffset+5);
	}
	// In Opera, the true version is after "Opera" 
	else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
	 browserName = "Opera";
	 fullVersion = nAgt.substring(verOffset+6);
	}
	// In Chrome, the true version is after "Chrome" 
	else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
	 browserName = "Chrome";
	 fullVersion = nAgt.substring(verOffset+7);
	}
	// In Safari, the true version is after "Safari" 
	else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
	 browserName = "Safari";
	 fullVersion = nAgt.substring(verOffset+7);
	}
	// In Firefox, the true version is after "Firefox" 
	else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
	 browserName = "Firefox";
	 fullVersion = nAgt.substring(verOffset+8);
	}
	// In most other browsers, "name/version" is at the end of userAgent 
	else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/')) ) 
	{
	 browserName = nAgt.substring(nameOffset,verOffset);
	 fullVersion = nAgt.substring(verOffset+1);
	 if (browserName.toLowerCase()==browserName.toUpperCase()) {
	  browserName = navigator.appName;
	 }
	}
	// trim the fullVersion string at semicolon/space if present
	if ((ix=fullVersion.indexOf(";"))!=-1) fullVersion=fullVersion.substring(0,ix);
	if ((ix=fullVersion.indexOf(" "))!=-1) fullVersion=fullVersion.substring(0,ix);
	
	majorVersion = parseInt(''+fullVersion,10);
	if (isNaN(majorVersion)) {
	 fullVersion  = ''+parseFloat(navigator.appVersion); 
	 majorVersion = parseInt(navigator.appVersion,10);
	}
	return Array(browserName,fullVersion);
}

heightDescriptionFicha = function ()
{
	var navegador = detectarNavegador();
	var hv = 0;
	switch (navegador[0]){
		case 'Chrome':
			hv=110;
			break;
		case 'Firefox':
			hv=60;
			break;
		case 'Safari':
			hv=110;
			break;
		case 'Opera':
			hv=55;
			break;
		default:
			hv=60;
			break;
	}
	var h = parseInt(document.getElementById('col-2').offsetHeight) - parseInt(document.getElementById('logoEmpresa').offsetHeight) - hv;
	//alert(parseInt(document.getElementById('btnScroll').offsetHeight));
	h = h-parseInt(document.getElementById('btn_scroll').offsetHeight);
	document.getElementById('descripcionEmpr').style.height = h+"px";
}
//
idstmm = new Array();
menuEmergenteListEmprend = function (objTxt)
{
	if (idstmm[objTxt]!="") {
		//alert(idstmm);
		clearInterval(idstmm[objTxt]);
	}
	document.getElementById(objTxt).style.visibility = "visible";	
}
hiddenMenuEmergenteListEmprend = function (objTxt)
{
	document.getElementById(objTxt).style.visibility = "hidden";
	//idstmm = setTimeout("mnuEmergente('"+objTxt+"')",500);	
}
mnuEmergente = function(objTxt)
{
	document.getElementById(objTxt).style.visibility = "hidden";	
}
//ABQIAAAAnwTIj_kEdCid0awi_cgq0xQNRissleeYMeL6mA7X5bl1fzWnQxSO48WlDzPudUJbs-GS7-siG58ylw
-->

