// JavaScript Document

var ancho = 210 //anchura del cuadro
var alto = 500 //altura del cuadro
var marco = 0 //0 para que notenga marco (borde)
var fondo = '#FFFFFF' //color de fondo del cuadro #D1DBE4
var pausilla = 2000 //tiempo de la pausa en milisegundos (2000 = 2 segundos)
var destino = "_parent" //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 = '#003366' //color del texto del titular
var colTexto = '#FFFFFF' // color del texto de la noticia
var colFecha = 'black' //color del texto de la fecha
var colEnlace = '#333333' //color del texto del enlace#8E1624
var fuente = "Arial" //fuente para los textos 
var tamTitular = '13' //tamaño de la fuente del titular
var tamTexto = '2' //tamaño de la fuente del texto de la noticia
var tamFecha = '9' // tamaño de la fuente de la fecha
var tamEnlace = '9' // 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 = false //true para poner fecha. false para omitirla. Si no se quiere fecha, dejar las comillas vacías ""

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[0]= new noticia("RP3 es miembro de la NRF","../imagen/clientes/clientesPEQ/NRF.jpg" , "Diciembre 2006", "02a33noticias.htm" ,"_parent")
noticias[1]= new noticia("RP3 da la bienvenida al Big Show 2009","../imagen/clientes/clientesPEQ/NRF-2009peq.jpg" , "Diciembre 2006", "02a41noticias.html" ,"_parent")

noticias[2]= new noticia("Retail Business Intelligence","../imagen/clientes/clientesPEQ/cubo.jpg","Noviembre 2007","05aRBI.html","_parent")
noticias[3]= new noticia ("Warehouse Management System","../imagen/clientes/clientesPEQ/wms.jpg","Noviembre 2007", "05awms.html" ,"_parent")
noticias[4]= new noticia("Activo Fijo","../imagen/clientes/clientesPEQ/activofijo.jpg" , "Noviembre 2007", "05aActFijo.html" ,"_parent")

noticias[5]= new noticia("Tiendas MontClair se moderniza con RP3 Retail software","../imagen/clientes/clientesPEQ/mONTcLAIRE.jpg" , "Septiembre 2006", "02a31noticias.htm" ,"_parent")
noticias[6]= new noticia("BEBE CRECE IMPLEMENTA RP3 RETAIL SOFTWARE","../imagen/clientes/clientesPEQ/Bebecrece.jpg" , "Agosto 2006", "02a30noticias.htm" ,"_parent")
noticias[7]= new noticia("Tiendas la gloria implementa en Costa Rica, sistema de Credito Rp3","../imagen/clientes/clientesPEQ/tarjeta_LG.jpg","Junio 2006","02a28noticias.htm","_parent")
noticias[8]= new noticia ( "La Curacao: Lider Centroamericano", "../imagen/clientes/clientesPEQ/curacaoPEQ.jpg", "Enero 2006", "02a8noticias.htm" ,"_parent")
noticias[9]= new noticia("Zara se expande de la mano de	Siman en C.A","../imagen/clientes/clientesPEQ/simanPEQ.jpg","Febrero 2006","02a5noticias.htm","_parent")
noticias[10]= new noticia("RP3 incorpora Banca Virtual en el Portal de Banco Territorial","../imagen/clientes/clientesPEQ/bancoterritorialPEQ.jpg","Abril 2006","02a22noticias.htm","_parent")

noticias[11]= new noticia  ("RP3 implementa los sistemas de Punto de Ventas en la nueva tienda TRAKI de ISLA MARGARITA", "../imagen/clientes/clientesPEQ/logotrakiPEQ.jpg", "Febrero 2006", "02a26noticias.htm" ,"_parent")
noticias[12]= new noticia ("RP3 presente en la convención 2006 de la NRF en USA","../imagen/clientes/clientesPEQ/nrfPEQ.jpg" , "Enero 2006", "02a3noticias.htm" ,"_parent")
noticias[13]= new noticia ("RP3 lanza portal Web de CASA TOSI", "../imagen/clientes/clientesPEQ/casatosiPEQ.jpg" , "Enero 2006", "02a9noticias.htm","_parent")
noticias[14]= new noticia("Grandes Resultados de el Programa de Lealtad (CRM) en Tiendas La Gloria","../imagen/clientes/clientesPEQ/mundolagloriaPEQ.jpg" , "Mayo 2004", "02a23noticias.htm" ,"_parent") 
//noticias[16]= new noticia("Tiendas La Gloria implementa en Costa Rica, Sistema Contable Financiero RP3","../imagen/clientes/clientesPEQ/mundolagloriaPEQ.jpg","Mayo 2006","02a27noticias.htm","_parent")
//noticias[14]= new noticia("Radio Shack inicia expansion en Guatemala.", "../imagen/clientes/clientesPEQ/radioshackPEQ.jpg", "Agosto 2004", "02a7noticias.htm" ,"_parent")
//noticias[13]= new noticia("Metrocentro ya cuenta con su Prisma Moda","../imagen/clientes/clientesPEQ/prismamodaPEQ.jpg" , "Septiembre 2004", "02a15noticias.htm" ,"_parent")


var det = false
function escribe(){
document.write ('<div  id="mami" style="vertical-align: top; width:' + ancho + '; height:' + alto + '; position:relative;  overflow:hidden ">')
document.write('<table bgcolor="' + fondo + '" border = "' + marco + '" width="' + ancho + '" height="100%" ><tr><td valign="top"  width="' + ancho + '">')
// abre div uno
document.write ('<div id="uno" style="vertical-align:top; top:' + ( alto - 350 ) +'; width:' + ancho + '; height:250 ">')
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 ('<a href="')
document.write (noticias[0].enlace)
document.write ('" style="text-decoration:none"><img src="')
document.write (noticias[0].texto)
document.write ('" height="150" width="200" border = 0 ></a>')
document.write ('</div>')

if(masInfo == true){
	document.write ('<div>')	
	document.write ('<a class="enlace" href="')
	document.write (noticias[0].enlace)
	document.write ('" target="' + destino + '">Ampliar</a>')
	document.write ('</div>')	
	}
document.write ('<div>')
document.write ('<hr>')
document.write ('</div>')
document.write ('</div>')//cierra div uno

// abre div dos
document.write ('<div id="dos" style="vertical-align: top; top:' + ( alto - 120 ) +'; width:' + ancho + '; height:250 ">')
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 ('<a href="')
document.write (noticias[1].enlace)
document.write ('" style="text-decoration:none"><img src="')
document.write (noticias[1].texto)
document.write ('" height="150" width="200" border = 0 ></a>')
document.write ('</div>')
if(masInfo == true){
	document.write ('<div>')	
	document.write ('<a class="enlace" href="')
	document.write (noticias[1].enlace)
	document.write ('" target="' + destino + '">Ampliar</a>')
	document.write ('</div>')	
	}
document.write ('<div>')
document.write ('<hr>')
document.write ('</div>')
document.write ('</div>') // cierra div dos

//abre div tres
document.write ('<div id="tres" style="vertical-align: top; top:' + (alto + 100) +'; width:' + ancho + ' ; height:250 ">')

	document.write ('<div class="titular">')
	document.write (noticias[2].titular)
	document.write ('</div>')

	document.write ('<div class="fecha">')
	document.write (noticias[2].fecha)
	document.write ('</div>')

	document.write ('<div class="texto">')
	document.write ('<a href="')
	document.write (noticias[2].enlace)
		document.write ('" style="text-decoration:none"><img src="')
		document.write (noticias[2].texto)
	document.write ('" height="150" width="200" border = 0></a>')
	document.write ('</div>')
	
	if(masInfo == true){
		document.write ('<div>')	
		document.write ('<a class="enlace" href="')
		document.write (noticias[2].enlace)
		document.write ('" target="' + destino + '">Ampliar</a>')
		document.write ('</div>')	
		}

document.write ('<div>')
document.write ('<hr>')
document.write ('</div>')
document.write ('</div>') // cierra div tres

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()	 
	}
	
	
document.getElementById('tres').onmouseover =function(){
	det = true
	clearTimeout(tiempo)
	}
document.getElementById('tres').onmouseout =function(){
	det = false;
	clearTimeout(tiempo)
	escrolea()
	}	
	
}


var desp = 3

var cont = 2
var pos,pos2, pos3
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);
	pos3 = document.getElementById('tres').style.top
	pos3 = pos3.replace(/px/,"");
	pos3 = pos3.replace(/pt/,"");
	pos3 = new Number(pos3);
	pos -= desp
	pos2 -= desp
	pos3 -= desp

	if (pos <= desp && pos > -desp ){
		var contenidos = ""	
		document.getElementById('tres').style.top = alto + 8
		document.getElementById('tres').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
		if(poneFecha == true){
			document.getElementById('tres').childNodes[1].firstChild.nodeValue  = noticias[cont].fecha
			}
		document.getElementById('tres').childNodes[2].childNodes[0].childNodes[0].src = noticias[cont].texto
		document.getElementById('tres').childNodes[2].childNodes[0].href =  noticias[cont].enlace 
		//document.getElementById('tres').childNodes[2].childNodes[0].src = noticias[cont].texto
		//document.getElementById('tres').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
		if(masInfo == true){
			document.getElementById('tres').childNodes[3].childNodes[0].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 && pos2 > -desp){
			var contenidos = ""
			document.getElementById('uno').style.top = alto  + 8
			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].childNodes[0].childNodes[0].src = noticias[cont].texto
			document.getElementById('uno').childNodes[2].childNodes[0].href =  noticias[cont].enlace 
			//	document.getElementById('uno').childNodes[2].childNodes[0].src = noticias[cont].texto
			//document.getElementById('uno').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
			if(masInfo == true){
				document.getElementById('uno').childNodes[3].childNodes[0].href  = noticias[cont].enlace
			}					
			document.getElementById('dos').style.top = 0
			if(cont == noticias.length-1)
				{cont=0}
			else
				{cont++}
			pausa()
			return false
		}else{
		// la parte tercera
			if (pos3 <= desp && pos3 > -desp){
				var contenidos = ""					
				document.getElementById('dos').style.top = alto + 8
				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].childNodes[0].childNodes[0].src  = noticias[cont].texto
				document.getElementById('dos').childNodes[2].childNodes[0].href  = noticias[cont].enlace 
				//document.getElementById('dos').childNodes[2].childNodes[0].src = noticias[cont].texto
				//document.getElementById('dos').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
				if(masInfo == true){
					document.getElementById('dos').childNodes[3].childNodes[0].href  = noticias[cont].enlace
					}
											
				document.getElementById('tres').style.top = 0
				if(cont == noticias.length-1)
					{cont=0}
				else
					{cont++}
				pausa()
				return false
			} else{
			document.getElementById('uno').style.top = pos - 3
			document.getElementById('dos').style.top = pos2 -3
			document.getElementById('tres').style.top = pos3 -3
			}
			// fin de la parte tercera
		}
	}
tiempo = window.setTimeout('escrolea()',20)
}

var tiempo
function pausa()
{
clearTimeout(tiempo)
if (det == false){
	tiempo = setTimeout ('continuar()', pausilla)
	}
}
function continuar()
{
if(det == false)
	{escrolea()}
}

document.write('<style type="text/css">')
document.write ('#uno {')
document.write ('color: #006699;')
//document.write ('text-align: center;')
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 ('#tres {')
document.write ('color: #006699;')
document.write ('cursor:' + cursor + ";")
document.write ('position:absolute;}')
document.write ('.titular{')
document.write ('color:' + colTitular +';')
document.write ('text-align: left;')
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 ('text-decoration: none;')
document.write ('text-align: justify;')
document.write ('font-size:' + tamTexto + ';}')
if(poneFecha == true){
document.write ('.fecha{')
document.write ('color:' + colFecha +';')
//document.write ('text-align: left;')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamFecha + ';font-weight:none}')
}
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>')

