function validerAbonnementInfolettre( strCourriel ) {
    if( valide_courriel_input( strCourriel ) ){
      if (document.getElementById("infolettre_prenom_input").value != "")
{
      if (document.getElementById("infolettre_nom_input").value != "")
{
       document.abonnement.submit();
}
else {
 alert( 'Veuillez entrer votre nom.' );
}
}
else {
   alert( 'Veuillez entrer votre prénom.' );
}
}
    else {
        alert( 'Vous avez entré un courriel invalide.' );
}
}
//valide le courriel entre et retour true ou false
function valide_courriel_input( courriel ) {
    var regCourrielValide = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z]{2,3}$/;
    return regCourrielValide.test( courriel );
}

var gAutoPrint = true; // Flag for whether or not to automatically call the print function
function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n<TITLE>';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("title");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html += '\n</TITLE>\n</HE' + 'AD>\n<LINK REL=STYLESHEET TYPE=TEXT/CSS HREF=style.css><BODY>\n';
		
		var printReadyElem = document.getElementById("contenu_texte");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Aucune version imprimable de ce document...");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial","width=780,height=400,scrollbars=yes,menubar=yes");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		printWin.window.print();
			
	}
}

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr','body','p','a', 'strong','em','ul','li');

//Specify spectrum of different font sizes:
var szs = new Array( '10px','11px','12px','13px' ,'14px','15px');
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 5 ) sz = 5;
	startSz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}

function setHeight() 
  { 
    var hauteur;  
    var iframe = document.getElementById( "mainframe" );  
    if( document.all ) 
      hauteur = iframe.contentWindow.document.body.scrollHeight + 20;  
    else 
      hauteur = iframe.contentWindow.document.body.offsetHeight + 20; 
    iframe.setAttribute( "height", hauteur );  
  } 

function calcHauteurIframe(nom_iframe)
{
  //récupère la hauteur de la page
  var the_height= document.getElementById(nom_iframe).contentWindow.document.body.scrollHeight;
  //change la hauteur de l'iframe
  document.getElementById(nom_iframe).height=the_height;
}

