// JavaScript Document
var ancho = 138 //anchura del cuadro
var alto = 250 //altura del cuadro
var marco = 0 //escribe 0 si no quieres borde
var fondo = '' //color de fondo del cuadro
var pausilla = 8000 //tiempo de la pausa entre noticia en milisegundos (2000 = 2 segundos)
var destino = "_blank" //_blank para abrir enlaces en nueva ventana, _self en la misma.
var cursor = "default;"
var colTitular = '#993300' //color del texto del titular
var colTexto = '#666666' // 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 todos los textos 
var tamTitular = '12' //tamaño de la fuente del titular
var tamTexto = '11' //tamaño de la fuente del texto de la noticia
var tamFecha = '9' // tamaño de la fuente de la fecha
var tamEnlace = '11' // tamaño de la fuente del enlace 
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,imagen,fecha,enlace,destino){
	this.titular = titular
	this.texto = texto
	this.imagen = imagen //agregado por mi, para poner una imagen 4.7.09
	this.fecha= fecha
	this.enlace = enlace
	this.destino = destino
}
var noticias = new Array()

noticias[0]= new noticia("Las Animas y Quimixto","You'll enjoy a continental breakfast as you pass by the skyline of Puerto Vallarta, making for some wonderful photos, on your way to Los Arcos Marine Park, where you'll enjoy some of the best snorkeling in Puerto Vallarta.","http://www.propacifico.com/images/fotos_paseos/fotosmini/animas_mini.jpg","2008-07-25","http://www.propacifico.com/ing/activities_puerto_vallarta/boat_cruise_puerto_vallarta/las_animas_and_quimixto.php/","_blank")
noticias[1]= new noticia("Birds of Paradise","If you are vacationing in Puerto Vallarta and you love birds, count yourself lucky! In this paradise there are nearly 350 bird species in varied ecosystems and habitats.","http://www.propacifico.com/images/fotos_paseos/fotosmini/aves_mini.jpg","2008-07-25","http://www.propacifico.com/ing/activities_puerto_vallarta/animal_contact_puerto_vallarta/bird_watching.php/","_blank")
noticias[2]= new noticia("Whale watching","Due to the fact that whales spend most of their lives underwater, the first studies conducted were performed on animals that were stranded or caught during the whaling era.","http://www.propacifico.com/images/fotos_paseos/fotosmini/ballenas_mini.jpg","2008-07-25","http://www.propacifico.com/ing/activities_puerto_vallarta/animal_contact_puerto_vallarta/whale_watching.php/","_blank")
noticias[3]= new noticia("Titulo noticia","texto..","http://www.propacifico.com/images/fotos_paseos/fotosmini/ballenas_mini.jpg","fecha","http://www.propacifico.com/index.php/","_blank")
//noticias[4]= new noticia("Titulo noticia","texto..","fecha","http://www.manuellepe.net/index.php/","_blank")
//noticias[5]= new noticia("Titulo noticia","texto..","fecha","http://www.manuellepe.net/index.php/","_blank")
//noticias[6]= new noticia("Titulo noticia","texto..","fecha","http://www.manuellepe.net/index.php/","_blank")
//noticias[7]= new noticia("Titulo noticia","texto..","fecha","http://www.manuellepe.net/index.php/","_blank")
//noticias[8]= new noticia("Titulo noticia","texto..","fecha","http://www.manuellepe.net/index.php/","_blank")

var det = false
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 + 'px" 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>')
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>')
document.write ('<div class="foto"><img src="')
document.write (noticias[0].imagen)
document.write ('" width="112" height="44" border="0" alt="Puerto Vallarta" class="foto" /></div>')
if(masInfo == true){
	document.write ('<a class="enlace" href="')
	document.write (noticias[0].enlace)
	document.write ('" target="' + destino + '">More information</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>')
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>')
document.write ('<div class="foto"><img src="')
document.write (noticias[1].imagen)
document.write ('" width="112" height="44" border="0" alt="Puerto Vallarta" class="foto" /></div>')
if(masInfo == true){
	document.write ('<a class="enlace" href="')
	document.write (noticias[1].enlace)
	document.write ('" target = "' + destino + '">More information</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(poneFecha == true){
	document.getElementById('dos').childNodes[1].firstChild.nodeValue  = noticias[cont].fecha
	}
	document.getElementById('dos').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
	document.getElementById('dos').childNodes[3].firstChild.nodeValue  = noticias[cont].imagen
	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(poneFecha == true){
		document.getElementById('uno').childNodes[1].firstChild.nodeValue  = noticias[cont].fecha
		}
		document.getElementById('uno').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
		document.getElementById('uno').childNodes[3].firstChild.nodeValue  = noticias[cont].imagen
		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()',800)
	}
}
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;}')
document.write ('.imagen{')
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 ('</style>')

// -- Asi se enlaza en la pagina donde se quiere ver -- //
//
//<script src="../_js/scroll.js" type="text/javascript">< /script>
//</head>
//<body onload="escrolea()">
//<center>
//    <script>escribe()< /script>
//</center>
//</body>