// funcion js para controlar la reproduccion del clip flash de los videotests
// al pulsar una respuesta

function findSWF(pelicula){

	if (navigator.appName.indexOf("Microsoft")!= -1) {
		return window[pelicula];
	}
	else{
		return document[pelicula];
	}
}

function videotest_control(label,borde) 
{
	toggleCapa(label);
	findSWF("flash_tandem").SetVariable('label', label);
	borde = borde + 2; // para hacer corresponder los frames de flash con 0 = incorrecta, 1 = correcta
	findSWF("flash_tandem").SetVariable('borde', borde);
}

function toggleCapa(Capa)
{
	if (document.getElementById)
	{
		// standards
		var style2 = document.getElementById(Capa).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		// old msie
		var style2 = document.all[Capa].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		// nn4
		var style2 = document.layers[Capa].style;
		style2.display = style2.display? "":"block";
	}
}
