/*
Modification or decryption of this file is strictly forbidden - Pintexx GmbH
*/
var __comm;var __data;function Comm(target){this.comboid="";this.target=target};Comm.prototype.execute=function(key,para,para2){var html="";var url="";var iframe=null;if(this.target=="")return;if(this.target.toUpperCase().indexOf("HTTP")==0){url=this.target}else{url=__editGetEditorUrl()+this.target}html+="<html>";html+="<body>";html+="<form name='frmComm' id='frmComm' method ='POST' action='"+url+"'>";html+="<input type='hidden' id='key' name='key'>";html+="<input type='hidden' id='para' name='para'>";html+="<input type='hidden' id='para2' name='para2'>";html+="</form>";html+="</body>";html+="</html>";if(!document.getElementById("__remote_frame")){iframe=document.createElement("IFRAME");iframe.id="__remote_frame";iframe.style.position="absolute";iframe.style.top=0;iframe.style.left=0;iframe.style.visibility="hidden";iframe.src="dummy.html";document.body.appendChild(iframe)}else{iframe=document.getElementById("__remote_frame")}var doc=iframe.contentWindow.document;doc.open();doc.write(html);doc.close();doc.getElementById("key").value=key;doc.getElementById("para").value=para;doc.getElementById("para2").value=para2;doc.getElementById("frmComm").submit()};Comm.prototype.executeSave=function(text,url){var html="";var pageUrl="";if(this.target=="")return;if(this.target.indexOf("..")==0||this.target.toUpperCase().indexOf("HTTP")==0)pageUrl=this.target;else pageUrl=__editGetEditorUrl()+this.target;html="<html>";html+="<body>";html+="<form name='frmComm' id='frmComm' name='frmComm' method ='POST' action='"+pageUrl+"'>";html+="<input type='hidden' id='key' name='key' value=''>";html+="<input type='hidden' id='para' name='para' value=''>";html+="<input type='hidden' id='para2' name='para2' value=''>";html+="<input type='hidden' id='html' name='html' value=''>";html+="<input type='hidden' id='url' name='url' value=''>";html+="<input type='hidden' id='basepath' name='basepath' value=''>";html+="<input type='hidden' id='baseurl' name='baseurl' value=''>";if(globalSaveValue!="")html+="<input type='hidden' id='custom' name='custom' value=''>";html+="</form>";html+="</body>";html+="</html>";if(!document.getElementById("__remote_frame")){iframe=document.createElement("IFRAME");iframe.src="dummy.html";document.body.appendChild(iframe);iframe.id="__remote_frame";iframe.style.visibility="hidden";iframe.style.position="absolute";iframe.style.left=0;iframe.style.top=0}else{iframe=document.getElementById("__remote_frame")}var doc=document.getElementById("__remote_frame").contentWindow.document;doc.open();doc.write(html);doc.close();doc.getElementById("html").value=text;doc.getElementById("url").value=url;doc.getElementById("key").value="SAVE";doc.getElementById("para").value=url;doc.getElementById("para2").value=text;var baseUrl="";var basePath="";if(globalDocumentUrlAbsolute==""){baseUrl=__editGetEditorWeb()+globalDocDir+"/";basePath=globalRootPath!=""?(globalRootPath+globalDocDir+"/"): ""}else{baseUrl=globalDocumentUrlAbsolute;basePath=globalDocumentPathAbsolute}doc.getElementById("basepath").value=basePath;doc.getElementById("baseurl").value=baseUrl;if(globalSaveValue!="")doc.getElementById("custom").value=globalSaveValue;doc.getElementById("frmComm").submit()};Comm.prototype.receive=function(key){if(key=='SAVE'){if(__data!=""){if(__data!="OK"){alert(__data)}else{if(__editReloadAfterSave){editLoad(__currentURLTemp);__editReloadAfterSave=false}__editChanged=false}}document.getElementById('__remote_frame').src='dummy.html'}if(key=='GETTEXT'){var aTexts=__data.split("~");var combo=null;try{combo=document.getElementById(__comm.comboid)}catch(Error){};if(combo!=null){while(combo.length){combo.remove(0)}for(var i=0;i<aTexts.length-1;i++){var aText=aTexts[i].split("|");var item=document.createElement("option");item.text=aText[0];item.value=aText[1];if(browser.ie)combo.add(item);else combo.add(item,null)}}document.getElementById('__remote_frame').src='dummy.html';eventOnProcessTM(aTexts)}if(key=='SETTEXT'){editGetTextModule(__comm.comboid)}if(key=='REMOVETEXT'){editGetTextModule(__comm.comboid)}if(key=='INTELLI'){__intelliProcess(__data)}};Comm.prototype.loadFile=function(url){var iframe=null;if(!document.getElementById("__remote_frame_snip")){iframe=document.createElement("IFRAME");iframe.id="__remote_frame_snip";iframe.style.position="absolute";iframe.style.top=0;iframe.style.left=0;iframe.style.visibility="hidden";iframe.src="dummy.html";document.body.appendChild(iframe);if(browser.ie){iframe.attachEvent("onload",__editLoadSnippet)}else{iframe.addEventListener("load",__editLoadSnippet,false)}}else{iframe=document.getElementById("__remote_frame_snip")}iframe.src=url;__currentURL=url};function __editLoadSnippet(){var iframe=document.getElementById("__remote_frame_snip");var html=iframe.contentWindow.document.body.innerHTML;editInsertHtml(html)}