  var activado = new Array();
  var desactivado = new Array();
  for (i=0; i<=38; i++) {
    activado["menu"+i] = new Image();
    desactivado["menu"+i] = new Image();
	if(i>=37) { 
	activado["menu"+i].src = "http://d2.worldofhouse.es/images/worldofhouse.es/woh_"+i+"a.png"; 
	desactivado["menu"+i].src = "http://d2.worldofhouse.es/images/worldofhouse.es/woh_"+i+".png";
	} 
	
	/*else {
    activado["menu"+i].src = "http://d2.worldofhouse.es/images/worldofhouse.es/woh_"+i+"a.jpg";
    desactivado["menu"+i].src = "http://d2.worldofhouse.es/images/worldofhouse.es/woh_"+i+".jpg";
	}*/
  }

function act(nombreImagen) {
    document[nombreImagen].src=activado[nombreImagen].src;
}
function desact(nombreImagen) {
    document[nombreImagen].src=desactivado[nombreImagen].src;
}

function volver() {

for(j=1;j<=10;j++) {
		if(j%2==0) { 
		document.images["estrella" + j].src= "images/estrella2.jpg";
		} else {
		document.images["estrella" + j].src = "images/estrella.jpg";
		}
		
	}

}

function cambiar(nota) {

    for(i=1;i<=nota;i++) {
		if(i%2==0) { 
		document.images["estrella" + i].src  = "images/estrella2_a.jpg";
		} else {
		document.images["estrella" + i].src  = "images/estrella_a.jpg";
		}
		
	}
	
}

function cambiar_1 () {

    document.images["dj1"].src = "images/enlaces/djone/dj1_1a.jpg";

}

function volver_1() {

    document.images["dj1"].src = "images/enlaces/djone/dj1_1.jpg";


}
function cambiar_2 () {
  
    document.images["global"].src = "images/enlaces/global/global_1b.jpg";
	
}

function volver_2() {

    document.images["global"].src = "images/enlaces/global/global_1.JPG";
   

}

function cambiar_3 () {
  
    document.images["namala"].src = "images/enlaces/namala/namalab.png";
	
}

function volver_3() {

    document.images["namala"].src = "images/enlaces/namala/namala.jpg";
   

}

function cambiar_4 () {
  
    document.images["pepijuegos"].src = "images/enlaces/pepijuegos/logob.jpg";
	
}

function volver_4() {

    document.images["pepijuegos"].src = "images/enlaces/pepijuegos/logo.png";
   

}

function cambiar_25woh(posicion,nota) {
	
	if(nota==-1) {
	document.images["flecha"+ posicion + "_1"].src = "images/25woh/abajo2.png";
	}
	if(nota==3) {
    document.images["flecha"+ posicion + "_2"].src = "images/25woh/arriba2.png";
	document.images["flecha"+ posicion + "_3"].src = "images/25woh/arriba2.png";
	document.images["flecha"+ posicion + "_4"].src = "images/25woh/arriba2.png";
	}
		if(nota==2) {
    document.images["flecha"+ posicion + "_2"].src = "images/25woh/arriba2.png";
	document.images["flecha"+ posicion + "_3"].src = "images/25woh/arriba2.png";
	}
		if(nota==1) {
    document.images["flecha"+ posicion + "_2"].src = "images/25woh/arriba2.png";
	}
}

function volver_25woh(posicion) {

    document.images["flecha"+ posicion + "_1"].src = "images/25woh/abajo.png";
    document.images["flecha"+ posicion + "_2"].src = "images/25woh/arriba.png";
	document.images["flecha"+ posicion + "_3"].src = "images/25woh/arriba.png";
	document.images["flecha"+ posicion + "_4"].src = "images/25woh/arriba.png";

}


function transparenciaOn(obj, transp){
	document.images[obj].src = "http://d2.worldofhouse.es/images/worldofhouse.es/" + transp;

}

function transparenciaOff(obj){
	document.images[obj].src = "images/blank.gif";
}


function ajaxFunction2(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	var autor = document.FormComents.Autor.value;
	var contenido = document.FormComents.Contenido.value;
	var idnot = document.FormComents.IdNot.value;
	var ip = document.FormComents.IpUser.value;
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('ajaxcomment');
			var ajaxDisplay2 = document.getElementById('ajaxcomment2');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			ajaxDisplay2.innerHTML = '';
					}
	}

	var toSend = "";
	toSend += "autor=" + encodeURIComponent(autor);
	toSend += "&contenido=" + encodeURIComponent(contenido);
	toSend += "&idnot=" + encodeURIComponent(idnot);
	toSend += "&ip=" + encodeURIComponent(ip);
	
	ajaxRequest.open("POST", "enviar_comment.php", true);
	ajaxRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	ajaxRequest.send(toSend); 
}

function scrollWindow()
  {
  window.scrollTo(0,1000);
  }
  
  function ajax_25woh(nota,id,ip,id_member){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('ajaxDiv25_' + id);
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	
	var queryString = "?nota=" + nota + "&id=" + id + "&ip=" + ip +  "&id_member=" + id_member;
	ajaxRequest.open("GET", "enviar_votacion25.php" + queryString, true);
	ajaxRequest.send(null); 
}

var tiempo = new Date();
var tiempo_sec = tiempo.getTime();

function suggest_cadena_bus(){
	
	var ajax_suggest_bus;  // The variable that makes Ajax possible!
	
	var cadena = document.busqueda.palabra.value;
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajax_suggest_bus = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajax_suggest_bus = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajax_suggest_bus = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	
	// Create a function that will receive data sent from the server
	ajax_suggest_bus.onreadystatechange = function(){
		if(ajax_suggest_bus.readyState == 4){
			var suggest_bus_display = document.getElementById('mostrar_sugerencias_bus');
			suggest_bus_display.innerHTML = ajax_suggest_bus.responseText;
		}
	}

	
	var suggest_bus_toSend = "";
	suggest_bus_toSend += "cadena=" + encodeURIComponent(cadena);
     	
	ajax_suggest_bus.open("POST", "suggest_search.php", true);
	ajax_suggest_bus.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	ajax_suggest_bus.send(suggest_bus_toSend); 
}

function calc_tiempo_2() {
	var ahora = new Date();
	var ahora_sec = ahora.getTime();
	if(ahora_sec>tiempo_sec+300) {
		suggest_cadena_bus();
		tiempo = ahora;	
		}
		
}