var ww = window.location.href;var rr = window.location.href;var rr = rr.substring(rr.indexOf("//") + 2, rr.indexOf(".nsf"));var rr = rr.substring(rr.indexOf("/") + 1, rr.lastIndexOf("/"));var rr = "/" + rr;var b = ww.substring(0, ww.indexOf(".nsf")) + ".nsf";var bd = ww.substring(0, ww.indexOf(".nsf")) + ".nsf";var bImages = rr + "/images.nsf";var bFichiers = rr + "/images.nsf";var bref = "/francophonie/references.nsf";var bProfils = b;var bp = rr + ".nsf";var bDossiers = b;var bDocs =b;var bCourrier = bp + "/Message";var bWB = "/wb/espace";var bInaptitude = "/thematiques/inaptitude.nsf";var bRousseau = "/thematiques/rousseau.nsf";var bDossiersEG = "/mot.nsf";var bDocumentsEG = "/reftext.nsf";var bdPublic = bd;function ecranpop() {var posImg = getDim(document.getElementById("imgpos"));var lrg = posImg.x; 		if(lrg >= 1080) {		poph = "700";		popl = "1255"; }   		else if(lrg >= 950 && lrg < 1210) {		poph = "700";		popl = "1025";}                 else {		poph = "400";		popl = "770";	     }}//SECTIONS DE DOSSIER// ONGLETS DOSSIERSfunction sectionsel(id, nsection) {for(var i=1;i<=nsection;i++) 		{					var onglet = "section_" + i;					var obj = document.getElementById(onglet);					if (obj) obj.style.visibility = "hidden";					var ong = document.getElementById("ong_" + i);					var cls = ong.className;					var cls = cls.substring(0, cls.indexOf("_"));					if (ong) ong.className = cls + "_off";			} // for			// v\u00E9rifier si l'utilisateur a d\u00E9j\u00E0 cliqu\u00E9			var div = document.getElementById("section_" + id);				var posImg = getDim(document.getElementById("positionsection"));			div.style.top = posImg.y;			div.style.left = posImg.x;			if (div) div.style.visibility = "visible";				document.forms[0].SectionAffichee.value = "section_" + id;										} // functionfunction m_section(id){var obj = document.getElementById("ong_" + id);var cls = obj.className;var d = cls.slice(cls.lastIndexOf("_") + 1, (cls.length));var cls = cls.substring(0, cls.indexOf("_"));if(d =='off')		{obj.className=cls + "_on";		}	else if (d == 'on') 		{obj.className=cls + "_off";}}// MENUSfunction mh(id) {var etat = "";var obj1 = document.getElementById("menuh_" + id);var obj2 = document.getElementById("carre_" + id);var obj3 = document.getElementById("carre2_" + id);var cls = obj1.className;var d = cls.slice(cls.lastIndexOf("_") + 1, (cls.length));if (d == "on") {etat = "off"; }else {etat = "on";}obj1.className="menuh_" + etat;obj2.className="carre_" + etat;obj3.className="carre2_" + etat;}function mv(id,niveau){var elm = "mv" + id + "_" + niveau;var a = "a" + id + "_" + niveau;var obj = document.getElementById(elm);var anc = document.getElementById(a);var cls = obj.className;var etat = cls.slice(cls.lastIndexOf("_") + 1, (cls.length));if(etat != "hi"){	if(etat == "off") {		obj.className="mvn" + niveau + "_on";		anc.className="mvn" + niveau + "_on";		}		else {		obj.className="mvn" + niveau + "_off";		anc.className="mvn" + niveau + "_off";				}	}}function mlistes(id, niveau) {var nv = niveau;var cat = id;var obj = document.getElementById("mliste_" + id);var cls = obj.className;var cls = cls.slice(cls.lastIndexOf("_") + 1, (cls.length));if(cls == "on"){obj.className="mlistes_nv" + nv + "_off";}else{if (cls != "hi") obj.className="mlistes_nv" + nv + "_on";}}function inserer_lien(champ) {if ( navigator.userAgent.indexOf('MSIE') != -1 ) {var doc =  b + "/CreationLienIE?OpenForm"} else {var doc =  b + "/CreationLien?OpenForm"}if (champ != null || champ != "" || champ != "undefined") {var doc = doc + "&ch=" + champ + "&fc&";}else {var doc = b + "/CreationLien?OpenForm&ch=txtURL&fc&";}var w = window.open(doc,"Liens","width=500,height=380, menubar=no, resizable=yes,scrollbars=yes,status=no,left=200,top=200");w.window.focus();}function selection_dossier() {var doc = b + "/SelectionDossier?OpenForm";var w = window.open(doc,"Selection de dossiers","width=500,height=350, menubar=no, resizable=yes,scrollbars=yes,status=no,left=200,top=200");w.window.focus();}function ajouter_image(champretour, confirmation){var cr = "";if (champretour != null || champretour != "") {cr = "&ch=" + champretour;}if (confirmation == "1") {alert("Une fois que vous aurez ajout\u00E9 votre image, ENREGISTREZ votre document \npour que la nouvelle image apparaisse dans la liste.\n NE PAS ACTUALISER (touche F5) LE DOCUMENT.")}var v = bFichiers + "/Image?OpenForm" + cr;var w = window.open(v,"","width=675,height=500,toolbar=no, address=no, location=no, menubar=no, resizable=yes,scrollbars=yes,status=yes,top=1,left=1");w.window.focus();}function EditerImage(id) {var doc = bFichiers + "/(id)/" + id + "?EditDocument";var w = window.open(doc,"Image","width=650,height=500, menubar=no, resizable=yes,scrollbars=yes,status=no,left=200,top=200");w.window.focus();}function Profil(id) {var u = remplacerAccents(id);//cette fonction remplace simplement les "+" par "_"var u = changerAccents1(u);var u = b + "/Profils/" + u  + "?OpenDocument";window.location.href = u;}function ancrage(u) {var w = window.location.href;if (w.indexOf("#") != -1) {w = w.substring(0, w.lastIndexOf("#"));}window.location.href = w + "#" + u;}function inserer_image() {if ( navigator.userAgent.indexOf('MSIE') != -1 ) {var doc = bFichiers + "/SelectionImageIE?OpenForm";} else {var doc = bFichiers + "/SelectionImage?OpenForm";}var w = window.open(doc,"Image","width=550,height=450, menubar=no, resizable=yes,scrollbars=yes,status=no,left=200,top=200");w.window.focus();}function Structure() {var doc = b + "/Structure_Encyclopedie";var w = window.open(doc,"","width=900,height=700, menubar=no, resizable=yes,scrollbars=yes,status=no,left=1,top=1");w.window.focus();}function MotCleAvecExtrait(id,sujet){var u = b + "/MotCleAvecExtrait?OpenForm&id=" + id;var w = window.open(u,"","width=520,height=400, toolbar=0, addressbar=0, directories=0, location=0, menubar=0, resizable=1,scrollbars=1,status=0,left=150,top=150");w.window.focus();}function PopMotCle(id){var u = b + "/(id)/" + id + "?EditDocument";var w = window.open(u,"","width=480,height=400, toolbar=0, addressbar=0, directories=0, location=0, menubar=0, resizable=1,scrollbars=1,status=0,left=150,top=150");w.window.focus();}function Dossier(doc) {var u = bDossiers + "/Dossiers/" + doc;window.location = u;}function DossierEncyclopedieGenerale(doc) {var u = bDossiersEG + "/Dossiers/" + doc;var w = window.open(u,'',"width=900,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function DossierWB(doc) {var u = bWB + "/Dossiers/" + doc;window.location = u;}function DocumentEncyclopedieGenerale(doc) {var u = bDocumentsEG + "/Documents/" + doc;var w = window.open(u,'',"width=900,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function PopParID(id) {var doc = b + "/(idx)/x" + id + "?OpenDocument";var w = window.open(doc,"","width=600,height=500, menubar=no, resizable=yes,scrollbars=yes,status=no,left=1,top=1");w.window.focus();}function Document(doc) {var u = bDocs + "/Documents/" + doc;window.location = u ;}function DocumentParID(id) {var u = b + "/(idx)/x" + id + "?OpenDocument";window.location = u ;}function DocumentWB(doc) {var u = bWB + "/Documents/" + doc;window.location = u;}function IndexDesSujets(mc) {var u = b + "/IndexSujetsMC?OpenForm&mc=" + changerAccents(mc) + "&";location.replace(u);}function IndexSujetsSousTheme(t,st) {var u = b + "/IndexSujetsSousTheme?OpenForm&t=" + changerAccents(t) + "&st=" + changerAccents(st)+ "&";location.replace(u);}function IndexSites(mc) {var u = b + "/ReseaugraphieParType?OpenForm&mc=" + changerAccents(mc) + "&";location.replace(u);}function IndexSitesMC(mc) {var u = b + "/ReseaugraphieParTheme?OpenForm&mc=" + changerAccents(mc) + "&";location.replace(u);}function IndexDocumentsParAuteurs(auteur) {var u = b + "/ArticlesParAuteurs?OpenForm&auteur=" + changerAccents(auteur) + "&";location.replace(u);}function DossierInaptitude(doc) {var u = bInaptitude + "/Dossiers/" + doc;var w = window.open(u,'',"width=800,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function DossierRousseau(doc) {var u = bRousseau + "/Dossiers/" + doc;window.location = u;}function PopDossier(doc) {var u = bDossiers + "/Dossiers/" + doc;window.location(u);}function DocumentInaptitude(doc) {var u = bInaptitude + "/Documents/" + doc;var w = window.open(u,'',"width=800,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function DocumentRousseau(doc) {var u = bRousseau + "/Documents/" + doc;window.location = u;}function Extrait(doc, id) {var u = '/rd.nsf/(extraits)?OpenAgent&id=' + id + '&url=' + bDocs + '/Documents/' + doc;window.location = u;}function Editeur(doc, id, pc) {var u = '/rd.nsf/(editeurs)?OpenAgent&pc=' + pc + '&id=' + id + '&url=' + doc;var w = window.open(u,'',"width=900,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function Ouvrage(doc, id, pc) {var u = '/rd.nsf/(ouvrages)?OpenAgent&pc=' + pc + '&id=' + id + '&url=' + doc;var w = window.open(u,'',"width=900,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function Categorie(doc) {var u = b + "/Categories/" + doc;window.location = u;}function Partenaire(doc) {var u = b + "/Partenaires/" + doc;window.location = u;}function Communique(doc) {var u = b + "/Communiques/" + doc;window.location = u;}function Page(doc) {var u = b + "/Pages/" + doc;window.location = u;}function Colloque(doc) {var w = window.open(doc,'',"width=950,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function Conference(doc) {var w = window.open(doc,'',"width=950,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function Encyclopedie(doc) {var w = window.open(doc,'',"width=900,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function Courrier() {var w = window.open(bCourrier,'',"width=600,height=600,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function Impression(sct) {var idsp = "sp_" + sct;var sp = document.getElementById(idsp);var doc = bdPublic + "/Impression?OpenForm";var w = window.open(doc,"Impression","width=650,height=600, menubar=no, resizable=yes,scrollbars=yes,status=no,left=1,top=1");w.window.focus();}function SitePublic(){var w = window.open(bp,'',"width=900,height=700,toolbar=1, addressbar=1, location=1, menubar=1, resizable=1,scrollbars=1,status=1,left=1,top=1");w.window.focus();}function Question(){var u = b + "/Question?OpenForm";var w = window.open(u,"Question","width=650,height=600, menubar=no, resizable=yes,scrollbars=yes,status=no,left=1,top=1");w.window.focus();}function editerquestion(id){var u = b + "/(id)/" + id + "?OpenDocument";var w = window.open(u,"Question","width=650,height=600, menubar=no, resizable=yes,scrollbars=yes,status=no,left=1,top=1");w.window.focus();}function Popup(doc){var u = doc;var w = window.open(u,"","width=800,height=600, toolbar=0, addressbar=1, directories=1, location=1, menubar=1, resizable=1,scrollbars=1,status=0,left=1,top=1");w.window.focus();}function Images(doc, l,h){var doc1 = "/encyclopedie/references/images.nsf/Images/" + doc;var w = window.open(doc1,'Image',"width=500,height=640,toolbar=no, location=no, menubar=no, resizable=yes,scrollbars=yes,status=no,left=1,top=1");w.window.focus();}function References(doc){var urldoc = "/encyclopedie/references.nsf/vue/" + doc;var w = window.open(urldoc,'Reference',"width=320,height=400,toolbar=no, location=no, menubar=no, resizable=yes,scrollbars=yes,status=no,left=1,top=1");w.window.focus();}function Recommander(iddoc, u, t){var url = location.pathname;windowVar = window.open("http://agora.qc.ca/public/messages.nsf/Memo?OpenForm&iddoc=" + iddoc + "&url=" + u + "&type=" + t, "Recommander", 'height=580,width=480,scrollbars=0,toolbar=0,directories=no,menubar=0,resizable=yes,left=1,top=1');windowVar.focus();}function Recherche() {alert('La fonction de recherche sera disponible d\'ici peu.');}function RechercheX(){var u = document.forms[0].SaisieRecherche.value;u = changerAccents(u);var c = document.forms[0].Critere.value;if (c == '') {url = '/encyclopedie/edition/recherche.nsf/EResultats?OpenForm&requete=' + u;}if (c != '') {url = '/encyclopedie/edition/recherche.nsf/EResultatsPC?OpenForm&requete=' + c + u;}window.location = url;}function RechercheDA(u,champ){u = changerAccents(u);var u1 = 'FIELD+' + champ + '+CONTAINS+' + u;url = '/encyclopedie/edition/recherche.nsf/EResultatsPC?OpenForm&requete=' + u1;window.location = url;}function RechercheParSujet(u){u = changerAccents(u);url = '/encyclopedie/edition/recherche.nsf/EThematique?OpenForm&requete=' + u;window.location = url;}function changerAccents(c) {while(c.indexOf(" ") != -1) c = c.replace(" ","+");while(c.indexOf("\u00E0") != -1) c = c.replace("\u00E0","%a1;");while(c.indexOf("\u00E2") != -1) c = c.replace("\u00E2","%a2");while(c.indexOf("\u00E4") != -1) c = c.replace("\u00E4","%a3");while(c.indexOf("\u00C0") != -1) c = c.replace("\u00C0","%A11");while(c.indexOf("\u00C2") != -1) c = c.replace("\u00C2","%A12");while(c.indexOf("\u00C4") != -1) c = c.replace("\u00C4","%A13");while(c.indexOf("\u00E7") != -1) c = c.replace("\u00E7","%c1");while(c.indexOf("\u00C7") != -1) c = c.replace("\u00C7","%C11");while(c.indexOf("\u00E9") != -1) c = c.replace("\u00E9","%e1");while(c.indexOf("\u00E8") != -1) c = c.replace("\u00E8","%e2");while(c.indexOf("\u00EA") != -1) c = c.replace("\u00EA","%e3");while(c.indexOf("\u00EB") != -1) c = c.replace("\u00EB","%e4");while(c.indexOf("\u00C9") != -1) c = c.replace("\u00C9","%E11");while(c.indexOf("\u00CA") != -1) c = c.replace("\u00CA","%E12");while(c.indexOf("\u00CB") != -1) c = c.replace("\u00CB","%E13");while(c.indexOf("\u00C8") != -1) c = c.replace("\u00C8","%E14");while(c.indexOf("\u00EE") != -1) c = c.replace("\u00EE","%i1");while(c.indexOf("\u00EF") != -1) c = c.replace("\u00EF","%i2");while(c.indexOf("\u00CE") != -1) c = c.replace("\u00CE","%I11");while(c.indexOf("\u00CF") != -1) c = c.replace("\u00CF","%I12");while(c.indexOf("\u00F4") != -1) c = c.replace("\u00F4","%o1");while(c.indexOf("\u00F6") != -1) c = c.replace("\u00F6","%o2");while(c.indexOf("\u00D4") != -1) c = c.replace("\u00D4","%O11");while(c.indexOf("\u00D6") != -1) c = c.replace("\u00D6","%O12");while(c.indexOf("\u00F9") != -1) c = c.replace("\u00F9","%u1");while(c.indexOf("\u00FC") != -1) c = c.replace("\u00FC","%u2");while(c.indexOf("\u00FB") != -1) c = c.replace("\u00FB","%u3");while(c.indexOf("\u00D9") != -1) c = c.replace("\u00D9","%U11");while(c.indexOf("\u00DC") != -1) c = c.replace("\u00DC","%U12");while(c.indexOf("\u00DB") != -1) c = c.replace("\u00DB","%U13");while(c.indexOf("'") != -1) c = c.replace("'","%");while(c.indexOf("(") != -1) c = c.replace("(","%");return c;}function remplacerAccents(c) {while(c.indexOf(" ") != -1) c = c.replace(" ","_");while(c.indexOf("\u00E0") != -1) c = c.replace("\u00E0","a");while(c.indexOf("\u00E2") != -1) c = c.replace("\u00E2","a");while(c.indexOf("\u00E4") != -1) c = c.replace("\u00E4","a");while(c.indexOf("\u00C0") != -1) c = c.replace("\u00C0","A");while(c.indexOf("\u00C2") != -1) c = c.replace("\u00C2","A");while(c.indexOf("\u00C4") != -1) c = c.replace("\u00C4","A");while(c.indexOf("\u00E7") != -1) c = c.replace("\u00E7","c");while(c.indexOf("\u00C7") != -1) c = c.replace("\u00C7","c");while(c.indexOf("\u00E9") != -1) c = c.replace("\u00E9","e");while(c.indexOf("\u00E8") != -1) c = c.replace("\u00E8","e");while(c.indexOf("\u00EA") != -1) c = c.replace("\u00EA","e");while(c.indexOf("\u00EB") != -1) c = c.replace("\u00EB","e");while(c.indexOf("\u00C9") != -1) c = c.replace("\u00C9","E");while(c.indexOf("\u00CA") != -1) c = c.replace("\u00CA","E");while(c.indexOf("\u00CB") != -1) c = c.replace("\u00CB","E");while(c.indexOf("\u00C8") != -1) c = c.replace("\u00C8","E");while(c.indexOf("\u00EE") != -1) c = c.replace("\u00EE","i");while(c.indexOf("\u00EF") != -1) c = c.replace("\u00EF","i");while(c.indexOf("\u00CE") != -1) c = c.replace("\u00CE","i");while(c.indexOf("\u00CF") != -1) c = c.replace("\u00CF","i");while(c.indexOf("\u00F4") != -1) c = c.replace("\u00F4","o");while(c.indexOf("\u00F6") != -1) c = c.replace("\u00F6","o");while(c.indexOf("\u00D4") != -1) c = c.replace("\u00D4","O");while(c.indexOf("\u00D6") != -1) c = c.replace("\u00D6","O");while(c.indexOf("\u00F9") != -1) c = c.replace("\u00F9","u");while(c.indexOf("\u00FC") != -1) c = c.replace("\u00FC","u");while(c.indexOf("\u00FB") != -1) c = c.replace("\u00FB","u");while(c.indexOf("\u00D9") != -1) c = c.replace("\u00D9","U");while(c.indexOf("\u00DC") != -1) c = c.replace("\u00DC","U");while(c.indexOf("\u00DB") != -1) c = c.replace("\u00DB","U");return c;}function changerAccents1(c) {while(c.indexOf("+") != -1) c = c.replace("+","_");return c;}