// JavaScript Document
/*****************************************************************************
Scroll de noticias. Script creado por Tunait! (21/8/2003)
Última modificación 27/3/04 se añade la opción de omitir las fechas
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 = 166 //anchura del cuadro
var alto = 63 //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 = '#000000' // color del texto de la noticia
var fuente = "Tahoma" //fuente para los textos 
var tamTitular = '13' //tamaño de la fuente del titular
var tamTexto = '12' //tamaño de la fuente del texto de la noticia

function noticia(titular,texto)
	{
	this.titular = titular
	this.texto = texto
	}
var noticias = new Array()

noticias[0]= new noticia("Novedades","<a class='enlacesSub' href='/Maquinaria/Pistolas_Termofusibles.htm'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='/Materiales/Adhesivos_Termofusibles.htm'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[1]= new noticia(" Ofertas ","<span class='enlacesSub'>No olvide visitar nuestras <a class='enlacesSub' href='#'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
noticias[2]= new noticia("Novedades","<a class='enlacesSub' href='/Maquinaria/Pistolas_Termofusibles.htm'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='/Materiales/Adhesivos_Termofusibles.htm'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[3]= new noticia(" Ofertas ","<span class='textoWeb'>No olvide visitar nuestras <a class='enlacesSub' href='#'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
noticias[4]= new noticia("Novedades","<a class='enlacesSub' href='/Maquinaria/Pistolas_Termofusibles.htm'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='/Materiales/Adhesivos_Termofusibles.htm'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[5]= new noticia(" Ofertas ","<span class='textoWeb'>No olvide visitar nuestras <a class='enlacesSub' href='#'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
noticias[6]= new noticia("Novedades","<a class='enlacesSub' href='/Maquinaria/Pistolas_Termofusibles.htm'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='/Materiales/Adhesivos_Termofusibles.htm'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[7]= new noticia(" Ofertas ","<span class='textoWeb'>No olvide visitar nuestras <a class='enlacesSub' href='#'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
/* noticias[0]= new noticia("Novedades","<a class='enlacesSub' href='Maquinaria/Pistolas_Termofusibles.htm' target='principal'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='Materiales/Adhesivos_Termofusibles.htm' target='principal'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[1]= new noticia(" Ofertas ","<span class='enlacesSub'>No olvide visitar nuestras <a class='enlacesSub' href='Ofertas/Ofertas.htm' target='principal'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
noticias[2]= new noticia("Novedades","<a class='enlacesSub' href='Maquinaria/Pistolas_Termofusibles.htm' target='principal'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='Materiales/Adhesivos_Termofusibles.htm' target='principal'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[3]= new noticia(" Ofertas ","<span class='textoWeb'>No olvide visitar nuestras <a class='enlacesSub' href='Ofertas/Ofertas.htm' target='principal'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
noticias[4]= new noticia("Novedades","<a class='enlacesSub' href='Maquinaria/Pistolas_Termofusibles.htm' target='principal'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='Materiales/Adhesivos_Termofusibles.htm' target='principal'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[5]= new noticia(" Ofertas ","<span class='textoWeb'>No olvide visitar nuestras <a class='enlacesSub' href='Ofertas/Ofertas.htm' target='principal'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
noticias[6]= new noticia("Novedades","<a class='enlacesSub' href='Maquinaria/Pistolas_Termofusibles.htm' target='principal'><font color='#008000'>Pistolas</font></a> y <a class='enlacesSub' href='Materiales/Adhesivos_Termofusibles.htm' target='principal'><font color='#008000'>Adhesivos Termofusibles</font></a> Holtmelt.")
noticias[7]= new noticia(" Ofertas ","<span class='textoWeb'>No olvide visitar nuestras <a class='enlacesSub' href='Ofertas/Ofertas.htm' target='principal'><font color='#008000'>Ofertas</font></a>. Se renuevan mensualmente.</span>")
*/
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 + ' height:' + alto + 'px;  ">')
document.write ('<div class="titular">')
document.write (noticias[0].titular)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[0].texto)
document.write ('</div>')
document.write ('</div>')
document.write ('<div id="dos" style="top:' + (alto*2) +'; width:' + ancho + ' height:' + alto + 'px; ">')
document.write ('<div class="titular">')
document.write (noticias[1].titular)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[1].texto)
document.write ('</div>')
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
	document.getElementById('dos').childNodes[1].firstChild.nodeValue  = noticias[cont].texto
	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
		document.getElementById('uno').childNodes[1].firstChild.nodeValue  = noticias[cont].texto
		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()',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 + ';font-weight:bold}')
document.write ('.texto{')
document.write ('color:' + colTexto + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamTexto + ';}')
document.write ('</style>')