function tktiker(obj,xini,yini,retardo,arraytexto,ancho,letraclase,anchoclase,colorclase,colorclase2,colorfondo){
	this.obj = obj;
	this.xini = xini;
	this.yini = yini;
	this.ancho= ancho;
	this.letraclase = letraclase;
	this.anchoclase = anchoclase;
	this.colorclase = colorclase;
	this.colorclase2 = colorclase2;
	this.colorfondo = colorfondo;
	if (navigator.appVersion.indexOf("WinNT")!=-1) {retardo*=2};
	this.retardo = retardo;
	this.texto = new Array();
	this.links = new Array();
	var cont=0;
	for (var i=0; i<arraytexto.length; i++){
		this.texto[cont] = arraytexto[i];
		this.links[cont] = "javascript:void(null)";
		cont++;
	}
	this.ini=iniciaTikerazo;
	this.cambiate=cambiaTikerazo;
	this.ini();
}

function cambiaTikerazo(cual){
	var acual = (this.links.length-1==cual) ? 0 : cual+1;
	var texto="<marquee behavior=scroll loop=1 scrolldelay="+this.retardo+" width="+this.ancho+" onfinish="+this.obj+".cambiate("+acual+")><font style=font-size:"+this.anchoclase+";font-family:"+this.letraclase+";text-decoration:none;color:#"+this.colorclase+">"+this.texto[acual]+"</font></marquee>";	
	eval("td"+this.obj+"capatik.fill('"+texto+"')");
}

function iniciaTikerazo(){
	ie6 = (document.all) ? true : false;
	ns4 = (document.layers) ? true : false;
	ns6 = (document.getElementById && !document.all) ? true : false;
	
	if (ns4||ns6){
		var texto = '<APPLET codeBase="." code="tiker.ElTiker.class" height=20 id="ElTiker" width='+this.ancho+' MAYSCRIPT>';
		texto += '<PARAM NAME="retardo" VALUE="'+this.retardo+'">';
		texto += '<PARAM NAME="fuente" VALUE="'+this.letraclase+'">';
		texto += '<PARAM NAME="tamanio" VALUE="'+this.anchoclase+'">';
		texto += '<PARAM NAME="colorfondo" VALUE="'+this.colorfondo+'">';
		texto += '<PARAM NAME="colortexto" VALUE="'+this.colorclase+'">';
		texto += '<PARAM NAME="colortextoon" VALUE="'+this.colorclase2+'">';
		texto += '<PARAM NAME="max" VALUE="'+this.texto.length+'">';
		for (var i = 0; i < this.texto.length; i++){
			texto += '<PARAM NAME="texto'+(i+1)+'" VALUE="'+this.texto[i]+'">';
			// para la URL en java necesitamos el protocolo, etc...
		//	var antes = location.href.substring(0,location.href.lastIndexOf("/")+1);
			var antes='';
			texto += '<PARAM NAME="url'+(i+1)+'" VALUE="'+antes+''+this.links[i]+'">';
		}
		texto += '<PARAM NAME="target" VALUE="_self">';
		texto += '</APPLET>';
	} else if (ie6){
		var texto="<marquee behavior=scroll loop=1 scrolldelay="+this.retardo+" width="+this.ancho+" onfinish="+this.obj+".cambiate(0)><font style='font-size:"+this.anchoclase+";font-family:"+this.letraclase+";text-decoration:none;color:#"+this.colorclase+"'>"+this.texto[0]+"</font></marquee>";
	}
	tkCreator(this.obj+"capatik",null,this.xini,this.yini,this.ancho,null,null,null,110,texto,'yes');
}

function abrirFichaNNLL(id, fuente)
{
	var nombre = "ficha";
	var posicion = "toolbar=no,location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=637, height=347,left="+(200 + (screen.availWidth - 700)/2)+",top=" + ((screen.availHeight - 200)/2);
	
	newwin = window.open("http://catalogo.grupo-sm.com/ficha.asp?idinterno=ES" + id + "&Fuente=" + fuente , "ficha",posicion );
	setTimeout('newwin.focus();',250);
}

