numero_actual=1;
boton_actual=1;
numero_de_botones=3;
myImage = new Image() 

function cursor_encima(objeto) {
//alert(objeto);
objeto.src="imagenes/boton_on.gif";
}

function cursor_afuera(objeto) {
//alert(objeto);
objeto.src="imagenes/boton_off.gif";
}

function cambiar(imagen_nueva,boton_actual) {
// esta funcion cambia la imagen rotativa
 imagen_nueva="imagenes/"+imagen_nueva;
 document.getElementById("rotativo").src=imagen_nueva;
 //alert(boton_actual);
 for (i=1;i++;i<numero_de_botones) {
 	eliminar=i-1;
 	if (eliminar==boton_actual) {
		document.getElementById("boton0"+eliminar).src="imagenes/boton_on.gif";
		} else {
		document.getElementById("boton0"+eliminar).src="imagenes/boton_off.gif";
		}
 }
}

function aumentar() {
if (numero_actual<numero_de_botones) {
numero_actual=numero_actual+1;
} else {
numero_actual=1;
}
// aqui cambio la imagen
 imagen_nueva="imagenes/banner0"+numero_actual+".jpg";
// tambien cambio el boton numero #
	if (numero_actual>1) {
	numero_anterior=numero_actual-1;
	//alert(numero_anterior);
	} else {
	numero_anterior=numero_de_botones;
	}
  document.getElementById("boton0"+numero_anterior).src="imagenes/boton_off.gif";
  document.getElementById("boton0"+numero_actual).src="imagenes/boton_on.gif";
//alert(imagen_nueva);
 document.getElementById("rotativo").src=imagen_nueva;
 clearTimeout(timerID);
 timerID = setTimeout("aumentar()", 1000*5);
}

function disminuir() {
if (numero_actual>1) {
numero_actual--;
} else {
numero_actual=numero_de_botones;
}
// aqui cambio la imagen
 imagen_nueva="imagenes/banner0"+numero_actual+".jpg";
 // tambien cambio el boton numero #
	if (numero_actual<numero_de_botones) {
	numero_anterior=numero_actual+1;
	//alert(numero_anterior);
	} else {
	numero_anterior=1;
	}
  document.getElementById("boton0"+numero_anterior).src="imagenes/boton_off.gif";
  document.getElementById("boton0"+numero_actual).src="imagenes/boton_on.gif";
//alert(imagen_nueva);
 document.getElementById("rotativo").src=imagen_nueva;
}

timerID = setTimeout("aumentar()", 1000*5);

// para cambiar el texto de abajo
function mostrar_texto (ver_esta) {
	//alert("ver esta:"+ver_esta);
	document.getElementById("texto0"+ver_esta).style.display="";
	//pero tambien ocultamos los otros
	 for (i=1;i++;i<3) {
		 actual=i-1;
		 //alert("contador: "+actual);
 	  if (ver_esta!=actual) {
		document.getElementById("texto0"+actual).style.display="none";
		}
 	}
}
