//Ã§testÃ±
// varibles comunes a todas las funciones
var botones = Array();
var btnActual = ""; //boton que actualmente esta en hover, es para saber que no debo cambiarle el estado
function cache(){
	startList();
	
 	//agrego los listener a las imÃ¡genes
	cantidad = 10;
	if(window.addEventListener){
		for (i=1;i<cantidad;i++){
			if (document.images['btn_'+i]){
				document.images['btn_'+i].addEventListener('mouseover', rollOver, false);
				document.images['btn_'+i].addEventListener('mouseout', rollOut, false);
			}
		}
	}else{
		for (i=1;i<cantidad;i++){
			if (document.images['btn_'+i]){
				document.images['btn_'+i].attachEvent('onmouseover', rollOver, false);
				document.images['btn_'+i].attachEvent('onmouseout', rollOut, false);
			}
		}
	}
}
// rollover o rollout sobre los botones del menÃº
function rollOver(e){
	if (window.addEventListener){
		imagen = e.target
	}else{
		imagen = e.srcElement;
	}
	imagen.src = botones[imagen.name+"_hover"].src;
}
function rollOut(e){
	if (window.addEventListener){
		imagen = e.target
	}else{
		imagen = e.srcElement;
	}
	imagen.src = botones[imagen.name].src; //cambio la imagen solo si no es el boton
}
//al cargar inicializo todo
if(window.addEventListener){ // Mozilla, Netscape, Firefox
	window.addEventListener('load', cache, false);
} else { // IE
	window.attachEvent('onload', cache);
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("idio");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {
			node.onmouseover=function() {
			this.className+=" over";
			}
			node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
			}
			}
		}
	}
}