
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() {
	//$('testimonial').hide();
	//rotatingMonials();
	setInterval('rotatingMonials()', wait);  // This is a javascript function which acts as a timer.
}
function rotatingMonials(){
	Effect.Fade('testimonial', { duration:3, from:1, to:0 });

	setTimeout("$('testimonial').innerHTML = monials[currentMonial]",4000);

	currentMonial++;
	if (currentMonial == monials.length) currentMonial = 0;
	
	setTimeout("Effect.Appear('testimonial', { duration:3, from:0, to:1 })",4050);

}
function getnew(URL, poststr, div)
{	inc = $$('.overlay').size();
	zindex = 50 + (inc * 50);
	newtop = 200 + (inc * 50);
	overheight = $('content').getHeight();
	if(overheight < document.viewport.getHeight())
		overheight = document.viewport.getHeight();
	//$$('.video').each(Element.hide);
	
	if( $('new' + div + 'overlay') == null )
		$(document.body).insert(new Element('div', { 'id': 'new' + div + 'overlay' }).setStyle({ opacity: 0.6, height: overheight + 'px', 'zIndex': zindex }).addClassName('overlay'));
	
	if( $('new' + div) == null )
		$(document.body).insert(new Element('div', { 'id': 'new' + div }).setStyle({ 'position': 'absolute', 'top': document.viewport.getScrollOffsets().top + newtop + 'px', 'zIndex': zindex + 50 }).addClassName('newajaxform'));
	
	new Ajax.Updater('new' + div, URL, {evalScripts: true, parameters: poststr});
}
function closediv(div)
{	if($('new' + div)) 				$('new' + div).remove();
	if($('new' + div + 'overlay')) 	$('new' + div + 'overlay').remove();
}
function delthis(URL)
{	var delconf = confirm("Are you sure you want to delete this?");
	
	if(delconf == true)
		window.location=URL;
}


