/* -------------------------- N O T I C I A S -------------------------- */

// Utype
//  0 -> vertical scrolling
//  1 -> horizontal scrolling from left
//	2 -> horizontal scrolling from right
//  3 -> with cursor
var Utype=0;
// cursor for Utype 3, for example: "|" or "_" 
var Ucursor="<div class='bodytext'> _ </div>";
// Box dimensions
var Uwidth=150;
var Uheight=255; //190
// Background color
var Ubgcolor="#E0E8F0";
// Background Image, if no, put ''
var Ubackground='';
// Speed
var Uspeed= 100;   //1000000000000000000 o 100  Entre mas grande la velocidad en más lenta
// stopping time (News), put 0 else
var Udelay=20000;
// first index of array to start
var Ufirst=0; //Noticia que se debe mostrar primero
// Array of messages
var Umsgs=new Array()

//Umsgs[0]="<b>Horario de verano.</b><p> Durante la semana del 26 al 30 de octubre USA continuará con el horario de verano, por lo que en <b>merkalink.com</b> en Laredo, Texas se recibirán tus compras y realizarán las importaciones con el horario anterior hasta el próximo lunes 2 de noviembre. <p> Para más información por favor comunicate al 01 800 614 76 22 o vía chat.";
Umsgs[0]="<br><b>¡merkalink.com está contigo!</b>  <p>En apoyo a tu economía <b>merkalink.com </b> continúa con sus precios bajos por almacenaje reflejados directamente en facturación.";
Umsgs[1]="<br><b>Tradelink. </b><p> El servicio de importación comercial para envíos de gran volúmen, artículos repetitivos o mercancía paletizada con valor superior a $1,000.00 dólares.";
Umsgs[2]="<br><b>¡Bajan impuestos!</b> <p>A partir de Agosto la importación de calzado, talabartería, peletería artificial, prendas y accesorios de vestir textiles confeccionados que apliquen medidas de transición pagarán únicamente el 50.42%.";
Umsgs[3]="<br><b>MERKALINK.COM EN TWITTER.</b> <p>Ahora síguenos en Twitter en <a href='http://www.twitter.com/merkalink' target='_blank'>www.twitter.com/merkalink.</a>";


// The function
Ultimate(Utype,Umsgs,Ucursor,Uwidth,Uheight,Ubgcolor,Ubackground,Uspeed,Udelay,Ufirst);
// That's it !

/* -------------------------- N O T I C I A S   R O T A T O R I A S -------------------------- */


/*
	==============================================
	|				U.L.T.I.M.A.T.E				 |
	|					v070502					 |
	==============================================
	|			Powered by Influenzae			 |
	|		For Microsoft Internet Explorer	     |
	==============================================
*/

// Main function
function Ultimate(Utype,Umsgs,Ucursor,Uwidth,Uheight,Ubgcolor,Ubackground,Uspeed,Udelay,Ufirst) {
		
	document.write('<span id="Ubox" style="position:relative;width:'+Uwidth+';height:'+Uheight+';overflow:hiden;background-color:'+Ubgcolor+' ;background-image:url('+Ubackground+')">')
	document.write('<div align="left" style="position:absolute;width:'+Uwidth+';height:'+Uheight+';clip:rect(0 '+Uwidth+' '+Uheight+' 0);left:0;top:0"  onmouseover="Uspeed=3000" onmouseout="Uspeed='+Uspeed+'">')
	
	if (Utype==0) {		
		document.write('<div id="Utxt" style="position:absolute;width:'+Uwidth+';left:0;top:20;">') //El top indica posición donde inicia despliegue de noticia				
		document.write(Umsgs[Ufirst]);		
		Uscroll(Utxt,Umsgs,Uheight,Uspeed,Udelay,Ufirst);			
	}
	if (Utype==1) {
		document.writeln('<div id="Utxt"  style="position:absolute;width:'+Uwidth+';left:'+Uwidth+';top:0;">')
		document.write(Umsgs[Ufirst]);
		Uside(Utxt,Umsgs,Uwidth,Uspeed,Udelay,Ufirst);
	}
	if (Utype==2) {
		document.writeln('<div id="Utxt"  style="position:absolute;width:'+Uwidth+';left:'+(Uwidth*-1)+';top:0;">')
		document.write(Umsgs[Ufirst]);
		Ureverseside(Utxt,Umsgs,Uwidth,Uspeed,Udelay,Ufirst,false);
	}
	if (Utype==3) {
		document.writeln('<div id="Utxt"  style="position:absolute;width:'+Uwidth+';left:0;top:0;overflow:hiden;background-color:'+Ubgcolor+' ;">')
		document.write(Umsgs[Ufirst]);
		document.writeln('</div>')
		document.writeln('<div id="Umask"  style="position:absolute;width:'+Uwidth+';left:0;top:0;overflow:hiden;background-color:'+Ubgcolor+' ;">')
		document.write(Ucursor);
		Utouch(Utxt,Umask,Umsgs,Ucursor,Uwidth,Uspeed,Udelay,Ufirst,1,false);
	}
	document.write('</div>')
	document.write('</div>')
	document.write('</span>')
}

// Moves
function Uscroll(IDdiv,Umsgs,Uheight,Uspeed,Udelay,Ufirst){
	ttxt=eval(IDdiv);
	Ustep=eval(Ufirst);
	if (ttxt.style.pixelTop>0&&ttxt.style.pixelTop<=5){
	ttxt.style.pixelTop=0;
	setTimeout("Uscroll(ttxt,Umsgs,Uheight,Uspeed,Udelay,Ustep)",Udelay);
	return
	}
	else {
		if (ttxt.style.pixelTop>=ttxt.offsetHeight*-1){
		ttxt.style.pixelTop-=5
		setTimeout("Uscroll(ttxt,Umsgs,Uheight,Uspeed,Udelay,Ustep)",Uspeed);
		return
		}
		else {
		ttxt.style.pixelTop=10; //Delimita la distancia entre una noticia y otra
		if (Ustep>=Umsgs.length-1)
			Ustep=0
			else		
			Ustep++;
		ttxt.innerHTML=Umsgs[Ustep];
		Uscroll(ttxt,Umsgs,Ustep,Uspeed,Udelay,Ustep);
		}
	}
}

function Uside(IDdiv,Umsgs,Uwidth,Uspeed,Udelay,Ufirst){
	ttxt=eval(IDdiv);
	Ustep=eval(Ufirst);
	if (ttxt.style.pixelLeft>0&&ttxt.style.pixelLeft<=5){
	ttxt.style.pixelLeft=0;
	setTimeout("Uside(ttxt,Umsgs,Uwidth,Uspeed,Udelay,Ustep)",Udelay);
	return
	}
	else {
		if (ttxt.style.pixelLeft>=ttxt.offsetWidth*-1){
		ttxt.style.pixelLeft-=5
		setTimeout("Uside(ttxt,Umsgs,Uwidth,Uspeed,Udelay,Ustep)",Uspeed);
		return
		}
		else {
		ttxt.style.pixelLeft=Uwidth;
		if (Ustep>=Umsgs.length-1)
			Ustep=0
			else		
			Ustep++;
		ttxt.innerHTML=Umsgs[Ustep];
		Uside(ttxt,Umsgs,Uwidth,Uspeed,Udelay,Ustep);
		}
	}
}

function Ureverseside(IDdiv,Umsgs,Uwidth,Uspeed,Udelay,Ufirst,stop){
	ttxt=eval(IDdiv);
	Ustep=eval(Ufirst);
	if (ttxt.style.pixelLeft>0&&ttxt.style.pixelLeft<=5&&(!stop)) {
	setTimeout("Ureverseside(ttxt,Umsgs,Uwidth,Uspeed,Udelay,Ustep,true)",Udelay);
	return
	}
	else {
		if (ttxt.style.pixelLeft<ttxt.offsetWidth){
		ttxt.style.pixelLeft+=5;
		setTimeout("Ureverseside(ttxt,Umsgs,Uwidth,Uspeed,Udelay,Ustep)",Uspeed);
		return
		}
		else {
		ttxt.style.pixelLeft=Uwidth*-1;
		if (Ustep>=Umsgs.length-1)
			Ustep=0
			else		
			Ustep++;
		ttxt.innerHTML=Umsgs[Ustep];
		Ureverseside(ttxt,Umsgs,Uwidth,Uspeed,Udelay,Ustep);
		}
	}
}

function Utouch(IDdiv,IDmask,Umsgs,Ucursor,Uwidth,Uspeed,Udelay,Ufirst,Ufirstsens,stop){
	ttxt=eval(IDdiv);
	tmask=eval(IDmask);
	Ustep=eval(Ufirst);
	Usens=eval(Ufirstsens);
	if (tmask.style.pixelLeft>Uwidth){
	tmask.style.pixelLeft=Uwidth;
	setTimeout("Utouch(ttxt,tmask,Umsgs,Ucursor,Uwidth,Uspeed,Udelay,Ustep,-1)",Udelay);
	return
	}
	else if (tmask.style.pixelLeft>=-5&&tmask.style.pixelLeft<0&&(!stop)){
	tmask.style.pixelLeft=-5;
	if (Ustep>=Umsgs.length-1)
			Ustep=0
			else		
			Ustep++;
	ttxt.innerHTML=Umsgs[Ustep];
	setTimeout("Utouch(ttxt,tmask,Umsgs,Ucursor,Uwidth,Uspeed,Udelay,Ustep,1,true)",Udelay);
	return
	}
	else {
		tmask.style.pixelLeft+=(5*Usens);
		setTimeout("Utouch(ttxt,tmask,Umsgs,Ucursor,Uwidth,Uspeed,Udelay,Ustep,Usens)",Uspeed);
		return
	}
}
/*
	==============================================
	|				U.L.T.I.M.A.T.E				 |
	|					v070502					 |
	==============================================
	|			Powered by Influenzae			 |
	==============================================
*/




/*NoticiaEstatica();

function NoticiaEstatica()
{
	document.write('<span id="Ubox" style="position:relative;width:150;height:255;overflow:hiden;background-color:#E0E8F0">')
	document.write('<div align="left" style="position:absolute;width:150;height:255;clip:rect(0 150 255 0);left:0;top:0">')
	document.write('<div id="Utxt" style="position:absolute;width:150;left:0;top:10;">') //El top indica posición donde inicia despliegue de noticia				
	document.write('<font style="FONT-WEIGHT: normal;FONT-SIZE: 10px;COLOR: #333333;FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;TEXT-DECORATION: none"><b><center>Mantenimiento del sistema</center><p align="justify">Hoy a partir de las 20:00 hrs. y hasta las 06:00 hrs. de mañana se dará mantenimiento a nuestro sistema, por lo cual no se podrá tener acceso a las cuentas registradas ni al registro Merkalink. Disculpen las molestias y podremos seguirle dando servicio este sábado por la mañana.</p><center> ¡Gracias por su atención!<br> Merkalink.com</center></b></font>');		
	document.write('</div>')
	document.write('</div>')
	document.write('</span>')
}*/