
if(!Ne)var Ne={};Ne.Explorer=new Class({Implements:[new Events,new Options],initialize:function(options){this.content='';this.aspect='icons';this.currentPath=0;this.height=50;this.size=12;this.slider;this.sortIsAsc=true;this.lastSort="nom";this.dlList=new Array();this.elToPaste=false;this.action="copy";this.isEditingComment=false;this.previewExtension=["jpg","gif","png","pdf","swf","flv","rv","rm","rmvb","mov","wmv","mp3","html","txt","js"];$("mainPanel").removeEvents();$("mainPanel").addEvent('endUpload',function(e){this.explorer(this.currentPath);}.bind(this));$("mainPanel").addEvent('mousewheel',function(e){if(e.control)
{e.stop();if(e.wheel<0)
this.setSize(this.size-1,true);else
this.setSize(this.size+1,true);}}.bind(this));this.slider=new Slider($('area3'),$('knob3'),{steps:30,range:[30,-5],mode:'vertical',onChange:function(step){if(step<0)
{this.slider.set(-5);this.setSize(4,false);}
else if(step>=0&&step<5)
{this.slider.set(0);this.setSize(5,false);}
else
if(step!=this.size)
this.setSize(step,false);}.bind(this)}).set(this.size);$('mainPanel').innerHTML='<div id="mainPanel_content"></div>';var headerContentHTML='<div id="mainPanel_top"><div id="reload"></div><div id="mainPanel_title"></div>';headerContentHTML+='<div id="search"><input type="text" value="'+lang.panelMain.explorer.search+'" id="searchInput"/></div>';headerContentHTML+='<div id="lstViews"></div><div id="views">'+lang.panelMain.explorer.views+'</div></div><div class="both"></div>';headerContentHTML+='<div id="mainPanel_topBar"><div class="item nom" id="sortnom"><div class="background" id="sortbacknom">'+lang.panelMain.colonneTri.nom+'</div></div><div class="item date" id="sortdate"><div class="background" id="sortbackdate">'+lang.panelMain.colonneTri.dateCreation+'</div></div><div class="item type" id="sorttype"><div class="background" id="sortbacktype">'+lang.panelMain.colonneTri.type+'</div></div><div class="item taille" id="sorttaille"><div class="background" id="sortbacktaille">'+lang.panelMain.colonneTri.taille+'</div></div></div>';$('mainPanel_headerContent').innerHTML=headerContentHTML;$('sortnom').addEvent('click',function()
{this.sortContent("nom");}.bind(this));$('sortdate').addEvent('click',function()
{this.sortContent("date");}.bind(this));$('sorttype').addEvent('click',function()
{this.sortContent("type");}.bind(this));$('sorttaille').addEvent('click',function()
{this.sortContent("taille");}.bind(this));$$('div.item').addEvent('mousedown',function(e){e.stop();}.bind(this));$('reload').addEvent('click',function(e){$(document.body).fireEvent("refresh");}.bind(this));$(document.body).removeEvents('refresh');$(document.body).addEvent('refresh',function(){this.explorer(this.currentPath);$(document.body).fireEvent("refreshTree");}.bind(this));$('mainPanel').addEvent('grandesIcones',function(e){this.setSize(30,true);}.bind(this));$('mainPanel').addEvent('petitesIcones',function(e){this.setSize(6,true);}.bind(this));$('mainPanel').addEvent('mosaiques',function(e){this.setSize(5,true);}.bind(this));$('mainPanel').addEvent('details',function(e){this.setSize(-5,true);}.bind(this));$("panelDownload").removeEvents();$("panelDownload").addEvent("delete",function(e)
{this.rmDl(e);}.bind(this));$("panelDownload").addEvent("downloadDlLst",function(e)
{this.downloadDlLst();}.bind(this));$('views').addEvent('click',function(e){e.stopPropagation();$('labelOptionsZoom').setStyle("visibility","visible");$('labelOptionsZoom').setStyle("top",(e.client.y-60)+"px");$('labelOptionsZoom').setStyle("left",(e.client.x-20)+"px");info(lang.panelOptions.info1);$(document.body).addEvent('resetclick',function(e){$('labelOptionsZoom').setStyle("visibility","hidden");info();$(document.body).removeEvents('resetclick');});}.bind(this));$('search').removeEvents();$('searchInput').removeEvents();$('search').addEvent('click',function(e){e.stopPropagation();this.explorer("search/"+$('searchInput').value);}.bind(this));$('searchInput').addEvent('keypress',function(e){e.stopPropagation();if(e.key=='enter')
this.explorer("search/"+$('searchInput').value);return;}.bind(this));$('searchInput').addEvent('click',function(e){e.stopPropagation();if($('searchInput').value==lang.panelMain.explorer.search)
$('searchInput').value="";}.bind(this));},explorer:function(path){path=path.trim();if(!path||path==''||path=='search/')
{MochaUI.notification(lang.panelMain.explorer.pathNotValid);return false;}
this.currentPath=path;dhtmlHistory.add(this.currentPath);new Request.JSON({onRequest:Spinner.show,onSuccess:function(json,txt){if(json==null)
{alertWindow(txt,lang.panelMain.explorer.error);Spinner.hide();}
else
{if(json.informations.path=="null")
{$(document.body).fireEvent("needConnexion");Spinner.hide();$('mainPanel_content').innerHTML=lang.panelMain.contenuConnexion;$('mainPanel_title').innerHTML="/";info(lang.panelMain.info2);}
else
{if(!isUploading&&json.informations.type=="none")
{try
{document.uploadApplet.setMetadata(this.currentPath);}
catch(e){}
currentRep=this.currentPath;}
this.content=json;this.sortIsAsc=!this.sortIsAsc;this.sortContent(this.lastSort);}}}.bind(this)}).get("moteur/explorer.php?dossier="+this.currentPath);},update:function(){html='';if(this.content.dossiers&&this.sortIsAsc)
for(var i=0;i<this.content.dossiers.length;i++)
html+=Ne.Explorer.Draw.draw(this.content.dossiers[i],"dir",this.height,this.aspect);if(this.content.fichiers)
for(var i=0;i<this.content.fichiers.length;i++)
html+=Ne.Explorer.Draw.draw(this.content.fichiers[i],"file",this.height,this.aspect);if(this.content.dossiers&&!this.sortIsAsc)
for(var i=0;i<this.content.dossiers.length;i++)
html+=Ne.Explorer.Draw.draw(this.content.dossiers[i],"dir",this.height,this.aspect);if(this.aspect=="details")
html+="<br/>";$('mainPanel_content').innerHTML=html;$('mainPanel_title').innerHTML='/'+this.content.informations.path;this.addAllEvents();},addAllEvents:function()
{var multiBox=new MultiBox('mb',{useOverlay:false});allElements=$$('div.element');document.ondragstart=function(){return false;};var contextMenu;allElements.each(function(el){el.removeEvents();el.addEvent('dblclick',function(e){e=new Event(e).stopPropagation();tab=this.getIdAndType(el.id);if(tab['type']=="fichier")
location.href="moteur/download.php?id="+tab['id'];else
this.explorer(tab['id']);}.bind(this));el.addEvent('mouseover',function(e){el.removeEvents('mouseover');var coord=el.getCoordinates();var myDrag=new Drag.Move(el,{snap:6,droppables:$('panelDownload'),onSnap:function(e){},onComplete:function(e){this.element.destroy();$('panelDownload').setStyle('background','#f8f8f8');info();},onDrop:function(el,droppable){if(droppable){this.addDl(el.id);}}.bind(this),onDrag:function(e){},onStart:function(e)
{if(this.inDlLst(el.id+"-clone"))
{myDrag.stop();MochaUI.notification(lang.panelMain.explorer.inList);return;}
$('panelDownload').setStyle('background','url(design/folder_dropbox.png) center center no-repeat #f8f8f8');info(lang.panelDownload.info2);var clone=el.clone().setStyles(coord).setStyles({'opacity':0.7,'position':'fixed','z-index':'999'}).inject(document.body);clone.id=el.id+"-clone";myDrag.element=clone;myDrag.mouse.pos['x']=20;myDrag.mouse.pos['y']=20;}.bind(this)});var myDragCopie=new Drag.Move(el,{snap:6,droppables:allElements,onSnap:function(e){},onComplete:function(e){this.element.destroy();},onDrop:function(el,droppable){if(droppable){element=this.getElement(el.id);if(!(this.elToPaste=this.getElement(el.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
if(!(destination=this.getElement(droppable.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
if(destination.type=="fichier"&&this.elToPaste.type=="dossier"||destination.type=="fichier"&&this.elToPaste.type=="fichier"||(destination.id==this.elToPaste.id&&destination.type==this.elToPaste.type))
return false;this.action="cut";this.paste(destination.id);}}.bind(this),onDrag:function(e){},onStart:function(e)
{var clone=el.clone().setStyles(coord).setStyles({'opacity':0.7,'position':'fixed','z-index':'999'}).inject(document.body);clone.id=el.id+"-clone";myDragCopie.element=clone;myDragCopie.mouse.pos['x']=20;myDragCopie.mouse.pos['y']=20;}.bind(this)});}.bind(this));}.bind(this));contextMenu=new ContextMenu({targets:allElements,menu:'contextmenu',onShow:function(el){currentElement=ne.getElement(el.id);if(currentElement.type=="fichier"&&currentElement.extension=="zip")
this.showItem("unzip");else
this.hideItem("unzip");if(currentElement.type=="dossier")
{this.showItem("makezip");this.showItem("paste");this.showItem("open");this.hideItem("download");}
else
{this.hideItem("makezip");this.hideItem("paste");this.hideItem("open");this.showItem("download");}
if(!ne.elToPaste)
this.disableItem("paste");else
this.enableItem("paste");if(currentElement.type=="fichier"&&ne.previewExtension.contains(currentElement.extension))
this.showItem("preview");else
this.hideItem("preview");if(contextGeneral)
contextGeneral.hide();},actions:{open:function(e,ref){tab=this.getIdAndType(e.id);if(tab['type']=="dossier")
this.explorer(tab['id']);}.bind(this),preview:function(e,ref){tab=this.getIdAndType(e.id);if(tab['type']=="fichier")
multiBox.open($(e.id+"-preview"));}.bind(this),download:function(e,ref){tab=this.getIdAndType(e.id);if(tab['type']=="fichier")
location.href="moteur/download.php?id="+tab['id'];}.bind(this),unzip:function(e){this.zip(e,"unzip");}.bind(this),makezip:function(e){this.zip(e,"zip");}.bind(this),cut:function(e){this.cut(e);}.bind(this),copy:function(e){this.copy(e);}.bind(this),paste:function(e,ref){el=this.getElement(e.id);if(el.type=="dossier")
this.paste(el.id);}.bind(this),rename:function(e,ref){this.rename(e);}.bind(this),delet:function(e,ref){this.del(e);}.bind(this),properties:function(e,ref){this.properties(e.id);}.bind(this)}});var contextGeneral=new ContextMenu({targets:$$('#mainPanel'),menu:'contextmenuGeneral',onShow:function(){if(contextMenu)
contextMenu.hide();if(!ne.elToPaste)
this.disableItem("paste");else
this.enableItem("paste");if(!ne.content.racine)
{this.disableItem("paste");this.disableItem("newDir");this.disableItem("propertiesGeneral");}
else
{this.enableItem("newDir");this.enableItem("propertiesGeneral");}},actions:{newDir:function(e,ref){this.newDirectory();}.bind(this),paste:function(e,ref){this.paste(this.currentPath);}.bind(this),propertiesGeneral:function(e,ref){this.properties("racine-"+this.currentPath);}.bind(this)}});Spinner.hide();},rename:function(el)
{if(!(element=this.getElement(el.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
if(element.type=="dossier")
divRename=$('renamed-'+element.id);else
divRename=$('renamef-'+element.id);divElement=$(el);divRename.innerHTML='<input type="text" id="inputRename-'+element.id+'" size="22" class="rename" value="'+element.nomComplet+'"/>';inputElement=$('inputRename-'+element.id);inputElement.size=(element.nomComplet.length)+2;$(divRename).setStyle("position","absolute");inputElement.select();inputElement.removeEvents('blur');inputElement.addEvent('blur',function(event){this.actionRename(el);return;}.bind(this));inputElement.addEvent('mousedown',function(event){event.stopPropagation();}.bind(this));inputElement.addEvent('keypress',function(event){inputElement.size=inputElement.value.length+2;}.bind(this));divElement.removeEvents('keypress');divElement.addEvent('keypress',function(event){event.stopPropagation();if(event.key=='enter')
this.actionRename(el);return;}.bind(this));},actionRename:function(el)
{if(!(element=this.getElement(el.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
if(element.type=="dossier")
divRename=$('renamed-'+element.id);else
divRename=$('renamef-'+element.id);if(element.type=="dossier")
divBackground=$('backgroundd-'+element.id);else
divBackground=$('backgroundf-'+element.id);inputElement=$('inputRename-'+element.id);if(!inputElement)
return false;var verif=/^[a-zA-Z0-9_().éèàùçûüùëêï]{0,1}[a-zA-Z0-9 _().éèàùçûüùëêï-]*[a-zA-Z0-9_()éèàùçûüùëêï-]{1}$/;if(verif.exec(inputElement.value)==null)
{alertWindow(lang.panelMain.explorer.errorName,lang.panelMain.explorer.error);return false;}
if(inputElement.value!=element.nomComplet)
{if(this.getIndexWithName(inputElement.value,element.type)!=-1)
{alertWindow(lang.panelMain.explorer.errorAlreadyExist,lang.panelMain.explorer.error);return false;}
new Request.JSON({onSuccess:function(json){if(json.success==1)
{divRename.innerHTML=json.nom;if(element.type=="dossier")
idThumb="folder";else
idThumb=element.id;index=this.getIndex(element.id,element.type);if(element.type=="dossier")
{this.content.dossiers[index].nomComplet=json.nom;this.content.dossiers[index].nom=json.nom;$(document.body).fireEvent("refreshTree");}
else
{this.content.fichiers[index].nomComplet=json.nom;this.content.fichiers[index].extension=json.extension;}
this.update();}
else
{alertWindow(json.retour,'Erreur');divRename.innerHTML=element.nomComplet;}}.bind(this)}).get("moteur/action.php?id="+element.id+"&type="+element.type+"&nom="+$('inputRename-'+element.id).value+"&action=rename");}
else
divRename.innerHTML=element.nomComplet;$(divRename).setStyle("position","relative");},del:function(el)
{if(!(element=this.getElement(el.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
if(confirm(lang.panelMain.explorer.confirmDelete+' '+element.nomComplet+' ?'))
{new Request.JSON({onRequest:Spinner.show,onSuccess:function(json,text){Spinner.hide();if(json==null)
alertWindow(text,lang.panelMain.explorer.error);else
if(json.success==1)
{this.content="";this.content=json.content;el.destroy();if(element.type=="dossier")
$(document.body).fireEvent("refreshTree");}
else
alertWindow(json.retour,lang.panelMain.explorer.error);}.bind(this)}).get("moteur/action.php?id="+element.id+"&type="+element.type+"&action=delete");}},copy:function(el)
{if(!(this.elToPaste=this.getElement(el.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
this.action="copy";MochaUI.notification(lang.panelMain.explorer.copy);},cut:function(el)
{if(!(this.elToPaste=this.getElement(el.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
this.action="cut";el.setStyle("opacity","0.6");MochaUI.notification(lang.panelMain.explorer.cut);},paste:function(cible)
{if(!this.elToPaste)
{alertWindow(lang.panelMain.explorer.noPaste,lang.panelMain.explorer.error);return false;}
new Request.JSON({onRequest:Spinner.show,onSuccess:function(json,text){Spinner.hide();if(json==null)
alertWindow(text,lang.panelMain.explorer.error);else
if(json.success==1)
{MochaUI.notification(lang.panelMain.explorer.paste);this.explorer(this.currentPath);if(this.elToPaste.type=="dossier")
$(document.body).fireEvent("refreshTree");delete this.elToPaste;}
else
alertWindow(json.retour,lang.panelMain.explorer.error);}.bind(this)}).get("moteur/action.php?id="+this.elToPaste.id+"&type="+this.elToPaste.type+"&action="+this.action+"&dossier="+cible);},newDirectory:function()
{new Request.JSON({onSuccess:function(json){if(json.success!=1)
alertWindow(json.retour,lang.panelMain.explorer.error);else
{this.content=json.content;this.update();this.rename($('dossier-'+this.content.informations.lastId));}}.bind(this)}).get("moteur/create.php?id="+this.currentPath);},zip:function(el,action)
{if(!(element=this.getElement(el.id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
new Request.JSON({onRequest:Spinner.show,onSuccess:function(json,text){Spinner.hide();if(json==null)
alertWindow(text,lang.panelMain.explorer.error);else
if(json.success==1)
{MochaUI.notification(json.retour);$(document.body).fireEvent("refresh");}
else
alertWindow(json.retour,lang.panelMain.explorer.error);}.bind(this)}).get("moteur/zip.php?id="+element.id+"&action="+action);},properties:function(id)
{if(!(element=this.getElement(id)))
{alertWindow(lang.panelMain.explorer.elNotFound,lang.panelMain.explorer.error);return false;}
if(!element.nomComplet)
nom=element.nom;else
nom=element.nomComplet;new MochaUI.Window({id:'propertieWindow'+element.id,loadMethod:'xhr',contentURL:'template/properties/generalWindow.php?id='+element.id+'&type='+element.type,title:lang.panelMain.explorer.propertiesOf+' '+nom,type:'window',resizable:true,maximizable:false,width:400,height:300,footerHeight:5,evalScripts:true,evalResponse:true,toolbar:true,toolbarURL:'template/properties/propertiesTabs.php?id='+element.id+'&type='+element.type,icon:'design/icons/info.png',onClose:function(){info();}});},setSize:function(tmpS,updateSlider)
{if(tmpS>5)
{this.aspect='icons';if(tmpS>5&&tmpS<=30)
this.size=tmpS;this.height=this.size*5;}
else if(tmpS==5)
{this.aspect='mosaique';this.height=50;this.size=5;}
else
{this.aspect='details';this.height=20;this.size=4;}
if(this.slider)
{if(this.size==5)
this.slider.set(0);else if(this.size==4)
this.slider.set(-5);else if(updateSlider)
this.slider.set(this.size);}
this.update();},getIdAndType:function(tmpS)
{tmpTab=tmpS.split("-");var tab=new Array();tab['type']=tmpTab[0];tab['id']=tmpTab[1];return tab;},getElement:function(id)
{tab=this.getIdAndType(id);if(tab['type']=="dossier")
{i=0;while(i<this.content.dossiers.length){if(this.content.dossiers[i].id==tab['id'])
return this.content.dossiers[i];i++;}}
if(tab['type']=="fichier")
{i=0;while(i<this.content.fichiers.length){if(this.content.fichiers[i].id==tab['id'])
return this.content.fichiers[i];i++;}}
if(this.content.racine.id==tab['id'])
return this.content.racine;return false;},getIndex:function(id,type)
{if(type=="dossier")
{i=0;while(i<this.content.dossiers.length){if(this.content.dossiers[i].id==id)
return i;i++;}}
if(type=="fichier")
{i=0;while(i<this.content.fichiers.length){if(this.content.fichiers[i].id==id)
return i;i++;}}
return-1;},getIndexWithName:function(name,type)
{if(type=="dossier")
{i=0;while(i<this.content.dossiers.length){if(this.content.dossiers[i].nom==name)
return i;i++;}}
if(type=="fichier")
{i=0;while(i<this.content.fichiers.length){if(this.content.fichiers[i].nomComplet==name)
return i;i++;}}
return-1;},sortContent:function(type)
{if(this.lastSort==type)
this.sortIsAsc=!this.sortIsAsc;$('sortback'+this.lastSort).style.backgroundImage="none";switch(type)
{case"date":if(this.content.fichiers)
this.content.fichiers.sort(function(a,b){return this.compareInt(a.timestamp,b.timestamp)}.bind(this));if(this.content.dossiers)
this.content.dossiers.sort(function(a,b){return this.compareInt(a.timestamp,b.timestamp)}.bind(this));break;case"type":if(this.content.fichiers)
{this.content.fichiers.sort(function(a,b){return this.compareString(a.extension,b.extension)}.bind(this));if(!this.sortIsAsc)
this.content.fichiers.reverse(function(a,b){return this.compareString(a.extension,b.extension)}.bind(this));}
break;case"taille":if(this.content.fichiers)
this.content.fichiers.sort(function(a,b){return this.compareInt(a.size,b.size)}.bind(this));break;default:if(this.content.fichiers)
{this.content.fichiers.sort(function(a,b){return this.compareString(a.nom,b.nom)}.bind(this));if(!this.sortIsAsc)
this.content.fichiers.reverse(function(a,b){return this.compareString(a.nom,b.nom)}.bind(this));}
if(this.content.dossiers)
{this.content.dossiers.sort(function(a,b){return this.compareString(a.nom,b.nom)}.bind(this));if(!this.sortIsAsc)
this.content.dossiers.reverse(function(a,b){return this.compareString(a.nom,b.nom)}.bind(this));}
break;}
this.update();if(this.sortIsAsc)
$('sortback'+type).style.backgroundImage="url(design/arrow-up.png)";else
$('sortback'+type).style.backgroundImage="url(design/arrow-down.png)";this.lastSort=type;},compareString:function(a,b)
{if(a.toLowerCase()<b.toLowerCase())
return-1;else if(a.toLowerCase()>b.toLowerCase())
return 1
else
return 0;},compareInt:function(a,b)
{if(!this.sortIsAsc)
return b-a;else
return a-b;},addDl:function(id)
{if(!this.inDlLst(id))
{this.dlList[id]=this.getElement(id);}
this.drawDlLst();},rmDl:function(id)
{delete this.dlList[id];this.drawDlLst();},inDlLst:function(id)
{if(this.dlList[id])
return true;return false;},drawDlLst:function()
{var html="";var nbValues=0;for(var cle in this.dlList)
{if(this.dlList[cle].id)
{html+=Ne.Explorer.Draw.itemDlList(this.dlList[cle],cle);nbValues++;}}
if(nbValues>0)
html+='<div class="center"><input type="button" value="'+lang.panelMain.explorer.telecharger+'" onclick="$(\'panelDownload\').fireEvent(\'downloadDlLst\')"/></div>';$("panelDownload").innerHTML=html;},downloadDlLst:function()
{var content="";for(var cle in this.dlList)
{if(this.dlList[cle].id)
{content+=this.dlList[cle].type+'[]='+this.dlList[cle].id+'&';}}
MochaUI.notification(lang.panelMain.explorer.preparingDownload)
location.href="moteur/downloadLst.php?"+content+"void=void";}});Ne.Explorer.Draw={draw:function(json,type,height,aspect){if(aspect=="mosaique")
return Ne.Explorer.Draw.mosaique(json,type,height);else if(aspect=="details")
return Ne.Explorer.Draw.details(json,type,16);else
return Ne.Explorer.Draw.icons(json,type,height);},icons:function(json,type,height){if(height<100)
width=110;else
width=height*1.1;if(type=="file")
{html='<div class="blockElement" style="height:'+(height+45)+'px"><div class="element fichier" id="fichier-'+json.id+'" style="width:'+width+'px">'
+'<a class="mb" rel="type:'+json.extension+',url:'+json.id+'" id="fichier-'+json.id+'-preview" title="'+json.nomComplet+'"></a>'
+'<div class="background" id="backgroundf-'+json.id+'" style="height:'+height+'px;" >'
+'<table height="100%"><tr><td><img align="center" onload="hideBackground(\''+'fichier-'+json.id+'\')" src="'+Ne.Explorer.Draw.getUrlImg(json.id,height,json.extension)+'" style="max-height : '+height+'px; max-width: '+height+'px;" /></td></tr></table>'
+'</div><div class="name" id="renamef-'+json.id+'">'+json.nomComplet+'</div></div></div>';return html;}
else
return'<div class="blockElement" style="height:'+(height+45)+'px"><div class="element dossier" id="dossier-'+json.id+'" style="width:'+width+'px">'
+'<div class="background" id="backgroundd-'+json.id+'" style="height:'+height+'px;">'
+'<img onload="hideBackground(\''+'dossier-'+json.id+'\')" src="'+Ne.Explorer.Draw.getUrlImg('folder',height)+'" width="'+height+'" height="'+height+'" />'
+'</div><div class="name" id="renamed-'+json.id+'">'+json.nom+'</div></div></div>';},mosaique:function(json,type,height){if(type=="file")
{html='<div class="blockElement" style="height:70px"><div class="element mosaique fichier" id="fichier-'+json.id+'">'
+'<a class="mb" rel="type:'+json.extension+',url:'+json.id+'" id="fichier-'+json.id+'-preview" title="'+json.nomComplet+'"></a>'
+'<div class="background" id="backgroundf-'+json.id+'" style="height:'+height+'px">'
+'<table height="100%"><tr><td><img onload="hideBackground(\''+'fichier-'+json.id+'\')" align="center" src="'+Ne.Explorer.Draw.getUrlImg(json.id,height,json.extension)+'" style="max-height : '+height+'px; max-width: '+height+'px;" /></td></tr></table>'
+'</div><div class="name" id="renamef-'+json.id+'">'+json.nomComplet+'</div><div class="info">Fichier '+json.extension+'<br/>'+json.taille+'</div></div></div>';return html;}
else
return'<div class="blockElement" style="height:70px"><div class="element mosaique dossier" id="dossier-'+json.id+'">'
+'<div class="background" id="backgroundd-'+json.id+'">'
+'<table height="100%"><tr><td><img onload="hideBackground(\''+'dossier-'+json.id+'\')" align="center" src="'+Ne.Explorer.Draw.getUrlImg('folder',height,json.extension)+'" style="max-height : '+height+'px; max-width: '+height+'px;" /></td></tr></table>'
+'</div><div class="name" id="renamed-'+json.id+'">'+json.nom+'</div><div class="info">Dossier de fichiers</div></div></div>';},details:function(json,type,height){if(type=="file")
return'<div class="blockElement blockDetail"><div class="element detail fichier" id="fichier-'+json.id+'">'
+'<a class="mb" rel="type:'+json.extension+',url:'+json.id+'" id="fichier-'+json.id+'-preview" title="'+json.nomComplet+'"></a>'
+'<div class="item nom"><div class="background" id="backgroundf-'+json.id+'">'
+'<table height="100%"><tr><td><img onload="hideBackground(\''+'fichier-'+json.id+'\')" align="center" src="'+Ne.Explorer.Draw.getUrlImg(json.id,height,json.extension)+'" style="max-height : '+height+'px; max-width: '+height+'px;" /></td></tr></table>'
+'</div><div class="name" id="renamef-'+json.id+'">'+json.nomComplet+'</div></div>'
+'<div class="item date">'+json.date_creation+'</div>'
+'<div class="item type">Fichier '+json.extension+'</div>'
+'<div class="item taille">'+json.taille+'</div>'
+'</div></div>';else
return'<div class="blockElement blockDetail"><div class="element detail dossier" id="dossier-'+json.id+'">'
+'<div class="item nom"><div class="background" id="backgroundd-'+json.id+'">'
+'<table height="100%"><tr><td><img onload="hideBackground(\''+'dossier-'+json.id+'\')" align="center" src="'+Ne.Explorer.Draw.getUrlImg('folder',height,json.extension)+'" style="max-height : 16px; max-width: 16px;" /></td></tr></table>'
+'</div><div class="name" id="renamed-'+json.id+'">'+json.nom+'</div></div>'
+'<div class="item date">'+json.date_creation+'</div>'
+'<div class="item type">Dossier de fichiers</div>'
+'<div class="item taille"></div>'
+'</div></div>';},itemDlList:function(json,idClone){if(json.type=="fichier")
return'<div class="blockElement blockDetail"><div class="element detail fichier noBackground">'
+'<div class="item nom"><div class="background">'
+'<table height="100%"><tr><td><img align="center" src="'+Ne.Explorer.Draw.getUrlImg(json.id,16,json.extension)+'" style="max-height : 16px; max-width: 16px;" /></td></tr></table>'
+'</div><div class="name">'+json.nomComplet+'</div></div>'
+'<div class="delete" onclick="$(\'panelDownload\').fireEvent(\'delete\',\''+idClone+'\')"></div>'
+'</div></div>';else
return'<div class="blockElement blockDetail"><div class="element detail dossier noBackground">'
+'<div class="item nom"><div class="background">'
+'<table height="100%"><tr><td><img align="center" src="'+Ne.Explorer.Draw.getUrlImg('folder',16,json.extension)+'" style="max-height : 16px; max-width: 16px;" /></td></tr></table>'
+'</div><div class="name">'+json.nom+'</div></div>'
+'<div class="delete" onclick="$(\'panelDownload\').fireEvent(\'delete\',\''+idClone+'\')"></div>'
+'</div></div>';},getUrlImg:function(id,height,extension){return'moteur/getThumb.php?id='+id+'&height='+Ne.Explorer.Draw.getHeight(height)+'&type='+extension;},getHeight:function(height){if(height>100)
return 150;else if(height>50)
return 100;else
return 50}};