// JavaScript Document

//sets of pictures in rotation
var pix_sets = 2;

function swapImages(rotation){
	//set next number in rotation
	next = (rotation + 1) % pix_sets ;

	//switch images
	document.images.A.src = "images/fr_a" + next + ".gif";
	document.images.B.src = "images/fr_b" + next + ".gif";
	document.images.C.src = "images/fr_c" + next + ".gif";
	document.images.D.src = "images/fr_d" + next + ".gif";
	document.images.E.src = "images/fr_e" + next + ".gif";
	document.images.F.src = "images/fr_f" + next + ".gif";
	document.images.G.src = "images/fr_g" + next + ".gif";
	document.images.H.src = "images/fr_h" + next + ".gif";
	document.images.I.src = "images/fr_i" + next + ".gif";
	document.images.J.src = "images/fr_j" + next + ".gif";
	document.images.K.src = "images/fr_k" + next + ".gif";
	document.images.L.src = "images/fr_l" + next + ".gif";
	//call swap again 	
	setTimeout("swapImages(" + next + ");", 2000);

}

function startSwap(){
	//start swapping images in rotation
	if(document.images){
		setTimeout("swapImages(0);", 2000);
	}
}