// JavaScript Document // Control de Recuflash function noticia(titular,texto,fecha,enlace,destino) { this.titular = titular this.texto = texto this.fecha= fecha this.enlace = enlace this.destino = destino } function MenuNoticias( snombre, nalto, nancho, bdet, bdetalle, npausa, nveloc){ //propiedades this.nombre = snombre; this.alto = nalto; this.ancho = nancho; this.det = bdet; this.detalle = bdetalle; this.noticias = new Array(); this.numNoticAct = 1; this.pos = 0; this.pos2 = 0; this.desp = 1; this.tiempo = 0; this.pausa = npausa; this.velocidad = nveloc; //metodos this.dibujar = Draw; this.moveUp = scrollUP; this.Soo = Halt; this.Arre = Continue; } var oMnuNotic = new MenuNoticias( 'MnuNotic', 100, 120, false, true, 2000, 100); var oMnuCirc = new MenuNoticias( 'MnuCirc', 50, 120, false, true, 2000, 100); var oMnuAyuda = new MenuNoticias( 'MnuAyuda', 80, 120, false, true, 2000, 100); oMnuNotic.noticias[0] = new noticia("Enero/2012 - Jornada el 19 de enero","¿Cuándo la chatarra deja de ser residuo? Reglamento (UE) 333/2011.", "X", "/?p=mp4_1_12001", "_self"); oMnuNotic.noticias[1] = new noticia("Noviembre/2011 - FER y la Fundación Biodiversidad", "firman un acuerdo de colaboración para fomentar la aplicación de la nueva normativa de residuos (Ley 22/2011)", "X", "/?p=mp4_1_11005", "_self"); oMnuNotic.noticias[2] = new noticia("Septiembre/2011 - EXPORECICLA 2011", "FER participa en las 3ª Jornadas Técnicas que se celebrarán en Zaragoza los días 27, 28 y 29 de Septiembre de 2011 en el marco de EXPORECICLA 2011", "X", "/?p=mp4_1_11004","_self"); oMnuNotic.noticias[3] = new noticia("Junio/2011 - I Concurso Fotográfico", "Fallo del I Concurso Fotográfico FER ?RECICLANDO?", "X", "/?p=mp4_1_11003", "_self"); //oMnuNotic.noticias[3] = new noticia("Cursos de vigilancia radiologica para el año 2006","...","X","/?p=mp4_1D.aspx","_self"); oMnuAyuda.noticias[0] = new noticia("03/03/2009 - Se convoca en el País Vasco el Programa Innotek para proyectos de desarrollo tecnológico e innovación","...","/","/?N=41&p=as2_5_08.aspx","_self"); oMnuAyuda.noticias[1] = new noticia("03/03/2009 - Avalmadrid y Caixa Sabadell destinarán 10 M€ a las pymes y autónomos madrileños","...","/","/?N=40&p=as2_5_08.aspx","_self"); oMnuAyuda.noticias[2] = new noticia("07/11/2008 - El Plan FinanciaPyme permitirá a los empresarios murcianos obtener avales, refinanciación y préstamos","...","/","/?N=39&p=as2_5_08.aspx","_self"); oMnuAyuda.noticias[3] = new noticia("07/11/2008 - Baleares presenta una nueva línea de financiación de avales para ayudas a las pymes ","...","/","/?N=38&p=as2_5_08.aspx","_self"); //oMnuAyuda.noticias[4] = new noticia("5/05/06 - Convenio entre CDTI y el IMPIVA para fomentar la innovación y el desarrollo tecnológico","...","5/05","as2/as2_5_27.aspx","_self"); oMnuCirc.noticias[0] = new noticia("Circular Nº 21/11","Asunto: Código de Conducta","X","/?p=as3_1.aspx","_self"); oMnuCirc.noticias[1] = new noticia("Circular Nº 20/11","Asunto: Formación Vigilancia Radiologica","X","/?p=as3_1.aspx","_self"); oMnuCirc.noticias[2] = new noticia("Circular Nº 19/11","Asunto: Conducción eficiente de vehículos industriales","X","/?p=as3_1.aspx","_self"); oMnuCirc.noticias[3] = new noticia("Circular Nº 18/11","Asunto: Principales modificaciones del ADR 2011","X","/?p=as3_1.aspx","_self"); //oMnuCirc.noticias[0] = new noticia("Circular Nº 01/08","Asunto: Cursos de formación 2008","X","/?p=as3_1.aspx","_self"); var det = false; function Draw(){ document.write ('
'); document.write('
') document.write ('
') document.write ('
'); document.write (this.noticias[0].titular); document.write ('
'); document.write ('
'); document.write (this.noticias[0].fecha); document.write ('
'); document.write ('
'); document.write (this.noticias[0].texto); document.write ('
'); document.write ('
'); if(this.detalle == true){ document.write ('detalle...'); } document.write ('
'); document.write ('
'); //*/ document.write ('
'); document.write ('
') document.write (this.noticias[1].titular); document.write ('
') document.write ('
') document.write (this.noticias[1].fecha) document.write ('
')//*/ document.write ('
'); document.write (this.noticias[1].texto); document.write ('
'); document.write ('
'); if(this.detalle == true){ document.write ('detalle...'); } document.write ('
'); //*/ document.write ('
') document.write('
') document.write ('
') if(navigator.appName == "Netscape"){ altoUno = document.getElementById( this.nombre + 'N1').offsetHeight; }else{ altoUno = document.getElementById(this.nombre + 'N1').clientHeight; } document.getElementById(this.nombre + 'N1').onmouseover =function(){ eval('o' + this.id.substr(0,this.id.length-2) + '.det = true'); clearTimeout(eval('o' + this.id.substr(0,this.id.length-2) + '.tiempo')); } document.getElementById(this.nombre + 'N1').onmouseout =function(){ eval('o' + this.id.substr(0,this.id.length-2) + '.det = false');//this.det = false; clearTimeout(eval('o' + this.id.substr(0,this.id.length-2) + '.tiempo')); eval('o' + this.id.substr(0,this.id.length-2) + '.moveUp()'); } document.getElementById(this.nombre + 'N2').onmouseover =function(){ eval('o' + this.id.substr(0,this.id.length-2) + '.det = true'); clearTimeout(eval('o' + this.id.substr(0,this.id.length-2) + '.tiempo')); } document.getElementById(this.nombre + 'N2').onmouseout =function(){ eval('o' + this.id.substr(0,this.id.length-2) + '.det = false');//this.det = false; clearTimeout(eval('o' + this.id.substr(0,this.id.length-2) + '.tiempo')); eval('o' + this.id.substr(0,this.id.length-2) + '.moveUp()'); } } function scrollUP(){ var pos,pos2; sId1 = this.nombre + 'N1'; sId2 = this.nombre + 'N2'; pos = document.getElementById(sId1.toString()).style.top; pos = pos.replace(/px/,""); pos = pos.replace(/pt/,""); pos = new Number(pos); pos2 = document.getElementById(sId2.toString()).style.top; pos2 = pos2.replace(/px/,""); pos2 = pos2.replace(/pt/,""); pos2 = new Number(pos2); pos -= this.desp; pos2 -= this.desp; if (pos == this.desp){ var contenidos = "" document.getElementById(sId2.toString()).style.top = this.alto document.getElementById(sId2.toString()).childNodes[0].firstChild.nodeValue = this.noticias[this.numNoticAct].titular //* if(poneFecha == true){ document.getElementById(sId2.toString()).childNodes[1].firstChild.nodeValue = this.noticias[this.numNoticAct].fecha // }//*/ document.getElementById(sId2.toString()).childNodes[2].firstChild.nodeValue = this.noticias[this.numNoticAct].texto; if(this.detalle == true){ document.getElementById(sId2.toString()).childNodes[3].href = this.noticias[this.numNoticAct].enlace } document.getElementById(sId1.toString()).style.top = 0 if(this.numNoticAct == this.noticias.length-1){this.numNoticAct=0} else{this.numNoticAct++; } this.Soo(); return false; }else{ if (pos2 == this.desp){ var contenidos = ""; document.getElementById(sId1.toString()).style.top = this.alto; document.getElementById(sId1.toString()).childNodes[0].firstChild.nodeValue = this.noticias[this.numNoticAct].titular; //*/ if(poneFecha == true){ document.getElementById(sId1.toString()).childNodes[1].firstChild.nodeValue = this.noticias[this.numNoticAct].fecha; // }//*/ document.getElementById(sId1.toString()).childNodes[2].firstChild.nodeValue = this.noticias[this.numNoticAct].texto; if(this.detalle == true){ document.getElementById(sId1.toString()).childNodes[3].href = this.noticias[this.numNoticAct].enlace; } document.getElementById(sId2.toString()).style.top = 0; if(this.cont == this.noticias.length-1){ this.numNoticAct=0; }else{ this.numNoticAct++; } this.Soo(); return false; }else{ document.getElementById(sId1.toString()).style.top = pos; document.getElementById(sId2.toString()).style.top = pos2; } } this.tiempo = window.setTimeout('o' + this.nombre + '.moveUp()',this.velocidad) } function Halt(){ clearTimeout(this.tiempo); if (this.det == false){ this.tiempo = setTimeout ('o' + this.nombre + '.Arre()',this.pausa);} } function Continue(){ if(this.det == false) { this.moveUp();} }