// Joomla shit
var size = 12;
var min = 8;
var max = 18;

function increaseFontSize() 
{	
	if(size != max)
		size += 1;
		
	document.body.style.fontSize = size + "px";
}		

function decreaseFontSize() 
{			  
	if(size != min) 	  
		size -= 1;  

	document.body.style.fontSize = size + "px"; 
}

function addFavorite()
{
	var chr = 'CTRL-D'; 
	var agt = navigator.userAgent.toLowerCase(); 
	if(agt.indexOf("opera") != -1) 
		chr = 'CTRL-T'; 

	if (document.all) 
		window.external.AddFavorite(location.href, document.title); 
	else if (window.sidebar) 
		window.sidebar.addPanel(document.title, location.href, "");
	else
		alert('Appuyer sur ' + chr + ' pour ajouter cette page aux favoris.');
}

function openSite(url)
{
	window.open(url);
}

function ajaxCalendar(str)
{
	// Assignation des valeurs
	var month = document.getElementById("id_cal_month_" + str).value;
	var year = document.getElementById("id_cal_year_" + str).value;
	
	// Chargement AJAX
	rocketChangeContainer("calendar", "calendar_refresh", (month + "$" + year), true);
	
	// Aucun rechargement
	return false;
}

function openCalendarDescription(cellDate)
{
	cellDate += "&sid=" + Math.random();
	TINY.box.show('event_description.php?date=' + cellDate, 1, 500, 500, 1);	
}
