/***********************
 * Objet "ih" avec ses fonctions obligatoires.
 */
var ih = {
fDateCreation : new Date(),
/* Active / désactive le Mode Debug. */
DEBUG : false,

//test premier chargement multiframe
gIsFirst:true,

/*	Mode [ consultation | annotation | outils]
/	Le mode n'est mis à jour que dans ih.load(), quand on est sûr de changer de mode */

fMode : null,

/* taille disponible*/
fContenuWidth : 0,
fContenuHeight : 0,
fContenuPlanWidth : 0,
fContenuPlanHeight : 0,

/* taille disponible*/
fWZonesIcone : 50,
fHZonesIcone : 50,

/* référence aux frames. */
fContenuFrame : null,
fPlanFrame : null,
/* tant qu'on y est... le frameset*/
fFrameSet : null,

/* référence aux documents des frames. (frame.contentWindow ne marche pas sous IE5) */
fContenuDocument : null,

/* contenu des frames en cours*/
fContenuFrameCode : null,
fContenuFrameType : null,
fPlanFrameMode : null,
/* DOM HTML des productions de l'apprenant*/
fMesAnnotations : null,

/* status */
fStatut : null,
fReloading : null,
fEnd : null,

/*	current	*/
fCurrentUrlDroite : null,
fCurrentUrlGauche : null,
fCurrentTargetDroite : null,
fCurrentTargetGauche : null,

fPrintWin : null,

/* Ouvre une popup centrée*/
fenetreCent : function (url,nom,largeur,hauteur,options) {
	var haut=(screen.height-hauteur)/2;
	var Gauche=(screen.width-largeur)/2;
	fencent=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
},

/* Charge une page */
load : function (pUrl, pTarget) {
	//alert(pUrl + '\n' + pTarget);
		
	
	
	//on est en mode multiFrame
	if(this.fContenuFrame!=null){		
		if(pTarget=="corps.html.wm"){
			this.fCurrentUrlDroite = pUrl;
			this.fCurrentTargetDroite = pTarget;
			if(this.fStatut=="printing" || this.fStatut=="reloadAfterPrint") {
				//on charge [rien] dans la frame, sinon elle ne se recharge pas
				this.fContenuFrame.src = "";				
				this.fContenuFrame.src = pUrl;
				if(this.fStatut=="reloadAfterPrint")this.fStatut=null;
			}
			else{
				//window.contenuFrame.document.open("text/html");				
				//window.contenuFrame.document.write("<html><body border='0' style='background-color:#000000; border:0; margin:0; overflow:hidden; padding:50; padding-left:0;' width='100%' height='100%'><table border ='0' width='100%' height='100%' cellspacing='0' cellpadding='0'><tr><td style='background-color:#FFFFFF; font-family:arial; font-size:14pt; color:#777777'><center>"+lCommon_chargement+"</center></td></tr></table></body></html>");				
				//window.contenuFrame.document.close();
				this.fContenuFrame.src = pUrl;
			}		
		}
		else if(pTarget=="mainPlayer.html.wm"){
			this.fCurrentUrlDroite = pUrl;
			this.fCurrentTargetDroite = pTarget;
			if(this.fStatut=="printing" || this.fStatut=="reloadAfterPrint") {
				//on charge [rien] dans la frame, sinon elle ne se recharge pas
				this.fContenuFrame.src = "";				
				this.fContenuFrame.src = pUrl;
				if(this.fStatut=="reloadAfterPrint")this.fStatut=null;
			}
			else{
				//window.contenuFrame.document.open("text/html");				
				//window.contenuFrame.document.write("<html><body border='0' style='background-color:#000000; border:0; margin:0; overflow:hidden; padding:50; padding-left:0;' width='100%' height='100%'><table border ='0' width='100%' height='100%' cellspacing='0' cellpadding='0'><tr><td style='background-color:#FFFFFF; font-family:arial; font-size:14pt; color:#777777'><center>"+lCommon_chargement+"</center></td></tr></table></body></html>");				
				//window.contenuFrame.document.close();
				this.fContenuFrame.src = pUrl;
			}		
		}
			else if(pTarget=="classement.html.wm"){
			this.fCurrentUrlDroite = pUrl;
			this.fCurrentTargetDroite = pTarget;
			if(this.fStatut=="printing" || this.fStatut=="reloadAfterPrint") {
				//on charge [rien] dans la frame, sinon elle ne se recharge pas
				this.fContenuFrame.src = "";				
				this.fContenuFrame.src = pUrl;
				if(this.fStatut=="reloadAfterPrint")this.fStatut=null;
			}
			else{
				//window.contenuFrame.document.open("text/html");				
				//window.contenuFrame.document.write("<html><body border='0' style='background-color:#000000; border:0; margin:0; overflow:hidden; padding:50; padding-left:0;' width='100%' height='100%'><table border ='0' width='100%' height='100%' cellspacing='0' cellpadding='0'><tr><td style='background-color:#FFFFFF; font-family:arial; font-size:14pt; color:#777777'><center>"+lCommon_chargement+"</center></td></tr></table></body></html>");				
				//window.contenuFrame.document.close();
				this.fContenuFrame.src = pUrl;
			}
					
		}
		else if(pTarget=="plan.html.wm"){
			this.fCurrentUrlGauche = pUrl;
			this.fCurrentTargetGauche = pTarget;
			this.fMode="consultation";
			this.fPlanFrame.src = pUrl;
			//vDialog.hGetResultat('/@/@/tout', 'act:');
		}	
		else if(pTarget=="popup.html.wm"){
			var vUrl=null;
			if(ut.ie)	vUrl=pUrl;
			else  vUrl="../"+pUrl;
			ih.fenetreCent(vUrl,"Popup","700","400","menubar=no,scrollbars=yes,statusbar=yes,resizable=yes");
		
		}		
		else if(pTarget=="outilsPlan.html.wm"){
			this.fCurrentUrlGauche = pUrl;
			this.fCurrentTargetGauche = pTarget;
			if(this.fMode != "outils") {ih.load('co/a77349.html','outilCrps.html.wm');;}
			this.fMode="outils";
			this.fPlanFrame.src = pUrl;
		}		
		else if(pTarget=="outilCrps.html.wm"){	
			this.fCurrentUrlDroite = pUrl;
			this.fCurrentTargetDroite = pTarget;		
			this.fMode="outils";
			if(this.fStatut=="printing" || this.fStatut=="reloadAfterPrint") {
				//on charge [rien] dans la frame, sinon elle ne se recharge pas
				this.fContenuFrame.src = "";
				this.fContenuFrame.src = pUrl;
				if(this.fStatut=="reloadAfterPrint")this.fStatut=null;
			}
			else{
				//window.contenuFrame.document.open("text/html");				
				//window.contenuFrame.document.write("<html><body border='0' style='background-color:#000000; border:0; margin:0; overflow:hidden; padding:50; padding-left:0;' width='100%' height='100%'><table border ='0' width='100%' height='100%' cellspacing='0' cellpadding='0'><tr><td style='background-color:#FFFFFF; font-family:arial; font-size:14pt; color:#777777'><center>"+lCommon_chargement+"</center></td></tr></table></body></html>");				
				//window.contenuFrame.document.close();
				this.fContenuFrame.src = pUrl;
			}		
		}
		else if(pTarget=="QCM.html.wm"){
			this.fCurrentUrlDroite = pUrl;
			this.fCurrentTargetDroite = pTarget;
			// this.fMode ne change pas
			this.fContenuFrame.src = pUrl;
		}
		else if(pTarget=="fin.html.wm"){
			this.fCurrentUrlDroite = pUrl;
			this.fCurrentTargetDroite = pTarget;
			// this.fMode ne change pas		
			this.fContenuFrame.src = pUrl;
		}
		else if(pTarget=="accueil.html.wm"){
			this.fCurrentUrlDroite = pUrl;
			this.fCurrentTargetDroite = pTarget;
			this.fMode="consultation";
			this.fFrameSet = document.getElementById("frameSet")
			this.fFrameSet.cols="0,*";
			this.fContenuFrame.src = pUrl;			
		}
		else if(pTarget=="annot.html.wm"){
			this.fCurrentUrlGauche = pUrl;
			this.fCurrentTargetGauche = pTarget;
			this.fMode="annotation";
			this.fPlanFrame.src = pUrl;
		}
		
	}
	//on est en mode sans frame
	else{
			window.location.href=pUrl.substring(3,pUrl.length);
	}		
},

reload : function(){	
	this.fReloading = true ;
	//alert("reloading " + this.fCurrentUrlDroite + "  " + this.fCurrentTargetDroite)
	if(this.fCurrentUrlDroite && this.fCurrentTargetDroite)	{
		this.load(this.fCurrentUrlDroite,this.fCurrentTargetDroite);
	}		
},

init : function () {
	//alert("ih.init");
	//this.fContenuFrame = document.getElementById("contenuFrame");
	//this.fPlanFrame = document.getElementById("planFrame");
	//si on est en multiframes
	//if(this.fFrameSet)this.fFrameSet.cols="30%,*";
	
	//ih.load('co/a54966.html','plan.html.wm');;
	//ih.load('co/a41726.html','corps.html.wm');;
},


/** Init du contexte. L'univers doit être appelé en premier qui appelle à son tour l'Ihm. */
xInit : function () {
	//alert("ih.xInit");
	this.fContenuFrame = document.getElementById("contenuFrame");
	this.fPlanFrame = document.getElementById("planFrame");
	
	ih.load('co/a54966.html','plan.html.wm');;
	
	//si l'URL contient le paramètre contenuFrame, on est sur "Index.html" et on vient de passer en mode multiframe
	//on le récupère et on le charge dans la frame contenuFrame
	if((window.location.href.indexOf("?contenuFrame=")!=-1)&&(this.gIsFirst==true)){
		var vURL=window.location.href.substring(window.location.href.lastIndexOf("?contenuFrame=")+14,window.location.href.length);
		this.gIsFirst=false;
		this.fContenuFrame.src="./co/"+ vURL;
	}
	//sinon, on affiche l'accueil
	else {ih.load('co/a37633.html','accueil.html.wm');;}
},

/** Pointage (fleche ou surlignage) sur l'élément courant du plan
*	@param pDestination est l'id de l'élément à pointer
*	@param pType est le type de l'élément à pointer - utilisé pour retrouver l'image 
*		à associer
*/

changePlan : function (pDestination,pType) {
	//alert("IH.changeplan : \n" + pDestination + "\n" +pType);
	this.fContenuFrameCode=pDestination;
	this.fContenuFrameType=pType;
	if(!window.planFrame) return;
	
	switch(this.fMode){
		case "consultation":
			var vSPUL=window.planFrame.document.getElementById(pDestination);
			if(vSPUL && vSPUL.className=="dossier") window.planFrame.dossierClick(vSPUL,'non merci');
			try{window.planFrame.changePage(vSPUL);}catch(e){}
			try{window.planFrame.changeDecoImg(pType);}catch(e){}
			break
		case "annotation":	
			try{window.planFrame.changePage(pType);}catch(e){}
			break
		
		case "outils":			
			try{ih.load('co/a2870.html','outilsPlan.html.wm');;}catch(e){}
			break
	}
	 
},

fCodeTimeStamp : null,
fCodeAgentDansHier : null,
fCodeAgent : null,


setCodesAgent : function(pCodeAgent, pCodeAgentDansHier){
	//alert(pCodeAgent + "\n" + pCodeAgentDansHier);	
	/*
	var vTs = new Date().getTime();
	if(this.fCodeTimeStamp>0){
		un.setElapseTime(this.fCodeAgentDansHier, vTs - this.fCodeTimeStamp);
	}
	this.fCodeTimeStamp = vTs;
	*/
	this.fCodeAgent = pCodeAgent;
	this.fCodeAgentDansHier = pCodeAgentDansHier;	
},

/** Quitte la prescription. */
quit :function () {
	un.xQuit();
	window.close();
},

/** Fonctions de navigation : Accès à la page d'aide */
aide : function(){		
	var vPath="";
	if(ut.ns6)	vPath="../aide/index.html";
	else vPath="aide/index.html";
	var vFen = window.open(vPath, "aide", "height=520,width=680,titlebar=no,status=no,resizable=no,menubar=no,location=no");
	vFen.focus();
},

/** Retour à l'accueil. */
retouraccueil :function () {
	
	un.xRetouraccueil();			var vURLRetourAccueil;
		if(ut.ie)vURLRetourAccueil = "index.html";
		else vURLRetourAccueil = "../index.html";
		
	//if(ut.ie)this.fFrameSet.ownerDocument.parentWindow.location.href = vURLRetourAccueil;
	//else
	//alert("retourAccueil : " + vURLRetourAccueil);
	window.location.href = vURLRetourAccueil;; 
	//this.fFrameSet.ownerDocument.contentWindow.location.href = vURLRetourAccueil;
	
},

/** fonction d'impression */
print : function(){
	this.fStatut="printing";	
	
	if(ut.ns6){
		this.reload();
		window.contenuFrame.scrolling="yes";		
		window.setTimeout("window.contenuFrame.print()",2000);	
		window.setTimeout("ih.fStatut='reloadAfterPrint';ih.fContenuFrame.scrolling='no'; ih.reload();",5000);		
	}
	
	else if(ut.ie5) {		
		this.fPrintWin = window.open(this.fContenuFrame.src, 'impression','width=650, height=500, status=no, toolbar=no, location=no, menubar=no, scrollbars=yes');			
		window.setTimeout("ih.fPrintWin.print()",2000);		
		window.setTimeout("ih.fPrintWin.close();ih.fStatut='reloadAfterPrint';",3000);		
	}
	
}




}//Fin de l'objet ih.

/** Mode d'affichage du player d'évaluation.
 * 0 : mode normal
 * 1 : mode avec notes
 * 3 : mode avec notes et solutions
 */
ih.fPlayerMode = 0;
ih.setPlayerMode = function (pMode) {
	this.fPlayerMode = pMode;
}

ih.setPageMain = function(pUrl, pModele, pType){
	this.fTypeMain = pType;
	if("outils"==pType.substring(0,6)) {
		this.fPageUrlMainOutils = pUrl;
		this.fPageModeleMainOutils = pModele;
	} else if("accueil"!=pType){			
		this.fPageUrlMain = pUrl;
		this.fPageModeleMain = pModele;
	}
}

//objet cl : Classement

var cl = {

score : 0,
j : 0,
k : 0,
precedent : 0,
recordTab : new Array(),
record : new Array(),
D : new Array(),
enregistrement : new Array(1000,1000),
enregistreId : new Array(1000,1000),
enregistreD : new Array(1000,1000),
enregistrePrec : new Array(1000,1000)


}//fin de l'objet cl
 
//objet cls : ClassementSimple

var cls = {


score : 0,

j : 0,
k : 0,
precedent : 0,
pCount : 0,
recordTab : new Array(),
record : new Array(),
D : new Array(),
QList : new Array(),
AllDone : false,
id : new Array(),
InArray : new Array(),
enregistrement : new Array(1000,1000),
enregistreId : new Array(1000,1000),
enregistreArray : new Array(1000,1000),
enregistrePrec : new Array(1000,1000)
}//fin de l'objet cls


cl.getRecord = function(pArray, pCode)
        {
			var enregistre = false;
			  for(var i=0;i<cl.enregistrement.length;i++){
			  if((cl.enregistrement[i][0]==pCode || cl.enregistrement[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  cl.enregistrement[i] = new Array()
			  cl.enregistrement[i][0] = pCode;
			  //alert(i+' '+cl.enregistrement[i][0]);
			for (var j=1; j<pArray.length+1;j++){
			
			//alert('pArray : '+pArray[j-1]);
			//pArray[j-1]++;
				cl.enregistrement[i][j] = pArray[j-1];
				//alert('i'+i+' j'+j+' '+cl.enregistrement[i][j]);
				
												}
																										}
										

															}
        }
		
		cl.getD = function(pArray, pCode)
        {
			var enregistre = false;
			  for(var i=0;i<cl.enregistreD.length;i++){
			  if((cl.enregistreD[i][0]==pCode || cl.enregistreD[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  cl.enregistreD[i] = new Array()
			  cl.enregistreD[i][0] = pCode;
			  //alert(i+' '+cl.enregistreD[i][0]);
			for (var j=1; j<pArray.length+1;j++){
			
			//alert('pArray : '+pArray[j-1]);
			//pArray[j-1]++;
				cl.enregistreD[i][j] = pArray[j-1];
				//alert('i'+i+' j'+j+' '+cl.enregistreD[i][j]);
				
												}
																										}
										

															}
        }
		cl.getRecordTab = function(pArray, pCode)
        {
			var enregistre = false;
			  for(var i=0;i<cl.enregistreId.length;i++){
			  if((cl.enregistreId[i][0]==pCode || cl.enregistreId[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  cl.enregistreId[i] = new Array()
			  cl.enregistreId[i][0] = pCode;
			  //alert(i+' '+cl.enregistreId[i][0]);
			for (var j=1; j<pArray.length+1;j++){
			
			//alert('pArray : '+pArray[j-1]);
			//pArray[j-1]++;
				cl.enregistreId[i][j] = pArray[j-1];
				//alert('i'+i+' j'+j+' '+cl.enregistreId[i][j]);
				
												}
																										}
										

															}
        }
		
		cl.setRecord = function(pCode){
	
		  for(var i=0;i<cl.enregistrement.length;i++){
		  	 if(cl.enregistrement[i][0]==pCode){
			 	for (var j=0; j<cl.record.length;j++){
			
				//alert('pArray : '+pArray[j-1]);
				cl.record[j]=cl.enregistrement[i][j+1]; 
				
				
													}
			 									}
		  												}


							}
								cl.setD = function(pCode){
	
		  for(var i=0;i<cl.enregistreD.length;i++){
		  	 if(cl.enregistreD[i][0]==pCode){
			 	for (var j=0; j<cl.D.length;j++){
			
				//alert('pArray : '+pArray[j-1]);
				cl.D[j]=cl.enregistreD[i][j+1]; 
				
				
													}
			 									}
		  												}


							}
							cl.setRecordTab = function(pCode){
	
		  for(var i=0;i<cl.enregistreId.length;i++){
		  	 if(cl.enregistreId[i][0]==pCode){
			 	for (var j=0; j<cl.recordTab.length;j++){
			
				//alert('pArray : '+pArray[j-1]);
				cl.recordTab[j]=cl.enregistreId[i][j+1]; 
				
				
													}
			 									}
		  												}


							}
		
		//fonctions de l'objet cls
		
		
cls.getRecord = function(pArray, pCode)
        {
			var enregistre = false;
			  for(var i=0;i<cls.enregistrement.length;i++){
			  if((cls.enregistrement[i][0]==pCode || cls.enregistrement[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  cls.enregistrement[i] = new Array()
			  cls.enregistrement[i][0] = pCode;
			  //alert(i+' '+cls.enregistrement[i][0]);
			for (var j=1; j<pArray.length+1;j++){
			
			//alert('pArray : '+pArray[j-1]);
			pArray[j-1]++;
				cls.enregistrement[i][j] = pArray[j-1];
				//alert('i'+i+' j'+j+' '+cls.enregistrement[i][j]);
				
												}
																										}
										

															}
        }

cls.setRecord = function(pCode){
	
		  for(var i=0;i<cls.enregistrement.length;i++){
		  	 if(cls.enregistrement[i][0]==pCode){
			 	for (var j=0; j<cls.record.length;j++){
			
				//alert('pArray : '+pArray[j-1]);
				cls.record[j]=cls.enregistrement[i][j+1]; 
				
				
													}
			 									}
		  												}


							}
cls.getId = function(pArray, pCode) {
			var enregistre = false;
			  for(var i=0;i<cls.enregistreId.length;i++){
			  if((cls.enregistreId[i][0]==pCode || cls.enregistreId[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  cls.enregistreId[i] = new Array()
			  cls.enregistreId[i][0] = pCode;
			  //alert(i+' '+cls.enregistrement[i][0]);
			for (var j=1; j<pArray.length+1;j++){
			
			//alert('pArray : '+pArray[j-1]);
			//pArray[j-1]++;
				cls.enregistreId[i][j] = pArray[j-1];
				//alert('i'+i+' j'+j+' '+cls.enregistrement[i][j]);
				
												}
																										}
										

															}
        }
cls.setId = function(pCode){
	
		  for(var i=0;i<cls.enregistreId.length;i++){
		  	 if(cls.enregistreId[i][0]==pCode){
			 	for (var j=0; j<cls.id.length;j++){
			
				//alert('pArray : '+pArray[j-1]);
				cls.id[j]=cls.enregistreId[i][j+1]; 
				
				
													}
			 									}
		  												}


							}

cls.getArray = function(pArray, pCode) {
			var enregistre = false;
			  for(var i=0;i<cls.enregistreArray.length;i++){
			  if((cls.enregistreArray[i][0]==pCode || cls.enregistreArray[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  cls.enregistreArray[i] = new Array()
			  cls.enregistreArray[i][0] = pCode;
			  //alert(i+' '+cls.enregistrement[i][0]);
			for (var j=1; j<pArray.length+1;j++){
			
			//alert('pArray : '+pArray[j-1]);
			//pArray[j-1]++;
				cls.enregistreArray[i][j] = pArray[j-1];
				//alert('i'+i+' j'+j+' '+cls.enregistrement[i][j]);
				
												}
																										}
										

															}
        }
							
cls.setArray = function(pCode){
	
		  for(var i=0;i<cls.enregistreArray.length;i++){
		  	 if(cls.enregistreArray[i][0]==pCode){
			 	for (var j=0; j<cls.InArray.length;j++){
			
				//alert('pArray : '+pArray[j-1]);
				cls.InArray[j]=cls.enregistreArray[i][j+1]; 
				//alert('cls.record[j] : '+cls.record[j]);
				
													}
			 									}
		  												}


							}
							
cls.setPrec = function(pCode){
			var enregistre = false;
			  for(var i=0;i<cls.enregistrePrec.length;i++){
			  if((cls.enregistrePrec[i][0]==pCode || cls.enregistrePrec[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  cls.enregistrePrec[i] = new Array()
			  cls.enregistrePrec[i][0] = pCode;
			  cls.enregistrePrec[i][1] = true;
														}
										

															}
        }

cls.getPrec = function(pCode){



var vrai = false;
	
		  for(var i=0;i<cls.enregistrePrec.length;i++){
		  	 if(cls.enregistrePrec[i][0]==pCode && cls.enregistrePrec[i][1]==true){
			 	
				var vrai = true;
				
				
			 									}
			
		  									}
		if(vrai == true) return true;
		else return false;


							}	


//objet hs : HotSpot

var hs = {
reponse : null,
precedent : 0,
feedback : null,
reponseArray : new Array(1000,1000),
feedbackArray : new Array(1000,1000)
}

hs.getReponse = function(pNum, pCode) {
			var enregistre = false;
			  for(var i=0;i<hs.reponseArray.length;i++){
			  if((hs.reponseArray[i][0]==pCode || hs.reponseArray[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  hs.reponseArray[i] = new Array()
			  hs.reponseArray[i][0] = pCode;
			  hs.reponseArray[i][1] = hs.reponse;
			
																										}
										

															}
        }
		
hs.setReponse = function(pCode){
	
		  for(var i=0;i<hs.reponseArray.length;i++){
		  	 if(hs.reponseArray[i][0]==pCode){
			 	  hs.reponse = hs.reponseArray[i][1];
			 									}
		  												}


							}
							
hs.setFeedback = function(pCode){
	
		  for(var i=0;i<hs.feedbackArray.length;i++){
		  	 if(hs.feedbackArray[i][0]==pCode && hs.feedbackArray[i][1]!=null){
			 //alert('bibi: '+i+hs.feedbackArray[i][1]);
			 hs.feedback = hs.feedbackArray[i][1];
			 	/*if(document.all){
				document.getElementById('Instructions').innerText = '';
			 	  document.getElementById('Instructions').innerText = hs.feedbackArray[i][1];
				  				}
				else{
				document.getElementById('eZm').textContent = '';
				document.getElementById('Instructions').textContent = hs.feedbackArray[i][1];}*/
			 									}
		  												}


							}
hs.getFeedback = function(pNum, pCode) {

			var enregistre = false;
			  for(var i=0;i<hs.feedbackArray.length;i++){
			  if((hs.feedbackArray[i][0]==pCode || hs.feedbackArray[i][0]==null)  && enregistre==false){
			  enregistre = true;
			  //alert('enregistrement Feedback !');
			  hs.feedbackArray[i] = new Array()
			  hs.feedbackArray[i][0] = pCode;
			  if(hs.reponse==1){
			  hs.feedbackArray[i][1] = 'Bonne réponse !';
			  					}
					else if(hs.reponse==0){
						hs.feedbackArray[i][1] = 'Mauvaise réponse :/';
						}
			//else hs.feedbackArray[i][0] = null;
																										}
										

															}
        }