var len1=0; //Longitud de cadena 1 (efectoteclado1)
var velocidad=5;
var ititu=0;
var tituanimado="";
var dir=1;  //1= -->  2= <---

//-------------------------------------------------
//Pone la linea en blanco
//-------------------------------------------------
function limpialens(){
len1=0;
linea1.innerHTML="";
}
//-------------------------------------------------
//Efecto teclado en layer linea1
//-------------------------------------------------
function efectoteclado1(str){
if(len1<=str.length){
	linea1.innerHTML="<center><font size=1 face=verdana color=#FFFFCC>"+str.substring(0,len1)+"|</font></center>";
	len1++;
	setTimeout("efectoteclado1('"+str+"')",2);
}
else{
	linea1.innerHTML="<center><font size=1 face=verdana color=#FFFFCC>"+str.substring(0,str.length)+"</font></center>";
}
}

function textoverticalUP(){
	iescroller.direction="up";
}
function textoverticalDOWN(){
	iescroller.direction="down";
}

function pararscroll(){
	iescroller.scrollAmount=0;
}
function continuarscroll(){
	iescroller.scrollAmount=1;
}

function SetFecha(){
var Tm="";
var diasemana="";
var mes="";

fech=new Date();
if(fech.getDay()==1) diasemana="Lunes";
if(fech.getDay()==2) diasemana="Martes";
if(fech.getDay()==3) diasemana="Miercoles";
if(fech.getDay()==4) diasemana="Jueves";
if(fech.getDay()==5) diasemana="Viernes";
if(fech.getDay()==6) diasemana="Sabado";
if(fech.getDay()==7) diasemana="Domingo";

if(fech.getMonth()==0) mes="Enero";
if(fech.getMonth()==1) mes="Febrero";
if(fech.getMonth()==2) mes="Marzo";
if(fech.getMonth()==3) mes="Abril";
if(fech.getMonth()==4) mes="Mayo";
if(fech.getMonth()==5) mes="Junio";
if(fech.getMonth()==6) mes="Julio";
if(fech.getMonth()==7) mes="Agosto";
if(fech.getMonth()==8) mes="Septiembre";
if(fech.getMonth()==9) mes="Octubre";
if(fech.getMonth()==10) mes="Noviembre";
if(fech.getMonth()==11) mes="Diciembre";


dt=new Date(); 
hrs=dt.getHours();
mins=dt.getMinutes(); 
sec=dt.getSeconds(); 
Tm+=" "+((hrs<10)?"0":"") +hrs+":"; 
Tm+=((mins<10)?"0":"")+mins+":";
Tm+=((sec<10)?"0":"")+sec+" "; 
//Escribimos la fecha y hora en el layer
fecha.innerHTML="<font size=1 face=arial color=B,B,B>"+diasemana+", "+fech.getDate()+" de "+mes+" de "+fech.getYear()+"-"+Tm+"</font>";
setTimeout("SetFecha()",1000); 
}

//---------------------EFECTOS PARA EL IFRAME---------------------------------
function movstar(a,time){
movx=setInterval("mov("+a+")",time)
}
function movover(){
clearInterval(movx)
}
function mov(a){
scrollx=new_date.document.body.scrollLeft
scrolly=new_date.document.body.scrollTop
scrolly=scrolly+a
new_date.window.scroll(scrollx,scrolly)
}
function o_down(theobject){
object=theobject
while(object.filters.alpha.opacity>60){
object.filters.alpha.opacity+=-10}
}
function o_up(theobject){
object=theobject
while(object.filters.alpha.opacity<100){
object.filters.alpha.opacity+=10}
}
function wback(){
if(new_date.history.length==0){window.history.back()}
else{new_date.history.back()}
}

function opacidad_on(theobject){
object=theobject
while(object.filters.alpha.opacity>60){
object.filters.alpha.opacity+=-10
}
}

function opacidad_off(theobject){
object=theobject
while(object.filters.alpha.opacity<100){
object.filters.alpha.opacity+=10}
}

function redireccionar(opcion) {
	if (opcion=='home') {
	  var commandredir="location.href='default.asp'"
	  setTimeout(commandredir, 2000);
    }
	if (opcion=='return') {
	  var commandredir="history.back()"
	  setTimeout(commandredir, 2000);
    }
	if (opcion=='foro') {
	  var commandredir="location.href=foro.asp?pag=1"
	  setTimeout(commandredir, 2000);
    }			
}


//-------------------------------------------------
//Obtiene el Navegadordel cliente
//-------------------------------------------------

var navegador;

function devuelveNavegador()
{	
	if(document.all) //Internet Explorer
	{
		navegador=1;
		return navegador;
	}
	
	var ns6=document.getElementById&&!document.all //Gecko Browserrs
	if (ns6)
	navegador=2;
	return navegador;
	
	if(document.layers) //Netscape versiones 4 
	{
		navegador=3;
		return navegador;
	}
}

//---------------------------------------------------------------------------
//Realiza un cambio de color en un <a href> al pasar por encima con el raton:
//---------------------------------------------------------------------------

function efecto_Enlace(que_enlace,cuando)
{	
	if(cuando=="1") //Pasamos por encima con el raton
	{
		que_enlace.style.color="#425486";
		//que_enlace.style.color="#ffcc33";
	}
	else //Abandonamos 
	{
		que_enlace.style.color="#425486";
	}
}


