/*	Bienvenue Welcome 2002 : les commentaires sont en bas */
//initialisation globale
var	profondeur = ''; //où est la racine du site
var lalangue = '_fr'; //par défaut
var lasection = '';
var fenetrePDF = "undefined"


//script utilisé initialement pour le site mrst.gouv.qc.ca
//adapté pour enlever le menu de gauche de la page du bulletin Repères RSTI
//modif Yolande Bruneau 7 février 2003

//si on veut tester en dev


//function RedirMFER(){
	//--LBi021120-modification pour mise en ligne MFER-->
	//chtp = new String(document.referrer);
	//boule = chtp.indexOf('mfer.gouv.qc.ca')>=0 || chtp.indexOf('mrst.gouv.qc.ca')>=0 || chtp.indexOf('bw.qc.ca')>=0 || chtp.indexOf('cybercat')>=0 || chtp.indexOf('recherche2')>=0; 
	//if(!boule)document.location='http://www.mfer.gouv.qc.ca';
//}
//si on veut tester en dev
function EnteteMRST(){
	lasection=EnteteMRST.arguments[0];
	lalangue=EnteteMRST.arguments[1];
	p=parseInt(EnteteMRST.arguments[2]);
	if(p>=0){
		for(x=0;x<p;x++){
			profondeur += '../'; //chemin vers la racine du site
		}
	}else{
		profondeur = 'http://www.mrst.gouv.qc.ca/';
	}
	ch = '';
	//beaucoup de document.write à cause de N47
	document.write('<link rel="stylesheet" href="/cssmrst2002.css">');
	document.write('</HEAD>');
	document.write('<BODY  bgcolor="ffffff" link="000088" alink="000088" vlink="C54A01">') ;
	document.write('<table width="760" border="0" vspace="0" hspace="0" cellpadding="0" cellspacing="0" align="center">');//modif yb 290802
	document.write('<tr align=\"left\" valign=\"top\">');
	document.write('<td colspan="3" align="center">');
	document.write('<a name="Haut"></a>');
	document.write('<a name="TOP"></a>')//ajout yb 030129
	
	dessinePIV()
	//lbi = p>=0?dessinePIV():dessinePIVCNW('_fr');
	document.write('</td></tr>');
	document.write('<tr align=\"left\" valign=\"top\" id=\"colmenu\">');
	//bordure
	//document.write('<td width=\"10\">');
	//if(lalangue=="_fr"|lalangue=="_an") dessineMenu();
	//document.write('</td>');
//enleve la colonne du menu	//
document.write('<td colspan="2" width=\"57\" valign=\"top\" id=\"entre2col\"><img src="/imgMRST/menu_espace_droit.gif" border="0">');	 	 
	document.write('</td>');
	//élargi la page
	document.write('<td width=\"533\" valign=\"top\" id=\"colcontenu\" >');
	dessineSousMenu();
}
//****************************************************************************************************************
//*  Cette fonction dessine le PIV
//*  Barre de navigation du PIV---
//****************************************************************************************************************
function dessinePIV() {
	chaine = '';
	chaine += '<map name="MapPivMRST">';
	chaine += '<area shape="rect" coords="85,106,182,130" href="http://www.mdeie.gouv.qc.ca/index.php?id=6" alt="Entreprises">';

chaine += '<area shape="rect" coords="182,106,354,130" href="http://www.mdeie.gouv.qc.ca/index.php?id=7" ;alt="D&eacute;veloppement r&eacute;gional">'

chaine += '<area shape="rect" coords="354,106,453,130" href="http://www.mdeie.gouv.qc.ca/index.php?id=8" alt="Exportation">';

chaine += '<area shape="rect" coords="453,104,609,130" href="http://www.mdeie.gouv.qc.ca/index.php?id=9" alt="Science et technologie">';

chaine += '<area shape="rect" coords="1,106,85,130" href="http://www.mdeie.gouv.qc.ca/index.php?id=5" alt="Minist&egrave;re">';

chaine += '<area shape="rect" coords="250,59,294,72" href="http://www.mdeie.gouv.qc.ca/" alt="Site du MDERR">';

chaine += '<area shape="rect" coords="3,3,209,78" href="http://www.mdeie.gouv.qc.ca/" alt="Site du MDERR">';

chaine += '<area shape="rect" coords="305,58,366,72" href="http://www.mdeie.gouv.qc.ca/index.php?id=116" alt="Plan du site">';

chaine += '<area shape="rect" coords="374,58,442,73" href="http://www.mdeie.gouv.qc.ca/index.php?id=117" alt="Nous joindre">';

chaine += '<area shape="rect" coords="447,58,521,72" href="http://www.gouv.qc.ca/" alt="Portail Qu&eacute;bec">';

chaine += '<area shape="rect" coords="531,58,587,73" href="http://recherched.gouv.qc.ca/mdeie/search.do?searchIn=sc_mdeie&charSet=ISO-8859-1&includesDir=http%3A%2F%2Fwww.mdeie.gouv.qc.ca%2Ffileadmin%2Frecherche%2F&includesExt=inc&displayLang=fr&searchLang=fr&hitsPerPage=10&leftMenu=false&template=default&pageWidth=760px&horizontalAlign=center&headerHeight=100px&bottomHeight=60px&leftMenuWidth=0px" alt="Recherche">';


	chaine += '</map>';
	chaine += '<table width="100%" height="100%"><tr><td align="center">';
	chaine += '<img src="/images/pivsciencetechno.gif" usemap="#MapPivMRST" border="0">';
	chaine += '</td></tr></table>'
	chaine += '<br>';
	chaine += '<br>';
	chaine += '<br>';
	document.write(chaine);
}
//****************************************************************************************************************
//*  Cette fonction dessine menu de gauche
//*  Liens sur le menu de gauche
//****************************************************************************************************************
//Menu de gauche
	function dessineMenu() {
	//function retourneC(sec){
	//	return lasection == sec?'<img src="' + profondeur + 'imgMRST/menu' + lalangue + '/bt_' + sec + '_f2.gif" name="' + sec + '" border="0"><br>':'<a href="' + profondeur + lalangue + '/' + sec + '/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'' + sec + "','','" + profondeur + 'imgMRST/menu' + lalangue + '/bt_' + "" + sec + "_f2.gif',1)\"><img src=\"" + profondeur + 'imgMRST/menu' + lalangue + '/bt_' + sec + ".gif\" name=\"" + sec + "\" border=\"0\"></a><br>"
	//}
chaine = "";
//LBi021120-modif pour mise en ligne MFER
//	chaine += lalangue=='_fr'?'<span class="T1Mission">Recherche, Science\net Technologie</span><BR>':'<span class="T1Mission">Research, Science\nand Technology</span><BR>';
/*haut*/
	//chaine += '<img src="' + profondeur + 'imgMRST/menu_top.gif"><br>'
	//chaine += retourneC("ministre");
	//chaine += retourneC("ministere");
	//chaine += retourneC("comite");
	//chaine += retourneC("organismes");
	//chaine += '<img src="' + profondeur + 'imgMRST/menu_espace1.gif"><br>'
	//chaine += retourneC("politique");
	//chaine += retourneC("programmes");
	//chaine += retourneC("evenements");
	//chaine += '<img src="' + profondeur + 'imgMRST/menu_espace2.gif"><br>'
	//chaine += retourneC("communiques");
	//chaine += retourneC("publications");
	//chaine += retourneC("formulaires");
	//chaine += retourneC("statistiques");
	//chaine += '<img src="' + profondeur + 'imgMRST/menu_espace3.gif"><br>'
	//chaine += retourneC("liens");//modif yb 11072002
	//chaine += retourneC("services");
	//chaine += retourneC("faq");//modif yb 11072002
/*original - bas*///	chaine += '</td>';
/*modif yb 190602 bas*///chaine += '<img src="' + profondeur + 'imgMRST/menu_bottom.gif"><br>';
	//pour ajouter une image en bas
//**************************************************************************
//* image prix du québec
//*************************************************************************	
	
/*ajout yb *///chaine += '<a href="http://www.prixduquebec.gouv.qc.ca" target="Fmrst"><img src="' + profondeur + 'imgMRST/prixquebec_petit.gif" alt="Les Prix du Qu&eacute;bec" width="100" height="48" border="0" align="right"></a><br><br><br><br><br>';
/*ajout yb *///chaine += '<a href="http://www.mrst.gouv.qc.ca/_fr/evenements/genial/index.html"><img src="' + profondeur + 'imgMRST/genial2.gif" alt="Tout simplement génial" width="100" height="50" border="0" align="right"></a><br><br><br><br><br></td>';
/*ajout yb *///chaine += '</td>';

//*************************************************************************
//image tout simplement génial
//*************************************************************************
/*ajout yb *///chaine += '<a href:"http://www.mrst.gouv.qc.ca/_fr/evenements/genial/index.html"><img //src="' + profondeur + 'imgMRST/genial.jpg" alt="Tout simplement génial" width="100" height="50" //border="0" align="right"></a>
/*enlevé le 5 février 2003, mais conservé pour usage ultérieur*/
	document.write(chaine);
}
//
function retourneTitre(choixF,choixA,choixS){
	switch(lalangue){
		case "_fr" : return choixF;break;
		case "_an" : return choixA;break;
		case "_es" : return choixS;break;
	}
}
//
//****************************************************************************************************************
//*  Cette fonction les sous-menus
//*  liens des sous-menus
//****************************************************************************************************************

function dessineSousMenu() {
//si on veut triangle couleur--	return '&nbsp;<img src=\"' + profondeur + 'imgMRST/triangle_' + couleur + '.gif\" align=\"BOTTOM\" border=\"0\" alt=\" \">&nbsp;';
	function ctriangle(couleur){
		//appel original : triangle = ctriangle("bleu")
		return '<img src=\"/imgMRST/triangle.gif\" align=\"BOTTOM\" border=\"0\" alt=\" \">&nbsp;';
	}
	chaine = "";
	triangle = ctriangle(''); //lbi c'était un triangle c'est maintenant un cercle
	debutCh = '<a class="petitmenubas" href="' + profondeur + lalangue + "/" + lasection + "/";
	if(lasection != '0'){ //on affiche rien si aucune section
		//chaine += '<span align="left"><img src=\"' + profondeur + 'imgMRST/carre.gif">'
		chaine += '<table cellspacing=\"0\" cellpading=\"0\" border=\"0\"><tr><td><img src=\"/imgMRST/carre.gif"><img src=\"/imgMRST/t' + lalangue + '/t_' + lasection + '.gif\" alt=\"Section ' + lasection + '\"></td></tr></table>'
		switch (lasection) {
//****************************************************************************************************************
//*  liens sous-menu ministre
//****************************************************************************************************************	
			case "ministre" :
				chaine += debutCh + 'index.html" target="_self">' + retourneTitre('Ministre','Minister')+ '</a>&nbsp;';
				chaine += triangle; //modif yb 2806 2002
				chaine += debutCh + 'bio_sec_etat.html" target="_self">' + retourneTitre('Secrétaire d\'état','Secretary of State')+ '</a>&nbsp;'; //modif yb 020628
				break;
				//******************************************************************************
//*  liens sous-menu ministère
//******************************************************************************
			case "ministere" :
				chaine += debutCh + 'index.html" target="_self">' + retourneTitre('Mission','Mission')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'struct_organisation.html" target=\"_self\">' + retourneTitre('Structure organisationnelle','Organizational Structure')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'planification.html" target="_self">' + retourneTitre('Plan stratégique','Strategic Planning ')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'declaration.html" target="_self">' + retourneTitre('Déclaration de services','Declaration of Services')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'rapport.htm" target="_self">' + retourneTitre('Rapport annuel','Annual Report')+ '</a>&nbsp;';
				break;
				//****************************************************************************************************************
//*  liens sous-menu comité
//****************************************************************************************************************
			case "comite" :
				chaine += debutCh + '#mandat" target="_self">' + retourneTitre('Mandat','Mandate')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + '#composition" target="_self">' + retourneTitre('Composition','Composition')+ '</a>&nbsp;';
				break;
				//****************************************************************************************************************
//*  liens sous-menu organismes
//****************************************************************************************************************
			case "organismes" :
				chaine += debutCh + 'index.html#ministre" target="_self">' + retourneTitre('Organismes relevant de la ministre','Agencies under the Minister\'s Authority')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'index.html#autres" target="_self">' + retourneTitre('Autres organismes','Other Organizations')+ '</a>&nbsp;';
				break;
				//****************************************************************************************************************
//*  liens sous-menu politique
//****************************************************************************************************************
			case "politique" :
				chaine += debutCh + 'index.html" target="_self">'+ retourneTitre('Politique','Policy','Pol&iacute;tica')+ '</a>&nbsp;'; //modifié par yolande bruneau le 27 avril 2003 //22072002 //270802
				chaine += triangle; //modif 082702 yb
				chaine += debutCh + 'P_politique.html" target="_self">' + retourneTitre('Document de politique','Policy document','Documento de pol&iacute;tica')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'P_communiques.html" target="_self">' + retourneTitre('Communiqués','Press releases','Communicados')+ '</a>&nbsp;';
//				chaine += triangle;
//yb 110602				chaine += debutCh + 'P_consultations.html" target="_self">' + retourneTitre('Document de consultation','Consultation document','Documento de consulta')+ '</a>&nbsp;';
 				chaine += triangle;
    			chaine += debutCh + 'P_bilan_politique.html" target="_self">' + retourneTitre('Premier bilan','First-year Results','Primeros resultados')+ '</a>&nbsp;'; //modif yb 020702 0220821
				
				break;
				//****************************************************************************************************************
//*  liens sous-menu programmes
//****************************************************************************************************************
			case "programmes" :
				chaine += debutCh + 'index.html" target="_self">' + retourneTitre('Programmes d\'aide','Programs')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'MesuresFiscales.html" target="_self">' + retourneTitre('Mesures fiscales','Tax Measures')+ '</a>&nbsp;';
				//modif programmes mrst pour aide yb021212
				//chaine += triangle;
				//chaine += debutCh + 'pubInnov.html" target="_self">' + retourneTitre('Innovation Québec','Innovation Québec')+ '</a>&nbsp;';
				break;
				//****************************************************************************************************************
//*  liens sous-menu événements
//****************************************************************************************************************
			case "evenements" :
				chaine += debutCh + 'index.html" target="_self">'+ retourneTitre('Événements','Events')+ '</a>&nbsp;'; //modifié par yolande bruneau le 27 avril 2003 //22072002//270802
				chaine += triangle;
				chaine += '<a class="petitmenubas" href="' + profondeur + lalangue +'/programmes/prixduquebec.html" target="_self">' + retourneTitre('Prix du Qu&eacute;bec','Prix du Qu&eacute;bec')+ '</a>&nbsp;';
				chaine += triangle;
				//chaine += debutCh + 'prixfqc/prix.html" target="_self">'+ retourneTitre('Prix France-Qu&eacute;bec','Prix France-Qu&eacute;bec')+ '</a>&nbsp;';
				//chaine += triangle; yb 10 janvier 2003, il n'y a plus de prix France-Québec
				chaine += debutCh + 'genial/index.html" target="_self">' + retourneTitre('Tout simplement génial !','Tout simplement génial !')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += '<a class="petitmenubas" href="http://www.mrst.gouv.qc.ca/85256969006B4C58/$$Viewtemplate+for+Activites?OpenForm">' + retourneTitre('Calendrier','Calendar')+ '</a>&nbsp;';//modif yb 11072002 120902
				
				break;
			//****************************************************************************************************************
//*  liens sous-menu communiques
//****************************************************************************************************************
			case "communiques" :
				//chaine += debutCh + 'index.html" target="_self">' + retourneTitre('Communiqués','Press Releases')+ '</a>&nbsp;';//modif 270802 yb
				//chaine += triangle; //modif yb 270802
				chaine += '<a class="petitmenubas" href="http://communiques.gouv.qc.ca/cgi-bin/select.pl/org?candy=78856&okey=77717">' + retourneTitre('De la ministre','From the minister')+ '</a>&nbsp;';
//				chaine += '<a class="petitmenubas" href="http://communiques.gouv.qc.ca/cgi-bin/select.pl/org?okey=77717&candy=77717&fimg=http://www.mrst.gouv.qc.ca/imgMRST/droit.gif&bimg=http://www.mrst.gouv.qc.ca/imgMRST/gauche.gif&headlinetextcolor=0000cc&tablebgcolor=f3f0e0&datebgcolor=f3f0e0&headlinebgcolor=f3f0e0&resumebgcolor=f3f0e0&timebgcolor=f3f0e0&resume=1&tablewidth=100" target="Fmrst">' + retourneTitre('De la ministre','From the minister')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += '<a class="petitmenubas" href="http://communiques.gouv.qc.ca/cgi-bin/select.pl/org?candy=78856&okey=44402">' + retourneTitre('De la secrétaire d\'État','From the Secretary of State')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += '<a class="petitmenubas" href="http://communiques.gouv.qc.ca/cgi-bin/select.pl/org?candy=78856&okey=78856">' + retourneTitre('Du ministère','From  the MRST')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'carchives.htm" target="_self">' + retourneTitre('Archives','Archives')+ '</a>&nbsp;';
				break;
				//****************************************************************************************************************
//*  liens sous-menu publications
//****************************************************************************************************************
			case "publications" :
	/*modif yb 170602*/			chaine += debutCh + 'index.html" target="_self">' + retourneTitre('Du ministère','MRST Publications')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'publications-autres.html" target="_self">' + retourneTitre('Autres publications','Other Publications')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'centre-doc.html" target="_self">' + retourneTitre('Centre de documentation','Documentation Centre')+ '</a>&nbsp;';
				break;
				//****************************************************************************************************************
//*  liens sous-menu formulaires
//****************************************************************************************************************
			case "formulaires" :
				break;
				//****************************************************************************************************************
//*  liens sous-menu statistiques
//****************************************************************************************************************
			case "statistiques" :
				break;
				//****************************************************************************************************************
//*  liens sous-menu faq
//****************************************************************************************************************
			case "faq" : //modif yb 15 juillet 2002
				chaine += debutCh + 'index.html" target="_self">' + retourneTitre('FAQ','FAQ')+ '</a>&nbsp;';//modif 270802 yb
				chaine += triangle;
				chaine += debutCh + 'politique.htm">' + retourneTitre('Politique','Policy')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'prog.htm">' + retourneTitre('Programmes','Programs')+ '</a>&nbsp;';
				chaine += triangle;//modif yb 22072002
				
				chaine += debutCh + 'placement.htm">' + retourneTitre('Placement','Job Placement')+ '</a>&nbsp;'; //modif 22072002 + 050802
				chaine += triangle;//modif yb 22072002				
				chaine += debutCh + 'doc.htm">' + retourneTitre('Documentation','Documentation')+ '</a>&nbsp;'; //modif 22072002
				chaine += triangle;//modif yb 22072002				
				chaine += debutCh + 'apropos.htm">' + retourneTitre('À propos du site','About our website')+ '</a>&nbsp;'; //modif 22072002
				break;  //modif yb 15 juillet 2002
			//case "vitrine" :
			//	chaine += debutCh + 'vitrine-quebec.html#ancre1" target="_self">' + retourneTitre('Investir au Québec','Investing in Québec')+ '</a>&nbsp;';
			//	chaine += triangle;
			//	chaine += debutCh + 'vitrine-quebec.html#ancre2" target="_self">' + retourneTitre('Vivre au Québec','Living in Québec')+ '</a>&nbsp;';
			//	chaine += triangle;
			//	chaine += debutCh + 'vitrine-quebec.html#ancre3" target="_self">' + retourneTitre('Investir à Montréal','Investing in Montréal')+ '</a>&nbsp;';
			//	chaine += triangle;
			//	chaine += debutCh + 'vitrine-quebec.html#ancre4" target="_self">' + retourneTitre('Vivre à Montréal','Living in Montréal')+ '</a>&nbsp;';
//***********************************************************************				
//Sous-menu de la page joindre/index.html
//modif yb 240902
//***********************************************************************
			case "joindre" :
				chaine += debutCh + 'index.htm#courriel">' + retourneTitre('Par courriel','By e-mail')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'index.htm#telephone" target="_self">' + retourneTitre('Par téléphone ou par télécopieur','By phone or fax')+ '</a>&nbsp;'; //modifié le titre par Yolande Bruneau 28 avril 2002
				chaine += triangle;
				chaine += debutCh + 'index.htm#poste" target="_self">' + retourneTitre('Par la poste ou à nos bureaux','By mail or at our offices')+ '</a>&nbsp;';//modifié le titre par Yolande Bruneau 28 avril 2002
				break;
//*************************************************************************				
			case "services" :
				break;
			case "liens" :
				chaine += debutCh + 'index.html#gouvernemental" target="_self">' + retourneTitre('Secteur gouvernemental','Government Sector')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'index.html#milieu" target="_self">' + retourneTitre('Milieu de la RSTI','RSTI Community')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'index.html#culture" target="_self">' + retourneTitre('Culture scientifique','Science-Oriented Culture')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'index.html#formation" target="_self">' + retourneTitre('Formation et emploi','Education & Employment')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += debutCh + 'index.html#magazines" target="_self">' + retourneTitre('Magazines spécialisés','Magazines')+ '</a>&nbsp;';
				break;
			case "confidentialite" :
				break;
			case "quoiNeuf" :
				break;
//LBi021111 gestion d'une exception, la section RSTI est sur un serveur externe
			case "RSTI" :
				chtemp = '<a class="petitmenubas" href="';
        chaine += chtemp + 'recherche_cat.php" target="_self">' + retourneTitre('Recherche')+ '</a>&nbsp;';
        chaine += triangle;
				chaine += chtemp + 'abonnement.php" target="_self">' + retourneTitre('Abonnement')+ '</a>&nbsp;';
				chaine += triangle;
        chaine += chtemp + 'bulletin.php" target="_self">' + retourneTitre('Bulletin')+ '</a>&nbsp;';
				chaine += triangle;
				chaine += chtemp + 'credits.php" target="_self">' + retourneTitre('Cr&eacute;dits')+ '</a>&nbsp;';
        chaine += triangle;
        chaine += chtemp + 'aide.php" target="_self">' + retourneTitre('Aide')+ '</a>&nbsp;';
        chaine += '<br><br>';
//lbi021204 - ajout du paragraphe d'intro du bulletin RSTI en javascript au lieu de PHP
				//élargi le paragraphe yb 7fev2003
				break;
		}
	};
	chaine += '<P>';
	document.write(chaine);
}
//
function ChangeLangue(){
	chaine=new String(window.document.location);
	if(lasection == "recherche"){
		chaine = lalangue=="_fr"?"http://recherche2.gouv.qc.ca/index.html?qt=&sn=mrst&ila=an":"http://recherche2.gouv.qc.ca/index.html?qt=&sn=mrst&ila=fr";
	}else if(profondeur != ''){
		switch (lalangue){
			case '_es': 
				langue = '_fr';
				pos = chaine.indexOf('_es');
				break;
			case '_fr': 
				langue = '_an';
				pos = chaine.indexOf('_fr');
				break;
			case '_an': 
				langue = '_fr';
				pos = chaine.indexOf('_an');
				break;
		} //fin switch
		longueur = chaine.length - pos
		schaine = chaine.substr(pos,longueur);
		lechemin = '';
		for(x=0;x<=schaine.length;x++){
			if(schaine.charAt(x) == '/'){
				lechemin += "../"
			} //fin if
		} //fin for
		chaine = chaine.replace(/_fr|_an|_es/,langue);
	} else { /*je suis au premier niveau*/
		if(window.document.URL.indexOf('.html') <= 0){
			/*LBi020521 je traite le cas ou le url n'indique pas de .html*/
			chaine = lalangue=='_an'|'_es'?chaine + 'index.html':chaine + 'index_an.html'; 
		}else{
			chaine = lalangue=='_fr'?chaine.replace(".html","_an.html"):chaine.replace("_an.html",".html");
		}
	}
	window.document.location = chaine;
}
//
function hautdepageMRST() { //vide pour l'instant mais pourrait être utile éventuellement
	chaine = '';
	return chaine
}
//
function PiedMRST() {
//	si on veux centrer le tout sur la largeur, enlever les commentaires
	document.write('</TD></TR>');
	document.write('<tr align=\"left\" valign=\"top\">');
	document.write('<td colspan="3">');
	basdepageMRST();
	document.write('</TD></TR></TABLE>'); /*N47*/
	document.write('</BODY>');
	document.write('</HTML>');
}
//
function basdepageMRST() {
	chaine = '';
	chaine += '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
		chaine += '<tr align="center">';
			chaine += '<td>'
				chaine += '<br>';
				chaine += '<br><br><span class="petitTitreNoir"> Équipe de production du bulletin Repères RSTI</span>' + '</a>'; 
				//chaine += '<br><span class="PetitTxt"> Édition et rédaction : </span><a href="mailto:chantal-sophie.castro@mderr.gouv.qc.ca?subject=Bulletin Repères RSTI" class="petitmenubas" target="_top">' + retourneTitre('Chantal-Sophie Castro') + '</a>'+', '+'<a href="mailto:emanuela.siteanuchiriac@mrst.gouv.qc.ca?subject=Bulletin Repères RSTI" class="petitmenubas" target="_top">' + retourneTitre('Emanuela Siteanu-Chiriac') + '</a>'; modif 6 octobre 2004 yb
				chaine += '<br><span class="PetitTxt"> Édition et rédaction : Gabriel Clairet </span><br /><a href="mailto:clairet.gabriel@mdeie.gouv.qc.ca?subject=Bulletin Repères RSTI" class="petitmenubas" target="_top">' + retourneTitre('clairet.gabriel@mdeie.gouv.qc.ca') + '</a>'; 
				chaine +=  '<span class="PetitTxt">,<br> Direction des politiques et analyses </span>'
				chaine += '<br>';
				chaine += '<span class="PetitTxt"> Recherche : </span><a href="http://www.glsreseaux.com/" target="_blank" class="petitmenubas" target="_top">' + retourneTitre('GLS Réseaux') + '</a>';
				chaine += '<span class="PetitTxt"><br >Révision linguistique : Hélène Hurtubise </span>';
				chaine += '<br><a href="http://www.mdeie.gouv.qc.ca/index.php?id=220&destinataire=Y2hhcmxlcy5sdXNzaWVyQG1kZWllLmdvdXYucWMuY2E=" class="petitmenubas" target="_top">' + retourneTitre('Commentaires sur le bulletin Repères RSTI') + '</a>'; 
        chaine += '<br><br>';
				chaine += '<img src="/imgMRST/ligne.gif" border="0">'
				//chaine += '<br><br><a href="http://www.mdeie.gouv.qc.ca/index.php?id=112" class="petitmenubas" target="_top">' + retourneTitre('@ Commentaires et suggestions sur le site','@ Comments or suggestions about this website','@ Direcci&oacute;n') + '</a>';
				//chaine += '&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.mdeie.gouv.qc.ca/index.php?id=113" class="petitmenubas" target="_top">' + retourneTitre('Politique de confidentialité','Policy on Privacy','Pol&iacute;tica de confidencialidad') + '</a>';
				//chaine += '&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.mdeie.gouv.qc.ca/index.php?id=114" class="petitmenubas" target="_top">' + retourneTitre('Réalisation du site','Website Production','Realizaci&oacute;n del sitio') + '</a>';
				//chaine += '<br><span class="PetitTxt">' + dernieremodif() + '</span>';
				//chaine += '<br>';
				//chaine += '<img src="/imgMRST/ligne.gif" border="0">'
				chaine += '<br>';
				chaine += '<a href="javascript:sortieMRST(\'' + lalangue + '\',\'Portail du gouvernement du Qu&eacute;bec\',\'http://www.gouv.qc.ca/\')"><img src="/imgMRST/quebw1.gif" alt="Site du MRST" border="0"></a>'
				chaine += '<br><a href="http://www.droitauteur.gouv.qc.ca/" target="_top" class="petitmenubas">&copy; Gouvernement du Qu&eacute;bec, 2002-2009</a>';
				chaine += '<br>';
				chaine += '<br>';
			chaine += '</td>';
		chaine += '</tr>';
	chaine += '</table>';
	document.write(chaine);
}
//
function dernieremodif() {
		function ajoutezero(leno) {
			if(leno <= 9){ return '0' + leno;
			} else { return leno }
		}
	upd = new Date(document.lastModified); 
	jour = ajoutezero(upd.getDate());
	mois = ajoutezero(upd.getMonth() + 1);
	an = ajoutezero(upd.getFullYear());
	if (an <= 1990)return '';
	else return retourneTitre('Derni&egrave;re mise &agrave; jour faite le ','Updated on ','Ultima modificacion :') + an+ "-" + mois + "-" + jour; 
} 
//
function feuilleStyle(){
	//lbi020523 doit être conservé pour anciens communiqués cnw
	document.write('<link rel=\"stylesheet\" href=\"/cssmrst2002.css\">')
}
//
function sortieMRST(langue,dest,leurl){
/* APPEL href="javascript:sortieMRST('_fr','Bienvenue Welcome','http://www.bw.qc.ca')"
ANCIENNE VERSION
	msg=langue=="_fr"?'Voulez-vous quitter le site du MRST\nVers:\n':'Do you want to leave the MRST site\nTo:\n'
	if(confirm(msg + dest + '\nURL:\n'+ leurl + '?'))document.location=leurl;
*/
	msg= '<HTML><HEAD><title>Ministère du Développement économique et régional et de la Recherche</title>';
	msg+= '<link rel="stylesheet" href="/cssmrst2002.css">';
	msg+= '</HEAD>';
	msg+= '<BODY bgcolor="#0694A7" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">';
	msg+= '<br><br><div align="center">';
	msg+= '<table border=1  bgcolor="#ffffff" width="90%" height="160" border="0" vspace="0" hspace="0" cellpadding="0" cellspacing="0">';
	msg+= '<tr align=\"center\" valign=\"center\">';
	msg+= '<td>';
	msg+= '<blockquote>';
	msg+= lalangue=="_fr"?'<br>Vous vous apprêtez à quitter le site du MDEIE vers :':'Leave the MDEIE Website to :';//31052002 yb
	msg+= '<br><br><b>' + dest + '</b>';
//	msg+= '<br><br><b><a href=javascript:window.close();window.opener.document.location="' + leurl + '"><u>' + leurl + '</u></a></b>';
	msg+= '<br><br><br><div align="center"><b>';
	chquitter = lalangue=="_fr"?'Quitter le site du MDEIE':'Quit the MDEIE\'s site';
	msg+= '<a href=javascript:window.close();window.opener.document.location="' + leurl + '"><u>'+ chquitter + '</u></a>';
	msg+= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	chquitter = lalangue=="_fr"?'Annuler':'Cancel';
	msg+= '<a href=javascript:window.close();><u>' + chquitter + '</u></a>';
	msg+='</b></div>';
	msg+='</blockquote>'
	msg+='</td></tr></table>';
	msg+='</div>';
	mafen = window.open("","MDERR",'width=430,height=230 menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"');
	mafen.document.write(msg);
	mafen.moveTo(60,60);
}
//
function placerFenetre(objetFenetre, windowWidth,windowHeight,targetWidth,targetHeight, ie4) {//Place la fenêtre au coin supérieur droit
	//Positionne la fenêtre dans la bonne taille/position	
	windowLeft = screen.availWidth - targetWidth - 30;
	windowTop = 15;
	objetFenetre.moveTo(windowLeft,windowTop);
	if (!ie4) objetFenetre.location.reload();
 }
//
function ouvrirPDF(liensPDF) {//Ouverture d'un pdf dans une fenêtre à part
	//var attributs = 'width=650,height=500 menubar="yes",resizable="yes",scrollbars="yes",status="yes",toolbar="no"'
	if (fenetrePDF != "undefined") fenetrePDF.close()
	fenetrePDF = window.open("about:blank", "Fmrst", 'width=650,height=500,menubar="yes",resizable,scrollbars="yes",status="yes",toolbar="no"')//Ouvre une fenêtre vierge
	//Trouve le navigateur en cours
	var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
	//Trouve la largeur et hauteur
	var largeurFen=ie4? fenetrePDF.document.body.clientWidth : fenetrePDF.innerWidth;
	var hauteurFen=ie4? fenetrePDF.document.body.clientHeight : fenetrePDF.innerHeight;
	placerFenetre(fenetrePDF, largeurFen, hauteurFen, 700, 500, ie4);
	//Appelle l'ouverture du pdf (s'exécute ainsi pour être sur que le plugin Reader s'active
	fenetrePDF.location = liensPDF
	fenetrePDF.focus()
}
//
function ouvrirFen(leurl) {//Ouverture d'un pdf dans une fenêtre à part
	//var attributs = 'width=650,height=500 menubar="yes",resizable="yes",scrollbars="yes",status="yes",toolbar="no"'
	if (fenetrePDF != "undefined") fenetrePDF.close()
	fenetrePDF = window.open(leurl, "Fmrst", 'width=700,height=500,menubar="yes",resizable,scrollbars,status="yes",toolbar="no"')//Ouvre une fenêtre vierge
	//Trouve le navigateur en cours
	var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
	//Trouve la largeur et hauteur
	var largeurFen=ie4? fenetrePDF.document.body.clientWidth : fenetrePDF.innerWidth;
	var hauteurFen=ie4? fenetrePDF.document.body.clientHeight : fenetrePDF.innerHeight;
	placerFenetre(fenetrePDF, largeurFen, hauteurFen, 700, 500, ie4);
	//Appelle l'ouverture du pdf (s'exécute ainsi pour être sur que le plugin Reader s'active
	//fenetrePDF.location = liensPDF
	fenetrePDF.focus()
}
/*********************** Fonctions de Macromedia ****************************/
function MM_preloadImages() { //vFW3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
	for(i=0; i<a.length; i++)
    	if (a[i].indexOf("#")!=0){ 
			d.MM_p[j]=new Image;
			d.MM_p[j++].src=a[i];
		}
	}
}
function MM_swapImgRestore() { //vFW3.0
  var i,x,a=document.MM_sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //vFW3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_findObj(n, d) { //vFW4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
/********************************pour NOMINO -- inutile pour l'instant************/
function keyWordSearch(valeur){
//	Nomino GET
	window.document.recherche.method="get";
	window.document.recherche.target="FContenu";
	//window.document.recherche.action="http://recherche2.gouv.qc.ca/query.html";
	window.document.recherche.submit();
}
/********************************* section spéciale CNW ***************************************/
function dessinePIVCNW(lg) {
	lalangue=lg;
	chaine = '';
	chaine += '<map name="MapPivMRST">';
	chT = lalangue=='_fr'?'index.html':'index' + lalangue + '.html';
	chaine += '<area shape="rect" coords="210,57,258,72" href="http://www.mrst.gouv.qc.ca/' + chT + '">';
	chA= lalangue.slice(1,3); //on obtient fr ou an ou es pour la recherche dans NOMINO
	chaine += '<area shape="rect" coords="359,56,420,72" href="http://recherche2.gouv.qc.ca/index.html?qt=&sn=mrst&ila=' + chA +'">'
//lbi	chaine += '<area shape="rect" coords="359,56,420,72" href="'+ profondeur + 'nomino.html">'
	chaine += '<area shape="rect" coords="269,56,345,72" href="http://www.mrst.gouv.qc.ca/plan_site_MRST.html">';
	chaine += '<area shape="rect" coords="437,56,511,72" href="http://www.mrst.gouv.qc.ca/joindre.html">';
	chA= '<area shape="rect" coords="524,56,629,72" href="javascript:sortieMRST(\'' + lalangue + '\',\'Site du gouvernement du Québec\',\'http://www.gouv.qc.ca/Index' + lalangue + '.html\')">';
	chB= '<area shape="rect" coords="524,56,629,72" href="javascript:sortieMRST(\'' + lalangue + '\',\'Site du gouvernement du Québec\',\'http://www.gouv.qc.ca/Index_en.html\')">';
	chaine += lalangue=='_an'?chB:chA;
	chaine += '<area shape="rect" coords="659,55,707,72" href="javascript:ChangeLangue(-1);">';
	//chaine += '<area shape="rect" coords="713,57,758,72" href="'+ profondeur + '_es/politique/index.html">';
	chA = '<area shape="rect" coords="713,57,758,72" href="http://www.mrst.gouv.qc.ca/_es/politique/index.html">';
	chB = '<area shape="rect" coords="713,57,758,72" href="http://www.mrst.gouv.qc.ca/_an/politique/index.html">';
	chaine += lalangue=='_es'?chB:chA;
	chaine += '</map>';
	chaine += '<img src="http://www.reperes.mdeie.gouv.qc.ca/imgMRST/PIV_MRST_CNW' + lalangue + '.gif" usemap="#MapPivMRST" border="0">';
	document.write(chaine);
	document.write('<img src="http://www.reperes.mdeie.gouv.qc.ca/imgMRST/spacer.gif" width="45" height="1" align="left">');
	document.write('<table width="560" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td');
//	btn back dans le tableau
	chaine = '<br>';
	chaine += '<a href=\"javascript:history.back()\">';
	chaine += '<img src="http://www.reperes.mdeie.gouv.qc.ca/imgMRST/mrst_precedent.jpg" alt="page précédente" border="0" align="BOTTOM">';
	chaine += '</a>';
	chaine += '<br>';
	chaine += '<br>';
	document.write(chaine);
}
function basdepageMRSTCNW() {
	document.write('<br><br></td>');
	document.write('</tr>');
	document.write('</table>');
//
	document.write('<img src="http://www.reperes.mdeie.gouv.qc.ca/imgMRST/spacer.gif" width="45" height="1" align="left">');
	document.write('<table width="560" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td');
	chaine = '<br>';
	chaine += '<a href=\"javascript:history.back()\">';
	chaine += '<img src="http://www.reperes.mdeie.gouv.qc.ca/imgMRST/mrst_precedent.jpg" alt="page précédente" border="0" align="BOTTOM">';
	chaine += '</a>';
	document.write(chaine);
	document.write('<br><br></td>');
	document.write('</tr>');
	document.write('</table>');
//
	chaine = '';
	chaine += '<table width="760" border="0" cellspacing="0" cellpadding="0">';
		chaine += '<tr align="center">';
			chaine += '<td>'
				chaine += '<br>';
				chaine += '<img src="http://www.reperes.mdeie.gouv.qc.ca/imgMRST/ligne.gif" width="90%"border="0">'
				chaine += '<br><br><a href="http://www.mderr.gouv.qc.ca/mder/web/portail/service.prt?svcid=SEND_INFO_BY_MAIL1&idDoc=999999999&idDocForm=47116&destinataire=webmestre" class="petitmenubas" target="_top">' + retourneTitre('@ Commentaires et suggestions sur le site','@ Comments or suggestions about this website','@ Direcci&oacute;n') + '</a>';
				chaine += '&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.mderr.gouv.qc.ca/mder/web/portail/service.prt?svcid=PAGE_GENERIQUE_CATEGORIES60&page=details.jsp&iddoc=44176" class="petitmenubas" target="_top">' + retourneTitre('Politique de confidentialité','Policy on Privacy','Pol&iacute;tica de confidencialidad') + '</a>';
				chaine += '&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.mderr.gouv.qc.ca/mder/web/portail/service.prt?svcid=PAGE_GENERIQUE_CATEGORIES60&page=details.jsp&iddoc=44183" class="petitmenubas" target="_top">' + retourneTitre('Réalisation du site','Website Production','Realizaci&oacute;n del sitio') + '</a>';
				chaine += '<br><span class="PetitTxt">' + dernieremodif() + '</span>';
				chaine += '<br>';
				//chaine += '<img src="' + profondeur + 'imgMRST/ligne.gif" border="0">'
				chaine += '<br>';
				chaine += '<a href="javascript:sortieMRST(\'' + lalangue + '\',\'Portail du gouvernement du Qu&eacute;bec\',\'http://www.gouv.qc.ca/\')"><img src="http://www.reperes.mdeie.gouv.qc.ca/imgMRST/quebw1.gif" alt="Site du MRST" border="0"></a>'
				chaine += '<br><a href="http://www.mrst.gouv.qc.ca/copyright.html" target="_top" class="petitmenubas">&copy; Gouvernement du Qu&eacute;bec, 2002</a>';
				chaine += '<br>';
				chaine += '<br>';
			chaine += '</td>';
		chaine += '</tr>';
	chaine += '</table>';
	document.write(chaine);
}
//
/*********************************************************************************/
/*	Bienvenue Welcome 2002
	--il y a beaucoup de document.write car N47 l'exige, tout ça pourra être regroupé plus tard
	function EnteteMRST(){ Dessine le tableau principal, le PIV, le menu gauche et l'entête de chaque page
		function dessinePIV() {
		function dessineMenu() {
		function dessineSousMenu() {
	function ChangeLangue(){
	function hautdepageMRST() {
	function hautdepageMRST_CNW(lasection) { 
	function PiedMRST() {
	function basdepageMRST() {
	function dernieremodif() {
		function ajoutezero(leno) {
	function feuilleStyle(){
	function sortieMRST(langue,dest,leurl){
	function placerFenetre(objetFenetre, windowWidth,windowHeight,targetWidth,targetHeight, ie4) {//Place la fenêtre au coin supérieur droit
	function ouvrirPDF(liensPDF) {//Ouverture d'un pdf dans une fenêtre à part
*/
