var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
/** Coop.class.js **/
var Coop = {
/**
* Funcion de inicio para el sitio.
* Aca se centralizan todas las funciones que se ejecutan en el onload
*/
counter: 0, // Contador para que el paginador vaya cambiando automaticamente.
timerScroll: 0,
fechaHoy: '',
init: function() {
/** Para los distintos tabs */
$("ul.idtabs").idTabs({change:false});
/** Para el home slide */
$('#slider1 ul').jcarousel({scroll:1, wrap:'circular',auto:6});
/** Para los deportes */
$('#slider2 ul').jcarousel({scroll:1, wrap:'circular',auto:6});
$("#col1 ul").idTabs({change:false}, function(id) {
//Cargar con ajax el title que guarda la url para mostrar dentro del div.
var url = $(id).attr("title");
nomElemento = id.split("_"); nomElemento = nomElemento[2]; nomElemento = nomElemento.toLowerCase();
//~ var url = 'erorrodljvl.html';
if(url) {
$(id).html($('#deportes .loading img').clone());
$(id).load(url, function(response, status, xhr){
if (status != "error") {
$(id).removeAttr("title");
if(typeof FB !== 'undefined' && typeof FB.XFBML !== 'undefined') {
FB.XFBML.parse($(id).get(0));
}
// Carrusel de Seccion
nomCarr = ".ultimas-noticias>.deporte-"+nomElemento;
$(nomCarr).quickPagination({pageSize:"1"});
Coop.aplicarFechaDinamica(Coop.fechaHoy);
} else {
$(id).html($('#deportes .loading h2').clone());
}
});
}
return true;
});
/** Para lo mas*/
$(".cabecera ul").idTabs({change:false}, function(id) {
//Cargar con ajax el title que guarda la url para mostrar dentro del div.
var url = $(id).attr("title");
if(url) {
$(id).html($('#lo_mas .loading').clone());
$(id).load(url, function(response, status, xhr){
if (status != "error") {
$(id).removeAttr("title");
if(typeof FB !== 'undefined' && typeof FB.XFBML !== 'undefined') {
FB.XFBML.parse($(id).get(0));
}
if(typeof twttr !== 'undefined' && typeof twttr.widgets !== 'undefined') {
twttr.widgets.load();
}
if(typeof gapi !== 'undefined' && typeof gapi.plusone !== 'undefined') {
gapi.plusone.go(id);
}
Coop.aplicarFechaDinamica(Coop.fechaHoy);
} else {
$(id).html($('#lo_mas .loading h2').clone());
}
});
}
return true;
});
/** Para los scrollbars **/
$('.all-tweets').slimScroll({
height: '320px',
wheelStep: 10
});
$('.slim-programas').slimScroll({
height: '365px',
wheelStep: 10
});
$('.mmediah').slimScroll({
height: '340px',
wheelStep: 10
});
$('.col-mamPortada').slimScroll({
height: '650px',
wheelStep: 10
});
$('.col-mamImportante').slimScroll({
height: '300px',
wheelStep: 10 ,
alwaysVisible: true
});
/** Un boton para el buscador **/
$('#header .buscador div.button').bind('click', function() {
$('#buscar_simple').trigger('submit');
});
/** Paginacion del Home 1, Area 1 */
$("ul.noti-desc").quickPagination({pageSize:"4"});
/** Paginacion Home 1, Area 2 */
$('.div-ult-noti').each(function() {
$(this).find('ul.noti').quickPagination({pageSize:5});
});
/** Paginacion del Right de Opinion */
$('.opinion-right .paginacion').quickPagination({pageSize:"3", pagerLocation:"before"});
/** Paginacion de Videos */
$('ul.videosh').quickPagination({pageSize:1, pagerLocation:"before"});
/** Paginacion de Magazine */
$('ul.videos-black').quickPagination({pageSize:1, pagerLocation:"before"});
$('ul.cont-magazine').quickPagination({pageSize:1, pagerLocation:"before"});
setInterval(function() {
var total_li = $('ul.videosh > li[class^=simplePagerPage]').length - 1;
var pos_actual = Coop.counter;
$('ul.videosh > li[class^=simplePagerPage]').each(function () {
var pos_item = $(this).index();
Coop.counter = pos_actual + 1;
var pos_next = Coop.counter;
if (pos_next == pos_item && pos_next <= total_li) {
$('ul.videosh > li[class^=simplePagerPage]').hide();
$('ul.videosh > li[class^=simplePagerPage]:eq(' + pos_next + ')').css("display", "list-item");
$('.box-artvideo > .simplePagerContainer > .simplePagerNav > .currentPage').removeClass('currentPage');
$('.box-artvideo > .simplePagerContainer > .simplePagerNav > li:eq(' + pos_next + ')').addClass('currentPage');
}
if (pos_next > total_li) {
Coop.counter = 0;
$('ul.videosh > li[class^=simplePagerPage]').hide();
$('ul.videosh > li[class^=simplePagerPage]:eq(0)').css("display", "list-item");
$('.box-artvideo > .simplePagerContainer > .simplePagerNav > .currentPage').removeClass('currentPage');
$('.box-artvideo > .simplePagerContainer > .simplePagerNav > li:eq(0)').addClass('currentPage');
}
});
}, 15000);
/** Paginacion de concursos */
$(".concursos > ul#concurso").quickPagination({pageSize:"1", pagerLocation:"before"});
/** Paginacion de cartelera */
$("ul.pag-cartelera").quickPagination({pageSize:"1"});
/** Selector Home1 */
$("#cuerpo1 #portada .col240 .box-ultimas-not ul li a").bind('click', function() {
$("#cuerpo1 #portada .col240 .box-ultimas-not ul li").removeClass('selected');
$(this).parent().addClass('selected');
});
/** Paginacion Deporte - Ultimas Noticias */
/** Para el plugin timeago */
Coop.aplicarTimeago();
/** Para la combo del buscador **/
Coop.instalarComboBuscador();
/** Para la combo del programas en MProgramas (Lateral) **/
Coop.instalarComboProgramasLateral();
/** scroll automatico de tabs **/
Coop.timerScroll = setInterval('Coop.autoTabScroll()',15000);
$("ul.noti-desc").children().each(function() {
$(this).children().click(function(data) {
if (typeof data.button != 'undefined') {
clearInterval(Coop.timerScroll);
}
});
});
},
/**
* Funcion de inicio para el sitio, en el articulo
* Aca se centralizan todas las funciones que se ejecutan en el onload
*/
initArtic: function() {
var text = $('div.col4 > h3').text();
if(text == '¿Y tú que opinas?') {
$('div.col4 > h3').text('Desde Facebook:');
}
$('.col_side1').slimScroll({
height: '368px',
wheelStep: 10
});
$('.relac').quickPagination({pageSize:"3"});
/** Para el plugin timeago */
Coop.aplicarTimeago();
/** Para la combo del buscador **/
Coop.instalarComboBuscador();
/** Tabs Marcadores Virtuales **/
Coop.instalarTabsMV();
},
autoTabScroll: function(){
var tabs = $("ul.noti-desc").children();
var nroTab = 1;
var nroNav = 1;
var currentTab = $("ul.noti-desc").find('.select');
var actual;
if (/.*_(\d+)$/.test(currentTab.attr('id'))) {
actual = (/.*_(\d+)$/.exec(currentTab.attr('id')));
nroTab = parseInt(actual[1],10) + 1;
if (nroTab > tabs.length) {
nroTab = 1;
}
nroNav = parseInt((nroTab-1)/4) + 1;
$("ul.noti-desc").parent().find('.simplePagerNav').find('.simplePageNav'+nroNav).children().click();
$('#elementDestacado_'+nroTab).children().click();
};
},
/**
* Abre la popup de suscripción al Mailcenter 6 de cooperativa,
* para poder suscribirse al newsletter diario de cooperativa.
*/
noticiasEmail: function() {
Utiles.subWin('/app_reg/frontend/modules/index.php?modulo=usuario&accion=VerFicha', 'Noticias', 550, 600);
},
/**
* Esta funcion setea la página de inicio. Solo compatible con IE Browsers
* Información complementaria: http://stackoverflow.com/questions/946189/how-can-i-set-default-homepage-in-ff-and-chrome-via-javascript
*/
setHomepage: function() {
if(typeof document.body.setHomePage == "function") {
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://web.archive.org/web/20121005115446/http://www.test.de');
} else {
alert('Su navegador no soporta esta funcionalidad');
}
},
/**
* Aplica la Fecha y Hora dinamica, cambiando los estilos si corresponde al dia actual.
* Se hace de manera dinamica, aprovechando jquery
*/
aplicarFechaDinamica: function(ymd) {
if (/\d+/i.test(ymd)) {
$('.fecha-dinamica').each(function() {
var fecha = $(this).find('.fecha').text();
if(fecha == ymd) {
var hora = $(this).find('.hora').text();
var horaok = hora;
if(hora.indexOf(':') < 0) {
horaok = hora.substr(0,2)+':'+hora.substr(2,2);
}
$(this).find('.hora').html(horaok).show();
}
});
$('.relac').find('.fecha-dinamica').each(function() {
var fecha = $(this).find('.fecha').text();
if(fecha != ymd) {
var fechaok = fecha;
if(fecha.indexOf('/') < 0 && fecha.indexOf('-') < 0) {
fechaok = fecha.substr(6,2)+'/'+fecha.substr(4,2)+'/'+fecha.substr(0,4);
};
$(this).find('.fecha').html(fechaok).show();
}
});
}
},
aplicarFechaDinamicaMam: function(ymd) {
if (/\d+/i.test(ymd)) {
var fechaActual = ymd;
$('#cuerpo-articulo .hora').each(function() {
var dts = $(this).text();
var fecha = dts.substr(0,8);
var horaok = dts.substr(8,2)+ ':' + dts.substr(10,2);
var fechaok = dts.substr(6,2) + '/' + dts.substr(4,2) + '/' + dts.substr(0,4);
if(fecha == fechaActual) {
$(this).html(horaok);
}else{
$(this).html(fechaok + ' - ' + horaok);
$(this).removeClass("hora");
$(this).addClass("fecha");
}
});
}
},
aplicarFechaDinamicaPublicacion: function(fec_publicacion, hora_publicacion, fec_long, fec_actual) {
if (parseInt(fec_publicacion) === parseInt(fec_actual)) {
$("#seteoFecha").append(hora_publicacion);
} else {
$("#seteoFecha").append(fec_long);
}
},
instalaPaginacionUltimas: function() {
$(".contenedor_ultimas_noticias ul li:gt(2)").addClass('dotted');
$(".contenedor_ultimas_noticias ul li").filter(':eq(9), :eq(10), :eq(11)').removeClass('dotted');
$(".contenedor_ultimas_noticias ul li").filter(':eq(18), :eq(19), :eq(20)').removeClass('dotted');
$(".contenedor_ultimas_noticias ul").quickPagination({pageSize:"9"});
// Agrega boton de +Noticias
$("#ultimas-noticias-2 ul.simplePagerNav").append('
+Noticias');
},
/**
* Limpia ultima linea notas laterales
*/
limpiaLineaNotasLaterales: function() {
var cantDest = $("#cuerpo1 .cleft .col2 .noticias-tema article").length;
var numElement = cantDest - 1;
$("#cuerpo1 .cleft .col2 .noticias-tema article").filter(':eq('+numElement+')').css("border-bottom","0px solid #EAEAEA");
$("#cuerpo1 .cleft .col2 .noticias-tema article").filter(':eq(2), :eq(5), :eq(8)').css("border-bottom","0px solid #EAEAEA");
},
/**
* Aplica el plugin Timeago, para lo que se necesite
* Iniciamente sólo en twitter
*/
aplicarTimeago: function() {
$('.timeago').each(function(i) {
var newdate = new Date($(this).attr('title')*1000);
if(newdate) {
var y = newdate.getFullYear();
var m = newdate.getMonth(); m++; if(m < 10) m = '0'+m;
var d = newdate.getDate(); if(d < 10) d = '0'+d;
var h = newdate.getHours(); if(h < 10) h = '0'+d;
var t = newdate.getMinutes(); if(t < 10) t = '0'+d;
var s = newdate.getSeconds(); if(s < 10) s = '0'+d;
var fulldate = y+'-'+m+'-'+d+' '+h+':'+t+':'+s;
var texto_timeago = $.timeago(fulldate);
$(this).text(texto_timeago);
}
});
},
/**
* Setea el Anchor a la galeria
*/
setAnchor: function() {
$('#mycarousel li a, #galeria-de-fotos .nav-galeria span a').each(function() {
var href = $(this).attr('href');
$(this).attr('href', href+'#top-galeria');
});
},
/**
* Posiciona menu
*/
posicionaMenu: function(seccion, fid) {
var pag = '';
if(fid == 'fid_foto') {
pag = 'fotos';
} else if(fid == 'fid_audio') {
pag = 'audios';
} else if(fid == 'fid_video') {
pag = 'videos';
} else if(seccion) {
pag = seccion.toLowerCase();
}
pag = pag.replace(/á/g,'a');
pag = pag.replace(/Á/g,'a');
pag = pag.replace(/é/g,'e');
pag = pag.replace(/É/g,'e');
pag = pag.replace(/í/g,'i');
pag = pag.replace(/Í/g,'i');
pag = pag.replace(/ó/g,'o');
pag = pag.replace(/Ó/g,'o');
pag = pag.replace(/ú/g,'u');
pag = pag.replace(/Ú/g,'u');
if(pag) {
$('#botonera ul li').attr('class', '');
$('#botonera-footer ul li').attr('class', '');
$('#botonera ul li a[href$="'+pag+'"]').parent().attr('class', 'select');
var id = pag.split(".");
$('#botonera ul li a[href$="'+pag+'"]').parent().attr('id', id[0]+'1');
$('#botonera-footer ul li a[href$="'+pag+'"]').parent().attr('class', 'selected');
$('#botonera ul li a[href$="'+pag+'"]').parent().prepend('
');
var ancho = $('#botonera ul li a[href$="'+pag+'"]').parent().width();
$('#botonera ul li a[href$="'+pag+'"]').parent().find('div').width(ancho);
} else {
$('#botonera ul li').attr('class', '');
$('#botonera-footer ul li').attr('class', '');
$('#botonera ul li a:first').parent().attr('class', 'select');
$('#botonera ul li a:first').parent().attr('id', 'index1');
$('#botonera-footer ul li a:first').parent().attr('class', 'selected');
}
},
/**
* Inatala el colorbox para la imagen de articulo
*/
instalaColorboxImagen: function(credito) {
if($.browser.msie) {
$(".credito").css("display","none");
};
$(".principal_articulo_foto").colorbox({rel: 'principal_articulo_foto', onComplete:function() {
if ($.browser.msie ) {
$("#credito_colorbox").css("display", "none")
} else {
// Credito
$("#cboxLoadedContent").append('' + credito + '
');
// Posicion Credito de Foto
var ImgAncho = $("#cboxLoadedContent").css("width");
var ImgAncho = parseInt(ImgAncho);
var PosCredito = ImgAncho - 160;
$("#credito_colorbox").css("margin-left", PosCredito);
}
// Barra Inferior Texto
$('#cboxLoadedContent').css('margin-bottom', '0');
var titleheight = $('#cboxTitle').height();
if (titleheight < 25) {
titleheight = 25;
}
var initialLine = 25;
titleheight = titleheight + 12;
$('#colorbox').height($('#colorbox').height() + titleheight - initialLine);
$('#cboxWrapper').height($('#cboxWrapper').height() + titleheight - initialLine);
$('#cboxMiddleLeft').height($('#cboxMiddleLeft').height() + titleheight - initialLine);
$('#cboxMiddleRight').height($('#cboxMiddleRight').height() + titleheight - initialLine);
$('#cboxContent').height($('#cboxContent').height() + titleheight - initialLine);
//$('#cboxLoadedContent').height($('#cboxLoadedContent').height() + titleheight - initialLine);
}});
},
/**
* Posiciona menu
*/
instalarComboBuscador: function() {
$('#buscador_seccion .texto').bind('click', function() {
$('#buscador_seccion .combo').slideToggle('fast');
if($('#buscador_seccion').hasClass('open')) {
$('#buscador_seccion').removeClass('open');
} else {
$('#buscador_seccion').addClass('open');
}
});
$('#buscador_seccion .combo p').bind('click', function() {
var secc = $(this).text();
$('#search_seccion').val(secc);
$('#buscador_seccion .texto').text(secc);
$('#buscador_seccion .combo').slideUp('fast');
$('#buscador_seccion').removeClass('open');
});
} ,
/**
* Posiciona menu
*/
instalarComboGenerico: function(id) {
$('#' + id + '-btn').bind('click', function () {
$('.link-redes').find('div[id$="-menu"]').not('#' + id + '-menu').hide();
if (!$('#' + id + '-menu').is(':visible')) {
var height = $('#' + id + '-menu').height() -1;
$('#' + id + '-menu').show().height(0).animate({height: height});
} else {
$('#' + id + '-menu').slideUp('fast');
}
});
} ,
/**
* Posiciona menu
*/
instalarComboProgramasLateral: function() {
var txtInicial = $(".programas .combo p:first").text();
$(".programas .texto").text(txtInicial);
$('.items_programas:first').css("display","block");
$(".combobox.radius").bind('click', function() {
$('.programas .combo').slideToggle('fast');
if($('.programas .combo').hasClass('open')) {
$('.programas .combo').removeClass('open');
} else {
$('.programas .combo').addClass('open');
}
});
$('.programas .combo p').bind('click', function() {
var idElemento = $(this).attr("id");
idElemento = idElemento.split("_");
var elemento = '#' + idElemento[1];
$(".items_programas").css("display","none");
$(elemento).css("display","block");
var secc = $(this).text();
$('.programas .texto').val(secc);
$('.programas .texto').text(secc);
$('.programas .combo').slideUp('fast');
$('.programas .combo').removeClass('open');
});
} ,
/**
* Tabs en Marcadores Virtuales
*/
instalarTabsMV: function() {
$('.botonera span').bind('click', function() {
var nombreTab = $(this).html();
var idElemento = '#'+nombreTab;
// Marcar Elemento
var className = 'selected';
$('.botonera span').removeClass(className);
$(this).addClass(className);
// Presentar Elemento
$(".contenido").css("display","none");
$(idElemento).css("display","block");
});
},
setGaleria: function() {
var myid = $('#galeria ul li.actual').attr('id');
var mystart = myid.replace('thumb', '');
var start = Math.floor(mystart / 6) * 6 + 1;
$('#galeria ul').jcarousel({scroll:6, start:start, visible:6, wrap:'circular', animation:'slow'});
},
homeGaleria: function() {
// Initialize Minimal Galleriffic Gallery
$('#thumbs').galleriffic({
numThumbs:6,
preloadAhead: 2,
prevLinkText: ' ',
nextLinkText: ' ',
prevPageLinkText: ' ',
nextPageLinkText: ' ',
imageContainerSel: '#slideshow',
controlsContainerSel: '#controls',
captionContainerSel: '#containerMensajeActual',
onSlideChange: function(actualIndex, nextIndex) {
$("#ContainerFotoActual").html(nextIndex+1);
},
onPageTransitionIn: function() {
var group = $('.bottom.pagination').children();
if($(group).filter(':first').prop("tagName") == 'span') {
$(group).filter(':first').html(' ').addClass('prevBtn');
} else {
$(group).filter(':first').html(' ').addClass('prevBtn');
}
if($(group).filter(':last').prop("tagName") == 'span') {
$(group).filter(':last').html(' ').addClass('prevBtn');
} else {
$(group).filter(':last').html(' ').addClass('nextBtn');
}
$(group).not(':first').not(':last').remove();
this.fadeTo('fast', 1.0);
}
});
//~ $('#mycarousel_galeria_fotos').jcarousel({
//~ scroll: 3
//~ });
}
};
Coop.fechaHoy = '20121005';
/** Utiles.class.js **/
/**
Utiles.class.js
Descripcion:
Contiene funciones basicas y utiles para el uso comun.
Próximamente podría quedar obsoleto o ser modificado masivamente, por lo tanto,
la documentación es básica
Dependencias:
Ninguna
Versión:
3.1.0 - 04/07/2011
Más información en Utiles.txt
**/
var Utiles = {
/**
* Zona de Configuraciones
*/
dirCgiBin: '/cgi-bin',
prontusName: '/noticias',
serverName: 'http://web.archive.org/web/20121005115446/http://www.tusitio.cl',
cgiNameImprimir: 'prontus_imprimir.cgi',
formEnviar: '/stat/enviar/formulario.html',
configComun: 'toolbar=0,status=0,menubar=0,location=0,directories=0',
msgWin: 'Debes habilitar las ventanas emergentes en tu navegador para acceder a esta funcionalidad.',
msgBadBrowser: 'Su browser no soporta esta característica',
widthEnviar: 400,
heightEnviar: 455,
/**
* Para el Envio de noticia por e-mail.
* Sólo abre el formulario, no llama directamente a la CGI
* @param file Ruta al artículo, se puede usar %%_FILE%% (opcional)
* @param w Ancho de la ventana (opcional)
* @param h alto de la ventana (opcional)
*/
enviarArticulo: function (file, w, h, subject) {
var url;
if(typeof file !== 'undefined' && file!='') {
url = file;
} else {
url = document.URL;
};
w = (typeof w !== 'undefined' && w !== null && w !== '') ? w : Utiles.widthEnviar;
h = (typeof h !== 'undefined' && h !== null && h !== '') ? h : Utiles.heightEnviar;
var strsubject = '';
if(typeof subject !== 'undefined' && subject !== null && subject !== '') {
strsubject = '&_SUB='+window.escape(subject);
}
var loc = Utiles.prontusName + Utiles.formEnviar+'?_URL=' + window.escape(url) + strsubject;
var config = 'width='+w+',height='+h+',scrollbars=0,resizable=0,' + Utiles.configComun;
var envia = window.open(loc,'enviar', config);
if(envia) {
envia.focus();
} else {
alert(Utiles.msgWin);
return;
}
envia.focus();
},
/**
* Abre la ventana para imprimir el artículo actual.
* Con soporte para multivistas
* @param file Ruta al artículo, se puede usar %%_FILE%%
* @param mv nombre de la multivista
* @param w Ancho de la ventana (opcional)
* @param h alto de la ventana (opcional)
*/
imprimirArticulo: function (file, mv, w, h) {
var url;
if(typeof file !== 'undefined' && file!='') {
var matches = file.match(/^(.*?\/pags)\-\w+(\/.*?)$/);
if(matches === null || matches.length != 3) {
url = file;
} else {
url = matches[1] + matches[2];
}
} else {
url = document.URL;
};
var mvcookie;
if(typeof mv !== 'undefined' && mv!='') {
mvcookie = '_MV='+mv+'&';
} else {
mvcookie = '';
}
var loc = Utiles.dirCgiBin+'/'+Utiles.cgiNameImprimir+'?'+mvcookie+'_URL=' + window.escape(url);
w = (typeof w !== 'undefined') ? w : screen.availWidth/2;
h = (typeof h !== 'undefined') ? h : screen.availHeight*0.9;
var config = 'width='+w+',height='+h+',scrollbars=1,resizable=0,'+Utiles.configComun;
var imprimir = window.open(loc,'imprimir', config);
if(imprimir) {
imprimir.focus();
} else {
alert(Utiles.msgWin);
return;
}
imprimir.focus();
},
/**
* Abre una ventana pop generica
* @param loc Url de la pagina que se abrira en la pop
* @param nom nombre de la ventana
* @param ancho ancho de la ventana
* @param alto alto de la ventana
* @param posx posicion X de la ventana
* @param posy posicion Y de la ventana
*/
subWin: function (loc, nom, ancho, alto, posx, posy) {
var thisposx = posx;
var thisposy = posy;
if(typeof thisposx === 'undefined') {
thisposx = 20;
}
if(typeof thisposy === 'undefined') {
thisposy = 10;
}
if ((typeof loc === 'undefined') || (loc === "")){
return false;
}
if(nom) {
nom = nom.replace(/ /g, '_');
nom = nom.toLowerCase();
}
var options = 'width=' + ancho + ',height=' + alto + ',scrollbars=1,resizable=1,' +
Utiles.configComun;
var win = window.open(loc, nom, options);
if(win) {
win.focus();
} else {
alert(Utiles.msgWin);
return;
}
win.focus();
win.moveTo(thisposx, thisposy);
},
/**
* Agrega pagina a favoritos del browser.
* Ojo que sólo funcionará con algunos navegadores
* url y titulo son opcionales
*/
addBookmark: function(url, titulo) {
if(typeof url == 'undefined' || url === null) {
url = window.location.href;
};
if(typeof titulo == 'undefined' || titulo === null) {
titulo = document.title;
};
// Para IE
if (window.external && typeof window.external.AddFavorite != 'undefined') {
window.external.AddFavorite(url, titulo);
// Posible compatibilidad con IE8
} else if (window.external && typeof window.external.AddToFavoritesBar != 'undefined') {
window.external.AddToFavoritesBar(url, titulo);
// Mozilla Firefox Bookmark
} else if (window.sidebar) {
window.sidebar.addPanel(titulo, url, "");
} else {
alert(Utiles.msgBadBrowser);
}
},
/**
* Agrega pagina a favoritos del browser.
* Ojo que sólo funcionará con algunos navegadores.
*/
setHomePage: function(obj) {
if (document.all) {
obj.style.behavior = 'url(#default#homepage)';
obj.setHomePage(Utiles.serverName);
} else {
alert(Utiles.msgBadBrowser);
}
},
/**
* Agrega una Funcion al onload de la pagina
* @param func funcion que se desea agregar
* @param params parametros de la funcion
*/
addLoadEvent: function (func, params) {
var oldonload = window.onload;
window.onload = function() {
if (oldonload) {
oldonload();
}
func(params);
};
},
/**
* Obtiene un parametro del querystring.
* @param nom Nmobre del parametro a leer
*/
getParam: function (nom) {
var request = window.location.href;
if ((nom !== null) && (nom !== 'undefined') && (nom !== '')) {
var re = new RegExp(nom + '=([^&]*)');
var found = request.match(re);
if(found !== null && found.length >= 2) {
return found[1];
} else {
return '';
}
}
return '';
},
/**
* Abre la ventana POP para el Zoom de Imágenes
* @param loc url de la pagina que se abrira en la pop
* @param nom nombre de la ventana
* @param ancho ancho de la ventana
* @param alto alto de la ventana
* @param posx posicion X de la ventana
* @param posy posicion Y de la ventana
*/
popZoom: function (loc, nom, ancho, alto, posx, posy) {
var thisposx = posx;
var thisposy = posy;
if(typeof thisposx === 'undefined') {
thisposx = 20;
}
if(typeof thisposy === 'undefined') {
thisposy = 10;
}
if ((typeof loc === 'undefined') || (loc === "")){
return false;
}
var options='width='+ancho+',height='+alto+',scrollbars=0,resizable=1'+Utiles.configComun;
var winzoom = window.open(loc, nom, options);
if(winzoom) {
winzoom.focus();
} else {
alert(Utiles.msgWin);
return;
}
winzoom.focus();
winzoom.moveTo(thisposx, thisposy);
},
/**
* Destilda un String
* @param texto String que se desea destildar
*/
destilda: function (texto) {
var txt = texto;
txt = txt.replace(/Á/g,'a');
txt = txt.replace(/É/g,'e');
txt = txt.replace(/Í/g,'i');
txt = txt.replace(/Ó/g,'o');
txt = txt.replace(/Ú/g,'u');
txt = txt.replace(/á/g,'a');
txt = txt.replace(/é/g,'e');
txt = txt.replace(/í/g,'i');
txt = txt.replace(/ó/g,'o');
txt = txt.replace(/ú/g,'u');
txt = txt.replace(/Ñ/g,'n');
txt = txt.replace(/ñ/g,'n');
txt = txt.replace(/Ü/g,'u');
txt = txt.replace(/ü/g,'u');
txt = txt.replace(/á/g,'a');
txt = txt.toLowerCase();
txt = txt.replace(/[^0-9a-z\_\-]/g,'');
return txt;
},
fileExtension: function (archivo) {
rutaFile = '/noticias/imag/iconos/';
icoFile = rutaFile + 'gen.gif';
var extension = (archivo.substring(archivo.lastIndexOf("."))).toLowerCase();
if(extension == '.pdf'){ icoFile = rutaFile + 'pdf.gif' ;}
if(extension == '.doc'){ icoFile = rutaFile + 'word.gif' ;}
if(extension == '.xls'){ icoFile = rutaFile + 'excel.gif' ;}
if(extension == '.mp3'){ icoFile = rutaFile + 'audio.gif' ;}
if(extension == '.swf'){ icoFile = rutaFile + 'fla.gif' ;}
if(extension == '.html'){ icoFile = rutaFile + 'html.gif' ;}
if(extension == '.ppt'){ icoFile = rutaFile + 'ppt.gif' ;}
if(extension == '.zip'){ icoFile = rutaFile + 'zip.gif' ;}
if(extension == '.rar'){ icoFile = rutaFile + 'ppt.gif' ;}
return icoFile;
} ,
changeIco: function (arrFile) {
for(x=0; x < arrFile.length; x++) {
var y = x+1;
extension = Utiles.fileExtension(arrFile[x]);
tagName = '#ico_asociado' + y;
$(tagName).attr("src",extension);
}
}
};
/** FechaHora.class.js **/
/**
* Clase encargada de colocar y actualizar la fecha y hora en una pagina web
* Versión: 2.0.0 - 15/06/2011
*/
var FechaHora = {
//idFecha: "lafecha", // ID del div o span que contendrá la fecha
//idHora: "lahora", // ID del div o span que contendrá la hora
idFecha: "horaFecha", // ID del div o span que contendrá la fecha
idHora: "horaHora", // ID del div o span que contendrá la hora
tUpdate: 1000, // Tiempo en milisegundos en que se refrescará la fecha/hora
domfecha: null,
domhora: null,
tInterval: -1,
// -----------------------------------------------
// Se inicia el intervalo de tiempo
init: function () {
if (typeof document.getElementById !== 'undefined') {
FechaHora.write_fecha_hora();
FechaHora.tInterval = setInterval(function () {
FechaHora.write_fecha_hora();
}, FechaHora.tUpdate);
}
},
getFecha : function(){
var meses=['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'];
var fecha = new Date();
var fecha = new Date();
var dia = fecha.getDate();
var mes = fecha.getMonth();
var anio = fecha.getYear();
if (anio < 1000) {anio += 1900; }
strFecha = dia + ' de ' + meses[mes] + ' de ' + anio;
return strFecha;
},
getHora : function() {
var fecha = new Date()
var hora = fecha.getHours()
var minuto = fecha.getMinutes()
if (hora < 10) {hora = "0" + hora}
if (minuto < 10) {minuto = "0" + minuto}
var strHora = hora + ":" + minuto;
return strHora;
},
// -----------------------------------------------
// Para detener el timer
stop: function () {
clearInterval(FechaHora.tInterval);
FechaHora.domfecha = null;
FechaHora.domhora = null;
},
// -----------------------------------------------
// Funcion para escritura de fecha / hora
write_fecha_hora: function () {
var hr, fec;
fec = FechaHora.getFecha();
if (FechaHora.domfecha !== null) {
FechaHora.domfecha.innerHTML = fec;
} else {
if (document.getElementById(FechaHora.idFecha)) {
FechaHora.domfecha = document.getElementById(FechaHora.idFecha);
FechaHora.domfecha.innerHTML = fec;
}
}
// Para la hora
hr = FechaHora.getHora();
if (FechaHora.domhora !== null) {
FechaHora.domhora.innerHTML = hr;
} else {
if (document.getElementById(FechaHora.idHora)) {
FechaHora.domhora = document.getElementById(FechaHora.idHora);
FechaHora.domhora.innerHTML = hr;
}
}
}
};
// Se inicia el sistema
FechaHora.init();
}
/*
FILE ARCHIVED ON 11:54:46 Oct 05, 2012 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 16:04:24 Apr 27, 2024.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
captures_list: 0.646
exclusion.robots: 0.085
exclusion.robots.policy: 0.072
cdx.remote: 0.058
esindex: 0.009
LoadShardBlock: 514.971 (3)
PetaboxLoader3.resolve: 357.995 (4)
PetaboxLoader3.datanode: 398.033 (4)
load_resource: 250.045
*/