Pues ahora probe con esto aunque tampoco me funciona no se por que ;(
Cita: function semaforo()
{
var variable1=document.getElementById('arriba')
var variable2=document.getElementById('medio')
var variable3=document.getElementById('abajo')
if (variable2.src.match("semaforo_apagado.png") && variable3.src.match("semaforo_apagado.png") && variable1.src.match("semaforo_apagado.png"))
{
variable1.src="semaforo_rojo.png";
}
else if (variable1.src.match("semaforo_rojo.png"))
{
variable2.src="semaforo_amarillo.png";
variable1.src="semaforo_apagado";
}
else
{
}
}
</script>