// JavaScript Document
var theImages1 = new Array()

theImages1[0] = '../images/right_music.jpg'
theImages1[1] = '../images/right_music1.jpg'
theImages1[2] = '../images/right_music2.jpg'
theImages1[3] = '../images/right_music3.jpg'


var g = 0
var q = theImages1.length;
var preBuffer1 = new Array()
for (i = 0; i < q; i++){
   preBuffer1[i] = new Image()
   preBuffer1[i].src = theImages1[i]
}

var currentImage1 = 0;
var whichImage1 = 0
		while(whichImage1==currentImage1){
			whichImage1 = Math.round(Math.random()*(q-1));
		}
currentImage1 = whichImage1;

function showbodyImage1(){
	document.getElementById('rightColumnImage').src = theImages1[whichImage1];
	startClock1();
}

var events_x = 5
var events_y = 1

function startClock1(){ 
	//alert("clock starts");
	events_x = events_x-events_y;
	setTimeout("startClock1()", 1000);
	document.eventfrm.event_clock.value = events_x;
	if(events_x==0){ 
		while(whichImage1==currentImage1){
			whichImage1 = Math.round(Math.random()*(q-1));
		}
		currentImage1 = whichImage1;
		document.getElementById('rightColumnImage').src = theImages1[whichImage1];
		refreshBodyImageClock1();	
	} 
}

function refreshBodyImageClock1(){
	events_x = 5;
	//al3rt("refresh");
}