function creationXHR()
{
var resultat=null;
try
{
resultat= new XMLHttpRequest();
}
catch (Error)
{
try
{
resultat= new ActiveXObject("Msxml2.XMLHTTP");
}
catch (Error)
{
try
{
resultat= new ActiveXObject("Microsoft.XMLHTTP");
}
catch (Error)
{
resultat= null;
}
}
}
return resultat;
}

function codeContenu(id)
{
var contenu=document.getElementById(id).value;
return encodeURIComponent(contenu);
}

function supprimerContenu(element)
{
if (element != null)
{
while (element.firstChild)
element.removeChild(element.firstChild);
}
}

function remplacerContenu(id, texte)
{
var element = document.getElementById(id);
if (element != null)
{
supprimerContenu(element);
var nouveauContenu = document.createTextNode(texte);
element.appendChild(nouveauContenu);
}
}

function fontsizeup()
{
	var active = getActiveStyleSheet();

	switch (active)
	{
		case 'A--':
			setActiveStyleSheet('A-');
		break;

		case 'A-':
			setActiveStyleSheet('A');
		break;

		case 'A':
			setActiveStyleSheet('A+');
		break;

		case 'A+':
			setActiveStyleSheet('A++');
		break;

		case 'A++':
			setActiveStyleSheet('A');
		break;

		default:
			setActiveStyleSheet('A');
		break;
	}
}

function fontsizedown()
{
	active = getActiveStyleSheet();

	switch (active)
	{
		case 'A++' : 
			setActiveStyleSheet('A+');
		break;

		case 'A+' : 
			setActiveStyleSheet('A');
		break;

		case 'A' : 
			setActiveStyleSheet('A-');
		break;

		case 'A-' : 
			setActiveStyleSheet('A--');
		break;

		case 'A--' : 
		break;

		default :
			setActiveStyleSheet('A--');
		break;
	}
}
