<!-- Begin

// No permet utilitzar el botó dret
// document.oncontextmenu = function(){return false}

// Per si hi ha un error a la plana web (aixķ no es mostrarą)
function blockError(){return true;}
window.onerror = blockError;

function cambiar (name, num, cambio) {
	if(cambio == 1) {
		document.getElementById(name + '' + num).src = 'http://' + location.hostname + '/img/' + name + '2.gif';
	} else {
		document.getElementById(name + '' + num).src = 'http://' + location.hostname + '/img/' + name + '.gif';
	}
}

function elegir_img(valor) {
	switch (valor) {
		case 1:
			img="<IMG SRC='../img/1.png' ALT='Muy malo'>";
			break;
		case 2:
			img="<IMG SRC='../img/2.png' ALT='Malo'>";
			break;
		case 3:
			img="<IMG SRC='../img/3.png' ALT='Flojo'>";
			break;
		case 4:
			img="<IMG SRC='../img/4.png' ALT='Regular'>";
			break;
		case 5:
			img="<IMG SRC='../img/5.png' ALT='Pasable'>";
			break;
		case 6:
			img="<IMG SRC='../img/6.png' ALT='Interesante'>";
			break;
		case 7:
			img="<IMG SRC='../img/7.png' ALT='Bueno'>";
			break;
		case 8:
			img="<IMG SRC='../img/8.png' ALT='Notable'>";
			break;
		case 9:
			img="<IMG SRC='../img/9.png' ALT='Muy bueno'>";
			break;
		case 10:
			img="<IMG SRC='../img/10.png' ALT='Excelente'>";
			break;
		default:
			img="<IMG SRC='../img/ns.png' ALT='No jugado'>";
			break;
	}
	return img;
}

function check_game () {
	var texto_buscar = document.getElementById("texto").value;
	if (texto_buscar!="") {
    	xajax_sugerir(texto_buscar);
	} else {
        document.getElementById("sugerencias").style.display = "none";
    }
}

function cerrar_sug () {
	setTimeout('document.getElementById("sugerencias").style.display = "none";', 1500);
}

// End -->
