
var ancho = 155 //anchura del cuadro
var alto = 278 //altura del cuadro
var marco = 0 //0 para que notenga marco (borde)
var fondo = '#FFFFFF' //color de fondo del cuadro
var pausilla = 2000 //tiempo de la pausa en milisegundos (2000 = 2 segundos)
var cursor = "default;"  //cursor que se quiera sobre el cuadro
var colTitular = '#308000' //color del texto del titular
var colTexto = '#999999' // color del texto de la noticia
var colFecha = '#adc6e7' //color del texto de la fecha
var colEnlace = '#3366cc' //color del texto del enlace
var fuente = "Arial" //fuente para los textos 
var tamTitular = '11' //tamaño de la fuente del titular
var tamTexto = '10' //tamaño de la fuente del texto de la noticia
var tamFecha = '10' // tamaño de la fuente de la fecha
var tamEnlace = '11' // tamaño de la fuente del enlace 
var masInfo = false //Determina si se usa o no el enlace. true para usarlo. false para omitirlo
var poneFecha = false //true para poner fecha. false para omitirla. Si no se quiere fecha, dejar las comillas vacías ""



function noticia(titular,texto,fecha,enlace)
	{
	this.titular = titular
	this.texto = texto
	this.fecha= fecha
	this.enlace = enlace
	}
var noticias = new Array()





noticias[0]= new noticia("LEY 34/2007, de 15 de noviembre, DE CALIDAD DEL AIRE Y PROTECCIÓN DE LA ATMÓSFERA",
"Esta ley cuyo objetivo es contribuir a alcanzar y mantener un nivel de protección elevado de las personas y del medioambiente, busca reforzar la capacidad de acción de la sociedad para afrontar los problemas de la contaminación del aire, particularmente preocupante en los núcleos urbanos",
"23/10/07","./public/prensa/nuc_20070920-1.pdf")

noticias[1]= new noticia("MEDIDAS AMBIENTALES TRABAJA HACIA LA MEJORA CONTÍNUA EN LA PROTECCIÓN DEL MEDIO AMBIENTE",
"El Laboratorio de Medidas Ambientales en su objetivo de certificarse como ECA de acuerdo con la Orden MAM/985/2006, de 23 de marzo, amplia el alcance de la acreditación para análisis físico-químicos en aguas residuales y potables, demostrando mayor rigor profesional, competencia técnica y seguridad en su actividad ambiental",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")

noticias[2]= new noticia("MEDIDAS AMBIENTALES NUEVAMENTE ADJUDICATARIA DEL CONCURSO PARA EL CONTROL DE LAS AGUAS DE CONSUMO HUMANO DE LA COMARCA DEL ARANDA",
"",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")

noticias[3]= new noticia("MEDIDAS AMBIENTALES, UN LABORATORIO PIONERO EN ENSAYOS RADIOLÓGICOS",
"El Laboratorio de Medidas Ambientales con gran experiencia y capacidad técnica en realizar análisis de radiactividad gamma, beta y tritio, amplia su infraestructura para la realización de ensayos alfa en muestras ambientales",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")

noticias[4]= new noticia("MEDIDAS AMBIENTALES SE SUMA AL PROYECTO DE CREACIÓN DE 'ECOCIUDADES'",
"Medidas Ambientales ofrece la experiencia y entusiasmo de su equipo profesional en aportar soluciones innovadoras para gestionar proyectos de Agenda 21",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")

noticias[5]= new noticia("QUIEN CONTAMINA, PAGA",
"La Ley de Responsabilidad Ambiental, (Ley 26/2007), exigirá a las industrias reparar los desastres ambientales causados por una gestión irresponsable de sus actividades con el medio ambiente",
"03/10/07","./public/prensa/nuc_20070920-1.pdf")

noticias[6]= new noticia("MEDIDAS AMBIENTALES ENTRE LOS 10 MEJORES LABORATORIOS RADIOLÓGICOS A NIVEL INTERNACIONAL",
"El Laboratorio de Medidas Ambientales participó en el año 2006 en un programa de intercomparación de la IAEA, a nivel de ensayos radiológicos, resultando estar entre los 10 primeros de un total de 300",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")

noticias[7]= new noticia("MEDIDAS AMBIENTALES APUESTA POR LA DIFUSIÓN DE LA CULTURA AMBIENTAL",
"El Laboratorio de Medidas Ambientales asesora a la Universidad de Córdoba en la implantación del Sistema de Gestión Ambiental según Norma UNE-EN ISO 14001:2004 en sus instalaciones de la Facultad de Ciencias de la Educación",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")

noticias[8]= new noticia("MEDIDAS AMBIENTALES GESTIONA EL LABORATORIO DE METROLOGÍA DEL GRUPO EULEN",
"",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")

noticias[9]= new noticia("MEDIDAS AMBIENTALES PARTICIPA EN LA PLATAFORMA TECNOLÓGICA DE I+D DEL CEIDEN PARA AUMENTAR LAS CAPACIDADES NACIONALES EN DOSIMETRÍA INTERNA",
"",
"02/10/07","./public/prensa/ndp_20070919-1.pdf")






var det = false
function escribe(){
document.write ('<div id="mami" style="width:' + ancho + '; height:' + alto + 'px; position:relative;  overflow:hidden ">')
document.write('<table bgcolor="' + fondo + '" border = "' + marco + '" width="' + ancho + '" height="100%"><tr><td valign="top">')
document.write ('<div id="uno" style="top:' + alto +'; width:' + ancho + 'px; height:' + alto + 'px;  ">')
document.write ('<div class="titular">')
document.write (noticias[0].titular)
document.write ('</div>')
document.write ('<div class="fecha">')
document.write (noticias[0].fecha)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[0].texto)
document.write ('</div>')
if(masInfo == true){
	document.write ('<a class="enlace" href="')
	document.write (noticias[0].enlace)
	document.write ('" target=_self "+">más información</a>')
	}
document.write ('</div>')
document.write ('<div id="dos" style="top:' + (alto*2) +'; width:' + ancho + 'px; height:' + alto + 'px; ">')
document.write ('<div class="titular">')
document.write (noticias[1].titular)
document.write ('</div>')
document.write ('<div class="fecha">')
document.write (noticias[1].fecha)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[1].texto)
document.write ('</div>')
if(masInfo == true){
	document.write ('<a class="enlace" href="')
	document.write (noticias[1].enlace)
	document.write ('" target=_self "+">más información</a>')
	}
document.write ('</div>')
document.write('</td></tr></table>')
document.write ('</div>')
if(navigator.appName == "Netscape")
{altoUno = document.getElementById('uno').offsetHeight}
else
{altoUno = document.getElementById('uno').clientHeight}
document.getElementById('uno').onmouseover =function(){
	det = true
	clearTimeout(tiempo)
	}
document.getElementById('uno').onmouseout =function(){
	det = false;
	clearTimeout(tiempo)
	escrolea()
	}

document.getElementById('dos').onmouseover =function(){
	det = true
	clearTimeout(tiempo)
	}
document.getElementById('dos').onmouseout =function(){
	det = false;
	clearTimeout(tiempo)
	 escrolea()
	 
	}
}
desp = 1
var cont = 1
var pos,pos2
function escrolea(){
pos = document.getElementById('uno').style.top
pos = pos.replace(/px/,"");
pos = pos.replace(/pt/,"");
pos = new Number(pos);
pos2 = document.getElementById('dos').style.top
pos2 = pos2.replace(/px/,"");
pos2 = pos2.replace(/pt/,"");
pos2 = new Number(pos2);
pos -= desp
pos2 -= desp

if (pos == desp){
	var contenidos = ""
	document.getElementById('dos').style.top = alto
	document.getElementById('dos').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
	if(poneFecha == true){
	document.getElementById('dos').childNodes[1].firstChild.nodeValue  = noticias[cont].fecha
	}
	document.getElementById('dos').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
	if(masInfo == true){
		document.getElementById('dos').childNodes[3].href = noticias[cont].enlace 
	}
	document.getElementById('uno').style.top = 0
	if(cont == noticias.length-1)
		{cont=0}
	else{
		cont++
		}
	pausa()
	return false
	}
else{
	if (pos2 == desp){
		var contenidos = ""
		document.getElementById('uno').style.top = alto
		document.getElementById('uno').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
		if(poneFecha == true){
		document.getElementById('uno').childNodes[1].firstChild.nodeValue  = noticias[cont].fecha
		}
		document.getElementById('uno').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
		if(masInfo == true){
		document.getElementById('uno').childNodes[3].href  = noticias[cont].enlace
		}
		document.getElementById('dos').style.top = 0
		if(cont == noticias.length-1)
		{cont=0}
	else{
		cont++
		}
		pausa()
		return false
		}
	else{
		document.getElementById('uno').style.top = pos
		document.getElementById('dos').style.top = pos2
		}
	}
tiempo = window.setTimeout('escrolea()',45)
}
var tiempo
function pausa()
{
clearTimeout(tiempo)
if (det == false){
	tiempo = setTimeout ('continuar()',2000)
	}
}
function continuar()
{
if(det == false)
	{escrolea()}
}

document.write('<style type="text/css">')
document.write ('#uno {')
document.write ('color: #006699;')
if(cursor == "pointer" || cursor == "hand"){
cursor = (navigator.appName == "Netscape")?'pointer;':'hand;';
}
document.write ('cursor:' + cursor + ";")
document.write ('position:absolute;}')
document.write ('#dos {')
document.write ('color: #006699;')
document.write ('cursor:' + cursor + ";")
document.write ('position:absolute;}')
document.write ('.titular{')
document.write ('color:' + colTitular +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamTitular + ';font-weight:bold}')
document.write ('.texto{')
document.write ('color:' + colTexto + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamTexto + ';}')
if(poneFecha == true){
document.write ('.fecha{')
document.write ('color:' + colFecha +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamFecha + ';font-weight:bold}')
}
else{
document.write ('.fecha{display: none;}')
}
document.write ('.enlace{')
document.write ('color:' + colEnlace + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamEnlace + ';}')
document.write ('</style>')

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


