/*
Modification or decryption of this file is strictly forbidden - Pintexx GmbH
*/
function editOpen(mode,localPath){var editorUrl=__editGetEditorUrl();var type="OPEN";var filter="";var width=710;var height=500;if(mode==0){parent.editFile.click()}if(mode==1||mode==4||mode==5||mode==6||mode==7||mode==8){__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}else if(mode==7){type="OPEN";filter="htm;html;snip;";__editMozParam[16]=globalAutoTextUrlAbsolute;__editMozParam[17]=globalAutoTextPathAbsolute}else if(mode==8){type="OPEN";filter="css;"}__editMozParam[2]=type;__editMozParam[9]=filter;__editMozParam[19]=mode;__editMozParam[20]=__editSelectedDialogPath[mode];if(browser.ns){var left=screen.width/2-width/2;var top=screen.height/2-height/2;window.open(editorUrl+"server/"+globalTechnology+"/dialog.html","color","modal=1,left="+left+",top="+top+",height="+height+",width="+width+",resizable=1,status=0,scrollbars=0")}else{var path=window.showModalDialog(editorUrl+"server/"+globalTechnology+"/dialog.html",__editMozParam,"dialogHeight:"+height+"px;dialogWidth:"+width+"px;resizable:1;status:0;scroll:0");if(path!="0"&&path!=null){if(mode==1){editLoad(path)}else if(mode==4){var html="<embed id=\"__tmp_flash\" 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);var flash=getDoc().getElementById("__tmp_flash");flash.removeAttribute("id","",0);__editRelativePrepareObject("EMBED",true);try{eventOnAfterInsertObject("FLASH",flash)}catch(Error){}}else if(mode==5){var html="<EMBED id=\"__tmp_media\" 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);var media=getDoc().getElementById("__tmp_media");media.removeAttribute("id","",0);__editRelativePrepareObject("EMBED",true);try{eventOnAfterInsertObject("MEDIA",media)}catch(Error){}}else if(mode==6){editLoad(path)}else if(mode==7){__comm=new Comm("");__comm.loadFile(path)}else if(mode==8){editSetExternalStyleSheet(path)}}}}if(mode==2){setPropertyValue("editPath",localPath);invokeMethodInModel("onLoad")}if(mode==3){__editPrepareParams();__editMozParam[2]="IMAGE";__editMozParam[19]=mode;__editMozParam[20]=__editSelectedDialogPath[mode];if(browser.ns){var left=screen.width/2-width/2;var top=screen.height/2-height/2;window.open(editorUrl+"server/"+globalTechnology+"/dialog.html","color","modal=1,left="+left+",top="+top+",height="+height+",width="+width+",resizable=1,status=0,scrollbars=0")}else{var path=window.showModalDialog(editorUrl+"server/"+globalTechnology+"/dialog.html",__editMozParam,"dialogHeight:"+height+"px;dialogWidth:"+width+"px;resizable:1;status:0;scroll:0");if(path!="0"&&path!=null){var image=editRelativeCreateImage(path);try{eventOnAfterInsertObject("IMAGE",image)}catch(Error){}}}}editSetFocus()};function editSaveDialog(html){var editorUrl=__editGetEditorUrl();var width=710;var height=500;__editPrepareParams();__editMozParam[2]="SAVE";__editMozParam[9]=globalDialogFilterDoc;if(browser.ns){var left=screen.width/2-width/2;var top=screen.height/2-height/2;window.open(editorUrl+"server/"+globalTechnology+"/dialog.html","color","modal=1,left="+left+",top="+top+",height="+height+",width="+width+",resizable=1,status=0,scrollbars=0")}else{var path=window.showModalDialog(editorUrl+"server/"+globalTechnology+"/dialog.html",__editMozParam,"dialogHeight:"+height+"px;dialogWidth:"+width+"px;resizable:1;status:0;scroll:0");if(path!="0"&&path!=null){__currentURLTemp=path;__editReloadAfterSave=true;editSave(path,html)}}};function editLink(){var editorUrl=__editGetEditorUrl();var dialogUrl="";if(globalUserMode=="0")dialogUrl=editorUrl+"mode/html/dialogs/frame.html";else dialogUrl=editorUrl+"mode/wp/dialogs/frame.html";try{if(__editActiveObject.tagName.toUpperCase()=="HTML")__editActiveObject=getDoc().body;var parentObject=__editActiveObject;if(__editActiveObject){while(parentObject.tagName.toUpperCase()!="BODY"&&parentObject.tagName.toUpperCase()!="HTML"){if(parentObject.tagName.toUpperCase()=="A"){__editActiveObject=parentObject;break}parentObject=parentObject.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(dialogUrl,__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(dialogUrl,"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(dialogUrl,__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(dialogUrl,"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,width,height){var editorUrl=__editGetEditorUrl();var file="";var attribute="";__editPrepareParams();if(type==6){if(__NotSupportedByMozilla())return;__editMozParam[2]="IFRAME";__editMozParam[5]=objSelected;file=editorUrl+"mode/html/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+"mode/html/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+"mode/html/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]=__editCurrentTable}if(type==2){__editPrepareTableObjects();__editMozParam[2]="CELL";__editMozParam[5]=__editActiveObject}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}if(type==14||type==15){var source=__editGetSelectionObject();try{if(editGetSelectedText()!=""&&(source.tagName.toLowerCase()=="body"||source.tagName.toLowerCase()=="td")){editInsertHtml("<span id='__tmpSpan'>"+editGetSelectedHtml()+"</span>");source=getDoc().getElementById("__tmpSpan");source.removeAttribute("id");editSelectText(source);editSetActiveObject(source);objSelected=source}}catch(Error){}}if(type==14){__editMozParam[2]="CHAR";__editMozParam[5]=objSelected}if(type==15){__editMozParam[2]="BORDER";__editMozParam[5]=objSelected}if(globalUserMode=="0")file=editorUrl+"mode/html/dialogs/frame.html";else file=editorUrl+"mode/wp/dialogs/frame.html";if(inFile)file=inFile;if(browser.ie){attribute="dialogHeight:"+((height!=null?height:420)+globalDialogOffset)+"px;dialogWidth:"+(width!=null?width:400)+"px;resizable:0;status:0;scroll:0";if(inAttribute)attribute=inAttribute;var values=window.showModalDialog(file,__editMozParam,attribute)}else{var left=screen.width/2-(width!=null?width:420)/2;var top=screen.height/2-(height!=null?height:400)/2;var win=window.open(file,"table","modal=1,left="+left+",top="+top+",height="+(height!=null?height:420)+",width="+(width!=null?width:400)+",resizable=0,status=0,scrollbars=0");win.focus()}};function editStyleSheet(){var editorUrl=__editGetEditorUrl();var height=430;var width=600;__editPrepareParams();if(globalUserMode=="0")file=editorUrl+"mode/html/dialogs/css.html";else file=editorUrl+"mode/wp/dialogs/css.html";if(browser.ie){var values=window.showModalDialog(file,__editMozParam,"dialogHeight:"+((height!=null?height:420)+globalDialogOffset)+"px;dialogWidth:"+(width!=null?width:400)+"px;resizable:0;status:0;scroll:0;")}else{var left=screen.width/2-(width!=null?width:420)/2;var top=screen.height/2-(height!=null?height:400)/2;var win=window.open(file,"table","modal=1,left="+left+",top="+top+",height="+(height!=null?height:420)+",width="+(width!=null?width:400)+",resizable=0,status=0,scrollbars=0");win.focus()}};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;if(mode==1)__editMozParam[9]=globalDialogFilterDoc;__editUploadUrl=baseUrl;__editUploadPath=basePath;if(globalTechnology.toLowerCase()=="aspx")window.open(web+"server/"+globalTechnology+"/upload.aspx","","modal=1,left="+left+",top="+top+",height=166,width=476,resizable=0,status=0,scrollbars=0");else window.open(web+"server/"+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)};
