//Tamaño de fuentes
function aumentar(){
  var fuente = getStyle(document.body, "fontSize");
  if(fuente.indexOf("px")>-1){
    numeroFuente = parseFloat(fuente) / 20.0 + 0.05;
  }
  else {
	  numeroFuente = parseFloat(fuente) + 0.05;
	}
	if (numeroFuente > 2){
	  numeroFuente= 2
	}
	aumento_fuente = numeroFuente+"em";
	document.body.style.fontSize = aumento_fuente;
}

function reducir(){
	var fuente = getStyle(document.body, "fontSize");
  if(fuente.indexOf("px")>-1){
    numeroFuente = parseFloat(fuente) / 20.0 - 0.05;
  }
  else {	
	  numeroFuente = parseFloat(fuente) - 0.05;
	}
	if (numeroFuente < 0.4){
  	numeroFuente = 0.4
	}
	aumento_fuente = numeroFuente+"em";
	document.body.style.fontSize = aumento_fuente;
}

function resetear(){
  document.body.style.fontSize = "0.5em";
}

//Sombra de imágenes
function dimensionaSombras() {
	 $('.sombrear').each(function(index) {
	 $(this).wrap('<div class="sombra"><div class="dcho"></div></div>').before('<div class="sup"><div class="izq"></div><div class="dcho"></div></div>').after('<div class="inf"><div class="izq"></div><div class="dcho"></div></div>').wrap('<div class="inner"></div>');
	 var anchoImagen = ($(this).width()) + 18;
	 $(this).parent().parent().parent('.sombra').width(anchoImagen);
});
}

//carga
window.onload = function() {
	dimensionaSombras();
};


function getStyle(el,styleProp)
{
	var x = el;
	if (x.currentStyle)
		var y = x.currentStyle[styleProp];
	else if (window.getComputedStyle)
		var y = document.defaultView.getComputedStyle(x,null).getPropertyValue("font-size");
	return y;
}

function showPopUp(page) {
	var izquierda = (screen.availWidth - 500) / 2;
	var arriba = (screen.availHeight - 180) / 2;
	open(page,'aviso','top='+arriba+',left='+izquierda +',width=330,height=210,scrollbars=0,toolbars=0,menubar=0,statusbar=0');
}