function AfficheSM(objID)
{
		var divi = document.getElementById(objID);
		if (divi.style.display=="none")
			divi.style.display='block';
		else if(divi.style.display=="block")
			divi.style.display='none';
}

function Coul(Id, Coul1, Coul2)
{
	document.getElementById(Id).style.backgroundColor = Coul1;
	document.getElementById(Id).style.color = Coul2;
}

var ajax = new Array();

function chgcss(CssType,URLRet)
{
	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = 'http://www.cfbs.eu/chgcss.php?C='+CssType;	// Specifying which file to get
	ajax[index].onCompletion = function(){ document.location.href=URLRet; };	// Specify function that will be executed after file has been found
//	ajax[index].onCompletion = function(){ alert(ajax[index].response); };	// Specify function that will be executed after file has been found
	ajax[index].runAJAX();		// Execute AJAX function
}

function DetailsMap(HTMLName)
{
	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = 'ChargeHTML.php?N='+HTMLName;	// Specifying which file to get
	ajax[index].onCompletion = function(){ LoadDetails(index) };	// Specify function that will be executed after file has been found
	ajax[index].runAJAX();		// Execute AJAX function
}

function LoadDetails(index)
{
//	alert(ajax[index].response);
	var Div = document.getElementById('DetailsMap');
	Div.innerHTML = ajax[index].response;
	Div.className = 'lightbox';
}

function FermeDetailsMap()
{
	var Div = document.getElementById('DetailsMap');
	Div.innerHTML = '';
	Div.className = 'lightbox-vide';
}

function ChgCal(DatCal)
{
	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = 'incl/ChgCal.php?D='+DatCal;	// Specifying which file to get
	ajax[index].onCompletion = function(){ FaitEval(index) };	// Specify function that will be executed after file has been found
	ajax[index].runAJAX();		// Execute AJAX function
}

function FaitEval(index)
{
	eval(ajax[index].response);
}

function MoveCalendar(objID, Mois, Ann)
{
	var obj = document.getElementById(objID);
	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = 'incl/horaires_accueil.php?month='+Mois+'&year='+Ann;	// Specifying which file to get
	ajax[index].onCompletion = function(){ obj.innerHTML = ajax[index].response; };	// Specify function that will be executed after file has been found
//	ajax[index].onCompletion = function(){ alert(ajax[index].response); };	// Specify function that will be executed after file has been found
	ajax[index].runAJAX();		// Execute AJAX function
}

