function openHelp(which)
{
	if (typeof document.getElementById('navbarhelp'+which+'').style.display=='undefined')
	{
	 window.open('navbarhelp.php','navbarhelp','width=462,height=139');
	}
	else document.getElementById('navbarhelp'+which+'').style.display="block";
}

function closeHelp()
{
	if (document.getElementById('navbarhelptop').style.display=="block") document.getElementById('navbarhelptop').style.display="none"; 
	else document.getElementById('navbarhelpbot').style.display="none";
}

function change(tag)
{
var taille
			switch(tag)
			{
				case "font":
						if(document.getElementById('texte_contenu').style.fontFamily=="arial, verdana, helvetica, sans-serif")
						{
						  document.getElementById('texte_contenu').style.fontFamily="times, georgia, serif";
						  SetCookie('portailvoxdei2',document.getElementById('texte_contenu').style.fontFamily+';'+document.getElementById('texte_contenu').style.fontSize,'365');
							return;
						}
						
						if(document.getElementById('texte_contenu').style.fontFamily=="times, georgia, serif")
						{
							document.getElementById('texte_contenu').style.fontFamily="arial, verdana, helvetica, sans-serif";
							SetCookie('portailvoxdei2',document.getElementById('texte_contenu').style.fontFamily+';'+document.getElementById('texte_contenu').style.fontSize,'365');
							return;
						}
				break;
				
				case "plus":
						if(parseInt(document.getElementById('texte_contenu').style.fontSize)<18)
						{
						taille = parseInt(document.getElementById('texte_contenu').style.fontSize)
						taille = taille+1
						document.getElementById('texte_contenu').style.fontSize=taille + 'px';
						SetCookie('portailvoxdei2',document.getElementById('texte_contenu').style.fontFamily+';'+document.getElementById('texte_contenu').style.fontSize,'365');
						}
						break;
						
				case "moins":
						if(parseInt(document.getElementById('texte_contenu').style.fontSize)>9)
						{
						taille = parseInt(document.getElementById('texte_contenu').style.fontSize)
						taille = taille-1
							document.getElementById('texte_contenu').style.fontSize=taille + 'px';
							SetCookie('portailvoxdei2',document.getElementById('texte_contenu').style.fontFamily+';'+document.getElementById('texte_contenu').style.fontSize,'365');
						}
					break;
			}
}

function printDoc (laPage) {
var w = screen.width / 1.5;
var h = screen.height / 1.5;
var winl = (screen.width - w) / 2;
printWin=window.open(laPage, 'print', 'width='+w+',height='+h+',top=0,left='+winl+',scrollbars=yes,menubar=yes')
}

function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}

function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
