
var fhDragEnCours=null;var fhDragDrop=fhClasse.creer({initialise:function(qclick,qbouge,redim,fctTermine){this.qclick_=[];this.qbouge_=[];var o=this;this.qbouge=$(qbouge);if(!document.body.aEvenement)fhObjet.etendre(document.body,fhEvenement);this.demarrer=false;this.direction=redim;this.fctCommencer=this.commencer();this.fctDeplacement=this.deplacement(redim);this.fctArreter=this.arreter();this.fctTermine=fctTermine;this.fctPreventionSortie=this.preventionSortie();var nNbClick=0;if((typeof qclick=='object')&&!qclick.tagName){for(var i=0;i<qclick.length;i++){this.qclick_[i]=$(qclick[i]);}
nNbClick=qclick.length;}else{this.qclick_[0]=$(qclick);}
if(!this.qclick_[0].aEvenement)fhObjet.etendre(this.qclick_[0],fhEvenement);this.qclick_[0].ajouterEvenement('mousedown',this.fctCommencer);for(i=1;i<nNbClick;i++){if(!this.qclick_[i].aEvenement)fhObjet.etendre(this.qclick_[i],fhEvenement);this.qclick_[i].ajouterEvenement('mousedown',this.fctCommencer);}
if((typeof qbouge=='object')&&!qbouge.tagName){for(var i=0;i<qbouge.length;i++){this.qbouge_[i]=$(qbouge[i]);}}else{this.qbouge_[0]=$(qbouge);}},positionne:function(event){var n=(parseInt(this.xDepartD)-(this.xDepartS-parseInt(fhSouris.x(event))));if(n<0)n=0;var gauche_=n+"px";n=(parseInt(this.yDepartD)-(this.yDepartS-parseInt(fhSouris.y(event))));if(n<35)n=35
var haut_=n+"px";nNbClick=this.qbouge_.length;for(i=0;i<nNbClick;i++){if(haut_!='i')this.qbouge_[i].style.top=haut_;if(gauche_!='i')this.qbouge_[i].style.left=gauche_;}},redimensionne:function(event){var o=this;if(!o.demarrer)return;var nSourisY=parseInt(fhSouris.y(event));var nSourisX=parseInt(fhSouris.x(event));var haut_='i';var gauche_='i';var largeur_='i';var hauteur_='i';var _diffx_=(nSourisX-o.xDepartS);if(o.qbouge_[0].getAttribute('largeurC')){var _largeur_=Math.round(parseFloat(o.qbouge_[0].getAttribute('largeurC'))*100)/100;}else{var _largeur_=$el.largeur(o.qbouge_[0]);}
if(o.qbouge_[0].getAttribute('hauteurC')){var _hauteur_=Math.round(parseFloat(o.qbouge_[0].getAttribute('hauteurC'))*100)/100;}else{var _hauteur_=$el.hauteur(o.qbouge_[0]);}
if(o.direction.indexOf('n')>=0){n=nSourisY;if((o.yDepartD-n+o.hDepart)<=0)return;if(n<0)n=0;haut_=n+'px';hauteur_=(o.yDepartD-n+o.hDepart)+'px';}
if(o.direction.indexOf('s')>=0){if(o.direction.indexOf('p')>=0){var prop=o.qbouge_[0].getAttribute("shProportion");var n=parseFloat(_hauteur_+(_diffx_*prop));if(n>=1){hauteur_=fhPx(n);}else hauteur_='1px';}else{var n=o.yDepartS-o.diffYDepart-o.yDepartD;o.yDepartS=nSourisY;if(n>=1){hauteur_=fhPx(n);}else hauteur_='1px';}
if(o.direction.indexOf('b')>=0){o.qclick_[0].style.top=fhPx(nSourisX);}}
if(o.direction.indexOf('e')>=0){var n=_largeur_+_diffx_;if(n>=1)largeur_=n+'px';else largeur_='1px';o.xDepartS=nSourisX;if(o.direction.indexOf('b')>=0){o.qclick_[0].style.left=fhPx(nSourisX);}}
if(o.direction.indexOf('o')>=0){n=nSourisX+(o.xDepartD-o.xDepartS);if(n<0)n=0;var nDiff=n-o.xDepartD;gauche_=n+'px';o.xDepartS=nSourisX;o.xDepartD=n;if(o.qbouge_[0].getAttribute('largeurC')){var n=parseInt(o.qbouge_[0].getAttribute('largeurC'))-nDiff;}else{var n=parseInt($el.largeur(o.qbouge[0]))-nDiff;}
largeur_=n+'px';}
nNbClick=o.qbouge_.length;for(var i=0;i<nNbClick;i++){if(hauteur_!='i'){o.qbouge_[i].style.height=hauteur_;o.qbouge_[i].setAttribute('hauteurC',hauteur_);}
if(largeur_!='i'){$el.largeurMax(o.qbouge_[i],largeur_);o.qbouge_[i].setAttribute('largeurC',largeur_);}
if(haut_!='i'){o.qbouge_[i].style.top=haut_;o.qbouge_[i].setAttribute('hautC',haut_);}
if(gauche_!='i'){o.qbouge_[i].style.left=gauche_;o.qbouge_[i].setAttribute('gaucheC',gauche_);}}},commencer:function(){var o=this;return function(event){event=fhEvenement(event);document.body.ajouterEvenement('mousemove',o.fctDeplacement);document.body.ajouterEvenement('mouseup',o.fctArreter);o.xDepartD=parseInt(o.qbouge_[0].offsetLeft);o.yDepartD=parseInt(o.qbouge_[0].offsetTop);o.xDepartS=parseInt(fhSouris.x(event));o.yDepartS=parseInt(fhSouris.y(event));o.hDepart=parseInt($el.hauteur(o.qbouge_[0]));o.lDepart=parseInt($el.hauteur(o.qbouge_[0]));o.diffYDepart=o.yDepartS-(o.yDepartD+parseInt($el.hauteur(o.qbouge_[0])));o.diffXDepart=o.xDepartS-(o.xDepartD+parseInt($el.largeur(o.qbouge_[0])));o.demarrer=true;document.onselectstart=function(){return false;};document.body.onselectstart=function(){return false;};fhEvenement.arreter(event);}},arreter:function(){var o=this;return function(event){o.demarrer=false;document.onselectstart=function(){};document.body.onselectstart=function(){};document.body.enleverEvenement('mousemove',o.fctDeplacement);document.body.enleverEvenement('mouseup',o.fctArreter);if(o.fctTermine)o.fctTermine();return false;}},desactiver:function(){nNbClick=this.qclick_.length;for(i=1;i<nNbClick;i++){this.qclick_[i].enleverEvenement('mousedown',this.fctCommencer);}},preventionSortie:function(){var o=this;return function(event){o.deplacement()(event);}},deplacement:function(redim){var o=this;if(!redim){return function(event){event=fhEvenement(event);if(o.demarrer){o.positionne(event);}}}else{return function(event){event=fhEvenement(event);if(o.demarrer){o.redimensionne(event);}}}}});var fhDrop=fhClasse.creer({initialise:function(el){this.element=el;var fils=el.childNodes;var n=fils.length;for(var i=0;i<n;i++){fhObjet.etendre(fils[i],fhEvenement);fils[i].ajouterEvenement('mousemove',this.onMouseMove());}
this.emplacement=document.createElement('div');this.emplacement.style.display='none';this.emplacement.className='rectangle';this.emplacement.style.width=$el.largeur(el);this.emplacement.id='testsaray';el.appendChild(this.emplacement);},onMouseMove:function(event){var o=this;return function(){if(!this.previousSibling||(this.previousSibling.id!=o.emplacement.id)){o.emplacement.style.display='';o.element.insertBefore(o.emplacement,this);}}},arreter:function(){this.element.removeChild(this.emplacement);var fils=el.childNodes;var n=fils.length;for(var i=0;i<n;i++){fils[i].enleverEvenement('mousemove',this.onMouseMove());}}});var fhGestionDrags={fenDrag:null,dragElement:{element:null},elSelection:null,fenDragDessus:null,dragConts:null,conteneurActif:null,fenDragDessusSE:null,modeDrag:false,idRedim:null,sourisDown:false,demarreDragDrop:false,zIndex:0,ajouter:function(){var els=arguments;for(var i=0;i<els.length;i++){fhObjet.etendre($(els[i]),fhEvenement);var o=$(els[i]);$(els[i]).ajouterEvenement('click',fhGestionDrags.ajouter_($(els[i])));}},initialiser:function(){fhGestionDrags.modeDrag=!fhGestionDrags.modeDrag;fhMenuDroit.afficher=!fhGestionDrags.modeDrag;fhBoutonEditer.affiche=!fhGestionDrags.modeDrag;getElementsByClassName('a',document.body,function(el){el.onclick=function(){return false;}});elementsParAttribut('fhFlecheRedimV','true',document.body,function(el){var img=document.createElement('img');document.body.appendChild(img);img.src='./icones/mini/fleche_horizontal.png';img.style.height='16px';img.style.width='16px';img.style.position='absolute';img.style.cursor='move';img.style.top=fhPx($el.cY(el)+el.offsetHeight/2);img.style.left=fhPx($el.cX(el)+el.offsetWidth-8);img.style.zIndex=2;fhGestionDrags.arreteRedim=new fhDragDrop(img,el,'eb',function(){try{fhBoutENREGISTRE_POSITION_PAGE.click();}catch(e){fhBoutENREGISTRE_POSITION_SITE.click();}});});elementsParAttribut('fhFlecheRedimH','true',document.body,function(el){var img=document.createElement('img');document.body.appendChild(img);img.src='./icones/mini/fleche_vertical.png';img.style.height='16px';img.style.width='16px';img.style.position='absolute';img.style.cursor='move';img.style.top=fhPx($el.cY(el)+el.offsetHeight-8);img.style.left=fhPx($el.cX(el)+el.offsetWidth/2);img.style.zIndex=2;fhGestionDrags.arreteRedim=new fhDragDrop(img,el,'sb',function(){try{fhBoutENREGISTRE_POSITION_PAGE.click();}catch(e){fhBoutENREGISTRE_POSITION_SITE.click();}});});},ajouter_:function(el){return function(){if(el.parentNode.className.indexOf("milieu")==-1){var fen=fhFenetres.ajouter({element:el});new fhDrop($("aDroper2"));}}},initConteneurs:function(elDrag,attribut,valeur){fhGestionDrags.dragConts=elementsParAttribut(attribut,valeur);for(var i=0;i<fhGestionDrags.dragConts.length;i++){fhGestionDrags.initAttribCont(fhGestionDrags.dragConts[i]);for(var j=0;j<fhGestionDrags.dragConts[i].childNodes.length;j++){if((fhGestionDrags.dragConts[i].childNodes[j].nodeName=='#text')||(fhGestionDrags.dragConts[i].childNodes[j]==elDrag))continue;fhGestionDrags.initAttribCont(fhGestionDrags.dragConts[i].childNodes[j]);}}},initAttribCont:function(el){with(el){var pos=$el.cXY(el);setAttribute('largeurD',parseInt(offsetWidth));setAttribute('hauteurD',parseInt(offsetHeight));setAttribute('gaucheD',pos.x);setAttribute('hautD',pos.y);}},selectionne:function(el){return function(event){if(fhGestionDrags.modeDrag){fhGestionDrags.sourisDown=true;fhGestionDrags.dragElement.commenceDrag=false;fhObjet.etendre(fhGestionDrags.fenDragDessus,fhEvenement);$el.cadreDessus(fhGestionDrags.fenDragDessus,el);fhGestionDrags.prepareRedim(event,el);fhGestionDrags.prepareDrag(event,el);fhGestionDrags.elSelection=el;if($el.recupStyle(el,'position')){el.style.position=$el.recupStyle(el,'position');}
fhGestionDrags.zIndex=1;for(i=0;i<el.parentNode.childNodes.length;i++){if(el.parentNode.childNodes[i].style){if(el.parentNode.childNodes[i].style.zIndex>fhGestionDrags.zIndex){fhGestionDrags.zIndex=el.parentNode.childNodes[i].style.zIndex;}}}
fhEvenement.arreter(event);}}},positionne:function(position,valeur){if(position=='relative'){fhGestionDrags.elSelection.style.position='relative';fhGestionDrags.elSelection.style.cssFloat=valeur;fhGestionDrags.elSelection.style.styleFloat=valeur;fhGestionDrags.elSelection.style.top="0px";fhGestionDrags.elSelection.style.left="0px";fhGestionDrags.elSelection.removeAttribute('gaucheC');fhGestionDrags.elSelection.removeAttribute('hautC');fhGestionDrags.elSelection.setAttribute('positionC','relative');fhGestionDrags.elSelection.setAttribute('floatC',valeur);}else{if(position=='absolute'){fhGestionDrags.elSelection.style.top=fhPx($el.cY(fhGestionDrags.elSelection));fhGestionDrags.elSelection.style.left=fhPx($el.cX(fhGestionDrags.elSelection));fhGestionDrags.elSelection.style.position='absolute';if(valeur=='+'){fhGestionDrags.elSelection.style.zIndex=fhGestionDrags.zIndex++;}else{fhGestionDrags.elSelection.style.zIndex=fhGestionDrags.zIndex--;}
fhGestionDrags.elSelection.setAttribute('positionC','absolute');fhGestionDrags.elSelection.setAttribute('gaucheC',fhGestionDrags.elSelection.style.left);fhGestionDrags.elSelection.setAttribute('hautC',fhGestionDrags.elSelection.style.top);fhGestionDrags.elSelection.setAttribute('zIndexC',fhGestionDrags.zIndex);}}
$el.cadreDessus(fhGestionDrags.fenDragDessus,fhGestionDrags.elSelection);},prepareRedim:function(event,el){if(fhGestionDrags.modeRedim||fhGestionDrags.modeDrag){fhGestionDrags.initCarreRedim();var tab=[];if(el.getAttribute("avecfils")){tab.push(el.firstChild);}
var proportion='se';if(el.getAttribute("proportion")){proportion+='p';if(el.getAttribute("avecfils")){el.firstChild.setAttribute("shProportion",parseFloat($el.hauteur(el.firstChild))/parseFloat($el.largeur(el.firstChild)))}else{el.setAttribute("shProportion",parseFloat($el.hauteur(el))/parseFloat($el.largeur(el)));}}
tab.push(el,fhGestionDrags.fenDragDessus);fhGestionDrags.arreteRedim=new fhDragDrop(fhGestionDrags.fenDragDessusSE,tab,proportion);}},prepareDrag:function(event,el){if(fhGestionDrags.modeDrag||fhGestionDrags.modeRedim){event=fhEvenement(event);fhGestionDrags.dragElement.element=el;fhGestionDrags.initConteneurs(el,'fhStructure','conteneur');document.body.ajouterEvenement('mousemove',fhGestionDrags.enDeplacement);document.body.ajouterEvenement('mouseup',fhGestionDrags.drop);fhGestionDrags.fenDragDessus.onmousedown=fhGestionDrags.selectionne(el);}},initDragElements:function(){var drags=elementsParAttribut('draggable','',document.body);for(var i=0;i<drags.length;i++){with(drags[i]){fhObjet.etendre(drags[i],fhEvenement);drags[i].ajouterEvenement('mousedown',fhGestionDrags.selectionne(drags[i]));}}
fhGestionDrags.initFenDragDrop();},intDragElement:function(el){fhObjet.etendre(el,fhEvenement);el.ajouterEvenement('mousedown',fhGestionDrags.selectionne(el));},initFenDragDrop:function(){if(!fhGestionDrags.fenDrag){fhGestionDrags.fenDrag=document.createElement('DIV');fhGestionDrags.fenDrag.style.cssText='position:absolute;display:none;z-index:1;';document.body.appendChild(fhGestionDrags.fenDrag);fhGestionDrags.fenDragDessus=document.createElement('DIV');fhGestionDrags.fenDragDessus.style.cssText='position:absolute;cursor:move;border:1px dotted black;display:none;z-index:2;';document.body.appendChild(fhGestionDrags.fenDragDessus);fhGestionDrags.initCarreRedim();}},initCarreRedim:function(){fhGestionDrags.initFenetre(fhGestionDrags.fenDragDessus);fhGestionDrags.fenDragDessusSE=document.createElement('DIV');fhGestionDrags.fenDragDessusSE.style.cssText='cursor:nw-resize;font-size:6px;position:absolute;border:2px solid black;background-color:#ffffff;height:6px;width:6px;bottom:0px;right:0px;z-index:3;';fhGestionDrags.fenDragDessus.appendChild(fhGestionDrags.fenDragDessusSE);},drop:function(){var el=fhGestionDrags.dragElement.element;fhGestionDrags.sourisDown=false;if(el){if(fhGestionDrags.elSelection.style.position!='absolute'){if(fhGestionDrags.modeDrag){if(el.style.display=='none'){if(fhGestionDrags.dragElement.sonSuivant){fhGestionDrags.dragElement.sonParent.insertBefore(el,fhGestionDrags.dragElement.sonSuivant);}else{fhGestionDrags.dragElement.sonParent.appendChild(el);}}}}else{if(fhGestionDrags.dragElement.commenceDrag){el.style.left=fhGestionDrags.fenDrag.getAttribute('gaucheC');el.style.top=fhGestionDrags.fenDrag.getAttribute('hautC');el.setAttribute('coordC',fhGestionDrags.fenDrag.getAttribute('gaucheC')+';'+fhGestionDrags.fenDrag.getAttribute('hautC'));}}
fhGestionDrags.fenDrag.style.display='none';fhGestionDrags.initFenetre(fhGestionDrags.fenDrag);el.style.display='';el.style.visibility='visible';$el.opacite(el,100);el.setAttribute('draggable',true);$el.cadreDessus(fhGestionDrags.fenDragDessus,el);}
fhGestionDrags.dragElement.commenceDrag=false;if(fhGestionDrags.arreteRedim){fhGestionDrags.arreteRedim.desactiver();}
fhGestionDrags.arreteRedim=null;fhGestionDrags.dragElement.element=null;document.body.enleverEvenement('mousemove',fhGestionDrags.enDeplacement);},enDeplacement:function(event){if(!fhGestionDrags.sourisDown)return;event=fhEvenement(event);if(!fhGestionDrags.dragElement.commenceDrag){fhGestionDrags.dragElement.commenceDrag=true;fhGestionDrags.placeDansFenDragDrop(fhGestionDrags.dragElement.element,event);if(fhGestionDrags.fenDrag.firstChild.getAttribute('draggable')){fhGestionDrags.dragElement.element.setAttribute('largeurD',parseInt(fhGestionDrags.fenDrag.offsetWidth));fhGestionDrags.dragElement.element.setAttribute('hauteurD',parseInt(fhGestionDrags.fenDrag.offsetHeight));fhGestionDrags.fenDrag.firstChild.removeAttribute('draggable');fhGestionDrags.dragElement.element.style.display='none';}}
var el=fhGestionDrags.dragElement.element;var yPos=fhSouris.yCourant-fhGestionDrags.dragElement.positionSouris.y;var xPos=fhSouris.xCourant-fhGestionDrags.dragElement.positionSouris.x;window.defaultStatus=(fhSouris.xCourant-fhGestionDrags.dragElement.positionSouris.x)+' '+fhSouris.xCourant+' '+fhSouris.yCourant;fhGestionDrags.fenDrag.style.top=fhPx(yPos);fhGestionDrags.fenDrag.style.left=fhPx(xPos);fhGestionDrags.fenDragDessus.style.top=fhPx(yPos);fhGestionDrags.fenDragDessus.style.left=fhPx(xPos);fhGestionDrags.fenDrag.setAttribute('hautC',fhPx(yPos));fhGestionDrags.fenDrag.setAttribute('gaucheC',fhPx(xPos));if(fhGestionDrags.elSelection.style.position!='absolute'){var contActif=fhGestionDrags.conteneurActif_();var beforeNode=null;if(contActif){for(var i=contActif.childNodes.length-1;i>=0;i--){with(contActif.childNodes[i]){if(nodeName=='#text')continue;if(el!=contActif.childNodes[i]&&((parseInt(getAttribute('gaucheD'))+parseInt(getAttribute('largeurD')))>xPos)&&((parseInt(getAttribute('hautD'))+parseInt(getAttribute('hauteurD')))>yPos)){beforeNode=contActif.childNodes[i];}}}
if(beforeNode){if(beforeNode!=el.nextSibling){contActif.insertBefore(el,beforeNode);}}else{if((el.nextSibling)||(el.parentNode!=contActif)){contActif.appendChild(el);}}
fhGestionDrags.dragElement.sonParent.setAttribute("fhModifieConteneur",true);contActif.setAttribute("fhModifieConteneur",true);setTimeout(function(){fhGestionDrags.initAttribCont(contActif);},5);if(el.style.display!=''){el.style.display='';el.style.visibility='visible';$el.opacite(el,30);}}else{if(el.style.display!='none'){el.style.display='none';$el.opacite(el,100);}}}},conteneurActif_:function(){fhGestionDrags.conteneurActif=null;var xPos=fhSouris.xCourant-fhGestionDrags.dragElement.positionSouris.x+(parseInt(fhGestionDrags.dragElement.element.getAttribute('largeurD'))/2);var yPos=fhSouris.yCourant-fhGestionDrags.dragElement.positionSouris.y+(parseInt(fhGestionDrags.dragElement.element.getAttribute('hauteurD'))/2);for(var i=0;i<fhGestionDrags.dragConts.length;i++){with(fhGestionDrags.dragConts[i]){if((parseInt(getAttribute('gaucheD'))<xPos)&&(parseInt(getAttribute('hautD'))<yPos)&&((parseInt(getAttribute('gaucheD'))+parseInt(getAttribute('largeurD')))>xPos)&&((parseInt(getAttribute('hautD'))+parseInt(getAttribute('hauteurD')))>yPos)){fhGestionDrags.conteneurActif=fhGestionDrags.dragConts[i];return fhGestionDrags.conteneurActif;}}}},initFenetre:function(el){for(var i=0;i<el.childNodes.length;i++)el.removeChild(el.childNodes[i]);},placeDansFenDragDrop:function(el,event){fhGestionDrags.dragElement.element=el;fhGestionDrags.dragElement.sonParent=el.parentNode;fhGestionDrags.dragElement.sonSuivant=el.nextSibling;fhGestionDrags.dragElement.positionSouris=$el.sXY(el,event);var yPos=fhSouris.yCourant-fhGestionDrags.dragElement.positionSouris.y;var xPos=fhSouris.xCourant-fhGestionDrags.dragElement.positionSouris.x;fhGestionDrags.fenDrag.style.top=fhPx(yPos);fhGestionDrags.fenDrag.style.left=fhPx(xPos);fhGestionDrags.initFenetre(fhGestionDrags.fenDrag);fhGestionDrags.fenDrag.style.display='block';var el_=el.cloneNode(true);el_.style.position='relative';el_.style.cssFloat='';el_.style.styleFloat='';el_.style.top='0px';el_.style.left='0px';fhGestionDrags.fenDrag.appendChild(el_);$el.cadreDessus(fhGestionDrags.fenDrag,el,true);$el.cadreDessus(fhGestionDrags.fenDragDessus,fhGestionDrags.fenDrag);},dataEnregistreAttribut:function(attrib,section_){var drags=elementsParAttribut(attrib,'',document.body);var s='';var section='';for(var i=0;i<drags.length;i++){if(!(section=drags[i].getAttribute('shSection'))){if(drags[i].offsetParent&&drags[i].offsetParent.getAttribute){section=drags[i].offsetParent.getAttribute('shSection');}}
if(section){s+='&'+section+'---'+section_+'='+drags[i].getAttribute(attrib);}}
return s;},dataEnregistreAttributs:function(data){var drags=elementsParAttribut('fhModifieConteneur','',document.body);var s='';var sc='';var section='';for(var i=0;i<drags.length;i++){if(section=drags[i].getAttribute('shSection')){s+='&'+drags[i].getAttribute('shSection')+'---contenu=';sc='';if(drags[i].getAttribute('shfLireFils')=='true'){for(var j=0;j<drags[i].childNodes.length;j++){if((drags[i].childNodes[j].getAttribute)&&(drags[i].childNodes[j].getAttribute('shSection'))){sc+=HechapEtS('<--'+drags[i].childNodes[j].getAttribute('shType')+'-id:'+drags[i].childNodes[j].getAttribute('shSection')+';cid:oui%C2%A7-->');}else{if(drags[i].childNodes[j].innerHTML){sc+=HechapEtS(drags[i].childNodes[j].innerHTML);}}}
if(sc=='')sc="<p>&nbsp;</p>";s+=sc;}}}
s+=fhGestionDrags.dataEnregistreAttribut('hauteurC','hauteur');s+=fhGestionDrags.dataEnregistreAttribut('largeurC','largeur');s+=fhGestionDrags.dataEnregistreAttribut('positionC','position');s+=fhGestionDrags.dataEnregistreAttribut('floatC','float');s+=fhGestionDrags.dataEnregistreAttribut('zIndexC','zIndex');s+=fhGestionDrags.dataEnregistreAttribut('coordC','_xy_');enregistre_format_php(data+s,'info','maj_wysiwyg');},supprimerSelection:function(){fhGestionDrags.elSelection.parentNode.setAttribute("fhModifieConteneur",true);fhGestionDrags.elSelection.parentNode.removeChild(fhGestionDrags.elSelection);fhGestionDrags.elSelection=null;fhGestionDrags.fenDrag.style.display='none';fhGestionDrags.fenDragDessus.style.display='none';}};fhDesign={ajouteImage:function(nom){if(!nom){new fhFenetreInput({message:'Veuillez entrer le nom de l\'image :',defaut:'image1',fonction:function(nom){fhDesign.ajouteImage(nom)}});return;}else{nom=fhValideNom(nom);var cimage=document.createElement('DIV');cimage.className=nom;cimage.setAttribute('shType','image');cimage.setAttribute('shSection',nom);cimage.setAttribute('avecfils','true');cimage.setAttribute('draggable','sh');cimage.style.cssText="height: 100px; width: 100px; float:left; cursor: pointer;position:relative;";var image=document.createElement('IMG');image.src='/icones/mini/photo.png';image.style.cssText="height: 100px; width: 100px; float:left; cursor: pointer;position:relative;";image.className='img_'+nom+' sansbord';image.title=nom;image.alt=nom;cimage.appendChild(image);if($('P').firstChild){$('P').insertBefore(cimage,$('P').firstChild);}else{$('P').appendChild(cimage);}
fhGestionDrags.intDragElement(cimage);}},ajouteTexte:function(nom){if(!nom){new fhFenetreInput({message:'Veuillez entrer le nom de la balise texte :',defaut:'texte1',fonction:function(nom){fhDesign.ajouteTexte(nom)}});return;}else{nom=fhValideNom(nom);var ctexte=document.createElement('DIV');ctexte.className=nom;ctexte.setAttribute('shType','balise_texte');ctexte.setAttribute('shSection',nom);ctexte.setAttribute('draggable','true');ctexte.style.cssText="height: 100px; width: 100px; float:left; cursor: pointer;";ctexte.innerHTML=nom;if($('P').firstChild){$('P').insertBefore(ctexte,$('P').firstChild);}else{$('P').appendChild(ctexte);}
fhGestionDrags.intDragElement(ctexte);}}}
function fhEnregistrePositionElements(data){return fhGestionDrags.dataEnregistreAttributs(data);}