// ID de l'élément à contrôlervar divText = 'corpsdocument';// Classes CSS disponibles pour l'élément à contrôlervar textSize = new Array('smallest', 'small', 'normal', 'large', 'largest');// Renvoie la clé de la classe CSS passée en paramètrefunction getTextSize(c){	for(var i = textSize.length; i-- && textSize[i] != c;);	return i;}// Augmente ou réduit la taille du texte dans un documentfunction setTextSize(){	// test	if(!document.getElementById) return;	var d = document.getElementById(divText);	var k = getTextSize(d.className);	// comportement du lien augmenter	document.getElementById('linkTextSizeIncrease').onclick = function()	{		if(k < 4) { k++; d.className = textSize[k]; }		return false;	}	// comportement du lien réduire	document.getElementById('linkTextSizeDecrease').onclick = function()	{		if(k > 0) { k--; d.className = textSize[k]; }		return false;	}}// Simon Willison// http://simon.incutio.com/function addLoadEvent(func){	var oldonload = window.onload;	if(typeof window.onload != 'function')	{		window.onload = func;	}	else	{		window.onload = function()		{			oldonload();			func();		}	}}addLoadEvent(setTextSize);