
function muestra_condiciones() {
	$("#cajonCondiciones").show();
	$("#capaTransparente").show();
	//alert("sss")
	$('html, body').animate({scrollTop: '10px'}, 300);
};

function oculta_condiciones() {
	$("#cajonCondiciones").hide();
	$("#capaTransparente").hide();
};
	
function VolverFormulario(){
	$("#form_newsletter").show();
	$("#newsletter_mensaje").hide();
	return false;
};
	
function Ocultar(div){
	
	$(div).fadeOut(500, function(){
		$(div).empty();
	});
	return false;
}

function Muestra(div){
	
	$(div).fadeIn(500);
	return false;
}

function CalculaAltura(origen, destino){
	var alto = $(origen).height();
	if (alto < 390) { 
		$(destino).height(477); 
	} else if (alto >= 390 && alto < 510) { 
		$(destino).height(603); 
	} else if (alto >= 510) { 
		$(destino).height(alto+150); 
	} 
};

function CalculaAlturaNoticias(origen, destino){
	var alto = $(origen).height();
	if (alto < 175) { 
		$(destino).height(173); 
	} else if (alto >= 175 && alto < 299) { 
		$(destino).height(299); 
	} else if (alto >= 299 && alto < 420) { 
		$(destino).height(425); 
	} else if (alto >= 420) { 
		$(destino).height(alto); 
	}  
};


