/*****************************************************************************
Scroll de noticias con foto. Script creado por Tunait! (27/3/2004)
Si quieres usar este script en tu sitio eres libre de hacerlo con la condición de que permanezcan intactas estas líneas, osea, los créditos.
No autorizo a publicar y ofrecer el código en sitios de script sin previa autorización
Si quieres publicarlo, por favor, contacta conmigo.
http://javascript.tunait.com/
tunait@yahoo.com 
******************************************************************************/
var ancho = 155 //anchura del cuadro
var alto = 200 //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 destino = "_blank" //target en donde se quiera que se carguen los enlaces, en caso de usarlos.
var cursor = "default;"  //cursor que se quiera sobre el cuadro
var colTitular = '#006699' //color del texto del titular
var colTexto = '#999999' // color del texto de la noticia
var colFecha = '#3399FF' //color del texto de la fecha
var colEnlace = '#660000' //color del texto del enlace
var fuente = "arial" //fuente para los textos 
var tamTitular = '14' //tamaño de la fuente del titular
var tamTexto = '12' //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 alinImagen = 'center'//alineaci&oacute;n de la imagen
var margImagen = '3'//margen alrededor de la imagen
var masInfo = true //Determina si se usa o no el enlace. true para usarlo. false para omitirlo
var poneFecha = true //true para poner fecha. false para omitirla. Si no se quiere fecha, dejar las comillas vacías ""

/*function noticia(titular,texto,fecha,enlace,destino,imagen)
	{
	this.titular = titular
	this.texto = texto
	this.imagen = imagen
	this.fecha= fecha
	this.enlace = enlace
	this.destino = destino
	}
var noticias = new Array()*/

function noticia(titular,texto,fecha,enlace,destino)
	{
	this.titular = titular
	this.texto = texto
	this.fecha= fecha
	this.enlace = enlace
	this.destino = destino
	}
var noticias = new Array()

noticias[12]= new noticia("GIDEL","GIDEL selecciona Akcelware SL como su distribuidor y soporte en España.","1/2/08", "http://www.gidel.com","","")
noticias[11]= new noticia("Uniemprendia","Akcelware Seleccionada entre los 20 mejores proyectos empresariales a nivel nacional por el concurso UNIEMPRENDIA","14/7/07", "http://www.uniemprendia.es","","")
noticias[10]= new noticia("NUEVO FORO!!! Akcelware","Pregunta cualquier duda sobre nuestro productos, servicios o diseño sobre FPGA","28/7/08", "http://www.foro.ws/akcelware","","")
noticias[9]= new noticia("Akcelware S.L. en el SIMO 2008","AKCELWARE SL selecionada en el concurso del Vivero del SIMO para optar al premio de empresas de nueva creación.","01/10/08", "http://84.20.29.41/es/portal.do","","")
noticias[8]= new noticia("El SIMO se cancela","AKCELWARE SL sufre la crisis por la cancelación del SIMO 2008, pero seguimos para adelante..","05/11/08", "http://84.20.29.41/es/portal.do","","")
noticias[7]= new noticia("AKCELWARE estará en el SIMO 2009","AKCELWARE SL ha sido invitado en un espacio especial para la edición SIMO 2009 como compensación a la catastrofe de SIMO 2008.","05/01/09", "http://www.simo.ifema.es/es/portal.do?IDM=20&NM=1","","")
noticias[6]= new noticia("Nueva Sede AKCELWARE SL","Gracias a la colaboraciópn del vivero de empresas de la Universidad Carlos III de Madrid abrimos nueva sede en el nuevo parque tecnológico de Leganés Madrid, Av. Gregorio Peces Barbas Nº 1","20/02/09", "http://www.leganestecnologico.es/","","")
noticias[5]= new noticia("Entrevista al CTO de AKCELWARE SL","Entrevista publicada en la revista electrónica de MADRID+D al antiguo CTO de AKCELWARE ahora COO","12/03/09","http://www.madrimasd.org/cienciaysociedad/entrevistas/revista-madrimasd/detalleEmpresa.asp?id=197","","")
noticias[4]= new noticia("Estamos en las EBT's Uniemprendia","Como finalistas del concurso Uniemprendia aparecemos en los proyectos realizados por Uniemprendia","04/05/09","http://www.uniemprendia.es","","")
noticias[3]= new noticia("AKCELWARE SL empresa finalista del Premio JEI/SPINOFF09","AKCELWARE entre las empresas finalistas del concurso de spin-off JEI/SPINOFF09 que se celebrará el Jueves 7 de Mayo en Zaragoza","05/05/09","http://www.jovenempresainnovadora.com/blog/","","")
noticias[2]= new noticia("AKCELWARE SL saca a la venta las primeras IP cores","AKCELWARE pone a disposición de los clientes nuevos IP cores importantes para el desarrollo de sistemas digitales","15/06/09","http://www.akcelware.es/ip_req.html","","")
noticias[1]= new noticia("AKCELWARE SL en el SIMO Network 2009","AKCELWARE SL con stand (9A33) en el SIMO 2009: ya era hora!!!","22/09/09","http://www.simo.ifema.es","","")
noticias[0]= new noticia("NUEVA TARJETA GIDEL INTERFACE PARA ANALIZADORES L&Oacute;GICOS","La nueva placa hija PSDB_LA aporta el necesario interface entre las placas de GIDEL y un analizador externo via conectores Mictor y otros standards","22/03/10","http://www.gidel.com","","")

var det = false
var hayIma, claseIma
function escribe(){
document.write ('<div id="mami" style="width:' + ancho + 'px; 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 +'px; width:' + ancho + 'px; height:' + alto + 'px;  ">')
document.write ('<div class="titular">')
document.write (noticias[0].titular)
document.write ('</div>')
if(noticias[0].imagen != null){
	hayIma = true
	claseIma = 'imagen'
	}
else{
	hayIma = false
	claseIma = 'noImagen'
	}
document.write ('<div class="' + claseIma + '">')
document.write ('<img src="' + noticias[0].imagen + '">')
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="' + destino + '">más información...</a>')
	}
document.write ('</div>')
document.write ('<div id="dos" style="top:' + (alto*2) +'px; width:' + ancho + 'px; height:' + alto + 'px; ">')
document.write ('<div class="titular">')
document.write (noticias[1].titular)
document.write ('</div>')
if(noticias[1].imagen != null){
	hayIma = true
	claseIma = 'imagen'
	}
else{
	hayIma = false
	claseIma = 'noImagen'
	}

document.write ('<div class="' + claseIma + '">')
document.write ('<img src="' + noticias[1].imagen + '">')
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 = "' + destino + '">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 + "px"
	document.getElementById('dos').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
	if(noticias[cont].imagen != null){
		document.getElementById('dos').childNodes[1].firstChild.src = noticias[cont].imagen
		document.getElementById('dos').childNodes[1].className = 'imagen'
		}
	else{
		document.getElementById('dos').childNodes[1].className = 'noImagen'
		}
	if(poneFecha == true){
	document.getElementById('dos').childNodes[2].firstChild.nodeValue  = noticias[cont].fecha
	}
	document.getElementById('dos').childNodes[3].firstChild.nodeValue  = noticias[cont].texto
		if(masInfo == true){
		document.getElementById('dos').childNodes[4].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 + "px"
		document.getElementById('uno').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
		if(noticias[cont].imagen != null){
		document.getElementById('uno').childNodes[1].firstChild.src = noticias[cont].imagen
		document.getElementById('uno').childNodes[1].className = 'imagen'
		}
	else{
		document.getElementById('uno').childNodes[1].className = 'noImagen'
		}
		if(poneFecha == true){
		document.getElementById('uno').childNodes[2].firstChild.nodeValue  = noticias[cont].fecha
		}
		document.getElementById('uno').childNodes[3].firstChild.nodeValue  = noticias[cont].texto
		if(masInfo == true){
		document.getElementById('uno').childNodes[4].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 + "px"
		document.getElementById('dos').style.top = pos2 + "px"
		}
	}
tiempo = window.setTimeout('escrolea()',50)
}
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 + 'px;font-weight:bold}')
document.write ('.texto{')
document.write ('color:' + colTexto + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamTexto + 'px;}')
if(poneFecha == true){
document.write ('.fecha{')
document.write ('color:' + colFecha +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamFecha + 'px;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 + 'px;}')
document.write ('.imagen{')
document.write ('text-align:' + alinImagen + ';')
document.write ('margin: ' + margImagen + 'px;}')
document.write ('.noImagen{display:none;}')
document.write ('</style>')
