var serveur;var oUtilCnx;var leBiscuit;var RACINE_stage;var sysFich=null;var FICH_PARCOURS="";var lesson_mode="normal";var modeTentative="";var parcoursEnregistre=false;var activiteUnique=false;var SUR_CHORUS=false;var SUR_CHORUS_ADM=false;var RACINE_MOS;var STYLE_INTERFACE;var RACINE_XSL;var RACINE_STYLES;var RACINE_STYLE;var LISTE_L="";var LISTE_BL="";var SYNC_CORRIGE_ITEM="";var PLAN_DROIT=false;var MENU_BAS=false;window.onbeforeunload=LMS_veutQuitter;var depuisFenGNR=false;function donneParam(nomP){ var res=''; var params=window.location.search; if (params!=""&&(params.indexOf('%26')>0)){params=params.replace(/%26/,'&');} var ind=params.indexOf(nomP+'='); if (ind>0){ var reste=params.substring(ind+nomP.length+1,params.length); var indexFin=reste.indexOf('&'); if (indexFin<0){indexFin=params.length;} res= reste.substring(0,indexFin); } return res;}if (donneParam("largVp")!=""){var largD=parseInt(donneParam("largVp"));if (largD<640){largD="device-width";}document.write('<meta name="viewport" content="width='+largD+'" />');}function LMS_init(version){serveur=new LMSLocal();serveur.init(version);try {if (window.opener!=null&&window.opener.top.liste!=null&&window.opener.top.liste.DOMArbo!=null){lesson_mode="browse";depuisFenGNR=true;}} catch(e){}var strLoc=window.location.href;var indexD=strLoc.lastIndexOf("index.htm");var enHTA=false;if (indexD<0){indexD=strLoc.lastIndexOf("start.hta");if (indexD>0){enHTA=true;}}if (indexD<0 && strLoc.indexOf(".htm")<0 && strLoc.substring(strLoc.length-1)=="/"){indexD=strLoc.length;}if (indexD>0){RACINE_stage=strLoc.substring(0,indexD);var refCods=RACINE_stage.substring(0,RACINE_stage.length-1);var indeB=refCods.lastIndexOf("/");serveur.codeStage=refCods.substring(indeB+1);if (depuisFenGNR && serveur.codeStage!=opener.top.menu.codeStage){depuisFenGNR=false;}RACINE_STYLE=RACINE_stage+"MosMtr/ressources/style/";RACINE_XSL=RACINE_STYLE+"xsl/local/";var depuisFen=false;if (!depuisFenGNR){try {if (window.opener!=null){depuisFen=true;}} catch(e){}}if (depuisFenGNR||depuisFen||enHTA){try{if (FEN_X!='' && FEN_Y!=''){ FEN_X=Number(FEN_X);if (FEN_X<0){FEN_X=window.screen.width+FEN_X;} FEN_Y=Number(FEN_Y);if (FEN_Y<0){FEN_Y=window.screen.height+FEN_Y;}if (!isNaN(FEN_X)&&!isNaN(FEN_Y)){window.moveTo(FEN_X,FEN_Y);}}if (FEN_L!=''&&FEN_H!=''){ FEN_L=Number(FEN_L);if (FEN_L<0){FEN_L=window.screen.width+FEN_L;}FEN_H=Number(FEN_H);if (FEN_H<0){FEN_H=window.screen.height+FEN_H;}if (!isNaN(FEN_L)&&!isNaN(FEN_H)&&FEN_L>0&&FEN_H>0){if (FEN_L>window.screen.width){FEN_L=window.screen.width;}if (FEN_H>window.screen.height){FEN_H=window.screen.height-25;}window.resizeTo(FEN_L,FEN_H);}}if (depuisFenGNR){serveur.vMos_prenom=window.opener.top.menu.prenomCMI;serveur.vMos_nom=window.opener.top.menu.nomCMI;} else {serveur.vMos_prenom=window.opener.prenom;serveur.vMos_nom=window.opener.nom;}}catch(e){}}var cadres = document.getElementById("frame2");if (cadres){if (cadres.cols.indexOf("*,")==0){PLAN_DROIT=true;}}} else {var indSrv=strLoc.toLowerCase().lastIndexOf("/mossrv/");if (indSrv>0 && strLoc.indexOf("/lms")>0){SUR_CHORUS=true;var pStage;var pId=donneParam("idk");if (pId!=""){pId=PF_decrypte(pId);} else {pId=donneParam("id");}serveur.vMos_id=pId;oUtilCnx=new IU_Utilisateur(pId);var pStage=donneParam("stk");if (pStage!=""){pStage=PF_decrypte(pStage);} else {pStage=donneParam("stg");}RACINE_MOS=strLoc.substring(0,indSrv)+"/";serveur.codeStage=pStage;serveur.vMos_lang=donneParam("lang");if (serveur.vMos_lang==""){serveur.vMos_lang="en";}STYLE_INTERFACE=donneParam("style");if (STYLE_INTERFACE==""){STYLE_INTERFACE="standard";}RACINE_STYLES=RACINE_MOS+"MosData/MosStyleMgr/styles/";RACINE_STYLE=RACINE_STYLES+STYLE_INTERFACE+"/";RACINE_XSL=RACINE_STYLE+"xsl/";if (pId=="_adminvsr" && top.opener && top.opener.top.haut && top.opener.top.serveur){lesson_mode="browse";SUR_CHORUS_ADM=true;serveur.vMos_nom=top.opener.top.serveur.nom;serveur.vMos_prenom=top.opener.top.serveur.prenom;} else if (pId=="_demovsr" && top.opener && top.opener.objParcours){lesson_mode="browse";SUR_CHORUS_ADM=true;serveur.vMos_nom="DEMO";serveur.vMos_prenom="DEMO";} else {serveur.numCnx=donneParam("ncnx");if (serveur.numCnx==""){try {if (window.opener!=null){if (window.opener.top.serveur){serveur.vMos_nom=window.opener.top.serveur.vMos_nom;serveur.vMos_prenom=window.opener.top.serveur.vMos_prenom;}}} catch(e){}}if (donneParam("syncCrgItm")!=""){if (donneParam("dispCdr")=="0,0,0"){SYNC_CORRIGE_ITEM=donneParam("syncCrgItm");}}var pGroupe=donneParam("grk");if (pGroupe!=""){pGroupe=PF_decrypte(pGroupe);} else {pGroupe=donneParam("grp");}serveur.codeGroupe=pGroupe;}if (pStage.indexOf("[_MOSLCMS]")==0){pStage=pStage.substring(10);lesson_mode="browse";activiteUnique=true;}if (strLoc.indexOf("rv/lmsB")>0){MENU_BAS=true;}RACINE_stage=RACINE_MOS+"MosPub/"+pStage+"/";if (strLoc.indexOf("D.html?")>0){PLAN_DROIT=true;}var dispCdr=donneParam("dispCdr").split(",");if (dispCdr.length>=2){LISTE_L=dispCdr[1];if (dispCdr.length>2){LISTE_BL=dispCdr[2];}dimCadres(dispCdr[0],LISTE_L);}}}if (!SUR_CHORUS){var csync=donneParam("sync");if (csync!=""){indeB=refCods.lastIndexOf("/MosPub/");if (csync=="1"){FICH_PARCOURS=refCods.substring(0,indeB)+"/MosData/player/parc/"+serveur.codeStage+".xml";FICH_PARCOURS=FICH_PARCOURS.replace(/file:\/\/\//,'');FICH_PARCOURS=FICH_PARCOURS.replace(/\//g,"\\");FICH_PARCOURS=unescape(FICH_PARCOURS);try {sysFich=window.opener.mosUTF;}catch(e){sysFich=null;}try {var lesserv=window.opener.DOMPrefs.documentElement.getElementsByTagName("serveur");if (lesserv.length>0){oUtilCnx=new IU_Utilisateur(PF_attr(lesserv[0],"id"));}}catch(e){}} if (csync=="2"){lesson_mode="normal";FICH_PARCOURS=refCods.substring(0,indeB)+"/MosData/MosGnr/parc/"+serveur.codeStage+".xml";}}}if (!window.XMLHttpRequest || (navigator.appName.indexOf("Internet Explorer")>=0 && navigator.appVersion.indexOf("MSIE 7")>=0 && (!window.external || typeof(window.external.AddToFavoritesBar)=="undefined")) || enHTA){if (document.getElementById("maincontent")!=null){document.body.onresize=LMS_redimLargeurCtnIE6;LMS_redimLargeurCtnIE6();}}if (serveur.codeStage!=""){API_1484_11=new APIAdapter();if (SUR_CHORUS){window.planLMS.location="plan.html";} else {window.planLMS.location="MosMtr/gen/plan.html";}}}function LMS_quitter(){if (API_1484_11==null){return ;}if (window.planLMS.itemCourant!=null && !serveur.parcoursEnAttente){window.planLMS.MODE_PREEMPTIF=false;var req="abandonAll";if (planLMS.masqueSuspendre){req="exitAll";}if (planLMS.masqueSortie){req="suspendAll";}window.planLMS.overallSequencing(req);}} function LMS_persisteParcours(asynchrone){if (API_1484_11!=null && API_1484_11.pointeurTimeoutPersiste){window.clearTimeout(API_1484_11.pointeurTimeoutPersiste);API_1484_11.pointeurTimeoutPersiste=null;}if (planLMS.modeExploration=="toujours"){return false;}if (lesson_mode!="normal" && !persisteSSP){return false;}if (serveur.codeStage.indexOf("[_MOSLCMS]")==0){return false;}if ((FICH_PARCOURS!=""||(SUR_CHORUS&&!SUR_CHORUS_ADM)) && !parcoursEnregistre){remonterTempsTot(API_1484_11.activite);var oRacMan=planLMS.DOMManifest.documentElement;var gardeReponses=XML_fils(oRacMan,"gardeReponses");if (gardeReponses!=null){gardeReponses.removeAttribute("modifGR");}var oPersiste=oRacMan.cloneNode(true);oPersiste.removeAttribute("version");oPersiste.setAttribute("codeStage",serveur.codeStage);oPersiste.setAttribute("codeInscription",serveur.codeInscription);if (oUtilCnx!=null){oPersiste.setAttribute("idU",oUtilCnx.id());}if (SUR_CHORUS){if (SYNC_CORRIGE_ITEM!=""){oPersiste.setAttribute("SYNC_CORRIGE_ITEM",SYNC_CORRIGE_ITEM);}oPersiste.setAttribute("modeTentative",modeTentative);oPersiste.setAttribute("codeGroupe",planLMS.codeGroupeParc);oPersiste.setAttribute("depuisChorus","oui");oPersiste.removeAttribute("dateCompletion");oPersiste.removeAttribute("dateValidation");oPersiste.removeAttribute("dateEntre");oPersiste.removeAttribute("dateAcces");oPersiste.removeAttribute("evtCompletion");oPersiste.removeAttribute("evtValidation");}var orga=XML_premierNoeud(oPersiste,"organization");var oAlocGlo=XML_fils(oPersiste,"allocationsGlobales");if (oAlocGlo!=null){if (oAlocGlo.firstChild){if (SUR_CHORUS){var oAllocV=XML_trouveNoeud(oAlocGlo,"allocation","modif","non");while (oAllocV!=null){oAllocV.parentNode.removeChild(oAllocV);oAllocV=XML_trouveNoeud(oAlocGlo,"allocation","modif","non");}var oAllocV=XML_trouveNoeud(planLMS.allocationsGlobales,"allocation","modif","oui");while (oAllocV!=null){oAllocV.setAttribute("modif","non");oAllocV=XML_trouveNoeud(planLMS.allocationsGlobales,"allocation","modif","oui");}}}if (!oAlocGlo.firstChild){oPersiste.removeChild(oAlocGlo);}}if (lesson_mode!="normal"){orga.parentNode.removeChild(orga);oPersiste.setAttribute("enregistreParcours","non");var oCont=XML_fils(oPersiste,"objectifsGlobaux");oCont.parentNode.removeChild(oCont);} else {nettoieItem(orga);var oSupp=XML_premierNoeudNS(orga,"imsss","minNormalizedMeasure");while (oSupp!=null){oSupp.parentNode.removeChild(oSupp);oSupp=XML_premierNoeudNS(orga,"imsss","minNormalizedMeasure");}oSupp=XML_premierNoeudNS(orga,"imsss","mapInfo");while (oSupp!=null){oSupp.parentNode.removeChild(oSupp);oSupp=XML_premierNoeudNS(orga,"imsss","mapInfo");}var ltitre=XML_fils(orga,"title");if (ltitre!=null){orga.removeChild(ltitre);}var ressourcesTmp=XML_premierNoeud(oPersiste,"resources");if (ressourcesTmp!=null){ressourcesTmp.parentNode.removeChild(ressourcesTmp);}var oCont=XML_fils(oPersiste,"objectifsGlobaux");if (oCont!=null){if (!planLMS.OBJ_GLOBAL_SYSTEM){oCont.setAttribute("porteeGlobale","0");}var oGlobSource=XML_fils(oRacMan,"objectifsGlobaux");var tObj=oCont.firstChild;while (tObj!=null){var osuiv=tObj.nextSibling;if (SUR_CHORUS){if (PF_attr(tObj,"modification")=="true"){var objSource=XML_trouveNoeud(oGlobSource,"objectif","id",tObj.getAttribute("id"));objSource.setAttribute("persist","1");if (window.planLMS.OBJECTIFS_ADLSEQ){var valeursADL=PF_attr(tObj,"attemptProgressStatus")+"/"+PF_attr(tObj,"attemptCompletionStatus")+"/"+PF_attr(tObj,"attemptProgressMeasureStatus")+"/"+PF_attr(tObj,"attemptProgressMeasure")+"/"+PF_attr(tObj,"attemptRawScore")+"/"+PF_attr(tObj,"attemptMinScore")+"/"+PF_attr(tObj,"attemptMaxScore");if (valeursADL.length>6){tObj.setAttribute("valeursADL",valeursADL);tObj.removeAttribute("attemptProgressStatus");tObj.removeAttribute("attemptCompletionStatus");tObj.removeAttribute("attemptProgressMeasureStatus");tObj.removeAttribute("attemptProgressMeasureStatus");tObj.removeAttribute("attemptRawScore");}}} else {tObj.parentNode.removeChild(tObj);}}tObj=osuiv;}}if (!oCont.firstChild){oPersiste.removeChild(oCont);}}oPersiste.removeAttribute("xmlns:adlnav");oPersiste.removeAttribute("xmlns:xsi");var resXML=serialiserXML(oPersiste);if (SUR_CHORUS){cibleASP=RACINE_MOS+"MosSrv/aspx/SRV_parcours.aspx";if (asynchrone){SYS_lancerOperations(resXML,true);} else {var oRetour=SYS_lancerOperationsRetour(resXML,"enregistrerParcours");if (oRetour!=null && XML_texteNoeud(oRetour)=="OK"){retourParcoursEnregistre();}}} else {var loca=FICH_PARCOURS;if (depuisFenGNR){var existeEncoreFenPere=false;try {if (window.opener.top.menu.GTR_enregistrerParcoursAuteur){existeEncoreFenPere=true;}}catch(e){}if (existeEncoreFenPere){window.opener.top.menu.GTR_enregistrerParcoursAuteur(resXML);parcoursEnregistre=true;persisteSSP=false;}} else {if (!estMoz){if (sysFich==null){sysFich=new ActiveXObject("MOSUTF.ctlConvert");}if (sysFich!=null){try{sysFich.createUTF8File(resXML,loca,false);}catch(e){sysFich=new ActiveXObject("MOSUTF.ctlConvert");sysFich.createUTF8File(resXML,loca,false);}parcoursEnregistre=true;persisteSSP=false;try{window.opener.ATR_retourParc(serveur.codeStage);}catch(e){}}} else {alert("Can't save progress information with Mozilla Firefox.");}}}}} function LMS_modePleinEcran(){window.moveTo(0,0);window.resizeTo(window.screen.width,window.screen.height);}function LMS_masquerCadres(){try {window.planLMS.document.getElementsByTagName("html")[0].style.display="none";window.haut.document.getElementsByTagName("html")[0].style.display="none";window.planLMS.document.body.style.display="none";window.haut.document.body.style.display="none";if (window.opener==null){dimCadres(0,0);}} catch(e){}}function LMS_fermer(){LMS_masquerCadres();API_1484_11=null;if (window.planLMS.COMPATIBLE_SCORM12){API=null;}if (passeParVeutQuitter){return ;}if (donneParam("hrq")!=""){window.location=RACINE_MOS+"MosSrv/index.htm?hrq="+donneParam("hrq")+serveur.nCnx();} else if (window.opener!=null){if (SUR_CHORUS){try {if (window.opener.oFenCursus){window.opener.oFenCursus.FEN_rechargerCursus();} else if (window.opener.dhtmlHistory){var infoHisto=window.opener.historyStorage.get(window.opener.dhtmlHistory.getCurrentLocation());var tabP=infoHisto.split("[!]");if (tabP[0]=="curriculumListContent"){window.opener.titreListeFuture=tabP[3];window.opener.descriptionListeFuture=tabP[4];window.opener.temporiseRelanceCursusInterne(tabP[2]);}}}catch(e){}}window.close();} else {var lanceEnInterne=false;if (parent.SUR_CHORUS){try {if (top.oZoneContenu && top.stageOuvertEnInterne && top.stageOuvertEnInterne=="2"){lanceEnInterne=true;}} catch(e){}}if (SUR_CHORUS && !lanceEnInterne){window.contenuLMS.location=window.planLMS.adrPageDefaut("quit");} else {window.contenuLMS.location="about:blank";window.close();}}}function getDateServeur(mode){var resu='';var dateJS=new Date();var moisServeur="0";var jourServeur="0";var anneeServeur=dateJS.getUTCFullYear();if (dateJS.getUTCMonth()+1<10){moisServeur = moisServeur + (dateJS.getUTCMonth()+1).toString();}else{moisServeur=dateJS.getUTCMonth()+1;}if (dateJS.getUTCDate()<10){jourServeur = jourServeur + (dateJS.getUTCDate()).toString();}else{jourServeur=dateJS.getUTCDate();} if (mode=='yyyymmjj'){ resu=anneeServeur+ "-" + moisServeur + "-" + jourServeur;} else {var heureServeur="0";var minutesServeur="0";var secondesServeur="0"; if (dateJS.getUTCHours()<10){heureServeur+=(dateJS.getUTCHours()).toString();}else {heureServeur=dateJS.getUTCHours();}if (dateJS.getUTCMinutes()<10){minutesServeur+=(dateJS.getUTCMinutes()).toString();}else {minutesServeur=dateJS.getUTCMinutes();}if (dateJS.getUTCSeconds()<10){secondesServeur+=(dateJS.getUTCSeconds()).toString();}else{secondesServeur=dateJS.getUTCSeconds();} resu=anneeServeur+ "-" + moisServeur + "-" + jourServeur + "T" + heureServeur + ":" + minutesServeur + ":" + secondesServeur;} if (mode=='milli'){ var milli=dateJS.getUTCMilliseconds(); if (milli<10){milli="0"+milli.toString();} else if (milli>99){milli=milli.toString().substring(0,2);}resu+="."+milli;}return resu;}function LMS_allerPrecedent(){window.haut.NAVIG_allerPrecedent();}function LMS_allerSuivant(){window.haut.NAVIG_allerSuivant();}function LMS_ouvrirGlossaire(ouvrirSurCourant){var ouvrirGloLMS=true;if (ouvrirSurCourant==null || !ouvrirSurCourant){try{if (window.contenuLMS!=null && window.contenuLMS.contenu && window.contenuLMS.contenu.GLOBAL_ouvrirGlossaire){ouvrirGloLMS=false;window.contenuLMS.contenu.GLOBAL_ouvrirGlossaire();}}catch(e){}}if (ouvrirGloLMS){var largeur=10;var hauteur=10;var position="left="+largeur+",top="+hauteur+",screenX="+largeur+",screenY="+hauteur+",";var version="html";var objGlo=IU_objDom();try {objGlo.setProperty("ProhibitDTD",false);objGlo.validateOnParse=false;}catch(e){}var succ=objGlo.load(RACINE_stage+"contenu/glossaire/glossaire.xml");if (succ){version="xml";}var src=RACINE_stage+"MosMtr/ressources/style/glossaire.htm?ver="+version;var taille="width=800,height=560";if (screen.width>1000){taille="width=960,height=680";}var fen=window.open(src,'Glossaire','toolbar=no,status=no,menubar=no,'+taille+','+position+'scrollbars=no,resizable=yes');fen.focus();}}var passeParVeutQuitter=false;function LMS_veutQuitter(event){if (API_1484_11==null){return ;}passeParVeutQuitter=true;if (API_1484_11.etatCommunication=="enCours"){API_1484_11.scoEnAttente=true;var messageAttention=true;try {window.contenuLMS.SCO_quitter();API_1484_11.etatCommunication="";messageAttention=false;} catch(e){}if (messageAttention){passeParVeutQuitter=false;var nl1=191;var nl2=192;if (!SUR_CHORUS){nl1=76;var nl2=77;}var msg=donneLex(nl1)+"\n"+donneLex(nl2);if (msg.length<3){return ;}return msg;}}if (SUR_CHORUS){try {if (window.opener.oFenCursus){window.opener.oFenCursus.FEN_rechargerCursus();}}catch(e){}}var actionQuit="suspendAll";var prendActionInterface=true;if (window.planLMS.itemCourant!=null){if (planLMS.masqueSuspendre){actionQuit="exitAll";prendActionInterface=false;}if (planLMS.masqueSortie){actionQuit="suspendAll";prendActionInterface=false;}} if (prendActionInterface && actionQuit=="suspendAll" && boutonQutterEstSortie()){actionQuit="exitAll";}window.haut.NAVIG_retour(actionQuit);}function boutonQutterEstSortie(){try {var lesliens=window.haut.document.getElementsByTagName("a");for (var i=0;i<lesliens.length;i++){if (lesliens[i].href.indexOf("NAVIG_retour('exitAll')")>=0){return true;}}}catch(e){}return false;}function nettoieItem(itemTmp){var filsitem=XML_fils(itemTmp,"item");if (filsitem==null && PF_attr(itemTmp,"activityProgressStatus")!="true"){itemTmp.parentNode.removeChild(itemTmp);return ;} itemTmp.removeAttribute("nom");itemTmp.removeAttribute("identifierref");itemTmp.removeAttribute("listeRemonte");itemTmp.removeAttribute("planDejaFait");supprEltItm(itemTmp,"adlcp","dataFromLMS");supprEltItm(itemTmp,"adlcp","timeLimitAction");oSeq=XML_filsNS(itemTmp,"imsss","sequencing");if (PF_attr(itemTmp,"activityProgressStatus")=="true"){if (PF_attr(itemTmp,"activityIsActive")=="false"){itemTmp.removeAttribute("activityIsActive");}if (PF_attr(itemTmp,"activityIsSuspended")=="false"){itemTmp.removeAttribute("activityIsSuspended");}oSeq=XML_filsNS(itemTmp,"imsss","sequencing");if (oSeq!=null){var oBjs=XML_filsNS(oSeq,"imsss","objectives");if (oBjs!=null && oBjs.childNodes.length>0){for (var no=0;no<oBjs.childNodes.length;no++){var objtm=oBjs.childNodes[no];if (objtm.nodeType==1){objtm.removeAttribute("satisfiedByMeasure");}}itemTmp.appendChild(oBjs);}}}if (oSeq!=null){itemTmp.removeChild(oSeq);}supprEltItm(itemTmp,"adlnav","presentation");while ((filsitem!=null)&&(filsitem.nodeName=="item")){var oSuiv=filsitem.nextSibling;nettoieItem(filsitem);filsitem=oSuiv;}}function supprEltItm(oI,ns,nom){var oSeq=XML_filsNS(oI,ns,nom);if (oSeq!=null){oI.removeChild(oSeq);}}function LMSLocal() {this.codeStage;this.codeGroupe="";this.titreStage;this.parcoursEnAttente=false;this.vMos_id=""; this.vMos_nom=""; this.vMos_prenom="";this.estTuteur=false;this.codeInscription="";this.version;this.largeurCol=0;this.vMos_lang="";this.numCnx="";this.init = csLMS_init;this.nCnx = csLMS_nCnx;}function csLMS_nCnx(){return "&ncnx="+this.numCnx;}function csLMS_init(version){this.version=version;}function donneActivite(idActivite){if (idActivite==itemRacine.getAttribute("identifier")){return itemRacine;} else {return XML_trouveNoeud(itemRacine,"item","identifier",idActivite);}}function dimCadres(haut,larg){var oFr=document.getElementById('frame1');if (oFr!=null){if (haut.toString()!=''){var nVal=haut+",*";if (MENU_BAS){nVal="*,"+haut;}if (oFr.rows!=nVal){oFr.rows=nVal;}}if (larg.toString()!=''){if (larg!=0){serveur.largeurCol=larg;}var oFr=document.getElementById('frame2');var nVal=larg+",*";if (PLAN_DROIT){nVal="*,"+larg;}if (oFr.cols!=nVal){oFr.cols=nVal;}}} else {var oMenu=document.getElementsByTagName("iframe")[0];var oCtn=document.getElementById("maincontent");oMenu.style.height=haut+"px";if (larg=="2"){oMenu.style.bottom="0px";oMenu.style.top="auto";oCtn.style.top="0px";oCtn.style.bottom=haut+"px";} else {oCtn.style.top=haut+"px";}}}function authentifierLMS(idU,mpUK){var tabParam=new Array(4);tabParam[0]="userID##"+PF_crypte(idU);tabParam[1]="userPassword##"+mpUK;tabParam[2]="isEncrypted##true";tabParam[3]="fromChorus##true";var oRetour=SYS_service("authenticateUser",tabParam);if (XML_texteNoeud(XML_fils(oRetour,"isAuthenticated"))=="true"){return true;}return false;}function Biscuit(){this.$document;this.$name;this.$domain;this.$path;this.$secure;this.idUtil=''; this.mpk='';this.langue=''; this.derService=''; this.init=BIS_init;this.charger=BIS_charger;this.enregistrer=BIS_enregistrer;}function BIS_init(document, name, hours, path, domain, secure) { this.$document = document; this.$name = name; if (hours) this.$expiration = new Date((new Date()).getTime() + hours*3600000); else this.$expiration = null; if (path) this.$path = path; else this.$path = null; if (domain) this.$domain = domain; else this.$domain = null; if (secure) this.$secure = true; else this.$secure = false;}function BIS_enregistrer(){ var cookieval = ""; for(var prop in this) { if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function')) continue; if (cookieval != "") cookieval += '&'; cookieval += prop + ':' + escape(this[prop]); } var cookie = this.$name + '=' + cookieval; if (this.$expiration) cookie += '; expires=' + this.$expiration.toGMTString(); if (this.$path) cookie += '; path=' + this.$path; if (this.$domain) cookie += '; domain=' + this.$domain; if (this.$secure) cookie += '; secure'; this.$document.cookie = cookie;}function BIS_charger(){ var allcookies = this.$document.cookie; if (allcookies == "") return false; var start = allcookies.indexOf(this.$name + '='); if (start == -1) return false; start += this.$name.length + 1; var end = allcookies.indexOf(';', start); if (end == -1) end = allcookies.length; var cookieval = allcookies.substring(start, end); var a = cookieval.split('&'); for(var i=0; i < a.length; i++) a[i] = a[i].split(':'); for(var i = 0; i < a.length; i++) { this[a[i][0]] = unescape(a[i][1]); } return true;}function retourneServiceParcours(codeStage0){var tabParam=new Array;ajTParam(tabParam,"userID",oUtilCnx.id());ajTParam(tabParam,"connectionID",serveur.numCnx);ajTParam(tabParam,"userLanguage",serveur.vMos_lang);ajTParam(tabParam,"courseID",codeStage0);ajTParam(tabParam,"interfaceName",STYLE_INTERFACE);return SYS_service("getSingleCourse",tabParam);}function openCourseLMS(codeStage0,idSco,memeFenetre){if (SUR_CHORUS){var oRetour=retourneServiceParcours(codeStage0);var objParcours=XML_noeudEgal(oRetour,"courseID",codeStage0);if (objParcours!=null){objParcours=objParcours.parentNode;if (paramRetour(objParcours,"groupID")!=""){if (idSco==null){idSco="";}if (memeFenetre==null){memeFenetre=false;}return lancerParcours(objParcours,idSco,memeFenetre);}}var msg="The course '"+codeStage0+"' is not accessible.";if (serveur.vMos_lang=="fr"){msg="Le parcours '"+codeStage0+"' n'est pas accessible.";}var noAccessReason=oRetour.getAttribute("noAccessReason");if (noAccessReason==null){noAccessReason="";}if (noAccessReason!=""){msg=infoRefus(noAccessReason);}alert(msg);} else {var lref=RACINE_stage.replace("/"+serveur.codeStage+"/","/"+codeStage0+"/");lref+="index.html";if (donneParam("sync")=="1"){lref+="?sync=1";}if (idSco==null){idSco="";}if (idSco!=""){if (lref.indexOf("?")>0){lref+="&";}else{lref+="?";}lref+="sco="+idSco;}if (memeFenetre){setTimeout("window.location='"+lref+"'",200);} else {if (lref.indexOf("?sync=1")>0){try {if (opener.ATR_ouvrirFenetreParcours){return opener.ATR_ouvrirFenetreParcours(codeStage0,idSco);}}catch(e){}}window.open(lref,codeStage0.replace(/\W/g,""),"location=no,menubar=no,toolbar=no,resizable=yes");}}}function infoRefus(info){var lex="";var numR=0;if (info=="no_rule"){numR=462;}if (info=="no_group"){numR=17;}if (info=="allow_rule"){numR=18;}if (info=="deny_rule"){numR=222;}if (info=="bad_date"){numR=461;}if (info=="bad_date_rule"){numR=461;}if (info=="seq_rule"){numR=463;}if (info=="no_time_left"){numR=532;}if (info=="enrol_rule"){numR=583;}if (numR==0){return donneLex(16);}return donneLex(16)+" "+donneLex(numR);}function lancerParcours(objLance,idSco,memeFenetre){var codeStg=paramRetour(objLance,"courseID");var codeGrp;var estInscrit=false;if (paramRetour(objLance,"isEnrolled")=="true"){estInscrit=true;} else {codeGrp=paramRetour(objLance,"groupID");}if (paramRetour(objLance,"accessDeniedByFee")=="true"){return alert(donneLex(562));}if (paramRetour(objLance,"accessDeniedByDate")=="true"){var dateDepart=paramRetour(objLance,"startDate");if (dateDepart!=""){dateDepart=IU_afficheDate(dateDepart,true);alert(donneLex(527).replace("DATE",dateDepart));}var dateFin=paramRetour(objLance,"endDate");if (dateFin!=""){dateFin=IU_afficheDate(dateFin,true);alert(donneLex(541).replace("DATE",dateFin));}var creneau=paramRetour(objLance,"timeWindow");if (creneau!=""){alert(donneLex(528)+"\n"+creneau);}if (paramRetour(objLance,"noTimeLeft")=="true"){alert(donneLex(532));}return ;}if (paramRetour(objLance,"accessDeniedByRule")=="true"){alert(donneLex(222));return ;}var prm="&stk="+PF_crypte(codeStg);if (!estInscrit){prm+="&grk="+PF_crypte(codeGrp);}prm+=serveur.nCnx();if (paramRetour(objLance,"showGroup")!="true" && prm.indexOf("&vgp=")<0){prm+="&vgp=0";}if (idSco!=""){prm+="&sco="+idSco;}var refurl=paramRetour(objLance,"courseURL");var ref=RACINE_MOS+refurl.substring(refurl.lastIndexOf("/MosSrv/")+1)+prm;var nomFen="LMS_"+codeStg;nomFen=nomFen.replace(/\W/g,"_");var styleLMS=paramRetour(objLance,"styleLMS");if (styleLMS==""){styleLMS=STYLE_INTERFACE;}var DOMMDStyleLms=IU_objDom();var succ1=DOMMDStyleLms.load(RACINE_STYLES+styleLMS+"/md_style.xml");if (!succ1){return alert("Can't load interface '"+styleLMS+"'");}var oMDStyleLms=DOMMDStyleLms.documentElement;var fpos="";var vdisp=PF_attr(oMDStyleLms,"LMS_FEN_X");if (vdisp!=''){ vdisp=Number(vdisp);if (vdisp<0){vdisp=window.screen.width+vdisp;}fpos+=",left="+vdisp;}vdisp=PF_attr(oMDStyleLms,"LMS_FEN_Y");if (vdisp!=""){vdisp=Number(vdisp);if (vdisp<0){vdisp=window.screen.height+vdisp;}fpos+=",top="+vdisp;}vdisp=PF_attr(oMDStyleLms,"LMS_FEN_L");if (vdisp==""){vdisp=window.screen.width-6;if (vdisp>1280){vdisp=1280;}}vdisp=Number(vdisp);if (vdisp<0){vdisp=window.screen.width+vdisp;}fpos+=",width="+vdisp;vdisp=PF_attr(oMDStyleLms,"LMS_FEN_H");if (vdisp==""){vdisp=window.screen.height-75;if (vdisp>1024){vdisp=1024;}}vdisp=Number(vdisp);if (vdisp<0){vdisp=window.screen.height+vdisp;}fpos+=",height="+vdisp;if (memeFenetre){setTimeout("window.location='"+ref+"'",200);} else {var fenl=window.open(ref,nomFen,"toolbar=no,menubar=no,location=no,scrollbar=no,resizable=yes,status=yes"+fpos);fenl.focus();}}function LMS_afficherDiplome(){if (SUR_CHORUS){if (API_1484_11!=null && API_1484_11.etatCommunication=="enCours" && !window.planLMS.SUIVI_DESACTIVE){var tempsTotal=PF_attr(planLMS.DOMManifest.documentElement,"tempsTotal");if (tempsTotal==""){remonterTempsTot(API_1484_11.activite);}}setTimeout(ouvreFenDipl,500);} else {alert("This feature only works in MOS Chorus.");}}function remonterTempsTot(oPere){while (oPere!=null && !window.planLMS.estRacine(oPere)){oPere=oPere.parentNode;window.planLMS.durationRollup(oPere);}}function ouvreFenDipl(){var idStg=serveur.codeStage;var nomFen=idStg.replace(/\W/g,"")+oUtilCnx.id().replace(/\W/g,"");var fenb=window.open(RACINE_MOS+"MosSrv/aspx/diplm.aspx?ref="+PF_crypte(oUtilCnx.id()+"##"+idStg)+"&style="+STYLE_INTERFACE+"&ncnx="+serveur.numCnx,"dipl"+nomFen,"toolbar=yes,resizable=yes,menubar=yes,status=no,location=no,width=700,top=30,left=120,heigth=550");fenb.focus();}function LMS_editPgGnr(params){if (!SUR_CHORUS){alert("You must be logged to MOS Chorus to edit the page.");return ;}var site="";var objParcours=XML_noeudEgal(retourneServiceParcours(serveur.codeStage),"courseID",serveur.codeStage);if (objParcours!=null){objParcours=objParcours.parentNode;var src=RACINE_MOS+"MosGnr/MosGnr.htm?stg="+serveur.codeStage+"&site="+paramRetour(objParcours,"site")+serveur.nCnx()+"&roleMng=0001&actionIU=editerRessource";var fen=window.open(src+params,"MosGnr"+serveur.codeStage,paramFenOutil());fen.focus();}}function paramFenOutil(){var ww = window.screen.availWidth-7;if (ww>1280){ww=1280;} var hh = window.screen.availHeight-56; var position="top=0,left=0";if (estMoz){position="left="+window.screen.availLeft+",top="+window.screen.availTop;}return "toolbar=no,menubar=no,scrollbar=no,resizable=yes,status=yes,width="+ww+",height="+hh+","+position;}function retourServiceASync(oRetour,nomSrv){ if (nomSrv=="enregistrerParcours" && XML_texteNoeud(oRetour)=="OK"){ retourParcoursEnregistre(); }}function retourParcoursEnregistre(){if (!parcoursEnregistre){parcoursEnregistre=true;persisteSSP=false;var oRacRet=planLMS.DOMManifest.documentElement;if (planLMS.modifEtatMembre){planLMS.modifEtatMembre=false;try {if (window.opener && window.opener.oZoneContenu!=null){var etatParc=PF_attr(oRacRet,"etatParcours");if (PF_attr(oRacRet,"dateCompletion")!=""){etatParc="completed";}window.opener.IU_majParcoursAffiche(serveur.codeStage,etatParc,PF_attr(oRacRet,"etatValidation"));}}catch(e){}}var oCont=XML_fils(oRacRet,"objectifsGlobaux");if (oCont!=null){for (var i=0;i<oCont.childNodes.length;i++){var oExisteObjMod=oCont.childNodes[i];if (PF_attr(oExisteObjMod,"persist")=="1"){oExisteObjMod.removeAttribute("modification");oExisteObjMod.removeAttribute("persist");}}}var gardeReponses=XML_fils(oRacRet,"gardeReponses");if (gardeReponses && PF_attr(gardeReponses,"modifGR")==""){gardeReponses.parentNode.removeChild(gardeReponses);}}}function LMS_finDemo(){API_1484_11=null;alert(donneLex(250));LMS_fermer();}function IU_Utilisateur(id0){ var id_priv=id0; this.id = function(){ return id_priv; };}function fenDetailProgress(){LMS_persisteParcours(true);setTimeout(suiteFenDetailProgress,500);}function suiteFenDetailProgress(){if (depuisFenGNR){return opener.top.menu.GTR_detailParcours();}if (!SUR_CHORUS){if (donneParam("sync")=="1"){try {if (opener.fenetreSuiviProgression){return opener.fenetreSuiviProgression(serveur.codeStage);}}catch(e){}} return alert("This features requires MOS Chorus or MOS Player");}var ref=RACINE_MOS+"MosSrv/aspx/detailParcours.aspx?ref="+PF_crypte(oUtilCnx.id()+"/"+serveur.codeStage+"/"+serveur.codeGroupe)+"&ncnx="+serveur.numCnx;var fenPtr=window.open(ref,'detailParcoursM'+serveur.codeStage,'toolbar=no,status=no,menubar=no,width=820,height=670,left=90,top=28,resizable=yes,scrollbars=auto');fenPtr.focus();}var origineScoExterne="initEvt";function recoitMessageSCO(event){var req=event.data;if (event.origin==origineScoExterne){var tabReq=req.split("[*XD*]");if (tabReq[0]=="Initialize"){valSco=API_1484_11.Initialize(tabReq[1]);}if (tabReq[0]=="GetValue"){valSco=API_1484_11.GetValue(tabReq[1]);}if (tabReq[0]=="SetValue"){valSco=API_1484_11.SetValue(tabReq[1],tabReq[2]);}if (tabReq[0]=="Commit"){valSco=API_1484_11.Commit(tabReq[1]);}if (tabReq[0]=="Terminate"){valSco=API_1484_11.Terminate(tabReq[1]);}if (tabReq[0]=="GetLastError"){valSco=API_1484_11.GetLastError(tabReq[1]);}if (tabReq[0]=="GetErrorString"){valSco=API_1484_11.GetErrorString(tabReq[1]);}if (tabReq[0]=="GetDiagnostic"){valSco=API_1484_11.GetDiagnostic(tabReq[1]);}window.contenuLMS.postMessage(valSco,"*");}}function initEvtPostMessage(){if (window.addEventListener){window.addEventListener("message",recoitMessageSCO,false);} else if (window.XMLHttpRequest){window.attachEvent("onmessage",recoitMessageSCO);}}function LMS_redimLargeurCtnIE6(){var oMain=document.getElementById("maincontent");var hauteurMenu=0;var oMenu=null;var lesframes=document.getElementsByTagName("iframe");for (var i=0;i<lesframes.length;i++){if (lesframes[i].name=="haut"){oMenu=lesframes[i];hauteurMenu=oMenu.offsetHeight+1;break;}}if (navigator.appVersion.indexOf("MSIE 7")>=0){oMain.style.height=(document.body.offsetHeight-hauteurMenu)+"px";} else {oMain.style.width=document.body.offsetWidth+"px";oMenu.style.width=document.body.offsetWidth+"px";}}
