// 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("6/Marzo/2009 - Guía para la autorización de gestión y/o transporte de residuos no peligrosos", "...", "X", "/?p=mp4_1_09006","_self"); oMnuNotic.noticias[1] = new noticia("6/Marzo/2009 - FER en Alicante natura", "FER participará en la feria del Medio Ambiente Alicante Natura, que se celebrará del 27 al 29 de marzo en Alicante", "X", "/?p=mp4_1_09005", "_self"); oMnuNotic.noticias[2] = new noticia("6/Marzo/2009 - Primer anuario de FER","FER ha publicado la primera edición de su Anuario, en el que se reúnen las empresas socias de la Federación ", "X", "/?p=mp4_1_09004", "_self"); oMnuNotic.noticias[3] = new noticia("6/Marzo/2009 - Metalriciclo News N.01/09", "...", "X", "/?p=mp4_1_09003", "_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º 17/10","Asunto: Ampliación de los servicios J. Barbadillo y Asociados","X","/?p=as3_1.aspx","_self"); oMnuCirc.noticias[1] = new noticia("Circular Nº 16/10","Asunto: Resultado elecciones 2010","X","/?p=as3_1.aspx","_self"); oMnuCirc.noticias[2] = new noticia("Circular Nº 14/10","Asunto: Gestión de Residuos de Aparatos Eléctricos y Electrónicos","X","/?p=as3_1.aspx","_self"); oMnuCirc.noticias[3] = new noticia("Circular Nº 13/10","Asunto: Subvención para la Implantación de Responsabilidad Social Empresarial en las Pymes","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();} }