'; st1= 'height='+( haut ? haut : 250)+', width ='+(larg ? larg : 400)+', top= '+(posH ? posH :100)+',left='+(posL ? posL : 100)+', menubar=no,status=no'; dialogwin=window.open("","",st1);dialogwin.document.open("HTML");dialogwin.document.write(st);} var diawindrag=false; function DiawinShow(haut,larg,posH,posL,titr){st0=document.getElementById("diaWin");st=st0.style; st.height=( haut ? haut : 250);st.width =(larg ? larg : 400);st.top= (posH ? posH :100);st.left=(posL ? posL : 100);st.visibility="visible"; if(titr !=undefined) st0.innerHTML='
'+titr+'
'; if (document.getElementById("uFrame")) document.body.removeChild(document.getElementById("uFrame")) var ooFrame = document.createElement("IFRAME");ooFrame.frameBorder=0;ooFrame.id ="uFrame";ooFrame.className="oFrame";document.body.appendChild(ooFrame); st2='
'; document.frames["uFrame"].document.write(st2) st1=document.getElementById("uFrame").style;st1.left=st.pixelLeft+2;st1.top=20+st.pixelTop ;st1.width=st.pixelWidth-5;st1.height=st.pixelHeight-23} function DiaWinMove(e){if(diawindrag==true) { event.CancelBubble=true; st=document.getElementById("uFrame") ;st1= document.getElementById("diaWin") x = bw.ns6 ? x : event.clientX ; y = bw.ns6 ? y :event.clientY; st1.style.top=y-10;st.style.top=y+10;st1.style.left=x-st.offsetWidth/2;st.style.left=st1.style.pixelLeft+2}} function DiawinFrameContent(str){ st1=document.getElementById("uFrame"); oFrame=document.frames["uFrame"].document;str1=str.substring((str.length-4),str.length); if (str1.indexOf("htm") == -1)oFrame.body.insertAdjacentHTML("afterBegin",str); else st1.src=str; st1.style.visibility='visible' } diaWinFrameClose='' function DiaClose() {document.getElementById('diaWin').style.visibility='hidden';document.getElementById('uFrame').style.visibility='hidden';} function isEmail(string) {if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) return true; else { alert(al04+'\n"'+string+'"');return false}} function Tag(va){ for (i=0; i'; st+=' '; st+=''; DiawinFrameContent(st);} function doOpen(loc,act,nex){DiawinShow(270,390,20,15,Dia8[0]); if(loc.toString().substring(0,4)=='http') { DiawinFrameContent("../eProjectOS/eFileSelector.html");return} loc=loc.toString().substring(8,loc.toString().length); fname=loc.substring((loc.lastIndexOf('/')+1),loc.length);loc=loc.substring(0,(loc.lastIndexOf('/')+1)); fpath=loc.substring(0,(loc.lastIndexOf('/')+1)); act=(act==undefined) ?'':act; st='
Explorer:\n\n' st+='\n\n\n' st+=' \n' st+=' \n' st+=' \n' st+='\n'; st+='\n
\n'; st+='\n'; st+='\n\n\n'; st+='\n\n\n' st+='
'+Dia8[1]+':' if ((act=='')||(act=='Open')) st+='' if (act=='Select') st+='' if (act=='Save') st+='\n\n' st+='
'+Dia8[2]+':'+diaWinFrameClose+'
\n' DiawinFrameContent(st);FillFileList(loc);} function OpenFile(){if (newURL.indexOf('.edtr') != -1 ) doImport(newURL); else this.location=newURL} function FillFileSelect(fil,thisUrl,thisUrlName,thisAtt){ if (fil==2) {dialogwin.fileUrl.value=thisUrl;dialogwin.filename.value=thisUrlName;}; else FillFileList(thisUrl,'tt',thisAtt);} function dateFormat(dateobj){ dF=new Date(dateobj);m = dF.getMonth() + 1;d = dF.getDate(); yy = dF.getYear(); yy < 100 ? yyyy = yy +1900 : yyyy=yy; if(m.toString().length < 2) { mm = "0" + m + ""; } else { mm = m; } if(d.toString().length < 2) { dd = "0" + d + ""; } else { dd = d; } DateString=dd+"/"+mm+"/"+yyyy;return DateString;} function FillFileList(sel,par,att,fil,srt){//if(dialogwin.document.getElementById("uFrame"))dialogwin.document.getElementById("uFrame").style.visibility="hidden" ; dialogwin=document.frames["uFrame"].document.all dialogwin.Filelist.style.overflow="scroll" ; dialogwin.Filelist.style.visibility="visible"; if (fil) list=fil; fileList=new Array(); stt=''; st0D= "ü eFileManager
"; if(document.location.href.substring(0,4) =="http"){if (!document.getElementById("uFrame")) dialogwin.FillFileHTTP() ; dialogwin.selIcon.innerHTML="ü";dialogwin.selName.innerHTML=" eFileManager "} else { fso = new ActiveXObject("Scripting.FileSystemObject"); att=(att==undefined) ?'':att; if ((sel.charAt(1)!= ":")) sel='C:' ;fldr = fso.GetFolder(sel);fldr=(par=="parent" ? fldr.ParentFolder:fldr); st0D+=" onclick='selIcon.innerHTML=this.children[0].innerHTML;parent.FillFileList(this.children[1].innerHTML,\"tt\",filter.options(filter.selectedIndex).value);FileTree.style.display=\"none\";'> "; st01D=""+(x.DriveLetter =="A" ? "<":";")+""+drv.item()+"\n"+ n +"("+x.DriveLetter +")"+"
"} st0=''; for(var objEn = new Enumerator(fldr.SubFolders); !objEn.atEnd(); objEn.moveNext()) { stt+=" "+st0D+st01D+"color:orange;font-size:12pt;'>0"+"\n"+objEn.item()+""+objEn.item().Name +"
"; fileList[fileList.length]=new Array(); fileList[(fileList.length-1)][0]=objEn.item().Name; fileList[(fileList.length-1)][1]=objEn.item().Size; fileList[(fileList.length-1)][2]=objEn.item().Type; fileList[(fileList.length-1)][3]=objEn.item().DateLastModified; fileList[(fileList.length-1)][4]=st0+'color:orange;">0'+st01+objEn.item()+''+objEn.item().Name +''; fileList[(fileList.length-1)][5]=st0+'color:orange;">0'+st01+objEn.item()+''+objEn.item().Name +''+parseInt(eval(parseInt(objEn.item().Size)/1000)) +'Ko
'+objEn.item().Type+''+dateFormat(objEn.item().DateLastModified)+'';} dialogwin.FileTree.innerHTML=stt; } if(document.location.href.substring(0,4) =="http"){//stf='';for(i=0;i';stf+='
'+dialogwinf.reptab[i][0]+'
'; dialogwin.writeFolderContent (stf); fldr='';sel=''} else{ for(var objEn = new Enumerator(fldr.Files); !objEn.atEnd(); objEn.moveNext()) {st=objEn.item().Name;if( st.substring((st.length-att.length),st.length)==att) {fileList[fileList.length]=new Array() fileList[(fileList.length-1)][0]=objEn.item().Name; fileList[(fileList.length-1)][1]=objEn.item().Size; fileList[(fileList.length-1)][2]=objEn.item().Type; fileList[(fileList.length-1)][3]=objEn.item().DateLastModified; fileList[(fileList.length-1)][4]=st0+'color:'+(st.substring((st.length-4),st.length)=="html" ? 'blue':'black')+'">2'+st01+objEn.item()+''+objEn.item().name +''; fileList[(fileList.length-1)][5]=st0+'color:'+(st.substring((st.length-4),st.length)=="html" ? 'blue':'black')+'">2'+st01+objEn.item()+''+objEn.item().name +''+parseInt(eval(parseInt(objEn.item().Size)/1000)) +'Ko
'+objEn.item().Type+''+dateFormat(objEn.item().DateLastModified)+''; }} stf=''; j=0; if (list=='false'){for(i=0;i':'')} stf+='
' } else { if (!isNaN(parseInt(srt))) fListSort(srt);else stars=new Array(' ',' ',' ',' ') stf1='style="background: buttonface; padding-left: 5; padding-right: 5;border-top: 1 solid threedhighlight; border-left: 1 solid threedhighlight; border-right: 1 solid threedshadow; border-bottom: 1 solid threedshadow;' starr='style="font-family: webdings; color: black; padding: 0; font-size: 10; height: 11; width: 10; overflow: hidden; margin-bottom: 2; margin-top: -3; padding: 0; padding-top: 0; padding-bottom: 2;"' stsrt='parent.FillFileList(selURL.value,\'\',filter.options(filter.selectedIndex).value,\'true\',\''; stf='\n'; stf+='' stf+='' stf+='' stf+='' stf+='' stf+='' for(i=0;i'; if (dir==5){for ( i=0; i<(ll-1); i++) for (j=i+1; jfileList[i][val]) { var dummy =fileList[i];fileList[i] = fileList[j]; fileList[j] = dummy};dir=5;}} function doSaveAs(){GVurl=( ((GVurl==undefined)||(GVurl=='')) ? document.location.href :GVurl);doOpen(GVurl,'Save');} function doSave(){st=document.location.href.toString();localpath=st.substring(0,(st.length-document.title.length)); SaveHTML(localpath,document.title);FileMenu.rows[2].className="disabled";} function doSaveDatafile(){ fso = new ActiveXObject("Scripting.FileSystemObject");f = fso.CreateTextFile(newURL,true); s= SaveData();f.write(s);f.Close();GVChanged=false;} function SaveDataToscript(daHTML){//if (daHTML==undefined) st=frames.myEditor.document.getElementById("Oedit").innerHTML;else st=daHTML; if (daHTML==undefined) {st=frames.myEditor.document.body.children[0].innerHTML; };else st=daHTML; var re=/'/g;st=st.replace(re,"\\'"); var re=/\r\n/g;st1=st.replace(re,"';\nstdata+='"); return st="stdata='"+st1+"';"} function SaveDataHTML(fname){fso = new ActiveXObject("Scripting.FileSystemObject");f = fso.CreateTextFile(newURL,true); st= SaveDaHTML(fname);f.write(st);f.Close();GVChanged=false;} function SaveDaHTML(fname){st=''+fname+'\n\n\n'+frames.myEditor.document.getElementById("Oedit").innerHTML+'\n
';return st} function ReadFile(fname){fname=(fname==undefined? 'eDitor' : fname); s= DocumentHeader(fname);s+= document.scripts(0).outerHTML;s+=DocumentBody();return s} function getHTMLfile(fname){savedData=SaveData();s=ReadFile(fname);s= s.substring(0,(s.indexOf('THISISTHEDATASTART')+19))+'\n'+SaveDataToscript()+'\n'+ s.substring(s.indexOf('//FileStart'),s.length);return s } function SaveHTML(localurl,fname){localurl=localurl.toString(); if (localurl.substring(0,3)=='http') localurl=localurl.substring(8,localurl.length); if (localurl.substring(0,5).indexOf('file')>-1) localurl=localurl.substring(8,localurl.length); if(fname.indexOf(".edtr") != -1) {newURL=localurl+'/'+fname;SaveDataHTML(fname) ;return} if ( !GVurl || (localurl != GVurl))GVurl=localurl+fname; ReadFile(fname); fso = new ActiveXObject("Scripting.FileSystemObject");f = fso.CreateTextFile(GVurl,true) s= s.substring(0,(s.indexOf('THISISTHEDATASTART')+19))+'\n'+SaveDataToscript()+'\n'+ s.substring(s.indexOf('//FileStart'),s.length); f.write(s);f.Close( );document.location =GVurl} function doPrint(){window.print() } function doImport(dataURL){ fso = new ActiveXObject("Scripting.FileSystemObject"); ts = fso.OpenTextFile(dataURL, 1); newdata = ts.ReadAll(); ts.Close(); newdata=newdata.substring((6+newdata.indexOf("")),newdata.indexOf("")) ; newdata=SaveDataToscript(newdata); tr = document.URL.substring(7,document.URL.length);ts = fso.OpenTextFile(tr,1);s=ts.ReadAll(); ts.Close() ; var newF= s.substring(0,s.indexOf('//THISISTHEDATASTART'))+newdata+ s.substring(s.indexOf('//FileStart'),s.length); document.write(newF); document.close(); } function DeleteRemember(){ Oldproject=project;Oldresource=resource;Oldconnect=connect;OldTimeScale=TimeScale;OldInitStart=InitStart;OldLinks=links;OldCPMtasks=CPMtasks oldArray = EPL;OldGroups=Groups;OldResources=Resources;OldDOff=DOff; OldIndentBar=IndentBar; for (i=(oRS.RecordCount-1) ; i >0; i--){Pos = i;DeleteRecord();} } function doViewDataCache(){newwin=window.open('','','height=200,width=480,top=50,left=10,menubar=yes,scrollbars=yes,status=no'); newwin.document.open("text/plain");DialogwinHeader(Dia1);st=SaveDataToscript(); newwin.document.write(st)} function RegChange(){GVChange=true; FileMenu.rows[2].className="enabled";} function doFclose(){if(window.parent.document.title !="eProjectOS") window.close();else window.parent.doWinClose()} function checkLocation(){st=document.location.toString();if(st.substring((1+st.indexOf("?")),st.length)=="neweDitor") newDiaWin()} function doAbout(){DiawinShow(150,250,30,100,Dia7[0]); st='
'+iconGV()+'eDitor
'; st+='
'+Dia7[1]+'

'; st+=''+ Dia7[2]+' Gerard Verron'; DiawinFrameContent(st);} function displayMenuLoc(opt){if ((!oSelect)||(oSelect.type==undefined) ||(oSelect.type=="None")) return true; menuloc.style.display="" ; mlh= ODiv.offsetHeight-menuloc.offsetHeight;mll= ODiv.offsetWidth-menuloc.offsetWidth; menuloc.style.top =((frames.myEditor.event.clientY < mlh )? (frames.myEditor.event.clientY+ODiv.offsetTop):mlh); menuloc.style.left=((frames.myEditor.event.clientX < mll) ? frames.myEditor.event.clientX:mll); return false} function hidemenuloc() { if (menuloc.style.display=="") menuloc.style.display="none" } function writemenus(){ var sp = '
' var st0= '' st+='' st+='' st+='' st+='' st+='
'+Dia8[1]+stars[0]+''+Dia8[4]+stars[1]+''+Dia8[2]+stars[2]+''+Dia8[5]+stars[3]+'
'; st1='' st+=''; st+= st1+Men5[0]+'" onclick="doNew()">' st+= st1+Men5[1]+'" onclick="doOpen(document.location)">1' st+= st1+Men5[2]+'" onclick="doSave()" ><' st+= st1+Men1[11]+'" onclick="doPostFile()">œ' st+='' st+='
'; st+='' st+=''; st+= st1+Men5[4]+'" onclick="setRange();doFormat(\'Bold\')">B' st+= st1+Men5[5]+'" onclick="setRange();doFormat(\'Italic\')">I' st+= st1+Men5[6]+'" onclick="setRange();doFormat(\'Underline\')">U' st+=''; st+= st1+Men5[21]+'" onclick="setRange();fontStyler.style.display=(fontStyler.style.display==\'\' ? \'none\':\'\');fontStyler.style.left=this.offsetLeft+tbar.offsetLeft;fontStyler.style.top=(tbar.offsetTop+22)" >S'; st+= st1+Men5[22]+'" onclick="setRange();fontfamilier.style.display=(fontfamilier.style.display==\'\' ? \'none\':\'\');fontfamilier.style.left=this.offsetLeft+tbar.offsetLeft;fontfamilier.style.top=(tbar.offsetTop+22)" >T'; st+= st1+Men5[23]+'" onclick="setRange();fontsizer.style.display=(fontsizer.style.display==\'\' ? \'none\':\'\');fontsizer.style.left=this.offsetLeft+tbar.offsetLeft;fontsizer.style.top=(tbar.offsetTop+22)" >>'; //st+= '=\n'; st+= st1+'" onclick="setRange();colorBox.style.display=(colorBox.style.display==\'\' ? \'none\':\'\');colorBox.style.left=this.offsetLeft+tbar.offsetLeft-100;colorBox.style.top=(tbar.offsetTop+22);">=\n'; st+=''; st+=Icon('Left',-12,-30);st+=Icon('Center',-9,-27);st+=Icon('Right',-6,-24); /*st+= st1+Men5[7]+'" style="position:relative;top:3" >' st3='' st+=''+st3+st3+''+st3+st3+'
' */ //st+=''; //st+= st1+Men5[11]+'" style="position:relative;top:-3;width:17;height:15" onclick="doFormat(\'InsertHorizontalRule\')">
' st+='
'; st+='' st+='' st+='' st+= st0+'setRange();doCut()">'+sp+''+sp+'' st+= st0+'setRange();doCopy()">'+sp+''+sp+'' st+= st0+'setRange();doPaste()">'+sp+''+sp+'' st+= st0+'doMovableText(\'Arial\')">'+sp+''+sp+'' st+='' st1='' st11=st1+'onclick="doFormat(\'FormatBlock\',\'false\',\'' st += st11+'

\');fontStyler.style.display=\'none\'"> Normal
'; st += st11+'

\');fontStyler.style.display=\'none\'"> Preformatted 
'; st += st11+'
    \');fontStyler.style.display=\'none\'"> Bulleted List
    '; st += st11+'
      \');fontStyler.style.display=\'none\'"> Numbered List
      '; for (h=1; h<=6; h++) st += st11+'\');fontStyler.style.display=\'none\'"> Heading ' + h +'
      '; st+=''; st+='
      ' for(h=0;h '+fontfamil[h]+'
      '; st+='
      '; st+='
      ' for(i=0;i '+fontsize[i]+'p
      '; st+='
      '; st+='' st+='
      ' st4='' st4+='
      ';st6='border-right:1 solid '+borderColor+';';st7='border-bottom:1 solid '+borderColor+';';st8='border-left:1 solid '+borderColor+';';st9='border-top:1 solid ' + borderColor+';'; st+='' st+='
      '+st4+'border-top:1 solid black;'+st6+st7+st8+st5+''+st4+'border-right:1 solid black;'+st7+st8+st9+st5+''+st4+'border-bottom:1 solid black;'+st6+st8+st9+st5+''+st4+'border-left:1 solid black;'+st6+st7+st9+st5+'
      '+st4+st6+st7+st8+st9+st5+''+st4+'border-top:1 solid black;border-bottom:1 solid black;'+st6+st8+st5+''+st4+'border-left:1 solid black;border-right:1 solid black;'+st7+st9+st5+''+st4+'border-top:1 solid black;border-left:1 solid black;border-bottom:1 solid black;border-right:1 solid black;'+st5+'
      ' st+='
      ' document.write(st); } //-----------------EDitor specific functions----------------------------- var giLastImg = '1'; var giLastTxt = '1'; function doMovableText(oTxtId,oTxtFont){var oNode=frames.myEditor.document.createElement("div"); frames.myEditor.document.body.insertBefore(oNode); oNode.style.fontFamily=oTxtFont; oNode.innerText=al06; giLastTxt++; var iTempCount = "text" + giLastTxt; oNode.id = iTempCount;oNode.style.position='absolute';oNode.setActive()} function doInsertImage(fname) { st=newURL.substring((1+newURL.lastIndexOf(".")),newURL.length);if ((st !="gif")&&(st!="jpeg")&&(st!="jpg")) {alert(al07);return} var oNode=frames.myEditor.document.createElement("img");re = /\\/g ;st1="file:///"+newURL.replace( re, "/"); frames.myEditor.document.body.insertBefore(oNode);oNode.src=st1; giLastImg++; oNode.id= "img" + giLastImg;oNode.style.position='absolute'; var oRange = frames.myEditor.document.body.createControlRange();oRange.add(oNode); oRange.select()} function doSRC(finclude,fname){switch(finclude){case "Image":doInsertImage(fname) ;break}} function doAddLink() {if (oRange.text!=""){ document.execCommand("CreateLink");RegChange() } else{alert("Please select some text");}} function doFontFamily(fam){ doFormat('FontName','false',fam)} function doFontSize(vas){doFormat('FontSize','false',vas)} function doSelectClick(str, el) { if (el.selectedIndex != -1) doFormat(str,el);} function doColorSelect(target){ if(oSelect.type=="Text") {doFormat('ForeColor','false',CLR.style.color);doFormat('BackColor','false',CLR.style.backgroundColor)} if(oSelect.type=="Control") {oRange.item(0).style.backgroundColor=CLR.style.backgroundColor ;oRange.item(0).style.color=CLR.style.color } if(oSelect.type=="None") frames.myEditor.document.body.style.backgroundColor=CLR.style.backgroundColor ; colorBox.style.display ="none";RegChange()} function doLeft(){doFormat('JustifyLeft')} function doCenter(){ doFormat('JustifyCenter')} function doRight(){ doFormat('JustifyRight') } function doOutdent(){doFormat('Outdent')} function doIndent(){doFormat('Indent')} function doCellBorder(){ st=event.srcElement.style; doStyleRule('Border',st.borderLeft,st.borderTop,st.borderRight,st.borderBottom) borderer.style.display='none';} function setRange(){oSelect = document.frames["myEditor"].document.selection;oRange=oSelect.createRange();} function doFormat(styl,val,va2) { oRange.execCommand(styl,val,va2); oRange.select();frames.myEditor.focus() ;RegChange()} function doCut(){oRange.execCommand('Cut');RegChange()} function doCopy(){oRange.execCommand('Copy');RegChange()} function doPaste(){oRange.execCommand('Paste');RegChange()} function createNew(){st=frames.myEditor.document; From.value=email.value=Subject.value=""; st.getElementById("Oedit").removeNode(true);stdata='';document.title="new.htm";init()} function DocumentHeader(fname){st='' st=''+ fname +'\n'; st+='\n'; st+='\n'; st+='\n'; st+='\n'; st+='\n' st+='' return st} function DocumentBody(){ st='\n\n'; st+='
      \n' st+='
      \n' st+=' \n' return st} postanimtxt=0; postaniTxt='';for (m=0;m'+Dia4[9].charAt(m)+''; function doPostAnim(){ ftxt=document.frames.messFrame.document;if(ftxt.getElementById("flight0")){ if (postanimtxt==0){for (m=0;m'; st+=''; st+=''; st+=''; st+=''; st+=' \n'; document.frames.messFrame.document.body.innerHTML=st ; document.frames.messFrame.document.getElementById("sendit").submit() ;doPostAnimTxt(); } function doEditorSite(){window.open('http://eplanning.free.fr/','','height=450,width=700,menubar=yes,top=50,left=50,status=no')} function doHelpScroll(ind){ document.frames["uFrame"].document.getElementById("helpcontent").scrollTop=document.frames["uFrame"].document.getElementById(ind).offsetTop;} function doHelp(){DiawinShow(250,250,10,(document.body.clientWidth-280),Dia6[0]);st='';sti=new Array() tits=new Array("Introduction","Fonctionnement","Applicatif autonome","Ajout de commandes","Insertion d\'images","Selection des couleurs") st+='\n
      s
      \n'; st+='
      \n'; st+=sti[0] st+='Editor permet d\'éditer des fichiers sans quitter le navigateur.Il fonctionne indifféremment en local ou sur un poste serveur.
      ' st+=sti[1] st+='Au moment de la sauvegarde, eDitor collecte l\'ensemble du document html , et traite la chaine de caractères produite de façon à la placer en script, en entête du document. Les commandes de l\'interface permettent ensuite de développer le texte de façon très simple et illimitée. '; st+=sti[2] st+='eDitor est une application autonome. Il inclut l\'interface, et les données dans un seul et même fichier.'; st+='

      Plus d\'informations, d\'autres applicatifs, et un système d\'exploitation pour les applicatifs autonomes se trouvent sur le site ePlanning'; st+=sti[3] st+='Les messages pourront être adressées à plusieurs destinataires en séparant les noms par des points virgules.'; st+=sti[4] st+='Il est préférable d\'insérer des images accessibles en permanence de façon à éviter de devoir créer un répertoire de sauvegarde de ces images.

      '; st+=sti[5] st+='L\'élement sélectionné est coloré. A défaut, le sélecteur colore le fond de page.

      '; st+=''+DiawinFrameContent(st); } function init(){var ooDiaWin = document.createElement("DIV");ooDiaWin.id ="diaWin";ooDiaWin.className="diaWinstyle";document.body.appendChild(ooDiaWin); checkLocation();fixSizeTB();st=frames.myEditor.document; st.body.contentEditable = "True" st.oncontextmenu=parent.displayMenuLoc; st.onmouseup=parent.hidemenuloc; st.execCommand("2D-Position", true, true); st.execCommand("MultipleSelection", true, true); st.execCommand("LiveResize", true, true); for (i=0; i