
NS4 = (document.layers)? true:false
IE4 = (document.all)? true:false
DOM = ((document.getElementById)&&(!IE4))?true:false;

function RollOver(nombre,direccion)
        {
 		nombre.src= direccion;
        }
		
function init() 
{
	if (IE4)
	{
	for(i=1;i<10;i++)	
		{eval("textos"+i+"=texto"+i+".style;");}
	}
	else if (NS4)
	{
	for(i=1;i<10;i++)	
		{eval("textos"+i+"=document.texto"+i+";");}
	}
	else
	{
	textos1=document.getElementById("texto1");
	textos2=document.getElementById("texto2");
	textos3=document.getElementById("texto3");
	textos4=document.getElementById("texto4");
	textos5=document.getElementById("texto5");
	textos6=document.getElementById("texto6");
	textos7=document.getElementById("texto7");
	}
}

function init2()
{
	if (IE4)
	{
	boton1=btn1.style;
	boton2=btn2.style;
	boton3=btn3.style;
	boton4=btn4.style;
	boton5=btn5.style;
	boton6=btn6.style;
	}
	else if (NS4)
	{
	boton1=document.btn1;
	boton2=document.btn2;
	boton3=document.btn3;
	boton4=document.btn4;
	boton5=document.btn5;
	boton6=document.btn6;
	}
	else
	{
	boton1=document.getElementById("btn1");	
	boton2=document.getElementById("btn2");
	boton3=document.getElementById("btn3");
	boton4=document.getElementById("btn4");
	boton5=document.getElementById("btn5");
	boton6=document.getElementById("btn6");
	}
}

function visibilidad (index) 
{
if(IE4)
	{
	if(index!=2000)
			{for(i=1;i<10;i++)
				{
				eval("textos"+i+".visibility='hidden';");
				}
			eval("textos"+index+".visibility='visible';");
			}
	else
			{
			for(i=1;i<10;i++)
				{
				eval("textos"+i+".visibility='hidden';");
				}
			}
	}
else if (NS4)
	{
	
	if(index!=2000)
	{
		for(i=1;i<10;i++)
			{
			eval("textos"+i+".visibility='hidden';");
			}
		eval("textos"+index+".visibility='visible';");
	}
	else
		{
		for(i=1;i<10;i++)
		{
		eval("textos"+i+".visibility='hidden';");
		}	
		}
	}
else 
	{
	
	if(index!=2000)
	{for(i=1;i<10;i++)
		{
		eval("textos"+i+".style.visibility='hidden';");
		}
		eval("textos"+index+".style.visibility='visible';");
	}
	else
		{
		for(i=1;i<10;i++)
			{
			eval("textos"+i+".visibility='hidden';");
			}	
		}
	}
}
var tiempo;
var contador=0;
function time(i)
{
if(i==0)
	{clearTimeout(tiempo);
	contador=0;
	}
else 
	contador++;
if (contador==5)
	{visibilidad(2000);
	clearTimeout(tiempo);}
else
	{tiempo=setTimeout("time(1)",2000);}
}
var tiempo1;
var tiempo2;
var tiempo3;
var tiempo4;
var tiempo5;
var tiempo6;
function MoverAbajo(tmove)
        {
		if(tmove==boton1)clearTimeout(tiempo1);
		if(tmove==boton2)clearTimeout(tiempo2);
		if(tmove==boton3)clearTimeout(tiempo3);
		if(tmove==boton4)clearTimeout(tiempo4);
		if(tmove==boton5)clearTimeout(tiempo5);
		if(tmove==boton6)clearTimeout(tiempo6);
        tmove.ypos = parseInt(tmove.top);
		if(tmove.ypos==4)
                {if(tmove==boton1)clearTimeout(tiempo1);
				if(tmove==boton2)clearTimeout(tiempo2);
				if(tmove==boton3)clearTimeout(tiempo3);
				if(tmove==boton4)clearTimeout(tiempo4);
				if(tmove==boton5)clearTimeout(tiempo5);
				if(tmove==boton6)clearTimeout(tiempo6);}
        else
                {
                tmove.ypos= (tmove.ypos)+2;
                tmove.top = tmove.ypos;
                if(tmove==boton1)tiempo1=setTimeout("MoverAbajo(boton1)",100);
				if(tmove==boton2)tiempo2=setTimeout("MoverAbajo(boton2)",100);
				if(tmove==boton3)tiempo3=setTimeout("MoverAbajo(boton3)",100);
				if(tmove==boton4)tiempo4=setTimeout("MoverAbajo(boton4)",100);
				if(tmove==boton5)tiempo5=setTimeout("MoverAbajo(boton5)",100);
				if(tmove==boton6)tiempo6=setTimeout("MoverAbajo(boton6)",100);
                }
        }
var tiempoa1;
var tiempoa2;
var tiempoa3;
var tiempoa4;
var tiempoa5;
var tiempoa6;	
function MoverArriba(tmove2)
        {
 		if(tmove2==boton1)clearTimeout(tiempoa1);
		if(tmove2==boton2)clearTimeout(tiempoa2);
		if(tmove2==boton3)clearTimeout(tiempoa3);
		if(tmove2==boton4)clearTimeout(tiempoa4);
		if(tmove2==boton5)clearTimeout(tiempoa5);
		if(tmove2==boton6)clearTimeout(tiempoa6);
        tmove2.ypos = parseInt(tmove2.top);
		if(tmove2.ypos==0)
                {if(tmove2==boton1)clearTimeout(tiempoa1);
				if(tmove2==boton2)clearTimeout(tiempoa2);
				if(tmove2==boton3)clearTimeout(tiempoa3);
				if(tmove2==boton4)clearTimeout(tiempoa4);
				if(tmove2==boton5)clearTimeout(tiempoa5);
				if(tmove2==boton6)clearTimeout(tiempoa6);
				}
        else
                {
                tmove2.ypos= (tmove2.ypos)-2;
                tmove2.top = tmove2.ypos;
                if(tmove2==boton1)tiempoa1=setTimeout("MoverArriba(boton1)",100);
				if(tmove2==boton2)tiempoa2=setTimeout("MoverArriba(boton2)",100);
				if(tmove2==boton3)tiempoa3=setTimeout("MoverArriba(boton3)",100);
				if(tmove2==boton4)tiempoa4=setTimeout("MoverArriba(boton4)",100);
				if(tmove2==boton5)tiempoa5=setTimeout("MoverArriba(boton5)",100);
				if(tmove2==boton6)tiempoa6=setTimeout("MoverArriba(boton6)",100);
                }
        }
function move(Obj,x,y) {
	Obj.xpos = parseInt(Obj.left);
	Obj.ypos = parseInt(Obj.top);
	Obj.xpos = x;
	Obj.ypos = y;
	Obj.left = Obj.xpos;
	Obj.top = Obj.ypos;
}
function vision(divName,accion)
	{	
	if(IE4)
		{
		if(accion)
			divName.style.visibility = "visible";
		else
			divName.style.visibility = "hidden";
		}	
	else if(NS4)
		{
		if(accion)
			divName.visibility = "show";

		else
			divName.visibility = "hide";
		}
	else 
	{
		if(accion)
			divName.style.visibility = "visible";

		else
			divName.style.visibility = "hidden";
	}
}