\n"}else{table=e.contentWindow.document.createElement("table");table.setAttribute("width","98%");for(i=0;i";if(xed_msie){A.insertBefore(B,A.cells(F.cellIndex))}else{A.insertBefore(B,A.cells[F.cellIndex])}A=xed_get_next_element(A)}}function xed_table_row_before(C){xed_historian(C);var A=xed_get_ancestors(C);var D=null;var B=null;for(i=0;i";new_td.colSpan=D.cells[i].colSpan}return }e=document.getElementById(C);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=D.cells[i].colSpan;new_tr.appendChild(td)}D.parentNode.insertBefore(new_tr,D)}function xed_table_row_after(C){xed_historian(C);var A=xed_get_ancestors(C);var D=null;var B=null;for(i=0;i";new_td.colSpan=D.cells[i].colSpan}return }e=document.getElementById(C);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=D.cells[i].colSpan;new_tr.appendChild(td)}next=xed_get_next_element(D);if(next){next.parentNode.insertBefore(new_tr,next)}else{D.parentNode.appendChild(new_tr)}}function xed_table_row_delete(D){xed_historian(D);var B=xed_get_ancestors(D);var E=null;var C=null;for(var A=B.length;--A>=0;){el=B[A];if(!el){continue}if(el.tagName.toLowerCase()=="tr"){E=el}else{if(el.tagName.toLowerCase()=="table"){C=el}}}E.parentNode.removeChild(E)}function xed_table_col_before(C){xed_historian(C);var I=xed_get_ancestors(C);var B=null;var H=null;for(var D=I.length;--D>=0;){el=I[D];if(!el){continue}if(el.tagName.toLowerCase()=="td"){B=el}else{if(el.tagName.toLowerCase()=="table"){H=el}}}var A=xed_table_grid(H);var F=xed_table_cellpos(A,B);var G=null;if(xed_msie){for(var E=0;E";new_td.rowSpan=B.rowSpan}else{B.colSpan++}G=B}}return }for(var E=0;B=xed_table_get_cell(A,E,F.cellindex);E++){if(B!=G){sd=xed_table_cellspan(B);if(sd.colspan==1){new_td=document.getElementById(C).contentWindow.document.createElement(B.nodeName);new_td.innerHTML=" ";new_td.rowSpan=B.rowSpan;B.parentNode.insertBefore(new_td,B)}else{B.colSpan++}G=B}}}function xed_table_col_after(C){xed_historian(C);var I=xed_get_ancestors(C);var B=null;var H=null;for(var D=I.length;--D>=0;){el=I[D];if(!el){continue}if(el.tagName.toLowerCase()=="td"){B=el}else{if(el.tagName.toLowerCase()=="table"){H=el}}}var A=xed_table_grid(H);var F=xed_table_cellpos(A,B);var G=null;if(xed_msie){for(var E=0;E";new_td.rowSpan=B.rowSpan}else{B.colSpan++}G=B}}return }for(var E=0;B=xed_table_get_cell(A,E,F.cellindex);E++){if(B!=G){sd=xed_table_cellspan(B);if(sd.colspan==1){new_td=document.getElementById(C).contentWindow.document.createElement(B.nodeName);new_td.innerHTML=" ";new_td.rowSpan=B.rowSpan;next=xed_get_next_element(B);if(next){next.parentNode.insertBefore(new_td,next)}else{B.parentNode.appendChild(new_td)}}else{B.colSpan++}G=B}}}function xed_table_col_delete(E){xed_historian(E);var C=xed_get_ancestors(E);var H=null;var D=null;for(var B=C.length;--B>=0;){el=C[B];if(!el){continue}if(el.tagName.toLowerCase()=="td"){H=el}else{if(el.tagName.toLowerCase()=="table"){D=el}}}var A=xed_table_grid(D);var G=xed_table_cellpos(A,H);for(var F=0;H=xed_table_get_cell(A,F,G.cellindex);F++){H.parentNode.removeChild(H)}}function xed_table_merge(g){xed_historian(g);var T=new Array();var Y=xed_get_selection(g);var D=xed_get_ancestors(g);var P=null;var E=null;var q=null;for(var Z=D.length;--Z>=0;){el=D[Z];if(!el){continue}if(el.tagName.toLowerCase()=="td"){P=el}else{if(el.tagName.toLowerCase()=="tr"){E=el}else{if(el.tagName.toLowerCase()=="table"){q=el}}}}var B=xed_table_grid(q);if(xed_msie||Y.rangeCount==1){if(!P){if(!E){return }P=E.cells[0]}var W=xed_get_next_element(P);P.colSpan=P.colSpan+W.colSpan;W.parentNode.deleteCell(W.cellIndex);return }else{var J=new Array();var Y=xed_get_selection(g);var K=null;var u=null;var m=-1,H=-1,l,G;if(Y.rangeCount<2){return true}for(var Z=0;Z0){T[T.length]=M}}var u=new Array();var K=null;for(var R=0;RO){O=Q}AB=-1}var F=-1;for(var S=0;SI){I=V}F=-1}P=T[0][0];P.rowSpan=I;P.colSpan=O;for(var R=0;R"&&AA!=" "&&AA!=" "&&(S+R>0)){P.innerHTML+=U}if(T[R][S]!=P&&!T[R][S]._deleted){var C=xed_table_cellpos(B,T[R][S]);var E=T[R][S].parentNode;E.removeChild(T[R][S]);T[R][S]._deleted=true;if(!E.hasChildNodes()){E.parentNode.removeChild(E);var X=null;for(var S=0;cell=xed_table_get_cell(B,C.rowindex,S);S++){if(cell!=last_cell&&cell.rowSpan>1){cell.rowSpan--}last_cell=cell}if(P.rowSpan>1){P.rowSpan--}}}}}}function xed_table_split_merged(D){xed_historian(D);var C=xed_get_ancestors(D);var H=null;for(B=0;B1||E>1){H.colSpan=1;for(var B=1;B";H.parentNode.insertBefore(A,xed_get_next_element(H));if(E>1){xed_table_add_rows(A,H.parentNode,E)}}xed_table_add_rows(H,H.parentNode,E)}}function xed_insert_element(C,B,A){xed_historian(C);e=document.getElementById(C);d=e.contentWindow.document;for(i=0;i";len=tag.length;sel=document.getElementById(C).contentWindow.document.selection;range=sel.createRange();inn=range.htmlText;while(inn.match(/^<([a-zA-Z0-9\:_-]+)[^>]*>/)){inn=inn.replace(/^<([a-zA-Z0-9\:_-]+)[^>]*>/,"")}while(inn.match(/<\/[^>]+>$/)){inn=inn.replace(/<\/[^>]+>$/,"")}tag+=inn;if(tag.length==len){empty=true;len2=0}else{empty=false;len2=inn.length*-1}tag+=""+B+">";range.pasteHTML(tag);range.moveStart("character",len2);range.select()}else{if(xed_safari){tag="##STARTNEWELEMENT##";tag2="<"+B;for(i=0;i";tag_end="##ENDNEWELEMENT##";tag2_end=""+B+">";sel=document.getElementById(C).contentWindow.getSelection();range=document.getElementById(C).contentWindow.document.createRange();range.setStart(sel.anchorNode,sel.anchorOffset);range.setEnd(sel.focusNode,sel.focusOffset);pre=sel.focusNode.data.substring(0,sel.focusOffset);post=sel.focusNode.data.substring(sel.focusOffset);sel.focusNode.data=pre+tag_end+post;pre=sel.anchorNode.data.substring(0,sel.anchorOffset);post=sel.anchorNode.data.substring(sel.anchorOffset);sel.anchorNode.data=pre+tag+post;html=xed_get_source(C);html=html.replace(/##STARTNEWELEMENT##/g,tag2);html=html.replace(/##ENDNEWELEMENT##/g,tag2_end);xed_set_source(C,html,true)}else{len=B.length+2;tag=d.createElement(B);for(i=0;i";len=tag.length;sel=document.getElementById(A).contentWindow.document.selection;range=sel.createRange();inn=range.htmlText;while(inn.match(/<([a-zA-Z0-9\:_-]+)[^>]*>/)){inn=inn.replace(/<([a-zA-Z0-9\:_-]+)[^>]*>/,"")}while(inn.match(/<\/[^>]+>/)){inn=inn.replace(/<\/[^>]+>/,"")}tag+=inn;if(tag.length==len){empty=true;len2=0}else{empty=false;len2=inn.length*-1}tag+=""+name+">";range.pasteHTML(tag);range.moveStart("character",len2);range.select()}else{len=name.length+2;tag=d.createElement(name);for(i=0;i]*>/)){html=html.replace(/<([a-zA-Z0-9\:_-]+)[^>]*>/,"")}while(html.match(/<\/[^>]+>/)){html=html.replace(/<\/[^>]+>/,"")}tag.appendChild(e.contentWindow.document.createTextNode(html));if(tag.innerHTML.length==0){empty=true}else{empty=false}xed_insert_node_at_selection(e.contentWindow,tag)}e.contentWindow.focus();return false}function xed_charmap(A){w=window.open(xed_web_path+"/index/xed-charmap-action?ifname="+A,"xedCharmapWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=480,height=250,top=100,left=150");return false}function xed_insert_character(A,B){xed_historian(A);if(document.all){sel=document.getElementById(A).contentWindow.document.selection;range=sel.createRange();range.cutHTML;range.pasteHTML(""+B+";")}else{xed_insert_html_at_selection(A,""+B+";")}document.getElementById(A).contentWindow.focus();return false}function xed_edit_properties(B,A){if(!A){A=xed_get_parent(B)}if(A.tagName.toLowerCase()=="tbody"){A=A.parentNode}if(xed_msie&&A.tagName.toLowerCase()=="box"){tag_name="xt:box"}else{tag_name=A.tagName.toLowerCase()}p="?ifname="+B+"&tag="+tag_name;for(i=0;i1){inner+=")"}element.innerHTML=inner}else{for(i=0;ixed_undo_max_length){xed_history.shift()}while(xed_future.length>xed_undo_max_length){xed_future.shift()}xed_debug(xed_history.length+"|"+xed_future.length)}function xed_show_history(A){o="";for(i=0;i0){c=xed_get_source(A);s=xed_history.pop();while(c==s){t=s;s=xed_history.pop();if(s==null){s=t;break}}xed_future.push(c);document.getElementById(A).contentWindow.document.body.innerHTML=s}document.getElementById(A).contentWindow.focus();return false}function xed_redo(A){if(xed_future.length>0){c=xed_get_source(A);s=xed_future.pop();while(c==s){t=s;s=xed_future.pop();if(s==null){s=t;break}}xed_history.push(c);document.getElementById(A).contentWindow.document.body.innerHTML=s}document.getElementById(A).contentWindow.focus();return false}function xed_cut(A){try{document.getElementById(A).contentWindow.document.execCommand("cut",false,null)}catch(B){if(confirm("Due to limitations in the Mozilla browser, ordinary scripts cannot access the clipboard. Click OK to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.")){window.open("http://mozilla.org/editor/midasdemo/securityprefs.html")}}document.getElementById(A).contentWindow.focus();return false}function xed_copy(A){try{document.getElementById(A).contentWindow.document.execCommand("copy",false,null)}catch(B){if(confirm("Due to limitations in the Mozilla browser, ordinary scripts cannot access the clipboard. Click OK to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.")){window.open("http://mozilla.org/editor/midasdemo/securityprefs.html")}}document.getElementById(A).contentWindow.focus();return false}function xed_paste(A){try{document.getElementById(A).contentWindow.document.execCommand("paste",false,null)}catch(B){if(confirm("Due to limitations in the Mozilla browser, ordinary scripts cannot access the clipboard. Click OK to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.")){window.open("http://mozilla.org/editor/midasdemo/securityprefs.html")}}document.getElementById(A).contentWindow.focus();return false}function xed_help(A){window.open(xed_web_path+"/index/help-app?appname=xed","xedHelpWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no,width=640,height=480,top=100,left=150");return false}function xed_full_screen(A){width=750;height=550;width=screen.availWidth-50;height=screen.availHeight-75;if(width>1050){width=1050}w=window.open("","xedFullscreenWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width="+width+",height="+height+",top=25,left=25");f=document.getElementById("xed-"+A+"-fsform");f.elements.xeditor.value=xed_get_source(A);f.submit();return false}function xed_template(C,B){xed_historian(C);c1=document.getElementById(B).selectedIndex;if(c1!=0){var A=document.getElementById(B).options[c1].value;document.getElementById(B).selectedIndex=0;if(A==""){}else{if(A=="ADD TEMPLATE"){var E=C;var D=B;prompt("Please enter a name for your template","",function(F){if(F==false||F==null||F.length==0){return }value=xed_get_source(E);rpc_call(xed_web_path+"/index/xed-template-add-action?name="+F+"&body="+xed_url_encode(value));tlist=document.getElementById(D);for(i=0;i0){for(i=0;i";txt=B;if(A.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:box");box.setAttribute("name",B);box.setAttribute("title",B);box.setAttribute("style","word-wrap: break-word; display: list-item; list-style-type: none; border: 0px none; background-image: url("+xed_prefix+"/inc/app/xed/pix/box-bg.jpg); background-repeat: no-repeat; width: 528px; height: 63px; font-weight: normal; padding: 23px 10px 0px 85px; margin: 5px;");if(A.length>0){for(i=0;i0){txt+=" (";sep="";for(i=0;i0){for(i=0;i";txt=B;if(A.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:form");box.setAttribute("name",B);box.setAttribute("title",B);box.setAttribute("style","display: list-item; list-style-type: none; border: 0px none; background-image: url("+xed_prefix+"/inc/app/xed/pix/form-bg.jpg); background-repeat: no-repeat; width: 528px; height: 63px; font-weight: normal; padding: 23px 10px 0px 85px; margin: 5px;");if(A.length>0){for(i=0;i0){txt+=" (";sep="";for(i=0;i";o+="
\n"}else{table=e.contentWindow.document.createElement("table");table.setAttribute("width","98%");for(i=0;i";if(xed_msie){A.insertBefore(B,A.cells(F.cellIndex))}else{A.insertBefore(B,A.cells[F.cellIndex])}A=xed_get_next_element(A)}}function xed_table_row_before(C){xed_historian(C);var A=xed_get_ancestors(C);var D=null;var B=null;for(i=0;i";new_td.colSpan=D.cells[i].colSpan}return }e=document.getElementById(C);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=D.cells[i].colSpan;new_tr.appendChild(td)}D.parentNode.insertBefore(new_tr,D)}function xed_table_row_after(C){xed_historian(C);var A=xed_get_ancestors(C);var D=null;var B=null;for(i=0;i";new_td.colSpan=D.cells[i].colSpan}return }e=document.getElementById(C);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=D.cells[i].colSpan;new_tr.appendChild(td)}next=xed_get_next_element(D);if(next){next.parentNode.insertBefore(new_tr,next)}else{D.parentNode.appendChild(new_tr)}}function xed_table_row_delete(D){xed_historian(D);var B=xed_get_ancestors(D);var E=null;var C=null;for(var A=B.length;--A>=0;){el=B[A];if(!el){continue}if(el.tagName.toLowerCase()=="tr"){E=el}else{if(el.tagName.toLowerCase()=="table"){C=el}}}E.parentNode.removeChild(E)}function xed_table_col_before(C){xed_historian(C);var I=xed_get_ancestors(C);var B=null;var H=null;for(var D=I.length;--D>=0;){el=I[D];if(!el){continue}if(el.tagName.toLowerCase()=="td"){B=el}else{if(el.tagName.toLowerCase()=="table"){H=el}}}var A=xed_table_grid(H);var F=xed_table_cellpos(A,B);var G=null;if(xed_msie){for(var E=0;E";new_td.rowSpan=B.rowSpan}else{B.colSpan++}G=B}}return }for(var E=0;B=xed_table_get_cell(A,E,F.cellindex);E++){if(B!=G){sd=xed_table_cellspan(B);if(sd.colspan==1){new_td=document.getElementById(C).contentWindow.document.createElement(B.nodeName);new_td.innerHTML=" ";new_td.rowSpan=B.rowSpan;B.parentNode.insertBefore(new_td,B)}else{B.colSpan++}G=B}}}function xed_table_col_after(C){xed_historian(C);var I=xed_get_ancestors(C);var B=null;var H=null;for(var D=I.length;--D>=0;){el=I[D];if(!el){continue}if(el.tagName.toLowerCase()=="td"){B=el}else{if(el.tagName.toLowerCase()=="table"){H=el}}}var A=xed_table_grid(H);var F=xed_table_cellpos(A,B);var G=null;if(xed_msie){for(var E=0;E";new_td.rowSpan=B.rowSpan}else{B.colSpan++}G=B}}return }for(var E=0;B=xed_table_get_cell(A,E,F.cellindex);E++){if(B!=G){sd=xed_table_cellspan(B);if(sd.colspan==1){new_td=document.getElementById(C).contentWindow.document.createElement(B.nodeName);new_td.innerHTML=" ";new_td.rowSpan=B.rowSpan;next=xed_get_next_element(B);if(next){next.parentNode.insertBefore(new_td,next)}else{B.parentNode.appendChild(new_td)}}else{B.colSpan++}G=B}}}function xed_table_col_delete(E){xed_historian(E);var C=xed_get_ancestors(E);var H=null;var D=null;for(var B=C.length;--B>=0;){el=C[B];if(!el){continue}if(el.tagName.toLowerCase()=="td"){H=el}else{if(el.tagName.toLowerCase()=="table"){D=el}}}var A=xed_table_grid(D);var G=xed_table_cellpos(A,H);for(var F=0;H=xed_table_get_cell(A,F,G.cellindex);F++){H.parentNode.removeChild(H)}}function xed_table_merge(g){xed_historian(g);var T=new Array();var Y=xed_get_selection(g);var D=xed_get_ancestors(g);var P=null;var E=null;var q=null;for(var Z=D.length;--Z>=0;){el=D[Z];if(!el){continue}if(el.tagName.toLowerCase()=="td"){P=el}else{if(el.tagName.toLowerCase()=="tr"){E=el}else{if(el.tagName.toLowerCase()=="table"){q=el}}}}var B=xed_table_grid(q);if(xed_msie||Y.rangeCount==1){if(!P){if(!E){return }P=E.cells[0]}var W=xed_get_next_element(P);P.colSpan=P.colSpan+W.colSpan;W.parentNode.deleteCell(W.cellIndex);return }else{var J=new Array();var Y=xed_get_selection(g);var K=null;var u=null;var m=-1,H=-1,l,G;if(Y.rangeCount<2){return true}for(var Z=0;Z0){T[T.length]=M}}var u=new Array();var K=null;for(var R=0;RO){O=Q}AB=-1}var F=-1;for(var S=0;SI){I=V}F=-1}P=T[0][0];P.rowSpan=I;P.colSpan=O;for(var R=0;R"&&AA!=" "&&AA!=" "&&(S+R>0)){P.innerHTML+=U}if(T[R][S]!=P&&!T[R][S]._deleted){var C=xed_table_cellpos(B,T[R][S]);var E=T[R][S].parentNode;E.removeChild(T[R][S]);T[R][S]._deleted=true;if(!E.hasChildNodes()){E.parentNode.removeChild(E);var X=null;for(var S=0;cell=xed_table_get_cell(B,C.rowindex,S);S++){if(cell!=last_cell&&cell.rowSpan>1){cell.rowSpan--}last_cell=cell}if(P.rowSpan>1){P.rowSpan--}}}}}}function xed_table_split_merged(D){xed_historian(D);var C=xed_get_ancestors(D);var H=null;for(B=0;B1||E>1){H.colSpan=1;for(var B=1;B";H.parentNode.insertBefore(A,xed_get_next_element(H));if(E>1){xed_table_add_rows(A,H.parentNode,E)}}xed_table_add_rows(H,H.parentNode,E)}}function xed_insert_element(C,B,A){xed_historian(C);e=document.getElementById(C);d=e.contentWindow.document;for(i=0;i";len=tag.length;sel=document.getElementById(C).contentWindow.document.selection;range=sel.createRange();inn=range.htmlText;while(inn.match(/^<([a-zA-Z0-9\:_-]+)[^>]*>/)){inn=inn.replace(/^<([a-zA-Z0-9\:_-]+)[^>]*>/,"")}while(inn.match(/<\/[^>]+>$/)){inn=inn.replace(/<\/[^>]+>$/,"")}tag+=inn;if(tag.length==len){empty=true;len2=0}else{empty=false;len2=inn.length*-1}tag+=""+B+">";range.pasteHTML(tag);range.moveStart("character",len2);range.select()}else{if(xed_safari){tag="##STARTNEWELEMENT##";tag2="<"+B;for(i=0;i";tag_end="##ENDNEWELEMENT##";tag2_end=""+B+">";sel=document.getElementById(C).contentWindow.getSelection();range=document.getElementById(C).contentWindow.document.createRange();range.setStart(sel.anchorNode,sel.anchorOffset);range.setEnd(sel.focusNode,sel.focusOffset);pre=sel.focusNode.data.substring(0,sel.focusOffset);post=sel.focusNode.data.substring(sel.focusOffset);sel.focusNode.data=pre+tag_end+post;pre=sel.anchorNode.data.substring(0,sel.anchorOffset);post=sel.anchorNode.data.substring(sel.anchorOffset);sel.anchorNode.data=pre+tag+post;html=xed_get_source(C);html=html.replace(/##STARTNEWELEMENT##/g,tag2);html=html.replace(/##ENDNEWELEMENT##/g,tag2_end);xed_set_source(C,html,true)}else{len=B.length+2;tag=d.createElement(B);for(i=0;i";len=tag.length;sel=document.getElementById(A).contentWindow.document.selection;range=sel.createRange();inn=range.htmlText;while(inn.match(/<([a-zA-Z0-9\:_-]+)[^>]*>/)){inn=inn.replace(/<([a-zA-Z0-9\:_-]+)[^>]*>/,"")}while(inn.match(/<\/[^>]+>/)){inn=inn.replace(/<\/[^>]+>/,"")}tag+=inn;if(tag.length==len){empty=true;len2=0}else{empty=false;len2=inn.length*-1}tag+=""+name+">";range.pasteHTML(tag);range.moveStart("character",len2);range.select()}else{len=name.length+2;tag=d.createElement(name);for(i=0;i]*>/)){html=html.replace(/<([a-zA-Z0-9\:_-]+)[^>]*>/,"")}while(html.match(/<\/[^>]+>/)){html=html.replace(/<\/[^>]+>/,"")}tag.appendChild(e.contentWindow.document.createTextNode(html));if(tag.innerHTML.length==0){empty=true}else{empty=false}xed_insert_node_at_selection(e.contentWindow,tag)}e.contentWindow.focus();return false}function xed_charmap(A){w=window.open(xed_web_path+"/index/xed-charmap-action?ifname="+A,"xedCharmapWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=480,height=250,top=100,left=150");return false}function xed_insert_character(A,B){xed_historian(A);if(document.all){sel=document.getElementById(A).contentWindow.document.selection;range=sel.createRange();range.cutHTML;range.pasteHTML(""+B+";")}else{xed_insert_html_at_selection(A,""+B+";")}document.getElementById(A).contentWindow.focus();return false}function xed_edit_properties(B,A){if(!A){A=xed_get_parent(B)}if(A.tagName.toLowerCase()=="tbody"){A=A.parentNode}if(xed_msie&&A.tagName.toLowerCase()=="box"){tag_name="xt:box"}else{tag_name=A.tagName.toLowerCase()}p="?ifname="+B+"&tag="+tag_name;for(i=0;i1){inner+=")"}element.innerHTML=inner}else{for(i=0;ixed_undo_max_length){xed_history.shift()}while(xed_future.length>xed_undo_max_length){xed_future.shift()}xed_debug(xed_history.length+"|"+xed_future.length)}function xed_show_history(A){o="";for(i=0;i0){c=xed_get_source(A);s=xed_history.pop();while(c==s){t=s;s=xed_history.pop();if(s==null){s=t;break}}xed_future.push(c);document.getElementById(A).contentWindow.document.body.innerHTML=s}document.getElementById(A).contentWindow.focus();return false}function xed_redo(A){if(xed_future.length>0){c=xed_get_source(A);s=xed_future.pop();while(c==s){t=s;s=xed_future.pop();if(s==null){s=t;break}}xed_history.push(c);document.getElementById(A).contentWindow.document.body.innerHTML=s}document.getElementById(A).contentWindow.focus();return false}function xed_cut(A){try{document.getElementById(A).contentWindow.document.execCommand("cut",false,null)}catch(B){if(confirm("Due to limitations in the Mozilla browser, ordinary scripts cannot access the clipboard. Click OK to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.")){window.open("http://mozilla.org/editor/midasdemo/securityprefs.html")}}document.getElementById(A).contentWindow.focus();return false}function xed_copy(A){try{document.getElementById(A).contentWindow.document.execCommand("copy",false,null)}catch(B){if(confirm("Due to limitations in the Mozilla browser, ordinary scripts cannot access the clipboard. Click OK to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.")){window.open("http://mozilla.org/editor/midasdemo/securityprefs.html")}}document.getElementById(A).contentWindow.focus();return false}function xed_paste(A){try{document.getElementById(A).contentWindow.document.execCommand("paste",false,null)}catch(B){if(confirm("Due to limitations in the Mozilla browser, ordinary scripts cannot access the clipboard. Click OK to see a technical note at mozilla.org which shows you how to allow a script to access the clipboard.")){window.open("http://mozilla.org/editor/midasdemo/securityprefs.html")}}document.getElementById(A).contentWindow.focus();return false}function xed_help(A){window.open(xed_web_path+"/index/help-app?appname=xed","xedHelpWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no,width=640,height=480,top=100,left=150");return false}function xed_full_screen(A){width=750;height=550;width=screen.availWidth-50;height=screen.availHeight-75;if(width>1050){width=1050}w=window.open("","xedFullscreenWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width="+width+",height="+height+",top=25,left=25");f=document.getElementById("xed-"+A+"-fsform");f.elements.xeditor.value=xed_get_source(A);f.submit();return false}function xed_template(C,B){xed_historian(C);c1=document.getElementById(B).selectedIndex;if(c1!=0){var A=document.getElementById(B).options[c1].value;document.getElementById(B).selectedIndex=0;if(A==""){}else{if(A=="ADD TEMPLATE"){var E=C;var D=B;prompt("Please enter a name for your template","",function(F){if(F==false||F==null||F.length==0){return }value=xed_get_source(E);rpc_call(xed_web_path+"/index/xed-template-add-action?name="+F+"&body="+xed_url_encode(value));tlist=document.getElementById(D);for(i=0;i0){for(i=0;i";txt=B;if(A.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:box");box.setAttribute("name",B);box.setAttribute("title",B);box.setAttribute("style","word-wrap: break-word; display: list-item; list-style-type: none; border: 0px none; background-image: url("+xed_prefix+"/inc/app/xed/pix/box-bg.jpg); background-repeat: no-repeat; width: 528px; height: 63px; font-weight: normal; padding: 23px 10px 0px 85px; margin: 5px;");if(A.length>0){for(i=0;i0){txt+=" (";sep="";for(i=0;i0){for(i=0;i";txt=B;if(A.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:form");box.setAttribute("name",B);box.setAttribute("title",B);box.setAttribute("style","display: list-item; list-style-type: none; border: 0px none; background-image: url("+xed_prefix+"/inc/app/xed/pix/form-bg.jpg); background-repeat: no-repeat; width: 528px; height: 63px; font-weight: normal; padding: 23px 10px 0px 85px; margin: 5px;");if(A.length>0){for(i=0;i0){txt+=" (";sep="";for(i=0;i";o+="