	//
	fCookie = function(){ this.init(); }
	var p = fCookie.prototype;
	
	p.path = DIR_ROOT;
	
	p.init = function(){ }
	
	p.set = function(n, v){
		var d = new Date();
		d.setHours(d.getHours() + 24);
		//d.setSeconds(d.getSeconds() + 3);
		var t = d.toGMTString();
		document.cookie = n + '=' + escape(v) + '; expires=' + t + '; path=' + DIR_ROOT + ';';

	}
	
	p.unset = function(n){
		document.cookie = n + '=; expires=Fri, 21 Dec 1976 04:31:24 GMT; path=' + DIR_ROOT + ';';
	}
	
	p.get = function(n){
		var iIni = 0, iEnd = 0, ret = '';
		if (document.cookie.length > 0){
			var iIni = document.cookie.indexOf(n + '=');
			if (iIni != -1){ 
				iIni = iIni + n.length + 1; 
				iEnd = document.cookie.indexOf(";", iIni);
				if(iEnd == -1) iEnd = document.cookie.length;
				ret = unescape(document.cookie.substring(iIni, iEnd));
			}
		}
		return ret;
	}
	
	var Cookie = new fCookie();
	
	//	
	var I_FRAME;
	function descargarPdf(numeroTapa,e){
		if(!I_FRAME)I_FRAME = $('adjuntoIframe');
		if(Nav.esIE6)document.location = DIR_ROOT+'requests/descargarPdf.php?numeroTapa='+numeroTapa;
		else I_FRAME.src = DIR_ROOT+'requests/descargarPdf.php?numeroTapa='+numeroTapa;
		if(e) StopEvent(e);
	}
	//DEFINICION DE NUEVAS FUNCIONES PARA EL ZOOM IMAGE PARA QUE LEA LAS TAPAS
	function zoomImageNext(){
		if(eZoomHasFord){
			eZoomFromBtnGalery = true;			
			if(Nav.esIE){
				FireEvent(eZoomImage.parentNode.parentNode.nextSibling.childNodes[1].firstChild, 'click');
			}
			else{
				FireEvent(eZoomImage.parentNode.parentNode.nextSibling.nextSibling.childNodes[3].firstChild, 'click');
			}
		}	
	}
	function zoomImagePrev(){
		if(eZoomHasBack){
			eZoomFromBtnGalery = true;
			if(Nav.esIE){
				FireEvent(eZoomImage.parentNode.parentNode.previousSibling.childNodes[1].firstChild, 'click');
			}
			else{
				FireEvent(eZoomImage.parentNode.parentNode.previousSibling.previousSibling.childNodes[3].firstChild, 'click');
			}	
		}
	}
	

	eZoomTransGalery = function(){
		if(Nav.esIE){
			if(eZoomFromGalery && !!eZoomImage.parentNode.parentNode && !!eZoomImage.parentNode.parentNode.nextSibling){
				eZoomHasFord = true;
				eZoomImgFord.style.top = (((iZoomImgH - eZoomImgFord.offsetHeight) / 2) + iZoomImgY) + 'px';
				eZoomImgFord.style.visibility = 'visible';
			}
			else{ eZoomHasFord = false; }
			if(eZoomFromGalery && !!eZoomImage.parentNode.parentNode && !!eZoomImage.parentNode.parentNode.previousSibling){
				eZoomHasBack = true;
				eZoomImgBack.style.top = (((iZoomImgH - eZoomImgBack.offsetHeight) / 2) + iZoomImgY) + 'px';
				eZoomImgBack.style.visibility = 'visible';
			}
			else{ eZoomHasBack = false; }
			
		}
		else{
			if(eZoomFromGalery && !!eZoomImage.parentNode.parentNode && !!eZoomImage.parentNode.parentNode.nextSibling.nextSibling){
				eZoomHasFord = true;
				eZoomImgFord.style.top = (((iZoomImgH - eZoomImgFord.offsetHeight) / 2) + iZoomImgY) + 'px';
				eZoomImgFord.style.visibility = 'visible';
			}
			else{ eZoomHasFord = false; }
			if(eZoomFromGalery && !!eZoomImage.parentNode.parentNode && !!eZoomImage.parentNode.parentNode.previousSibling.previousSibling){
				eZoomHasBack = true;
				eZoomImgBack.style.top = (((iZoomImgH - eZoomImgBack.offsetHeight) / 2) + iZoomImgY) + 'px';
				eZoomImgBack.style.visibility = 'visible';
			}
			else{ eZoomHasBack = false; }
			
		}	
		
	}
	
		
	

