// 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(1190,'Un nuevo Zero-Day en Internet Explorer','06/03/2010');vNot[2] = new noticia(1189,'Usan noticia de terremoto chileno para distribuir malware','03/03/2010');vNot[3] = new noticia(1188,'¿Qué riesgos puede traer el uso de la tableta iPad?','12/02/2010');vNot[4] = new noticia(1187,'Trece boletines para 26 vulnerabilidades','06/02/2010');vNot[5] = new noticia(1186,'Falsa muerte de Johnny Depp se esparce por Internet','28/01/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(4406,'Win32/Agent.OBY','09/03/2010');vAle[5] = new alerta(4405,'Spy.Bebloh.A','09/03/2010');