// 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() + 1); //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(); // JavaScript Document var oDescarga = new function(){ var iniciado = false; var Layer = false; var Frame = false; this.init = function(){ //Layer = new layer('Descargar'); Frame = $('adjuntoIframe'); //AddEvent($('cerrarDescargar'), 'click', Layer.close); //iniciado = true; } this.mostrarCuadro = function(a,e){ if(!iniciado)return false; Layer.open(a, null); if(e)StopEvent(e); } this.descargar = function(idContenido,e){ if(Nav.esIE6)document.location = DIR_ROOT+'requests/descargaForzada.php'+'?idContenido='+idContenido; else Frame.src = DIR_ROOT+'requests/descargaForzada.php'+'?idContenido='+idContenido; if(e) StopEvent(e); } }