function unsetFlashClass(objId) {
    myObj = document.getElementById(objId);
    if(myObj) myObj.className = '';
}

$(function(){

	// mail a friend
	$("a#emailPage").click(function(){
		myWindow = window.open($(this).attr("href"), "emailPage", "width=470, height=400");
		myWindow.focus();
		return false;
	})

	// print page
	$("a#printPage").click(function(){
		window.print();
	});

	// external Links
	$("a[rel='external']").click(function(){
		window.open($(this).attr("href"));
		return false;
	});

	// home button
	$("#header h1").click(function(){window.location = "/"});


});

jQuery(function($) {
	sets = (Math.round(($('#ftright a').length/4)));
	t=setTimeout("rotateSponsors("+sets+",1)",7000);
	//rotateSponsors($sets,1);
});

function rotateSponsors(sets,current){
	startIndex=current*4;
	$('#ftright a').hide();
	$($('#ftright a')[startIndex]).fadeIn("slow");

	if (typeof($('#ftright a')[startIndex+1]) != 'undefined') $($('#ftright a')[startIndex+1]).fadeIn("slow");
	if (typeof($('#ftright a')[startIndex+2]) != 'undefined') $($('#ftright a')[startIndex+2]).fadeIn("slow");
	if (typeof($('#ftright a')[startIndex+3]) != 'undefined') $($('#ftright a')[startIndex+3]).fadeIn("slow");
	
	if (sets==current+1) current=-1;
	t=setTimeout("rotateSponsors("+sets+","+(current+1)+")",7000);
}