// gestion de l'affichage du title pour le bouton switch
CURRENTTITLE = '';

function showTitle(target) {
	CURRENTTITLE = target.title;
	var titleText = document.createTextNode(CURRENTTITLE);
	var titleNode = document.createElement('SPAN');
	titleNode.appendChild(titleText);
	target.title = '';
	target.insertBefore(titleNode, target.firstChild);
	target.firstChild.style.display = 'block';
}

function hideTitle(target) {
	target.title = CURRENTTITLE;
	target.removeChild(target.firstChild);
}


// Gestion de la taille du texte
function setBodyTextSize(size) {
	if (document.cookie) {
		document.body.className=size;
		btns = new Array('s','m','l');
		for (i=0; i<3; i++) {
			document.getElementById(btns[i]).className = 'textbtn';
		}
		document.getElementById(size).className = 'textbtn select';
		document.cookie = "textsize=" + size + "; path=/;";
		return false;
	} else {
		// no cookie, use real URL
		return true;
	}
}

