<!--

var inicio = 0;
var total = 0;

var i;
var imagenes = new Array("http://www.dentrotest.com/img/coche-act.gif","http://www.dentrotest.com/img/motocicleta-act.gif","http://www.dentrotest.com/img/ciclomotor-act.gif","http://www.dentrotest.com/img/camion-act.gif","http://www.dentrotest.com/img/bus-act.gif","http://www.dentrotest.com/img/remolque-act.gif","http://www.dentrotest.com/img/ambulancia-act.gif","http://www.dentrotest.com/img/a-b.gif","http://www.dentrotest.com/img/b-b.gif","http://www.dentrotest.com/img/c-b.gif","http://www.dentrotest.com/img/a-s.gif","http://www.dentrotest.com/img/b-s.gif","http://www.dentrotest.com/img/c-s.gif");
var lista_imagenes = new Array();

function cargarimagenes(){
	for(i in imagenes){
		lista_imagenes[i] = new Image();
		lista_imagenes[i].src = imagenes[i];
	}

}

function iniciarFormulario(i,t) {
	inicio=i;
	total=i+t-1;
}

function Respuesta(i,letra) {
	var r = document.getElementById('r'+i);
	var img = document.getElementById('i'+letra+i);
	
	if(letra=="a") {
		img.src="http://www.dentrotest.com/img/a-s.gif";
		document.getElementById('ib'+i).src="http://www.dentrotest.com/img/b.gif";
		document.getElementById('ic'+i).src="http://www.dentrotest.com/img/c.gif";
	}
	if(letra=="b") {
		img.src="http://www.dentrotest.com/img/b-s.gif";
		document.getElementById('ia'+i).src="http://www.dentrotest.com/img/a.gif";
		document.getElementById('ic'+i).src="http://www.dentrotest.com/img/c.gif";
	}
	if(letra=="c") {
		img.src="http://www.dentrotest.com/img/c-s.gif";
		document.getElementById('ia'+i).src="http://www.dentrotest.com/img/a.gif";
		document.getElementById('ib'+i).src="http://www.dentrotest.com/img/b.gif";
	}
	r.value=letra;
}

function Menu(boton) {
	var aux = document.getElementById(boton);
	aux.src="http://www.dentrotest.com/img/"+boton+"-act.gif";
}

function MenuFuera(boton) {
	var aux = document.getElementById(boton);
	aux.src="http://www.dentrotest.com/img/"+boton+".gif";
}


function Enviar() {
	for (i = inicio; i < total; i++) {
		var aux = document.getElementById('r'+i);

		if (aux.value==0){
			alert('Faltan preguntas por responder.');
			i=total;
		}
	}
	
	if(i<=total)
		document.dentrotest.submit();
}


//-->