window.onload = rotate;

function rotate(element) {
var x = document.getElementById('rotor');
var n = Math.round(19*Math.random());

	switch (n) {
		case 0:
			x.src = "crotor/rotor-01.gif";
			break;
		case 1:
			x.src = "crotor/rotor-02.gif";
			break;
		case 2:
			x.src = "crotor/rotor-03.gif";
			break;
		case 3:
			x.src = "crotor/rotor-04.gif";
			break;
		case 4:
			x.src = "crotor/rotor-05.gif";
			break;
		case 5:
			x.src = "crotor/rotor-06.gif";
			break;
		case 6:
			x.src = "crotor/rotor-07.gif";
			break;
		case 7:
			x.src = "crotor/rotor-08.gif";
			break;
		case 8:
			x.src = "crotor/rotor-09.gif";
			break;
		case 9:
			x.src = "crotor/rotor-10.gif";
			break;
		case 10:
			x.src = "crotor/rotor-11.gif";
			break;
		case 11:
			x.src = "crotor/rotor-12.gif";
			break;
		case 12:
			x.src = "crotor/rotor-13.gif";
			break;
		case 13:
			x.src = "crotor/rotor-14.gif";
			break;
		case 14:
			x.src = "crotor/rotor-15.gif";
			break;
		case 15:
			x.src = "crotor/rotor-16.gif";
			break;
		case 16:
			x.src = "crotor/rotor-17.gif";
			break;
		case 17:
			x.src = "crotor/rotor-18.gif";
			break;
		case 18:
			x.src = "crotor/rotor-19.gif";
			break;
		case 19:
			x.src = "crotor/rotor-20.gif";
			break;
		
		}
}