<!--
function GalVer(modo, galeria, foto, des) {
	var w=0, h=0;
	
	foto.src=galeria.mapeo + "pixel_transparente.gif";
	
	if (!modo) {
		galeria.x = (galeria.x == galeria.src.length-1 ? 0 : ++galeria.x);
		ImagenAMostrar=galeria.sgte;
	}
	else {
		galeria.x = (!galeria.x ? galeria.src.length-1 : --galeria.x);
		ImagenAMostrar=galeria.ante;
	}
	
  foto.src=galeria.proyecto + "/pimg/GaleriaImagenes/" + galeria.src[galeria.x];
  galeria.actual=foto.src;
  
  if (ImagenAMostrar.width == 0 && ImagenAMostrar.height == 0) {
  	w=galeria.width;
  	h=galeria.height;
  }
  else if (ImagenAMostrar.width > galeria.width) {
		w=galeria.width;
		h=(ImagenAMostrar.height / ImagenAMostrar.width) * galeria.width;

		if (h > galeria.height) {
			w=(w / h) * galeria.height;
			h=galeria.height;
		}
  }
  else if (ImagenAMostrar.height > galeria.height) {
		h=galeria.height;
		w=(ImagenAMostrar.width / ImagenAMostrar.height) * galeria.height;
  }
  else {
		w=ImagenAMostrar.width;
		h=ImagenAMostrar.height;
	}
	
	foto.width=w;
	foto.height=h;
	
	if (des != "undefined") document.getElementById(des).innerHTML = galeria.des[galeria.x];
  
  galeria.sgte.src= galeria.proyecto + "/pimg/GaleriaImagenes/" + galeria.src[(galeria.x == galeria.src.length-1 ? 0 : galeria.x + 1)];
	galeria.ante.src= galeria.proyecto + "/pimg/GaleriaImagenes/" + galeria.src[(!galeria.x ? galeria.src.length-1 : galeria.x - 1)];
}

function AbrirPopUpAjustar(dir) {
  var options="titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=50,height=50,top=100,left=200";
  var tips=window.open("","PopUpAjustar",options);
  tips.focus();
  tips.document.write("<script>var TN=(document.layers?1:(document.all?2:3));");
  tips.document.write("function WS() {");
  tips.document.write(" height=document.images[0].height+45;");
  tips.document.write(" width=document.images[0].width+40;");
  tips.document.write(" MaxHeight= screen.availHeight - 30;");
  tips.document.write(" height= height > MaxHeight ? MaxHeight : height;");
  tips.document.write(" MLeft= (screen.availWidth - width) / 2;");
  tips.document.write(" MTop=  (MaxHeight - height) / 2;");
  tips.document.write(" self.moveTo(MLeft,MTop);");
  tips.document.write(" if (TN==1) {");
  tips.document.write("  window.innerWidth=width;");
  tips.document.write("  window.innerHeight=height;");
  tips.document.write(" }");
  tips.document.write(" else");
  tips.document.write("  window.resizeTo(width,height);");
  tips.document.write("}");
  tips.document.write("</"+"script>");
  tips.document.write("<body topmargin=0 marginheight=0 onLoad='WS()'><center><img src='" + dir + "'></center></body>");
  tips.document.close();
}
-->