function editOpen(mode,localPath){var editorUrl=__editGetEditorUrl();var type="OPEN";var filter="";if(mode==0){parent.editFile.click()}if(mode==1||mode==4||mode==5||mode==6){__editPrepareParams();if(mode==1){type="OPEN";filter=globalDialogFilterDoc}else if(mode==4){type="OPEN";filter="swf;"}else if(mode==5){type="OPEN";filter="avi;wmv;mov;mp3;mpeg;"}else if(mode==6){type="OPEN";filter="htm;html;";__editMozParam[16]=globalTemplateUrlAbsolute;__editMozParam[17]=globalTemplatePathAbsolute}__editMozParam[2]=type;__editMozParam[9]=filter;if(browser.ns){var left=screen.width/2-600/2;var top=screen.height/2-300/2;window.open(editorUrl+"dialogs/"+globalTechnology+"/dialog.html","color","modal=1,left="+left+",top="+top+",height=300,width=600,resizable=1,status=0,scrollbars=0")}else{var path=window.showModalDialog(editorUrl+"dialogs/"+globalTechnology+"/dialog.html",__editMozParam,"dialogHeight:300px;dialogWidth:600px;resizable:1;status:0;scroll:0");if(path!="0"&&path!=null){if(mode==1){editLoad(path)}else if(mode==4){var html="<embed src=\""+__editRelativeGetRelFromAbs(path,"LINK")+"\" contenteditable=\"false\" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' loop='false' menu='false' quality='high' play='true'>";editInsertHtml(html);__editRelativePrepareObject("EMBED",true)}else if(mode==5){var html="<EMBED src=\""+__editRelativeGetRelFromAbs(path,"LINK")+"\" type='application/x-mplayer2' pluginspage='http://download.microsoft.com/download/winmediaplayer/nsplugin/6.4/WIN98/EN-US/wmpplugin.exe'>";editInsertHtml(html);__editRelativePrepareObject("EMBED",true)}else if(mode==6){editLoad(path)}}}}if(mode==2){setPropertyValue("editPath",localPath);invokeMethodInModel("onLoad")}if(mode==3){__editPrepareParams();__editMozParam[2]="IMAGE";if(browser.ns){var left=screen.width/2-600/2;var top=screen.height/2-300/2;window.open(editorUrl+"dialogs/"+globalTechnology+"/dialog.html","color","modal=1,left="+left+",top="+top+",height=300,width=600,resizable=1,status=0,scrollbars=0")}else{var path=window.showModalDialog(editorUrl+"dialogs/"+globalTechnology+"/dialog.html",__editMozParam,"dialogHeight:300px;dialogWidth:600px;resizable:1;status:0;scroll:0");if(path!="0"&&path!=null){editRelativeCreateImage(path)}}}};function editSaveDialog(){var editorUrl=__editGetEditorUrl();__editPrepareParams();__editMozParam[2]="SAVE";__editMozParam[9]=globalDialogFilterDoc;if(browser.ns){var left=screen.width/2-600/2;var top=screen.height/2-300/2;window.open(editorUrl+"dialogs/"+globalTechnology+"/dialog.html","color","modal=1,left="+left+",top="+top+",height=300,width=600,resizable=1,status=0,scrollbars=0")}else{var path=window.showModalDialog(editorUrl+"dialogs/"+globalTechnology+"/dialog.html",__editMozParam,"dialogHeight:300px;dialogWidth:400px;resizable:1;status:0;scroll:0");if(path!="0"&&path!=null){__currentURLTemp=path;__editReloadAfterSave=true;editSave(path)}}};function editLink(){var editorUrl=__editGetEditorUrl();try{var parent=__editActiveObject;if(__editActiveObject){while(parent.tagName.toUpperCase()!="BODY"){if(parent.tagName.toUpperCase()=="A"){__editActiveObject=parent;break}parent=parent.parentNode}__editPrepareParams();__editMozParam[2]="LINK";__editMozParam[9]=globalDialogFilterLink;if(__editActiveObject.tagName.toUpperCase()=="A"){__editMozParam[3]="0";__editMozParam[5]=__editActiveObject;if(browser.ie){var values=window.showModalDialog(editorUrl+"dialogs/frame.html",__editMozParam,"dialogHeight:"+(400+globalDialogOffset)+"px;dialogWidth:400px;resizable:0;status:0;scroll:0");editSetFocus()}else{var left=screen.width/2-400/2;var top=screen.height/2-400/2;window.open(editorUrl+"dialogs/frame.html","color","modal=1,left="+left+",top="+top+",height=350,width=400,resizable=0,status=0,scrollbars=0")}}else{if(!editHasSelection()){alert(getLanguageString(language,3012))}else{__editMozParam[3]="1";if(browser.ie){var range=getDoc().selection.createRange();if(editGetSelectionType()=="CONTROL"){if(range.length>1){alert("Please select only one object !");return}else{if(range(0).tagName.toUpperCase()!="IMG"){alert("You can set links only to images !");return}}}__editMozParam[5]=range;var values=window.showModalDialog(editorUrl+"dialogs/frame.html",__editMozParam,"dialogHeight:"+(400+globalDialogOffset)+"px;dialogWidth:400px;resizable:0;status:0;scroll:0");editSetFocus()}else{var left=screen.width/2-400/2;var top=screen.height/2-400/2;window.open(editorUrl+"dialogs/frame.html","color","modal=1,left="+left+",top="+top+",height=350,width=400,resizable=0,status=0,scrollbars=0")}}}}else{alert(getLanguageString(language,3012))}}catch(error){}};function editProperties(type,inFile,inAttribute){var editorUrl=__editGetEditorUrl();var file="";var attribute="";__editPrepareParams();if(type==6){if(__NotSupportedByMozilla())return;__editMozParam[2]="IFRAME";__editMozParam[5]=objSelected;file=editorUrl+"dialogs/iframe.html";if(inFile)file=inFile;attribute="dialogHeight:"+(200+globalDialogOffset)+"px;dialogWidth:300px;resizable:0;status:0;scroll:0";if(inAttribute)attribute=inAttribute;var values=window.showModalDialog(file,__editMozParam,attribute);editSetFocus();return}if(type==8){file=editorUrl+"dialogs/anchor.html";if(inFile)file=inFile;__editMozParam[2]="ANCHOR";__editMozParam[5]=objSelected.id;if(browser.ie){attribute="dialogHeight:"+(120+globalDialogOffset)+"px;dialogWidth:400px;resizable:0;status:0;scroll:0";if(inAttribute)attribute=inAttribute;var values=window.showModalDialog(file,__editMozParam,attribute)}else{var left=screen.width/2-400/2;var top=screen.height/2-120/2;window.open(file,"anchor","modal=1,left="+left+",top="+top+",height=120,width=400,resizable=0,status=0,scrollbars=0")}editSetFocus();return}if(type==12){if(__NotSupportedByMozilla())return;__editMozParam[2]="FLASH";__editMozParam[5]=objSelected;file=editorUrl+"dialogs/flash.html";if(inFile)file=inFile;attribute="dialogHeight:"+(396+globalDialogOffset)+"px;dialogWidth:290px;resizable:0;status:0;scroll:0";if(inAttribute)attribute=inAttribute;var values=window.showModalDialog(file,__editMozParam,attribute);editSetFocus();return}if(type==0){__editMozParam[2]="TABLE";__editMozParam[5]=table}if(type==2){__editMozParam[2]="CELL";__editMozParam[5]=objSelected}if(type==3){__editMozParam[2]="IMAGE";__editMozParam[5]=objSelected}if(type==4){__editMozParam[2]="BODY";__editMozParam[5]=getDoc().body}if(type==5){__editMozParam[2]="DIV";__editMozParam[5]=objSelected}if(type==7){__editMozParam[2]="LABEL";__editMozParam[5]=objSelected}if(type==9){__editMozParam[2]="FORM";__editMozParam[5]=objSelected}if(type==10){__editMozParam[2]="INPUT";__editMozParam[5]=objSelected}if(type==11){__editMozParam[2]="SELECT";__editMozParam[5]=objSelected}if(type==13){__editMozParam[2]="TEXTAREA";__editMozParam[5]=objSelected}file=editorUrl+"dialogs/frame.html";if(inFile)file=inFile;if(browser.ie){attribute="dialogHeight:"+(400+globalDialogOffset)+"px;dialogWidth:400px;resizable:0;status:0;scroll:0";if(inAttribute)attribute=inAttribute;var values=window.showModalDialog(file,__editMozParam,attribute)}else{var left=screen.width/2-400/2;var top=screen.height/2-400/2;window.open(file,"table","modal=1,left="+left+",top="+top+",height=400,width=400,resizable=0,status=0,scrollbars=0")}editSetFocus()};function editUpload(path,url,mode,insert){var web=__editGetEditorUrl();var left=screen.width/2-476/2;var top=screen.height/2-166/2;if(insert){insert="1"}else{insert="0"}var baseUrl="";var basePath="";if(path!=""){basePath=path;baseUrl=url}else{if(mode==0){if(globalImageUrlAbsolute==""){baseUrl=__editGetEditorWeb()+globalImageDir+"/";basePath=globalRootPath!=""?(globalRootPath+globalImageDir+"/"): ""}else{baseUrl=globalImageUrlAbsolute;basePath=globalImagePathAbsolute}}if(mode==1){if(globalDocumentUrlAbsolute==""){baseUrl=__editGetEditorWeb()+globalDocDir+"/";basePath=globalRootPath!=""?(globalRootPath+globalDocDir+"/"): ""}else{baseUrl=globalDocumentUrlAbsolute;basePath=globalDocumentPathAbsolute}}}__editPrepareParams();__editMozParam[2]=insert;__editMozParam[6]=baseUrl;__editMozParam[7]=basePath;__editUploadUrl=baseUrl;__editUploadPath=basePath;window.open(web+"dialogs/"+globalTechnology+"/upload.html","","modal=1,left="+left+",top="+top+",height=166,width=476,resizable=0,status=0,scrollbars=0")};function editUploadInsert(path,url,mode){editUpload(path,url,mode,1)};function callback_editUpload(file){__editUploadedFile=__editUploadUrl+file;editRelativeCreateImage(__editUploadedFile)};