var FENTRANS = "fenNIFTrans"; var OPTOPEN = "toolbar=no,status=yes,resizable=yes,location=no,scrollbars=yes"; var agrave = String.fromCharCode(224); var eacute = String.fromCharCode(233); var eacuteMaj = String.fromCharCode(201); var ecirc = String.fromCharCode(234); var egrave = String.fromCharCode(232); var ocirc = String.fromCharCode(244); var gUrlTrans = ""; var gLangue = ""; var gTypeOuvrir = ""; function OuvrirService (sService,sLangue,sTailleCaract) { if(_affchInvitSurOuvrSvc.indexOf(sService)>=0)
AfficherInvitationSondage('FenetreInvitationSondage'); if ((sLangue != null) && (sLangue == 'E')) sLangue = 'A'; if(document.layers==null)
OuvrirServiceInterne(sService,sLangue,sTailleCaract); else
{ var sURLTrans = ObtenirURL(window.location.href, false); sURLTrans += "?Service=" + sService + "&Langue=" + sLangue + "&CookieActif=f"; if (sTailleCaract != null) sURLTrans += "&TailleCaract=" + sTailleCaract; var maxHeight = screen.availHeight - 20; var maxWidth = 800; if (screen.availWidth >= 1024) { maxWidth = 1024;}
hWnd = window.open('', FENTRANS, OPTOPEN + ',width=' + maxWidth + ',height=' + maxHeight + ',top=20,left=20'); hWnd.location.href=sURLTrans
}
}
function ObtenirURL(url, IntrcSecrs) { var expr; regExpr = /(www[1a]?)\.(rrq\.gouv\.qc\.ca)(.*)/i; if (regExpr.test(url)) { expr = ExecReg(regExpr,url); var expr2 = new Array(expr[0], expr[1], "", "", expr[2], "", "", expr[3]); return GenererURL(expr2, IntrcSecrs);}
regExpr = /(www[1a]?(P([1-9]))?)\.(.*\.int\.rrq\.qc)(\/Phase_([1-9]{1}))?(.*)/i; if (regExpr.test(url)) { expr = ExecReg(regExpr,url); return GenererURL(expr, IntrcSecrs);}
regExpr = /((pec|pec\.zit|pcc)(\.intg|\.dev2)?\.rrq\.int\.rrq\.qc)(\/Phase_([1-9]{1}))?(.*)/i; if (regExpr.test(url)) { expr = ExecReg(regExpr,url); var expr2 = new Array(expr[0], "", "", "", expr[1], expr[4], expr[5], expr[6]); return GenererURL(expr2, IntrcSecrs);}
regExpr = /(www[1a]?)\.(jeplanifie\.com)(.*)/i; if (regExpr.test(url)) { expr = ExecReg(regExpr,url); var expr2 = new Array(expr[0], expr[1], "", "", expr[2], "", "", expr[3]); return GenererURL(expr2, IntrcSecrs);}
regExpr = /(www[1a]?)\.(jeplanifie\.gouv\.qc\.ca)(.*)/i; if (regExpr.test(url)) { expr = ExecReg(regExpr,url); var expr2 = new Array(expr[0], expr[1], "", "", expr[2], "", "", expr[3]); return GenererURL(expr2, IntrcSecrs);}
regExpr = /http:\/\/(forarrq|accprrq|intgrrq)(\/Phase_([1-9]{1}))?(.*)/i; if (regExpr.test(url)) { expr = ExecReg(regExpr,url); var expr2 = new Array(expr[0], "", "", "", expr[1], expr[2], expr[3], expr[4]); return GenererURL(expr2, IntrcSecrs);}
regExpr = /(localhost|eu[0-9]{2}[a-z]{2}[0-9]{4}[a-z]|www.rrq.gouv.qc)(\/Phase_([1-9]{1}))?(.*)/i; if (regExpr.test(url)) { expr = ExecReg(regExpr,url); var expr2 = new Array(expr[0], "", "", "", expr[1], expr[2], expr[3], expr[4]); return GenererURL(expr2, IntrcSecrs);}
if (IntrcSecrs == true) { alert("Impossible de d"+ eacute+"terminer l'environnement informationnel.");}
else { alert("Impossible de d"+ eacute+"marrer le service demand"+eacute+".");}
}
function ExecReg(regExpr,url)
{ var array; array=regExpr.exec(url); for(i=0;i<array.length;i++)
{ if(array[i]==null)
{ array[i]="";}
}
return array;}
function GenererURL(expr, IntrcSecrs) { var AIGUILLEUR = "/XW5I121_Aiguilleur/XW5SAiguilleur.aspx"; var strHTTP = "http"; var strWWW = "www"; var strNomSite = ""; var strPhase = "/Phase_1"; if (IntrcSecrs == true) { strWWW += "1"
}
else { strWWW += "a"
}
if (expr[3].length > 0) { strWWW += "P" + expr[3]; strPhase = "/Phase_" + expr[3];}
strWWW += "."; if (expr[6].length > 0) { strPhase = "/Phase_" + expr[6];}
if (expr[4].length > 0) { strNomSite = expr[4]; regExpr = /^(forarrq|accprrq|intgrrq)$/i; if (regExpr.test(expr[4])) { strNomSite += ".int.rrq.qc";}
regExpr = /^.*\.jeplanifie\.int\.rrq\.qc$/i
if (regExpr.test(expr[4])) { strNomSite = strNomSite.replace(/\.jeplanifie\./i, ".rrq.");}
regExpr = /^jeplanifie\.com$/i
if (regExpr.test(expr[4])) { strNomSite = strNomSite.replace(/\jeplanifie\.com/i, "rrq.gouv.qc.ca");}
regExpr = /^jeplanifie\.gouv\.qc\.ca$/i
if (regExpr.test(expr[4])) { strNomSite = strNomSite.replace(/jeplanifie\./i, "rrq.");}
regExpr = /^(pec|pec\.zit|pcc)\.(intg|dev2)\.rrq\.int\.rrq\.qc$/i
if (regExpr.test(expr[4])) { strNomSite = "intg.rrq.int.rrq.qc";}
regExpr = /^(pec|pec\.zit|pcc)\.rrq\.int\.rrq\.qc$/i
if (regExpr.test(expr[4])) { strNomSite = "rrq.gouv.qc.ca"; strPhase = "";}
regExpr = /^(rrq\.gouv\.qc\.ca|zin\.rrq\.int\.rrq\.qc|zin\.s30zdiprod[0-9]{2}\.rrq\.int\.rrq\.qc|s30zdiprod[0-9]{2}\.rrq\.int\.rrq\.qc|jeplanifie\.com|jeplanifie\.gouv\.qc\.ca|zin\.jeplanifie\.int\.rrq\.qc|s30zdiprod[0-9]{2}\.jeplanifie\.int\.rrq\.qc|zin\.s30zdiprod[0-9]{2}\.jeplanifie\.int\.rrq\.qc)$/i; if (regExpr.test(expr[4])) { strPhase = "";}
switch (strNomSite.toUpperCase()) { case "RRQ.GOUV.QC.CA" :
case "ZIN.RRQ.INT.RRQ.QC" :
strHTTP += "s"; break; case "INTG.RRQ.INT.RRQ.QC" :
case "ZIN.INTG.RRQ.INT.RRQ.QC" :
if (IntrcSecrs != true || strPhase == "/Phase_1") strHTTP += "s"; break; case "ACCP.RRQ.INT.RRQ.QC" :
case "ZIN.ACCP.RRQ.INT.RRQ.QC" :
case "FORA.RRQ.INT.RRQ.QC" :
case "ZIN.FORA.RRQ.INT.RRQ.QC" :
case "FORA.JEPLANIFIE.INT.RRQ.QC" :
case "ZIN.FORA.JEPLANIFIE.INT.RRQ.QC" :
case "ACCP.JEPLANIFIE.INT.RRQ.QC" :
case "ZIN.ACCP.JEPLANIFIE.INT.RRQ.QC" :
if (IntrcSecrs == true && strPhase == "/Phase_1") strHTTP += "s"; break; case "LOCALHOST" :
case "WWW.RRQ.GOUV.QC" :
strWWW = ""; break;}
regExpr = /^eu[0-9]{2}[a-z]{2}[0-9]{4}[a-z]$/i; if (regExpr.test(strNomSite)) { strWWW = "";}
if (IntrcSecrs == true)
{ return strHTTP + "://" + strWWW + strNomSite;}
else
{ return strHTTP + "://" + strWWW + strNomSite + strPhase + "/Transactionnel" + AIGUILLEUR;}
}
}
function ObtenirUrlIntrcSecrs() { var url = window.location.href; return ObtenirURL(url, true);}
function OuvrirCourriel(urlNousJoindre, sLangue) { gLangue = sLangue; gTypeOuvrir = "Courriel"; if (DetecterNIFTrans(sLangue)==true) { } else { window.location.href = urlNousJoindre;}
}
function AffchMessgErreurTrans(msg, url, line){ AffchMessgTransEnCours(gLangue, gTypeOuvrir)
return true;}
function AffchMessgTransEnCours(sLangue, sTypeOuvrir) { var sMsgErrOuvrrCourrF = "Pour joindre la R" + eacute + "gie, cliquez plut" + ocirc + "t sur l'ic" + ocirc + "ne " + guilGauc + nbsp + "Pour nous joindre" + nbsp + guilDroit + " du service Web de la R" + eacute + "gie que vous avez d" + eacute + "j" + agrave + " d" + eacute + "marr" + eacute + ".\n\nSi vous " + ecirc + "tes maintenant dans le service d'authentification clicS" + eacuteMaj + "QUR, vous devez cliquer sur l'ic" + ocirc + "ne " + guilGauc + nbsp + "Pour nous joindre" + nbsp + guilDroit + " ou sur le bouton " + guilGauc + nbsp + " Aide " + nbsp + guilDroit + " de ce service pour joindre l'organisme responsable."
var sMsgErrOuvrrCourrA = "To reach the R" + eacute + "gie, click instead on the 'Contact us' button in the R" + eacute + "gie's web service from which you came.\n\nIf you are now connected to the clicSEQUR authentication service, you must click on the 'Contact us' button or the 'On-line Help' button of that service to reach the agency in charge."
var sMsgErrOuvrrServcF = "Vous avez d" + eacute + "j" + agrave + " d" + eacute + "marr" + eacute + " un autre service Web.\n\nVous devez d'abord fermer ce service avant d'en d" + eacute + "marrer un nouveau."; var sMsgErrOuvrrServcA = "You have already opened another Web service.\n\nYou must quit that service before you can open another."; var msg; var sTempLangue; if (sLangue.toUpperCase() == 'A') { sTempLangue = 'A';}
else { sTempLangue = 'F';}
if (sTypeOuvrir == 'Service') { msg = eval("sMsgErrOuvrrServc" + sTempLangue);}
else { msg = eval("sMsgErrOuvrrCourr" + sTempLangue);}
try
{ var hWnd = window.open('',FENTRANS,OPTOPEN);}
catch(e)
{}
alert(msg); if(hWnd!=null)
{ try
{ hWnd.focus();}
catch(e)
{}
}
}
function AffchMessgPopupBloque(sLangue) { var sMsgErrF = "Vous avez probablement activ" + eacute + " un param" + egrave + "tre de votre fureteur Web ou install" + eacute + " un logiciel qui emp" + ecirc + "che l'apparition de fen" + ecirc + "tres publicitaires (pop-up) pendant vos s" + eacute + "ances.\n\nVous devez permettre l'affichage de ces fen" + ecirc + "tres pour acc" + eacute + "der " + agrave + " ce service."; var sMsgErrA = "You have probably activated a Web browser option or installed software that prevents pop-up windows from appearing.\n\nTo access this on-line service, you must allow the display of pop-up windows."; var msg; var sTempLangue; if (sLangue.toUpperCase() == 'A') { sTempLangue = 'A';}
else { sTempLangue = 'F';}
msg = eval("sMsgErr" + sTempLangue); alert(msg);}
function DetecterNIFTrans(sLangue) { var regExprIE=/MSIE[ ]\d.\d.+Mac_PowerPC[)]$/i; if(regExprIE.test(window.navigator.userAgent))
return false; gLangue = sLangue; var hWnd; try
{ hWnd = window.open('',FENTRANS); if (hWnd == null) { AffchMessgPopupBloque(sLangue); return true;}
if (typeof hWnd.document == "undefined") { AffchMessgTransEnCours(sLangue, gTypeOuvrir)
hWnd.focus(); return true;}
var sTest = hWnd.location.href;}
catch(e)
{ AffchMessgErreurTrans(sLangue,gTypeOuvrir); if(hWnd!=null)
hWnd.focus(); return true;}
var nouvUrl=hWnd.location.href; if (nouvUrl == 'about:blank' || nouvUrl == '' || nouvUrl == null || window.location.href.indexOf(nouvUrl)!=-1 || nouvUrl=='/') { hWnd.close(); return false;} else { AffchMessgTransEnCours(sLangue, gTypeOuvrir)
hWnd.focus(); return true;}
}
function OuvrirServiceInterne(sService,sLangue,sTailleCaract)
{ var hWnd; var cookiesPermis = false; var sCookieActif = "O"; gLangue = sLangue; gTypeOuvrir = "Service"; document.cookie = 'cookiesPermis=yes'; if(document.cookie.indexOf('cookiesPermis=yes') != -1)
{ cookiesPermis = true; document.cookie = 'cookiesPermis=no';}
if (cookiesPermis == false)
sCookieActif = "N"; var sURLTrans = ObtenirURL(window.location.href, false); if (sURLTrans == null) return; var maxHeight = screen.availHeight - 20 ; sURLTrans += "?Service=" + sService + "&Langue=" + sLangue + "&CookieActif=" + sCookieActif; if (sTailleCaract != null) sURLTrans += "&TailleCaract=" + sTailleCaract; gUrlTrans = sURLTrans; var maxWidth = 800; if (screen.availWidth >= 1024) { maxWidth = 1024;}
try
{ hWnd = window.open('', FENTRANS, OPTOPEN + ',width=' + maxWidth + ',height=' + maxHeight + ',top=20,left=20'); if (hWnd == null) { AffchMessgPopupBloque(sLangue); return;}
if (typeof hWnd.document == "undefined") { AffchMessgTransEnCours(sLangue, gTypeOuvrir)
hWnd.focus(); return;}
var sTest; sTest = hWnd.location.href;}
catch(e)
{ AffchMessgErreurTrans(sLangue,gTypeOuvrir); if(hWnd!=null)
hWnd.focus(); return;}
hWnd.resizeTo(maxWidth, maxHeight); if (navigator.userAgent.toLowerCase().indexOf("chrome") == -1) { hWnd.moveTo(20, 20);}
var nouvUrl=hWnd.location.href; if (nouvUrl == 'about:blank' || nouvUrl == '' || nouvUrl == null || window.location.href.indexOf(nouvUrl)!=-1 || nouvUrl=='/') { hWnd.focus(); hWnd.location.href = sURLTrans;} else { AffchMessgTransEnCours(sLangue,gTypeOuvrir)
hWnd.focus();}
}
function OuvrirPopupAvance(fURL, nInstance, winParam, winWidth, winHeight, winTop, winLeft, closeSelf) { if (winLeft == "droite") { winLeft = screen.availWidth - winWidth;} else { if (winWidth == "max") { winWidth = screen.availWidth - winLeft;} else { if (screen.availWidth - winWidth < winLeft ) { if (screen.availWidth - winWidth > 0) { winLeft = screen.availWidth - winWidth;} else { winLeft = 0;}
}
}
}
if (winHeight == "max") { winHeight = screen.availHeight;}
winHeight = winHeight - winTop
isMac = (navigator.appVersion.indexOf("Mac") != -1); if (isMac) { winLeft -= 10; winHeight -=40;}
if (nInstance == "fenParent") { if (opener != null) { if (!opener.closed) { opener.location = fURL; try
{ opener.focus();}
catch(e)
{}
if(closeSelf)
self.close(); return;}
}
}
winHeight = winHeight - 30; if (winParam.search(/status/i) >= 0) winHeight = winHeight - 20; if (winParam.search(/location|toolbar/i) >= 0) winHeight = winHeight - 60; if (winParam.search(/menubar/i) >= 0) winHeight = winHeight - 50; mghWnd = window.open(fURL, nInstance, winParam + ',width=' + winWidth + ',height=' + winHeight + ',left=' + winLeft + ',top=' + winTop); mghWnd.focus(); if(closeSelf)
self.close();}
function trapCleEnter(e) { var evt=getEvent(e); var charCode = (evt.charCode && evt.charCode != 0) ? evt.charCode : evt.keyCode; if (charCode == 13 || charCode == 3) { evt.cancelBubble = true; if (evt.preventDefault) { evt.preventDefault();}
else { evt.returnValue = false;}
}
}
function getEvent(e){ if(!e) return window.event; return e;}
function OuvrirServiceInt(codeService,sLangue,sOption,bForcerNIF){ adresseInteractif = new Object(); adresseInteractif["PR21020FR"] = new Array('/Interactif/PR2I121_Prenoms/PR2I121_Prenoms/PR2SPrenoms.aspx?langue=fr'); adresseInteractif["PR21020EN"] = new Array('/Interactif/PR2I121_Prenoms/PR2I121_Prenoms/PR2SPrenoms.aspx?langue=en'); adresseInteractif["PR22010FR"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNousJoindre.aspx?langue=fr'); adresseInteractif["PR22010EN"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNousJoindre.aspx?langue=en'); adresseInteractif["PR22011FR"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNousJoindre.aspx?langue=fr&origine=p'); adresseInteractif["PR22011EN"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNousJoindre.aspx?langue=en&origine=p'); adresseInteractif["PR22012FR"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNsJoindreDepute.aspx?langue=fr'); adresseInteractif["PR22012EN"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNsJoindreDepute.aspx?langue=en'); adresseInteractif["PR22013FR"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNsJoindreCurateur.aspx?langue=fr'); adresseInteractif["PR22013EN"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNsJoindreCurateur.aspx?langue=en'); adresseInteractif["PR22014FR"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNsJoindreServcQuebec.aspx?langue=fr'); adresseInteractif["PR22014EN"] = new Array('/Interactif/PR2I211_TraiterDemCourriel/PR2I211_TraiterDemCourriel/PR2SNsJoindreServcQuebec.aspx?langue=fr'); adresseInteractif["PR22020FR"] = new Array('/Interactif/PR2I221_Abonnement/PR2I221_Abonnement/PR2I2020Abonnement.aspx?langue=fr'); adresseInteractif["PR22020EN"] = new Array('/Interactif/PR2I221_Abonnement/PR2I221_Abonnement/PR2I2020Abonnement.aspx?langue=en'); adresseInteractif["PR22030FR"] = new Array('/Interactif/PR2I231_EnvoyerReferAmi/PR2I231_EnvoyerReferAmi/PR2SEnvoiAmi.aspx?langue=fr'); adresseInteractif["PR22030EN"] = new Array('/Interactif/PR2I231_EnvoyerReferAmi/PR2I231_EnvoyerReferAmi/PR2SEnvoiAmi.aspx?langue=en'); adresseInteractif["PR23010FR"] = new Array('/Interactif/PR2I311_Sondages/PR2I311_Sondages/PR2SSondage.aspx'); adresseInteractif["PR23010EN"] = new Array('/Interactif/PR2I311_Sondages/PR2I311_Sondages/PR2SSondageEN.aspx'); adresseInteractif["PR23090FR"] = new Array('/Interactif/PR2I391_ConsultPublique/PR2IConsultPublique/PR2SConsultPublique.aspx'); adresseInteractif["PR23090EN"] = new Array('/Interactif/PR2I391_ConsultPublique/PR2IConsultPublique/PR2SConsultPublique.aspx'); adresseInteractif["PR24010FR"] = new Array('/Interactif/PR2I411_FormPub/PR2I411_FormPub/PR2SFormulaires.aspx?langue=fr'); adresseInteractif["PR24010EN"] = new Array('/Interactif/PR2I411_FormPub/PR2I411_FormPub/PR2SFormulaires.aspx?langue=en'); adresseInteractif["PR24011FR"] = new Array('/Interactif/PR2I411_FormPub/PR2I411_FormPub/PR2SPublications.aspx?langue=fr'); adresseInteractif["PR24011EN"] = new Array('/Interactif/PR2I411_FormPub/PR2I411_FormPub/PR2SPublications.aspx?langue=en'); adresseInteractif["PR2I231FR"] = new Array('/Interactif/PR2I231_EnvoyerReferAmi/PR2I231_EnvoyerReferAmi/PR2SEnvoiAmi.aspx?langue=fr'); adresseInteractif["PR2I231EN"] = new Array('/Interactif/PR2I231_EnvoyerReferAmi/PR2I231_EnvoyerReferAmi/PR2SEnvoiAmi.aspx?langue=en'); adresseInteractif["PR21010FR"] = new Array('/Interactif/PR2I111_QuizRetraite/PR2I111_QuizRetraite/PR2SAiguilleurQuiz.aspx?langue=fr'); adresseInteractif["PR21010EN"] = new Array('/Interactif/PR2I111_QuizRetraite/PR2I111_QuizRetraite/PR2SAiguilleurQuiz.aspx?langue=en'); adresseInteractif["PR25010FR"] = new Array('/Interactif/PR2I510_BonParticipation/PR2SAiguilleur.aspx?langue=fr'); adresseInteractif["PR25010EN"] = new Array('/Interactif/PR2I510_BonParticipation/PR2SAiguilleur.aspx?langue=en'); var ouvrirAvecNIF=true; url = adresseInteractif[codeService + sLangue]
if (codeService == 'PR22010' || codeService =='PR22011' || codeService == 'PR22012' || codeService == 'PR22013' || codeService == 'PR22014' || codeService == 'PR25010')
{ url = ObtenirUrlIntrcSecrs() + url;}
if (url == null)
{ alert("le code de service " + codeService + " n'est pas inscrit dans le fichier XI1JInfrm.js.")
}
else
{ switch(codeService)
{ case "PR25010" :
if (bForcerNIF != true)
{ ouvrirAvecNIF=false;}
}
createCookie('RRQEnvoyer',document.location,null); createCookie('RRQTitre',document.title,null); if(ouvrirAvecNIF)
OuvrirPopup(url,'Interactif',sOption,null); else
document.location=url;}
}
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+"="+escape(value)+expires+"; path=/";}
function OuvrirPopup(sLien, sNomFenetre, sOption, sOptionsRRQ)
{ var popUnder; popUnder = false; if (sOptionsRRQ != null)
{ if (sOptionsRRQ.indexOf('popunder') != -1)
{ popUnder=true;}
}
var fenetrePopup = window.open(sLien, sNomFenetre, sOption); if(fenetrePopup !=null)
{ fenetrePopup.focus();}
if (popUnder)
{ fenetrePopup.blur(); window.focus();}
}
var guilGauc = String.fromCharCode(171); var guilDroit = String.fromCharCode(187); var nbsp = String.fromCharCode(160); var ocirc = String.fromCharCode(244); var _affchInvitSurOuvrSvc=""; function gererOnload()
{ DetrmPostnCursr();}
function PlacerCurseur(ClientId)
{ var Champ = findDOM(ClientId,0); if (Champ.focus){ Champ.focus();}
if ((typeof(Champ) == "undefined") ||(typeof(Champ.type) != "string")) { return;}
if (Champ.isDisabled == true) { return;}
if ((Champ.type == "text") || (Champ.type == "password")) { Champ.select();}
if (Champ.hideFocus){ Champ.hideFocus=false;}
}
function DetrmPostnCursr() { if (typeof(PremierChampSaisie) == "string")
{ PlacerCurseur(PremierChampSaisie);}
}
function findDOM(objectID,withStyle)
{ if (withStyle == 1)
return (document.getElementById(objectID).style) ; else
return (document.getElementById(objectID)) ;}
function ChangerImage(evt, urlImage)
{ evt = (evt) ? evt : ((event) ? event : null); if (evt)
{ source = (evt.srcElement) ? evt.srcElement : ((evt.target) ? evt.target : null); if (source)
source.src = urlImage;}
}
function ChangerImageHyperLien(id, urlImage)
{ document.getElementById(id).src = urlImage;}
function OuvrirDansFenetreParent(sUrl)
{ if (opener != null) { if (!opener.closed) { opener.location = sUrl; try
{ opener.focus();}
catch(e)
{}
return true;}
}
return false;}
function fAction_AfficheDate(ident, ident1)
{ if ((document.getElementById(ident).style.display == "none") || (document.getElementById(ident).style.display == ""))
{ document.getElementById(ident).style.display = "block"; document.getElementById(ident1).style.display = "none";}
else
document.getElementById(ident).style.display = "none";}
function clickBoutonSurEnter (evt, idBtn)
{ evt = (evt) ? evt : ((event) ? event : null); var btn = (document.getElementById) ? document.getElementById(idBtn) : ((document.all) ? document.all[idBtn] : null)
if (btn)
{ if ((evt.which && evt.which == 13) || (evt.keyCode && evt.keyCode == 13))
{ btn.click(); return false;}
else
return true;}
else
return true;}
function clickBoutonSurEnterRecherche(evt,idHyperlien)
{ evt=(evt) ? evt:( (event) ? event:null); var hyp=(document.getElementById) ? document.getElementById(idHyperlien):( (document.all) ? document.all[idHyperlien]:null); var srcEl=(evt.srcElement==null) ? evt.target : evt.srcElement; if(hyp!=null)
{ if( (evt.which && evt.which==13) || (evt.keyCode && evt.keyCode==13))
{ Rechercher(srcEl.id, idHyperlien); return false;}
else
return true;}
else
return true;}
function Rechercher(idTxtBox, idHyperlien)
{ var oTxtBox = document.getElementById(idTxtBox); var oHyp = document.getElementById(idHyperlien); var sRequete; if (oTxtBox != null)
{ sRequete = encodeURIComponent(oTxtBox.value);}
var sURL; if (oHyp != null)
{ sURL = oHyp.href + sRequete;}
if (sURL != null)
{ window.location.href=sURL;}
}
function queryString(parameter) { var loc = location.search.substring(1, location.search.length); var param_value = null; var params = loc.split("&"); for (i=0; i<params.length;i++) { param_name = params[i].substring(0,params[i].indexOf('=')); if (param_name == parameter) { param_value = params[i].substring(params[i].indexOf('=')+1)
}
}
if (param_value != null) { return decodeURIComponent(param_value);}
else { return null;}
}
function modifieTag(anchors, indxRech, indexTag, nouvContenu)
{ var anchor; for(var i=0;i<anchors.length;i++)
{ anchor=anchors[i]; if(EstAnchorPopup(anchor) && ++indxRech==indexTag)
anchor.outerHTML=nouvContenu;}
}
function EstAnchorPopup(sAnchor)
{ if ((sAnchor.onclick != null)
&& ((sAnchor.onclick.toString().indexOf('OuvrirPopup(',0) != -1) || (sAnchor.onclick.toString().indexOf('OuvrirServiceInt(',0) != -1) || (sAnchor.onclick.toString().indexOf('OuvrirService(',0) != -1)))
return true;}
function changeCookieLangue()
{ if (document.cookie.indexOf('langue=1') != -1)
createCookie('langue','0',null); else
createCookie('langue','1',null);}
function ObtenirIndexProchainContenu(arrContenus,sGuidContenu,sGuidContenuSynchronise,sPathLangue)
{ var indexProchContenu; var indexContenuDejaAffiche
if (sGuidContenuSynchronise == null)
indexContenuDejaAffiche = Get_Cookie(sGuidContenu); else
{ var indexContenuDejaAfficheSynchronisation; indexContenuDejaAfficheSynchronisation = RecupererIndexContenuSynchro(sGuidContenuSynchronise,sPathLangue); return indexContenuDejaAfficheSynchronisation
}
if (indexContenuDejaAffiche == null)
{ indexProchContenu = get_random(arrContenus.length);}
else
{ indexProchContenu = ++indexContenuDejaAffiche; if (indexProchContenu > arrContenus.length - 1)
{ indexProchContenu = 0;}
}
if (sGuidContenuSynchronise == null)
{ Set_Cookie(sGuidContenu,indexProchContenu,1,sPathLangue,'',''); EnregistrerIndexContenuAffiche(sGuidContenu,sPathLangue,indexProchContenu);}
return indexProchContenu
}
var mIndexContenuAffiche; function RecupererIndexContenuSynchro(sGuidContenuSynchronise,sLangue)
{ if (mIndexContenuAffiche == null)
{ return (-1);}
else
{ if (mIndexContenuAffiche.indexOf(sGuidContenuSynchronise + sLangue) != -1)
{ var i; var arrContenuSynchronise; arrContenuSynchronise = mIndexContenuAffiche.split('|'); for (i=0;i<arrContenuSynchronise.length;i++)
{ if (arrContenuSynchronise[i].indexOf(sGuidContenuSynchronise + sLangue) != -1)
{ return arrContenuSynchronise[i].substring(arrContenuSynchronise[i].indexOf('=')+1);}
}
}
}
return (-1);}
function EnregistrerIndexContenuAffiche(sGuidContenu, sLangue, iIndex)
{ if (mIndexContenuAffiche == null)
{ mIndexContenuAffiche = '';}
mIndexContenuAffiche = mIndexContenuAffiche + sGuidContenu + sLangue + '=' + iIndex + '|';}
function AfficherContenu(indexContenu,arrContenus,idCtrlContenu, sModePublication)
{ if (arrContenus[indexContenu] != null)
{ document.getElementById(idCtrlContenu).innerHTML = arrContenus[indexContenu];}
else
{ if (sModePublication == 'false')
{ document.getElementById(idCtrlContenu).innerHTML = '<p style="color:red; font-weight: bold;">ERREUR: Le contenu a afficher n\'a pas &eacute\;t&eacute\; trouv&eacute\;.<\/p><p><strong>Est-ce que contenu est synchronis&eacute\; ?<\/strong> <br>1- Assurez-vous que ce contenu rotatif est positionn&eacute\; plus bas que l\'autre controle de contenu rotatif avec lequel il est synchronis&eacute\;.<br><br>2- Assurez-vous que vous que le nom (<i>name</i>) des postings de ce contenu rotatif correspondent bien au nom (<i>name</i>) des postings avec lequel ils sont synchronis&eacute;s.<\/p>';}
else
{ document.getElementById(idCtrlContenu).innerHTML = '';}
}
}
function get_random(nombreMaximum)
{ var ranNum= Math.floor(Math.random()*nombreMaximum); return ranNum;}
function Set_Cookie( name, value, expires, path, domain, secure )
{ var today = new Date(); today.setTime( today.getTime() ); if ( expires )
{ expires = expires * 1000 * 60 * 60 * 24;}
var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" );}
function Guid()
{ var result, i, j; result=''; for(j=0;j<32;j++)
{ if(j==8 || j==12|| j==16|| j==20)
result=result+'-'; i=Math.floor((Math.random()*16)|0).toString(16).toUpperCase(); result=result+i;}
return result
}
function Get_Cookie( name ) { var start = document.cookie.indexOf( name + "=" ); var len = start + name.length + 1; if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{ return null;}
if ( start == -1 ) return null; var end = document.cookie.indexOf( ";", len ); if ( end == -1 ) end = document.cookie.length; return unescape( document.cookie.substring( len, end ) );}
function OuvrirFenetreInfoLettre(sURL)
{ OuvrirPopup(sURL,'InfoLettre','height=581,width=770,left=20,top=20,titlebar,scrollbars,resizable,status',null);}
function OuvrirFenetreLexique(sURL)
{ OuvrirPopup(sURL,'Lexique','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=440,height=640,left=500,top=20',null);}
function DivPopup(oDiv, posLeft, posTop)
{ oDiv.style.display = "block"; oDiv.style.left = String(posLeft); oDiv.style.top = String(posTop);}
function DivUnpop(oDiv)
{ oDiv.style.display = "none";}
function getStyle(idObj,styleProp)
{ var x = document.getElementById(idObj); if (x.currentStyle)
var y = x.currentStyle[styleProp]; else if (window.getComputedStyle)
var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp); return y;}
function SupporteCookie()
{ if (Get_Cookie('RRQ_SupporteCookie') == 'oui')
{ return true;}
else
{ Set_Cookie('RRQ_SupporteCookie','oui',0,'/'); if (Get_Cookie('RRQ_SupporteCookie') == 'oui') return true;}
return false;}
function OuvrirPopupModeAnonyme(sURL)
{ OuvrirPopup(sURL,'SiteAnonyme','height=768,width=1024,left=20,top=20,titlebar,scrollbars,resizable,status,toolbar,menubar,directories,location',null);}
function AfficherFenetreModale()
{ $(document).ready(function(){ $( "#dialog-modal" ).dialog( "open" ); return false;});}
function GererAffichageFenetreModale(NomFenetre)
{ var nomCookie = 'FenetreModale_' + NomFenetre; if (Get_Cookie(nomCookie) != 'Affiche')
{ AfficherFenetreModale(); Set_Cookie(nomCookie,'Affiche',0,'/');}
}
function AnnulerOuvertureFenetreModale(NomFenetre)
{ var nomCookie = 'FenetreModale_' + NomFenetre; Set_Cookie(nomCookie,'Affiche',0,'/');}
function PartagezTwitter(urlCourt,message)
{ var urlTwitter; var queryString; queryString = encodeURIComponent(message + " " + urlCourt); urlTwitter = 'http://twitter.com/home?status=' + queryString; OuvrirPopup(urlTwitter ,'PartagezTwitter','height=768,width=1024,left=20,top=20,titlebar,scrollbars,resizable,status,toolbar,menubar,directories,location',null);}
function OuvrirFenetreLexique(url)
{ OuvrirPopupAvance(url,'fenLexique','status,resizable,toolbar,scrollbars','490','max','0','droite',false);}
function EstClientMobile()
{ var userAgent; var mobile = ["iphone", "ipod", "blackberry", "android", "iemobile"]; userAgent = navigator.userAgent.toLowerCase(); for(var i= 0; i < mobile.length; i++)
{ if ((userAgent.indexOf(mobile[i])!=-1) && (userAgent.indexOf("tablet")==-1))
{ return true;}
}
return false;}

