
function setCurrentProg(_prog){
	
	clearProgSet();

	theProgs = $$('div#colleft div.program');
	theProgs.invoke('addClassName', 'unselected');
	$('prog'+_prog).removeClassName('unselected');
	$('prog'+_prog).addClassName('selected');
	
}
function clearProgSet(){
	theProgs = $$('div#colleft div.program');
	theProgs.invoke('removeClassName', 'unselected');
	theProgs.invoke('removeClassName', 'selected');
}
var wait = 10000;
var currentMonial = 1;

function startMonials() {
	$('testMask').hide();
	//rotatingMonials();
	setInterval('rotatingMonials()', wait);  // This is a javascript function which acts as a timer.
}
function rotatingMonials(){
	//Effect.Fade('testMask', { duration:2, from:1, to:0 });
	Effect.Appear('testMask', { duration:2, from:0, to:1 });

	setTimeout("$('innermonial').innerHTML = monials[currentMonial]",2000);

	currentMonial++;
	if (currentMonial == monials.length) currentMonial = 0;
	
	//setTimeout("Effect.Appear('testMask', { duration:2, from:0, to:1 })",2000);
	setTimeout("Effect.Fade('testMask', { duration:2, from:1, to:0 })",2000);

}