rnd.today=new Date();
rnd.seed=rnd.today.getTime();

var current1 = 0;
var current2 = 0;
var current3 = 0;

function exclusive_rand(range, exclude_number)
{
	var result = 0;
	while((result=rand(range))==exclude_number);
	return(result);
}


function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
};

function rand(number) {
        return Math.ceil(rnd()*number);
};


function rotatepanel1()
{
	panelloc = 'panel1'

	current1 = exclusive_rand(5,current1);
	
	document[panelloc].src='images/panels/'+panelloc+'/'+current1+'.jpg';

	window.setTimeout('rotatepanel2();',500);
}

function rotatepanel2()
{
	panelloc = 'panel2'
	
	current2 = exclusive_rand(5,current2);

	document[panelloc].src='images/panels/'+panelloc+'/'+current2+'.jpg';

	window.setTimeout('rotatepanel3();',500);
}

function rotatepanel3()
{
	panelloc = 'panel3'
	
	current3 = exclusive_rand(5,current3);

	document[panelloc].src='images/panels/'+panelloc+'/'+current3+'.jpg';

	window.setTimeout('rotatepanel1();',500);
}
