function affiche(elem)
{
 document.getElementById(elem).style.visibility = 'visible';
 document.getElementById(elem).style.display ='block';
}

function masque(elem)
{
 document.getElementById(elem).style.visibility = 'hidden';
 document.getElementById(elem).style.display ='none';
}

function permutte_affichage(elem)
{
	if(document.getElementById(elem).style.display == 'none' || document.getElementById(elem).style.display == '')
  {
		document.getElementById(elem).style.display = 'block';
		document.getElementById(elem).style.visibility = 'visible';
	}
  else
  {
  	document.getElementById(elem).style.display = 'none';
  	document.getElementById(elem).style.visibility = 'hidden';
	}
} // permutte_affichage

function affiche_message(message, couleur)
{
  var tableau = message.split('<br />');
  
  //Suppression de l'ancien contenu
  var paragraphe = document.getElementById("info");
  var old_contenu = paragraphe.firstChild;
  paragraphe.removeChild(old_contenu);
  paragraphe.setAttribute("class", couleur);

  var div = document.createElement("div");
  div.setAttribute("class", "message " + couleur);
  paragraphe.appendChild(div);

  var ul = document.createElement("ul");
  
  //Ajout du nouveau contenu
  for(var i = 0; i < tableau.length - 1; i++)
  {
    var li = document.createElement("li");
    li.appendChild(document.createTextNode(tableau[i]));
    ul.appendChild(li);
  }
  paragraphe.appendChild(ul);

  var div = document.createElement("div");
  div.setAttribute("class", "message " + couleur);
  paragraphe.appendChild(div);
  
  document.getElementById("info").style.visibility = 'visible';
  document.getElementById("info").style.display = 'block';
}// affiche_message()

// Forum
var style_cookie = 'phpBBstyle';
var onload_functions = new Array();
var onunload_functions = new Array();
/**
* Find a member
*/
function find_username(url)
{
	popup(url, 760, 570, '_usersearch');
	return false;
}

/**
* New function for handling multiple calls to window.onload and window.unload by pentapenguin
*/
window.onload = function()
{
	for (var i = 0; i < onload_functions.length; i++)
	{
		eval(onload_functions[i]);
	}
}

window.onunload = function()
{
	for (var i = 0; i < onunload_functions.length; i++)
	{
		eval(onunload_functions[i]);
	}
}

function ChargePage(page)
{
  document.location.href=page;
}
