// Para compatibilidad con NS
function mostrarTexto (texto, fuente) {
if (document.all) return texto;
return '' + texto + '';
}
// Sólo muestra el texto en IE
function mostrarIE (texto) {
if (document.all) return texto;
return "";
}
// Principal
function EVNews(ancho, borde, fuente, colorborde, colorfondo, colorlinks, cantidadNOT, cantidadALE, formato, colorletra, verBuscador) {
var j = 1;
var widthNOT = 100;
var widthALE = 100;
var urlpag = 'http://www.enciclopediavirus.com';
// Si el formato es horizontal, se dividen a la mitad
if (formato == "H") {
widthNOT = widthALE = 50;
}
// Encabezado
var encabezado = '
| ' + mostrarTexto('VIRUS INFORMATICOS', fuente) + ' |
|
';
// Buscador
var buscador = '';
// Noticias
var noticiasTXT = '| ' + mostrarTexto('NOTICIAS',fuente) + ' |
';
noticiasTXT += ' |
'
for (j=1;j<=cantidadNOT;j++){
noticiasTXT += '| ° | |
';
noticiasTXT += ' |
'
}
noticiasTXT += '
';
// Alertas
var alertasTXT = '| ' + mostrarTexto('ALERTAS',fuente) + ' |
';
alertasTXT += ' |
'
for (j=1;j<=cantidadALE;j++){
alertasTXT += '| ° | |
';
alertasTXT += ' |
'
}
if (formato == "H" && verBuscador != "0") {
alertasTXT += '| ' + buscador + ' |
';
}
alertasTXT += '
';
var texto = '';
texto += '';
texto += '| ' + encabezado + ' | ';
if (cantidadNOT > 0) {
texto += '| ' + noticiasTXT + ' | ';
if (formato == "V") texto += ' ';
}
if (cantidadALE > 0) {
if ((formato == "V") || (cantidadNOT <= 0)) {
texto += '';
} else {
if (cantidadNOT > 0) {
texto += '| | ';
}
}
texto += '' + alertasTXT + ' | ';
}
if (formato == "V" && verBuscador != "0"){
texto += '| ' + buscador + ' | ';
texto += ' | ';
}
texto += '| www.enciclopediavirus.com | ';
texto += ' |
';
texto += '
';
return texto;
}
function noticia(id, titulo, fecha){
this.id = id;
this.titulo = titulo;
this.fecha = fecha;
}
function alerta(id, nombre, fecha){
this.id = id;
this.nombre = nombre;
this.fecha = fecha;
}
var vError;
var vNot = new Array();
var vAle = new Array();
vNot[1] = new noticia(1209,'Servicio de Google usado para alojar malware','28/08/2010');vNot[2] = new noticia(1208,'En agosto, un parche fuera de hora para solucionar la vulnerabilidad LNK','31/07/2010');vNot[3] = new noticia(1207,'En la misma semana, Mozilla lanza dos actualizaciones de Firefox','24/07/2010');vNot[4] = new noticia(1206,'Julio con pocos pero importantes parches','22/07/2010');vNot[5] = new noticia(1205,'Sudáfrica 2010 y los goles en contra en nuestros ordenadores','06/07/2010');vAle[1] = new alerta(4400,'Win32/Etap.E','09/12/2010');vAle[2] = new alerta(4399,'LockScreen.HW','09/12/2010');vAle[3] = new alerta(4398,'LockScreen.JN','09/12/2010');vAle[4] = new alerta(4409,'Spy.Swisyn.AC','14/05/2010');vAle[5] = new alerta(4408,'Win32/Witkinat.B','14/05/2010');