function DAZ_class_PopLayer(ObjectID,H,W,HideTimer,WaitTimer,b_Hide,x_Effect,x_Valign,x_Halign,n_NumPopLayers,n_NumColons,n_NumLines,n_CellSpacing,x_AppearingOrder,ID,b_AutoGenerate,b_AutoPop,b_Dragable,b_Constraint,Maincontener){
	// PROPRIETES MEMBRES
	this.DocObjectID=ObjectID;
	this.DocId='PopLayer';
	this.LayerObject="document.getElementById('"+this.DocObjectID+"');";
	this.LayerContener="document.getElementById('"+this.DocObjectID+"contener');";
	this.LayerTextZone="document.getElementById('innerHTML');";
	this.ContDowntext="document.getElementById('countdown');";

	this.HideTimer=8000; // temps avant la fermeture du PopLayer ( en millisecondes )
	this.WaitTimer=WaitTimer; // temps avant l'apparition du prochain bloc
	this.b_Hide=b_Hide; // Fermer la Poplayer après le HideTimer (1=fermer , 0=ne pas fermer)
	this.x_Effect=x_Effect; // Type d'effet à l'ouverture du PopLayer
	this.x_Valign=x_Valign;
	this.x_Halign=x_Halign;
	this.x_StartPos=x_Valign.substring(0,1)+x_Halign.substring(0,1);
	this.n_NumPopLayers=n_NumPopLayers;
	this.n_NumColons=n_NumColons;
	this.n_NumLines=n_NumLines;
	//this.n_W=n_W;
	//this.n_H=n_H;
	this.n_W=(this.n_NumColons*(W+n_CellSpacing));
	this.n_H=(this.n_NumLines*(H+n_CellSpacing));
	
	this.n_CellSpacing=n_CellSpacing;
	this.x_AppearingOrder=x_AppearingOrder;// 0=asc;1=random;2=simultané
	this.ID=ID;
	this.b_AutoGenerate=b_AutoGenerate;
	this.b_AutoPop=b_AutoPop;
	this.b_Dragable=b_Dragable;
	this.b_Constraint=b_Constraint;
	this.Maincontener=Maincontener;
	this.n_NumPopLayers_collection=new Array();
	this.n_NumPopLayers_collectionParent=new Array();

	this.H=H;
	this.W=W;
	this.b_SizeInDo=false;
	this.b_SizeOutDo=true;
	this.b_ReadAgendaInfoBulle=false;
	this.k = 0.2; 
	//Le paramètre f représente les forces de frottement et permet de ralentir le mouvement du disque. Pour f=1, il n'y a aucun frottement. Les frottements deviennent autant plus importants que f est proche de zéro. 
	this.f = 0.4; 
	//vx et vy sont les coordonnées cartésiennes du vecteur vitesse. Au démarrage de l'animation, le vecteur vitesse est nul. 
	this.vx=0;
	this.vy=0;  
	this.LastNewR="";
	this.LastCibleW=0;
	this.LastCibleH=0;
	this.ParentObj;

	
// 	METHODES MEMBRES DE LA CLASSE => PRIVEES
// METHODE PREMIERE INSTANCE #####################
this.Init=function(){
	if(this.n_NumPopLayers>1 && this.b_AutoGenerate==1){
		// OBJETS DEPLACABLES ?
		if(this.b_Dragable){
			var numPop=this.n_NumColons*this.n_NumLines;
			this.Layer="<div id='MainContener"+this.DocObjectID+"' style='width:"+this.n_W+";height:"+this.n_H+"' class='contener'>";
			for(var l=0;l<numPop;l++){
				this.Layer+="<div class='draggableobject' style='visibility:visible;width:"+(this.W+this.n_CellSpacing)+";height:"+(this.H+this.n_CellSpacing)+";' id='div"+l+"'>";
				this.Layer+="<table align='center' width='"+this.W+"'  height='"+this.H+"' cellpadding='0' cellspacing='0'  border='0'>";
				this.Layer+="<tr>";
				this.Layer+=(this.x_StartPos!='tl' && this.x_StartPos!='tr' && this.x_StartPos!='bl' && this.x_StartPos!='br' )?"<td width='50%'></td>":"";
				//this.Layer+="<td width='50%'></td>";

				this.Layer+="<td valign='"+this.x_Valign+"' align='"+this.x_Halign+"'><table id='TB"+l+"' style='visibility:hidden;'  width='1px'   height='1px' border='0'  valign='middle' cellpadding='0' cellspacing='0'>";
				this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_01.png'></td><td background='image/TBLARRONDI_orange_02.png'></td><td width='19' height='19' background='image/TBLARRONDI_orange_03.png'></td></tr>";
				this.Layer+="<tr><td width='19' background='image/TBLARRONDI_orange_04.png'></td>";
				this.Layer+="<td valign='middle' align='center' bgcolor='#FFFFFF'><img src='image/ajax_loader_small.gif' vspace='0' hspace='0'><br>autogenerate<div id='innerHTMLTB"+l+"' style='color:#F95C22;font-family: Trebuchet MS, Tahoma, Helvetica, sans-serif;font-size: 1em;font-weight:bold;font-style:normal;'></div></td>";
				this.Layer+="<td width='19' background='image/TBLARRONDI_orange_05.png'></td>";
				this.Layer+="</tr>";
				this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_06.png'></td>";
				this.Layer+="<td background='image/TBLARRONDI_orange_07.png'></td><td width='14' height='19' background='image/TBLARRONDI_orange_08.png'></td>";
				this.Layer+="</tr>";
				this.Layer+="</table></td>";
				this.Layer+=(this.x_StartPos!='tl' && this.x_StartPos!='tr' && this.x_StartPos!='bl' && this.x_StartPos!='br' )?"<td width='50%'></td>":"";
				//this.Layer+="<td width='50%'></td>";

				this.Layer+="</tr></table>";
				this.Layer+="</div>";
				var TBID='TB'+l;
				this.n_NumPopLayers_collection.push(TBID);

			}
			this.Layer+="</div>";
		}else{
			this.Layer="<table  cellpadding=0 cellspacing='"+this.n_CellSpacing+"' border=1 width='"+this.n_W+"' height='"+this.n_H+"' id='"+this.ID+"'>";
			// CREATION DES LIGNES
			for(var l=0;l<this.n_NumLines;l++){
				this.Layer+="<tr>";
				// CREATION DES CELLULES
				for(var c=0;c<this.n_NumColons;c++){
					this.Layer+="<td><div style='visibility:visible;width:"+this.W+";height:"+this.H+";' id='div"+l+c+"'>";
					this.Layer+="<table align='center' width='"+this.W+"'  height='"+this.H+"' cellpadding='0' cellspacing='0' border='0'>";
					this.Layer+="<tr>";
					this.Layer+=(this.x_StartPos!='tl' && this.x_StartPos!='tr' && this.x_StartPos!='bl' && this.x_StartPos!='br' )?"<td width='50%'></td>":"";
					//this.Layer+="<td width='50%'></td>";
	
					this.Layer+="<td valign='"+this.x_Valign+"' align='"+this.x_Halign+"'><table id='TB"+l+c+"' style='visibility:hidden;'  width='1px'   height='1px' border='0'  valign='middle' cellpadding='0' cellspacing='0'>";
					this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_01.png'></td><td background='image/TBLARRONDI_orange_02.png'></td><td width='19' height='19' background='image/TBLARRONDI_orange_03.png'></td></tr>";
					this.Layer+="<tr><td width='19' background='image/TBLARRONDI_orange_04.png'></td>";
					this.Layer+="<td valign='middle' align='center' bgcolor='#FFFFFF'><img src='image/ajax_loader_small.gif' vspace='0' hspace='0'><div id='innerHTMLTB"+l+c+"' style='color:#F95C22;font-family: Trebuchet MS, Tahoma, Helvetica, sans-serif;font-size: 1em;font-weight:bold;font-style:normal;'></div></td>";
					this.Layer+="<td width='19' background='image/TBLARRONDI_orange_05.png'></td>";
					this.Layer+="</tr>";
					this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_06.png'></td>";
					this.Layer+="<td background='image/TBLARRONDI_orange_07.png'></td><td width='14' height='19' background='image/TBLARRONDI_orange_08.png'></td>";
					this.Layer+="</tr>";
					this.Layer+="</table></td>";
					this.Layer+=(this.x_StartPos!='tl' && this.x_StartPos!='tr' && this.x_StartPos!='bl' && this.x_StartPos!='br' )?"<td width='50%'></td>":"";
					//this.Layer+="<td width='50%'></td>";
	
					this.Layer+="</tr></table>";
					this.Layer+="</div></td>";
					var TBID='TB'+l+c;
					this.n_NumPopLayers_collection.push(TBID);
				}
				this.Layer+="</tr>";
			}
			this.Layer+="</table>";
		}
	}
	if(this.n_NumPopLayers<2 && !this.b_AutoGenerate){
		this.Layer="<table align='center' width='100%'  height='100%' cellpadding='0' cellspacing='0' border='0'><tr><td width='50%'></td>";
		this.Layer+="<td><table id='"+this.DocId+"' width='1px'   height='1px' border='0' align='center' valign='middle' cellpadding='0' cellspacing='0' >";
		this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_01.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td><td background='image/TBLARRONDI_orange_02.png'></td><td width='19' height='19' background='image/TBLARRONDI_orange_03.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.Layer+="<tr><td width='19' background='image/TBLARRONDI_orange_04.png'><img src='image/blanc.gif' width='19' height='1' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="<td valign='middle' align='center' bgcolor='#FFFFFF'><img src='image/ajax-loader.gif' vspace='0' hspace='0'><br><br><div id='innerHTML' style='color:#F95C22;font-family: Trebuchet MS, Tahoma, Helvetica, sans-serif;font-size: 1em;font-weight:bold;font-style:normal;'></div><br></td>";
		this.Layer+="<td width='19' background='image/TBLARRONDI_orange_05.png'><img src='image/blanc.gif' width='19' height='1' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="</tr>";
		this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_06.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="<td background='image/TBLARRONDI_orange_07.png'></td><td width='14' height='19' background='image/TBLARRONDI_orange_08.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="</tr>";
		this.Layer+="</table></td><td width='50%'>";
		this.Layer+="</td></tr></table>";
	}
	
	if(this.n_NumPopLayers>1 && this.b_AutoGenerate==2 ){
		//alert('ok');													  
		var TBODY=document.getElementById(this.Maincontener).getElementsByTagName('TBODY');
		for(var n=0;n<TBODY.length;n++){
			TB=TBODY[n].parentNode;
			if(TB.id==null || TB.id=="" || !TB.id){
				TR=TBODY[n].firstChild.childNodes;
				for(var o=0;o<TR.length;o++){
					if (!TR[o].tagName &&TR[o].nodeType==3){
						TR[o].parentNode.removeChild(TR[o]);
					}
				}
				if(TR.length==1){
					//ALORS INSERTION DES TD WIDTH=50% si 
					if(this.x_StartPos!='tl' && this.x_StartPos!='tr' && this.x_StartPos!='bl' && this.x_StartPos!='br' ){
						var TD=document.createElement('TD');
						var TD1=document.createElement('TD');
							TD.style.width='50%';
							TD1.style.width='50%';
							//alert(TBODY[n].firstChild.tagName);

							TBODY[n].firstChild.appendChild(TD);
							TBODY[n].firstChild.insertBefore(TD1,TBODY[n].firstChild.firstChild);
							TBODY[n].firstChild.childNodes[1].style.verticalAlign=this.x_Valign;
							TBODY[n].firstChild.childNodes[1].style.textAlign=this.x_Halign;
					}else{
							TBODY[n].firstChild.firstChild.style.verticalAlign=this.x_Valign;
							TBODY[n].firstChild.firstChild.style.textAlign=this.x_Halign;
					}
				}
			}else{
				//alert(TB.id);
				this.n_NumPopLayers_collection.push(TB.id);
			}
		}
		
		/*this.Layer="<table align='center' width='100%'  height='100%' cellpadding='0' cellspacing='0' border='0'><tr><td width='50%'></td>";
		this.Layer+="<td><table id='"+this.DocId+"' width='1px'   height='1px' border='0' align='center' valign='middle' cellpadding='0' cellspacing='0' >";
		this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_01.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td><td background='image/TBLARRONDI_orange_02.png'></td><td width='19' height='19' background='image/TBLARRONDI_orange_03.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.Layer+="<tr><td width='19' background='image/TBLARRONDI_orange_04.png'><img src='image/blanc.gif' width='19' height='1' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="<td valign='middle' align='center' bgcolor='#FFFFFF'><img src='image/ajax-loader.gif' vspace='0' hspace='0'><br><br><div id='innerHTML' style='color:#F95C22;font-family: Trebuchet MS, Tahoma, Helvetica, sans-serif;font-size: 1em;font-weight:bold;font-style:normal;'></div><br></td>";
		this.Layer+="<td width='19' background='image/TBLARRONDI_orange_05.png'><img src='image/blanc.gif' width='19' height='1' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="</tr>";
		this.Layer+="<tr><td width='19' height='19' background='image/TBLARRONDI_orange_06.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="<td background='image/TBLARRONDI_orange_07.png'></td><td width='14' height='19' background='image/TBLARRONDI_orange_08.png'><img src='image/blanc.gif' width='19' height='19' border='0' hspace='0' vspace='0' alt=''></td>";
		this.Layer+="</tr>";
		this.Layer+="</table></td><td width='50%'>";
		this.Layer+="</td></tr></table>";*/
	}
	this.DrawLayer();
};// FIN Init

this.DrawLayer=function(){
	var Layer=document.createElement('div');
		Layer.setAttribute('id',this.DocId+'contener');
		Layer.style.position='relative';
		/*Layer.style.color='#F95C22';
		Layer.style.fontFamily='Trebuchet MS, Tahoma, Helvetica, sans-serif';
		Layer.style.fontSize='0.7em';
		Layer.style.fontWeight='normal';
		Layer.style.fontStyle='normal';*/
		Layer.style.top='0';
		Layer.style.left='0';
		Layer.style.width='auto';
		Layer.style.height='auto';
		Layer.style.background='#F95C22';
		Layer.style.zIndex=2;
		Layer.style.visibility='visible';
		Layer.innerHTML=this.Layer;
		 //document.getElementById("trace").innerHTML="<XMP>"+this.Layer+"</XMP>";
		if(this.b_AutoGenerate==0 || this.b_AutoGenerate==1){
			document.body.appendChild(Layer);
		}
		//var neo_Draggable=new DAZ_class_GetDraggable('neo_Draggable','draggableobject','MainContener'+this.DocObjectID,200,200,10,4,3);
		//neo_Draggable.Init();
		//GetDraggableObjectClassName('draggableobject','MainContener',200,200,10,4,3);
		switch(this.x_AppearingOrder){
				case 0:
				for(var o=0;o<this.n_NumPopLayers_collection.length;o++){
						//alert(this.n_NumPopLayers_collection[o]);
					}
					if(this.b_AutoPop){
							//alert("this.b_AutoPop :"+ this.b_AutoPop);
						this.AutoPop(0);
					}
					break;
				case 1:
					// Sort random the array
					action=this.n_NumPopLayers_collection.sort(this.randOrd);
					/*for(var o=0;o<this.n_NumPopLayers_collection.length;o++){
						//alert(this.n_NumPopLayers_collection[o]);
					}*/
					//alert(action);
					this.AutoPop(0);
					break;
				case 2:
					//command=this.DocObjectID+".SizeOutAll('left',"+this.H+","+this.W+",'"+this.n_NumPopLayers_collection[0]+"')";
					for(var o=0;o<this.n_NumPopLayers_collection.length;o++){
						//alert(this.n_NumPopLayers_collection[o]);
						//this.SizeOutAlls('left',this.n_NumPopLayers_collection[o]);
					}
					this.SizeOutAll('left',this.H,this.W,this.n_NumPopLayers_collection[0]);

					//var timers=setTimeout(command,1);
					//clearTimeout(timers);
					break;
		}
		return false;
}; // Fin DrawBubble 

this.AutoPop=function(n){
		Obj=(document.getElementById(this.n_NumPopLayers_collection[n])!=null && this.n_NumPopLayers_collection[n]!="undefined")?document.getElementById(this.n_NumPopLayers_collection[n]):(new function(){clearTimeout(timers);clearTimeout(timerss);return Obj});
		//messageZone=document.getElementById('innerHTML'+Obj.id);
		//alert(Obj.id);
		
		var ParentObj=this.getParent(Obj);
		//alert(ParentObj.id);
		maxH=parseInt(ParentObj.offsetHeight);
		maxW=parseInt(ParentObj.offsetWidth);
		ObjW=parseInt(Obj.offsetWidth);
		ObjH=parseInt(Obj.offsetHeight);
		if(Obj.style.visibility=="hidden"){
			Obj.style.visibility="visible";
			//messageZone.innerHTML=Obj.id;
			command=this.DocObjectID+".SizeOut('left',"+maxH+","+maxW+",'"+this.n_NumPopLayers_collection[n]+"')";
			commands=this.DocObjectID+".AutoPop("+(n)+")";
			var timers=setTimeout(command,1);
			//timerss=setTimeout(commands,1);
		}else{
			if(ObjW>=maxW && ObjH>=maxH){
				this.ParentObj="";
				//alert("passage au suivant :" + ObjW + "= " + maxW +"|| "+  ObjH +" = " + maxH +" / courant : " + Obj.id + " suivant :" + this.n_NumPopLayers_collection[n+1]);
				commands=this.DocObjectID+".AutoPop("+(n+1)+")";
				var time=this.WaitTimer;
			}else{
				var time=1;
				commands=this.DocObjectID+".AutoPop("+n+")";
			}
		}
		var timerss=setTimeout(commands,time);
};// Fin this.AutoPop


this.randOrd=function (){
	return (Math.round(Math.random())-0.5);
	//return Math.floor((3*Math.random())-1);

}

this.doPos=function(anchors,target,w,h){
	//alert(anchors + " / " + target + " / " + w + " / " + h);
	//alert(parseInt(this.getTopPos(anchors)));
	//alert(parseInt(this.getTopPos(anchors))-(h));
	document.getElementById(target).style.top=parseInt(this.getTopPos(anchors))-(h+30);
	document.getElementById(target).style.left=parseInt(this.getLeftPos(anchors))+(parseInt(anchors.offsetWidth)+30);
	//document.getElementById(target).style.top=100;
	//document.getElementById(target).style.left=200;



}; // Fin this.DoPos
this.getTopPos=function(inputObj){		
   //alert(inputObj);
	  var returnValue = inputObj.offsetTop;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetTop;
	  }
	//alert(parseInt(returnValue));
	  return parseInt(returnValue);
}
	
this.getLeftPos=function(inputObj){
	  var returnValue = inputObj.offsetLeft;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetLeft;
	  }
	  return parseInt(returnValue);
}

this.getParent=function(inputObj){
	   while (inputObj.tagName != 'DIV' ) {
		   	//alert(inputObj.tagName);

 				//document.getElementById("show").innerHTML+="SetFlag :" + target.tagName+" /class : "+ target.className + "<br>";
 				inputObj = (typeof inputObj.parentNode != "undefined")?inputObj.parentNode:inputObj.parentElement;
 		}
	  return inputObj;
}
	
this.ShowHide=function(valeur,ouinon,objid){
		//alert("showhide");
		Obj=eval(this.LayerContener);
		//messageZone=eval(this.LayerTextZone);
		//PopLayerS=eval(this.LayerObject);
		
		messageZone=document.getElementById('innerHTML'+objid);
		messageZone.innerHTML=valeur;
		PopLayerS=document.getElementById(objid);

		//alert(eval(this.LayerObject).id);
	if(Obj.style.visibility=="hidden"){
		Obj.style.visibility="visible";
		commands=this.DocObjectID+".SizeOut('left',"+this.H+","+this.W+",'"+objid+"')";
		timerShowHide=setTimeout(commands,1);
	}else{
		maxH=this.H;
		maxW=this.W;
		R=(maxH)*(maxW);
		CibleW=parseInt(PopLayerS.offsetWidth);
		CibleH=parseInt(PopLayerS.offsetHeight);
		NewR=CibleW*CibleH;
		clearTimeout(timerShowHide);
		//commands=this.DocObjectID+".SizeIn('left',"+1+","+1+")";
		commands=(NewR >= R)?(this.DocObjectID+".SizeIn('left',"+1+","+1+")"):(this.DocObjectID+".ShowHide('"+valeur+"',"+ouinon+",'"+objid+"')");
		Timer=(NewR >= R)?this.HideTimer:1;
		messageZone.innerHTML+=(Timer>1)?"<br><br>--------------------------<br><br>Fermeture automatique de cette fenêtre dans <u><span id='countdown'"+objid+">"+ (this.HideTimer/1000)+"</span></u> secondes..":"";
		//messageZone.innerHTML+="<br>" + parseInt(PopLayerS.offsetWidth) + "<br>"+ parseInt(PopLayerS.offsetHeight) +"<br>"+ this.H;
		timerShowHide=setTimeout(commands,Timer);
		CountDown=(Timer > 1)?this.CountDown():"";

	}
};

this.CountDown=function(){
	Obj=eval(this.ContDowntext);
	Obj.innerHTML=(parseInt(Obj.innerHTML))-1;
	commands=this.DocObjectID+".CountDown()";
	timerCountDown=(parseInt(Obj.innerHTML)<=0)?(new function(){clearTimeout(timerCountDown);}):setTimeout(commands,1000);
}; //Fin This.CountDown

this.SizeOut=function(sens,H,W,objid){
	//alert(sens+"/"+ H +"/"+ W +"/"+objid);

	var maxH=H;
	var maxW=W;
	R=(maxH)*(maxW);
	incrementH=(R / maxW) /100;
	incrementW=(R / maxH) /100;
	//alert("incrementH :"  + incrementH + " / incrementW :"  + incrementW  );
	//messageZone=eval(this.LayerTextZone);
	//messageZone=document.getElementById('innerHTML'+objid);
	//if(messageZone!=null) messageZone.innerHTML=titre+" -"+date+" -<br>"+valeur;
	cible=objid;
	//alert(cible);
	cibles=document.getElementById(cible);
	//alert(cibles);
	if(cibles.style.visibility="hidden") cibles.style.visibility="visible" ;
	CibleW=(parseInt(cibles.offsetWidth)>=maxW)?maxW:parseInt(cibles.offsetWidth);
	CibleH=(parseInt(cibles.offsetHeight)>=maxH)?maxH:parseInt(cibles.offsetHeight);
	/*if(cible=='TB0'){
				document.getElementById('trace').innerHTML+='<br> - '+this.x_Effect+'  - '+ cible+": WIDTH :"+  CibleW +" / HEIGHT :" + CibleH;
	}*/
	NewR=CibleW*CibleH;
	ax = this.k*(maxW-CibleW);
	ay = this.k*(maxH-CibleH);
	this.vx += ax;
	this.vy += ay;
	this.vx *= this.f;
	this.vy *= this.f;
	switch(this.x_Effect){
			case 'hv':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?maxW:CibleW;
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?maxH:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=CibleH;
				break;
			case 'h':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?maxW:CibleW;
				cibles.style.height=(CibleW>=maxW && CibleH < maxH)?(CibleH==this.LastCibleH && CibleW==maxW)?maxH:CibleH+this.vy:(CibleW>=maxW)?CibleH:"1";
				//cibles.style.height=(CibleW>=maxW)?(parseInt(cibles.style.height)+this.vy):"1";
				this.LastCibleW=CibleW;
				this.LastCibleH=(CibleW==maxW)?CibleH:(this.LastCibleH!="")?this.LastCibleH:0;
				break;
			case 'v':
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?maxH:CibleH;
				cibles.style.width=(CibleH>=maxH && CibleW < maxW)?(CibleW==this.LastCibleW && CibleH==maxH)?maxW:CibleW+this.vx:CibleW;
				this.LastCibleH=CibleH;
				this.LastCibleW=(CibleH==maxH)?CibleW:(this.LastCibleW!="")?this.LastCibleW:0;
				break;
	}
	/*if(cible=='AgendaInfoBulle0'){
				messageZone.innerHTML+='<br> - '+this.x_Effect+'  - '+ cible+": WIDTH :"+  CibleW +" / HEIGHT :" + CibleH;
	}*/
	this.LastNewR=(NewR==parseInt(cibles.offsetWidth)*parseInt(cibles.offsetHeight) && (CibleH==maxH) && (CibleW==maxW))?1:0;
	command=this.DocObjectID+".SizeOut('"+sens+"',"+maxH+","+maxW+",'"+cible+"')";
	var timer=(NewR>=R)?(new function(){clearTimeout(timer)}):(parseInt(this.LastNewR))?(new function(){cibles.style.width=maxW;cibles.style.height=maxH;clearTimeout(timer);}):(new function(){setTimeout(command,1);});
	//var timer=(NewR>=R)?(new function(){clearTimeout(timer);):(this.LastNewR)?(new function(){cibles.style.width=W;cibles.style.height=H;alert('ok');clearTimeout(timer);}):setTimeout(command,1);
}


this.CheckAgendaInfoBulle=function(Obj,timeout){
	var Obj=eval(Obj);
	commands=function(){
	//alert("commands / " + Obj);
	if(Obj.b_ReadAgendaInfoBulle==false){
		Obj.b_SizeInDo=true;
		Obj.b_SizeOutDo=false;
		Obj.SizeIn("left",0,0,"AgendaInfoBulle0");
	}
}
setTimeout(commands,10);
	//if(this.b_ReadAgendaInfoBulle==false) this.b_SizeInDo=true;this.b_SizeOutDo=false;this.SizeIn("left",0,0,"AgendaInfoBulle0")
	
}; // Fin this.CheckAgendaInfoBulle 


this.SizeOutNoLimit=function(sens,H,W,objid,iteration,date,titre,valeur,anchors){
	Obj=eval(this.Maincontener);
	messageZone=document.getElementById('innerHTML'+objid+'_1');
	if(iteration==0){
		var Layer=document.createElement('div');
		Layer.setAttribute('id','innerHTML'+objid+'zone');
		Layer.style.position='absolute';
		Layer.style.display='block';
		/*Layer.style.color='#F95C22';
		Layer.style.fontFamily='Trebuchet MS, Tahoma, Helvetica, sans-serif';
		Layer.style.fontSize='0.7em';
		Layer.style.fontWeight='normal';
		Layer.style.fontStyle='normal';*/
		Layer.style.top='0';
		Layer.style.left='0';
		//Layer.style.width='expression(this.scrollWidth > 250 ? "250px" : "auto")';
		//Layer.style.width='auto';
		Layer.style.width='250px';
		Layer.style.height='auto';
		Layer.style.visibility='hidden';
		var reg=new RegExp("(#)", "g");
		chaine=titre+" -"+date+"-<br>"+unescape(valeur)
		chaine=chaine.replace(reg," ");
		Layer.innerHTML=chaine;
		document.body.appendChild(Layer);
		var maxH=parseInt(Layer.offsetHeight)+38;
		var maxW=parseInt(Layer.offsetWidth)+38;
		this.doPos(document.getElementById(anchors),this.Maincontener,maxW,maxH);

	}else{
		maxH=H;
		maxW=W;
		var LayerContent=document.getElementById('innerHTML'+objid+'zone').innerHTML;
		document.getElementById(Obj.id).style.zIndex=200;
	}

	iteration++;
	R=(maxH)*(maxW);
	incrementH=(R / maxW) /100;
	incrementW=(R / maxH) /100;
	cible=objid;
	//alert(cible);
	cibles=document.getElementById(cible);
	//alert(cibles);
	if(cibles.style.visibility="hidden") cibles.style.visibility="visible";
	CibleW=(parseInt(cibles.offsetWidth)>=maxW)?maxW:parseInt(cibles.offsetWidth);
	CibleH=(parseInt(cibles.offsetHeight)>=maxH)?maxH:parseInt(cibles.offsetHeight);
	NewR=CibleW*CibleH;
	ax = this.k*(maxW-CibleW);
	ay = this.k*(maxH-CibleH);
	this.vx += ax;
	this.vy += ay;
	this.vx *= this.f;
	this.vy *= this.f;
	switch(this.x_Effect){
			case 'hv':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?maxW:CibleW;
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?maxH:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=CibleH;
				break;
			case 'h':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?maxW:CibleW;
				cibles.style.height=(CibleW>=maxW && CibleH < maxH)?(CibleH==this.LastCibleH && CibleW==maxW)?maxH:CibleH+this.vy:(CibleW>=maxW)?CibleH:"1";
				//cibles.style.height=(CibleW>=maxW)?(parseInt(cibles.style.height)+this.vy):"1";
				this.LastCibleW=CibleW;
				this.LastCibleH=(CibleW==maxW)?CibleH:(this.LastCibleH!="")?this.LastCibleH:0;
				break;
			case 'v':
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?maxH:CibleH;
				cibles.style.width=(CibleH>=maxH && CibleW < maxW)?(CibleW==this.LastCibleW && CibleH==maxH)?maxW:CibleW+this.vx:CibleW;
				this.LastCibleH=CibleH;
				this.LastCibleW=(CibleH==maxH)?CibleW:(this.LastCibleW!="")?this.LastCibleW:0;
				break;
	}
	/*if(cible=='AgendaInfoBulle0'){
				messageZone.innerHTML+='<br> - '+this.x_Effect+'  - '+ cible+": WIDTH :"+  CibleW +" / HEIGHT :" + CibleH;
	}*/
	this.LastNewR=(NewR==parseInt(cibles.offsetWidth)*parseInt(cibles.offsetHeight) && (CibleH==maxH) && (CibleW==maxW))?1:0;
	command=this.DocObjectID+'.SizeOutNoLimit("'+sens+'",'+maxH+','+maxW+',"'+cible+'",'+iteration+',"'+date+'","'+titre+'","'+valeur+'")';
	var timer=(NewR>=R || this.b_SizeOutDo===false)?(new function(){messageZone.innerHTML=LayerContent;document.body.removeChild(document.getElementById('innerHTML'+objid+'zone'));clearTimeout(timer);}):(parseInt(this.LastNewR) || this.b_SizeOutDo===false)?(new function(){cibles.style.width=maxW;cibles.style.height=maxH;clearTimeout(timer);}):(new function(){setTimeout(command,1);});
	//var timer=(NewR>=R)?(new function(){clearTimeout(timer);):(this.LastNewR)?(new function(){cibles.style.width=W;cibles.style.height=H;alert('ok');clearTimeout(timer);}):setTimeout(command,1);
}

this.BeforSizeOutNoLImit=function(sens,H,W,objid,iteration,date,titre,valeur,anchors){
command=this.DocObjectID+'.b_ReadAgendaInfoBulle=true;'+this.DocObjectID+'.b_SizeInDo=false;'+this.DocObjectID+'.b_SizeOutDo=true;'+this.DocObjectID+'.SizeOutNoLimit("'+sens+'",'+H+','+W+',"'+objid+'",'+iteration+',"'+date+'","'+titre+'","'+valeur+'","'+anchors+'")';
setTimeout(command,100);
};

this.SizeIn=function(sens,H,W,objid){
	Obj=eval(this.Maincontener);
	maxH=H;
	maxW=W;
	R=maxH*maxW;
	incrementH=(R / maxW) /100;
	incrementW=(R / maxH) /100;
	cible=objid;
	messageZone=document.getElementById('innerHTML'+objid);
	//alert( messageZone.innerHTML);
	//messageZone.style.width=0;
	//messageZone.style.height=0;
	cibles=document.getElementById(cible);
	CibleW=parseInt(cibles.offsetWidth);
	CibleH=parseInt(cibles.offsetHeight);
		NewR=CibleW*CibleH;
		ax = this.k*(maxW-CibleW);
		ay = this.k*(maxH-CibleH);
		this.vx -= ax;
		this.vy -= ay;
		this.vx *= this.f;
		this.vy *= this.f;
	/*switch(this.x_Effect){
			case 'hv':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?this.W:CibleW;
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?this.H:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=CibleH;

				break;
			case 'h':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?this.W:CibleW;
				cibles.style.height=(CibleW==this.W && CibleH < this.H)?(CibleH==this.LastCibleH && CibleW==this.W)?this.H:CibleH+this.vy:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=(CibleW==this.W)?CibleH:this.LastCibleH;
				break;
			case 'v':
				//cibles.style.height=(CibleH < this.H )?CibleH+this.vy:(CibleH==this.LastCibleH)?this.H:CibleH;
				//cibles.style.width=(CibleH==this.LastCibleH)?((CibleW<this.W)?CibleW+this.vx:this.W):CibleW;
				
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?this.H:CibleH;
				cibles.style.width=(CibleH==this.H && CibleW < this.W)?(CibleW==this.LastCibleW && CibleH==this.H)?this.W:CibleW+this.vx:CibleW;
				this.LastCibleH=CibleH;
				this.LastCibleW=(CibleH==this.H)?CibleW:this.LastCibleW;
				break;
	}*/
		cibles.style.width=(NewR>R)?CibleW-this.vx:CibleW;
		cibles.style.height=(NewR>R)?CibleH-this.vy:CibleH;
		command=this.DocObjectID+".SizeIn('"+sens+"',"+maxH+","+maxW+",'"+cible+"')";
		this.LastNewR=parseInt(cibles.offsetWidth)*parseInt(cibles.offsetHeight);
	timer=(NewR==this.LastNewR || (NewR<=R || this.b_SizeInDo==false))?(new function(){document.getElementById(Obj.id).style.zIndex=1;cibles.style.width=0;cibles.style.height=0;cibles.style.visibility="hidden";clearTimeout(timer);}):setTimeout(command,1);
}




this.SizeOutAlls=function(sens,objid){
	//alert(document.getElementById(objid))
	//alert(this.getParent(document.getElementById(objid)));
	var ParentObj=this.getParent(document.getElementById(objid));
	//maxH=H;
	//maxW=W;
	
	maxH=parseInt(ParentObj.offsetHeight);
	maxW=parseInt(ParentObj.offsetWidth);

	R=(maxH)*(maxW);
	incrementH=(R / maxW) /100;
	incrementW=(R / maxH) /100;
	//alert("incrementH :"  + incrementH + " / incrementW :"  + incrementW  );
	//messageZone=eval(this.LayerTextZone);
	//messageZone=document.getElementById('innerHTML'+objid);
	cible=objid;
	cibles=document.getElementById(cible);
	//cibles.style.visibility='visible';
	CibleW=(parseInt(cibles.offsetWidth)>=maxW)?maxW:parseInt(cibles.offsetWidth);
	CibleH=(parseInt(cibles.offsetHeight)>=maxH)?maxH:parseInt(cibles.offsetHeight);
	NewR=CibleW*CibleH;
	ax = this.k*(maxW-CibleW);
	ay = this.k*(maxH-CibleH);
	this.vx += ax;
	this.vy += ay;
	this.vx *= this.f;
	this.vy *= this.f;
	switch(this.x_Effect){
			case 'hv':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?this.W:CibleW;
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?this.H:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=CibleH;
				//document.getElementById('trace').innerHTML+='<br> - hv'+ parseInt(cibles.offsetWidth);
				break;
			case 'h':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?this.W:CibleW;
				cibles.style.height=(CibleW==this.W && CibleH < this.H)?(CibleH==this.LastCibleH && CibleW==this.W)?this.H:CibleH+this.vy:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=(CibleW==this.W)?CibleH:this.LastCibleH;
				break;
			case 'v':
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?this.H:CibleH;
				cibles.style.width=(CibleH==this.H && CibleW < this.W)?(CibleW==this.LastCibleW && CibleH==this.H)?this.W:CibleW+this.vx:CibleW;
				this.LastCibleH=CibleH;
				this.LastCibleW=(CibleH==this.H)?CibleW:this.LastCibleW;
				break;
	}
	//messageZone.innerHTML=parseInt(cibles.style.width)+" / "+ cible;

	//this.SizeOutAllOthers(parseInt(cibles.style.width),parseInt(cibles.style.height));
	this.LastNewR=(NewR==parseInt(cibles.offsetWidth)*parseInt(cibles.offsetHeight) && (CibleH==this.H) && (CibleW==this.W))?1:0;
	
	command=this.DocObjectID+".SizeOutAlls('"+sens+"','"+cible+"');";
	var timer=(NewR>=R)?(new function(){clearTimeout(timer);}):(parseInt(this.LastNewR))?(new function(){cibles.style.width=maxW;cibles.style.height=maxH;clearTimeout(timer);}):setTimeout(command,1);
};

this.SizeOutAll=function(sens,H,W,objid){
	//alert(document.getElementById(objid))
	//alert(this.getParent(document.getElementById(objid)));
	var ParentObj=this.getParent(document.getElementById(objid));
	//maxH=H;
	//maxW=W;
	
	maxH=parseInt(ParentObj.offsetHeight);
	maxW=parseInt(ParentObj.offsetWidth);

	R=(maxH)*(maxW);
	incrementH=(R / maxW) /100;
	incrementW=(R / maxH) /100;
	//alert("incrementH :"  + incrementH + " / incrementW :"  + incrementW  );
	//messageZone=eval(this.LayerTextZone);
	//messageZone=document.getElementById('innerHTML'+objid);
	cible=objid;
	cibles=document.getElementById(cible);
	cibles.style.visibility='visible';
	CibleW=parseInt(cibles.offsetWidth);
	CibleH=parseInt(cibles.offsetHeight);
	NewR=CibleW*CibleH;
	ax = this.k*(maxW-CibleW);
	ay = this.k*(maxH-CibleH);
	this.vx += ax;
	this.vy += ay;
	this.vx *= this.f;
	this.vy *= this.f;
	switch(this.x_Effect){
			case 'hv':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?this.W:CibleW;
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?this.H:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=CibleH;
				//document.getElementById('trace').innerHTML+='<br> - hv'+ parseInt(cibles.offsetWidth);
				break;
			case 'h':
				cibles.style.width=(CibleW != this.LastCibleW)?CibleW+this.vx:(CibleW==this.LastCibleW)?this.W:CibleW;
				cibles.style.height=(CibleW==this.W && CibleH < this.H)?(CibleH==this.LastCibleH && CibleW==this.W)?this.H:CibleH+this.vy:CibleH;
				this.LastCibleW=CibleW;
				this.LastCibleH=(CibleW==this.W)?CibleH:this.LastCibleH;
				break;
			case 'v':
				cibles.style.height=(CibleH != this.LastCibleH)?CibleH+this.vy:(CibleH==this.LastCibleH)?this.H:CibleH;
				cibles.style.width=(CibleH==this.H && CibleW < this.W)?(CibleW==this.LastCibleW && CibleH==this.H)?this.W:CibleW+this.vx:CibleW;
				this.LastCibleH=CibleH;
				this.LastCibleW=(CibleH==this.H)?CibleW:this.LastCibleW;
				break;
	}
	//messageZone.innerHTML=parseInt(cibles.style.width)+" / "+ cible;

	this.SizeOutAllOthers(parseInt(cibles.style.width),parseInt(cibles.style.height));
	this.LastNewR=(NewR==parseInt(cibles.offsetWidth)*parseInt(cibles.offsetHeight) && (CibleH==maxH) && (CibleW==maxW))?1:0;
	
	command=this.DocObjectID+".SizeOutAll('"+sens+"',"+maxH+","+maxW+",'"+cible+"');";
	timer=(NewR>=R)?(new function(){clearTimeout(timer);}):(parseInt(this.LastNewR))?(new function(){cibles.style.width=W;cibles.style.height=H;clearTimeout(timer);}):setTimeout(command,500);
};




this.SizeOutAllOthers=function(W,H){
	for(var k=1;k<this.n_NumPopLayers_collection.length;k++){
					ObjOthers=document.getElementById(this.n_NumPopLayers_collection[k]);
					ObjOthers.style.visibility='visible';
					//messageZone=document.getElementById('innerHTML'+this.n_NumPopLayers_collection[k]);
					ObjOthers.style.width=W;
					ObjOthers.style.height=H;
					//messageZone.innerHTML=parseInt(ObjOthers.style.width)+" / "+this.n_NumPopLayers_collection[k];

	}
}




}// FIN CLASSE DAZ_class_PopLayer



function DAZ_class_GetDraggable(DocObjID,className,contener,oW,oH,n_DivSpacing,n_NumCols,n_NumLines,b_Stycky,b_DragConstraint){
	//alert(DocObjID);
	this.DocObjID=DocObjID;
	this.className=className;
	this.classNames=className;
	this.o_MainContener="document.getElementById('"+contener+"')";
	this.Contener=contener;
	this.oW=oW;
	this.oH=oH;
	this.n_DivSpacing=n_DivSpacing;
	this.n_NumCols=n_NumCols;
	this.n_NumLines=n_NumLines;
	this.b_Stycky=b_Stycky;
	
	this.FIREFOX=(navigator.userAgent.indexOf('Gecko') !=-1)? true:false;
	this.IE = (document.all && document.getElementById )? true:false;
	this.IEPNGOPACITY=false; // METTRE A FALSE SI LES BLOCS A DEPLACER CONTIENNENT DES PNG POUR LESQUELS I.E NE GERE PAS LE FILTRE OPACITY
	this.b_MouseCapture=false;
	this.a_CoordCollection=new Array();
	this.Obj_duplicator=10;
	this.TopStart;
	this.LeftStart;
	this.TopEnd;
	this.LeftEnd;
	this.o_CloneDivCollection=new Array();
	this.StartPos=new Array();
	this.classNames;
	this.y;
	this.x;
	
	this.X;
	this.Y;
	this.mouse_x;
    this.mouse_y;
	this.o_CurrentDragTarget;
	this.dy;
	this.dx;
	this.b_effect=false;
	this.b_MoveElastic=true;
	
	this.step=100;
	this.time=10;
/*******************************************************/
//La valeur du paramètre k est constante au cours de cette animation et représente la raideur de l'élastique. Si vous cherchez à simuler la réalité ce paramètre doit être positif et inférieur à 1. La valeur 0.2 est souvent la plus adaptée. 
	this.k = 0.2; 
//Le paramètre f représente les forces de frottement et permet de ralentir le mouvement du disque. Pour f=1, il n'y a aucun frottement. Les frottements deviennent o_CurrentDragTarget'autant plus importants que f est proche de zéro. 
	this.f = 0.70; 
//vx et vy sont les coordonnées cartésiennes du vecteur vitesse. Au démarrage de l'animation, le vecteur vitesse est nul. 
	this.vx=0;
	this.vy=0;  
	
	
	this.numObjects=0;
	this.a_NumObjectsCollection=new Array();
	this.NumObjectsCollectionS=new Array();
	this.StarPosObjectsCollections=new Array();
	this.b_ExchangeObjectsPosOnMouseUp=true;
	this.a_DistArrayCollection=new Array();
	this.a_DistArray=new Array();
	this.o_Target;
	this.o_SetFNewObject;
	this.SumW=0;
	this.n_MainContenerWidth;
	this.n_MainContenerHeight;
	this.n_MainContenerLeft;
	this.n_MainContenerTop;
	this.n_MainContenerBorderS;
	this.n_Height=0;
	this.o_CloneSetFlagTarget;
	this.o_SetFlagTarget;
	this.o_ReserverSpaceNextSibling;
	this.o_ReserverSpacePreviousSibling;
	this.o_TargetClonedNode;
	this.b_o_MainContener=b_DragConstraint;
	this.b_HighLight=true;
	this.a_SecureArray=new Array();
	
	// Pour le styckyEffect
	this.v_rectorStycky=1
	///////DONE EDITTING///////////
	this.stopstycky=0;
	this.v_aStycky=1;
	this.n_StartXstycky;
	this.n_StartYstycky;
	this.EndLeftStycky ;
	this.EndTopStycky;
	this.b_MoveElasticStycky=true;
	this.b_effectStycky=true;
	this.b_ConstraintStycky="TL"; // laisser à null pour aucune contrainte sur le over
	this.o_CloneDivCollectionStycky=new Array();
	this.CurrentClone;

this.Init=function(){
		var Obj=eval(this.o_MainContener);
		//this.n_MainContenerWidth=parseInt((this.n_NumCols*(this.oW+this.n_DivSpacing)))+this.n_DivSpacing;
    	//this.n_MainContenerHeight=parseInt((this.n_NumLines*(this.oH+this.n_DivSpacing)))+this.n_DivSpacing;
		this.n_MainContenerWidth=Obj.offsetWidth;
    	this.n_MainContenerHeight=Obj.offsetHeight;
		//alert(Obj.offsetWidth);
		Obj.style.width=parseInt(this.n_MainContenerWidth)+"px";
		Obj.style.height=parseInt(this.n_MainContenerHeight)+"px";
		this.n_MainContenerLeft=this.getLeftPos(Obj)*1;
		this.n_MainContenerTop=this.getTopPos(Obj)*1;
		this.a_SecureArray.push(document.getElementsByTagName('BODY')[0]);
		this.a_SecureArray.push(Obj);
   		// xHide();
  		var el=Obj.childNodes;
		
		for(i=0;i<el.length;i++){
				if (!el[i].tagName && el[i].nodeType==3){
					el[i].parentNode.removeChild(el[i]);
				}
							
				if(el[i] && el[i].className && el[i].className==this.className){
				this.StartPos.push(el[i].offsetLeft);
				this.numObjects++;
			  //MISE EN MEMOIRE DU NOMBRE D'OBJET ET DE LEUR POSITIONS
				this.a_NumObjectsCollection.push(el[i].id);
				this.NumObjectsCollectionS.push(el[i]);
				}
		}
	
    //alert(n_MainContenerWidth);
    var n_MaxH=0;
	//alert(NumObjectsCollectionS.length);
    for(var j=0;j<this.NumObjectsCollectionS.length;j++){
    	//alert(this.NumObjectsCollectionS[j].id);
        //k=(j>0)?(j-1):j;
        W=parseInt(this.NumObjectsCollectionS[j].offsetWidth);
        H=parseInt(this.NumObjectsCollectionS[j].offsetHeight);
		this.SumW+=W;

        //alert("Objet :" + NumObjectsCollectionS[j].id +" / " + "H :" + H + " / " + "n_MaxH :" + n_MaxH);
            if(this.SumW <= this.n_MainContenerWidth){
                    //alert( "poste :" + j + " /" + SumW + " = " +  n_MainContenerWidth);
                    X=(j>0)?(this.getLeftPos(this.NumObjectsCollectionS[(j-1)])+this.NumObjectsCollectionS[(j-1)].offsetWidth):this.n_MainContenerLeft;
                    Y=(j>0)?(this.getTopPos(this.NumObjectsCollectionS[(j-1)])):this.n_MainContenerTop;
					//X=getLeftPos(NumObjectsCollectionS[(j-1)])+NumObjectsCollectionS[(j-1)].offsetWidth;
                    //Y=getTopPos(NumObjectsCollectionS[(j-1)]);
    
             }else{
                    // RETOUR  A LA LIGNE
                    // NOMBRE DE HEIGHT
                    X=this.n_MainContenerLeft;
                    //Y=(j>0)?(getTopPos(NumObjectsCollectionS[j-1])+NumObjectsCollectionS[(j-1)].offsetHeight):n_MainContenerTop;
                    Y=(j>0)?(this.getTopPos(this.NumObjectsCollectionS[j-1])+ n_MaxH):this.n_MainContenerTop;
                    // NOMBRE DE HEIGHT
                    this.SumW=this.NumObjectsCollectionS[j].offsetWidth;
            } 
        	n_MaxH=(j>0)?((H > n_MaxH)?H:n_MaxH):H;
			//alert("Left MainContener : " +  n_MainContenerLeft + "/ Object courant =( " +NumObjectsCollectionS[(j)].id+" ) Left : " + getLeftPos(NumObjectsCollectionS[(j)])+ "/ X :" + X);
       		 with(this.NumObjectsCollectionS[j].style){
               left=X-this.n_MainContenerLeft;
               top=Y-this.n_MainContenerTop;
         	}
			// DUPLICATION DES DIV POUR OMBRE
			var id=this.NumObjectsCollectionS[j].id+"_1";
			//alert(id);
			var div = document.getElementById(this.NumObjectsCollectionS[j].id).cloneNode(true);
			document.body.appendChild(div);
      		div.id=id;
					document.getElementById(id).className=this.classNames;
					document.getElementById(id).style.zIndex=3;
					document.getElementById(id).style.left=parseInt(this.getLeftPos(this.NumObjectsCollectionS[j]));
					document.getElementById(id).style.top=parseInt(this.getTopPos(this.NumObjectsCollectionS[j]));
					document.getElementById(id).onmouseover=function(e){return false;};
					document.getElementById(id).onmouseout=function(e){return false;};
					with(document.getElementById(id).style){
						if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:50)";
						}
						KHTMLOpacity=0.5;
						MozOpacity=0.5;
						opacity=0.5;
						//backgroundColor="#000000";
						//zIndex=1999;
					}
					this.CurrentClone=id;
					this.o_CloneDivCollectionStycky.push(id);
			var currentObjectPos=new Array();
			currentObjectPos.push(this.NumObjectsCollectionS[j].id);
			currentObjectPos.push(X-this.n_MainContenerLeft);
			currentObjectPos.push(Y-this.n_MainContenerTop);
			this.StarPosObjectsCollections.push(currentObjectPos);
    	}
	
 	this.Activate();

};// Fin Init
	
this.Activate=function(){
	//alert(Obj);
	var Obj=eval(this.DocObjID);
	if(Obj.b_Stycky) Obj.SetStycky('e',Obj);
	// POUR MOZILLA
	var Omainconter=eval(this.o_MainContener);
	 Omainconter.Obj=eval(this.DocObjID);
	 //Omainconter.Obj=this.DocObjID;

	/*document.onmousedown=function(e){
		Obj.SetFlag(e);
	}*/
	 Omainconter.onmouseover=function(e){
		 //alert(this.Obj);
		 var Obj=this.Obj;

		/*document.onmouseover=function(e){
			return Obj.SetStycky(e,Obj);
		};*/

		document.onmousedown=function(e){
			return Obj.SetFlag(e,Obj);
		};
	 }
	 
	 /*Omainconter.onmouseout=function(e){
		 var Obj=this.Obj;
		return Obj.OutStyckyAlls('e',Obj);
	 }*/
	
	//document.ondblclick=Securit;		
	/*document.onmouseup=function(e){
		Obj.UnsetFlag(e);	
	}*/
};// Fin Activate

this.DeActivate=function(Obj){
	var Obj=Obj;
	// POUR MOZILLA
	//alert('deactivate');
	document.onmouseover=function(e){
			Obj.cancelEvent(e);
	};

	document.onmousedown=function(e){
		Obj.cancelEvent(e);
		//document.ondblclick=Securit;		
		//document.onmouseup=cancelEvent;
	}
};//Fin Deactivate

this.cancelEvent=function(e){
		return false;
};//Fin CancelEvent

this.SetStycky=function(e,Obj){
	var Obj=Obj;
	if (!e) e = event;
	for(var l=0;l<Obj.StarPosObjectsCollections.length;l++){
		//alert("StartPOs Obj.id :"+ Obj.StarPosObjectsCollections[l][0] + " X : "+Obj.StarPosObjectsCollections[l][1]+" / Y :" +Obj.StarPosObjectsCollections[l][2] );
		// EVENTHANDLER
		if(Obj.FIREFOX){
			document.getElementById(Obj.StarPosObjectsCollections[l][0]).addEventListener('mouseover',function(e){return Obj.OverStycky(e,Obj);Obj.OutStyckyAll(e,Obj);},false);
			document.getElementById(Obj.StarPosObjectsCollections[l][0]).addEventListener('mouseout',function(e){Obj.OutStycky(e,Obj);},false);
		}else{
			document.getElementById(Obj.StarPosObjectsCollections[l][0]).attachEvent('onmouseover',function(e){Obj.OverStycky(e,Obj);Obj.OutStyckyAll(e,Obj);});
			document.getElementById(Obj.StarPosObjectsCollections[l][0]).attachEvent('onmouseout',function(e){Obj.OutStycky(e,Obj);});
		}
	}// Fin for

};// Fin SetStycky 




this.OverStycky=function(e,Obj){
	var Obj=Obj;
	if (!e) e = event;
	var target = (typeof e.target != "undefined")?e.target:e.srcElement;
	while (target && target.tagName != 'BODY' && target.id != Obj.o_MainContener.id && target.className != Obj.classNames) {
		target = (typeof target.parentNode != "undefined")?target.parentNode:target.parentElement;
	}

	//if(Obj.stopstycky==0){
			//alert("OVERSTYCKY :" + target.id);
			document.getElementById(target.id).style.zIndex=2000;
			//document.getElementById(target.id).style.position='absolute';
			for(var l=0;l<Obj.StarPosObjectsCollections.length;l++){
				if(Obj.StarPosObjectsCollections[l][0]==target.id){
					//alert("StartPOs Obj.id :"+ Obj.StarPosObjectsCollections[l][0] + " X : "+Obj.StarPosObjectsCollections[l][1]+" / Y :" +Obj.StarPosObjectsCollections[l][2] );
					document.getElementById(target.id).n_StartXstycky = (Obj.StarPosObjectsCollections[l][1])-Obj.n_MainContenerLeft*1;
					document.getElementById(target.id).n_StartYstycky = (Obj.StarPosObjectsCollections[l][2])-Obj.n_MainContenerTop*1;
					break;
				}
			}
		// pour l'effet elastic sur le OVER
		switch(Obj.b_ConstraintStycky){
			case "0":
					document.getElementById(target.id).mouse_x = e.clientX;
					document.getElementById(target.id).mouse_y = e.clientY;
					document.getElementById(target.id).EndLeftStycky = (document.getElementById(target.id).mouse_x)-(parseInt(document.getElementById(target.id).offsetWidth)/2);
					document.getElementById(target.id).EndTopStycky = (document.getElementById(target.id).mouse_y)-(parseInt(document.getElementById(target.id).offsetHeight)/2);
				break
			case "TL":
				document.getElementById(target.id).EndLeftStycky=Obj.StarPosObjectsCollections[l][1]-10;
				document.getElementById(target.id).EndTopStycky=Obj.StarPosObjectsCollections[l][2]-10;

				break;

		}
		//alert(Obj.stopstycky);
		Obj.ElasticStyckyOver(Obj,document.getElementById(target.id).id,2000,0);
		return true;
};

this.OutStycky=function(e,Obj){
	var Obj=Obj;
		if (!e) e = event;
			var target = (typeof e.target != "undefined")?e.target:e.srcElement;
			while (target && target.tagName != 'BODY' && target.id != Obj.o_MainContener.id && target.className != Obj.classNames) {
					target = (typeof target.parentNode != "undefined")?target.parentNode:target.parentElement;
			}
			//alert("OUTSTYCKY :" + target.id);
			document.getElementById(target.id).style.zIndex=1500;
			for(var l=0;l<Obj.StarPosObjectsCollections.length;l++){
					if(Obj.StarPosObjectsCollections[l][0]==target.id){
						//alert("StartPOs Obj.id :"+ Obj.StarPosObjectsCollections[l][0] + " X : "+Obj.StarPosObjectsCollections[l][1]+" / Y :" +Obj.StarPosObjectsCollections[l][2] );
						document.getElementById(target.id).n_StartXstycky = (Obj.StarPosObjectsCollections[l][1]);
						document.getElementById(target.id).n_StartYstycky = (Obj.StarPosObjectsCollections[l][2]);
						break;
					}
			}
			Obj.CurrentClone='rien';
			Obj.ElasticStyckyOut(Obj,document.getElementById(target.id).id,document.getElementById(target.id).n_StartXstycky ,document.getElementById(target.id).n_StartYstycky, 2000);
			return false;
};

this.OutStyckyAll=function(e,Obj){
	var Obj=Obj;

		if (!e) e = event;
			var target = (typeof e.target != "undefined")?e.target:e.srcElement;
			while (target && target.tagName != 'BODY' && target.id != Obj.o_MainContener.id && target.className != Obj.classNames) {
					target = (typeof target.parentNode != "undefined")?target.parentNode:target.parentElement;
			}
			//alert("OUTSTYCKY :" + target.id);
			for(var l=0;l<Obj.StarPosObjectsCollections.length;l++){
					if(Obj.StarPosObjectsCollections[l][0]!=target.id){
						document.getElementById(Obj.StarPosObjectsCollections[l][0]).style.zIndex=1500;
						if(Obj.getTopPos(document.getElementById(Obj.StarPosObjectsCollections[l][0]))-Obj.n_MainContenerTop*1!=Obj.StarPosObjectsCollections[l][2] && Obj.getLeftPos(document.getElementById(Obj.StarPosObjectsCollections[l][0]))-Obj.n_MainContenerLeft*1!=Obj.StarPosObjectsCollections[l][1]){
							//alert("plus en osition");
							Obj.ElasticStyckyOut(Obj,Obj.StarPosObjectsCollections[l][0],Obj.StarPosObjectsCollections[l][1],Obj.StarPosObjectsCollections[l][2],2000);
						}
					}
			}
		return false;
};

this.OutStyckyAlls=function(e,Obj){
	var Obj=Obj;
		if (!e) e = event;
			for(var l=0;l<Obj.StarPosObjectsCollections.length;l++){
						//if(Obj.getTopPos(document.getElementById(Obj.StarPosObjectsCollections[l][0]))!=Obj.StarPosObjectsCollections[l][2] && Obj.getLeftPos(document.getElementById(Obj.StarPosObjectsCollections[l][0]))!=Obj.StarPosObjectsCollections[l][1]){
							Obj.ElasticStyckyOut(Obj,Obj.StarPosObjectsCollections[l][0],Obj.StarPosObjectsCollections[l][1],Obj.StarPosObjectsCollections[l][2],2000);
						//}
			}
		return false;
};

this.StartStycky=function(e,Obj){
	if (!e) e = event;
	var Obj=Obj;

/* Pour le styckyEffect
	Obj.v_rectorStycky=2
	///////DONE EDITTING///////////
	Obj.stopstycky=0 
	Obj.v_aStycky=1*/
if ((!document.all&&!document.getElementById)||Obj.stopstycky==1)
return
if (Obj.v_aStycky==1){
Obj.o_CurrentDragTarget.style.top=parseInt(Obj.o_CurrentDragTarget.style.top)+Obj.v_rectorStycky
}
else if (Obj.v_aStycky==2){
Obj.o_CurrentDragTarget.style.left=parseInt(Obj.o_CurrentDragTarget.style.left)+Obj.v_rectorStycky
}
else if (Obj.v_aStycky==3){
Obj.o_CurrentDragTarget.style.top=parseInt(Obj.o_CurrentDragTarget.style.top)-Obj.v_rectorStycky
}
else{
Obj.o_CurrentDragTarget.style.left=parseInt(Obj.o_CurrentDragTarget.style.left)-Obj.v_rectorStycky
}
if (Obj.v_aStycky<4)
Obj.v_aStycky++
else
Obj.v_aStycky=1
var StyckyCommande=this.DocObjID+".StartStycky('e',"+this.DocObjID+")";

setTimeout(StyckyCommande,50)
};// Fin StartStycky


this.StopStycky=function(e,Obj){
	if (!e) e = event;
	var Obj=Obj;
	Obj.stopstycky=1
	Obj.o_CurrentDragTarget.style.left=Obj.n_StartXstycky;
	Obj.o_CurrentDragTarget.style.top=Obj.n_StartYstycky;
}; // Fin StopStycky

this.ElasticStyckyOutAll=function(Obj,X,Y,currentobjid) {
	var Obj=Obj;
	for(var l=0;l<Obj.StarPosObjectsCollections.length;l++){
		if(Obj.StarPosObjectsCollections[l][0]!=currentobjid){
			//alert("StartPOs Obj.id :"+ Obj.StarPosObjectsCollections[l][0] + " X : "+Obj.StarPosObjectsCollections[l][1]+" / Y :" +Obj.StarPosObjectsCollections[l][2] );
			X = (Obj.StarPosObjectsCollections[l][1])-Obj.n_MainContenerLeft*1;
        	Y = (Obj.StarPosObjectsCollections[l][2])-Obj.n_MainContenerTop*1;

			Obj.ElasticStyckyOut(Obj,Obj.StarPosObjectsCollections[l][0],X,Y,2000);
		}
		//Obj.ElasticStyckyOut(Obj,Obj.StarPosObjectsCollections[l][1],Obj.StarPosObjectsCollections[l][2],this.id);
	}
}; // Fin ElasticStyckyOutAll

this.ElasticStyckyOut=function(Obj,currentobjid,StartX,StartY,olddist) {
	//alert("elasticstyckyout :" + currentobjid);
	var currentobj=document.getElementById(currentobjid);
	var BaseId=currentobj.id+"_1";
	var Obj=Obj;
	var o_MainContener=document.getElementById(Obj.Contener);
	var ax = Obj.k*(parseInt(StartX) - parseInt(currentobj.style.left));
	var ay = Obj.k*(parseInt(StartY) - parseInt(currentobj.style.top));
	Obj.vx += ax;
	Obj.vy += ay;
	Obj.vx *= Obj.f;
	Obj.vy *= Obj.f;
	//alert( vx +" / " +vy);

	with(currentobj.style){
			if(Obj.b_MoveElasticStycky){
				left = parseInt(currentobj.style.left) + Obj.vx;
				top = parseInt(currentobj.style.top) + Obj.vy;
			}else{
				left = parseInt(currentobj.n_StartXstycky);
				top = parseInt(currentobj.n_StartYstycky);
				/*if(Obj.o_Target){
       				with(Obj.o_Target.style){
						if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:100)";
						}
						KHTMLOpacity=10;
						MozOpacity=10;
						opacity=10;
					}	
				}*/
    			return false;	
			}	
	}
	var distx = parseInt(StartX)- parseInt(currentobj.offsetLeft); /* l'ecart horizontal entre la cible et notre clip */
	var disty = parseInt(StartY)- parseInt(currentobj.offsetTop); /* l'écart vertical */
	var angle = Math.atan2(disty, distx); /* calcul de l'angle */
	var indiceChild;
 	var indiceObject;
	var dist=Obj.distanceToStycky(parseInt(StartX),parseInt(StartY),Obj,currentobjid);
	//document.getElementById('trace').innerHTML+="<br>#"+ currentobjid+" -"+ dist;
	if (dist<=2 || dist==olddist) {
		//alert("okdistance :" + dist);
			currentobj.style.left=parseInt(StartX);
			currentobj.style.top=parseInt(StartY);
			document.getElementById(BaseId).style.left=parseInt(Obj.getLeftPos(currentobj));
			document.getElementById(BaseId).style.top=parseInt(Obj.getTopPos(currentobj));
			//alert("finitobj :" + currentobj.id+ "X :" + currentobj.style.left +" Y :" + currentobj.style.top);
      		//Obj.RemoveDuplicatedObjectStycky(Obj);
			clearTimeout(pauseStyckyOut);
			//alert(o_CurrentDragTarget.innerHTML);
			/*if(Obj.o_Target){
        		with(Obj.o_Target.style){
					if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:100)";
					}
            		//filter="alpha(opacity:100)";
            		KHTMLOpacity=10;
            		MozOpacity=10;
            		opacity=10;
    			}
			}*/
	}else{
		if(Obj.b_effectStycky){
				/*var x = parseInt(currentobj.offsetLeft)+Obj.n_MainContenerLeft; 
				var y = parseInt(currentobj.offsetTop)+Obj.n_MainContenerTop; 
				d_Left=x-((5)*Math.cos(angle));
				d_Top=y-((5)*Math.sin(angle));*/
				with(document.getElementById(BaseId).style){
						left=parseInt(Obj.getLeftPos(currentobj));
						top=parseInt(Obj.getTopPos(currentobj));
						//zIndex=1999;
					}
		}
		
	//var Obj=document.getElementById(o_Object);
	/*if(Obj.b_HighLight && Obj.o_Target){
    	with(Obj.o_Target.style){
        //alert("highlight :" + filter);
			if(Obj.IE && Obj.IEPNGOPACITY){
				filter=(filter=="alpha(opacity:100)")?"alpha(opacity:50)":"alpha(opacity:100)";
			}
            //filter=(filter=="alpha(opacity:100)")?"alpha(opacity:50)":"alpha(opacity:100)";
            KHTMLOpacity=(KHTMLOpacity==10)?0.5:10;
            MozOpacity=(MozOpacity==10)?0.5:10;
            opacity=(opacity==10)?0.5:10;
    	}
  	}*/
		//alert(dist);
		olddist=dist;
		var MoveCommandeStyckyElasticOut=this.DocObjID+".ElasticStyckyOut("+this.DocObjID+",'"+currentobjid+"',"+StartX+","+StartY+","+olddist+")";
		var pauseStyckyOut = setTimeout(MoveCommandeStyckyElasticOut,1);
	}
	
}; // Fin ElasticStyckyOut

this.ElasticStyckyOver=function(Obj,currentobjid,olddist,inc) {
	//alert(inc);
	var Obj=Obj;
	// retour a leur position des autres objets

	var o_MainContener=document.getElementById(Obj.Contener);
	var currentobj=document.getElementById(currentobjid);
	var ax = Obj.k*(parseInt(currentobj.EndLeftStycky) - parseInt(currentobj.style.left));
	var ay = Obj.k*(parseInt(currentobj.EndTopStycky) - parseInt(currentobj.style.top));
	Obj.vx += ax;
	Obj.vy += ay;
	Obj.vx *= Obj.f;
	Obj.vy *= Obj.f;
	//alert( vx +" / " +vy);

	with(currentobj.style){
			if(Obj.b_MoveElasticStycky){
				left = parseInt(currentobj.style.left) + Obj.vx;
				top = parseInt(currentobj.style.top) + Obj.vy;
				//alert(currentobj.id);
				var id=currentobj.id+'_1';
				var Index=parseInt(currentobj.style.zIndex);
				/*if(inc<1){
					var div = document.getElementById(currentobj.id).cloneNode(true);
      				div.id=id;
					div.className=Obj.classNames;
					div.style.zIndex=3;
					div.style.left=parseInt(Obj.getLeftPos(currentobj))+10;
					div.style.top=parseInt(Obj.getTopPos(currentobj))+10;
					//alert( parseInt(Obj.getLeftPos(currentobj)));
					//alert(parseInt(Obj.getLeftPos(div)));
					document.body.appendChild(div);
					//alert("vraie zIndex :"+ currentobj.style.zIndex + " / clone zIndex :" + document.getElementById(id).style.zIndex);
					document.getElementById(id).onmouseover=function(e){return false;};
					document.getElementById(id).onmouseout=function(e){return false;};
					with(document.getElementById(id).style){
						if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:50)";
						}
						KHTMLOpacity=0.5;
						MozOpacity=0.5;
						opacity=0.5;
						//backgroundColor="#000000";
						//zIndex=1999;
					}
					Obj.CurrentClone=id;
					Obj.o_CloneDivCollectionStycky.push(id);
				}*/
				
				if(Obj.b_effectStycky){
					//var x = parseInt(Obj.getLeftPos(currentobj.id)); 
					//var y = parseInt(Obj.getTopPos(currentobj.id)); 
					//d_Left=x-((1)*Math.cos(angle));
					//d_Top=y-((1)*Math.sin(angle));
				//d_Left=x;
				//d_Top=y;

					with(document.getElementById(id).style){
						left=parseInt(Obj.getLeftPos(currentobj))+10;
						top=parseInt(Obj.getTopPos(currentobj))+10;
						//zIndex=1999;
					}
				}
			}else{
				left = parseInt(currentobj.EndLeftStycky);
				top = parseInt(currentobj.EndTopStycky);
				/*if(Obj.o_Target){
       				with(Obj.o_Target.style){
						if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:100)";
						}
						KHTMLOpacity=10;
						MozOpacity=10;
						opacity=10;
					}	
				}*/
    			return false;	
			}	
	}
	var distx = parseInt(currentobj.EndLeftStycky)- parseInt(currentobj.offsetLeft); /* l'ecart horizontal entre la cible et notre clip */
	var disty = parseInt(currentobj.EndTopStycky)- parseInt(currentobj.offsetTop); /* l'écart vertical */
	var angle = Math.atan2(disty, distx); /* calcul de l'angle */
	var indiceChild;
 	var indiceObject;
	var dist=Obj.distanceToStycky(parseInt(currentobj.EndLeftStycky),parseInt(currentobj.EndTopStycky),Obj,currentobjid);
	
	if (dist<=2 || dist==olddist) {
			//alert("over okdistance");
      		
			Obj.stopstycky=1
			currentobj.style.left=parseInt(currentobj.EndLeftStycky);
			currentobj.style.top=parseInt(currentobj.EndTopStycky);
			clearTimeout(pauseStyckyOver);
			//alert(o_CurrentDragTarget.innerHTML);
			/*if(Obj.o_Target){
        		with(Obj.o_Target.style){
					if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:100)";
					}
            		//filter="alpha(opacity:100)";
            		KHTMLOpacity=10;
            		MozOpacity=10;
            		opacity=10;
    			}
			}*/
	}else{
		
		
	//var Obj=document.getElementById(o_Object);
	/*if(Obj.b_HighLight && Obj.o_Target){
    	with(Obj.o_Target.style){
        //alert("highlight :" + filter);
			if(Obj.IE && Obj.IEPNGOPACITY){
				filter=(filter=="alpha(opacity:100)")?"alpha(opacity:50)":"alpha(opacity:100)";
			}
            //filter=(filter=="alpha(opacity:100)")?"alpha(opacity:50)":"alpha(opacity:100)";
            KHTMLOpacity=(KHTMLOpacity==10)?0.5:10;
            MozOpacity=(MozOpacity==10)?0.5:10;
            opacity=(opacity==10)?0.5:10;
    	}
  	}*/
		//alert("over :"+ dist);
		inc++;
		olddist=dist;
		var MoveCommandeStyckyElasticOver=this.DocObjID+".ElasticStyckyOver("+this.DocObjID+",'"+currentobjid+"',"+olddist+","+inc+")";
		var pauseStyckyOver = setTimeout(MoveCommandeStyckyElasticOver,12);
	}
	
}; // Fin ElasticStyckyOver

this.distanceToStycky=function(x,y,Obj,currentobjid){
	//alert("distancetostycky :" + x +" ; "+ y+" ; "+ currentobjid);
	//var Obj=eval(this.DocObjID);
	var Obj=Obj;
	//var distx=x-parseInt(Obj.o_CurrentDragTarget.offsetLeft); /* l'écart horizontal */
	//var disty=y-parseInt(Obj.o_CurrentDragTarget.offsetTop); /* l'écart vertical */
	
	var distx=x-parseInt(Obj.getLeftPos(document.getElementById(currentobjid))); /* l'écart horizontal */
	var disty=y-parseInt(Obj.getTopPos(document.getElementById(currentobjid))); /* l'écart vertical */

	var distance=Math.sqrt((distx*distx)+(disty*disty)); /* l'hypothénuse */
	//var distance= Math.atan2(disty, distx);
	//alert(distance);
	return distance; /* on retourne le résultat */
}

this.RemoveDuplicatedObjectStycky=function(Obj){
	var Obj=Obj;
	for(i=0;i<Obj.o_CloneDivCollectionStycky.length;i++){

		el=document.getElementById(Obj.o_CloneDivCollectionStycky[i]);
		//alert(el.id +" / " + Obj.CurrentClone);
		//if(el.id!=Obj.CurrentClone)
		document.body.removeChild(el);
	}
	Obj.o_CloneDivCollectionStycky.length=0;
	Obj.stopstycky=0;
};


this.SetFlag=function(e,Obj){
	//alert("setFlag " + Obj)
	//var Obj=eval(this.DocObjID);
	var Obj=Obj;
	document.onmouseup=function(e){
			 Obj.UnsetFlag(e,Obj);
	};
	if (!e) e = event;
		var target = (typeof e.target != "undefined")?e.target:e.srcElement;
		if(target.tagName=='A' || target.parentNode.tagName=='A' || target.tagName=='INPUT' || target.tagName=='HTML' || target.tagName=='OBJECT' || target.tagName=='EMBED') return true;
      while (target && target.tagName != 'BODY' && target.id != Obj.o_MainContener.id && target.className != Obj.classNames) {
 				//document.getElementById("show").innerHTML+="SetFlag :" + target.tagName+" /class : "+ target.className + "<br>";
 				target = (typeof target.parentNode != "undefined")?target.parentNode:target.parentElement;
 		}
 		//document.getElementById("trace").innerHTML+="## SetFlag CurrentDargedTarget :" + target.id +" type : " + target.tagName+" /class : "+ target.className + "<br>";
		if(!target.className || target.tagName=='BODY' || target.tagName=='HTML' || target.id ==Obj.o_MainContener.id || target.id .search("notag")==0){
    				//alert("SetFlag No:" + target.tagName);
    				return false;
      }else{
          	Obj.o_SetFlagTarget=target;
      }
   	//alert(Obj.o_SetFlagTarget.id + " obj :" + Obj.o_MainContener);
	//alert(this.DocObjID);

	//Obj.o_ReserverSpaceNextSibling=Obj.o_SetFlagTarget.nextSibling;
   	//Obj.o_ReserverSpacePreviousSibling=Obj.o_SetFlagTarget.previousSibling;
	//alert("o_SetFlagTarget / nextsibling :" + Obj.o_ReserverSpaceNextSibling.id + " / previoussibling : " + Obj.o_ReserverSpacePreviousSibling.id)

		if (Obj.o_SetFlagTarget.className == Obj.classNames){
  			Obj.b_MouseCapture=true;
			Obj.b_Limit=true;
        	with(Obj.o_SetFlagTarget.style){
            	cursor = 'move';
            	zIndex = 1000;
            	border = '0px #000000 dotted';
        	}
			//o_CurrentDragTarget=null;
           	Obj.o_CurrentDragTarget =Obj.o_SetFlagTarget;
           	mouse_x = e.clientX;
            mouse_y = e.clientY;
            X = Obj.getLeftPos(Obj.o_SetFlagTarget)-Obj.n_MainContenerLeft*1;
            Y = Obj.getTopPos(Obj.o_SetFlagTarget)-Obj.n_MainContenerTop*1;
            var a_CoorDarray=new Array();
            a_CoorDarray.push(X,Y);
            Obj.a_CoordCollection.push(a_CoorDarray);
            var o_ContenerChild=Obj.o_CurrentDragTarget.nextSibling;
            Obj.o_CloneSetFlagTarget =Obj.o_CurrentDragTarget.cloneNode(true);
            Obj.o_CloneSetFlagTarget.id="o_ReserveSpace";
            Obj.o_CurrentDragTarget.parentNode.insertBefore(Obj.o_CloneSetFlagTarget,o_ContenerChild);
     // STYLE CSS
	 		   	with(Obj.o_CloneSetFlagTarget.style){
					if(Obj.IE && Obj.IEPNGOPACITY){
                		filter="alpha(opacity:25)";
					}
                	KHTMLOpacity=0.25;
                	MozOpacity=0.25;
                	opacity=0.25;
					//filter="alpha(opacity:25)";
                	border = '1px dotted #666666';
					zIndex = 999;
            	}
			
            //HighLight(o_CloneSetFlagTarget.id,true)
		 	document.onmousemove=function(e){
				//alert("mousmove");
				Obj.StartDrag(e,Obj);
			}
		 	return false;
 		}
};/* Fin SetFlag */

this.StartDrag=function(e,Obj){
	//var Obj=eval(this.DocObjID);
	var Obj=Obj;
	var o_MainContener=document.getElementById(Obj.Contener);
	//document.getElementById("trace").innerHTML=o_MainContener.id + "<br>";
	//alert("startdrag :" + Obj.o_CurrentDragTarget.id);
	if (!e) e = event;
	if (Obj.b_MouseCapture && Obj.o_CurrentDragTarget!=null){
		with(Obj.o_CurrentDragTarget.style){
				position ="absolute";
				//left = (X - mouse_x + e.clientX + Math.max(document.body.scrollLeft,document.documentElement.scrollLeft));
				left = (X - mouse_x + e.clientX );
				top = (Y - mouse_y + e.clientY);
			}
		at=parseInt(Obj.getLeftPos(o_MainContener))-Obj.n_MainContenerLeft;
		bt=(parseInt(Obj.getLeftPos(o_MainContener)-Obj.n_MainContenerLeft)+ Obj.n_MainContenerWidth);
		ct=parseInt(Obj.getTopPos(o_MainContener))-Obj.n_MainContenerTop;
		dt=(parseInt(Obj.getTopPos(o_MainContener)-Obj.n_MainContenerTop)+ Obj.n_MainContenerHeight);

		if(Obj.b_o_MainContener){
			with(Obj.o_CurrentDragTarget.style){
				position ="absolute";
				left=(parseInt(Obj.o_CurrentDragTarget.offsetLeft + Obj.o_CurrentDragTarget.offsetWidth) >= bt || parseInt(Obj.o_CurrentDragTarget.offsetLeft) <= at)?((Obj.o_CurrentDragTarget.offsetLeft <= at)?(at):(at+Obj.n_MainContenerWidth)-Obj.o_CurrentDragTarget.offsetWidth ): (X - mouse_x + e.clientX );
				top=(parseInt(Obj.o_CurrentDragTarget.offsetTop+Obj.o_CurrentDragTarget.offsetHeight) >=dt || parseInt(Obj.o_CurrentDragTarget.offsetTop) <= ct)?((Obj.o_CurrentDragTarget.offsetTop <= ct)?(ct):dt-Obj.o_CurrentDragTarget.offsetHeight):(Y - mouse_y + e.clientY);				
			}
		}	
		var a_CoorDarray=new Array();
		a_CoorDarray.push(X,Y);
		Obj.a_CoordCollection.push(a_CoorDarray);
		return false;
	}
	return false;
};// Fin StartDrag

this.UnsetFlag=function(e,Obj){
	//alert(this.DocObjID);
	//var Obj=eval(this.DocObjID);
	var Obj=Obj;
	//alert("UnsetFlag :"+ this.Contener);
	var o_MainContener=document.getElementById(Obj.Contener);
	if (!e) e = event;
		var target = (typeof e.target != "undefined")?e.target:e.srcElement;
		if(target.tagName=='A' || target.parentNode.tagName=='A' || target.tagName=='INPUT' || (target.tagName=='HTML'&&Obj.o_CurrentDragTarget=='undefined') || target.tagName=='OBJECT' || target.tagName=='EMBED')  return false;
		//document.getElementById("trace").innerHTML=target.tagName+" / "+o_CurrentDragTarget;
	while (target && target.tagName != 'HTML' && target.id != o_MainContener.id && target.className != Obj.classNames) {
 		//document.getElementById("trace").innerHTML+="<br>## UnSetFlag target :" + target.id +" type : " + target.tagName+" /class : "+ target.className + " /" + o_CurrentDragTarget+"<br>";
 				target = (typeof target.parentNode != "undefined")?target.parentNode:target.parentElement;
 		}
 		//document.getElementById("trace").innerHTML+="<br>## UnSetFlag target :" + target.id +" type : " + target.tagName+" /class : "+ target.className + " /" + o_CurrentDragTarget+"<br>";
	if( (target.tagName=='BODY' || (target.tagName=='HTML' && !target.className && Obj.o_CurrentDragTarget=='undefined') || target.id ==o_MainContener.id) ||  !Obj.o_CurrentDragTarget || Obj.o_CurrentDragTarget.id .search("notag")==0) return false;
	Obj.b_MouseCapture=false;
	//alert(target.id);
	//alert(Obj.o_CurrentDragTarget.id);

    // SI ECHANGE D ' OBJETS
   	Obj.a_DistArray.length=0;
    Obj.a_DistArrayCollection.length=0;
    if(Obj.b_ExchangeObjectsPosOnMouseUp){
    // RECHERCHE DE L'OBJET LE PLUS PROCHE DE CELUI EN COURS
        for(i=0;i<Obj.a_NumObjectsCollection.length;i++){
        	var CurrentObject=document.getElementById(Obj.a_NumObjectsCollection[i]);
    		var NearEstLeft=parseInt(Obj.getLeftPos(CurrentObject))-Obj.n_MainContenerLeft;
            var NearEstTop=parseInt(Obj.getTopPos(CurrentObject))-Obj.n_MainContenerTop;
            if(CurrentObject.id!=Obj.o_CurrentDragTarget.id){
				//ALORS RETOUR SUR NOUVELLE POSITION
            	var dist=Math.round(Obj.distanceTo(parseInt(NearEstLeft),parseInt(NearEstTop),Obj));
                var a_CurrentLigne=new Array();
                a_CurrentLigne.push(dist);
                a_CurrentLigne.push(CurrentObject.id);
                Obj.a_DistArray.push(a_CurrentLigne);
				Obj.a_DistArrayCollection.push(Obj.a_NumObjectsCollection[i]);
            }
    	}
		
        // ICI TEST SUR L'OBJET DE RESERVE D'ESPACE
            var NearEstLeft=parseInt(Obj.getLeftPos(Obj.o_CloneSetFlagTarget))-Obj.n_MainContenerLeft;
            var NearEstTop=parseInt(Obj.getTopPos(Obj.o_CloneSetFlagTarget))-Obj.n_MainContenerTop;
			//alert("Objet :" +Obj.o_CloneSetFlagTarget.id +  " _nearestLeft :" +NearEstLeft +" /nearesttop :" + NearEstTop);
            var dist=Math.round(Obj.distanceTo(parseInt(NearEstLeft),parseInt(NearEstTop),Obj));
			//alert("distance :" + dist);
            var a_CurrentLigne=new Array();
                a_CurrentLigne.push(dist);
                a_CurrentLigne.push(Obj.o_CloneSetFlagTarget.id);
                Obj.a_DistArray.push(a_CurrentLigne);
				Obj.a_DistArrayCollection.push(Obj.a_NumObjectsCollection[i]);
                
		// BOUCLE SUR LE TABLEAU POUR TROUVER LE PLUS PROCHE
		/*var message="";
		for(var k=0;k<Obj.a_DistArray.length;k++){
			message+=" 2 # " + Obj.a_DistArray[k][0] + " / " + Obj.a_DistArray[k][1]+"\n";
		}
		//alert(message);*/
        Obj.a_DistArray.sort2d(0);
        Obj.o_Target=(Obj.a_DistArray[0][1].search("notag")<0)?document.getElementById(Obj.a_DistArray[0][1]):document.getElementById(Obj.o_CurrentDragTarget.id);
		//alert("\n\n" + message +" \n\n " + "cible la plus proche : " + Obj.o_Target.id +" distarray result:"  + Obj.a_DistArray[0][1]);
		Obj.TopEnd=parseInt(Obj.getTopPos(Obj.o_Target)/1)-Obj.n_MainContenerTop;
		Obj.LeftEnd=parseInt(Obj.getLeftPos(Obj.o_Target)/1)-Obj.n_MainContenerLeft;
		//alert(Obj.o_Target.id +" : "+ Obj.TopEnd +" / "+ Obj.LeftEnd+" CurrentTarget :" + Obj.getTopPos(Obj.o_Target) +" ; "  + Obj.getLeftPos(Obj.o_Target));

		//b_HighLight=true;
		//HighLight(o_Target.id);

    }else{
    	Obj.TopEnd=parseInt(Obj.a_CoordCollection[0][1]);
		Obj.LeftEnd=parseInt(Obj.a_CoordCollection[0][0]);
    }
	with(Obj.o_CurrentDragTarget.style){
		cursor = 'default';
		zIndex = Obj.Obj_duplicator;
		border = '0px #000000 solid';
	}
		Obj.a_CoordCollection.length=0;
    	Obj.o_ParentContener = (typeof Obj.o_Target.parentNode != "undefined")?Obj.o_Target.parentNode:Obj.o_Target.parentElement;
	//alert(o_ParentContener.id );
   		Obj.o_ReserverSpace=document.getElementById("o_ReserveSpace");
		//alert(o_ReserverSpace.id );
		Obj.DeActivate(Obj);
		Obj.DuplicateObject(Obj);
    return false;
};/*Fin UnsetFlag*/


this.DuplicateObject=function(Obj){
	//var Obj=eval(this.DocObjID);
	var Obj=Obj;
	var o_MainContener=document.getElementById(Obj.Contener);

	if(Obj.b_effect){
		var x = parseInt(Obj.o_CurrentDragTarget.offsetLeft)-Obj.n_MainContenerLeft; 
		var y = parseInt(Obj.o_CurrentDragTarget.offsetTop)-Obj.n_MainContenerTop; 
		var distx = parseInt(Obj.LeftEnd)- parseInt(Obj.o_CurrentDragTarget.offsetLeft); /* l'ecart horizontal entre la cible et notre clip */
		var disty = parseInt(Obj.TopEnd)- parseInt(Obj.o_CurrentDragTarget.offsetTop); /* l'écart vertical */
		var angle = Math.atan2(disty, distx); /* calcul de l'angle */
		var Width=parseInt(Obj.o_CurrentDragTarget.offsetWidth);
		var Height=parseInt(Obj.o_CurrentDragTarget.offsetHeight);
		var zindex=Obj.o_CurrentDragTarget.style.zIndex;
		var BaseId=Obj.o_CurrentDragTarget.id;
		var TagType=Obj.o_CurrentDragTarget.tagName;
		var srcS=Obj.o_CurrentDragTarget.getAttribute('src');
		
		for(i=0;i<Obj.Obj_duplicator;i++){
			ObjectId=BaseId+i;
			var div = Obj.o_CurrentDragTarget.cloneNode(true);
      		div.id=ObjectId;
			document.body.appendChild(div);
			div.className=classNames;
			if(TagType=="IMG") div.src= srcS;
				with(div.style){
					position="absolute";
					zIndex=(zindex)-i;
					left=x-((i*1)*Math.cos(angle));
					top=y-((i*1)*Math.sin(angle));
					width=Width;
					height=Height;
					if(Obj.IE && Obj.IEPNGOPACITY){
						filter="alpha(opacity:"+((Obj.Obj_duplicator/i))+")";
					}
					KHTMLOpacity=(Obj_duplicator/i)/100;
					MozOpacity=(Obj_duplicator/i)/100;
					opacity=(Obj_duplicator/i)/100;
				}
			Obj.o_CloneDivCollection.push(ObjectId);
		}
	}
   	Obj.MoveToElastic(Obj);
	return false;
};// Fin DuplicateObject

this.MoveToElastic=function(Obj) {
	//alert(Obj);
	var Obj=Obj;
	var o_MainContener=document.getElementById(Obj.Contener);
	var ax = Obj.k*(parseInt(Obj.LeftEnd) - parseInt(Obj.o_CurrentDragTarget.style.left));
	var ay = Obj.k*(parseInt(Obj.TopEnd) - parseInt(Obj.o_CurrentDragTarget.style.top));
	Obj.vx += ax;
	Obj.vy += ay;
	Obj.vx *= Obj.f;
	Obj.vy *= Obj.f;
	//alert( vx +" / " +vy);

	with(Obj.o_CurrentDragTarget.style){
			if(Obj.b_MoveElastic){
				left = parseInt(Obj.o_CurrentDragTarget.style.left) + Obj.vx;
				top = parseInt(Obj.o_CurrentDragTarget.style.top) + Obj.vy;
			}else{
				left = parseInt(Obj.LeftEnd);
				top = parseInt(Obj.TopEnd);
				if(Obj.o_Target){
       				with(Obj.o_Target.style){
						if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:100)";
						}
						KHTMLOpacity=10;
						MozOpacity=10;
						opacity=10;
					}	
				}
				Obj.RemoveDuplicatedObject(Obj);
    			return false;	
			}	
	}
	var distx = parseInt(Obj.LeftEnd)- parseInt(Obj.o_CurrentDragTarget.offsetLeft); /* l'ecart horizontal entre la cible et notre clip */
	var disty = parseInt(Obj.TopEnd)- parseInt(Obj.o_CurrentDragTarget.offsetTop); /* l'écart vertical */
	var angle = Math.atan2(disty, distx); /* calcul de l'angle */
	var indiceChild;
 	var indiceObject;
	if (Obj.distanceTo(parseInt(Obj.LeftEnd),parseInt(Obj.TopEnd),Obj)<=2) {
	//alert("okdistance");
      		clearTimeout(pause);
			Obj.o_CurrentDragTarget.style.left=parseInt(Obj.LeftEnd);
			Obj.o_CurrentDragTarget.style.top=parseInt(Obj.TopEnd);
			//alert(o_CurrentDragTarget.innerHTML);
			if(Obj.o_Target){
        		with(Obj.o_Target.style){
					if(Obj.IE && Obj.IEPNGOPACITY){
							filter="alpha(opacity:100)";
					}
            		//filter="alpha(opacity:100)";
            		KHTMLOpacity=10;
            		MozOpacity=10;
            		opacity=10;
    			}
			}
    	Obj.RemoveDuplicatedObject(Obj);
	}else{
		if(Obj.b_effect){
			for(i=0;i<Obj.Obj_duplicator;i++){
				BaseId=Obj.o_CurrentDragTarget.id;
				Id=(BaseId+i);
				var x = parseInt(Obj.o_CurrentDragTarget.offsetLeft)+Obj.n_MainContenerLeft; 
				var y = parseInt(Obj.o_CurrentDragTarget.offsetTop)+Obj.n_MainContenerTop; 
				d_Left=x-((i*1)*Math.cos(angle));
				d_Top=y-((i*1)*Math.sin(angle));
				with(document.getElementById(Id).style){
					left=d_Left;
					top=d_Top;
				}
			}
		}
		
	//var Obj=document.getElementById(o_Object);
	if(Obj.b_HighLight && Obj.o_Target){
    	with(Obj.o_Target.style){
        //alert("highlight :" + filter);
			if(Obj.IE && Obj.IEPNGOPACITY){
				filter=(filter=="alpha(opacity:100)")?"alpha(opacity:50)":"alpha(opacity:100)";
			}
            //filter=(filter=="alpha(opacity:100)")?"alpha(opacity:50)":"alpha(opacity:100)";
            KHTMLOpacity=(KHTMLOpacity==10)?0.5:10;
            MozOpacity=(MozOpacity==10)?0.5:10;
            opacity=(opacity==10)?0.5:10;
    	}
  	}

		var MoveCommande=this.DocObjID+".MoveToElastic("+this.DocObjID+")";
		var pause = setTimeout(MoveCommande,12);
	}
	
}; // Fin MoveToElastic

this.RemoveDuplicatedObject=function(Obj){
	//alert(Obj);
	//var Obj=eval(this.DocObjID);
	var Obj=Obj;
	var o_MainContener=document.getElementById(Obj.Contener);
	for(i=0;i<Obj.o_CloneDivCollection.length;i++){
		el=document.getElementById(Obj.o_CloneDivCollection[i]);
		document.body.removeChild(el);
	}
  
   	Obj.o_ParentContener = (typeof Obj.o_Target.parentNode != "undefined")?Obj.o_Target.parentNode:Obj.o_Target.parentElement;
   	Obj.o_ReserverSpace=document.getElementById("o_ReserveSpace");
	 /*var andcommande="HighLight('"+o_Target.id+"',false)";
	 b_HighLight=false;
		andcommande="HighLight('"+o_Target.id+"')";
   setTimeout(andcommande,300);*/
	//alert(o_SetFlagTarget.innerHTML);

	Obj.o_TargetClonedNode=Obj.o_Target.cloneNode(true);
	Obj.o_TargetClonedNode.id="o_TargetReserveSpace";
 	o_MainContener.insertBefore(Obj.o_TargetClonedNode,Obj.o_Target);
	o_MainContener.insertBefore(Obj.o_Target,Obj.o_ReserverSpace);
	with(Obj.o_Target.style){
			top=Obj.getTopPos(Obj.o_ReserverSpace)-Obj.n_MainContenerTop;
			left=Obj.getLeftPos(Obj.o_ReserverSpace)-Obj.n_MainContenerLeft;
	}
		
	Obj.o_ParentContener.removeChild(Obj.o_ReserverSpace);
	o_MainContener.replaceChild(Obj.o_SetFlagTarget,Obj.o_TargetClonedNode);
	//o_CloneSetFlagTarget = o_SetFlagTarget.cloneNode(true);
	//o_MainContener.insertBefore(o_CloneSetFlagTarget,o_TargetClonedNode);
	/*with(o_CloneSetFlagTarget.style){
			top=getTopPos(o_SetFlagTarget)-n_MainContenerTop;
			left=getLeftPos(o_SetFlagTarget)-n_MainContenerLeft;
	}
	// pour dupliquer les OBJECT EMBED
	o_MainContener.removeChild(o_SetFlagTarget);
	o_MainContener.removeChild(o_TargetClonedNode);*/
	var removecommande=this.DocObjID+".ResetNumCollections("+this.DocObjID+")";
	setTimeout(removecommande,10);
	Obj.o_CloneDivCollection.length=0;
	Obj.o_CurrentDragTarget=null;
	Obj.Activate(Obj);
	return false;
};// Fin RemoveDuplicatedObject

this.ResetNumCollections=function(Obj){
	//var Obj=eval(this.DocObjID);
	var Obj=eval(Obj);
	var o_MainContener=document.getElementById(Obj.Contener);
	//alert(o_MainContener.id);
	Obj.a_NumObjectsCollection.length=0;
	Obj.NumObjectsCollectionS.length=0;
	var n_MaxH=0;
	Obj.n_MainContenerLeft=Obj.getLeftPos(o_MainContener)*1;
 	Obj.n_MainContenerTop=Obj.getTopPos(o_MainContener)*1;
	Obj.n_MainContenerWidth=parseInt(o_MainContener.offsetWidth);
	var SumW=0;
  	var elparent=o_MainContener;
	var el=o_MainContener.getElementsByTagName('*');
		//var el=document.getElementsByTagName('*');
		//var el=o_MainContener.childNodes;
	//alert("ResetNumCollections" + el.length);
	for(i=0;i<el.length;i++){
			if(el[i].className==Obj.classNames){
			//alert("ResetNumCollections" + el[i].id);
			Obj.StartPos.push(el[i].offsetLeft);
            Obj.numObjects++;
          //MISE EN MEMOIRE DU NOMBRE D'OBJET ET DE LEUR POSITIONS
            Obj.a_NumObjectsCollection.push(el[i].id);
			Obj.NumObjectsCollectionS.push(el[i]);
			}
	}

    for(j=0;j<Obj.NumObjectsCollectionS.length;j++){
        W=parseInt(Obj.NumObjectsCollectionS[j].offsetWidth);
        H=parseInt(Obj.NumObjectsCollectionS[j].offsetHeight);
		SumW+=W;
            if(SumW <= Obj.n_MainContenerWidth){
                    X=(j>0)?(Obj.getLeftPos(Obj.NumObjectsCollectionS[(j-1)])+Obj.NumObjectsCollectionS[(j-1)].offsetWidth):Obj.n_MainContenerLeft;
                    Y=(j>0)?(Obj.getTopPos(Obj.NumObjectsCollectionS[(j-1)])):Obj.n_MainContenerTop;
					//X=getLeftPos(NumObjectsCollectionS[(j-1)])+NumObjectsCollectionS[(j-1)].offsetWidth;
                    //Y=getTopPos(NumObjectsCollectionS[(j-1)]);
    
             }else{
                    // RETOUR  A LA LIGNE
                    // NOMBRE DE HEIGHT
                    X=Obj.n_MainContenerLeft;
                    //Y=(j>0)?(getTopPos(NumObjectsCollectionS[j-1])+NumObjectsCollectionS[(j-1)].offsetHeight):n_MainContenerTop;
                    Y=(j>0)?(Obj.getTopPos(Obj.NumObjectsCollectionS[j-1])+ n_MaxH):Obj.n_MainContenerTop;
                    // NOMBRE DE HEIGHT
                    SumW=Obj.NumObjectsCollectionS[j].offsetWidth;
					n_MaxH=H;
            } 
        n_MaxH=(j>0)?((H > n_MaxH)?H:n_MaxH):H;
        with(Obj.NumObjectsCollectionS[j].style){
               left=X-Obj.n_MainContenerLeft;
               top=Y-Obj.n_MainContenerTop;
         }
          
    }

};// Fin ResetNumCollections


this.distanceTo=function(x,y,Obj){
	//alert(x +" ; "+ y+" ;"+" ; " + Obj.id);
	//var Obj=eval(this.DocObjID);
	var Obj=Obj;
	//var distx=x-parseInt(Obj.o_CurrentDragTarget.offsetLeft); /* l'écart horizontal */
	//var disty=y-parseInt(Obj.o_CurrentDragTarget.offsetTop); /* l'écart vertical */
	
	var distx=x-parseInt(Obj.o_CurrentDragTarget.offsetLeft); /* l'écart horizontal */
	var disty=y-parseInt(Obj.o_CurrentDragTarget.offsetTop); /* l'écart vertical */

	var distance=Math.sqrt((distx*distx)+(disty*disty)); /* l'hypothénuse */
	//var distance= Math.atan2(disty, distx);
	//alert(distance);
	return distance; /* on retourne le résultat */
}

	Array.prototype.sortNumeric = function () {
		this.sort(function (a,b) { return a-b; });
	}




	Array.prototype.sort2d = function (index) {
	var f = function (a, b) { return ((a[index]<b[index])? -1:1); }
	this.sort(f);
	return this;
	}


this.getTopPos=function(inputObj){		
	   //alert(inputObj.tagName);
		  var returnValue = inputObj.offsetTop;
		  while((inputObj = inputObj.offsetParent) != null){
			if(inputObj.tagName!= "HTML" || inputObj.tagName!= "BODY")returnValue += inputObj.offsetTop;
		  }
		  return returnValue;
};// Fin getTopPos
	
this.getLeftPos=function(inputObj){
		  var returnValue = inputObj.offsetLeft;
		  while((inputObj = inputObj.offsetParent) != null){
			if(inputObj.tagName!= "HTML" || inputObj.tagName!= "BODY")returnValue += inputObj.offsetLeft;
		  }
		  return returnValue;
};// Fin getLeftPos


};// Fin DAZ_class_GetDraggableObjectClassName
var referer;
// DEBUT DE LA CLASSE
function ooDAZ_class_SearchEngine(target,ObjectID,Linkid,imga,imgb,dhtml,ficorbdd,categorie,Hlimit,repracine,Thumbs,TypeUser,blackorwhite){
	// PROPRIETES MEMBRES
	this.el;
	this.j= 0;
	this.h=10;
	this.FichierPaddingLeft=15;
	this.Roll_Height_PixelLimit=Hlimit;
	this.RepRacine="../";
	this.vignettes=Thumbs;
	this.tag;
	this.sens=true;
	this.CurrentNodeToRoll;
	this.imga=imga;
	this.imgb=imgb;
	this.newsource;
	this.expt;
	this.src;
	this.TdbParents;
	this.D=document;
	this.Dhtml=dhtml;
	this.searchtarget=ficorbdd;
	this.categorie=categorie;
	this.DescriptionOver=false;
	this.Target=target;
	this.DocObjectID=ObjectID;
	this.LinkID=Linkid;
    this.TypeUser=TypeUser;
	this.blackorwhite=blackorwhite;
	
	this.divdescription;
	this.tosend;
	this.firefox=(navigator.userAgent.indexOf('Gecko') !=-1)? true:false;
	// IMPORTANT
	this.onoff=false;
	this.toframe;
	this.Menu;
	this.CategorieCombo1;
  	this.CategorieCombo2;
	this.SearchField;
	this.Valid;
  	this.ArrayCategorieCombo2=new Array();
	this.Timeout;
	this.TimeoutPlace;
	this.Flag;
	this.FlagParent;
	this.Sens;
	this.ChildIndex=1;

	this.ns67=(document.getElementById && !document.all)? true:false ;
	this.dom = (document.getElementById && document.all)? true:false;
	this.ns4 = (document.layers)? true:false;
	this.ie4 = (document.all && !document.layers && !document.getElementById )? true:false;
	this.radiolength=1;
	this.acts;
	this.thetimeout;
	this.thevaleur;
	this.theelementsNum;

	this.MaskIframea='DivShim1'+ObjectID;
	this.MaskIframeb='DivShim2'+ObjectID;
	this.MaskIframec='DivShim3'+ObjectID;
	this.MaskIframed='DivShim4'+ObjectID;
	this.SearchButton='go'+ObjectID;
	this.FormID='SrcEngineFrm'+ObjectID;
    this.Recherches='recherches'+ObjectID;
  	this.PaginationBtn='SrcEngineFrm'+ObjectID+'page';
	this.PaginationUp='thepaginationup'+ObjectID;
	this.PaginationDown='thepaginationdown'+ObjectID;
	this.ComboId0='LinkDiv'+ObjectID;
	this.ComboId1='Mselect1'+ObjectID;
    this.ComboId1a='SubMselect1'+ObjectID;
    this.ComboId2='Mselect2'+ObjectID;
    this.ComboId2a='SubMselect2'+ObjectID;
	this.ComboId3='Mselect3'+ObjectID;
    this.ComboId3a='SubMselect3'+ObjectID;
	this.ComboId4='Mselect4'+ObjectID;
    this.ComboId4a='SubMselect4'+ObjectID;
	this.SearchFieldId='SearchField'+ObjectID;
  this.SubmitRereferer=0;
	this.ValidId='Valid'+ObjectID;
	this.SelectID1='Categorie'+ObjectID+'[]';
  	this.SelectID2='SousCategorie'+ObjectID+'[]';
	this.Accept=false;
	this.IFrameObj; // our IFrame object
	
	// METHODE  MEMORISE LES IMAGES CHARGEES pour IE ####################
	this.LoadImages=function(){
		var d=this.D;
		var Obj=eval(this.DocObjectID);
		if(d.images){
   			if(!Obj.D.tab) Obj.D.tab=new Array();
    		var i;
			var j=Obj.D.tab.length;
			var a= Obj.LoadImages.arguments;
			for(i=0; i<a.length; i++){
				//alert("dans le for");
    			if (a[i].indexOf("#")!=0){
	 				Obj.D.tab[j]=new Image();
				 	Obj.D.tab[j++].src=a[i];
				 	
	 			}
			
	 		}
		}
	
	};// FIN LoadImages
	
	this.Init=function(){
			this.helpbubble=new DAZ_class_HelpBubble('helpbubble','helpbubbleDoc');
			this.helpbubble.Init();
			this.helpbubble.DrawBubble();
	
	};
	// METHODE  PRE ENROULE OU DEROULE LE NOEUD ####################
	this.ShowHide=function(e,obj){
    	//alert(obj);
		//alert(e + "obj :" + obj);
		if(e.stopPropagation && e.preventDefault){
			//alert("firefox");
			e.stopPropagation();
			//e.preventDefault();
		}else if(window.event){
			//alert("IE");
			window.event.cancelBubble = true;
			//window.event.returnValue = false;
		}
		//alert(this.h);
		this.h=10;
		//alert(this.h);
		el=document.getElementById(obj);
		var lastTop=0;
		var lastHeight=0;
		//alert(el.id);
				while(el){
				//alert("while :" + el.id);
					//tags=el.childNodes[j].getElementsByTagName("DIV");
					//class=el.childNodes[j].className;
					if(false !== el.id){
						if(el.nodeName.toUpperCase()=='DIV' && el.className=='dossier'){
							//alert(el.id + " /" + el.nodeName + " /" + el.className  + " / " + el.offsetHeight);
							//el.style.height=20;
							for(var k=2;k<el.childNodes.length;k++){
								if(!el.childNodes[k].tagName && el.childNodes[k].nodeType==3 && el.childNodes[k].length<=4){
								// NOEUD VIDE
									//alert("noeud vide" +"parent :" + el.childNodes[k].parentNode.id +" / type du noeud en cours :"+el.childNodes[k].nodeName +" valeur du noeud :" + el.childNodes[k].nodeValue);
									//el.childNodes[k].parentNode.removeChild(el.childNodes[k]);
								}else{
									// récupération de la hauteur du div imbriqué
                                   //alert(el.childNodes[k].childNodes[0].childNodes[0].id);
									Height=(this.firefox)?((el.childNodes[k].className=='fichierinline')?(el.childNodes[k].childNodes[0].childNodes[0].offsetHeight):el.childNodes[k].offsetHeight):el.childNodes[k].offsetHeight;
									Top=(this.firefox)?el.childNodes[k].offsetTop:el.childNodes[k].offsetTop;
									this.h=(Top != lastTop)?(this.h+Height):(Height > lastHeight)?(this.h+Height):this.h+0;
									lastHeight=(Height > lastHeight)?Height:lastHeight;
 									lastTop=Top;
								}
								
							}// fin for
						}else{
						
						}
						el=el.childNodes[this.j];
					}
					this.j++;
				}
				this.h=this.h+10;
				//alert("h :" + this.h);
				this.CurrentNodeToRoll=obj;
				// MODIFICATION DE L'IMAGE
				this.AlternateImg(obj,'on');
				fObj = document.getElementById(this.CurrentNodeToRoll);
				oObj=fObj.parentNode;
				// TABLEAU DES PARENTS
				this.TdbParents= Array();
				// RECUPERATION DE LA HAUTEUR DE CHAQUE PARENT
				while (oObj  && oObj.tagName  != 'BODY') {
					//alert("parent id :"  + oObj.id + "/ offsetheight :"  + oObj.offsetHeight);
								this.TdbParents.push(oObj);
								oObj = oObj.parentNode;
				}
		// VERIFICATION DES PARENTS
		/*for(var k=0;k<this.TdbParents.length;k++){
			//alert("id :" +this.TdbParents[k] + " / " + "height : " + this.TdbParents[k].offsetHeight);
		}*/
		// FERMETURE DES FRERES
		this.CloseBrother();
		// DEROULEMENT DES NOEUDS
		this.RollsIt();
	}; // FIN ShowHide

this.CloseBrother=function(){
	// FERMETURE DES FRERES
		fObj = document.getElementById(this.CurrentNodeToRoll);
		for(var l=0;l<fObj.parentNode.childNodes.length;l++){
			el=fObj.parentNode.childNodes[l];
			if(el.nodeName.toUpperCase()=='DIV' && el.className=='dossier' && el.id!=this.CurrentNodeToRoll){
				el.style.height=16;
				this.AlternateImg(el.id,'off');
			}
		}
}; // FIN CloseBrother

	// MODIFIE L'IMAGE DU A HREF ####################
	this.AlternateImg=function(obj,OnOff){
		if(OnOff=='off'){
			document.getElementById(obj).childNodes[0].childNodes[0].src=this.imga;
		}else{
			exp=new RegExp(this.imgb,"g");
			this.src=document.getElementById(obj).childNodes[0].childNodes[0].src;
			this.newsource=(exp.test(this.src))?this.imga:this.imgb;
			this.sens=(document.getElementById(obj).offsetHeight>16)?false:true;
			document.getElementById(obj).childNodes[0].childNodes[0].src=this.newsource;
		}
	};

	// METHODE ENROULE OU DEROULE LE NOEUD ####################
	this.RollsIt=function(){
		this.hauteur=document.getElementById(this.CurrentNodeToRoll).offsetHeight;
		if(this.sens){
			if(this.h< this.Roll_Height_PixelLimit){
					if(this.hauteur<(this.h+10)){
						fObj = document.getElementById(this.CurrentNodeToRoll);
						fObj .style.height=this.hauteur+10;
						for(var k=0;k<this.TdbParents.length;k++){
							currenTdbParentsstHeight=this.TdbParents[k].offsetHeight;
							if(!(currenTdbParentsstHeight>=this.TdbParents[k].offsetHeight+this.h)){
								//this.TdbParents[k].style.height=this.TdbParents[k].offsetHeight+10;
								this.TdbParents[k].style.height='auto';
							}
						}
						this.Timeout=setTimeout(this.DocObjectID +".RollsIt()",10);
					}else{
						clearTimeout(this.Timeout);
					}
					
			}else{
					fObj = document.getElementById(this.CurrentNodeToRoll);
					fObj.style.height=this.hauteur+this.h;
					for(var k=0;k<this.TdbParents.length;k++){
							currenTdbParentsstHeight=this.TdbParents[k].offsetHeight;
							if(!(currenTdbParentsstHeight>=this.TdbParents[k].offsetHeight+this.h)){
								this.TdbParents[k].style.height=this.TdbParents[k].offsetHeight+this.h;
								this.TdbParents[k].style.height='auto';

							}
						}
			}
		}else{
			if(this.hauteur< this.Roll_Height_PixelLimit){
					if(this.hauteur>16){
						fObj = document.getElementById(this.CurrentNodeToRoll);
						fObj.style.height=this.hauteur-10;
						for(var k=0;k<this.TdbParents.length;k++){
							currenTdbParentsstHeight=this.TdbParents[k].offsetHeight;
							if(!(currenTdbParentsstHeight>=this.TdbParents[k].offsetHeight+this.h)){
								//this.TdbParents[k].style.height=this.TdbParents[k].offsetHeight-10;
								this.TdbParents[k].style.height='auto';
								
							}
						}
						this.Timeout=setTimeout(this.DocObjectID +".RollsIt()",10);
					}else{
						fObj.style.height=16;
						clearTimeout(this.Timeout);
					}
					
				}else{
					fObj = document.getElementById(this.CurrentNodeToRoll);
					fObj.style.height=16;
					for(var k=0;k<this.TdbParents.length;k++){
							//this.TdbParents[k].style.height=this.TdbParents[k].offsetHeight-this.hauteur;
							this.TdbParents[k].style.height='auto';
						}
				}
		}// End IF
	
	}; // FIN RollsIt

this.ShowMenu=function(e,display,vars,ficname){
		if(e && e.stopPropagation && e.preventDefault){
				Mouse_X = e.pageX+ window.scrollX+10;
				Mouse_Y = e.pageY+ window.scrollX+10;
				document.getElementById('description').style.left=Mouse_X;
				document.getElementById('description').style.top=Mouse_Y;
				e.stopPropagation();
				e.preventDefault();
				Linkparam="download_final.php?fileid="+escape(vars)+"&filename="+escape(ficname);
                Mailer="Sendmail_Server_limite.php?fileid="+escape(vars)+"&filename="+escape(ficname);
                Mailer2="Sendmail_Client_admin.php";
				document.getElementById('description').style.display=display;
				document.getElementById('description').innerHTML="<a href='javascript:void(0);' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true; onclick=popdownload(Linkparam,'lien');return false;>Visualiser / Télécharger</a>";
				document.getElementById('description').innerHTML+="<br><a href='javascript:void(0);' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true; onclick=popupandmailto(Mailer,'lien',700,700);return false;>Envoyer par mail</a>";
                document.getElementById('description').innerHTML+=(this.TypeUser=='admin')?"<br><a href='javascript:void(0);' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true; onclick=popupandmailto(Mailer2,'lien',700,700);return false;>Envoyer fichiers par mail</a>":"";
                //document.getElementById('description').innerHTML+="<br><a href='mailto:webdaz@free.fr?subject=test&body=see attachment&joint=\"C:\V_HOSTS\wikidoc\dl\EMPLOI\LOIS\TRAVAILLER AVANT 18_ANS.pdf\"' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true;>Envoyer par outlook</a>";

	
			}else if(window.event){
				//alert("IE " + event.srcElement.parentNode);
				//Mouse_X =parseInt( window.event.clientX)+10;
				//Mouse_Y =parseInt(window.event.clientY)+10;
				Mouse_X = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft + 10;
				Mouse_Y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop + 10 ;
				document.getElementById('description').style.left=Mouse_X;
				document.getElementById('description').style.top=Mouse_Y;
				window.event.cancelBubble = true;
				window.event.returnValue = false;
				Linkparam="download_final.php?fileid="+escape(vars)+"&filename="+escape(ficname);
                Mailer="Sendmail_Server_limite.php?fileid="+escape(vars)+"&filename="+escape(ficname);
                Mailer2="Sendmail_Client_admin.php";

				document.getElementById('description').innerHTML="<a href='javascript:void(0);' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true; onclick=popdownload(Linkparam,'lien');return false;>Visualiser / Télécharger</a>";
				document.getElementById('description').innerHTML+="<br><a href='javascript:void(0);' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true; onclick=popupandmailto(Mailer,'lien',700,700);return false;>Envoyer par mail</a>";
                document.getElementById('description').innerHTML+=(this.TypeUser=='admin')?"<br><a href='javascript:void(0);' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true; onclick=popupandmailto(Mailer2,'lien',700,700);return false;>Envoyer fichiers par mail</a>":"";
                //document.getElementById('description').innerHTML+="<br><a href='javascript:void(0);' class='cat' onmouseover="+this.DocObjectID+".DescriptionOver=true; onclick='mailto:webdaz@free.fr?subject=test&body=see attachment&attachment=\"C:/V_HOSTS/wikidoc/dl/EMPLOI/LOIS/TRAVAILLER AVANT 18_ANS.pdf\"'>Envoyer par outlook</a>";

				document.getElementById('description').style.display=display;
				el=document.getElementById('description');
				elWidth=el.offsetWidth;
				for(var j=0;j<el.getElementsByTagName("A").length;j++){
					TagType=el.getElementsByTagName("A")[j].tagName;
					if(j>0){
						// ICI insertion du hr
						hr = document.createElement("HR");
						hr.style.width=elWidth;
						el.insertBefore(hr, el.getElementsByTagName("A")[j]);
					}
				}
			}

	}; // FIN ShowMenu


this.ShowDescription=function(e,obj,display,type){
				if(type!='fic'){
				fObj = document.getElementById(obj);
				oObj=fObj.parentNode;
			// TABLEAU DES PARENTS
				this.TdbParents= Array();
				// RECUPERATION DE LA HAUTEUR DE CHAQUE PARENT
				while (oObj  && oObj.tagName  != 'BODY') {
					//alert("parent id :"  + oObj.id + "/ offsetheight :"  + oObj.offsetHeight);
								this.TdbParents.push(oObj);
								oObj = oObj.parentNode;
				}
				
				fObj.style.display=display;
				//fObj.style.width=fObj.childNodes[0].offsetWidth;

				for(var k=0;k<this.TdbParents.length;k++){
							currenTdbParentsstHeight=this.TdbParents[k].offsetHeight;
							this.TdbParents[k].style.height='auto';
				}
				}
				//alert(display);
				if(display=='none' ){
					//setTimeout(this.DocObjectID +".HideContextMenu()",2000);
				}
	}; // FIN ShowDescription
	
this.MenuOut=function(){
		setTimeout(this.DocObjectID +".HideContextMenu()",1000);
};// FIN MenuOut
	
this.HideContextMenu=function(){
		
			if(this.DescriptionOver==false){
				//alert("off");
				//alert("yes : " + document.getElementById('description').style.display + " descriptionover : " + this.DescriptionOver);
				document.getElementById('description').style.display='none';
			}else{
				//alert("on");
				document.getElementById('description').style.display='block';
			}
}; // FIN HideContextMenu
	
this.OpenForm=function(){
		//form="<FORM name='"+this.FormID+"'  id='"+this.FormID+"'   onsubmit='return "+this.DocObjectID+".checkIT(this.name)' enctype='multipart/form-data' style='margin:0;'>";
		form="<FORM name='"+this.FormID+"'  id='"+this.FormID+"'   enctype='multipart/form-data' style='margin:0;'>";
		document.write(form);
}; // FIn OpenForm

this.CloseForm=function(){
		form="</FORM>";
		//form+="<div id='description' style='padding:5;display:none;height:auto;position:absolute;top:0;left:0;background-color:#f3f3f3;width:auto;border:1px solid #FA6B32;overflow:hidden;' onmouseover="+this.DocObjectID+".DescriptionOver=true; onmouseout="+this.DocObjectID+".DescriptionOver=false;"+this.DocObjectID+".MenuOut();></div>";
		document.write(form);
};// FIn CloseForm


// GENERE LES BOUTONS RADIO
this.DrawInputRadio=function(){
	this.RadioButton="<input type='radio' name='sur' value='fic'><input type='radio' name='sur' value='fichiers' checked><input type='hidden' name='run' size='8' value='1'>";
	document.write(this.RadioButton);

};

// GENERE LE CHAMP DE RECHERCHE
this.DrawSearchInput=function(){
		

				this.Valid+="<div>";
                this.valid+="<div>";
				this.SearchInput="<table cellpadding=0 cellspacing=0 border=0 width='100%'><tr><td>"+ this.LinkDiv+this.CategorieCombo1+this.CategorieCombo2+this.SearchField+"</td></tr><tr><td>&nbsp;&nbsp;<input type='hidden' value='0' name='limit'><input type='hidden' name='actss' value=''><input type='hidden' name='objid' value='"+this.DocObjectID+"'><input type='hidden' name='frmid' value='"+this.FormID+"'><input type='hidden' name='bdd' value='"+this.searchtarget+"'><input type='hidden' name='vignettes' value='"+this.vignettes+"'>&nbsp;&nbsp;"+this.Valid+"</td></tr></table>";
				/*this.SearchInput+=this.CategorieCombo1;
				this.SearchInput+=this.CategorieCombo2;
				this.SearchInput+=this.SearchField;*/
 				SearchField="<input type='text' id='"+this.SearchFieldId+"' name='"+this.SearchFieldId+"' size='15' valign='middle' style='padding:0;margin:0;background:#F0F0F0;border:0px solid #999999;color:#f7901f;font-size:0.9em;font-weight:normal;' value='Rechercher...' onfocus=this.value=''><input type='hidden' value='0' name='limit'><input type='hidden' id='actss' name='actss' value='s'><input type='hidden' name='objid' value='"+this.DocObjectID+"'><input type='hidden' name='frmid' value='"+this.FormID+"'><input type='hidden' name='bdd' value='"+this.searchtarget+"'><input type='hidden' name='vignettes' value='"+this.vignettes+"'>";
				document.write(SearchField);

}; // FIN DrawSearchInput
	
// GENERE LE BOUTON SUBMIT
this.DrawSubmitButton=function(){
		//SubmitButton="<input type='hidden' id='"+this.PaginationBtn+"' name='"+this.PaginationBtn+"' value='dep'><input type='submit' align='absbottom' style='background:url(image/RECHERCHE_0_1.png) 0 0;width:35;height:32;border:0px;' id='"+this.SearchButton+"' name='"+this.SearchButton+"'  value=''  onclick="+this.DocObjectID+".dosetacts('s',0);>";
		//SubmitButton="<input type='hidden' id='"+this.PaginationBtn+"' name='"+this.PaginationBtn+"' value='dep'><input type='submit' align='absbottom' style='background:url(image/RECHERCHE_0_1.png) 0 0;width:35;height:32;border:0px;' id='"+this.SearchButton+"' name='"+this.SearchButton+"'  value='' onclick="+this.DocObjectID+".dosetacts('s',0);>";
		SubmitButton="<input type='hidden' id='"+this.PaginationBtn+"' name='"+this.PaginationBtn+"' value='dep'><input type='hidden' name='categorie' value='"+this.categorie+"'><input type='hidden' name='stylecolor' value='"+this.blackorwhite+"'><input type='button' align='absbottom' id='"+this.SearchButton+"' name='"+this.SearchButton+"' value='' style='background:url(image/RECHERCHER_out.png) no-repeat;width:18px;height:21px;border:0px;vertical-align:middle;'  onclick="+this.DocObjectID+".dosetacts('s',0);"+this.DocObjectID+".checkIT('"+this.FormID+"')  onmouseover=this.style.background='url(image/RECHERCHER_over.png)' onmouseout=this.style.background='url(image/RECHERCHER_out.png)'>";
		document.write(SubmitButton);
}; // FIN DrawSubmitButton

	
	
this.DrawMenu=function(){
		//alert(this.Menu);
// SYSTEM DE FICHIER
		this.Menu="";
		this.Menu+="<div class='conteneri'>";
		this.Menu+="<div id='" + this.PaginationUp + "'></div>";
		this.Menu+="<div id='"+this.Target+"'  style='position:relative;vertical-align:top;overflow:hidden;'></div>";
		this.Menu+="<div id='"+this.PaginationDown+"'></div>";
		this.Menu+="<div id='" + this.Recherches + "'></div>";

		this.Menu+="</div>";// FIN div conteneur
		document.write(this.Menu);
}; //FIN DrawMenu



this.getTop=function(inputObj){
			
   //alert("get top "  +inputObj.tagName);
	  var returnValue = inputObj.offsetTop;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetTop;
	  }
	  return returnValue;
}; // FIN getTop
	
this.getLeft=function(inputObj){
	
	  var returnValue = inputObj.offsetLeft;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetLeft;
	  }
	  return returnValue;
}; // FIN getLeft

this.buildQueryStringUrl=function(theFormName) {
		//alert("buildQueryString" +theFormName );
		theForm = document.getElementById(theFormName);
		var qs = '';
		var valuetosend='';
		this.theelementsNum=0;
		for (e=this.theelementsNum;e<theForm.elements.length;e++) {
			//alert (theForm.elements[e].name + " = " + theForm.elements[e].value);
			if (theForm.elements[e].name!='' && theForm.elements[e].name!='d' && theForm.elements[e].name!='actsr') {
				qs+=(qs=='')?'?':'&';
			var thetype = theForm.elements[e].name;
			if(thetype=='bdd'){
					//if(theForm.elements[e].checked==true){
					valuetosend=theForm.elements[e].value;
					switch(theForm.elements[e].value){
					
						case 'fic':
							page='moteur_FIC_cms_1.php';
						break;
					
						case 'bdd':
							page='moteur_BDD_cms_1.php';
						break;
					
						case 'actus':
							page='moteur_ACTUS_cms_1.php';
						break;
					}
						//page=(valuetosend=='fichiers')?'moteur_FIC_cms.php':'moteur_BDD_cms.php';
						//alert(theForm.elements[e].name + " = " + theForm.elements[e].value);
					//}
					//page=(theForm.elements[e].value=='fic')?'moteur_FIC_cms.php':'moteur_BDD_cms_1.php';

			}else{
				valuetosend=theForm.elements[e].value;
			}
			
			qs+=theForm.elements[e].name+'='+escape(valuetosend);
			
				}
			}
		
		// DETECTION IPHONE
		if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.indexOf('Gecko') !=-1))  page="iphone_"+page;
		//alert(page);
		url=page+qs;
		//alert("qs :" + qs)
		return url;
	}; //FIN buildQueryString
	
	
this.checkIT=function(theform){
		/*if(this.valide(document.forms[theform])){
			// AFFICHAGE DU LOADER
			anchor=document.getElementById(this.PaginationUp);
			anchor2=document.getElementById(this.PaginationDown);
			loaderHeight=Math.abs(this.getTop(anchor)+this.getTop(anchor2));
			document.getElementById('loader').style.left=this.getLeft(anchor);
			document.getElementById('loader').style.top=this.getTop(anchor);
			document.getElementById('loader').style.width=anchor.offsetWidth;
			document.getElementById('loader').style.height=loaderHeight;
			document.getElementById('loader').style.display='block';*/
			return this.callToServer(theform);
		/*}else{
			//document.SrcEngineFrm.submit=false;
			return false;
		}*/
}; //FIN checkIT

this.Load=function(){
		/*if(this.valide(document.forms[theform])){
			// AFFICHAGE DU LOADER
			anchor=document.getElementById(this.PaginationUp);
			anchor2=document.getElementById(this.PaginationDown);
			loaderHeight=Math.abs(this.getTop(anchor)+this.getTop(anchor2));
			document.getElementById('loader').style.left=this.getLeft(anchor);
			document.getElementById('loader').style.top=this.getTop(anchor);
			document.getElementById('loader').style.width=anchor.offsetWidth;
			document.getElementById('loader').style.height=loaderHeight;
			document.getElementById('loader').style.display='block';*/
			this.dosetacts('s',0);
			document.getElementById(this.SearchFieldId).value="";
			this.checkIT(this.FormID);
		/*}else{
			//document.SrcEngineFrm.submit=false;
			return false;
		}*/
}; //FIN checkIT


	
	//var IFrameObj; // our IFrame object
this.callToServer=function(theFormName) {
		//alert("callToServer");
		if (!document.createElement) {return true};
		var IFrameDoc;
		//var URL = 'moteur_de_recherche_interne_cms.php' + this.buildQueryStringUrl(theFormName);
		var URL =this.buildQueryStringUrl(theFormName);

	if (!this.IFrameObj && document.createElement) {
			// create the IFrame and assign a reference to the
			// object to our global variable IFrameObj. 
			// this will only happen the first time 
			// callToServer() is called
			try {
				var tempIFrame=document.createElement('iframe');
				tempIFrame.setAttribute('id','RSIFrame');
				tempIFrame.style.border='0px';
				tempIFrame.style.width='0px';
				tempIFrame.style.height='0px';
				this.IFrameObj = document.body.appendChild(tempIFrame);
				
				if (document.frames) {
					// this is for IE5 Mac, because it will only
					// allow access to the document object
					// of the IFrame if we access it through
					// the document.frames array
					this.IFrameObj = document.frames['RSIFrame'];
				}
			} catch(exception) {
				// This is for IE5 PC, which does not allow dynamic creation
				// and manipulation of an iframe object. Instead, we'll fake
				// it up by creating our own objects.
				iframeHTML='<iframe id="RSIFrame" style="';
				iframeHTML+='border:0px;';
				iframeHTML+='width:0px;';
				iframeHTML+='height:0px;';
				iframeHTML+='"><\/iframe>';
				document.body.innerHTML+=iframeHTML;
				this.IFrameObj = new Object();
				this.IFrameObj.document = new Object();
				this.IFrameObj.document.location = new Object();
				this.IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
				this.IFrameObj.document.location.replace = function(location) {
					this.iframe.src = location;
				}
			}
		}
		
		if (navigator.userAgent.indexOf('Gecko') !=-1 && !this.IFrameObj.contentDocument) {
			// we have to give NS6 a fraction of a second
			// to recognize the new IFrame
			setTimeout(this.DocObjectID +".callToServer('"+theFormName+"')",10);
			return false;
		}
		
		if (this.IFrameObj.contentDocument) {
			// For NS6
			IFrameDoc = this.IFrameObj.contentDocument; 
		} else if (this.IFrameObj.contentWindow) {
			// For IE5.5 and IE6
			IFrameDoc = this.IFrameObj.contentWindow.document;
		} else if (this.IFrameObj.document) {
			// For IE5
			IFrameDoc = this.IFrameObj.document;
		} else {
			return true;
		}
		//scrollbottomtop();
		IFrameDoc.location.replace(URL);
		//enabledfields(true);
		return false;
	
}; //FIN callToServer



this.valide=function(theformname){
		var ok;
		var champ='';
		var yes=0;
		myform = theformname;
		var acts =''; 
		
		for (var n = 0; n < myform.elements.length; n++)
		{
				var el = myform.elements[n];
        //alert( myform.elements[n].id);
			if((document.getElementById(this.SelectID1)!=null && document.getElementById(this.SelectID1).options.selectedIndex==0) )
			{
				champ=" Vous devez sélectionner une Rubrique pour la recherche !";
				alert(champ);
				ok=false;
				return ok;
				break;
			}else{
				ok=true;
			}

			if((document.getElementById(this.SelectID2)!=null && document.getElementById(this.SelectID2).options.selectedIndex==0) )
			{
				champ=" Vous devez sélectionner au moins 1 Sous-Rubrique pour la recherche !";
				alert(champ);
				ok=false;
				return ok;
				break;
			}else{
				ok=true;
			}
  	 
	}
  	//alert( "value :"  + document.getElementById(this.SearchFieldId).value);    
	if((document.getElementById(this.SearchFieldId)!=null && document.getElementById(this.SearchFieldId).value=="" && this.SubmitRereferer))
			{
			if(confirm("Le champ du(des) terme(s) recherché(s) est vide!\nLa requête retournera l'ensemble des fichiers de la ou des rubriques sélectionnées\n\nVoulez-vous continuer ?")){
				this.Accept=true;
				//document.getElementById(this.SearchButton).disabled=false;
        ok=true;
			}else{
				//document.getElementById(this.SearchButton).disabled=true;
				alert("Action annulée !");
				ok=false;
        //break;
				return ok;
      }
		}else{
			ok=true;
		}				
		this.disabledButton();
		this.onoff=false;
		this.dowritethepagination('clear');
		this.ResetSearch();
		/*this.move_to(this.ComboId0,this.onoff,this.ComboId1,false,this.MaskIframea);
		this.move_to(this.ComboId1,this.onoff,this.ComboId2,false,this.MaskIframeb);
		this.move_to(this.ComboId2,this.onoff,this.ComboId3,false,this.MaskIframec);
		this.move_to(this.ComboId3,this.onoff,this.ComboId4,false,this.MaskIframed);*/
		return ok;
}; //FIN valide
	
this.dosetacts=function(choix,thelementsnum){

		if(this.ns67){
			
			if(parseInt(thelementsnum)==1){
				thelementsnum=0;
			}
			if(parseInt(thelementsnum)==2){
				thelementsnum=1;
			}
		}
		theForm = document.getElementById(this.FormID);
		//alert(document.getElementById(this.FormID).actss.value);
    	champs=this.PaginationBtn;
		theForm.actss.value=choix;
		theForm.limit.value=0;
    	document.getElementById(this.PaginationBtn).value=1;
    	this.SubmitRereferer=1;
		this.theelementsNum=thelementsnum;
}; //FIN dosetacts
	
  
  	
this.disabledButton=function(){
		var maReg = new RegExp("^[a-z0-9._-]+@+[a-z0-9.-]{2,}[.]+[a-z]{2,3}$","gi");
		var okp=true;
		var email;
		if((document.getElementById(this.SelectID1)!=null && document.getElementById(this.SelectID1).options.selectedIndex==0) ){
			okp=false;
			if(okp){
				document.getElementById(this.SearchButton).disabled=true;
			}else{
				document.getElementById(this.SearchButton).disabled=false;
			}
			
			
		}else{
			okp=true;
					
			if(okp){
				document.getElementById(this.SearchButton).disabled=true;
			}else{
				document.getElementById(this.SearchButton).disabled=false;
			}
			
			/*if( document.getElementById('DivShim')!= null && document.getElementById('mselect')!=null){
				document.getElementById('DivShim').style.display='none';
				document.getElementById('mselect').style.display='none';
				document.getElementById('go').style.visibility='hidden';
			}*/
		}
		
};// FIN disabledButton 
	
	// ##############  DEBUT  FONCTIONS POUR LE REMOTE SCRIPTING ##########################
	
	this.dowritethepagination=function(thepagination){
	//alert(thepagination);
		if(thepagination!='m' && thepagination!='clear'){
			//document.getElementById(this.PaginationUp).innerHTML="";
			document.getElementById(this.PaginationDown).innerHTML="";
			
			//document.getElementById(this.PaginationUp).innerHTML=thepagination;
			document.getElementById(this.PaginationDown).innerHTML=thepagination;
			//document.getElementById('loader').style.display='none';
		}else{
			//document.getElementById(this.PaginationUp).innerHTML="";
			document.getElementById(this.PaginationDown).innerHTML="";
		}
	};// FIN dowritethepagination
	
	this.TraiteReponse=function(valeur,ouinon){
		document.getElementById(this.Target).innerHTML=valeur;
		/*document.getElementById('moteur').style.width='auto';
		document.getElementById('moteur').style.height='auto';
		document.getElementById('moteur').style.overflow='visible';*/
    	this.SubmitRereferer=0;
	};// FIN TraiteReponse

	this.dowriterecherche=function(recherches){
    	//alert(recherche);
			document.getElementById(this.Recherches).innerHTML="";
			document.getElementById(this.Recherches).innerHTML=recherches;
	};// FIN dowriterecherche

	this.ClearTarget=function(valeur,ouinon){
		document.getElementById(this.Target).innerHTML="";
	};

    this.AddNumResults=function(resultstring){
    	var j=0;
    	alert(resultstring);
        arrayresults=resultstring.split("|");
    	el=document.getElementById(this.Target);
        elDiv=el.getElementsByTagName('DIV');
        for(var i=0;i<elDiv.length;i++){
        	if(elDiv[i].tagName.toUpperCase()=='DIV' && (elDiv[i].className=='dossier' || elDiv[i].className=='dossierIphone')){
            	//alert(i +" : "+ elDiv[i].id);
            	elDiv[i].getElementsByTagName('A')[0].innerHTML+="&nbsp;-&nbsp;(&nbsp;" + arrayresults[j]+"&nbsp;)";
            	j++;
            }
        }
    };// Fin this.AddNumResults

this.AddNumResults2=function(){
    	var j=0;
		var l=0;
		var i=0;
    	el=document.getElementById(this.Target);
        elDiv=el.getElementsByTagName('DIV');
        for(i=0;i<elDiv.length;i++){
        	if(elDiv[i].tagName.toUpperCase()=='DIV' && (elDiv[i].className=='dossier' || elDiv[i].className=='dossierIphone')){
            	//alert(i +" : "+ elDiv[i].id);
				curentDiv=document.getElementById(elDiv[i].id);
				curentDivnewsearch=curentDiv.getElementsByTagName('DIV')
				//alert(curentDivnewsearch.length);
				for(var k=0;k<curentDivnewsearch.length;k++){
        			if(curentDivnewsearch[k].tagName.toUpperCase()=='DIV' && curentDivnewsearch[k].className=='fichier'){
            			//alert(l +" : "+ curentDivnewsearch[k].id);
            			l++;
            		}
        		}
            	//alert(i +" : "+ elDiv[i].id);
            	elDiv[i].getElementsByTagName('A')[0].innerHTML+="&nbsp;-&nbsp;(&nbsp;" + l+"&nbsp;)";
				l=0;
            	j++;
        	}
        }
    };// Fin this.AddNumResults
	
this.AddNumResultsIphone=function(){
    	var j=0;
		var l=0;
		var i=0;
    	el=document.getElementById(this.Target);
        elDiv=el.getElementsByTagName('DIV');
        for(i=0;i<elDiv.length;i++){
        	if(elDiv[i].tagName.toUpperCase()=='DIV' && (elDiv[i].className=='dossier' || elDiv[i].className=='dossierIphone')){
            	//alert(i +" : "+ elDiv[i].id);
				curentDiv=document.getElementById(elDiv[i].id);
				curentDivnewsearch=curentDiv.getElementsByTagName('DIV')
				//alert(curentDivnewsearch.length);
				for(var k=0;k<curentDivnewsearch.length;k++){
        			if(curentDivnewsearch[k].tagName.toUpperCase()=='DIV' && (curentDivnewsearch[k].className=='fichier' || curentDivnewsearch[k].className=='fichierIphone')){
            			//alert(l +" : "+ curentDivnewsearch[k].id);
            			l++;
            		}
        		}
            	//alert(i +" : "+ elDiv[i].id);
				// DIV PRECEDENT
                id=elDiv[i].id;
                newid=id.replace("part2","part1");
                //alert(id + "  /   " + newid);
				document.getElementById(newid).getElementsByTagName('A')[0].innerHTML+="&nbsp;-&nbsp;(&nbsp;" + l+"&nbsp;)";
            	//elDiv[i].getElementsByTagName('A')[0].innerHTML+="&nbsp;-&nbsp;(&nbsp;" + l+"&nbsp;)";
				l=0;
            	j++;
        	}
        }
    };// Fin this.AddNumResultsIphone

	this.popdownload=function(page, referertagname){
		//alert(page);
		referer=referertagname;
		var larg=250;
		var haut=100;
		var top = (screen.height-haut)/2;
		var left = (screen.width-larg)/2;
		var thepop=	window.open(page,'','status=no,menubar=nos,scrollbars=no,resizable=no,top='+top+',left='+left+',width='+larg+',height='+haut);
	}; // Fin this.popdownload
	
	this.Ahref=function(page, referertagname){
		//alert(page);
		referer=referertagname;
		var larg=screen.height;
		var haut=screen.width;
		var top =0;
		var left =0;
		var thepop=	window.open(page,'','status=yes,menubar=yes,scrollbars=yes,resizable=yes,top='+top+',left='+left+',width='+larg+',height='+haut);
		//var thepop=	window.open(page,'');
	}; // Fin Ahref
	

	this.ShowHelpBubble=function(valeur,target,eventtype,e,L,T){
		//alert(unescape(valeur));
		if(!e) e=event;
		this.helpbubble.ShowHelpBubble(valeur,target,eventtype,e,L,T);

	};

this.popprint=function(page,div,haut,larg){
	var top = 0;
	var left = 0;
	thetexttoprint="";
	//Nomentreprise="<b>"+numeroffre+"</b>";
	//numero="<title>BDD mlj66 ::::: Impression Fiche utilisateur : " + numeroffre+ "</title>";
	//numero=numeroffre;
	thetexttoprint=document.getElementById(div).innerHTML;
	//alert(thetexttoprint);
	//var cle = Array("..\/..\/image","http:\/\/www.mlj66bdd-entreprise.org\/image");
	//for(i=0;i<cle.length;i++) {
         //reg = new RegExp(cle[i],"ig")
         //thetexttoprint = thetexttoprint.replace(reg, "image");
      //}
	//thetexttoprint = thetexttoprint.replace(/..\/..\/image\/blanc.gif/g, "../image/blanc.gif");
	//thetexttoprint = thetexttoprint.replace(/http:\/\/www.ste-pyramide.com\/pyramide-emploi\/image/g, "../image");
	//alert(thetexttoprint);

	/*document.getElementById('lirelasuitefenetre').style.display='block';
	document.getElementById('lirelasuitefenetre').style.width=larg;
	document.getElementById('lirelasuitefenetre').style.height=haut;*/
	with(document.getElementById('lirelasuitefenetre').style){
		display='block';
		width=larg;
		top=parseInt(document.body.scrollTop)+20;
	}
	var thepop=	window.open(page,'lirelasuiteframe','status=yes,menubar=yes,scrollbars=yes,resizable=yes,top='+top+',left='+left+',width='+larg+',height='+haut);
}; // Fin this.popprint 

};// FIN DE LA CLASSE ooDAZ_class_DynamicMenu

 
// ###############  FIN  FONCTIONS POUR LE REMOTE SCRIPTING ##########################

function popupandmailto(page,referertagname,w,h){
	alert(page);
	referer=referertagname;
	var larg=w;
	var haut=h;
	var top = (screen.height-haut)/2;
	var left = (screen.width-larg)/2;
	
	var thepop=	window.open(page,'','status=no,menubar=nos,scrollbars=yes,resizable=no,top='+top+',left='+left+',width='+larg+',height='+haut);

}

function popdownload(page, referertagname){
	referer=referertagname;
	var larg=250;
	var haut=100;
	var top = (screen.height-haut)/2;
	var left = (screen.width-larg)/2;
	
	var thepop=	window.open(page,'','status=no,menubar=nos,scrollbars=no,resizable=no,top='+top+',left='+left+',width='+larg+',height='+haut);
}

function returnedmessage(message){
	document.getElementById('description').innerHTML=message;
	//return false;
}



function ooDAZ_class_Paragraphes_ToolBox(W,H,AHREFCLASS,target){
	this.W=W;
	this.H=H;
	this.AHREFCLASS=AHREFCLASS;
	this.target=target;
	this.Constructor=function(){
		var Box ="<div id='Paragraphes_ToolBox' style='padding:10px;position:relative;width:"+this.W+"px;"+this.H+"px;'>";
		Box+="<hr>";
		Box+="Taille des caractères";
		Box+="<br>&nbsp;<a href='javascript:void(0);' class='caracteresSmaller' onclick=Accessibility_Text_Size('-');>A</a> | <a href='javascript:void(0);' class='caracteresBigger' onclick=Accessibility_Text_Size('+');>A</a> &nbsp;";
		Box+="<hr>";
		Box+="Alignement du texte";
		Box+="<br><br>&nbsp;<a href='javascript:void(0);' class='"+this.AHREFCLASS+"' onclick=Accessibility_Text_Align('left');><img src='image/left-over.gif' border='0' title='Texte Aligné à gauche'></a>&nbsp;";
		Box+="&nbsp;<a href='javascript:void(0);' class='"+this.AHREFCLASS+"' onclick=Accessibility_Text_Align('center');><img src='image/center-over.gif' border='0' title='Texte Aligné au centre'></a>&nbsp;";
		Box+="&nbsp;<a href='javascript:void(0);' class='"+this.AHREFCLASS+"' onclick=Accessibility_Text_Align('justify');><img src='image/justify-over.gif' border='0' title='Texte justifié'></a>&nbsp;";
		Box+="&nbsp;<a href='javascript:void(0);' class='"+this.AHREFCLASS+"' onclick=Accessibility_Text_Align('right');><img src='image/right-over.gif' border='0' title='Texte Aligné à droite'></a>&nbsp;";
		Box+="<hr>";
		Box+="</div>";
		//temp=document.getElementById(this.target).innerHTML;
		document.getElementById(this.target).innerHTML=Box;
	};//FIN this.Constructor
	
}

var CROSSHAIRS_LOCATION = 'js/mappoint.gif';
var HUE_SLIDER_LOCATION = 'js/h.png';
var HUE_SLIDER_ARROWS_LOCATION = 'js/position.png';
var SAT_VAL_SQUARE_LOCATION = 'js/sv.png';
var b_move=false;

// Here are some boring utility functions. The real code comes later.

function hexToRgb(hex_string, default_)
{
    if (default_ == undefined)
    {
        default_ = null;
    }

    if (hex_string.substr(0, 1) == '#')
    {
        hex_string = hex_string.substr(1);
    }
    
    var r;
    var g;
    var b;
    if (hex_string.length == 3)
    {
        r = hex_string.substr(0, 1);
        r += r;
        g = hex_string.substr(1, 1);
        g += g;
        b = hex_string.substr(2, 1);
        b += b;
    }
    else if (hex_string.length == 6)
    {
        r = hex_string.substr(0, 2);
        g = hex_string.substr(2, 2);
        b = hex_string.substr(4, 2);
    }
    else
    {
        return default_;
    }
    
    r = parseInt(r, 16);
    g = parseInt(g, 16);
    b = parseInt(b, 16);
    if (isNaN(r) || isNaN(g) || isNaN(b))
    {
        return default_;
    }
    else
    {
        return {r: r / 255, g: g / 255, b: b / 255};
    }
}

function rgbToHex(r, g, b, includeHash)
{
    r = Math.round(r * 255);
    g = Math.round(g * 255);
    b = Math.round(b * 255);
    if (includeHash == undefined)
    {
        includeHash = true;
    }
    
    r = r.toString(16);
    if (r.length == 1)
    {
        r = '0' + r;
    }
    g = g.toString(16);
    if (g.length == 1)
    {
        g = '0' + g;
    }
    b = b.toString(16);
    if (b.length == 1)
    {
        b = '0' + b;
    }
    return ((includeHash ? '#' : '') + r + g + b).toUpperCase();
}

var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);

function fixPNG(myImage)
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
        var node = document.createElement('span');
        node.id = myImage.id;
        node.className = myImage.className;
        node.title = myImage.title;
        node.style.cssText = myImage.style.cssText;
        node.style.setAttribute('filter', "progid:DXImageTransform.Microsoft.AlphaImageLoader"
                                        + "(src=\'" + myImage.src + "\', sizingMethod='scale')");
        node.style.fontSize = '0';
        node.style.width = myImage.width.toString() + 'px';
        node.style.height = myImage.height.toString() + 'px';
        node.style.display = 'inline-block';
        return node;
    }
    else
    {
        return myImage.cloneNode(false);
    }
}

function trackDrag(node, handler)
{
//alert("trackdragnode");
		function fixCoords(x, y)
    {
        var nodePageCoords = pageCoords(node);
        x = (x - nodePageCoords.x) + document.documentElement.scrollLeft;
        y = (y - nodePageCoords.y) + document.documentElement.scrollTop;
        if (x < 0) x = 0;
        if (y < 0) y = 0;
        if (x > node.offsetWidth - 1) x = node.offsetWidth - 1;
        if (y > node.offsetHeight - 1) y = node.offsetHeight - 1;
        return {x: x, y: y};
    }
				
    function mouseDown(ev)
    {
					var coords = fixCoords(ev.clientX, ev.clientY);
					var lastX = coords.x;
					var lastY = coords.y;
					handler(coords.x, coords.y);
					function moveHandler(ev)
					{
								var coords = fixCoords(ev.clientX, ev.clientY);
								if (coords.x != lastX || coords.y != lastY)
								{
										lastX = coords.x;
										lastY = coords.y;
										handler(coords.x, coords.y);
								}
					}
					function upHandler(ev)
					{
							myRemoveEventListener(document, 'mouseup', upHandler);
							myRemoveEventListener(document, 'mousemove', moveHandler);
							myAddEventListener(node, 'mousedown', mouseDown);
					}
					myAddEventListener(document, 'mouseup', upHandler);
					myAddEventListener(document, 'mousemove', moveHandler);
					myRemoveEventListener(node, 'mousedown', mouseDown);
				 if (ev.preventDefault) ev.preventDefault();
			
    }
    myAddEventListener(node, 'mousedown', mouseDown);
    node.onmousedown = function(e) { return false; };
    node.onselectstart = function(e) { return false; };
    node.ondragstart = function(e) { return false; };
}

var eventListeners = [];

function findEventListener(node, event, handler)
{
    var i;
    for (i in eventListeners)
    {
        if (eventListeners[i].node == node && eventListeners[i].event == event
         && eventListeners[i].handler == handler)
        {
            return i;
        }
    }
    return null;
}
function myAddEventListener(node, event, handler)
{
	//handler=eval(handler);
    if (findEventListener(node, event, handler) != null)
    {
        return;
    }

    if (!node.addEventListener)
    {
        node.attachEvent('on' + event, handler);
    }
    else
    {
        node.addEventListener(event, handler, false);
    }

    eventListeners.push({node: node, event: event, handler: handler});
}

function removeEventListenerIndex(index)
{
    var eventListener = eventListeners[index];
    delete eventListeners[index];
    
    if (!eventListener.node.removeEventListener)
    {
        eventListener.node.detachEvent('on' + eventListener.event,
                                       eventListener.handler);
    }
    else
    {
        eventListener.node.removeEventListener(eventListener.event,
                                               eventListener.handler, false);
    }
}

function myRemoveEventListener(node, event, handler)
{
    removeEventListenerIndex(findEventListener(node, event, handler));
}

function cleanupEventListeners()
{
    var i;
    for (i = eventListeners.length; i > 0; i--)
    {
        if (eventListeners[i] != undefined)
        {
            removeEventListenerIndex(i);
        }
    }
}
myAddEventListener(window, 'unload', cleanupEventListeners);

// This copyright statement applies to the following two functions,
// which are taken from MochiKit.
//
// Copyright 2005 Bob Ippolito <bob@redivi.com>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject
// to the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

function hsvToRgb(hue, saturation, value)
{
    var red;
    var green;
    var blue;
    if (value == 0.0)
    {
        red = 0;
        green = 0;
        blue = 0;
    }
    else
    {
        var i = Math.floor(hue * 6);
        var f = (hue * 6) - i;
        var p = value * (1 - saturation);
        var q = value * (1 - (saturation * f));
        var t = value * (1 - (saturation * (1 - f)));
        switch (i)
        {
            case 1: red = q; green = value; blue = p; break;
            case 2: red = p; green = value; blue = t; break;
            case 3: red = p; green = q; blue = value; break;
            case 4: red = t; green = p; blue = value; break;
            case 5: red = value; green = p; blue = q; break;
            case 6: // fall through
            case 0: red = value; green = t; blue = p; break;
        }
    }
    return {r: red, g: green, b: blue};
}

function rgbToHsv(red, green, blue)
{
    var max = Math.max(Math.max(red, green), blue);
    var min = Math.min(Math.min(red, green), blue);
    var hue;
    var saturation;
    var value = max;
    if (min == max)
    {
        hue = 0;
        saturation = 0;
    }
    else
    {
        var delta = (max - min);
        saturation = delta / max;
        if (red == max)
        {
            hue = (green - blue) / delta;
        }
        else if (green == max)
        {
            hue = 2 + ((blue - red) / delta);
        }
        else
        {
            hue = 4 + ((red - green) / delta);
        }
        hue /= 6;
        if (hue < 0)
        {
            hue += 1;
        }
        if (hue > 1)
        {
            hue -= 1;
        }
    }
    return {
        h: hue,
        s: saturation,
        v: value
    };
}

function pageCoords(node)
{
    var x = node.offsetLeft;
    var y = node.offsetTop;
    var parent = node.offsetParent;
    while (parent != null)
    {
        x += parent.offsetLeft;
        y += parent.offsetTop;
        parent = parent.offsetParent;
    }
    return {x: x, y: y};
}

// The real code begins here.
var huePositionImg = document.createElement('img');
huePositionImg.galleryImg = false;
huePositionImg.style.width = 15;
huePositionImg.height = 11;
huePositionImg.src = HUE_SLIDER_ARROWS_LOCATION;
huePositionImg.style.position = 'absolute';

var hueSelectorImg = document.createElement('img');
hueSelectorImg.galleryImg = false;
hueSelectorImg.style.width = 15;
hueSelectorImg.style.height = 150;
hueSelectorImg.src = HUE_SLIDER_LOCATION;
hueSelectorImg.style.display = 'block';

var satValImg = document.createElement('img');
satValImg.galleryImg = false;
satValImg.style.width = 150;
satValImg.style.height =150;
satValImg.src = SAT_VAL_SQUARE_LOCATION;
satValImg.style.display = 'block';

var crossHairsImg = document.createElement('img');
crossHairsImg.galleryImg = false;
crossHairsImg.style.width = 15;
crossHairsImg.style.height = 15;
crossHairsImg.src = CROSSHAIRS_LOCATION;
crossHairsImg.style.position = 'absolute';

function makeColorSelector(inputBox,target,fonction)
{
	//alert(fonction);
    var rgb, hsv
    var target=target;
	var fonction=eval(fonction);
	var b=false;
    function colorChanged(b)
    {
        var hex = rgbToHex(rgb.r, rgb.g, rgb.b);
        var hueRgb = hsvToRgb(hsv.h, 1, 1);
        var hueHex = rgbToHex(hueRgb.r, hueRgb.g, hueRgb.b);
		if(b){
			previewDiv.style.background = hex;
        	inputBox.value = hex;
			fonction(hex);
		}
        satValDiv.style.background = hueHex;
        crossHairs.style.left = ((hsv.v*149)-10).toString() + 'px';
        crossHairs.style.top = (((1-hsv.s)*149)-10).toString() + 'px';
        huePos.style.top = ((hsv.h*149)-5).toString() + 'px';
    }

    function rgbChanged()
    {
        hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
        colorChanged();
    }

    function hsvChanged(b)
    {
        rgb = hsvToRgb(hsv.h, hsv.s, hsv.v);
        colorChanged(b);
    }
    
    var colorSelectorDiv = document.createElement('div');
		//colorSelectorDiv.id='nodrag';
		colorSelectorDiv.dragableBox="true";
    colorSelectorDiv.style.padding = '10px';
    colorSelectorDiv.style.position = 'relative';
    colorSelectorDiv.style.height = '190px';
    colorSelectorDiv.style.width = '180px';
    
    var satValDiv = document.createElement('div');
		satValDiv.id='nodrag';
		satValDiv.style.position = 'relative';
    satValDiv.style.width = '150px';
    satValDiv.style.height = '150px';
    var newSatValImg = fixPNG(satValImg);
    satValDiv.appendChild(newSatValImg);
    var crossHairs = crossHairsImg.cloneNode(false);
    satValDiv.appendChild(crossHairs);
    function satValDragged(x, y)
    {
        hsv.s = 1-(y/149);
        hsv.v = (x/149);
        hsvChanged(true);
    }
    colorSelectorDiv.appendChild(satValDiv);
		trackDrag(satValDiv,satValDragged);

    var hueDiv = document.createElement('div');
		hueDiv.id='nodrag';
    hueDiv.style.position = 'absolute';
    hueDiv.style.left = '170px';
    hueDiv.style.top = '10px';
    hueDiv.style.width = '15px';
    hueDiv.style.height = '150px';
    var huePos = fixPNG(huePositionImg);
    hueDiv.appendChild(hueSelectorImg.cloneNode(false));
    hueDiv.appendChild(huePos);
    function hueDragged(x, y)
    {
        hsv.h = y/149;
        hsvChanged(true);
    }
    colorSelectorDiv.appendChild(hueDiv);
		trackDrag(hueDiv,hueDragged);

    //setTimeout(command,10);
    //trackDrag(hueDiv, hueDragged);
    
    var previewDiv = document.createElement('div');
    previewDiv.style.position = 'absolute';
    previewDiv.style.top = '170px';
		previewDiv.style.fontSize ='1px';
    previewDiv.style.left = '10px';
    previewDiv.style.height='10px';
    previewDiv.style.width='100px';
    previewDiv.style.border = '1px solid black';
    colorSelectorDiv.appendChild(previewDiv);
    
    function inputBoxChanged()
    {
        rgb = hexToRgb(inputBox.value, {r: 0, g: 0, b: 0});
        rgbChanged();
    }
    myAddEventListener(inputBox, 'change', inputBoxChanged);
    inputBox.size = 8;
    inputBox.style.position = 'absolute';
    inputBox.style.right = '15px';
    inputBox.style.top = (170 + (25 - (inputBox.offsetHeight/2))).toString() + 'px';
    colorSelectorDiv.appendChild(inputBox);
    
    inputBoxChanged();
    
    return colorSelectorDiv;
}

function makeColorSelectors(ev,target,fonction,type)
{
    /*var inputNodes = document.getElementsByTagName('input');
    var i;
    for (i = 0; i < inputNodes.length; i++)
    {
        var node = inputNodes[i];
        if (node.className != 'color')
        {
            continue;
        }
        //var parent = node.parentNode;
        //var prevNode = node.previousSibling;
        var selector = makeColorSelector(node,target,fonction);
		//document.getElementById(target).innerHTML="";
		document.getElementById(target).appendChild(selector);
		//parent.insertBefore(selector, (prevNode ? prevNode.nextSibling : null));
    }*/
		var node = document.createElement('INPUT');
			node.type='text';
			node.className='color';
			node.style.display='none';
			var selector = makeColorSelector(node,target,fonction);
			if(type!='append'){
				document.getElementById(target).innerHTML="";
			}else{
				
			}
			document.getElementById(target).appendChild(selector);

}

function domove(){
	//alert("domove");
	b_move=true;
}

function dostop(){
	//alert("dostop");
	b_move=false;
}
//myAddEventListener(window, 'load', makeColorSelectors);
var never=false;
var never=false;
function ResizeTB(TBW){
	for(i=0;i<document.getElementsByTagName("TABLE").length;i++){
		if(document.getElementsByTagName("TABLE")[i].className=='TBDYN'){
			newTB=document.getElementsByTagName("TABLE")[i];
			newTB.style.width=(newTB.style.width=="100%")?TBW:"100%";
		}
		
	}
}; // FIN ResizeTB

/* Accessibility_BOX */
function Accessibility_Onglet_Choice(MyObject,e,ShowPalette){
	//alert("Accessibility_Onglet_Choice");
	if (!e) e = event;
	ObjectID=(MyObject.id!=null)?MyObject.id:MyObject;
	var ZINDEX;
	var RealWidth=0;
	var i;
	var ShowPalette=(ShowPalette)?1:0;
	MainContener=document.getElementById('Accessibility_BOX');
	MainContenerWidth=parseInt(MainContener.offsetWidth);
	Collection=MainContener.getElementsByTagName('TABLE');
	for(i=0;i<Collection.length;i++){
		CurrentWidth=parseInt(Collection[i].offsetWidth)
		RealWidth+=(i<Collection.length-1)?CurrentWidth:0;
		if(Collection[i].id!= null && Collection[i].id==ObjectID){
			with(Collection[i].style){
					zIndex=7;
					//borderBottomColor="#666666";
					color="#000000";
				//background="#F4F4F4";
			}
			AccessibilitychangeImages(Collection[i],1);
				if(e.type=="mousedown"){
					// QUELLE VARIABLE POUR LA ZONE OUTIL
					switch(Collection[i].id){
						case 'Text':
							command="makeColorSelectors('"+e+"','Accessibility_BOX_toolbox','Accessibility_Text_Color','first')";
							setTimeout(command,1);
							//makeColorSelectors(e,'Accessibility_BOX_toolbox','Accessibility_Text_Color');
							break;
						case 'paragraphe':
							var P_toolBox=new ooDAZ_class_Paragraphes_ToolBox(180,150,'ru','Accessibility_BOX_toolbox','first');
							P_toolBox.Constructor();
							break;
						case 'bgcolor':
							command="makeColorSelectors('"+e+"','Accessibility_BOX_toolbox','Accessibility_Bgcolor_Color','first')";
							setTimeout(command,1);
							//makeColorSelectors(e,'Accessibility_BOX_toolbox','Accessibility_Bgcolor_Color');
							//document.getElementById('colorpickeriframe').makeColorSelectors(e,'box','Accessibility_Bgcolor_Color');
							break;
					}
				}
			
				if(!e.type){
					command="makeColorSelectors('"+e+"','Accessibility_BOX_toolbox','Accessibility_Text_Color','first')";
					setTimeout(command,1);
				}
		
		}else{
				//AccessibilitychangeImages(Collection[i],0);
				with(Collection[i].style){
					switch(Collection[i].id){
						case 'Text':
							zIndex=6;
							break;
						case 'paragraphe':
							zIndex=5;
							break;
						case 'bgcolor':
							zIndex=4;
							break;
						case 'bgcolor1':
							zIndex=3;
							break;
						case 'bgcolor2':
							zIndex=2;
							break;
						case 'bgcolor3':
							zIndex=1;
							break;
					}
					borderBottomColor="#F4F4F4";
					color="#666666";
					//background="#CCCCCC";
				}
		}
	}

	// REVERSE
	if(!never){
		never=true;
		var part;
		var startwidth;
		for(var j=0;j<Collection.length;j++){
			//alert(j +" - "+ Collection[j].id);
			if(j>0){
				Collection[j].style.left=Math.abs((startwidth+(part*j))-parseInt(Collection[j].offsetWidth));
			}else{
				startwidth=parseInt(Collection[j].offsetWidth);
				reste=Math.abs(MainContenerWidth-parseInt(Collection[j].offsetWidth));
				part=Math.round(Math.abs(reste/(Collection.length-2)));
				//alert("part :" + part);
			}
		}
		//alert(j +"après for  - "+ Collection[Collection.length-1].id);
		Collection[Collection.length-1].style.left=0;
	}
		MainContener.style.visibility=(ShowPalette)?((MainContener.style.visibility=='hidden' || MainContener.style.visibility=='')?'visible':'hidden'):'visible';
		//MainContener.style.visibility='visible';

}; //FIN Accesssibility_Onglet_Choice 


function AccessibilitychangeImages(MyObject,b) {
		CollectionB=MyObject.getElementsByTagName('TD');
		for(k=0;k<CollectionB.length;k++){
			switch(k){
				case 0:
					CollectionB[k].firstChild.src=(b)?"image/Onglets_active_01.png":"image/Onglets_01.png";
					break;
			case 1:
					CollectionB[k].style.background=(b)?'url("image/Onglets_active_02.png")':'url("image/Onglets_02.png")';
					break;
			case 2:
					CollectionB[k].firstChild.src=(b)?"image/Onglets_active_03.png":"image/Onglets_03.png";
					break;
			}
		}
}; ; //FIN AccessibilitychangeImages

function Accessibility_Text_Size(variant) {
    cibles = document.getElementsByTagName('TD'); 
    for (i=0; i < cibles.length; i++) {
				 if(cibles[i].className=="accessibility"){
						if(cibles[i].style.fontSize=="" ||cibles[i].style.fontSize=="undefined"){
							newFontSize=(variant=='+')?"1.1":"1";
						}else{
							num=parseFloat(cibles[i].style.fontSize.substr(0,(cibles[i].style.fontSize.length-2)));
							Pourc=(num)*0.1;
							newFontSize=(variant=="+")?Math.abs(num+Pourc):Math.abs(num-Pourc);
						}
						cibles[i].style.fontSize=newFontSize+'em';
					}
        } 
    } 

function Accessibility_Text_Align(variant) {
    cibles = document.getElementsByTagName('TD'); 
    for (i=0; i < cibles.length; i++) {
				 if(cibles[i].className=="accessibility"){
						for(j=0;j<cibles[i].childNodes.length;j++){
							if(cibles[i].childNodes[j].style.textAlign=="" ||cibles[i].childNodes[j].style.textAlign=="undefined"){
								newtextAlign=variant;
							}else{
								newtextAlign=variant;
							}
							cibles[i].childNodes[j].style.textAlign=newtextAlign;
						}
						
						
						//cibles[i].style.textAlign=newtextAlign;
					}
        } 
    }
		
function Accessibility_Text_Color(variant) {
    cibles = document.getElementsByTagName('TD'); 
    for (i=0; i < cibles.length; i++) {
				 if(cibles[i].className=="accessibility"){
						for(j=0;j<cibles[i].childNodes.length;j++){
							if(cibles[i].childNodes[j].style.color=="" ||cibles[i].childNodes[j].style.color=="undefined"){
								newtextColor=variant;
							}else{
								newtextColor=variant;
							}
							cibles[i].childNodes[j].style.color=newtextColor;
						}
						
					}
        } 
    }
		
function Accessibility_Bgcolor_Color(variant) {
    cibles = document.getElementsByTagName('TD'); 
    for (i=0; i < cibles.length; i++) {
				 if(cibles[i].className=="accessibility"){
						if(cibles[i].style.background=="" ||cibles[i].style.background=="undefined"){
							newtextbackground=variant;
						}else{
							newtextbackground=variant;
						}
						cibles[i].style.background=newtextbackground;
					}
        } 
    }		
	
/* FIN Accessibility_BOX*/

function getTop(inputObj){
	  var returnValue = inputObj.offsetTop;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetTop;
	  }
	  return returnValue;
}; // FIN getTop
	
function getLeft(inputObj){
	  var returnValue = inputObj.offsetLeft;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetLeft;
	  }
	  return returnValue;
}; // FIN getLeft

/*function Init(){
	if(document.body!=null){
		Accessibility_Onglet_Choice('Text','e');
		clearTimeout(timeout);
	}else{
		timeout=setTimeout(" Init()",1);
	}
}; // FIN Init
Init();*/
// DEBUT CLASSE DAZ_class_Xinputfiles
function DAZ_class_HelpBubble(ObjectID,DocId){
	// PROPRIETES MEMBRES
	this.DocObjectID=ObjectID;
	this.DocId=DocId;
	this.HelpBubbleEval="document.getElementById('"+DocId+"');";
	
// 	METHODES MEMBRES DE LA CLASSE => PRIVEES
// METHODE PREMIERE INSTANCE #####################
this.Init=function(){
	
		this.helpBL="<table cellpadding=0 cellspacing=0 border=0 width='250'>";
		this.helpBL+="<tr><td width='20' height='20'><img src='image/HB_orange_BL_01.png' width='20' height='20' border='0' hspace='0' vspace='0' alt=''></td><td background='image/HB_orange_BL_02.png'><img src='image/blanc.gif' width='1' height='20' border='0' hspace='0' vspace='0' alt=''></td><td width='23' height='20'><img src='image/HB_orange_BL_03.png' width='23' height='20' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpBL+="<tr><td width='20' background='image/HB_orange_BL_04.png' valign='top'><img src='image/blanc.gif' width='20' height='1' border='0' hspace='0' vspace='0' alt=''></td><td valign='top' bgcolor='#ffffff'><div style='font-size:0.9em;color:#666666;' id='texthelpbubble'>texthelpbubble BR </div></td><td width='23' background='image/HB_orange_BL_05.png'><img src='image/blanc.gif' width='23' height='1' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpBL+="<tr><td width='20' height='38'><img src='image/HB_orange_BL_06.png' width='20' height='38' border='0' hspace='0' vspace='0' alt=''></td><td align='right' background='image/HB_orange_BL_07BG.png'><img src='image/HB_orange_BL_07.png' width='38' height='38' border='0' hspace='0' vspace='0' alt=''></td><td width='23' height='38'><img src='image/HB_orange_BL_08.png' width='23' height='38' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpBL+="</table>";
		
		
		this.helpBR="<table cellpadding=0 cellspacing=0 border=0 width='250'>";
		this.helpBR+="<tr><td width='23' height='20'><img src='image/HB_orange_BR_01.png' width='23' height='20' border='0' hspace='0' vspace='0' alt=''></td><td background='image/HB_orange_BR_02.png'><img src='image/blanc.gif' width='1' height='20' border='0' hspace='0' vspace='0' alt=''></td><td width='20' height='20'><img src='image/HB_orange_BR_03.png' width='20' height='20' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpBR+="<tr><td width='23' background='image/HB_orange_BR_04.png' valign='top'><img src='image/blanc.gif' width='23' height='1' border='0' hspace='0' vspace='0' alt=''></td><td valign='top' bgcolor='#ffffff'><div style='font-size:0.9em;color:#666666;' id='texthelpbubble'>texthelpbubble BR </div></td><td width='20' background='image/HB_orange_BR_05.png'><img src='image/blanc.gif' width='20' height='1' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpBR+="<tr><td width='23' height='38'><img src='image/HB_orange_BR_06.png' width='23' height='38' border='0' hspace='0' vspace='0' alt=''></td><td align='left' background='image/HB_orange_BR_07BG.png'><img src='image/HB_orange_BR_07.png' width='38' height='38' border='0' hspace='0' vspace='0' alt=''></td><td width='20' height='38'><img src='image/HB_orange_BR_08.png' width='20' height='38' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpBR+="</table>";
		
		this.helpTL="<table cellpadding=0 cellspacing=0 border=0 width='250'>";
		this.helpTL+="<tr><td width='23' height='35'><img src='image/HB_orange_TL_01.png' width='23' height='35' border='0' hspace='0' vspace='0' alt=''></td><td background='image/HB_orange_TL_02BG.png' align='right'><img src='image/HB_orange_TL_02.png' width='36' height='35' border='0' hspace='0' vspace='0' alt=''></td><td width='20' height='35'><img src='image/HB_orange_TL_03.png' width='23' height='35' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpTL+="<tr><td width='23' background='image/HB_orange_TL_04.png' valign='top'><img src='image/blanc.gif' width='23' height='1' border='0' hspace='0' vspace='0' alt=''></td><td valign='top' bgcolor='#ffffff'><div style='font-size:0.9em;color:#666666;' id='texthelpbubble'>texthelpbubble TL </div></td><td width='23' background='image/HB_orange_TL_05.png'><img src='image/blanc.gif' width='23' height='1' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpTL+="<tr><td width='23' height='24'><img src='image/HB_orange_TL_06.png' width='23' height='24' border='0' hspace='0' vspace='0' alt=''></td><td background='image/HB_orange_TL_07.png'><img src='image/blanc.gif' width='1' height='24' border='0' hspace='0' vspace='0' alt=''></td><td width='23' height='24'><img src='image/HB_orange_TL_08.png' width='23' height='24' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpTL+="</table>";
		
		
		this.helpTR="<table cellpadding=0 cellspacing=0 border=0 width='250'>";
		this.helpTR+="<tr><td width='20' height='35'><img src='image/HB_orange_TR_01.png' width='20' height='35' border='0' hspace='0' vspace='0' alt=''></td><td background='image/HB_orange_TR_02BG.png' align='left'><img src='image/HB_orange_TR_02.png' width='27' height='35' border='0' hspace='0' vspace='0' alt=''></td><td width='21' height='35'><img src='image/HB_orange_TR_03.png' width='21' height='35' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpTR+="<tr><td width='20' background='image/HB_orange_TR_04.png' valign='top'><img src='image/blanc.gif' width='20' height='1' border='0' hspace='0' vspace='0' alt=''></td><td valign='top' bgcolor='#ffffff'><div style='font-size:0.9em;color:#666666;' id='texthelpbubble'>texthelpbubble TR </div></td><td width='21' background='image/HB_orange_TR_05.png'><img src='image/blanc.gif' width='21' height='1' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpTR+="<tr><td width='20' height='24'><img src='image/HB_orange_TR_06.png' width='20' height='24' border='0' hspace='0' vspace='0' alt=''></td><td background='image/HB_orange_TR_07.png'><img src='image/blanc.gif' width='1' height='24' border='0' hspace='0' vspace='0' alt=''></td><td width='20' height='24'><img src='image/HB_orange_TR_08.png' width='21' height='24' border='0' hspace='0' vspace='0' alt=''></td></tr>";
		this.helpTR+="</table>";

};// FIN Init

this.DrawBubble=function(){
	var helpbubble=document.createElement('div');
		helpbubble.setAttribute('id',DocId);
		helpbubble.style.position='absolute';
		helpbubble.style.top=0;
		helpbubble.style.left=0;
		helpbubble.style.zIndex=3000;
		helpbubble.style.visibility='hidden';
		helpbubble.innerHTML=this.helpBL;
		document.body.appendChild(helpbubble);
	
}; // Fin DrawBubble 


this.getTopPos=function(inputObj){		
   //alert(inputObj);
	  var returnValue = inputObj.offsetTop;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetTop;
	  }
	  return parseInt(returnValue);
}
	
this.getLeftPos=function(inputObj){
	  var returnValue = inputObj.offsetLeft;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetLeft;
	  }
	  return parseInt(returnValue);
}
	
	
this.ShowHelpBubble=function (text,target,overout,e,Lefts,Tops){
		
		//alert(overout);
		text=unescape(text);
		//alert(text);
		//text=text.replace('+','&nbsp;');
		var Bubble=eval(this.HelpBubbleEval);

		if(overout!='out'){

			var NW = parseInt(document.body.clientWidth);
			var NH = parseInt(document.body.clientHeight);
			var SPACE=15;
			//alert(target.id);
			var targetW=parseInt(document.getElementById(target).offsetWidth);
			var targetH=parseInt(document.getElementById(target).offsetHeight);
			//alert("LARGEUR :"  + targetW +" / HAUTEUR : "+ targetH);
			if(!e) e=event;
			//alert(Lefts + " / "+ Tops);
			Left=(Lefts==0)?e.clientX+parseInt(document.body.scrollLeft):Lefts;
			Top=(Tops==0)?e.clientY+parseInt(document.body.scrollTop):Tops;
			//alert(Left + " / "+ Top);

			//alert("TOP DEPART :" + Tops +"\nLEFT DEPART :" +Left);
			//alert("SCROLLTOP :" + parseInt(document.body.scrollTop )+"\nSCROLLLEFT :" +parseInt(document.body.scrollLeft));
			var BoundsTOP=parseInt(document.body.scrollTop);
			var BoundsBOTTOM=NH+parseInt(document.body.scrollTop);
			var BoundsLEFT=parseInt(document.body.scrollLeft);
			var BoundsRIGHT=NW-parseInt(document.body.scrollLeft);
			//alert("BoundsTOP :"+ BoundsTOP+"\nBoundsBOTTOM :"+ BoundsBOTTOM+"\nBoundsLEFT :"+ BoundsLEFT+"\nBoundsRIGHT :"+ BoundsRIGHT);
			var W=parseInt(document.getElementById(target).offsetWidth);
			var H=parseInt(document.getElementById(target).offsetHeight);		// ON TESTE SI LA DEMANDE DE LISTE SEPAREE EST TRUE OU FALSE
			document.getElementById('texthelpbubble').innerHTML=text;
			//alert(Bubble.offsetHeight);
			//NewLeft=(Left-(Math.round(parseInt(Bubble.offsetWidth)/2.8)));
			NewLeft=(Left);
			NewTop=(Top)-(parseInt(Bubble.offsetHeight)+SPACE);
			//alert("NewTop :"+NewTop+"\nNewLeft :"+ NewLeft); 
			var NivTop=(NewTop<=BoundsTOP)?"H":"OK";
			//alert(NewLeft +" = "+BoundsLEFT);
			var NivLeft=(NewLeft<=BoundsLEFT)?"L":(NewLeft+parseInt(Bubble.offsetWidth)>=BoundsRIGHT)?"R":"OK";

			var NewBubble=NivTop+NivLeft;
			//alert("NivLeft :"+ NivLeft + " / NivTop :"+ NivTop + "NewBubble= " + NewBubble);
			switch(NewBubble){
				case "HL":
					Bubble.innerHTML=this.helpTR;
					Left=Left;
					Top=Top+SPACE;
					break;
				case "HR":
					Bubble.innerHTML=this.helpTL;
					//Left=(NW+Math.abs(parseInt(document.body.scrollLeft))-parseInt(Bubble.offsetWidth))-SPACE;
					Left=(Left-(Math.round(parseInt(Bubble.offsetWidth))));

					Top=Top+SPACE;
					break;
				case "HOK":
					Bubble.innerHTML=this.helpTR;
					Left=SPACE+NewLeft;
					Top=Top+(SPACE*1);
					break;
				case "OKR":
					Bubble.innerHTML=this.helpBL;
					Left=NewLeft-(parseInt(Bubble.offsetWidth));
					Top=NewTop;
					//Left=SPACE+(Left-(parseInt(Bubble.offsetWidth)));
					//Top=(Top)+ targetH;
					break;
				case "OKL":
					Bubble.innerHTML=this.helpBL;
					Left=Left;
					Top=NewTop;
					break;
				case "OKOK":
					Bubble.innerHTML=this.helpBR;
					Left=NewLeft;
					Top=NewTop;
					break;
			}
			//alert(Bubble.innerHTML);
			document.getElementById('texthelpbubble').innerHTML=text;
			Bubble.style.left=Left;
			Bubble.style.top=Top;

			Bubble.style.visibility='visible';
		}else{
			document.getElementById('texthelpbubble').innerHTML="";
			Bubble.style.visibility='hidden';
		}
//overout="";
		//alert("NewBubble :"+NewBubble);
}

}// FIN CLASSE DAZ_class_HelpBubble




/******************************************************************* 
* Fichier    : DAZ-class_newsbox.php  © antistaticomz.free.fr
* date de création : 12/05/2005 
* Auteur : David Cardinal  (antistaticomz@free.fr) antistaticomz.free.fr 
* Objet : Boîte de news à défilement vertical
* Compatibilité Navigateur : IE 6.x | NS 7.x | firefox 1.0.(3,4)
* Historique 
* Date         Version        	Description 
* 12/05/2005	1.0				Boîte de news à défilement vertical basée sur des DIVS.
								- Problème de positionnement CSS des DIVS [absolu] pour la récupération des données (top,left,width,height) résolu.
								- Imbriquation du TICKERS dans les TAGS html (<table>,etc..) .
								- Fonction pause sur les NEWS.
								- Vitesse de défilement progressive.
								- Tronquage de chaîne automatique (paramétrable).
								- Prise en charge de texte brut, images, éléments HTML (paramétrable).
								- Génération de lien automatique sur texte brut (paramétrable). 
***********************************************************************/ 
/*************************************************************************************/ 

/* CONSTRUCTEUR DE LA CLASSE :-> neo_newsbox;
	* PARAMETRES ATTENDUS:
	- conteneurID= Identifiant du DIV conteneur.
	- conteneurWIDTH= Largeur du DIV conteneur.
	- conteneurHEIGHT= hauteur du DIV conteneur
	- conteneurCssClassName= Nom de la classe CSS (à implémenter) pour le DIV conteneur .IMPORNTANT : NE PAS SPECIFIER (overflow,width,height) DANS LE CSS.
	- contenuID = Identifiant du DIV contenu.
	- maxlength= longueur maximum de la chaîne de NEWS (à vous de compter).
	- pause = temps de pause entre chaque NEWS (1000 = 1 seconde).
	- behavior = Les NEWS s'afficheront empilées les une sur les autres OU les unes après les autres. Attend VRAI ou FAUX   
		VRAI = alternatif.
		FAUX = empilées.
/*** METHODES MEMBRES DE LA CLASSE ***/

/* METHODE ADD_NEWS DE LA CLASSE :-> add_news;
	* PARAMETRES ATTENDUS:
	- neo_news = Le texte brut ou un élément HTML (<table><tr><td>bla bla </td></tr></table>,etc..).
	- striptags = Tronquage de la chaîne . Attend VRAI ou FAUX.
	- href = Attend une chaîne URL.
	
/*** NOTE:
		- Exemple : Vous pouvez spécifier un texte brut(mon texte) ,le tronquer si il est trop long(true), et qui doit être un lien URl (chaîne).
			instanciation : MonObjet.add_news(mon texte, true, chaîne).
			
		- Exemple : Vous pouvez spécifier un texte brut(mon texte) ,le tronquer si il est trop long(true), et qui n'est pas un lien URl ("").
	 		instanciation : MonObjet.add_news(mon texte, true, "").

/*** IMPORTANT:			
	  	Si le paramètre est un élément HTML (<table><tr><td>bla bla </td></tr></table>, ect).
		- Exemple : Vous pouvez spécifier un élément HTML("<table><tr><td>bla bla </td></tr></table>") ,ne JAMAIS le tronquer (false), et qui n'est pas un lien URl ("").
			instanciation : MonObjet.add_news("<table><tr><td>bla bla </td></tr></table>, false, "").
		   
******* A VOUS DE DETERMINER LA HAUTEUR DE L'ELEMENT HTML EN FONCTION DE LA HAUTEUR DE VOTRE DIV CONTENEUR *******

**** UILISATION *****
<!--
    	1-  ENTRE les balises <HEAD> et </HEAD>:
			<script language='javascript' type='text/javascript' src='monchemin/DAZ-class_newsbox.js'></script>
			<script language='javascript'>   
			var tickers0 = new neo_newsbox('tickers0','#FF3300',500,200,'Tickerpyr','tickers01',200);
			tickers0.addnews("<table><tr><td>première<p> info du </p>matin</td></tr></table>",false,"http://www.monsite.com");
			tickers0.addnews("deuxième info et le reste arrivera demain deuxième info deuxième info ",false,"");
			
			var tickers1 = new neo_tickers('tickers0','#FF3300',500,200,'Tickerpyr','tickers01',200);
			tickers1.addnews("<table><tr><td>première<p> info du </p>matin</td></tr></table>",false,"http://www.monsite.com");
			tickers1.addnews("deuxième info et le reste arrivera demain deuxième info deuxième info ",false,"");
			</script>
			
		2 - Sur l'évènement ONLOAD du body:
			<body onload="tickers0.StartVerticalScroll();tickers1.StartVerticalScroll();">
		
		3 - Dans le CORPS de la page (n'importe ou):
			<table cellspacing='0' cellpadding='0' border='0'>
				<tr>
					<td><script type="text/javascript">document.write(tickers0.draw());</script></td>
				</tr>
			</table>

			<table cellspacing='0' cellpadding='0' border='0'>
				<tr>
					<td><script type="text/javascript">document.write(tickers1.draw());</script></td>
				</tr>
			</table>-->
***/

// constructeur de la classe
function neo_newsbox(conteneurID,conteneurWIDTH,conteneurHEIGHT,conteneurCssClassName,contenuID,maxlength,pause,behavior,startScroll){
	// propriétés de l'objet
	this.ID=conteneurID;
	this.IDWidth=conteneurWIDTH;
	this.IDHeight=conteneurHEIGHT;
	this.IDCSS=conteneurCssClassName;
	this.contenuID=contenuID;
	this.maxlength=maxlength;
	// variable pour le temps de pause entre chaque NEWS
	this.pause = pause;
	// Choix du type de défilement
	this.behavior=behavior;
	// affectation pour les onmouseout et onmouseover
	this.ActiveBehavior='';
	// variable fixe pour remise à zero
	this.tops=conteneurHEIGHT;
	this.lefts=conteneurWIDTH;
	// variable utilisée dynamiquement
	this.TopBounds=conteneurHEIGHT;
	this.LeftBounds=conteneurWIDTH;
	

	// détection des navigateurs
	this.ns67=(document.getElementById && !document.all)? true:false ;
	this.dom = (document.getElementById && document.all)? true:false;
	this.ns4 = (document.layers)? true:false;
	this.ie4 = (document.all && !document.layers && !document.getElementById )? true:false;
	// le ARRAY qui contient les NEWS / paramètres reçus
	this.NewsArray = new Array();
	// le ARRAY qui contient les HAUTEURS de chaque enfants du DIV contenu
	this.childnodesarray = new Array();
	// chaque infos
	this.news='';
	// toutes les infos
	this.newspile='';
	// variable utilisée dynamiquement
	this.vitesse = 50;
	// Variable qui recevra la continuite du mouvement (settimeout)
	this.mouvement;
	//varibales pour le gestionnaire de defilement
	this.pas=0;

	// méthodes privées de la classe (accesseurs)
	this.addnews=add_news;
	this.Bindcontenu=Bind_Contenu;
	this.draw=drawTicker;
	this.StartVerticalScrollAlternatif=Start_VerticalScroll_Alternatif;
	this.StartVerticalScrollPile=Start_VerticalScroll_Pile;
	this.getLeft=get_Left;
	this.getTop=get_Top;
	this.init=IniT;
	this.InitBounds=Init_Bounds;
	this.startScroll=startScroll;
		
}// FIN CONSTRUCTEUR DE LA CLASSE 


// DEBUT METHODES MEMBRES DE LA CLASSE
function add_news(neo_news,striptags,href){
	if(this.behavior){
		this.ActiveBehavior='StartVerticalScrollAlternatif()';
	}else{
		this.ActiveBehavior='StartVerticalScrollPile()';
	}
	
	var cle = Array("<[/]?[a-zA-Z0-9]+( [a-zA-Z0-9_]+=((\"[^\"]+\")|([^ ]+)))*>","<br( /)?>");
	if(striptags==true){
		for(i=0;i<cle.length;i++) {
         	reg = new RegExp(cle[i],"ig");
		 	if(reg.test(neo_news)){
         		neo_news=neo_news.replace(reg,"");
			}
     	 }
		 
	}
	
	if(href!=""){
		if(neo_news.length>=this.maxlength){
			neo_news=neo_news.substr(0,this.maxlength-(href.length+25));
		}
		//ref="<a href='"+href+"'>"+neo_news+"</a>"+ " [...]";
		//neo_news=ref;
		ref="<a href='javascript:void(0);' onclick="+href+">"+neo_news+"</a>"+ " [...]";
		alert(ref);

	}else{
		if(neo_news.length>=this.maxlength){
			neo_news=neo_news.substr(0,this.maxlength-6);
		}
		//neo_news=neo_news + " [...]";
	}
	//alert(neo_news.length);
if(this.ns4){
			this.news="<layer name='news'>";
			this.news+="<p>";
			this.news+=neo_news;
			this.news+="</p>";
			this.news+="</layer>";
		}else{
			
			this.news="<div style='padding-left:10px;padding-right:10px;padding-top:0px;position:relative;height:"+this.IDHeight +"px;overflow:hidden;' onMouseover=clearTimeout("+this.ID+".mouvement) onMouseout="+this.ID+".mouvement=setTimeout('"+this.ID+"."+this.ActiveBehavior+"',"+ this.ID+".vitesse)>";
			//this.news+=("<p style='text-align:justify;width:"+(this.IDWidth-20)+"px;'>");
			this.news+=("<p style='text-align:justify;width:100%;'>");
			this.news+=neo_news;
			this.news+="</p>";
			this.news+="</div>";
		}
		
	this.NewsArray.push(this.news);
	//alert(this.news);
}


function IniT(){
	if(this.behavior){
		go=setTimeout(this.ID+'.StartVerticalScrollAlternatif()',this.startScroll);
		//this.StartVerticalScrollAlternatif();
	}else{
		// on rempli le contenu avec les news
		this.Bindcontenu();
		// on fixe et mémorise les limites de chaque news dans un tableau
		this.InitBounds();
		go=setTimeout(this.ID+'.StartVerticalScrollPile()',this.startScroll);
		//this.StartVerticalScrollPile();
	}
}

function Bind_Contenu(){
	cible=document.getElementById(this.contenuID);
	for(i=0;i<this.NewsArray.length;i++){
		
		if(this.ns4){
			this.news+=this.NewsArray[i];
		}else{
			cible.innerHTML+=this.NewsArray[i]
		}
	}// fin for
	//alert(document.getElementById('tickers01').innerHTML);
	
}

function Init_Bounds(){
	cible=document.getElementById(this.contenuID);
	for(i=0;i<cible.childNodes.length;i++){
		this.childnodesarray.push(cible.childNodes[i].style.height);
	}
}

// DESSIN DE LA ZONE DE TEXTE DEFILANT
function drawTicker(){
	if(this.ns4){
	theLAyer=("<ilayer id='"+this.ID +"' name='" + this.ID +"' width='"+ this.IDWidth+"' height='"+this.IDHeight +"' bgcolor='"+this.sCbgcolor+"' overflow='"+this.sCoverflow+"'>");
	theLAyer+=("<layer  id='"+ this.contenuID+"' name='"+this.contenuID+"'>");
	theLAyer+=this.news + this.NewsArray.length;
	theLAyer+=("</layer>");
	theLAyer+=("</ilayer>");
	}else{
		//alert(this.IDCSS);
		//var testDIV=("<div style='overflow:hidden; width:192;height:182;' class='Tickerpyr' id='tickers0'><div id='tickers01' style='position:relative;width:192;' ><table bgcolor='#cccccc'><tr><td>première<p> <a href='http://www.ste-pyramide.com/pyramide-emploi'> <img src='../image/PX200.jpg' border=0> </a></p>matin</td></tr></table></div></div>");
		//var testDIV=("<div style='overflow:hidden; width:192;height:182;' class='Tickerpyr' id='tickers0'><div id='tickers01' style='position:relative;width:192;' ><table bgcolor='#FF3300' cellpadding='0' cellspacing='0' border='0'><tr><td>première<p> <a href='http://www.ste-pyramide.com/pyramide-emploi'> <img src='../image/PX200.jpg' border=0> </a></p>matin</td></tr></table><b>En têtes de la news </b><br>et le reste arrivera demain deuxième info et le reste arrivera demain deuxième info et le reste arrivera demaintroisieme info troisieme info troisieme info troisieme info troisieme info troisieme info troisieme info troisieme info troisieme info troisieme info troisieme info troisieme info troisieme info</div></div>");
		theLAyer=("<div style='overflow:hidden; width:"+this.IDWidth+";height:"+this.IDHeight+";' class='Tickerpyr' id='"+this.ID+"'><div id='"+ this.contenuID+"' style='position:relative;width:"+ this.IDWidth+";'></div></div>");
		//alert(testDIV);
	}
	return theLAyer;
}

// FONCTIONS POUR DEFILEMENT VERTICAL
function Start_VerticalScroll_Alternatif(){
	/*target=document.getElementById(this.contenuID);
	target.innerHTML=this.NewsArray[this.pas];
	reste=this.tops  + ((-target.scrollHeight) + this.TopBounds);
	pas=Math.abs(Math.round(reste/this.vitesse))+1;
	target.style.top=this.TopBounds+(-(1*pas));
	this.TopBounds=this.TopBounds+(-(1*pas));
	//status=pas;*/
	
	conteneur=get_Top(document.getElementById(this.ID));
	target=document.getElementById(this.contenuID);
	target.innerHTML=this.NewsArray[this.pas];
	reste=Math.round((conteneur-this.getTop(target.childNodes[0])));
	pas=Math.round((reste*10)/100)
	target.style.top=this.TopBounds+((1*pas));
	this.TopBounds=this.TopBounds+((1*pas));
	//status=pas;
	if(this.TopBounds >10){
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollAlternatif()',this.vitesse);
	}else{
		clearTimeout(this.mouvement);
		this.TopBounds=this.tops;
		if(this.pas==this.NewsArray.length-1){
			this.pas=0;
		}else{
			this.pas=this.pas+1;
		}
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollAlternatif()',this.pause);
	}
}

function Start_VerticalScroll_Pile(){
	conteneur=get_Top(document.getElementById(this.ID));
	target=document.getElementById(this.contenuID);
	reste=Math.round((conteneur-this.getTop(target.childNodes[this.pas])));
	pas=Math.round((reste*10)/100)
	target.style.top=this.TopBounds+((1*pas));
	this.TopBounds=this.TopBounds+((1*pas));
	//status=pas;
	if(this.getTop(target.childNodes[this.pas])-10 > conteneur){
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollPile()',this.vitesse);
	}else{
		clearTimeout(this.mouvement);
		if(this.pas==this.NewsArray.length-1){
			this.pas=0;
			this.TopBounds=this.tops;
		}else{
			this.pas=this.pas+1;
		}
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollPile()',this.pause);
	}
}

// FONCTIONS POUR DEFILEMENT HORIZONTAL
function Start_HorizontalScroll_Alternatif(){
	/*target=document.getElementById(this.contenuID);
	target.innerHTML=this.NewsArray[this.pas];
	reste=this.tops  + ((-target.scrollHeight) + this.TopBounds);
	pas=Math.abs(Math.round(reste/this.vitesse))+1;
	target.style.top=this.TopBounds+(-(1*pas));
	this.TopBounds=this.TopBounds+(-(1*pas));
	//status=pas;*/
	
	conteneur=get_Top(document.getElementById(this.ID));
	target=document.getElementById(this.contenuID);
	target.innerHTML=this.NewsArray[this.pas];
	reste=Math.round((conteneur-this.getTop(target.childNodes[0])));
	pas=Math.round((reste*10)/100)
	target.style.top=this.TopBounds+((1*pas));
	this.TopBounds=this.TopBounds+((1*pas));
	//status=pas;
	if(this.TopBounds >10){
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollAlternatif()',this.vitesse);
	}else{
		clearTimeout(this.mouvement);
		this.TopBounds=this.tops;
		if(this.pas==this.NewsArray.length-1){
			this.pas=0;
		}else{
			this.pas=this.pas+1;
		}
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollAlternatif()',this.pause);
	}
}

function Start_HorizontalScroll_Pile(){
	conteneur=get_Top(document.getElementById(this.ID));
	target=document.getElementById(this.contenuID);
	reste=Math.round((conteneur-this.getTop(target.childNodes[this.pas])));
	pas=Math.round((reste*10)/100)
	target.style.top=this.TopBounds+((1*pas));
	this.TopBounds=this.TopBounds+((1*pas));
	//status=pas;
	if(this.getTop(target.childNodes[this.pas])-10 > conteneur){
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollPile()',this.vitesse);
	}else{
		clearTimeout(this.mouvement);
		if(this.pas==this.NewsArray.length-1){
			this.pas=0;
			this.TopBounds=this.tops;
		}else{
			this.pas=this.pas+1;
		}
		this.mouvement=setTimeout(this.ID+'.StartVerticalScrollPile()',this.pause);
	}
}


/*FONCTIONS DE DETECTION DES POSITIONX X & Y  DE LAYERS ou DIV*/
function get_Left(MyObject)
//Fonction permettant de connaître la position d'un objet
//par rapport au bord gauche de la page.
//Cet objet peut être à l'intérieur d'un autre objet.
    {
    if (MyObject.offsetParent){
        return (MyObject.offsetLeft + get_Left(MyObject.offsetParent));
    }else {
        return (MyObject.offsetLeft);
    }
}
 
function get_Top(MyObject)
//Fonction permettant de connaître la position d'un objet
//par rapport au bord haut de la page.
//Cet objet peut être à l'intérieur d'un autre objet.
    {
    if (MyObject.offsetParent){
		//this.ID +'.'+ getTop(MyObject.offsetParent)
        return (MyObject.offsetTop + get_Top(MyObject.offsetParent));
    	//return (MyObject.offsetTop + this.ID +'.'+ 'getTop('+MyObject.offsetParent+')');

	}else{
        return (MyObject.offsetTop);
    }
}


function GetNS4Object(MyID,MyDocument)
	{
	var MyObject= eval('MyDocument.'+MyID);
  if (!(MyObject))
  	for(var i=0;i<MyDocument.layers.length;i++)
			{
			MyObject = GetNS4Object(MyID,MyDocument.layers[i].document);
			if (MyObject) break;
			}
  return MyObject;
  }

var imgSrc;
var anim;
function aleat(){
  imgSrc=aleat.arguments[Math.floor(Math.random() * aleat.arguments.length)];
	//alert(imgSrc);
	//document.write("<img src='image/"+imgSrc+"' style='width:expression(document.getElementById('TB0').style.width);height:expression(document.getElementById('TB0').style.height);width:100%;height:100%;display:block;' border='0' hspace='0' vspace='0'>");
	anim="<img src='image/"+imgSrc+"' style='width:expression(document.getElementById('TB0').style.width);height:expression(document.getElementById('TB0').style.height);width:100%;height:100%;display:block;' border='0' hspace='0' vspace='0'>";

 }
function write_text(node) {
    node.innerHTML=anim;
  }


function Do_Pos_Content(ObjectToPosId,AnchorID, decalsleft,sensleft,decalstop,senstop){
	ObjectToPos=document.getElementById(ObjectToPosId);
	Objdecalsleft=(decalsleft && !decalsleft>1)?parseInt(ObjectToPos.offsetWidth):decalsleft;
	Objdecalstop=(decalstop && !decalstop>1)?parseInt(ObjectToPos.offsetHeight):decalstop;
	//ObjectToPos.style.left=(parseInt(getLeftPos(document.getElementById(AnchorID))))-Objdecalsleft;
	//ObjectToPos.style.top=parseInt(getTopPos(document.getElementById(AnchorID)))-Objdecalstop;

	ObjectToPos.style.left=(sensleft=='-')?(parseInt(getLeftPos(document.getElementById(AnchorID))))-Objdecalsleft:(parseInt(getLeftPos(document.getElementById(AnchorID))))+Objdecalsleft;
	ObjectToPos.style.top=(senstop=='-')?parseInt(getTopPos(document.getElementById(AnchorID)))-Objdecalstop:parseInt(getTopPos(document.getElementById(AnchorID)))+Objdecalstop;

	ObjectToPos.style.visibility='visible';

};//Fin Do_Pos_Content

function StycKyIt(TargetID,DivToMove,show){
	//alert(TargetID + "  ;" + DivToMove+ "  ;" +show)
	ObjectToPos=document.getElementById(TargetID);
	divtomove=document.getElementById(DivToMove);
	lefts=parseInt(getLeftPos(ObjectToPos));
	tops=parseInt(getTopPos(ObjectToPos));
	leftss=parseInt(ObjectToPos.offsetWidth)/2;
//alert("divtomove =" +  parseInt(divtomove.offsetWidth)+ " / ObjectToPos =" + parseInt(ObjectToPos.offsetWidth))
divtomove.style.left=((lefts)+leftss)-(parseInt(divtomove.offsetWidth)/2)
divtomove.style.top=tops+50;
divtomove.style.visibility=(show)?'visible':'hidden';

//divtomove.style.display='block';


};//Fin StycKyIt

function X_WindoScroll(Obj_anchorID,direction) {
	var cTimeOut; 
	Obj_anchor=document.getElementById(Obj_anchorID);
	Obj_anchorID=Obj_anchorID
	xObj_anchor=parseInt(getLeftPos(Obj_anchor));
//alert("scrollWidth :" + document.body.scrollWidth);
//alert("innerWidth :" + document.body.clientWidth);
//alert("scrollLeft :" + document.body.scrollLeft);
//alert(Obj_anchor.id + "Left :" + xObj_anchor);
srollLeftMaxWidth=parseInt(document.body.scrollWidth)-parseInt(document.body.clientWidth);
		if(direction == '+'){
			if( parseInt(document.body.scrollLeft) < srollLeftMaxWidth){
				window.scrollBy(10,0);
			}else{
                clearTimeout(cTimeOut);
                //alert("fin de scroll");
                //alert("scrollWidth :" + document.body.scrollWidth);
                //alert("scrollLeft :" + document.body.scrollLeft + " VS " + srollLeftMaxWidth);
				return;
			}
		}else{
            if(parseInt(document.body.scrollLeft) > 0){
				window.scrollBy(-10,0);
			}else{
                clearTimeout(cTimeOut);
                //alert("fin de scroll");
                //alert("scrollWidth :" + document.body.scrollWidth);
                //alert("scrollLeft :" + document.body.scrollLeft + " VS " + srollLeftMaxWidth);
				return;
			}
		}
	var commandXscroll='X_WindoScroll("'+ Obj_anchorID +'","'+ direction +'")';
	cTimeOut=setTimeout(commandXscroll,10);
};// Fin X_WindoScroll

function changeImages(id,second) {
		document.getElementById(id).src=second;
}; // Fin changeImages

function getTopPos(inputObj){		
	  var returnValue = inputObj.offsetTop;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetTop;
	  }
	  return returnValue;
}; // Fin getTopPos 
	
function getLeftPos(inputObj){
	  var returnValue = inputObj.offsetLeft;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!= "HTML" )returnValue += inputObj.offsetLeft;
	  }
	  return returnValue;
}; // Fin getLeftPos 

function ChangeBackGround(b_tagORid,obj,backGround){
	expression=(b_tagORid)?"document."+obj+".style.background=backGround":"document.getElementById("+obj+").style.background=backGround";
	eval(expression);
}; // Fin ChangeBgColor

function xHide(){
	tag=document.body;
	if(tag!=null){
		if (tag.addEventListener){
    		tag.addEventListener('contextmenu', Securit, false);
			tag.addEventListener('selectstart', Securit, false);
			tag.addEventListener('dragstart', Securit, false);
			tag.setAttribute("style","-moz-user-select:none");
  		} else if (tag.attachEvent){
  			tag.attachEvent('oncontextmenu',Securit);
			tag.attachEvent('onselectstart',Securit);
			tag.attachEvent('ondragstart',Securit);
  		} else {
  			return false;
 		}
		if(!timeXhide==null){
			clearTimeout(timeXhide);
		}
	}else{
		var timeXhide=setTimeout("xHide()",1);
	}
}

function Securit(e){
	if(e.preventDefault){
		e.stopPropagation();
		e.preventDefault();
	}else{
		window.event.cancelBubble = true;
		window.event.returnValue = true;
	}
	return false;
};


function popprint(page,div,haut,larg){
	//alert(numeroffre);
	//var top = (screen.height-haut)/2;
	//var left = (screen.width-larg)/2;
	var top = 0;
	var left = 0;

	thetexttoprint="";
	//Nomentreprise="<b>"+numeroffre+"</b>";
	//numero="<title>BDD mlj66 ::::: Impression Fiche utilisateur : " + numeroffre+ "</title>";
	//numero=numeroffre;
	thetexttoprint=document.getElementById(div).innerHTML;
	//alert(thetexttoprint);
	//var cle = Array("..\/..\/image","http:\/\/www.mlj66bdd-entreprise.org\/image");
	//for(i=0;i<cle.length;i++) {
         //reg = new RegExp(cle[i],"ig")
         //thetexttoprint = thetexttoprint.replace(reg, "image");
      //}
	//thetexttoprint = thetexttoprint.replace(/..\/..\/image\/blanc.gif/g, "../image/blanc.gif");
	//thetexttoprint = thetexttoprint.replace(/http:\/\/www.ste-pyramide.com\/pyramide-emploi\/image/g, "../image");
	//alert(thetexttoprint);

	/*document.getElementById('lirelasuitefenetre').style.display='block';
	document.getElementById('lirelasuitefenetre').style.width=larg;
	document.getElementById('lirelasuitefenetre').style.height=haut;*/
	with(document.getElementById('lirelasuitefenetre').style){
		display='block';
		width=larg;
		//height='inherit';
		top=parseInt(document.body.scrollTop)+20;
		//left=200;
	}
	var thepop=	window.open(page,'lirelasuiteframe','status=yes,menubar=yes,scrollbars=yes,resizable=yes,top='+top+',left='+left+',width='+larg+',height='+haut);
	//alert(document.getElementById('lirelasuiteframe').document.body.clientHeight);
//document.getElementById('lirelasuitefenetre').style.height=document.getElementById('lirelasuiteframe').document.body.clientHeight;
} 


function ShowHideBlocs(basename,div,index,but){
	//alert(div,index,but);
  	for (var h = 0; h < index; h++){
		   	var el = document.getElementById(basename+h).id;
			var el=document.getElementById(basename+h).id
			//alert(el);
				if(el!=div){
						//document.getElementById('UnderBlocs'+h).style.display='none';
						document.getElementById(basename+h).style.height=1;
						//document.getElementById('but'+h).value='+';
				}else{
					//alert(document.getElementById('UnderBlocs_div'+h).offsetHeight);
					//document.getElementById('UnderBlocs'+h).style.display=(document.getElementById('UnderBlocs'+h).style.display=='block')?'none':'block';
					//document.getElementById('UnderBlocs'+h).style.height=(parseInt(document.getElementById('UnderBlocs'+h).style.height)>1)?1:parseInt(document.getElementById('UnderBlocs_div'+h).offsetHeight);
					commands=(parseInt(document.getElementById(basename+h).offsetHeight)>1)?(new function(){document.getElementById(basename+h).style.height=1;}):new function(){RollsBlock(basename+h,parseInt(document.getElementById(basename+'_div'+h).offsetHeight),0.3,0.4,0,'v');} 
					//document.getElementById('UnderBlocs'+h).style.height=(parseInt(document.getElementById('UnderBlocs'+h).offsetHeight)>1)?1:"auto";

//document.getElementById('but'+h).value=(document.getElementById('but'+h).value=='+')?'-':'+';
				}
	}
			
 }

	var LastNewH="";
	var LastCibleH=0;
function  RollsBlock(div,H,k,f,vy,x_Effect){
	//alert(div +','+H+','+k+','+f+','+vy+','+x_Effect);
	cible=div;
	cibles=document.getElementById(div);
	maxH=H;
	k=k;
	f=f;
	vy=vy;
	x_Effect=x_Effect;
	//alert(cibles);
	CibleH=(parseInt(cibles.offsetHeight)>=maxH)?maxH:parseInt(cibles.offsetHeight);
	NewH=CibleH;
	ay =k*(maxH-CibleH);
	vy += ay;
	vy *= f;
	switch(x_Effect){
			case 'hv':
				cibles.style.height=(CibleH != LastCibleH)?CibleH+vy:(CibleH==LastCibleH)?maxH:CibleH;
				LastCibleH=CibleH;
				break;
			case 'h':
				cibles.style.height=(CibleW>=maxW && CibleH < maxH)?(CibleH==LastCibleH && CibleW==maxW)?maxH:CibleH+vy:(CibleW>=maxW)?CibleH:"1";
				LastCibleH=(CibleW==maxW)?CibleH:(LastCibleH!="")?LastCibleH:0;
				break;
			case 'v':
				cibles.style.height=(CibleH != LastCibleH)?CibleH+vy:(CibleH==LastCibleH)?maxH:CibleH;
				LastCibleH=CibleH;
				break;
	}
	/*if(cible=='AgendaInfoBulle0'){
				messageZone.innerHTML+='<br> - '+this.x_Effect+'  - '+ cible+": WIDTH :"+  CibleW +" / HEIGHT :" + CibleH;
	}*/
	LastH=(NewH==parseInt(cibles.offsetHeight) && (CibleH==maxH))?1:0;
	command='RollsBlock("'+cible+'",'+H+','+k+','+f+','+vy+',"'+x_Effect+'")';
	var timer=(NewH>=H)?(new function(){cibles.style.height="auto";clearTimeout(timer);}):(parseInt(LastNewH))?(new function(){cibles.style.height="auto";clearTimeout(timer);}):(new function(){setTimeout(command,1);});
	//var timer=(NewR>=R)?(new function(){clearTimeout(timer);):(this.LastNewR)?(new function(){cibles.style.width=W;cibles.style.height=H;alert('ok');clearTimeout(timer);}):setTimeout(command,1);
}


/*function RollsBlock(div,H){
	blocs=document.getElementById(div);
	H=H;
	commands=(document.getElementById(div).offsetHeight)?:
}*/
function loader(loader,maintable){
	/*obj=document.getElementById(loader);
	with(obj.style){
		obj.style.display=(obj.style.display=='block')?'none':'block';
	}*/
    document.getElementById('loader').style.display='none';
    document.body.style.overflow='scroll';
    document.body.scrollTop=0;
	//document.getElementById(maintable).style.visibility=(document.getElementById(loader).style.visibility=='visible')?'hidden':'visible';
}
function doBlink(loadertext){
	var obj=document.getElementById(loadertext);
	obj.className=(obj.className=='blanc')?obj.className='gris':obj.className='blanc';
	var command='doBlink("'+loadertext+'")';
	setTimeout(command,100);
}
function Ahref(page, referertagname){
		//alert(page);
		referer=referertagname;
		var larg=screen.height;
		var haut=screen.width;
		var top =0;
		var left =0;
		var thepop=	window.open(page,'','status=yes,menubar=yes,scrollbars=yes,resizable=yes,top='+top+',left='+left+',width='+larg+',height='+haut);
		//var thepop=	window.open(page,'');
	}; // Fin Ahref


function ShowMentionsLegales(target){
	document.getElementById(target).style.display=(document.getElementById(target).style.display=='none'||document.getElementById(target).style.display=='')?'block':'none';
	document.getElementById(target).scrollIntoView(true);
	//document.getElementById('mentionslegales').style.height=(document.getElementById('mentionslegales').style.height==0||document.getElementById('mentionslegales').style.height=='')?'auto':0;

}

function Addcalendar(){
	varreturn="<script language='javascript' type='text/javascript' src='js/Calendrier-JS.php'></script>";
	document.write(varreturn)
}; // Fin Addclendar

function ADDScrollerMenu(){
	
var LeftMenuDiv="<div id='page_scroller_left' style='position:fixed;left:20px;top:240px;_position: absolute;left:20px;top: expression(body.scrollTop +240 + \"px\");width:10;z-index:1000;'>";
LeftMenuDiv+="<a href='javascript:void(0);' title='Haut de page'  style='display:block;' onmouseout=document.getElementById('st').src='image/scrollTop_over.png' onmouseover=document.getElementById('st').src='image/scrollTop_out.png' onclick='new Effect.ScrollTo(\"header\", {duration: 1}); return false;'><img id='st'  name='st' src='image/scrollTop_over.png' hspace='10' vspace='10' border='0' width='10' height='9' align='absmiddle'></a>";
LeftMenuDiv+="<a href='javascript:void(0);' title='Vers la gauche'  style='display:block;' onmouseout=document.getElementById('g').src='image/g_derniere_over.png' onmouseover=document.getElementById('g').src='image/g_derniere_out.png' onclick='X_WindoScroll(\"left\",\"-\");return false;'><img id='g'  name='g' src='image/g_derniere_over.png' hspace='10' vspace='5' border='0' width='10' height='9' align='absmiddle'></a>";
LeftMenuDiv+="<a href='javascript:void(0);' title='Vers la droite'  style='display:block;' onmouseout=document.getElementById('d').src='image/d_derniere_over.png' onmouseover=document.getElementById('d').src='image/d_derniere_out.png' onclick='X_WindoScroll(\"right\",\"+\");return false;'><img id='d'  name='d' src='image/d_derniere_over.png' hspace='10' vspace='5' border='0' width='10' height='9' align='absmiddle'></a>";
LeftMenuDiv+="<a href='javascript:void(0);' title='Pied de page'  style='display:block;' onmouseout=document.getElementById('sd').src='image/scrollDown_over.png' onmouseover=document.getElementById('sd').src='image/scrollDown_out.png' onclick='new Effect.ScrollTo(\"footer\", {duration: 1}); return false;'><img id='sd'  name='st' src='image/scrollDown_over.png' hspace='10' vspace='10' border='0' width='10' height='9' align='absmiddle'></a>";
LeftMenuDiv+="</div>";
var RightMenuDiv="<div id='page_scroller_right' style='position:fixed;right:20px;top:240px;_position: absolute;right:20px;top: expression(body.scrollTop +240 + \"px\");width:10;z-index:1000;'>";
RightMenuDiv+="<a href='javascript:void(0);' title='Haut de page'  style='display:block;' onmouseout=document.getElementById('st_r').src='image/scrollTop_over.png' onmouseover=document.getElementById('st_r').src='image/scrollTop_out.png' onclick='new Effect.ScrollTo(\"header\", {duration: 1}); return false;'><img id='st_r'  name='st_r' src='image/scrollTop_over.png' hspace='10' vspace='10' border='0' width='10' height='9' align='absmiddle'></a>";
RightMenuDiv+="<a href='javascript:void(0);' title='Vers la gauche'  style='display:block;' onmouseout=document.getElementById('g_r').src='image/g_derniere_over.png' onmouseover=document.getElementById('g_r').src='image/g_derniere_out.png' onclick='X_WindoScroll(\"left\",\"-\");return false;'><img id='g_r'  name='g_r' src='image/g_derniere_over.png' hspace='10' vspace='5' border='0' width='10' height='9' align='absmiddle'></a>";
RightMenuDiv+="<a href='javascript:void(0);' title='Vers la droite'  style='display:block;' onmouseout=document.getElementById('d_r').src='image/d_derniere_over.png' onmouseover=document.getElementById('d_r').src='image/d_derniere_out.png' onclick='X_WindoScroll(\"right\",\"+\");return false;'><img id='d_r'  name='d_r' src='image/d_derniere_over.png' hspace='10' vspace='5' border='0' width='10' height='9' align='absmiddle'></a>";
RightMenuDiv+="<a href='javascript:void(0);' title='Pied de page'  style='display:block;' onmouseout=document.getElementById('sd_r').src='image/scrollDown_over.png' onmouseover=document.getElementById('sd_r').src='image/scrollDown_out.png' onclick='new Effect.ScrollTo(\"footer\", {duration: 1}); return false;'><img id='sd_r'  name='sd_r' src='image/scrollDown_over.png' hspace='10' vspace='10' border='0' width='10' height='9' align='absmiddle'></a>";
RightMenuDiv+="</div>";
//document.body.innerHTML+=RightMenuDiv+LeftMenuDiv;
document.write(RightMenuDiv+LeftMenuDiv);
}; // Fin ADDScrollerMenu



function iPhoneDetect() {
	//alert(document.referrer );
 if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))||(navigator.userAgent.indexOf('Gecko') !=-1)){
  window.location.href = "http://www.mlj66.org/iphone_index.php";
 }
}
//iPhoneDetect();

var tickers0 = new neo_newsbox('tickers0',181,210,'Tickerpyr','tickers01',800,15000,true,1);
var neo_Layer=new DAZ_class_PopLayer('neo_Layer',200,200,8000,2000,1,'hv','middle','center',3,1,3,10,0,'object1',2,1,1,1,'MainContenerneo_Layer');
var neo_Draggable=new DAZ_class_GetDraggable('neo_Draggable','draggableobject','MainContenerneo_Layer',200,200,3,2,1,false);
	
var neo_Layer1=new DAZ_class_PopLayer('neo_Layer1',200,200,8000,2,1,'hv','top','center',3,1,3,10,1,'object2',2,1,1,1,'MainContenerneo_Layer1');
var neo_Draggable1=new DAZ_class_GetDraggable('neo_Draggable1','draggableobject','MainContenerneo_Layer1',200,200,3,1,1,false,0);
var AgendaInfoBulle_Layer=new DAZ_class_PopLayer('AgendaInfoBulle_Layer',200,200,8000,2,1,'hv','top','right',3,1,3,10,1,'object3',2,1,0,0,'AgendaInfoBulle');
var DynamicMenu1=new ooDAZ_class_SearchEngine("DynMenu0","DynamicMenu1","link","image/menu-close.gif","image/menu-open.gif",true,"fic",181,"dl",1,"admin","black");

function CallDo_Pos_Content(){
		Do_Pos_Content('CONTENT_0','anchor1',0,'-',0,'+');
		Do_Pos_Content('BG0','bg0anchor',220,'-',287,'-');
		Do_Pos_Content('Accessibility_menu','anchor-iso',0,'-',32,'+');
 		ds_sh(document.getElementById('rechercheranchor'));
		Do_Pos_Content('banner_partenaires','rechercheranchor',60,'+',220,'+');


}; // Fin CallDo_Pos_Content
function IniTPaves(){
	neo_Layer.Init();
	neo_Draggable.Init();
}

function InitFooter(){
	if(document.body!=null){
		FpMlj66.Init();
		FpMlj66.Load();
		if(!timeInitFooter==null){
			clearTimeout(timeInitFooter);
		}
	}else{
	alert('attend');
		var timeInitFooter=setTimeout("InitFooter()",10);
	}
}
var FpMlj66=new ooDAZ_class_SearchEngine("FpMlj661","FpMlj66","link","image/MENUS_orange_close.png","image/MENUS_orange_open.png",true,"fic","LA_MISSION_LOCALE",181,"dl",1,"admin","white");
//InitFooter();
function Init(){
	if(document.body!=null){
		window.onresize=CallDo_Pos_Content;
		CallDo_Pos_Content();
		tickers0.addnews("<div class='news' id='news0' onmouseover=this.className='newsover' onmouseout=this.className='news' onclick=popprint('print.php','newstoprint0',650,500)><table class='date' valign='top'><tr><td><span>16</span></td><td>&nbsp;AOû</td></tr><tr><td height='1' bgcolor='#cccccc' colspan='2'></td></tr><tr><td colspan='2'><span>2010</span></td></tr></table><p class='contenu'><b style='color:#FF9900;'>Mieux manger pour un mieux être</b><br>La MLJ propose des <strong>ateliers nutrition </strong class='orange'>à tous les jeunes inscrits au sein de la Mission Locale. Ces ateliers ont deux objectifs : <br /><br />• la prise de conscience sur les choix alimentaires<br />• la sensibilisation et l'information sur le choix et la maîtrise des achats pour une bonne gestion du budget.<br /><br /> Ces ateliers collectifs ou individuels, en partenariat avec le Comité des diététiciens nutritionnistes des P.O, peuvent se réaliser sur l'ensemble des points d'accueil de la MLJ. Pour participer à un atelier, <a style='FONT-WEIGHT: bold; COLOR: #000000' href='http://www.mlj66.org/localisation.php' target='_blank'>contactez l'antenne MLJ dont vous dépendez</a>. ... </p></div>",false,'');tickers0.addnews("<div class='news' id='news1' onmouseover=this.className='newsover' onmouseout=this.className='news' onclick=popprint('print.php','newstoprint1',650,500)><table class='date' valign='top'><tr><td><span>13</span></td><td>&nbsp;AOû</td></tr><tr><td height='1' bgcolor='#cccccc' colspan='2'></td></tr><tr><td colspan='2'><span>2010</span></td></tr></table><p class='contenu'><b style='color:#FF9900;'>Partenariat logement</b><br>Une nouvelle convention de partenariat vient d'être établie. Elle concerne <strong>l'accompagnement pour le logement autonome des jeunes</strong> avec la société SCOP'IN IMMO.<br /><br />La vocation commune de lutte contre l'exclusion et la discrimination des jeunes dans la recherche de logement a amené les deux strcuctures à se rapprocher. Ainsi, certains dossiers de demande de logement de jeunes établis par la MLJ pourront être présentés et étudiés par notre partenaire. Par la suite SCOP'IN IMMO assurera des <strong>mises en relation avec des bailleurs privés</strong> et ainsi tentera de faciliter l'accès au logement des jeunes inscrits à la MLJ. Pour une orientation vers notre partenaire, chaque demande sera au préalable étudiée dans le cadre des ateliers logement mis en place à l'antenne MLJ de la rue Dupont, à Perpignan.<br /><br /><strong>Pour plus d'informations, <a style='FONT-WEIGHT: bold; COLOR: #000000' href='http://www.mlj66.org/localisation.php' target='_blank'>se rapprocher d'un conseiller </a>ou téléphoner au <strong>04.68.34.26.61.</strong> ... </p></div>",false,'');tickers0.addnews("<div class='news' id='news2' onmouseover=this.className='newsover' onmouseout=this.className='news' onclick=popprint('print.php','newstoprint2',650,500)><table class='date' valign='top'><tr><td><span>12</span></td><td>&nbsp;AOû</td></tr><tr><td height='1' bgcolor='#cccccc' colspan='2'></td></tr><tr><td colspan='2'><span>2010</span></td></tr></table><p class='contenu'><b style='color:#FF9900;'>Projet de création d'entreprise ? </b><br>La Mission Locale Jeunes s'est engagée à orienter des jeunes ayant un projet de création d'entreprise vers l'association Performance Catalane. Cette nouvelle convention de partenariat permettra à chaque jeune qui est en phase de projet de création d'entreprise de bénéficier gratuitement de la compétence de ce cabinet d'accompagnement.<br /><br />Pour être orienté vers Catalane Performance, merci de vous rapprocher de votre conseiller en lui faisant part de votre projet ou téléphoner au <strong>04.68.34.26.61</strong> pour plus d'informations. ... </p></div>",false,'');tickers0.addnews("<div class='news' id='news3' onmouseover=this.className='newsover' onmouseout=this.className='news' onclick=popprint('print.php','newstoprint3',650,500)><table class='date' valign='top'><tr><td><span>09</span></td><td>&nbsp;AOû</td></tr><tr><td height='1' bgcolor='#cccccc' colspan='2'></td></tr><tr><td colspan='2'><span>2010</span></td></tr></table><p class='contenu'><b style='color:#FF9900;'>Votre salaire en ligne</b><br>Depuis le 1er janvier 2010, le montant du SMIC horaire à augmenté. Il est passé de 8,82€ à 8,86€ brut de l’heure. Le salaire brut mensuel d’un salarié à 35h semaine s’élève donc à 1343,77€.<br><br>Par ailleurs, avec l’entrée en vigueur des nouvelles régles de revalorisation, la prochaine augmentation du SMIC aura lieu en janvier 2011.<br><br>Tous les salaires en fonction de votre contrat, <a href='http://www.mlj66.org/DL/EMPLOI/GRILLES_SALAIRES_2010.pdf' target='_blank'>cliquez ici</a> ... </p></div>",false,'');tickers0.addnews("<div class='news' id='news4' onmouseover=this.className='newsover' onmouseout=this.className='news' onclick=popprint('print.php','newstoprint4',650,500)><table class='date' valign='top'><tr><td><span>05</span></td><td>&nbsp;AOû</td></tr><tr><td height='1' bgcolor='#cccccc' colspan='2'></td></tr><tr><td colspan='2'><span>2010</span></td></tr></table><p class='contenu'><b style='color:#FF9900;'>Aide à la mobilité</b><br>Afin de résoudre les problèmes de mobilité pouvant se poser pour les jeunes à l'emploi ou en formation, la Mission Locale Jeunes, grâce à ses partenaires financiers peut vous <strong class='orange'>aider pour faciliter vos déplacements et ainsi améliorer votre mobilité </strong>.<br /><br /> Aide aux permis, prêt de scooter, prise en charge de frais de transport... Pour plus d'informations sur ces dispositifs <a style='FONT-WEIGHT: bold; COLOR: #000000' href='http://www.mlj66.org/localisation.php' target='_blank'>renseignez-vous auprès d'un conseiller en insertion professionnelle.</a> ... </p></div>",false,'');tickers0.addnews("<div class='news' id='news5' onmouseover=this.className='newsover' onmouseout=this.className='news' onclick=popprint('print.php','newstoprint5',650,500)><table class='date' valign='top'><tr><td><span>02</span></td><td>&nbsp;AOû</td></tr><tr><td height='1' bgcolor='#cccccc' colspan='2'></td></tr><tr><td colspan='2'><span>2010</span></td></tr></table><p class='contenu'><b style='color:#FF9900;'>Le portail de l'alternance</b><br>La MLJ des Pyrénées Orientales se mobilise aux côtés de Pôle emploi, l’ACFCI, l’APCM, le MEDEF, la CGPME, l’UPA et Centre INFFO, afin de développer la voie de l’alternance en rendant visible des offres de contrat d’apprentissage et de professionnalisation sur un site internet unique. Lancé à l’initiative de Laurent Wauquiez, Secrétaire d’État chargé de l’Emploi auprès de la Ministre de l’Economie, de l’Industrie et de l’Emploi, la mise en place de cette bourse à l’alternance sur internet facilite l’accès des jeunes aux offres d’emploi en alternance et permet d’apporter au public des informations sur l’Alternance et des points d’actualités. <br><br>Consultez le site : <a style='COLOR: #000000' href='http://www.contrat-alternance.gouv.fr' target='_blank'>www.contrat-alternance.gouv.fr</a> ... </p></div>",false,'');		tickers0.init();
		//Accessibility_Onglet_Choice('Text','e');
		setTimeout("IniTPaves()",2000);
		xHide();
		if(!timeInit==null){
			clearTimeout(timeInit);
		}else{
		}
	}else{
		var timeInit=setTimeout("Init()",10);
	}
}

