function over(id) {
	$(id).style.borderColor='#cccccc'; 
	$(id).style.cursor='pointer';
}

function out(id) {
	if($('rolloverStatus').value != id) {
		$(id).style.borderColor='#f2f6dc';
		$(id).style.background='#ffffff';	
	} else return;
}

function miniSchedScroll() {
    
    var scroll2 = new Scroller('buttonWrapper', {area: 25, velocity: .2});
   // var scroll3 = new Scroller('remoteMouse', {area: 20, velocity: 1});
    
    // Mousemove
    $('buttonWrapper').addEvent('mouseenter', scroll2.start.bind(scroll2));
    $('buttonWrapper').addEvent('mouseleave', scroll2.stop.bind(scroll2));
    
}

function scrollToCurrent(currentID) {
   
    if($(currentID)) {
        var scroll = new Fx.Scroll('buttonWrapper');
        scroll.toElement(currentID);
    }
    
}


function clickProgram(id,progID) {
	
	// deactivate current highlighted button
	var isHighlighted = $('rolloverStatus').value;
	$(isHighlighted).style.backgroundColor = '#ffffff';
	$(isHighlighted).style.borderColor = 'rgb(242, 246, 220)';
	
	// store current button status
	$('rolloverStatus').value = id;
	
	$(id).style.backgroundColor='#f9fbf0';
	$(id).style.borderColor='#cccccc';
	
	// grab hidden div contents
	$('infoCell').innerHTML = $(progID).innerHTML;
}

function miniSchedAjax(channel) {
    var url = "pages/nowPlaying.php";
    
    $('miniSchedLoading').innerHTML = '<img style="border: 0px; margin: 0px;" src="http://www.opb.org/presentation/chrome/ajaxLoading.gif">';
    
    new Ajax(url, {
        method: 'post',
        evalScripts: 'true',
        data: 'ajaxChan='+channel,
        update: $('miniSched')
    }).request();
}



