var tailleTexteDefaut = '';
var tailleTexteGrand = 14;
var tailleTexteXGrand = 16;


var fontSize = readCookie("ISQFont");	// Taille du text courante du site

//////////////////////////////////////////////////////////////////////////////////////
// Récupérer les paramètres de la page passés via le formulaire "form_link"
//////////////////////////////////////////////////////////////////////////////////////
var rep_point = document.form_link.rep_point.value;
var file_lang = document.form_link.file_lang.value;

//////////////////////////////////////////////////////////////////////////////////////
// Chaînes de caractères contenant le code HTML des sections dynamique (piv, menus, ...)
//////////////////////////////////////////////////////////////////////////////////////
var enteteMenu = '';
var enteteLang = '';
var enteteTaille = '';
var menuAccesRapide = '';
var menuBanquesDonnees = '';
var menuHorizontal = '';
var menuSallePresse = '';
var menuStatistiques = '';
var menuEnquetes = '';
var menuServicesRecherche = '';
var menuInstitut = '';
var menuGauche = '';
var piedLogoCopy = '';
var piedHautPage = '';

var className = ' class="sousMenu"';
var elemOCCQ = '';
var elemBDSO = '';

if(stat_langue == "fr")
{
	elemOCCQ = '    <li><a href="' + rep_point + 'observatoire/default.htm">Observatoire de la culture et des communications du Qu&eacute;bec</a></li>';
	elemBDSO = '    <li><a href="http://www.bdso.gouv.qc.ca/pls/ken/iwae.proc_acce?p_temp_bran=ISQ" target="_blank">Banque de donn&eacute;es des statistiques officielles sur le Qu&eacute;bec</a></li>';
	
	// Code HTML définissant le menu de l'entête (PIV) du site Web  
	enteteMenu += '  <a href="http://www.stat.gouv.qc.ca/"><img src="' + rep_point + 'images/hmi_logo.gif" alt="Institut de la statistique du Qu&eacute;bec" class="alignGauche" /></a>';
	enteteMenu += '  <img src="' + rep_point + 'images/hmi_bandeau.jpg" alt="" class="alignDroite" />';                                                                              																																																								
	enteteMenu += '  <div id="enteteMenu">';                                                                                                                           
	enteteMenu += '  	 <ul>';                                                                                                                                         
	enteteMenu += '      <li><a href="' + rep_point + 'default.htm">Accueil</a></li>';                                                                                            
	enteteMenu += '      <li><a href="' + rep_point + 'outils/plan.htm">Plan du site</a></li>';                                                                                  
	enteteMenu += '      <li><a href="' + rep_point + 'outils/joindre.htm">Nous joindre</a></li>';                                                                                
	enteteMenu += '      <li><a href="http://www.gouv.qc.ca/portail/quebec/pgs/commun/" target="_blank">Portail Qu&eacute;bec</a></li>';                         
	enteteMenu += '      <li><a href="http://recherched.gouv.qc.ca/Internet/recherche.asp?Lang=fr&sLang=french&hx=100&lx=1024&Fy=100&mx=211&mo=y&curl=http://www.stat.gouv.qc.ca/recherche/&salign=l&Adv=n&Int=www.stat.gouv.qc.ca&rd=y&sCatList=stat&pagesize=10&cs=UTF-8&IntCs=Iso">Rechercher</a></li>';                                                                                    
	enteteMenu += '      <li><a href="' + rep_point + 'outils/sites.htm">Autres sites</a></li>';                                                                                  
	enteteMenu += '    </ul>'; 
	enteteMenu += '    <div id="lang">';  
	enteteMenu += '###LANG###';
	enteteMenu += '    </div>'; 
	enteteMenu += '  </div>';   
	
	// Code HTML définissant le menu permettant de controler la langue d'affichage du site Web                                                                                                                      
	enteteLang += '      <a href="' + file_lang + '">English</a>';                                                                                                        
	
	// Code HTML définissant le menu permettant de controler la taille du texte du site Web                                                                                                                    
	enteteTaille += '      <a href="#" onclick="return tailleTexte(\'normal\');" title="Afficher les polices de caract&egrave;re &agrave; leur taille standard (70%)">A</a>';   
	enteteTaille += '      <a href="#" onclick="return tailleTexte(\'grand\');" title="Agrandir les polices de caract&egrave;re &agrave; 88%" class="tailleG">A</a>';     
	enteteTaille += '      <a href="#" onclick="return tailleTexte(\'xgrand\');" title="Agrandir les polices de caract&egrave;re &agrave; 100%" class="tailleX">A</a>';  
	
	// Code HTML définissant le menu Salle de presse du site Web                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuSallePresse += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuSallePresse += '    <li><a href="' + rep_point + 'salle-presse/communiq/archives_comm_presse.htm">Communiqu&eacute;s</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuSallePresse += '    <li><a href="#">Calendrier de diffusion&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuSallePresse += '  <ul>'; 	
	//menuSallePresse += '  <li><a href="' + rep_point + 'organisa/calendrier/Calend_diff_10_11_mois.pdf" target="_blank">Par mois</a></li>'; 
	menuSallePresse += '  <li><a href="' + rep_point + 'organisa/calendrier/Calendrier_2011_2012.pdf" target="_blank">Par domaine</a></li>'; 	
	menuSallePresse += '  </ul></li>'; 	
	menuSallePresse += '  </ul>';  

	// Code HTML définissant le menu Statistiques du site Web                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuStatistiques += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  	 <li><a href="#">Par domaine&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '      <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
	menuStatistiques += '        <li><a href="' + rep_point + 'donstat/societe/anals_difrn_sex/hmi_ads.htm">Analyse diff&eacute;renci&eacute;e selon les sexes</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '          <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '          </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '        </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="#">Commerce ext&eacute;rieur&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/comrc_exter/comrc_inter_inter/index.htm">Commerce international</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/comrc_exter/export_mondiale/index.htm">Exportations mondiales par r&eacute;gion</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="#">Comparaisons &eacute;conomiques&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compr_inter/index.htm">Comparaisons internationales</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/TSC/index.htm">Comparaisons interprovinciales</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  					 <li><a href="' + rep_point + 'regions/profils/comp_interreg/comp_inter_index.htm">Comparaisons interrégionales</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/profils/index.htm">Profils statistiques sectoriels</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="#">Comptes &eacute;conomiques&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
	menuStatistiques += '  				 <ul>';
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compt_econm/index.htm">Comptes &eacute;conomiques</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compt_econm/index.htm#pir_somm">Produit int&eacute;rieur brut</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/revenu_personnel/index.htm">Revenu personnel</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="#">Conditions de vie et bien-&ecirc;tre&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  				 <ul>';  
	
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/revenus_depense/patrimoine/index.htm">Avoirs et dettes</a></li>';                                                                                                                                                                                                              
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/revenus_depense/depense/index.htm">Dépenses</a></li>';
		
	
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/Emploi_temps_loisir/index.htm">Emploi du temps et loisir</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/menage_famille/men_fam_enf/familles/index.htm">Familles, m&eacute;nages et personnes &acirc;g&eacute;es</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/menage_famille/index.htm">Logement et &eacute;quipement</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/revenus_depense/index.htm">Revenus</a></li>'; 
	
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/tendances_travail/index.htm">Tendances sociales du travail</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  			 <li><a href="#">Conjoncture &eacute;conomique&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'princ_indic/default.htm">Principaux indicateurs &eacute;conomiques</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="' + rep_point + 'observatoire/default.htm">Culture et communications</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/dev_durable/index.htm">Développement durable</a></li>';			
	menuStatistiques += '  			 <li><a href="#">D&eacute;mographie&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/dons_regnl/regional/index.htm">Donn&eacute;es d&eacute;mographiques r&eacute;gionales</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/struc_poplt/index.htm">Donn&eacute;es g&eacute;n&eacute;rales</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/naisn_deces/index.htm">Naissances et d&eacute;c&egrave;s</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/noms_famille/index.htm">Noms de famille</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/etat_matrm_marg/index.htm">Mariages et divorces</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/migrt_poplt_imigr/index.htm">Migration et population immigrante</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/persp_poplt/index.htm">Perspectives d&eacute;mographiques</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="#">&Eacute;ducation&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuStatistiques += '  			 	 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/education/index.htm">Effectif scolaire, dipl&ocirc;me et indicateurs</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/education/index.htm">&Eacute;tat de scolarisation</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="#">Industrie bioalimentaire&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/culture/index.htm">Cultures</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	//menuStatistiques += '  				 	 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/donne_regionale/index.htm">Donn&eacute;es r&eacute;gionales</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/elevage/index.htm">&Eacute;levage</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/indic_indus_bioal/index.htm">Indicateurs de l&rsquo;industrie</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/insti_finnc_coopr/statistique.htm">Institutions financi&egrave;res</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  			 <li><a href="#">Investissements&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/inves/index.htm">Investissements priv&eacute;s et publics</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/inves/index.htm">Investissements sous contr&ocirc;le &eacute;tranger</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  			 <li><a href="#">Sant&eacute;&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/allaitement/index.htm">Allaitement</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/organisation/index.htm">Organisation des services de santé</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/tabac_alcool/index.htm">Tabac, alcool, drogue et jeu</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/vaccination/index.htm">Vaccination</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  			 <li><a href="' + rep_point + 'savoir/index.htm">Science, technologie et innovation</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/ind_services/index.htm">Secteur des services</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/sectr_manfc/profil_secteur/index.htm">Secteur manufacturier</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/sectr_mines/index.htm">Secteur minier</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuStatistiques += '  			 <li><a href="#">Travail et r&eacute;mun&eacute;ration&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/remnr_condt_travl/emploi_repere/index.htm">Description sommaire des emplois rep&egrave;res et donn&eacute;es salariales</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/parnt_etudn_march_travl/pop_active/index.htm">Indicateurs du march&eacute; du travail</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/cat_profs_sectr_activ/professions/index.htm">Industries et cat&eacute;gories professionnelles</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/remnr_condt_travl/index.htm">R&eacute;mun&eacute;ration et conditions de travail</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  			 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  		 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  	 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  	 <li><a href="' + rep_point + 'regions/profils/region_00/region_00.htm">Par r&eacute;gion et MRC</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  	 <li><a href="' + rep_point + 'donstat/societe/stats_regnl/index.htm">Recensement</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  	 <li><a href="#">Publications&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  		 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  			 <li><a href="' + rep_point + 'outils/pdf.htm">T&eacute;l&eacute;chargement des documents PDF</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  			 <li><a href="' + rep_point + 'publications/domaines.htm">Par domaine</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuStatistiques += '  			 <li><a href="' + rep_point + 'publications/liste.htm">Par ordre alphab&eacute;tique</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  			 <li><a href="' + rep_point + 'publications/referenc/index.htm">Documents de r&eacute;f&eacute;rence</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  		 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  	 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  	 <li><a href="http://diff1.stat.gouv.qc.ca/hcb/hcb121inscr_sectr.php" target="_blank">Nouveaut&eacute;s par courriel</a></li>';			
	
	menuStatistiques += '  	 <li><nobr><a href="http://twitter.com/#!/statquebec" target="_blank" onMouseOver="document.twitter.src=\'http://www.stat.gouv.qc.ca/images/twitter_icone_blanc.png\';" onMouseOut="document.twitter.src=\'http://www.stat.gouv.qc.ca/images/twitter_icone_bleu.png\';" >Suivez-nous sur Twitter <img id="twitter" name="twitter" src="http://www.stat.gouv.qc.ca/images/twitter_icone_bleu.png" alt="Suivez-nous sur Twitter" /></a></nobr></li>';
	
	menuStatistiques += '  </ul>';               
	
	// Code HTML définissant le menu Enquêtes du site Web
	menuEnquetes += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuEnquetes += '  	 <li><a href="' + rep_point + 'repondants/renseign_rep_enquete.htm">Information aux participants</a></li>';
	
	menuEnquetes += '  	 <li><a href="' + rep_point + 'repondants/collecte.htm">Collectes en cours</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuEnquetes += '  </ul>';   
	
	// Code HTML définissant le menu Services à la recherche du site Web
	//menuServicesRecherche += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	//menuServicesRecherche += '  	 <li><a href="#">Produits</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	//menuServicesRecherche += '  	 <li><a href="#">Services</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	//menuServicesRecherche += '  </ul>'; 
	
	// Code HTML définissant le menu L'Institut du site Web
	menuInstitut += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuInstitut += '  	 <li><a href="#">Organisation&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '      <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/declaration.pdf" target="_blank">D&eacute;claration de services aux citoyens</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuInstitut += '        <li><a href="#">Gestion de la qualit&eacute;&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuInstitut += '          <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuInstitut += '            <li><a href="' + rep_point + 'organisa/CadreGestion_qual.pdf" target="_blank">Cadre int&eacute;gr&eacute; de gestion de la qualit&eacute; de l&rsquo;Institut de la statistique du Qu&eacute;bec</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                
	menuInstitut += '            <li><a href="' + rep_point + 'organisa/PolitiqueQual.pdf" target="blank">Politique g&eacute;n&eacute;rale en mati&egrave;re de gestion de la qualit&eacute; &agrave; l&rsquo;Institut de la statistique du Qu&eacute;bec</a></li>';                                                                                                                       menuInstitut += '            <li><a href="' + rep_point + 'organisa/Document_principes.pdf" target="blank">Document de principes sur la qualit&eacute; dans les enquêtes</a></li>';                                                                                                                                                                                                                                                            
	menuInstitut += '          </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuInstitut += '        </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/mission.htm">Historique et mission</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/organi.htm">Organigramme</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/plan_action_handicapees.pdf" target="_blank">Plan d&rsquo;action &agrave; l&rsquo;&eacute;gard des personnes handicap&eacute;es 2011-2012</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/plan_dev_durable.htm" >Plan d&rsquo;action de développement durable 2008-2013</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'publications/referenc/plan_strat09_14.htm">Plan strat&eacute;gique 2009-2014</a></li>';                                                                                                                                                                                                                                                                                                                                         
	menuInstitut += '        <li><a href="' + rep_point + 'confidentialite.htm">Protection des renseignements personnels et confidentiels</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/rap_annuel.htm">Rapport annuel de gestion</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/val_gestion.htm">Valeurs de gestion</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuInstitut += '      </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuInstitut += '    </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '    <li><a href="#">Services&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuInstitut += '      <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '        <li><a href="' + rep_point + 'sad/index.htm">Service d&rsquo;acc&egrave;s  aux donn&eacute;es &agrave; des fins de recherche</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
	menuInstitut += '        <li><a href="' + rep_point + 'services/cid.htm">Centre d&rsquo;information et de documentation</a></li>';                                                                                                                                                               
	menuInstitut += '        <li><a href="' + rep_point + 'services/remu.html">Comparaison de la r&eacute;mun&eacute;ration globale</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuInstitut += '        <li><a href="' + rep_point + 'services/compila.htm">Compilations statistiques sur mesure</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuInstitut += '        <li><a href="' + rep_point + 'services/etudes.htm">&Eacute;tudes d&rsquo;impact &eacute;conomique</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '        <li><a href="' + rep_point + 'services/services.htm">M&eacute;thodologie statistique, enqu&ecirc;te et analyse des donn&eacute;es</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuInstitut += '      </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuInstitut += '    </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '    <li><a href="#">M&eacute;thodes&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuInstitut += '      <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '        <li><a href="' + rep_point + 'clacon/classifications.htm">Classifications</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuInstitut += '        <li><a href="' + rep_point + 'clacon/concepts.htm">Concepts</a></li>';                                                                                                                                                                                                                                                                                                                                                  
	menuInstitut += '      </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuInstitut += '    </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '    <li><a href="' + rep_point + 'emploi/index.htm">Emplois</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
	menuInstitut += '    <li><a href="' + rep_point + 'confidentialite.htm">Confidentialit&eacute;</a></li>';
	
	
	menuInstitut += '    <li><a href="' + rep_point + 'acces_info.htm">Accès à l&rsquo;information</a></li>';	
	
	menuInstitut += '    <li><a href="' + rep_point + 'outils/joindre.htm">Contactez-nous</a></li>';				                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
	menuInstitut += '  </ul>';                                                                                                                                                                                                               
	
	// Code HTML définissant le menu de gauche du site Web
	menuGauche += '  <div class="titre"><h3>Salle de presse</h3></div>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuGauche += menuSallePresse;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuGauche += '  <div class="titre"><h3>Statistiques</h3></div>';    
	menuGauche += menuStatistiques;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          																																																																																																																																																																																																																																																																							
	menuGauche += '  <div class="titre"><h3>Enqu&ecirc;tes</h3></div>';     
	menuGauche += menuEnquetes;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              																																																																																																																																																																																																																																																																			
	//menuGauche += '  <div class="titre"><h3>Services &agrave; la recherche</h3></div>';
	//menuGauche += menuServicesRecherche;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  																																																																																																																																																																																																																																																																						 
	menuGauche += '  <div class="titre"><h3>L&rsquo;Institut</h3></div>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuGauche += menuInstitut;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuGauche += '  <div class="imgMenu"><a href="' + rep_point + 'observatoire/default.htm"><img src="' + rep_point + 'images/hmi_obs_logo_accueil_v9.jpg" alt="L&rsquo;Observatoire de la culture et des communications du Qu&eacute;bec" /></a></div>';
	
	// Code HTML définissant le menu Accès rapide du site Web                                                                                                                                                                                                                  
	menuAccesRapide +=	'  <ul' + className + '>'; 
	menuAccesRapide += elemOCCQ;
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'publications/referenc/quebec_stat/accueil.htm" target="_blank">Le Qu&eacute;bec statistique</a></li>';                                                                                     
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'jeunesse/default.htm">Jeunesse</a></li>';                                                                                                         
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'donstat/societe/demographie/index.htm">D&eacute;mographie</a></li>';                                                                                               
	menuAccesRapide +=	'  	 <li><a href="http://www.jesuisjeserai.stat.gouv.qc.ca/" target="_blank">&Eacute;tude longitudinale du d&eacute;veloppement des enfants du Qu&eacute;bec- &Eacute;LDEQ (Je suis, je serai)</a></li>';
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compr_inter/index.htm">Comparaisons &eacute;conomiques internationales</a></li>';                                                                  
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'princ_indic/princ_indic_accueil.htm">Principaux indicateurs &eacute;conomiques du Qu&eacute;bec</a></li>';                                                       
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'donstat/societe/sante/eco_sante.htm" target="_blank">&Eacute;co-Sant&eacute; Qu&eacute;bec</a></li>';
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'publications/remuneration/rapport_erg.htm">Enquête sur la rémunération globale au Québec</a></li>';	
	menuAccesRapide +=	'  </ul>';  	
	
	// Code HTML définissant le menu Banques de données du site Web                                                                                 
	menuBanquesDonnees +=	'  <ul' + className + '>'; 
	menuBanquesDonnees += elemBDSO;
	menuBanquesDonnees +=	'    <li><a href="http://diffusion.stat.gouv.qc.ca/hkbphp/index_fr.html" target="_blank">Commerce international en ligne (CIEL)</a></li>';                                                                                           
	menuBanquesDonnees +=	'  	 <li><a href="http://diff1.stat.gouv.qc.ca/rem/classes/accueil" target="_blank">R&eacute;pertoire des exploitants miniers</a></li>';                                                                        
	menuBanquesDonnees +=	'  	 <li><a href="http://diffusion.stat.gouv.qc.ca/pls/hcp/HCP" target="_blank">Base de donn&eacute;es du code g&eacute;ographique</a></li>';                                                               
	menuBanquesDonnees +=	'  	 <li><a href="http://diffusion.stat.gouv.qc.ca/pls/hni/hni" target="_blank">Banque de donn&eacute;es sur les films</a></li>';                                                                           
	menuBanquesDonnees +=	'  </ul>';
	
	// Code HTML définissant le menu horizontal du site Web
	menuHorizontal += '  <ul' + className + '>';
	menuHorizontal += '    <li class="racineG"><a href="#" class="lienRacine">L&rsquo;Institut</a>';
	menuHorizontal += menuInstitut.replace(/sousMenu/,'sousMenuG');	
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	menuHorizontal += '  <ul' + className + '>';     
	menuHorizontal += '    <li class="racineG"><a href="#" class="lienRacine">Statistiques</a>';
	menuHorizontal += menuStatistiques.replace(/sousMenu/,'sousMenuG');
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	menuHorizontal += '  <ul' + className + '>';
	menuHorizontal += '    <li class="racineD"><a href="#" class="lienRacine">Acc&egrave;s rapide</a>';
	menuHorizontal += menuAccesRapide.replace(/sousMenu/,'sousMenuD');
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	menuHorizontal += '  <ul' + className + '>';  
	menuHorizontal += '    <li class="racineD"><a href="#" class="lienRacine">Banques de donn&eacute;es</a>'; 
	menuHorizontal += menuBanquesDonnees.replace(/sousMenu/,'sousMenuD');
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	
	// Code HTML définissant le logo et la mention copyright du pied de page
	piedLogoCopy +=	'	 <a href="http://www.gouv.qc.ca/portail/quebec/pgs/commun/" target="_blank"><img src="' + rep_point + 'images/hmi_qc.gif" alt="Qu&eacute;bec" /></a><br />';
	piedLogoCopy += '  <a href="http://www.droitauteur.gouv.qc.ca/copyright.php" target="_blank">© Gouvernement du Québec, 2012</a><br />';
	piedLogoCopy +=	'  <a href="' + rep_point + 'confidentialite.htm">Politique de confidentialit&eacute;</a> | '; 
	piedLogoCopy +=	'  <a href="' + rep_point + 'accessibilite.htm">Accessibilit&eacute;</a> | '; 
		
	// Code HTML définissant le lien vers le haut de la page courante
	piedHautPage += '  <div class="lienHautPage"><a href="#top"><img src="' + rep_point + 'images/HMI_bas_page_gauche.gif" alt="Retour haut de la page"></a></div>';
}
else
{
	elemOCCQ = '    <li><a href="' + rep_point + 'observatoire/default_an.htm">Observatoire de la culture et des communications du Qu&eacute;bec</a></li>';
	elemBDSO = '    <li><a href="http://www.bdso.gouv.qc.ca/pls/ken/iwae.proc_acce?p_lang=2&p_temp_bran=ISQ" target="_blank">Databank of Official Statistics on Quebec</a></li>';
	
	// Code HTML définissant le menu de l'entête (PIV) - Anglais
	enteteMenu += '  <a href="http://www.stat.gouv.qc.ca/"><img src="' + rep_point + 'images/hmi_logo.gif" alt="Institut de la statistique du Qu&eacute;bec" class="alignGauche" /></a>';
	enteteMenu += '  <img src="' + rep_point + 'images/hmi_bandeau.jpg" alt="" class="alignDroite" />';                                                                              																																																								
	enteteMenu += '  <div id="enteteMenu">';                                                                                                                           
	enteteMenu += '  	 <ul>';                                                                                                                                         
	enteteMenu += '      <li><a href="' + rep_point + 'default_an.htm">Home Page</a></li>';                                                                                            
	enteteMenu += '      <li><a href="' + rep_point + 'outils/site_map.htm">Site Map</a></li>';                                                                                  
	enteteMenu += '      <li><a href="' + rep_point + 'outils/joindre_an.htm">Contact Us</a></li>';                                                                                
	enteteMenu += '      <li><a href="http://www.gouv.qc.ca/portail/quebec/pgs/commun/?lang=en" target="_blank">Qu&eacute;bec Portal</a></li>';                         
	enteteMenu += '      <li><a href="http://recherched.gouv.qc.ca/Internet/recherche.asp?Lang=en&sLang=English&hx=100&lx=1024&Fy=100&mx=211&mo=y&curl=http://www.stat.gouv.qc.ca/recherche/&salign=l&Adv=n&Int=www.stat.gouv.qc.ca&rd=y&sCatList=stat&pagesize=10&cs=ISO-8859-1&IntCs=Iso">Search</a></li>';                                                                                    
	enteteMenu += '      <li><a href="' + rep_point + 'outils/sites_an.htm">Other Links</a></li>';                                                                                  
	enteteMenu += '    </ul>'; 
	enteteMenu += '    <div id="lang">';  
	enteteMenu += '###LANG###';
	enteteMenu += '    </div>'; 
	enteteMenu += '  </div>';   
	
	// Code HTML définissant le menu permettant de controler la langue d'affichage du site Web - Anglais                                                                                                                      
	enteteLang += '      <a href="' + file_lang + '">Fran&ccedil;ais</a>';                                                                                                        
	
	// Code HTML définissant le menu permettant de controler la taille du texte du site Web - Anglais                                                                                                                    
	enteteTaille += '      <a href="#" onclick="return tailleTexte(\'normal\');" title="Display standard font size (70%)">A</a>';   
	enteteTaille += '      <a href="#" onclick="return tailleTexte(\'grand\');" title="Enlarge font size to 88%" class="tailleG">A</a>';     
	enteteTaille += '      <a href="#" onclick="return tailleTexte(\'xgrand\');" title="Enlarge font size to 100%" class="tailleX">A</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	
	// Code HTML définissant le menu Salle de presse du site Web - Anglais                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuSallePresse += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuSallePresse += '    <li><a href="' + rep_point + 'salle-presse/communiq/archives_comm_presse_an.htm">News Releases</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuSallePresse += '    <li><a href="#">Release dates&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuSallePresse += '  <ul>'; 	
	//menuSallePresse += '  <li><a href="' + rep_point + 'organisa/calendrier/Calendrier_2011_2012.pdf" target="_blank">By Month</a></li>'; 
	menuSallePresse += '  <li><a href="' + rep_point + 'organisa/calendrier/Calendrier_2011_2012.pdf" target="_blank">By statistical sector</a></li>'; 	
	menuSallePresse += '  </ul></li>'; 
	menuSallePresse += '  </ul>';  

	// Code HTML définissant le menu Statistiques du site Web - Anglais                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuStatistiques += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  	 <li><a href="#">By Statistical Sector&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '      <ul>';
	menuStatistiques += '  			 <li><a href="#">Biofood Industry&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  				 <ul>';                           
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/elevage/index_an.htm">Animal Production</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/culture/index_an.htm">Crop Production</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/indic_indus_bioal/index_an.htm">Industry Indicator</a></li>';  
	//menuStatistiques += '  				 	 <li><a href="' + rep_point + 'donstat/econm_finnc/filr_bioal/donne_regionale/index_an.htm">Regional Data</a></li>';  
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  			 </li>'; 
	menuStatistiques += '  			 <li><a href="' + rep_point + 'observatoire/default_an.htm">Culture and Communications</a></li>';
	menuStatistiques += '  			 <li><a href="#">Demography&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  				 <ul>';  
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/naisn_deces/index_an.htm">Births and Deaths</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/noms_famille/index_an.htm">Family Names</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/struc_poplt/index_an.htm">General Data</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/etat_matrm_marg/index_an.htm">Marriage and divorce</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/migrt_poplt_imigr/index_an.htm">Migrations and Immigrant Population</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/persp_poplt/index_an.htm">Population Projections</a></li>';
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/demographie/dons_regnl/regional/index_an.htm">Regional Population Data</a></li>';
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';
	menuStatistiques += '  			 <li><a href="#">Economic Accounts&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
	menuStatistiques += '  				 <ul>';
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compt_econm/index_an.htm">Economic Accounts</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compt_econm/index_an.htm#pir_somm">Gross Domestic Product</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/revenu_personnel/index_an.htm">Personal Income</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';
	menuStatistiques += '  			 <li><a href="#">Economic Comparisons&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compr_inter/index_an.htm">International Comparisons</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/TSC/index_an.htm">Interprovincial Comparisons</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  					 <li><a href="' + rep_point + 'regions/profils/comp_interreg/comp_inter_index_an.htm">Interregional Comparisons</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/profils/index_an.htm">Sectoral Statistical Profiles</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>'; 
	menuStatistiques += '  			 <li><a href="#">Economic Situation&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'princ_indic/default_an.htm">Main Economic Indicators</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';
	menuStatistiques += '  			 <li><a href="#">Education&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuStatistiques += '  			 	 <ul>';     
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/education/index_an.htm">Educational Attainment</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/education/index_an.htm">Enrolment, Graduates and Educational </a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/insti_finnc_coopr/statistique_an.htm">Financial Institutions</a></li>';
	menuStatistiques += '  			 <li><a href="#">External Trade&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/comrc_exter/comrc_inter_inter/index_an.htm">International Trade</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/comrc_exter/export_mondiale/index_an.htm">World Exports by Region</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';
	menuStatistiques += '        <li><a href="' + rep_point + 'donstat/societe/anals_difrn_sex/hmi_ads_an.htm">Gender-based Analysis&nbsp;&nbsp;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '          <ul>';                              
	menuStatistiques += '          </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '        </li>';
	menuStatistiques += '  			 <li><a href="#">Health&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
	menuStatistiques += '  				 <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/allaitement/index_an.htm">Breastfeeding</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/organisation/index_an.htm">Health services organization</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/tabac_alcool/index_an.htm">Smoking, Alchol, Drugs and Gambling</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/sante/vaccination/index_an.htm">Vaccination</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  			 </li>';
	menuStatistiques += '  			 <li><a href="#">Investments&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  				 <ul>';    
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/inves/index_an.htm">Foreign-owned Investment</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/inves/index_an.htm">Private and Public Investments</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';
	menuStatistiques += '  			 <li><a href="#">Labour and Compensation&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  				 <ul>';    
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/cat_profs_sectr_activ/professions/index_an.htm">Industries and occupational category</a></li>';   
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/parnt_etudn_march_travl/pop_active/index_an.htm">Labour Market Indicators</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/remnr_condt_travl/index_an.htm">Compensation and Working Conditions</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/march_travl_remnr/remnr_condt_travl/emploi_repere/index_an.htm">Summary Description of Benchmark Jobs and Wage and Salary Data</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuStatistiques += '  			 </li>'; 
	menuStatistiques += '  			 <li><a href="#">Living Conditions and Well-being&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  				 <ul>';
	
	menuStatistiques += '  <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/revenus_depense/patrimoine/index_an.htm">Assets and Debts</a></li>';
	menuStatistiques += '  <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/revenus_depense/depense/index_an.htm">Expenditure</a></li>';
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/menage_famille/men_fam_enf/familles/index_an.htm">Families, Households and The Elderly</a></li>';
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/menage_famille/index_an.htm">Housing and Equipment</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/revenus_depense/index.htm">Income</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/tendances_travail/index_an.htm">Social Trends in the Workplace</a></li>'; 
	menuStatistiques += '  					 <li><a href="' + rep_point + 'donstat/societe/famls_mengs_niv_vie/Emploi_temps_loisir/index_an.htm">Time Use and Leisure</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  				 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  			 </li>';
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/sectr_manfc/profil_secteur/index_an.htm">Manufacturing Sector</a></li>'; 
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/sectr_mines/index_an.htm">Mining Sector</a></li>'; 
	menuStatistiques += '  			 <li><a href="' + rep_point + 'savoir/index_an.htm">Science, Technology and Innovation</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/econm_finnc/ind_services/index_an.htm">Services Sector</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuStatistiques += '  			 <li><a href="' + rep_point + 'donstat/dev_durable/index_an.htm">Sustainable development</a></li>';	
	menuStatistiques += '  		 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  	 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  	 <li><a href="' + rep_point + 'regions/profils/region_00/region_00_an.htm">By Region and RCM</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuStatistiques += '  	 <li><a href="' + rep_point + 'donstat/societe/stats_regnl/index_an.htm">Census</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuStatistiques += '  	 <li><a href="#">Publications&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuStatistiques += '  		 <ul>';          
	menuStatistiques += '  			 <li><a href="' + rep_point + 'publications/liste_an.htm">By Alphabetical Order</a></li>'; 
	menuStatistiques += '  			 <li><a href="' + rep_point + 'publications/domaines_an.htm">By Statistical Sector</a></li>'; 
	menuStatistiques += '  			 <li><a href="' + rep_point + 'outils/pdf_an.htm">Downloading PDF documents</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
	menuStatistiques += '  			 <li><a href="' + rep_point + 'publications/referenc/index_an.htm">Reference Materials</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuStatistiques += '  		 </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuStatistiques += '  	 </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuStatistiques += '  	 <li><a href="http://diff1.stat.gouv.qc.ca/hcb/hcb121inscr_sectr_an.php" target="_blank">E-News sign-up</a></li>';	
	
	menuStatistiques += '  	 <li><nobr><a href="http://twitter.com/#!/statquebec" target="_blank" onMouseOver="document.twitter.src=\'http://www.stat.gouv.qc.ca/images/twitter_icone_blanc.png\';" onMouseOut="document.twitter.src=\'http://www.stat.gouv.qc.ca/images/twitter_icone_bleu.png\';" >Follow us on Twitter <img id="twitter" name="twitter" src="http://www.stat.gouv.qc.ca/images/twitter_icone_bleu.png" alt="Follow us on Twitter" /></a></nobr></li>' ;
	
	menuStatistiques += '  </ul>';               
	
	// Code HTML définissant le menu Enquêtes du site Web - Anglais
	menuEnquetes += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuEnquetes += '  	 <li><a href="repondants/renseign_rep_enquete_an.htm">Information for participants</a></li>';
	
	menuEnquetes += '  	 <li><a href="repondants/collecte_an.htm">Current data collections</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuEnquetes += '  </ul>';  
	
	// Code HTML définissant le menu Services à la recherche du site Web - Anglais
	//menuServicesRecherche += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	//menuServicesRecherche += '  	 <li><a href="#">Products</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	//menuServicesRecherche += '  	 <li><a href="#">Services</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
	//menuServicesRecherche += '  </ul>'; 
	
	// Code HTML définissant le menu L'Institut du site Web - Anglais
	menuInstitut += '  <ul' + className + '>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuInstitut += '  	 <li><a href="#">Organization&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '      <ul>'; 
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/plan_action_handicapees.pdf" target="_blank">Action Plan regarding Handicapped Persons 2011-2012 (in French)</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/plan_dev_durable_an.htm" >Action plan for sustainable development 2008-2013</a></li>';	
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/rap_annuel_an.htm">Annual Management Report (in French)</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/declaration_an.pdf" target="_blank">Declaration of Services to the Public</a></li>';   
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/mission_an.htm">History and Mission</a></li>'; 
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/pol_linguistique_ISQ.pdf" target="_blank">Language Policy (in French)</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/val_gestion_an.htm">Management Values</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'organisa/organi_an.htm">Organizational Chart</a></li>'; 
	menuInstitut += '        <li><a href="' + rep_point + 'confidentialite_an.htm">Protection of Personal and Confidential Information</a></li>'; 
	menuInstitut += '        <li><a href="#">Quality Management&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuInstitut += '          <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuInstitut += '            <li><a href="' + rep_point + 'organisa/CadreGestion_qual_an.pdf" target="_blank">Integrated Quality Management Framework</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                
	menuInstitut += '            <li><a href="' + rep_point + 'organisa/PolitiqueQual_an.pdf" target="blank">General Policy on Quality Management of the Institut de la statistique du Qu&eacute;bec</a></li>';                                                                                                                        menuInstitut += '            <li><a href="' + rep_point + 'organisa/Document_principes.pdf" target="blank">General Document de principes sur la qualit&eacute; dans les enquêtes</a></li>';                                                                                                                                                                                                                                                           
	menuInstitut += '          </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	menuInstitut += '        </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '        <li><a href="' + rep_point + 'publications/referenc/plan_strat09_14_an.htm">Strategic Plan 2009-2014</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
	menuInstitut += '      </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuInstitut += '    </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '    <li><a href="#">Services&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
	menuInstitut += '      <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '        <li><a href="' + rep_point + 'sad/index_an.htm">Data access services for research purposes (SAD)</a></li>';
	menuInstitut += '        <li><a href="http://www.epsebe.ca/?lang=an" target="_blank">EPSEBE - Environment for the Promotion of Health and Welfare</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'services/compila_an.htm">Customized Statistical Compilations</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'services/etudes_an.htm">Economic Impact Studies</a></li>';
	menuInstitut += '        <li><a href="' + rep_point + 'services/cid_an.htm">Information and Documentation Centre</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                            
	menuInstitut += '        <li><a href="' + rep_point + 'services/remu_an.html">Remuneration Studies</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuInstitut += '        <li><a href="' + rep_point + 'services/services_an.htm">Statistical Methodology, Surveys and Analyses</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuInstitut += '      </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuInstitut += '    </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '    <li><a href="#">Methods&nbsp;&nbsp;&nbsp;&gt;</a>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
	menuInstitut += '      <ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	menuInstitut += '        <li><a href="' + rep_point + 'clacon/classifications_an.htm">Classifications</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuInstitut += '        <li><a href="' + rep_point + 'clacon/concepts_an.htm">Concepts</a></li>';                                                                                                                                                                                                                                                                                                                                                            
	menuInstitut += '      </ul>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
	menuInstitut += '    </li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuInstitut += '    <li><a href="' + rep_point + 'emploi/index_an.htm">Employment</a></li>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
	menuInstitut += '    <li><a href="' + rep_point + 'confidentialite_an.htm">Privacy</a></li>';	                                                                                                                                                                                                                                            menuInstitut += '    <li><a href="' + rep_point + 'acces_info_an.htm">Access to information</a></li>';                                                                                                                                                                                                                                                                 
	menuInstitut += '    <li><a href="' + rep_point + 'outils/joindre_an.htm">Contact Us</a></li>';				                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
	menuInstitut += '  </ul>';                                                                                                                                                                                                               
	
	// Code HTML définissant le menu de gauche du site Web - Anglais
	menuGauche += '  <div class="titre"><h3>Newsroom</h3></div>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
	menuGauche += menuSallePresse;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
	menuGauche += '  <div class="titre"><h3>Statistics</h3></div>';    
	menuGauche += menuStatistiques;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          																																																																																																																																																																																																																																																																							
	menuGauche += '  <div class="titre"><h3>Surveys</h3></div>';     
	menuGauche += menuEnquetes;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              																																																																																																																																																																																																																																																																			
	//menuGauche += '  <div class="titre"><h3>Services &agrave; la recherche</h3></div>';
	//menuGauche += menuServicesRecherche;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  																																																																																																																																																																																																																																																																						 
	menuGauche += '  <div class="titre"><h3>The Institut</h3></div>';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
	menuGauche += menuInstitut;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	menuGauche += '  <div class="imgMenu"><a href="' + rep_point + 'observatoire/default_an.htm"><img src="' + rep_point + 'images/hmi_obs_logo_accueil_v9.jpg" alt="L&rsquo;Observatoire de la culture et des communications du Qu&eacute;bec" /></a></div>';				                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
																																																																																																																																								
	// Code HTML définissant le menu Accès rapide du site Web - Anglais                                                                                                                                                                                                                  
	menuAccesRapide +=	'  <ul' + className + '>'; 
	menuAccesRapide += elemOCCQ;
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'publications/referenc/quebec_stat/accueil.htm" target="_blank">Le Qu&eacute;bec statistique</a></li>';                                                                                     
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'jeunesse/default_an.htm">Youth Section</a></li>';                                                                                                         
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'donstat/societe/demographie/index_an.htm">Demographic Data</a></li>';                                                                                               
	menuAccesRapide +=	'  	 <li><a href="http://www.iamillbe.stat.gouv.qc.ca/default_an.htm" target="_blank">Qu&eacute;bec Longitudinal Study of Child Development (QLSCD) (I am, I&rsquo;ll be )</a></li>';
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'donstat/econm_finnc/conjn_econm/compr_inter/index_an.htm">International Comparisons</a></li>';                                                                  
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'princ_indic/princ_indic_accueil_an.htm">Qu&eacute;bec Main Economic Indicators</a></li>';                                                       
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'donstat/societe/sante/eco_sante_an.htm" target="_blank">&Eacute;co-Sant&eacute; Qu&eacute;bec</a></li>';
	menuAccesRapide +=	'  	 <li><a href="' + rep_point + 'publications/remuneration/rapport_erg_an.htm">Enquête sur la rémunération globale au Québec</a></li>';	
	menuAccesRapide +=	'  </ul>';  	
	
	// Code HTML définissant le menu Banques de données du site Web - Anglais                                                                                 
	menuBanquesDonnees +=	'  <ul' + className + '>'; 
	menuBanquesDonnees += elemBDSO;
	menuBanquesDonnees +=	'    <li><a href="http://diffusion.stat.gouv.qc.ca/hkbphp/index_an.html" target="_blank">International Trade Data Online</a></li>';                                                                
	menuBanquesDonnees +=	'  	 <li><a href="http://diff1.stat.gouv.qc.ca/rem/classes/accueil_an" target="_blank">Qu&eacute;bec Mining Directory</a></li>';                                                                        
	menuBanquesDonnees +=	'  	 <li><a href="http://diffusion.stat.gouv.qc.ca/pls/hcp/HCP_AN" target="_blank">Database of the geographical code of Qu&eacute;bec</a></li>';                                                               
	menuBanquesDonnees +=	'  	 <li><a href="http://diffusion.stat.gouv.qc.ca/pls/hni/hni_an" target="_blank">Movie Database</a></li>';                                                                           
	menuBanquesDonnees +=	'  </ul>';  		
			
	// Code HTML définissant le menu horizontal du site Web - Anglais
	menuHorizontal += '  <ul' + className + '>';
	menuHorizontal += '    <li class="racineG"><a href="#" class="lienRacine">The Institut</a>';
	menuHorizontal += menuInstitut.replace(/sousMenu/,'sousMenuG');	
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	menuHorizontal += '  <ul' + className + '>';     
	menuHorizontal += '    <li class="racineG"><a href="#" class="lienRacine">Statistics</a>';
	menuHorizontal += menuStatistiques.replace(/sousMenu/,'sousMenuG');
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	menuHorizontal += '  <ul' + className + '>';
	menuHorizontal += '    <li class="racineD"><a href="#" class="lienRacine">Quick Access</a>';
	menuHorizontal += menuAccesRapide.replace(/sousMenu/,'sousMenuD');
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	menuHorizontal += '  <ul' + className + '>';  
	menuHorizontal += '    <li class="racineD"><a href="#" class="lienRacine">Databases</a>'; 
	menuHorizontal += menuBanquesDonnees.replace(/sousMenu/,'sousMenuD');
	menuHorizontal += '    </li>'; 
	menuHorizontal += '  </ul>';   
	
	// Code HTML définissant le logo et la mention copyright du pied de page - Anglais
	piedLogoCopy +=	'	 <a href="http://www.gouv.qc.ca/portail/quebec/pgs/commun/?lang=en" target="_blank"><img src="' + rep_point + 'images/hmi_qc.gif" alt="Qu&eacute;bec" /></a><br />';
	piedLogoCopy += '  <a href="http://www.droitauteur.gouv.qc.ca/copyright.php" target="_blank">© Gouvernement du Québec, 2012</a><br />';
	piedLogoCopy +=	'	 <a href="' + rep_point + 'confidentialite_an.htm">Privacy Policy</a> '; 
	piedLogoCopy +=	'	 <a href="' + rep_point + 'accessibilite_an.htm">Accessibility</a> ';
		
	
	// Code HTML définissant le lien vers le haut de la page courante - Anglais
	piedHautPage += '  <div class="lienHautPage"><a href="#top"><img src="' + rep_point + 'images_an/HMI_bas_page_sec_gauche_an.gif" alt="Return to the top of the page"></a></div>';
}

//////////////////////////////////////////////////////////////////////////////////////
// Fonction initPage
// Cette fonction permet d'insérer le code HTML des sections dynamiques du 
// site Web (piv, menus, ...) à l'intérieur de la page courante
//
// Auteur  : Francis Chabot
// Date    : 13 mars 2009
//
// Entrées : Aucune
// Sorties : écran : les sections dynamiques contiennent le code HTML spécifié
//////////////////////////////////////////////////////////////////////////////////////
function initPage()
{	
	
	var td = document.getElementsByTagName('td');

	// Insertion du code HTML définissant les sections dynamiques à l'intérieur de la page courante    
	if(document.getElementById('menuHorizontal')) document.getElementById('menuHorizontal').innerHTML = menuHorizontal; 
	
	for(var i = 0; i < td.length; i++)
	{
		if(td[i].className == 'historique' && td[i-1].innerHTML.search(/hx3/i) != -1)
		{
			td[i].innerHTML = '';
			td[i-1].innerHTML = '';
			td[i-2].innerHTML = '';
			
			td[i].className = '';
		}
		else if(td[i].className == 'historique')
		{
			td[i].innerHTML = '<div id="historique">' +  td[i].innerHTML + '<div>';
			td[i-1].innerHTML = '<div id="imgHistorique"><div>';
		}
		else if(td[i].className == 'tdImgBg4')
		{
			td[i].innerHTML = '';
			td[i-1].innerHTML = '';
			td[i-2].innerHTML = '';
			
			td[i].className = '';
		}
	}

var img = document.getElementsByTagName('img');

for(var j = 0; j < img.length; j++)
	{
		if(img[j].src.search(/hmi_coinsup_pagesec/i) != -1) 
		{
			img[j].src = document.form_link.rep_point.value + 'images/hmi_coin_gauchebb2.jpg';
			img[j].height = '28';
			img[j].width = '31';
		}
		else if(img[j].src.search(/hmi_img_page_2/i) != -1)
		{
			img[j].src = document.form_link.rep_point.value + 'images/spacer.gif';
			img[j].height = '1';
			img[j].width = '1';
			
			if(img[j].parentNode) img[j].parentNode.innerHTML = '<div id="pageGauche">' + menuGauche + '</div>';
		}
		else if(img[j].src.search(/hmi_transparent_menu_gauche/i) != -1)
		{
			img[j].src = document.form_link.rep_point.value + 'images/spacer.gif';
			img[j].height = '1';
			img[j].width = '1';
			
			if(img[j].parentNode) img[j].parentNode.removeChild(img[j]);
		}
		else if(img[j].src.search(/hx3_sous_site_haut/i) != -1)
		{
			img[j].src = document.form_link.rep_point.value + 'images/spacer.gif';
			img[j].height = '1';
			img[j].width = '1';
			
			if(img[j].parentNode) img[j].parentNode.removeChild(img[j]);
		}
		else if(img[j].src.search(/hx3_sous_site_bas/i) != -1)
		{
			img[j].src = document.form_link.rep_point.value + 'images/spacer.gif';
			img[j].height = '1';
			img[j].width = '1';
			
			if(img[j].parentNode) img[j].parentNode.removeChild(img[j]);
		}
	}
	
	// Modifier la taille du texte
	tailleTexte(fontSize);
}

//////////////////////////////////////////////////////////////////////////////////////                                                                                                                                                                                         
// Fonction tailleTexte                                                                                                                                                                                                                                                        
// Cette fonction permet de modifier la taille du texte de type px sur le site Web                                                                                                                                                                                      
//                                                                                                                                                                                                                                                                             
// Auteur  : Francis Chabot                                                                                                                                                                                                                                                    
// Date    : 20 mars 2009                                                                                                                                                                                                                                                       
//                                                                                                                                                                                                                                                                             
// Entrées : taille : chaîne de caractères représentant la taille du texte (normal, grand ou xgrand)                                                                                                                                                                     
// Sorties : écran : la taille du texte est modifiée selon la taille spécifiée                                                                                                                                                                                                       
//////////////////////////////////////////////////////////////////////////////////////                                                                                                                                                                                         
function tailleTexte(taille)                                                                                                                                                                                                                                                   
{  
	// Enregistrer la taille du texte dans un cookie
	createCookie("ISQFont", taille);
	
	// Récupérer la taille du texte de type px à partir de la chaîne de caractères passée en paramètre
	if(taille == 'grand')
	{
		taille = tailleTexteGrand;
	}
	else if(taille == 'xgrand')
	{
		taille = tailleTexteXGrand;
	}
	else                                                                                                                                                                                                                                                              
	{       
		taille = '';                                                                                                                                                                                                                                            
	}
                                                                                                                                                                                                                                                                               
	// Modifier la taille du texte
	var h3Taille = '';
	
	if(taille != '')
	{
		h3Taille = (taille + 1) + 'px';
		taille += 'px';
	}
	
	tailleFonte0('', taille);
	
	if(document.getElementById('historique')) document.getElementById('historique').style.fontSize = taille;
	if(document.getElementById('tabHistorique')) document.getElementById('tabHistorique').style.fontSize = taille;
	
	if(document.getElementById('pageGauche'))
	{
		var h3Gauche = document.getElementById('pageGauche').getElementsByTagName('h3'); 
		
		for(var i = 0; i < h3Gauche.length; i++)
		{
			h3Gauche[i].style.fontSize = h3Taille;
		}
	}
	
	if(document.getElementById('enteteMenu'))
	{
		var aEntete = document.getElementById('enteteMenu').getElementsByTagName('a'); 

		for(var j = 0; j < aEntete.length; j++) 
		{ 
    	aEntete[j].style.fontSize = ''; 
    }
	}
	                                                                                                                                                                                                                                                                             
	return false;                                                                                                                                                                                                                                                                 
}

//////////////////////////////////////////////////////////////////////////////////////                                                                                                                                                                                          
// Fonction ouvertureFenetre                                                                                                                                                                                                                                                    
// Cette fonction permet d'ouvrir une page dans une nouvelle fenetre                                                                                                                                                                                                            
//                                                                                                                                                                                                                                                                               
// Auteur  : Francis Chabot                                                                                                                                                                                                                                                       
// Date    : 11 septembre 2007                                                                                                                                                                                                                                                   
//                                                                                                                                                                                                                                                                               
// Entrées : lien : lien URL de la page à ouvrir sous forme d'une chaîne entre guillements                                                                                                                                                                                       
//           nom  : nom de la fenêtre (chaîne entre guillements sans espace pour ID seulement)                                                                                                                                                                                   
//           l    : nombre entier positif représentant la largeur de la fenêtre                                                                                                                                                                                                  
//           h    : nombre entier positif représentant la hauteur de la fenêtre                                                                                                                                                                                                  
//           posX : nombre entier représentant la position horizontale de la fenêtre                                                                                                                                                                                             
//           posY : nombre entier représantant la position verticale de la fenêtre                                                                                                                                                                                               
// Sorties : écran : la page pointée par le lien URL est ouverte dans une nouvelle fenêtre                                                                                                                                                                                       
//////////////////////////////////////////////////////////////////////////////////////                                                                                                                                                                                           
function ouvertureFenetre(lien, nom, l, h, posX, posY)                                                                                                                                                                                                                           
{                                                                                                                                                                                                                                                                                
	window.open(lien, nom, 'toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width=' + l + ',height=' + h + ',top=' + posY + ',left=' + posX);                                                                                                                   
	return false;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
}       

//////////////////////////////////////////////////////////////////////////////////////                                                                                                                                                                                           
// Functions nécessaires au menu déroulant Son of Suckerfish                                                                                                                                                                                                                     
//                                                                                                                                                                                                                                                                               
// Source : http://htmldog.com/articles/suckerfish/                                                                                                                                                                                                                              
//////////////////////////////////////////////////////////////////////////////////////                                                                                                                                                                                           
sfLoad = function()                                                                                                                                                                                                                                                              
{                                                                                                                                                                                                                                                                                
	var sfPageG = document.getElementById("pageGauche");                                                                                                                                                                                                                           
	var sfPageD = document.getElementById("pageDroite");
	var sfMenuH = document.getElementById("menuHorizontal");  
	
	if(sfPageG) sfHover(sfPageG);
	if(sfPageD) sfHover(sfPageD);
	if(sfMenuH) sfHover(sfMenuH);
}

sfHover = function(sfNavObj) 
{
	var sfEls = sfNavObj.getElementsByTagName("LI");
	
	if(sfEls)
	{
		for(var i = 0; i < sfEls.length; i++) 
		{
			sfEls[i].onmouseover = function() 
			{
				this.className += " sfhover";
			}
		
			sfEls[i].onmouseout = function() 
			{
				this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}

//////////////////////////////////////////////////////////////////////////////////////
// Exécution de fonctions lors du chargement de la page courante
//////////////////////////////////////////////////////////////////////////////////////
if(window.addEventListener) 
{
	window.addEventListener("load", initPage, false);
} 
else if(document.addEventListener) 
{
	document.addEventListener("load", initPage, false);
}
else if(window.attachEvent)
{
  window.attachEvent("onload", sfLoad);
	window.attachEvent("onload", initPage);
}


////////////////////////////////////////////////////////////////////////////////////////
// Deprecated
////////////////////////////////////////////////////////////////////////////////////////
var enteteisq, menuisq, imageisq, logoBaspage, W3CValide,W3CCSSValide,W3CCSSWAIValide;
var posMenu 
var navName = navigator.appName
var navVersion = navigator.appVersion

// Création : Dustin Diaz
//Site : http://www.dustindiaz.com/getelementsbyclass
function getElementsByClass(searchClass, node, tag) { 
var classElements = new Array(); 
if ( node == null ) 
node = document; 
if ( tag == null ) 
tag = '*'; 
var els = node.getElementsByTagName(tag); 
var elsLen = els.length; 
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); 
for (i = 0, j = 0; i < elsLen; i++) { 
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i]; 
j++; 
} 
} 
return classElements; 
} 

        // Xavier Borderie
function tailleFonteTag(classe, taille) { 
cibles2 = document.getElementsByTagName(classe); 
for (i = 0; i < cibles2.length; i++) { 
        cibles2[i].style.fontSize = taille; 
        }
//createCookie('ISQFont', taille); 
    }

        // Xavier Borderie
function tailleFonteClass(classe, taille) { 
cibles = getElementsByClass(classe);
for (i = 0; i < cibles.length; i++) { 
        cibles[i].style.fontSize = taille;
 
        }
//createCookie('ISQFont', taille); 
    }
function tailleFonte0(classe, taille) 
{ 
	//formatage des Classes
	tailleFonteClass('titrenoir', taille);
	tailleFonteClass('texte', taille);
	tailleFonteClass('date', taille);
	tailleFonteClass('bdsoavant', taille);
	tailleFonteClass('bdsoapres', taille);
	tailleFonteClass('TDBasPage', taille);
	tailleFonteClass('historique', taille);
	tailleFonteClass('btnCodeGeo', taille);
	tailleFonteClass('dateArchive', taille);
	tailleFonteClass('titreBleu ', taille);
	tailleFonteClass('titreEntet', taille);
	tailleFonteClass('titreItal', taille);
	tailleFonteClass('titrenoir', taille);
	tailleFonteClass('inFrench', taille);
	tailleFonteClass('date ', taille);
	tailleFonteClass('gras', taille);
	tailleFonteClass('grasital', taille);
	tailleFonteClass('italique', taille);
	tailleFonteClass('texte', taille);
	tailleFonteClass('texteregion', taille);
	tailleFonteClass('regular_font', taille);
	tailleFonteClass('titreBleuSec', taille);
	tailleFonteClass('titreBleusoustitre', taille);
	tailleFonteClass('titreBleupetit', taille);
	tailleFonteClass('titreBleumini', taille);
	tailleFonteClass('SaviezVous', taille);
	tailleFonteClass('bodySec', taille);
	tailleFonteClass('TDOrange', taille);
	tailleFonteClass('TDVert', taille);
	tailleFonteClass('TDViolet', taille);
	tailleFonteClass('TDRose', taille);
	tailleFonteClass('TDMauve', taille);
	tailleFonteClass('TDVertClair', taille);
	tailleFonteClass('TDVertFonce', taille);
	tailleFonteClass('rougeTSC', taille);
	tailleFonteClass('rouge', taille);
	tailleFonteClass('jaune', taille);
	tailleFonteClass('miseAjour', taille);
	tailleFonteClass('nouveau', taille);
	tailleFonteClass('small_font', taille);
	tailleFonteClass('occqcpDayColumnHeader', taille);
	tailleFonteClass('occqcpYearNavigation', taille);
	tailleFonteClass('occqcpMonthNavigation', taille);
	tailleFonteClass('occqcpCurrentMonthDate', taille);
	tailleFonteClass('occqcpCurrentMonthDateDisabled', taille);
	tailleFonteClass('occqcpOtherMonthDate', taille);
	tailleFonteClass('occqcpOtherMonthDateDisabled', taille);
	tailleFonteClass('occqcpCurrentDate', taille);
	tailleFonteClass('occqcpCurrentDateDisabled', taille);
	tailleFonteClass('occqcpTodayText', taille);
	tailleFonteClass('occqcpTodayTextDisabled', taille);
	tailleFonteClass('occqcpText', taille);
	//formatage des Tag
	tailleFonteTag('a', taille);
	tailleFonteTag('P', taille);
	tailleFonteTag('TD', taille);
	tailleFonteTag('H1', taille);
	tailleFonteTag('H2', taille);
	//création du Cookie
	//createCookie('ISQFont', taille); 
}

function createCookie(name,value,days)
{
	if (days)
		{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
		}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var rien = "";
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
		{
		var c = ca[i];
		while (c.charAt(0)==' ')  c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
	return rien;
}
//var fontSize = readCookie("ISQFont");

/*if ((navName.indexOf("Netscape") != -1 && navVersion.charAt(0) >=  3)) 
{
	posMenu = 114;
}
else
{
	posMenu  = 103;
}*/


 
enteteisq='';
enteteisq+='<div id="entete">'+enteteMenu.replace(/###LANG###/,enteteTaille+enteteLang)+'</div>'; 

enteteisqnolang='';
enteteisqnolang+='<div id="entete">'+enteteMenu.replace(/###LANG###/,enteteTaille)+'</div>';

enteteisqvide='';
enteteisqvide+='<div id="entete">'+enteteMenu.replace(/###LANG###/,'')+'</div>';

enteteisqesp='';
enteteisqesp+='<table width="100%" border="0" cellspacing="0" cellpadding="0" >';
enteteisqesp+='  <tr valign="top"> ';
enteteisqesp+='    <td><img src="'+document.form_link.rep_point.value+'images/hmi_logo.gif" width="211" height="100" border="0" usemap="#logogauche" alt="Institut de la statistique"></td>';
enteteisqesp+='    <td width="100%"> ';
enteteisqesp+='      <table width="100%" border="0" cellspacing="0" cellpadding="0">';
enteteisqesp+='        <tr>';
enteteisqesp+='          <!-- Zone d image personnalisee -->';
enteteisqesp+='          <td align="right" valign="bottom" nowrap><img src="'+document.form_link.rep_point.value+'images/spacer.gif" width="99" height="1" alt=""><img src="'+document.form_link.rep_point.value+'images/hmi_bandeau.jpg" width="450" height="57" alt=""></td>';
enteteisqesp+='        </tr>';
enteteisqesp+='        <tr> ';
enteteisqesp+='          <td bgcolor="#003399"> ';
enteteisqesp+='            <table width="100%" border="0" cellspacing="0" cellpadding="0">';
enteteisqesp+='              <tr> ';
enteteisqesp+='                <td nowrap><img src="'+document.form_link.rep_point.value+'images/hmi_ligne_accueil_esp.gif" width="451" height="15" border="0" alt="" usemap="#menu_oblig"></td>';
enteteisqesp+='                <td align="right"><img src="'+document.form_link.rep_point.value+'images/hmi_ligne_langue_vide.gif" width="61" height="15" border="0" alt="" usemap="#menu_lang"></td>';
enteteisqesp+='              </tr>';
enteteisqesp+='            </table>';
enteteisqesp+='          </td>';
enteteisqesp+='      </table>';
enteteisqesp+='</tr>';
enteteisqesp+='</table>';
enteteisqesp+='<!-- Map pour menu obligatoire --> ';
enteteisqesp+='<map name="menu_oblig"> ';
enteteisqesp+='  <area shape="rect" coords="51,0,189,15" href="http://www.stat.gouv.qc.ca/default.htm" alt="Inicio (francés solamente)"> ';
enteteisqesp+='  <area shape="rect" coords="203,0,275,15" href="http://www.gouv.qc.ca/portail/quebec/pgs/commun?lang=es" alt="Portal Qu&eacute;bec">';
enteteisqesp+='</map> ';
enteteisqesp+='<map name="logogauche"> ';
enteteisqesp+='   <area shape="rect" coords="3,0,200,97" href="http://www.stat.gouv.qc.ca/default.htm" alt="Institut de la statistique du Québec"></map> ';
enteteisqesp+='</map> ';

// image statistiques officielles, Profil et MRC, Recensement
menuisq='';

// Image Observatoire, Demo, Jeusnesse
imageisq1='';
imageisq2='';
imageisq3='';
imageisq4='';

// Bas de page index
logoBasPage='';
logoBasPage+='<div id="pied">'+piedLogoCopy+'</div>';
 
// Bas de page secondaire
logoBasPageSec='';
logoBasPageSec+='<div id="pied">'+piedHautPage+piedLogoCopy+'</div>';

// Bas de page secondaire espagnol
logoBasPageSecEsp='';
logoBasPageSecEsp+='<center>';
logoBasPageSecEsp+='<table width="100%" cellpadding=0 cellspacing=0>';
logoBasPageSecEsp+='<tr>';
logoBasPageSecEsp+='<td width="100%">';
logoBasPageSecEsp+='<img src="'+document.form_link.rep_point.value+'images/HMI_bas_page_gauche_esp.gif" width="144" alt="Retour haut de la page" usemap="#TopPage" border="0" align="right">';
logoBasPageSecEsp+='<map name="TopPage"> ';
logoBasPageSecEsp+='<area shape="rect" coords="10,3,130,23" href="#top">';
logoBasPageSecEsp+='</map> ';
logoBasPageSecEsp+='</td>';
logoBasPageSecEsp+='</tr>';
logoBasPageSecEsp+='</table>';
logoBasPageSecEsp+='<br>';
logoBasPageSecEsp+='<table width="100%" border=0 cellpadding=0 cellspacing=0><tr><td heigth=60 align=center valign=middle>';
logoBasPageSecEsp+='<a href="http://www.gouv.qc.ca/portail/quebec/pgs/commun" target="_blank"><img src="'+document.form_link.rep_point.value+'images/hmi_qc.gif" width="105" height="32" border="0" alt="Gouvernement du Québec"></a><br>';
logoBasPageSecEsp+='&copy\;Gouvernement du Qu&eacute;bec, 2009</a></span></td></tr>';              
logoBasPageSecEsp+='</table>';               
logoBasPageSecEsp+='</center>'; 
logoBasPageSecEsp+='<br>';
logoBasPageSecEsp+='<script language="javascript" type="text/javascript">';
logoBasPageSecEsp+='tailleFonte0(\'titrenoir\', fontSize);';
logoBasPageSecEsp+='</script>';



// Conformité - W3C
W3CValide='';
W3CValide+='<table width="100%"  border="0" cellspacing="0" cellpadding="0">';
W3CValide+='<tr>';
W3CValide+='<td>&nbsp;</td>';
W3CValide+='<td><img src="images/W3C_XHTML_Valide.bmp" alt="" /></td>';
W3CValide+='<td>&nbsp;</td>';
W3CValide+=' </tr>';
W3CValide+='</table>';
W3CValide+='<br>';
// Conformité - W3C + CSS
W3CCSSValide='';
W3CCSSValide+='<table width="100%"  border="0" cellspacing="0" cellpadding="0">';
W3CCSSValide+='<tr>';
W3CCSSValide+='<td>&nbsp;</td>';
W3CCSSValide+='<td><img src="images/W3C_XHTML_Valide.bmp" alt="" />';
W3CCSSValide+='<img src="images/W3C_CSS_Valide.bmp" alt="Valide CSS" /></td>';
W3CCSSValide+='<td>&nbsp;</td>';
W3CCSSValide+=' </tr>';
W3CCSSValide+='</table>';
W3CCSSValide+='<br>';
// Conformité - W3C + CSS + WAI
W3CCSSWAIValide='';
W3CCSSWAIValide='';
W3CCSSWAIValide+='<table width="100%"  border="0" cellspacing="0" cellpadding="0">';
W3CCSSWAIValide+='<tr>';
W3CCSSWAIValide+='<td>&nbsp;</td>';
W3CCSSWAIValide+='<td><img src="images/W3C_XHTML_Valide.bmp" alt="" />';
W3CCSSWAIValide+='<img src="images/W3C_CSS_Valide.bmp" alt="Valide CSS" />';
W3CCSSWAIValide+='<img src="images/W3C_WAI-AA_Valide.bmp" alt="" longdesc="WAI Valide" /></td>';
W3CCSSWAIValide+='<td>&nbsp;</td>';
W3CCSSWAIValide+=' </tr>';
W3CCSSWAIValide+='</table>';
W3CCSSWAIValide+='<br>';


// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
// ===================================================================

/* SOURCE FILE: AnchorPosition.js */

/* 
AnchorPosition.js
Author: Matt Kruse
Last modified: 10/11/02

DESCRIPTION: These functions find the position of an <A> tag in a document,
so other elements can be positioned relative to it.

COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the 
Macintosh platform.

FUNCTIONS:
getAnchorPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor. Position is relative to the PAGE.

getAnchorWindowPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.

NOTES:

1) For popping up separate browser windows, use getAnchorWindowPosition. 
   Otherwise, use getAnchorPosition

2) Your anchor tag MUST contain both NAME and ID attributes which are the 
   same. For example:
   <A NAME="test" ID="test"> </A>

3) There must be at least a space between <A> </A> for IE5.5 to see the 
   anchor tag correctly. Do not do <A></A> with no space.
*/ 

// getAnchorPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates=getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x=coordinates.x-document.body.scrollLeft+window.screenLeft;
			y=coordinates.y-document.body.scrollTop+window.screenTop;
			}
		else {
			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
			}
		}
	else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
		}
	else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
	}

/* SOURCE FILE: date.js */

// HISTORY
// ------------------------------------------------------------------
// 26 mai 2009: Ajout de la version française des mois 
//              et des jours de la semaine (Francis Chabot)

// ------------------------------------------------------------------
// These functions use the same 'format' strings as the 
// java.text.SimpleDateFormat class, with minor exceptions.
// The format string consists of the following abbreviations:
// 
// Field        | Full Form          | Short Form
// -------------+--------------------+-----------------------
// Year         | yyyy (4 digits)    | yy (2 digits), y (2 or 4 digits)
// Month        | MMM (name or abbr.)| MM (2 digits), M (1 or 2 digits)
//              | NNN (abbr.)        |
// Day of Month | dd (2 digits)      | d (1 or 2 digits)
// Day of Week  | EE (name)          | E (abbr)
// Hour (1-12)  | hh (2 digits)      | h (1 or 2 digits)
// Hour (0-23)  | HH (2 digits)      | H (1 or 2 digits)
// Hour (0-11)  | KK (2 digits)      | K (1 or 2 digits)
// Hour (1-24)  | kk (2 digits)      | k (1 or 2 digits)
// Minute       | mm (2 digits)      | m (1 or 2 digits)
// Second       | ss (2 digits)      | s (1 or 2 digits)
// AM/PM        | a                  |
//
// NOTE THE DIFFERENCE BETWEEN MM and mm! Month=MM, not mm!
// Examples:
//  "MMM d, y" matches: January 01, 2000
//                      Dec 1, 1900
//                      Nov 20, 00
//  "M/d/yy"   matches: 01/20/00
//                      9/2/00
//  "MMM dd, yyyy hh:mm:ssa" matches: "January 01, 2000 12:30:45AM"
// ------------------------------------------------------------------

// Modification - Francis Chabot (26 mai 2009) - Ajouter la version française des mois et jours de la semaine
if(stat_langue == "fr")
{
	var MONTH_NAMES = new Array('Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Decembre','Jan','Fev','Mar','Avr','Mai','Jun','Jul','Auo','Sep','Oct','Nov','Dec');
	var DAY_NAMES = new Array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi','Dim','Lun','Mar','Mer','Jeu','Ven','Sam');
}
else
{
	var MONTH_NAMES = new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var DAY_NAMES = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');
}
// Fin Modification 

function LZ(x) {return(x<0||x>9?"":"0")+x}

// ------------------------------------------------------------------
// isDate ( date_string, format_string )
// Returns true if date string matches format of format string and
// is a valid date. Else returns false.
// It is recommended that you trim whitespace around the value before
// passing it to this function, as whitespace is NOT ignored!
// ------------------------------------------------------------------
function isDate(val,format) {
	var date=getDateFromFormat(val,format);
	if (date==0) { return false; }
	return true;
	}

// -------------------------------------------------------------------
// compareDates(date1,date1format,date2,date2format)
//   Compare two date strings to see which is greater.
//   Returns:
//   1 if date1 is greater than date2
//   0 if date2 is greater than date1 of if they are the same
//  -1 if either of the dates is in an invalid format
// -------------------------------------------------------------------
function compareDates(date1,dateformat1,date2,dateformat2) {
	var d1=getDateFromFormat(date1,dateformat1);
	var d2=getDateFromFormat(date2,dateformat2);
	if (d1==0 || d2==0) {
		return -1;
		}
	else if (d1 > d2) {
		return 1;
		}
	return 0;
	}

// ------------------------------------------------------------------
// formatDate (date_object, format)
// Returns a date in the output format specified.
// The format string uses the same abbreviations as in getDateFromFormat()
// ------------------------------------------------------------------
function formatDate(date,format) {
	format=format+"";
	var result="";
	var i_format=0;
	var c="";
	var token="";
	var y=date.getYear()+"";
	var M=date.getMonth()+1;
	var d=date.getDate();
	var E=date.getDay();
	var H=date.getHours();
	var m=date.getMinutes();
	var s=date.getSeconds();
	var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;
	// Convert real date parts into formatted versions
	var value=new Object();
	if (y.length < 4) {y=""+(y-0+1900);}
	value["y"]=""+y;
	value["yyyy"]=y;
	value["yy"]=y.substring(2,4);
	value["M"]=M;
	value["MM"]=LZ(M);
	value["MMM"]=MONTH_NAMES[M-1];
	value["NNN"]=MONTH_NAMES[M+11];
	value["d"]=d;
	value["dd"]=LZ(d);
	value["E"]=DAY_NAMES[E+7];
	value["EE"]=DAY_NAMES[E];
	value["H"]=H;
	value["HH"]=LZ(H);
	if (H==0){value["h"]=12;}
	else if (H>12){value["h"]=H-12;}
	else {value["h"]=H;}
	value["hh"]=LZ(value["h"]);
	if (H>11){value["K"]=H-12;} else {value["K"]=H;}
	value["k"]=H+1;
	value["KK"]=LZ(value["K"]);
	value["kk"]=LZ(value["k"]);
	if (H > 11) { value["a"]="PM"; }
	else { value["a"]="AM"; }
	value["m"]=m;
	value["mm"]=LZ(m);
	value["s"]=s;
	value["ss"]=LZ(s);
	while (i_format < format.length) {
		c=format.charAt(i_format);
		token="";
		while ((format.charAt(i_format)==c) && (i_format < format.length)) {
			token += format.charAt(i_format++);
			}
		if (value[token] != null) { result=result + value[token]; }
		else { result=result + token; }
		}
	return result;
	}
	
// ------------------------------------------------------------------
// Utility functions for parsing in getDateFromFormat()
// ------------------------------------------------------------------
function _isInteger(val) {
	var digits="1234567890";
	for (var i=0; i < val.length; i++) {
		if (digits.indexOf(val.charAt(i))==-1) { return false; }
		}
	return true;
	}
function _getInt(str,i,minlength,maxlength) {
	for (var x=maxlength; x>=minlength; x--) {
		var token=str.substring(i,i+x);
		if (token.length < minlength) { return null; }
		if (_isInteger(token)) { return token; }
		}
	return null;
	}
	
// ------------------------------------------------------------------
// getDateFromFormat( date_string , format_string )
//
// This function takes a date string and a format string. It matches
// If the date string matches the format string, it returns the 
// getTime() of the date. If it does not match, it returns 0.
// ------------------------------------------------------------------
function getDateFromFormat(val,format) {
	val=val+"";
	format=format+"";
	var i_val=0;
	var i_format=0;
	var c="";
	var token="";
	var token2="";
	var x,y;
	var now=new Date();
	var year=now.getYear();
	var month=now.getMonth()+1;
	var date=1;
	var hh=now.getHours();
	var mm=now.getMinutes();
	var ss=now.getSeconds();
	var ampm="";
	
	while (i_format < format.length) {
		// Get next token from format string
		c=format.charAt(i_format);
		token="";
		while ((format.charAt(i_format)==c) && (i_format < format.length)) {
			token += format.charAt(i_format++);
			}
		// Extract contents of value based on format token
		if (token=="yyyy" || token=="yy" || token=="y") {
			if (token=="yyyy") { x=4;y=4; }
			if (token=="yy")   { x=2;y=2; }
			if (token=="y")    { x=2;y=4; }
			year=_getInt(val,i_val,x,y);
			if (year==null) { return 0; }
			i_val += year.length;
			if (year.length==2) {
				if (year > 70) { year=1900+(year-0); }
				else { year=2000+(year-0); }
				}
			}
		else if (token=="MMM"||token=="NNN"){
			month=0;
			for (var i=0; i<MONTH_NAMES.length; i++) {
				var month_name=MONTH_NAMES[i];
				if (val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase()) {
					if (token=="MMM"||(token=="NNN"&&i>11)) {
						month=i+1;
						if (month>12) { month -= 12; }
						i_val += month_name.length;
						break;
						}
					}
				}
			if ((month < 1)||(month>12)){return 0;}
			}
		else if (token=="EE"||token=="E"){
			for (var i=0; i<DAY_NAMES.length; i++) {
				var day_name=DAY_NAMES[i];
				if (val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()) {
					i_val += day_name.length;
					break;
					}
				}
			}
		else if (token=="MM"||token=="M") {
			month=_getInt(val,i_val,token.length,2);
			if(month==null||(month<1)||(month>12)){return 0;}
			i_val+=month.length;}
		else if (token=="dd"||token=="d") {
			date=_getInt(val,i_val,token.length,2);
			if(date==null||(date<1)||(date>31)){return 0;}
			i_val+=date.length;}
		else if (token=="hh"||token=="h") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<1)||(hh>12)){return 0;}
			i_val+=hh.length;}
		else if (token=="HH"||token=="H") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<0)||(hh>23)){return 0;}
			i_val+=hh.length;}
		else if (token=="KK"||token=="K") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<0)||(hh>11)){return 0;}
			i_val+=hh.length;}
		else if (token=="kk"||token=="k") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<1)||(hh>24)){return 0;}
			i_val+=hh.length;hh--;}
		else if (token=="mm"||token=="m") {
			mm=_getInt(val,i_val,token.length,2);
			if(mm==null||(mm<0)||(mm>59)){return 0;}
			i_val+=mm.length;}
		else if (token=="ss"||token=="s") {
			ss=_getInt(val,i_val,token.length,2);
			if(ss==null||(ss<0)||(ss>59)){return 0;}
			i_val+=ss.length;}
		else if (token=="a") {
			if (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";}
			else if (val.substring(i_val,i_val+2).toLowerCase()=="pm") {ampm="PM";}
			else {return 0;}
			i_val+=2;}
		else {
			if (val.substring(i_val,i_val+token.length)!=token) {return 0;}
			else {i_val+=token.length;}
			}
		}
	// If there are any trailing characters left in the value, it doesn't match
	if (i_val != val.length) { return 0; }
	// Is date valid for month?
	if (month==2) {
		// Check for leap year
		if ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year
			if (date > 29){ return 0; }
			}
		else { if (date > 28) { return 0; } }
		}
	if ((month==4)||(month==6)||(month==9)||(month==11)) {
		if (date > 30) { return 0; }
		}
	// Correct hours value
	if (hh<12 && ampm=="PM") { hh=hh-0+12; }
	else if (hh>11 && ampm=="AM") { hh-=12; }
	var newdate=new Date(year,month-1,date,hh,mm,ss);
	return newdate.getTime();
	}

// ------------------------------------------------------------------
// parseDate( date_string [, prefer_euro_format] )
//
// This function takes a date string and tries to match it to a
// number of possible date formats to get the value. It will try to
// match against the following international formats, in this order:
// y-M-d   MMM d, y   MMM d,y   y-MMM-d   d-MMM-y  MMM d
// M/d/y   M-d-y      M.d.y     MMM-d     M/d      M-d
// d/M/y   d-M-y      d.M.y     d-MMM     d/M      d-M
// A second argument may be passed to instruct the method to search
// for formats like d/M/y (european format) before M/d/y (American).
// Returns a Date object or null if no patterns match.
// ------------------------------------------------------------------
function parseDate(val) {
	var preferEuro=(arguments.length==2)?arguments[1]:false;
	generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d');
	monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d');
	dateFirst =new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M');
	var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst');
	var d=null;
	for (var i=0; i<checkList.length; i++) {
		var l=window[checkList[i]];
		for (var j=0; j<l.length; j++) {
			d=getDateFromFormat(val,l[j]);
			if (d!=0) { return new Date(d); }
			}
		}
	return null;
	}

/* SOURCE FILE: PopupWindow.js */

/* 
PopupWindow.js
Author: Matt Kruse
Last modified: 02/16/04

DESCRIPTION: This object allows you to easily and quickly popup a window
in a certain place. The window can either be a DIV or a separate browser
window.

COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the 
Macintosh platform. Due to bugs in Netscape 4.x, populating the popup 
window with <STYLE> tags may cause errors.

USAGE:
// Create an object for a WINDOW popup
var win = new PopupWindow(); 

// Create an object for a DIV window using the DIV named 'mydiv'
var win = new PopupWindow('mydiv'); 

// Set the window to automatically hide itself when the user clicks 
// anywhere else on the page except the popup
win.autoHide(); 

// Show the window relative to the anchor name passed in
win.showPopup(anchorname);

// Hide the popup
win.hidePopup();

// Set the size of the popup window (only applies to WINDOW popups
win.setSize(width,height);

// Populate the contents of the popup window that will be shown. If you 
// change the contents while it is displayed, you will need to refresh()
win.populate(string);

// set the URL of the window, rather than populating its contents
// manually
win.setUrl("http://www.site.com/");

// Refresh the contents of the popup
win.refresh();

// Specify how many pixels to the right of the anchor the popup will appear
win.offsetX = 50;

// Specify how many pixels below the anchor the popup will appear
win.offsetY = 100;

NOTES:
1) Requires the functions in AnchorPosition.js

2) Your anchor tag MUST contain both NAME and ID attributes which are the 
   same. For example:
   <A NAME="test" ID="test"> </A>

3) There must be at least a space between <A> </A> for IE5.5 to see the 
   anchor tag correctly. Do not do <A></A> with no space.

4) When a PopupWindow object is created, a handler for 'onmouseup' is
   attached to any event handler you may have already defined. Do NOT define
   an event handler for 'onmouseup' after you define a PopupWindow object or
   the autoHide() will not work correctly.
*/ 

// Set the position of the popup window based on the anchor
function PopupWindow_getXYPosition(anchorname) {
	var coordinates;
	if (this.type == "WINDOW") {
		coordinates = getAnchorWindowPosition(anchorname);
		}
	else {
		coordinates = getAnchorPosition(anchorname);
		}
	this.x = coordinates.x;
	this.y = coordinates.y;
	}
// Set width/height of DIV/popup window
function PopupWindow_setSize(width,height) {
	this.width = width;
	this.height = height;
	}
// Fill the window with contents
function PopupWindow_populate(contents) {
	this.contents = contents;
	this.populated = false;
	}
// Set the URL to go to
function PopupWindow_setUrl(url) {
	this.url = url;
	}
// Set the window popup properties
function PopupWindow_setWindowProperties(props) {
	this.windowProperties = props;
	}
// Refresh the displayed contents of the popup
function PopupWindow_refresh() {
	if (this.divName != null) {
		// refresh the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).innerHTML = this.contents;
			}
		else if (this.use_css) { 
			document.all[this.divName].innerHTML = this.contents;
			}
		else if (this.use_layers) { 
			var d = document.layers[this.divName]; 
			d.document.open();
			d.document.writeln(this.contents);
			d.document.close();
			}
		}
	else {
		if (this.popupWindow != null && !this.popupWindow.closed) {
			if (this.url!="") {
				this.popupWindow.location.href=this.url;
				}
			else {
				this.popupWindow.document.open();
				this.popupWindow.document.writeln(this.contents);
				this.popupWindow.document.close();
			}
			this.popupWindow.focus();
			}
		}
	}
// Position and show the popup, relative to an anchor object
function PopupWindow_showPopup(anchorname) {
	this.getXYPosition(anchorname);
	this.x += this.offsetX;
	this.y += this.offsetY;
	if (!this.populated && (this.contents != "")) {
		this.populated = true;
		this.refresh();
		}
	if (this.divName != null) {
		// Show the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).style.left = this.x + "px";
			document.getElementById(this.divName).style.top = this.y + "px";
			document.getElementById(this.divName).style.visibility = "visible";
			}
		else if (this.use_css) {
			document.all[this.divName].style.left = this.x;
			document.all[this.divName].style.top = this.y;
			document.all[this.divName].style.visibility = "visible";
			}
		else if (this.use_layers) {
			document.layers[this.divName].left = this.x;
			document.layers[this.divName].top = this.y;
			document.layers[this.divName].visibility = "visible";
			}
		}
	else {
		if (this.popupWindow == null || this.popupWindow.closed) {
			// If the popup window will go off-screen, move it so it doesn't
			if (this.x<0) { this.x=0; }
			if (this.y<0) { this.y=0; }
			if (screen && screen.availHeight) {
				if ((this.y + this.height) > screen.availHeight) {
					this.y = screen.availHeight - this.height;
					}
				}
			if (screen && screen.availWidth) {
				if ((this.x + this.width) > screen.availWidth) {
					this.x = screen.availWidth - this.width;
					}
				}
			var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled );
			this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
			}
		this.refresh();
		}
	}
// Hide the popup
function PopupWindow_hidePopup() {
	if (this.divName != null) {
		if (this.use_gebi) {
			document.getElementById(this.divName).style.visibility = "hidden";
			}
		else if (this.use_css) {
			document.all[this.divName].style.visibility = "hidden";
			}
		else if (this.use_layers) {
			document.layers[this.divName].visibility = "hidden";
			}
		}
	else {
		if (this.popupWindow && !this.popupWindow.closed) {
			this.popupWindow.close();
			this.popupWindow = null;
			}
		}
	}
// Pass an event and return whether or not it was the popup DIV that was clicked
function PopupWindow_isClicked(e) {
	if (this.divName != null) {
		if (this.use_layers) {
			var clickX = e.pageX;
			var clickY = e.pageY;
			var t = document.layers[this.divName];
			if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
				return true;
				}
			else { return false; }
			}
		else if (document.all) { // Need to hard-code this to trap IE for error-handling
			var t = window.event.srcElement;
			while (t.parentElement != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentElement;
				}
			return false;
			}
		else if (this.use_gebi && e) {
			var t = e.originalTarget;
			while (t.parentNode != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentNode;
				}
			return false;
			}
		return false;

		}
	return false;
	}

// Check an onMouseDown event to see if we should hide
function PopupWindow_hideIfNotClicked(e) {
	if (this.autoHideEnabled && !this.isClicked(e)) {
		this.hidePopup();
		}
	}
// Call this to make the DIV disable automatically when mouse is clicked outside it
function PopupWindow_autoHide() {
	this.autoHideEnabled = true;
	}
// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
function PopupWindow_hidePopupWindows(e) {
	for (var i=0; i<popupWindowObjects.length; i++) {
		if (popupWindowObjects[i] != null) {
			var p = popupWindowObjects[i];
			p.hideIfNotClicked(e);
			}
		}
	}
// Run this immediately to attach the event listener
function PopupWindow_attachListener() {
	if (document.layers) {
		document.captureEvents(Event.MOUSEUP);
		}
	window.popupWindowOldEventListener = document.onmouseup;
	if (window.popupWindowOldEventListener != null) {
		document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
		}
	else {
		document.onmouseup = PopupWindow_hidePopupWindows;
		}
	}
// CONSTRUCTOR for the PopupWindow object
// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
function PopupWindow() {
	if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
	if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
	if (!window.listenerAttached) {
		window.listenerAttached = true;
		PopupWindow_attachListener();
		}
	this.index = popupWindowIndex++;
	popupWindowObjects[this.index] = this;
	this.divName = null;
	this.popupWindow = null;
	this.width=0;
	this.height=0;
	this.populated = false;
	this.visible = false;
	this.autoHideEnabled = false;
	
	this.contents = "";
	this.url="";
	this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
	if (arguments.length>0) {
		this.type="DIV";
		this.divName = arguments[0];
		}
	else {
		this.type="WINDOW";
		}
	this.use_gebi = false;
	this.use_css = false;
	this.use_layers = false;
	if (document.getElementById) { this.use_gebi = true; }
	else if (document.all) { this.use_css = true; }
	else if (document.layers) { this.use_layers = true; }
	else { this.type = "WINDOW"; }
	this.offsetX = 0;
	this.offsetY = 0;
	// Method mappings
	this.getXYPosition = PopupWindow_getXYPosition;
	this.populate = PopupWindow_populate;
	this.setUrl = PopupWindow_setUrl;
	this.setWindowProperties = PopupWindow_setWindowProperties;
	this.refresh = PopupWindow_refresh;
	this.showPopup = PopupWindow_showPopup;
	this.hidePopup = PopupWindow_hidePopup;
	this.setSize = PopupWindow_setSize;
	this.isClicked = PopupWindow_isClicked;
	this.autoHide = PopupWindow_autoHide;
	this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
	}

/* SOURCE FILE: CalendarPopup.js */

// HISTORY
// ------------------------------------------------------------------
// 26 mai 2009: Élimination des appels à la fonction eval pour des
//              raisons de performance sous FF et IE7+ (Francis Chabot)

/* 
DESCRIPTION: This object implements a popup calendar to allow the user to
select a date, month, quarter, or year.

COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the 
Macintosh platform.
The calendar can be modified to work for any location in the world by 
changing which weekday is displayed as the first column, changing the month
names, and changing the column headers for each day.

USAGE:
// Create a new CalendarPopup object of type WINDOW
var cal = new CalendarPopup(); 

// Create a new CalendarPopup object of type DIV using the DIV named 'mydiv'
var cal = new CalendarPopup('mydiv'); 

// Easy method to link the popup calendar with an input box. 
cal.select(inputObject, anchorname, dateFormat);
// Same method, but passing a default date other than the field's current value
cal.select(inputObject, anchorname, dateFormat, '01/02/2000');
// This is an example call to the popup calendar from a link to populate an 
// input box. Note that to use this, date.js must also be included!!
<A HREF="#" onClick="cal.select(document.forms[0].date,'anchorname','MM/dd/yyyy'); return false;">Select</A>

// Set the type of date select to be used. By default it is 'date'.
cal.setDisplayType(type);

// When a date, month, quarter, or year is clicked, a function is called and
// passed the details. You must write this function, and tell the calendar
// popup what the function name is.
// Function to be called for 'date' select receives y, m, d
cal.setReturnFunction(functionname);
// Function to be called for 'month' select receives y, m
cal.setReturnMonthFunction(functionname);
// Function to be called for 'quarter' select receives y, q
cal.setReturnQuarterFunction(functionname);
// Function to be called for 'year' select receives y
cal.setReturnYearFunction(functionname);

// Show the calendar relative to a given anchor
cal.showCalendar(anchorname);

// Hide the calendar. The calendar is set to autoHide automatically
cal.hideCalendar();

// Set the month names to be used. Default are English month names
cal.setMonthNames("January","February","March",...);

// Set the month abbreviations to be used. Default are English month abbreviations
cal.setMonthAbbreviations("Jan","Feb","Mar",...);

// Show navigation for changing by the year, not just one month at a time
cal.showYearNavigation();

// Show month and year dropdowns, for quicker selection of month of dates
cal.showNavigationDropdowns();

// Set the text to be used above each day column. The days start with 
// sunday regardless of the value of WeekStartDay
cal.setDayHeaders("S","M","T",...);

// Set the day for the first column in the calendar grid. By default this
// is Sunday (0) but it may be changed to fit the conventions of other
// countries.
cal.setWeekStartDay(1); // week is Monday - Sunday

// Set the weekdays which should be disabled in the 'date' select popup. You can
// then allow someone to only select week end dates, or Tuedays, for example
cal.setDisabledWeekDays(0,1); // To disable selecting the 1st or 2nd days of the week

// Selectively disable individual days or date ranges. Disabled days will not
// be clickable, and show as strike-through text on current browsers.
// Date format is any format recognized by parseDate() in date.js
// Pass a single date to disable:
cal.addDisabledDates("2003-01-01");
// Pass null as the first parameter to mean "anything up to and including" the
// passed date:
cal.addDisabledDates(null, "01/02/03");
// Pass null as the second parameter to mean "including the passed date and
// anything after it:
cal.addDisabledDates("Jan 01, 2003", null);
// Pass two dates to disable all dates inbetween and including the two
cal.addDisabledDates("January 01, 2003", "Dec 31, 2003");

// When the 'year' select is displayed, set the number of years back from the 
// current year to start listing years. Default is 2.
// This is also used for year drop-down, to decide how many years +/- to display
cal.setYearSelectStartOffset(2);

// Text for the word "Today" appearing on the calendar
cal.setTodayText("Today");

// The calendar uses CSS classes for formatting. If you want your calendar to
// have unique styles, you can set the prefix that will be added to all the
// classes in the output.
// For example, normal output may have this:
//     <SPAN CLASS="cpTodayTextDisabled">Today<SPAN>
// But if you set the prefix like this:
cal.setCssPrefix("Test");
// The output will then look like:
//     <SPAN CLASS="TestcpTodayTextDisabled">Today<SPAN>
// And you can define that style somewhere in your page.

// When using Year navigation, you can make the year be an input box, so
// the user can manually change it and jump to any year
cal.showYearNavigationInput();

// Set the calendar offset to be different than the default. By default it
// will appear just below and to the right of the anchorname. So if you have
// a text box where the date will go and and anchor immediately after the
// text box, the calendar will display immediately under the text box.
cal.offsetX = 20;
cal.offsetY = 20;

NOTES:
1) Requires the functions in AnchorPosition.js and PopupWindow.js

2) Your anchor tag MUST contain both NAME and ID attributes which are the 
   same. For example:
   <A NAME="test" ID="test"> </A>

3) There must be at least a space between <A> </A> for IE5.5 to see the 
   anchor tag correctly. Do not do <A></A> with no space.

4) When a CalendarPopup object is created, a handler for 'onmouseup' is
   attached to any event handler you may have already defined. Do NOT define
   an event handler for 'onmouseup' after you define a CalendarPopup object 
   or the autoHide() will not work correctly.
   
5) The calendar popup display uses style sheets to make it look nice.

*/ 

// Quick fix for FF3

function CP_stop(e) { if (e && e.stopPropagation) { e.stopPropagation(); } }

// CONSTRUCTOR for the CalendarPopup Object
function CalendarPopup() {

	//alert(DatesStart + DatesEnd);
	var c;
	if (arguments.length>0) {
		c = new PopupWindow(arguments[0]);
		}
	else {
		c = new PopupWindow();
		c.setSize(150,175);
		}
	c.offsetX = -152;
	c.offsetY = 25;
	c.autoHide();
	
	// Modification - Francis Chabot (26 mai 2009) - Ajouter la version française des mois et jours de la semaine
	if(stat_langue == "fr")
	{
		c.monthNames = new Array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
		c.monthAbbreviations = new Array("Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec");
		c.dayHeaders = new Array("D","L","M","M","J","V","S");
	}
	else
	{
		c.monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
		c.monthAbbreviations = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
		c.dayHeaders = new Array("S","M","T","W","T","F","S");
	}
	// Fin Modification
	
	// Calendar-specific properties
	c.returnFunction = "CP_tmpReturnFunction";
	c.returnMonthFunction = "CP_tmpReturnMonthFunction";
	c.returnQuarterFunction = "CP_tmpReturnQuarterFunction";
	c.returnYearFunction = "CP_tmpReturnYearFunction";
	c.weekStartDay = 0;
	c.isShowYearNavigation = false;
	c.displayType = "date";
	c.disabledWeekDays = new Object();


	
	// Modification - Francis Chabot (26 mai 2009) - Ajouter un array permettant de gérer les dates désactivées sans utiliser la fonction eval trop lente sous FF et IE7+
	c.disabledDates = new Array();
	// Fin Modification
	
	c.yearSelectStartOffset = 2;
	c.currentDate = null;
	c.todayText="";
	c.cssPrefix="";
	c.isShowNavigationDropdowns=false;
	c.isShowYearNavigationInput=false;
	window.CP_calendarObject = null;
	window.CP_targetInput = null;
	window.CP_dateFormat = "MM/dd/yyyy";
	// Method mappings
	c.copyMonthNamesToWindow = CP_copyMonthNamesToWindow;
	c.setReturnFunction = CP_setReturnFunction;
	c.setReturnMonthFunction = CP_setReturnMonthFunction;
	c.setReturnQuarterFunction = CP_setReturnQuarterFunction;
	c.setReturnYearFunction = CP_setReturnYearFunction;
	c.setMonthNames = CP_setMonthNames;
	c.setMonthAbbreviations = CP_setMonthAbbreviations;
	c.setDayHeaders = CP_setDayHeaders;
	c.setWeekStartDay = CP_setWeekStartDay;
	c.setDisplayType = CP_setDisplayType;
	c.setDisabledWeekDays = CP_setDisabledWeekDays;
	c.addDisabledDates = CP_addDisabledDates;
	c.setYearSelectStartOffset = CP_setYearSelectStartOffset;
	c.setTodayText = CP_setTodayText;
	c.showYearNavigation = CP_showYearNavigation;
	c.showCalendar = CP_showCalendar;
	c.hideCalendar = CP_hideCalendar;
	c.getStyles = getCalendarStyles;
	c.refreshCalendar = CP_refreshCalendar;
	c.getdate = CP_getdate;
	c.getCalendar = CP_getCalendar;
	c.select = CP_select;
	c.setCssPrefix = CP_setCssPrefix;
	c.showNavigationDropdowns = CP_showNavigationDropdowns;
	c.showYearNavigationInput = CP_showYearNavigationInput;
	c.copyMonthNamesToWindow();
	// Return the object
	return c;
	}
function CP_copyMonthNamesToWindow() {
	// Copy these values over to the date.js 
	if (typeof(window.MONTH_NAMES)!="undefined" && window.MONTH_NAMES!=null) {
		window.MONTH_NAMES = new Array();
		for (var i=0; i<this.monthNames.length; i++) {
			window.MONTH_NAMES[window.MONTH_NAMES.length] = this.monthNames[i];
		}
		for (var i=0; i<this.monthAbbreviations.length; i++) {
			window.MONTH_NAMES[window.MONTH_NAMES.length] = this.monthAbbreviations[i];
		}
	}
}
// Temporary default functions to be called when items clicked, so no error is thrown
function CP_tmpReturnFunction(y,m,d) { 
	if (window.CP_targetInput!=null) {
		var dt = new Date(y,m-1,d,0,0,0);
		if (window.CP_calendarObject!=null) { window.CP_calendarObject.copyMonthNamesToWindow(); }
		window.CP_targetInput.value = formatDate(dt,window.CP_dateFormat);
		}
	else {
		alert('Use setReturnFunction() to define which function will get the clicked results!'); 
		}
	}
function CP_tmpReturnMonthFunction(y,m) { 
	alert('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m); 
	}
function CP_tmpReturnQuarterFunction(y,q) { 
	alert('Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q); 
	}
function CP_tmpReturnYearFunction(y) { 
	alert('Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y); 
	}

// Set the name of the functions to call to get the clicked item
function CP_setReturnFunction(name) { this.returnFunction = name; }
function CP_setReturnMonthFunction(name) { this.returnMonthFunction = name; }
function CP_setReturnQuarterFunction(name) { this.returnQuarterFunction = name; }
function CP_setReturnYearFunction(name) { this.returnYearFunction = name; }

// Over-ride the built-in month names
function CP_setMonthNames() {
	for (var i=0; i<arguments.length; i++) { this.monthNames[i] = arguments[i]; }
	this.copyMonthNamesToWindow();
	}

// Over-ride the built-in month abbreviations
function CP_setMonthAbbreviations() {
	for (var i=0; i<arguments.length; i++) { this.monthAbbreviations[i] = arguments[i]; }
	this.copyMonthNamesToWindow();
	}

// Over-ride the built-in column headers for each day
function CP_setDayHeaders() {
	for (var i=0; i<arguments.length; i++) { this.dayHeaders[i] = arguments[i]; }
	}

// Set the day of the week (0-7) that the calendar display starts on
// This is for countries other than the US whose calendar displays start on Monday(1), for example
function CP_setWeekStartDay(day) { this.weekStartDay = day; }

// Show next/last year navigation links
function CP_showYearNavigation() { this.isShowYearNavigation = (arguments.length>0)?arguments[0]:true; }

// Which type of calendar to display
function CP_setDisplayType(type) {
	if (type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year") { alert("Invalid display type! Must be one of: date,week-end,month,quarter,year"); return false; }
	this.displayType=type;
	}

// How many years back to start by default for year display
function CP_setYearSelectStartOffset(num) { this.yearSelectStartOffset=num; }

// Set which weekdays should not be clickable
function CP_setDisabledWeekDays() {
	this.disabledWeekDays = new Object();
	for (var i=0; i<arguments.length; i++) { this.disabledWeekDays[arguments[i]] = true; }
	}
	
// Modification - Francis Chabot (26 mai 2009) - Modifier la fonction CP_addDisabledDates pour ne plus utiliser la fonction eval trop lente sous FF et IE7+
// Disable individual dates or ranges
// Builds an internal logical test which is run via eval() for efficiency
function CP_addDisabledDates(start, end) 
{	
	if(arguments.length == 1) end = start;
	
	start = parseDate(start);
	end = parseDate(end); 
	
	if(start == null && end == null) return;
	
	if(start != null) start = "" + start.getFullYear() + LZ(start.getMonth()+1) + LZ(start.getDate());
	if(end != null) end = "" + end.getFullYear() + LZ(end.getMonth()+1) + LZ(end.getDate());
	
	this.disabledDates.push(new Array(start, end));
}
// Fin Modification
	
// Set the text to use for the "Today" link
function CP_setTodayText(text) {
	this.todayText = text;
	}

// Set the prefix to be added to all CSS classes when writing output
function CP_setCssPrefix(val) { 
	this.cssPrefix = val; 
	}

// Show the navigation as an dropdowns that can be manually changed
function CP_showNavigationDropdowns() { this.isShowNavigationDropdowns = (arguments.length>0)?arguments[0]:true; }

// Show the year navigation as an input box that can be manually changed
function CP_showYearNavigationInput() { this.isShowYearNavigationInput = (arguments.length>0)?arguments[0]:true; }

// Hide a calendar object
function CP_hideCalendar() {
	if (arguments.length > 0) { window.popupWindowObjects[arguments[0]].hidePopup(); }
	else { this.hidePopup(); }
	}

// Refresh the contents of the calendar display
function CP_refreshCalendar(index) {
	var calObject = window.popupWindowObjects[index];
	if (arguments.length>1) { 
		calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));
		}
	else {
		calObject.populate(calObject.getCalendar());
		}
	calObject.refresh();
	}

// Populate the calendar and display it
function CP_showCalendar(anchorname) {
	if (arguments.length>1) {
		if (arguments[1]==null||arguments[1]=="") {
			this.currentDate=new Date();
			}
		else {
			this.currentDate=new Date(parseDate(arguments[1]));
			}
		}
	this.populate(this.getCalendar());
	this.showPopup(anchorname);
	}

// Simple method to interface popup calendar with a text-entry box
function CP_select(inputobj, linkname, format) {
	
	var selectedDate=(arguments.length>3)?arguments[3]:null;
	if (!window.getDateFromFormat) {
		alert("calendar.select: To use this method you must also include 'date.js' for date formatting");
		return;
		}
	if (this.displayType!="date"&&this.displayType!="week-end") {
		alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");
		return;
		}
	if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") { 
		alert("calendar.select: Input object passed is not a valid form input object"); 
		window.CP_targetInput=null;
		return;
		}
	if (inputobj.disabled) { return; } // Can't use calendar input on disabled form input!
	window.CP_targetInput = inputobj;
	window.CP_calendarObject = this;
	this.currentDate=null;
	var time=0;
	if (selectedDate!=null) {
		time = getDateFromFormat(selectedDate,format)
		}
	else if (inputobj.value!="") {
		time = getDateFromFormat(inputobj.value,format);
		}
	if (selectedDate!=null || inputobj.value!="") {
		if (time==0) { this.currentDate=null; }
		else { this.currentDate=new Date(time); }
		}
	window.CP_dateFormat = format;
	this.showCalendar(linkname);
	}
	
// Get style block needed to display the calendar correctly
function getCalendarStyles() {
	var result = "";
	var p = "";
	if (this!=null && typeof(this.cssPrefix)!="undefined" && this.cssPrefix!=null && this.cssPrefix!="") { p=this.cssPrefix; }
	result += "<STYLE>\n";
	result += "."+p+"cpYearNavigation,."+p+"cpMonthNavigation { background-color:#C0C0C0; text-align:center; vertical-align:center; text-decoration:none; color:#000000; font-weight:bold; }\n";
	result += "."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText { font-family:arial; font-size:8pt; }\n";
	result += "TD."+p+"cpDayColumnHeader { text-align:right; border:solid thin #C0C0C0;border-width:0px 0px 1px 0px; }\n";
	result += "."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate  { text-align:right; text-decoration:none; }\n";
	result += "."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+p+"cpCurrentDateDisabled { color:#D0D0D0; text-align:right; text-decoration:line-through; }\n";
	result += "."+p+"cpCurrentMonthDate, .cpCurrentDate { color:#000000; }\n";
	result += "."+p+"cpOtherMonthDate { color:#808080; }\n";
	result += "TD."+p+"cpCurrentDate { color:white; background-color: #C0C0C0; border-width:1px; border:solid thin #800000; }\n";
	result += "TD."+p+"cpCurrentDateDisabled { border-width:1px; border:solid thin #FFAAAA; }\n";
	result += "TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled { border:solid thin #C0C0C0; border-width:1px 0px 0px 0px;}\n";
	result += "A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled { height:20px; }\n";
	result += "A."+p+"cpTodayText { color:black; }\n";
	result += "."+p+"cpTodayTextDisabled { color:#D0D0D0; }\n";
	result += "."+p+"cpBorder { border:solid thin #808080; }\n";
	result += "</STYLE>\n";
	return result;
	}

//pour initialilsé les dates
function CP_getdate(start,end)
{
 datestart = start;
 dateend = end;
	}

// Return a string containing all the calendar code to be displayed
function CP_getCalendar() {
	var now = new Date();
	// Reference to window
	if (this.type == "WINDOW") { var windowref = "window.opener."; }
	else { var windowref = ""; }
	var result = "";
	// If POPUP, write entire HTML document
	if (this.type == "WINDOW") {
		result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";
		result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';
		}
	else {
		result += '<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';
		result += '<TR><TD ALIGN=CENTER>\n';
		result += '<CENTER>\n';
		}
	// Code for DATE display (default)
	// -------------------------------
	if (this.displayType=="date" || this.displayType=="week-end") {
		if (this.currentDate==null) { this.currentDate = now; }
		if (arguments.length > 0) { var month = arguments[0]; }
			else { var month = this.currentDate.getMonth()+1; }
		if (arguments.length > 1 && arguments[1]>0 && arguments[1]-0==arguments[1]) { var year = arguments[1]; }
			else { var year = this.currentDate.getFullYear(); }
		var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
		if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) {
			daysinmonth[2] = 29;
			}
		var current_month = new Date(year,month-1,1);
		var display_year = year;
		var display_month = month;
		var display_date = 1;
		var weekday= current_month.getDay();
		var offset = 0;
		offset = (weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekday ;
		if (offset > 0) {
			display_month--;
			if (display_month < 1) { display_month = 12; display_year--; }
			display_date = daysinmonth[display_month]-offset+1;
			}
		var next_month = month+1;
		var next_month_year = year;
		if (next_month > 12) { next_month=1; next_month_year++; }
		var last_month = month-1;
		var last_month_year = year;
		if (last_month < 1) { last_month=12; last_month_year--; }
		var date_class;
		if (this.type!="WINDOW") {
			result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
			}
		result += '<TR>\n';
		var refresh = windowref+'CP_refreshCalendar';
		var refreshLink = 'javascript:' + refresh;
		if (this.isShowNavigationDropdowns) {
			result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onmouseup="CP_stop(event)" onChange="'+refresh+'('+this.index+',this.options[this.selectedIndex].value-0,'+(year-0)+');">';
			for( var monthCounter=1; monthCounter<=12; monthCounter++ ) {
				var selected = (monthCounter==month) ? 'SELECTED' : '';
				result += '<option value="'+monthCounter+'" '+selected+'>'+this.monthNames[monthCounter-1]+'</option>';
				}
			result += '</select></TD>';
			result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';

			result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="56" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onmouseup="CP_stop(event)" onChange="'+refresh+'('+this.index+','+month+',this.options[this.selectedIndex].value-0);">';
			
			/*for( var yearCounter=year-this.yearSelectStartOffset; yearCounter<=year+this.yearSelectStartOffset; yearCounter++ ) {
				var selected = (yearCounter==year) ? 'SELECTED' : '';
				result += '<option value="'+yearCounter+'" '+selected+'>'+yearCounter+'</option>';
				}
			*/for( var yearCounter=datestart; yearCounter<=dateend; yearCounter++ ) {
				var selected = (yearCounter==year) ? 'SELECTED' : '';
				result += '<option value="'+yearCounter+'" '+selected+'>'+yearCounter+'</option>';
				}
			
			
			result += '</select></TD>';
			}
		else {
			if (this.isShowYearNavigation) {
				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+last_month+','+last_month_year+');">&lt;</A></TD>';
				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+'</SPAN></TD>';
				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+next_month+','+next_month_year+');">&gt;</A></TD>';
				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';

				result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+'('+this.index+','+month+','+(year-1)+');">&lt;</A></TD>';
				if (this.isShowYearNavigationInput) {
					result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+'('+this.index+','+month+',this.value-0);"></TD>';
					}
				else {
					result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+'</SPAN></TD>';
					}
				result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+'('+this.index+','+month+','+(year+1)+');">&gt;</A></TD>';
				}
			else {
				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+last_month+','+last_month_year+');">&lt;&lt;</A></TD>\n';
				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+' '+year+'</SPAN></TD>\n';
				result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+next_month+','+next_month_year+');">&gt;&gt;</A></TD>\n';
				}
			}
		result += '</TR></TABLE>\n';
		result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n';
		result += '<TR>\n';
		for (var j=0; j<7; j++) {

			result += '<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+'</TD>\n';
			}
		result += '</TR>\n';
		for (var row=1; row<=6; row++) {
			result += '<TR>\n';
			for (var col=1; col<=7; col++) {
				var disabled=false;
				
				// Modification - Francis Chabot (26 mai 2009) - Élimination de l'appel de la fonction eval trop lente sous FF et IE7+
				if(this.disabledDates.length > 0) 
				{
					var ds = "" + display_year + LZ(display_month) + LZ(display_date);

					for(var i = 0; i < this.disabledDates.length && disabled == false; i++)
					{
						if((ds >= this.disabledDates[i][0] || this.disabledDates[i][0] == null) && (ds <= this.disabledDates[i][1] || this.disabledDates[i][1] == null)) disabled = true;
					}
				}
				// Fin Modification
					
				var dateClass = "";
				if ((display_month == this.currentDate.getMonth()+1) && (display_date==this.currentDate.getDate()) && (display_year==this.currentDate.getFullYear())) {
					dateClass = "cpCurrentDate";
					}
				else if (display_month == month) {
					dateClass = "cpCurrentMonthDate";
					}
				else {
					dateClass = "cpOtherMonthDate";
					}
				if (disabled || this.disabledWeekDays[col-1]) {
					result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+'</SPAN></TD>\n';
					}
				else {
					var selected_date = display_date;
					var selected_month = display_month;
					var selected_year = display_year;
					if (this.displayType=="week-end") {
						var d = new Date(selected_year,selected_month-1,selected_date,0,0,0,0);
						d.setDate(d.getDate() + (7-col));
						selected_year = d.getYear();
						if (selected_year < 1000) { selected_year += 1900; }
						selected_month = d.getMonth()+1;
						selected_date = d.getDate();
						}
					result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+'('+selected_year+','+selected_month+','+selected_date+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+'</A></TD>\n';
					}
				display_date++;
				if (display_date > daysinmonth[display_month]) {
					display_date=1;
					display_month++;
					}
				if (display_month > 12) {
					display_month=1;
					display_year++;
					}
				}
			result += '</TR>';
			}
		var current_weekday = now.getDay() - this.weekStartDay;
		if (current_weekday < 0) {
			current_weekday += 7;
			}
		result += '<TR>\n';
		result += '	<TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';
		
		// Modification - Francis Chabot (26 mai 2009) - Élimination de l'appel de la fonction eval trop lente sous FF et IE7+
		if(this.disabledDates.length > 0) 
		{
			var ds = "" + now.getFullYear() + LZ(now.getMonth()+1) + LZ(now.getDate());

			for(var i = 0; i < this.disabledDates.length && disabled == false; i++)
			{
				if((ds >= this.disabledDates[i][0] || this.disabledDates[i][0] == null) && (ds <= this.disabledDates[i][1] || this.disabledDates[i][1] == null)) disabled = true;
			}
		}
		// Fin Modification
			
		if (disabled || this.disabledWeekDays[current_weekday+1]) {
			result += '		<SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+'</SPAN>\n';
			}
		else {
			result += '		<A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+'(\''+now.getFullYear()+'\',\''+(now.getMonth()+1)+'\',\''+now.getDate()+'\');'+windowref+'CP_hideCalendar(\''+this.index+'\');">'+this.todayText+'</A>\n';
			}
		result += '		<BR>\n';
		result += '	</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n';
	}

	// Code common for MONTH, QUARTER, YEAR
	// ------------------------------------
	if (this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year") {
		if (arguments.length > 0) { var year = arguments[0]; }
		else { 
			if (this.displayType=="year") {	var year = now.getFullYear()-this.yearSelectStartOffset; }
			else { var year = now.getFullYear(); }
			}
		if (this.displayType!="year" && this.isShowYearNavigation) {
			result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
			result += '<TR>\n';
			result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-1)+');">&lt;&lt;</A></TD>\n';
			result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+'</TD>\n';
			result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+1)+');">&gt;&gt;</A></TD>\n';
			result += '</TR></TABLE>\n';
			}
		}
		
	// Code for MONTH display 
	// ----------------------
	if (this.displayType=="month") {
		// If POPUP, write entire HTML document
		result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
		for (var i=0; i<4; i++) {
			result += '<TR>';
			for (var j=0; j<3; j++) {
				var monthindex = ((i*3)+j);
				result += '<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+'('+year+','+(monthindex+1)+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+'</A></TD>';
				}
			result += '</TR>';
			}
		result += '</TABLE></CENTER></TD></TR></TABLE>\n';
		}
	
	// Code for QUARTER display
	// ------------------------
	if (this.displayType=="quarter") {
		result += '<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n';
		for (var i=0; i<2; i++) {
			result += '<TR>';
			for (var j=0; j<2; j++) {
				var quarter = ((i*2)+j+1);
				result += '<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+'('+year+','+quarter+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+'</A><BR><BR></TD>';
				}
			result += '</TR>';
			}
		result += '</TABLE></CENTER></TD></TR></TABLE>\n';
		}

	// Code for YEAR display
	// ---------------------
	if (this.displayType=="year") {
		var yearColumnSize = 4;
		result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
		result += '<TR>\n';
		result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-(yearColumnSize*2))+');">&lt;&lt;</A></TD>\n';
		result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+(yearColumnSize*2))+');">&gt;&gt;</A></TD>\n';
		result += '</TR></TABLE>\n';
		result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
		for (var i=0; i<yearColumnSize; i++) {
			for (var j=0; j<2; j++) {
				var currentyear = year+(j*yearColumnSize)+i;
				result += '<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+'('+currentyear+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+currentyear+'</A></TD>';
				}
			result += '</TR>';
			}
		result += '</TABLE></CENTER></TD></TR></TABLE>\n';
		}
	// Common
	if (this.type == "WINDOW") {
		result += "</BODY></HTML>\n";
		}
	return result;
	}
