diff --git a/inc/app/xed/html/xed.spt b/inc/app/xed/html/xed.spt index 5cd6d823..0e64ae50 100755 --- a/inc/app/xed/html/xed.spt +++ b/inc/app/xed/html/xed.spt @@ -482,7 +482,7 @@ function formchooser_handler () { xed_templates = new Array (); {loop obj.templates} - xed_templates['{loop/id}'] = '{loop/body}'; + xed_templates['{loop/id}'] = '{filter none}{loop/body}{end filter}'; {end loop} var rpc_handler = new Function ( diff --git a/inc/app/xed/js/xed-compressed.js b/inc/app/xed/js/xed-compressed.js index 7a75f731..63f71625 100644 --- a/inc/app/xed/js/xed-compressed.js +++ b/inc/app/xed/js/xed-compressed.js @@ -1 +1 @@ -var xed_initial_value=new Array();var xed_path="";var xed_web_path="";var xed_prefix="";var xed_default_link="http://";var xed_site_url=location.protocol+"://"+location.host;var xed_site_domain=location.host;var xed_boxes=false;var xed_box_link="/index/boxchooser-app?";var xed_box_image="/pix/box.gif";var xed_forms=false;var xed_form_link="/index/formchooser-app?";var xed_form_image="/pix/form.gif";var xed_images_link="/index/xed-images-action?";var xed_images=true;var xed_spellchecker=false;var xed_scroller=false;var xed_scroller_data=false;var xed_preview_css="/inc/html/default/site.css";var xed_preview_insert_close=true;var xed_edit_mode="edit";var xed_edit_state="edit";var xed_source_positioned=false;var xed_agent=navigator.userAgent.toLowerCase();var xed_msie=((xed_agent.indexOf("msie")!=-1)&&(xed_agent.indexOf("opera")==-1));var xed_msie7=false;var xed_events=[];var xed_error_window=false;var xed_history=[];var xed_future=[];var xed_undo_max_length=12;var xed_prev_char=0;var xed_context_menu=false;var xed_mouse_x=0;var xed_mouse_y=0;var xed_max_height=false;var xed_max_width=false;var xed_img_popup=false;var xed_login_timer=0;var xed_rx_tag_name=/(<\/|<)\s*([^ \t\n>]+)/ig;var xed_selected=false;var xed_fullsize=false;var xed_debug_view=false;var xed_selected_node=null;var xed_rpc=new rpc();var xed_loading_ifname=null;function xed_do_nothing(A){}function xed_init(B){e=document.getElementById(B);e.contentWindow.document.designMode="on";if(xed_safari){e.contentWindow.document.execCommand("styleWithCSS",false,false)}else{if(!xed_msie){try{e.contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){e.contentWindow.document.execCommand("useCSS",false,"")}}}if(xed_msie7&&xed_initial_value[B].length==0){xed_initial_value[B]="

Enter your content here.

"}if(xed_initial_value[B].length>0){try{e.contentWindow.document.body.innerHTML=xed_initial_value[B]}catch(A){if(xed_initial_value[B].match(/^<\/p><\/xt:(box|form)>/ig,">").replace(/<\/xt:(box|form) \/>/ig,"");xed_set_source(xed_loading_ifname,html)},10)}}if(xed_fullsize){width=screen.availWidth-100;if(width>1000){width=1000}height=screen.availHeight-250;e.style.width=width;e.style.height=height}e=document.getElementById(B);e.contentWindow.document.designMode="off";e.contentWindow.document.designMode="on";if(xed_safari){e.contentWindow.document.execCommand("styleWithCSS",false,false)}else{if(!xed_msie){try{e.contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){e.contentWindow.document.execCommand("useCSS",false,"")}}}xed_add_events(e.contentWindow.document,["keydown","keypress","mousedown","mouseup","drag","focus","mousemove"],xed_event);if(xed_adobeair){e.contentWindow.document.addEventListener("click",function(C){if(C.srcElement.nodeName.toLowerCase()=="a"){C.preventDefault()}},true)}e.contentWindow.document.ifname=B;xed_login_timer=setInterval("rpc_call (xed_web_path + '/index/xed-notimeout-action');",900000);if(xed_scroller){scroller_init("xed-"+B+"-reference",B);r=document.getElementById("xed-"+B+"-reference");try{r.contentWindow.document.body.innerHTML=xed_scroller_data}catch(A){r.contentWindow.document.write(s.value)}}}function xed_copy_value(B,A){html=xed_get_source(A);B.elements[A].value=html}function xed_preview(A){p=window.open("about:blank","xedPreviewWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no,width=500,height=400,top=100,left=150");if(xed_preview_css.length>0){p.document.write('')}p.document.write(xed_get_source(A));if(xed_preview_insert_close){p.document.write('

Close Window

')}return false}function xed_write_to_element(B,A){document.getElementById(A).innerHTML=xed_html_entities(xed_get_source(B));return false}function xed_safari_fix(A){if(!xed_safari){return false}html=xed_get_source(A);html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");xed_set_source(A,html)}function xed_bold(B){xed_historian(B);if(!xed_msie){try{document.getElementById(B).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){document.getElementById(B).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(B).contentWindow.document.execCommand("Bold",false,null);xed_safari_fix(B);document.getElementById(B).contentWindow.focus();return false}function xed_italic(B){xed_historian(B);if(!xed_msie){try{document.getElementById(B).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){document.getElementById(B).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(B).contentWindow.document.execCommand("Italic",false,null);xed_safari_fix(B);document.getElementById(B).contentWindow.focus();return false}function xed_horizontal_rule(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("InsertHorizontalRule",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_underline(B){xed_historian(B);if(!xed_msie){try{document.getElementById(B).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){document.getElementById(B).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(B).contentWindow.document.execCommand("Underline",false,null);xed_safari_fix(B);document.getElementById(B).contentWindow.focus();return false}function xed_align_left(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("JustifyLeft",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_align_right(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("JustifyRight",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_align_center(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("JustifyCenter",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_unordered_list(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("InsertUnorderedList",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_ordered_list(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("InsertOrderedList",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_indent(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("Indent",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_outdent(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("Outdent",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_link(A){n=xed_get_parent(A);if(n.tagName.toLowerCase()=="a"){xed_select_node(A,n);return xed_unlink(A)}if(xed_msie){h=350}else{h=300}w=window.open(xed_web_path+"/index/xed-link-form?ifname="+A,"xedLinkWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=580,height="+h+",top=100,left=150");return false}function xed_add_link(B,A){xed_historian(B);if(xed_get_selection(B)==""){n=xed_get_parent(B);xed_select_node(B,n)}xed_insert_element(B,"a",A);document.getElementById(B).contentWindow.focus()}function xed_unlink(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("Unlink",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_image(ifname){eval("imagechooser_"+ifname+"_attrs = true");eval("imagechooser_"+ifname+"_get_image (ifname)");return false}function xed_set_image(C,E,D,F,B,A){xed_historian(C);e=document.getElementById(C);if(xed_max_heightA){A=A*(xed_max_height/B);B=xed_max_height}else{B=B*(xed_max_width/A);A=xed_max_width}}else{hw_resized=false}if(document.all){img="";if(hw_resized&&xed_img_popup){img+=''}img+=''+D+'';if(hw_resized&&xed_img_popup){img+=""}document.getElementById(C).contentWindow.focus()}else{img=e.contentWindow.document.createElement("img");img.setAttribute("src",E);if(B!=false&&A!=false){img.setAttribute("height",B);img.setAttribute("width",A)}if(F!=false){img.setAttribute("align",F)}img.setAttribute("alt",D);img.setAttribute("border",0);if(hw_resized&&xed_img_popup){img_inner=img;img=e.contentWindow.document.createElement("a");img.setAttribute("href",E);img.setAttribute("target","_blank");img.appendChild(img_inner)}}xed_insert_node_at_selection(e.contentWindow,img);document.getElementById(C).contentWindow.focus()}function xed_clean(A){w=window.open("about:blank","xedCleanersWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=300,height=100,top=100,left=150");f=document.forms[0];xed_copy_value(f,A);t=f.target;a=f.action;f.target="xedCleanersWindow";f.action=xed_prefix+"/index/xed-cleaners-action?ifname="+A;f.submit();f.target=t;f.action=a;return false}function xed_cleaner(A,B){xed_historian(A);document.getElementById(A).contentWindow.document.body.innerHTML=unescape(B);return false}function xed_filechooser(A){filechooser_attrs=true;filechooser_get_file(A);return false}function xed_set_file(B,C,A){xed_historian(B);e=document.getElementById(B);if(document.all){arr=C.split("?file=");A=arr.pop();txt="";if(window.getSelection){txt=e.contentWindow.getSelection();e.contentWindow.selection.clear()}else{if(document.getSelection){txt=e.contentWindow.document.getSelection();e.contentWindow.document.selection.clear()}else{if(document.selection){txt=e.contentWindow.document.selection.createRange().text;e.contentWindow.document.selection.clear()}}}if(txt.length==0){txt=A}file=''+txt+""}else{file=e.contentWindow.document.createElement("a");file.setAttribute("href",C);txt="";if(window.getSelection){txt=e.contentWindow.getSelection()}else{if(document.getSelection){txt=e.contentWindow.document.getSelection()}else{if(document.selection){txt=e.contentWindow.document.selection.createRange().text}}}if(txt.length==0){txt=A}txt=e.contentWindow.document.createTextNode(txt);file.appendChild(txt)}document.getElementById(B).contentWindow.focus();xed_insert_node_at_selection(e.contentWindow,file);document.getElementById(B).contentWindow.focus()}function xed_select(B,C){xed_historian(B);c1=document.getElementById(C).selectedIndex;var A=document.getElementById(C).options[c1].value;if(A.length==0){A="

"}if(A=="

"){xed_insert_pre(B)}else{document.getElementById(B).contentWindow.document.execCommand("formatblock",false,A);document.getElementById(C).selectedIndex=0}document.getElementById(B).contentWindow.focus();return false}function xed_table(A){w=window.open(xed_web_path+"/index/xed-tablesizer-action?ifname="+A,"xedTableWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=300,height=300,top=100,left=150");return false}function xed_insert_table(B,A){xed_historian(B);ch=A.split("x");rows=ch.shift();cols=ch.shift();e=document.getElementById(B);if(document.all){table='';for(i=0;i";for(j=0;j
'}table=table+"\n\t"}table=table+"\n
\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;R0)){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]*>/)){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+="";range.pasteHTML(tag);range.moveStart("character",len2);range.select()}else{if(xed_safari){tag="##STARTNEWELEMENT##";tag2="<"+B;for(i=0;i";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]*>/)){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+="";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+="
  • Element: '+p.tagName+"
  • ";h+=i;if(p.tagName.toLowerCase()!="body"){o+="
  • Edit Properties Edit Properties
  • ';h+=i;o+="
  • Remove Element Remove Element
  • ';h+=i;if(p.tagName.toLowerCase()!="a"){o+='
  • Make Link Make Link
  • ';h+=i;o+="
  • Align Left Align Left
  • ';h+=i}else{o+='
  • Align Left Align Left
  • ';h+=i}o+="
  • Align Center Align Center
  • ';h+=i;o+="
  • Align Right Align Right
  • ';h+=i}p=xed_get_element_pos(e);if(xed_msie){if(document.compatMode=="CSS1Compat"){menu.style.left=A.clientX+p.x;menu.style.top=A.clientY+p.y}else{menu.style.left=A.clientX+p.x;menu.style.top=A.clientY+p.y}}else{menu.style.left=A.pageX+p.x-e.contentWindow.scrollX;menu.style.top=A.pageY+p.y-e.contentWindow.scrollY}o+="";menu.style.height=h;menu.style.display="block";shade.style.left=parseInt(menu.style.left)+3;shade.style.top=parseInt(menu.style.top)+3;shade.style.height=menu.style.height;shade.style.display="block";xed_context_menu=true;menu.innerHTML=o;return false}}function xed_needs_closing_tag(A){var B=" head script style p div span tr td tbody table em strong font a title xt:box xt:form box form ";return(B.indexOf(" "+A.tagName.toLowerCase()+" ")!=-1)}function xed_is_block_tag(B){var A=" p h1 h2 h3 h4 h5 h6 table tr script style head body div td tbody xt:box xt:form box form hr blockquote pre ul ol li ";return(A.indexOf(" "+B+" ")!=-1)}function xed_get_element_pos(C){var B={x:C.offsetLeft,y:C.offsetTop};if(C.offsetParent){if(C.offsetParent==document.getElementById("cms-edit")){return B}var A=xed_get_element_pos(C.offsetParent);B.x+=A.x;B.y+=A.y}return B}function xed_get_next_element(A){name=A.nodeName.toLowerCase();while((A=A.nextSibling)!=null){if(A.nodeName.toLowerCase()==name){return A}}return null}function xed_in_array(A,B){for(i=0;i0&&xed_in_array(A[i],B)){return true}if(A[i]==B){return true}}return false}function xed_get_selection(B){try{return document.getElementById(B).contentWindow.getSelection()}catch(A){return document.getElementById(B).contentWindow.document.selection}}function xed_select_node_contents(C,B){var A;if(!xed_msie){var D=xed_get_selection(C);A=document.getElementById(C).contentWindow.document.createRange();A.selectNodeContents(B);D.removeAllRanges();D.addRange(A);if(xed_safari){xed_selected_node=B}}else{A=document.getElementById(C).contentWindow.document.body.createTextRange();A.moveToElementText(B);A.select()}tag=B.tagName.toLowerCase();document.getElementById(C).contentWindow.focus();xed_update_path(C,tag)}function xed_select_node(D,C){var A;try{var E=xed_get_selection(D);A=document.getElementById(D).contentWindow.document.createRange();A.selectNode(C);E.removeAllRanges();E.addRange(A);if(xed_safari){xed_selected_node=C}}catch(B){A=document.getElementById(D).contentWindow.document.body.createTextRange();A.moveToElementText(C);A.select()}}function xed_create_range(C,D){try{document.getElementById(C).contentWindow.focus();if(typeof D!="undefined"){return D.getRangeAt(0)}else{return document.getElementById(C).contentWindow.document.createRange()}}catch(A){if(typeof D!="undefined"){try{return D.createRange()}catch(B){return false}}else{return document.getElementById(C).contentWindow.document.body.createTextRange()}}}function xed_error(A){if(!xed_error_window||xed_error_window.closed){xed_error_window=window.open("","test","top=10,left=10,height=700,width=200")}xed_error_window.document.write(A+"
    ")}function xed_get_parent(C){if(arguments.length>1){xed_selected=arguments[1]}var D=xed_get_selection(C);var B=xed_create_range(C,D);if(!B){return }if(!xed_msie){if(xed_selected!="a"&&B.endContainer&&B.startContainer==B.endContainer&&B.startContainer.nodeType==1){var A=null;if(B.startContainer.tagName.toLowerCase()=="img"){A=B.startContainer}else{if(B.endOffset-B.startOffset==1&&B.startContainer.childNodes[B.startOffset].tagName.toLowerCase()=="img"){A=B.startContainer.childNodes[B.startOffset]}}if(A!=null){return A}}if(xed_safari){if(xed_selected=="tr"&&B.startContainer){if(B.startContainer.tagName.toLowerCase()=="td"){var E=B.startContainer.parentNode}else{var E=B.startContainer}if(E.tagName.toLowerCase()=="tr"){return E}}if(xed_selected=="tbody"&&B.startContainer){var E=B.startContainer;while(E.tagName.toLowerCase()!=xed_selected){if(!E.parentNode){E=false;break}E=E.parentNode}if(E){return E}}if(xed_selected=="table"&&B.startContainer&&B.endContainer){if(xed_selected_node.tagName.toLowerCase()=="table"){return xed_selected_node}}if(xed_selected_node&&xed_selected_node.tagName.toLowerCase()=="img"){return xed_selected_node}}var E=B.commonAncestorContainer;while(E.nodeType==3){E=E.parentNode}return E}else{if(xed_selected=="a"){if(B.parentElement&&B.parentElement().tagName.toLowerCase()=="img"){A=B.parentElement();return A.parentNode}return B.parentElement?B.parentElement():document.getElementById(C).contentWindow.document.body}if(!B){return document.getElementById(C).contentWindow.document.body}if(B.item){return B.item(0)}return B.parentElement?B.parentElement():document.getElementById(C).contentWindow.document.body}}function xed_get_ancestors(B){if(arguments.length>1){xed_selected=arguments[1]}if(xed_selected){var C=xed_get_parent(B,xed_selected)}else{var C=xed_get_parent(B)}var A=new Array();while(C&&(C.tagName.toLowerCase()!="body")){if(C.nodeType!=1){continue}A.push(C);C=C.parentNode}A.push(document.getElementById(B).contentWindow.document.body);return A}function xed_get_ifname(A){if(xed_safari){xed_selected_node=A}A=(A.ownerDocument)?A.ownerDocument:A;return A.ifname}function xed_event(A){A=(A)?A:((event)?event:null);if(A){var B=(A.target)?A.target:((A.srcElement)?A.srcElement:null);if(B){B=(B.nodeType==1||B.nodeType==9)?B:B.parentNode;ifname=xed_get_ifname(B);if(A.type=="mousemove"){if(xed_msie){xed_mouse_x=A.clientX-document.body.scrollLeft;xed_mouse_y=A.clientY-document.body.scrollTop}else{xed_mouse_x=A.pageX;xed_mouse_y=A.pageY}}else{if(A.type=="mousedown"&&(A.button==0||A.button==1)){xed_update_path(ifname);if(xed_context_menu){xed_toggle_context_menu(ifname,A)}}else{if(A.type=="mousedown"&&(A.button==2||A.button==3)){xed_update_path(ifname);if(xed_msie){A.cancelBubble=true;A.returnValue=false}else{A.cancelBubble=true;A.returnValue=false;A.preventDefault();A.stopPropagation()}return false}else{if(A.type=="contextmenu"){xed_update_path(ifname);xed_toggle_context_menu(ifname,A);if(xed_msie){A.cancelBubble=true;A.returnValue=false}else{A.cancelBubble=true;A.returnValue=false;A.preventDefault();A.stopPropagation()}return false}else{xed_update_path(ifname);k=A.keyCode;if(!xed_msie&&k==0){k=A.charCode}if(A.type=="keypress"){xed_debug("key: "+k);if(k==10||k==13||k==33||k==44||k==46||k==59||k==63){xed_historian(ifname)}else{if(xed_prev_char>31&&(xed_prev_char!=8&&xed_prev_char!=46)&&(k==8||k==46)){xed_historian(ifname)}else{if((xed_prev_char==8||xed_prev_char==46)&&(k!=8&&k!=46)){xed_historian(ifname)}}}xed_prev_char=k}if(A.type=="keydown"&&(k==122||k==90)&&A.ctrlKey){if(A.shiftKey){xed_redo(ifname)}else{xed_undo(ifname)}if(xed_msie){A.cancelBubble=true;A.returnValue=false}else{A.cancelBubble=true;A.returnValue=false;A.preventDefault();A.stopPropagation()}return false}}}}}}}}function xed_add_event(B,A,C){if(xed_msie){B.attachEvent("on"+A,C)}else{B.addEventListener(A,C,true)}}function xed_add_events(B,A,C){for(i=0;i";break;case"h1":v="

    ";break;case"h2":v="

    ";break;case"h3":v="

    ";break;case"h4":v="

    ";break;case"h5":v="

    ";break;case"h6":v="
    ";break;case"address":v="
    ";break;case"pre":v="
    ";break;default:return false}for(i=0;i1){xed_selected=arguments[1]}else{xed_selected=false}doc=document.getElementById(C).contentWindow.document;path_div=document.getElementById("xed-"+C+"-path");path_div.innerHTML="";path_div.style.paddingBottom="0px";path_div.style.marginBottom="0px";path=document.createElement("span");try{path.style.cssFloat="left"}catch(F){path.style.styleFloat="right"}path.style.paddingRight="7px";path.style.paddingBottom="0px";path.style.marginBottom="0px";path.innerHTML="Path: ";if(xed_selected){var I=xed_get_ancestors(C,xed_selected)}else{var I=xed_get_ancestors(C)}var A=null;var E=false;var H=false;for(var D=I.length;--D>=0;){A=I[D];if(!A){continue}if(A.tagName.toLowerCase()=="table"){document.getElementById("xed-"+C+"-table-bar").style.display="block";H=true}if(!E){xed_update_formatblock(C,A.tagName.toLowerCase())}var G=document.createElement("a");G.href="#";G.el=A;G.editor=C;G.onclick=function(){this.blur();xed_select_node_contents(this.editor,this.el);return false};var B=A.tagName.toLowerCase();G.title=A.style.cssText;if(A.id){B+="#"+A.id}if(A.className){B+="."+A.className}G.appendChild(document.createTextNode(B));path.appendChild(G);if(D!=0){path.appendChild(document.createTextNode(" "+String.fromCharCode(187)+" "))}}if(!H){document.getElementById("xed-"+C+"-table-bar").style.display="none"}if(B!="body"){edit=document.createElement("a");edit.href="#";edit.el=A;edit.editor=C;edit.onclick=function(){xed_edit_properties(this.editor,this.el);return false};img=document.createElement("img");img.src=xed_path+"/pix/icons/edit-properties.gif";img.alt="Edit Properties";img.title="Edit Properties";img.border="0";edit.appendChild(img);dele=document.createElement("a");dele.href="#";dele.el=A;dele.editor=C;dele.onclick=function(){this.blur();xed_remove_element(this.editor,this.el);document.getElementById(this.editor).contentWindow.focus();return false};img=document.createElement("img");img.src=xed_path+"/pix/icons/remove-element.gif";img.alt="Remove Element";img.title="Remove Element";img.border="0";dele.appendChild(img);path_div.appendChild(path);path_div.appendChild(document.createTextNode(" "));path_div.appendChild(edit);path_div.appendChild(document.createTextNode(" "));path_div.appendChild(dele)}else{path_div.appendChild(path)}}function xed_outer_html(B){outer=B.outerHTML;if(typeof (outer)!="undefined"){return outer}outer="<"+B.tagName;if(B.attributes){for(var A in B.attributes){a=B.attributes[A];if(a.value){outer+=" "+a.name+'="'+a.value+'"'}}}outer+=">";outer+=B.innerHTML;outer+="";return outer}function xed_remove_element(C,B){xed_historian(C);new_html="";pn=B.parentNode;if(!pn){return false}len=pn.childNodes.length;if(xed_msie){for(var A in B.parentNode.childNodes){if(A>=len){break}n=B.parentNode.childNodes[A];if(n==B){if(B.tagName.toLowerCase()!="xt:box"&&B.tagName.toLowerCase()!="xt:form"){new_html+=B.innerHTML}}else{if(typeof (n)=="function"){}else{if(typeof (n)=="number"){}else{if(typeof (n)=="object"){if(n.outerHTML!==undefined){new_html+=n.outerHTML}else{new_html+=n.data}}}}}}}else{if(xed_safari){for(var A=0;A=len){break}n=B.parentNode.childNodes[A];if(n==B){if(B.tagName.toLowerCase()!="xt:box"&&B.tagName.toLowerCase()!="xt:form"){new_html+=B.innerHTML}}else{if(typeof (n)=="function"){}else{if(typeof (n)=="number"){}else{if(typeof (n)=="object"){if(n instanceof HTMLElement){new_html+=xed_outer_html(n)}else{new_html+=n.data}}}}}}}else{for(var A in B.parentNode.childNodes){if(A>=len){break}n=B.parentNode.childNodes[A];if(n==B){if(B.tagName.toLowerCase()!="xt:box"&&B.tagName.toLowerCase()!="xt:form"){new_html+=B.innerHTML}}else{if(typeof (n)=="function"){}else{if(typeof (n)=="number"){}else{if(typeof (n)=="object"){if(n instanceof HTMLElement){new_html+=xed_outer_html(n)}else{new_html+=n.data}}}}}}}}B.parentNode.innerHTML=new_html}function xed_strip_base_url(A){if(A.indexOf(xed_site_domain+xed_prefix+"/index/")!=-1){arr=A.split(xed_site_domain+xed_prefix+"/index/");return xed_prefix+"/index/"+arr.pop()}if(A.indexOf(xed_site_domain+xed_prefix+"/pix/")!=-1){arr=A.split(xed_site_domain+xed_prefix+"/pix/");return xed_prefix+"/pix/"+arr.pop()}if(xed_msie){if(A.indexOf(xed_site_domain)!=-1){arr=A.split(xed_site_domain);A=arr.pop()}if(A.indexOf("#")===0){return A}if(A.indexOf("http://")===0){return A}else{if(A.indexOf("www.")===0){return"http://"+A}}return A}var C=xed_site_url;C=C.replace(/[^\/]+$/,"");var B=new RegExp(C);A=A.replace(B,"");C=C.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1");B=new RegExp(C);return A.replace(B,"")}function xed_get_html(H,B,F){var E="";switch(H.nodeType){case 1:case 11:var G;var D;var K=(H.nodeType==1)?H.tagName.toLowerCase():"";if(K=="box"||K=="form"){K="xt:"+K}if(xed_msie&&K=="head"){if(B){E+=""}var M=RegExp.multiline;RegExp.multiline=true;var C=H.innerHTML.replace(xed_rx_tag_name,function(P,O,N){return O+N.toLowerCase()});RegExp.multiline=M;E+=C;if(B){E+=""}break}else{if(B){G=(!(H.hasChildNodes()||xed_needs_closing_tag(H)));E="<"+K;var L=H.attributes;for(D=0;D":">";if(K=="br"){E+="\n"}}}for(D=H.firstChild;D;D=D.nextSibling){E+=xed_get_html(D,true,F)}if(B&&!G){E+="";if(xed_is_block_tag(K)){E+="\n"}}break;case 3:if(!H.previousSibling&&!H.nextSibling&&H.data.match(/^\s*$/i)){E=" "}else{E=xed_html_entities(H.data)}break;case 8:E="";break}E=E.replace(/\n\n+/g,"\n\n");return E}function xed_get_source(A){if(xed_edit_state=="edit"){return xed_get_html(document.getElementById(A).contentWindow.document.body,false,false)}return document.getElementById("xed-"+A+"-source").value}function xed_get_anchors(A){html=xed_get_source(A);anchor_list=[];re=/<(h[1-6]).*?>(.+)<\/h[1-6]>/gim;i=0;while(matches=re.exec(html)){href=MD5(matches[1]+matches[2]);anchor_list.push({name:href,value:matches[2]});i++}return anchor_list}function xed_html_entities(A){re=/&/g;A=A.replace(re,"&");re=//g;A=A.replace(re,">");return A}function xed_html_entities_decode(A){orig=A;re=/"/g;A=A.replace(re,'"');re=/</g;A=A.replace(re,"<");re=/>/g;A=A.replace(re,">");re=/&/g;A=A.replace(re,"&");return A}function xed_url_encode(A){return escape(A)}function xed_parse_uri(A){el=new Object;tmp=A.split("?");el.box=tmp[0];el.args=new Array();if(tmp.length>1){tmp=tmp[1].split("&");for(i=0;i"+A;document.getElementById("xed-debug-msg").innerHTML=html;document.getElementById("xed-debug-msg").scrollTop=document.getElementById("xed-debug-msg").scrollHeight};
    \ No newline at end of file
    +var xed_initial_value=new Array();var xed_path="";var xed_web_path="";var xed_prefix="";var xed_default_link="http://";var xed_site_url=location.protocol+"://"+location.host;var xed_site_domain=location.host;var xed_boxes=false;var xed_box_link="/index/boxchooser-app?";var xed_box_image="/pix/box.gif";var xed_forms=false;var xed_form_link="/index/formchooser-app?";var xed_form_image="/pix/form.gif";var xed_images_link="/index/xed-images-action?";var xed_images=true;var xed_spellchecker=false;var xed_scroller=false;var xed_scroller_data=false;var xed_preview_css="/inc/html/default/site.css";var xed_preview_insert_close=true;var xed_edit_mode="edit";var xed_edit_state="edit";var xed_source_positioned=false;var xed_agent=navigator.userAgent.toLowerCase();var xed_msie=((xed_agent.indexOf("msie")!=-1)&&(xed_agent.indexOf("opera")==-1));var xed_msie7=false;var xed_events=[];var xed_error_window=false;var xed_history=[];var xed_future=[];var xed_undo_max_length=12;var xed_prev_char=0;var xed_context_menu=false;var xed_mouse_x=0;var xed_mouse_y=0;var xed_max_height=false;var xed_max_width=false;var xed_img_popup=false;var xed_login_timer=0;var xed_rx_tag_name=/(<\/|<)\s*([^ \t\n>]+)/ig;var xed_selected=false;var xed_fullsize=false;var xed_debug_view=false;var xed_selected_node=null;var xed_rpc=new rpc();var xed_loading_ifname=null;function xed_do_nothing(A){}function xed_init(C){xed_initial_value[C]=decodeURIComponent(xed_initial_value[C]);xed_scroller_data=decodeURIComponent(xed_scroller_data);for(var B=0;BEnter your content here.

    "}if(xed_initial_value[C].length>0){try{e.contentWindow.document.body.innerHTML=xed_initial_value[C]}catch(A){if(xed_initial_value[C].match(/^<\/p><\/xt:(box|form)>/ig,">").replace(/<\/xt:(box|form) \/>/ig,"");xed_set_source(xed_loading_ifname,html)},10)}}if(xed_fullsize){width=screen.availWidth-100;if(width>1000){width=1000}height=screen.availHeight-250;e.style.width=width;e.style.height=height}e=document.getElementById(C);e.contentWindow.document.designMode="off";e.contentWindow.document.designMode="on";if(xed_safari){e.contentWindow.document.execCommand("styleWithCSS",false,false)}else{if(!xed_msie){try{e.contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){e.contentWindow.document.execCommand("useCSS",false,"")}}}xed_add_events(e.contentWindow.document,["keydown","keypress","mousedown","mouseup","drag","focus","mousemove"],xed_event);if(xed_adobeair){e.contentWindow.document.addEventListener("click",function(D){if(D.srcElement.nodeName.toLowerCase()=="a"){D.preventDefault()}},true)}e.contentWindow.document.ifname=C;xed_login_timer=setInterval("rpc_call (xed_web_path + '/index/xed-notimeout-action');",900000);if(xed_scroller){scroller_init("xed-"+C+"-reference",C);r=document.getElementById("xed-"+C+"-reference");try{r.contentWindow.document.body.innerHTML=xed_scroller_data}catch(A){r.contentWindow.document.write(s.value)}}}function xed_copy_value(B,A){html=xed_get_source(A);B.elements[A].value=html}function xed_preview(A){p=window.open("about:blank","xedPreviewWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no,width=500,height=400,top=100,left=150");if(xed_preview_css.length>0){p.document.write('')}p.document.write(xed_get_source(A));if(xed_preview_insert_close){p.document.write('

    Close Window

    ')}return false}function xed_write_to_element(B,A){document.getElementById(A).innerHTML=xed_html_entities(xed_get_source(B));return false}function xed_safari_fix(A){if(!xed_safari){return false}html=xed_get_source(A);html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");html=html.replace(/([^<]+)<\/span>/g,"$1");xed_set_source(A,html)}function xed_bold(B){xed_historian(B);if(!xed_msie){try{document.getElementById(B).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){document.getElementById(B).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(B).contentWindow.document.execCommand("Bold",false,null);xed_safari_fix(B);document.getElementById(B).contentWindow.focus();return false}function xed_italic(B){xed_historian(B);if(!xed_msie){try{document.getElementById(B).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){document.getElementById(B).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(B).contentWindow.document.execCommand("Italic",false,null);xed_safari_fix(B);document.getElementById(B).contentWindow.focus();return false}function xed_horizontal_rule(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("InsertHorizontalRule",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_underline(B){xed_historian(B);if(!xed_msie){try{document.getElementById(B).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(A){document.getElementById(B).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(B).contentWindow.document.execCommand("Underline",false,null);xed_safari_fix(B);document.getElementById(B).contentWindow.focus();return false}function xed_align_left(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("JustifyLeft",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_align_right(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("JustifyRight",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_align_center(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("JustifyCenter",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_unordered_list(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("InsertUnorderedList",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_ordered_list(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("InsertOrderedList",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_indent(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("Indent",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_outdent(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("Outdent",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_link(A){n=xed_get_parent(A);if(n.tagName.toLowerCase()=="a"){xed_select_node(A,n);return xed_unlink(A)}if(xed_msie){h=350}else{h=300}w=window.open(xed_web_path+"/index/xed-link-form?ifname="+A,"xedLinkWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=580,height="+h+",top=100,left=150");return false}function xed_add_link(B,A){xed_historian(B);if(xed_get_selection(B)==""){n=xed_get_parent(B);xed_select_node(B,n)}xed_insert_element(B,"a",A);document.getElementById(B).contentWindow.focus()}function xed_unlink(A){xed_historian(A);document.getElementById(A).contentWindow.document.execCommand("Unlink",false,null);document.getElementById(A).contentWindow.focus();return false}function xed_image(ifname){eval("imagechooser_"+ifname+"_attrs = true");eval("imagechooser_"+ifname+"_get_image (ifname)");return false}function xed_set_image(C,E,D,F,B,A){xed_historian(C);e=document.getElementById(C);if(xed_max_heightA){A=A*(xed_max_height/B);B=xed_max_height}else{B=B*(xed_max_width/A);A=xed_max_width}}else{hw_resized=false}if(document.all){img="";if(hw_resized&&xed_img_popup){img+=''}img+=''+D+'';if(hw_resized&&xed_img_popup){img+=""}document.getElementById(C).contentWindow.focus()}else{img=e.contentWindow.document.createElement("img");img.setAttribute("src",E);if(B!=false&&A!=false){img.setAttribute("height",B);img.setAttribute("width",A)}if(F!=false){img.setAttribute("align",F)}img.setAttribute("alt",D);img.setAttribute("border",0);if(hw_resized&&xed_img_popup){img_inner=img;img=e.contentWindow.document.createElement("a");img.setAttribute("href",E);img.setAttribute("target","_blank");img.appendChild(img_inner)}}xed_insert_node_at_selection(e.contentWindow,img);document.getElementById(C).contentWindow.focus()}function xed_clean(A){w=window.open("about:blank","xedCleanersWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=300,height=100,top=100,left=150");f=document.forms[0];xed_copy_value(f,A);t=f.target;a=f.action;f.target="xedCleanersWindow";f.action=xed_prefix+"/index/xed-cleaners-action?ifname="+A;f.submit();f.target=t;f.action=a;return false}function xed_cleaner(A,B){xed_historian(A);document.getElementById(A).contentWindow.document.body.innerHTML=unescape(B);return false}function xed_filechooser(A){filechooser_attrs=true;filechooser_get_file(A);return false}function xed_set_file(B,C,A){xed_historian(B);e=document.getElementById(B);if(document.all){arr=C.split("?file=");A=arr.pop();txt="";if(window.getSelection){txt=e.contentWindow.getSelection();e.contentWindow.selection.clear()}else{if(document.getSelection){txt=e.contentWindow.document.getSelection();e.contentWindow.document.selection.clear()}else{if(document.selection){txt=e.contentWindow.document.selection.createRange().text;e.contentWindow.document.selection.clear()}}}if(txt.length==0){txt=A}file=''+txt+""}else{file=e.contentWindow.document.createElement("a");file.setAttribute("href",C);txt="";if(window.getSelection){txt=e.contentWindow.getSelection()}else{if(document.getSelection){txt=e.contentWindow.document.getSelection()}else{if(document.selection){txt=e.contentWindow.document.selection.createRange().text}}}if(txt.length==0){txt=A}txt=e.contentWindow.document.createTextNode(txt);file.appendChild(txt)}document.getElementById(B).contentWindow.focus();xed_insert_node_at_selection(e.contentWindow,file);document.getElementById(B).contentWindow.focus()}function xed_select(B,C){xed_historian(B);c1=document.getElementById(C).selectedIndex;var A=document.getElementById(C).options[c1].value;if(A.length==0){A="

    "}if(A=="

    "){xed_insert_pre(B)}else{document.getElementById(B).contentWindow.document.execCommand("formatblock",false,A);document.getElementById(C).selectedIndex=0}document.getElementById(B).contentWindow.focus();return false}function xed_table(A){w=window.open(xed_web_path+"/index/xed-tablesizer-action?ifname="+A,"xedTableWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,fullscreen=no,width=300,height=300,top=100,left=150");return false}function xed_insert_table(B,A){xed_historian(B);ch=A.split("x");rows=ch.shift();cols=ch.shift();e=document.getElementById(B);if(document.all){table='';for(i=0;i";for(j=0;j
    '}table=table+"\n\t"}table=table+"\n
    \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;R0)){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]*>/)){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+="";range.pasteHTML(tag);range.moveStart("character",len2);range.select()}else{if(xed_safari){tag="##STARTNEWELEMENT##";tag2="<"+B;for(i=0;i";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]*>/)){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+="";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+="
  • Element: '+p.tagName+"
  • ";h+=i;if(p.tagName.toLowerCase()!="body"){o+="
  • Edit Properties Edit Properties
  • ';h+=i;o+="
  • Remove Element Remove Element
  • ';h+=i;if(p.tagName.toLowerCase()!="a"){o+='
  • Make Link Make Link
  • ';h+=i;o+="
  • Align Left Align Left
  • ';h+=i}else{o+='
  • Align Left Align Left
  • ';h+=i}o+="
  • Align Center Align Center
  • ';h+=i;o+="
  • Align Right Align Right
  • ';h+=i}p=xed_get_element_pos(e);if(xed_msie){if(document.compatMode=="CSS1Compat"){menu.style.left=A.clientX+p.x;menu.style.top=A.clientY+p.y}else{menu.style.left=A.clientX+p.x;menu.style.top=A.clientY+p.y}}else{menu.style.left=A.pageX+p.x-e.contentWindow.scrollX;menu.style.top=A.pageY+p.y-e.contentWindow.scrollY}o+="";menu.style.height=h;menu.style.display="block";shade.style.left=parseInt(menu.style.left)+3;shade.style.top=parseInt(menu.style.top)+3;shade.style.height=menu.style.height;shade.style.display="block";xed_context_menu=true;menu.innerHTML=o;return false}}function xed_needs_closing_tag(A){var B=" head script style p div span tr td tbody table em strong font a title xt:box xt:form box form ";return(B.indexOf(" "+A.tagName.toLowerCase()+" ")!=-1)}function xed_is_block_tag(B){var A=" p h1 h2 h3 h4 h5 h6 table tr script style head body div td tbody xt:box xt:form box form hr blockquote pre ul ol li ";return(A.indexOf(" "+B+" ")!=-1)}function xed_get_element_pos(C){var B={x:C.offsetLeft,y:C.offsetTop};if(C.offsetParent){if(C.offsetParent==document.getElementById("cms-edit")){return B}var A=xed_get_element_pos(C.offsetParent);B.x+=A.x;B.y+=A.y}return B}function xed_get_next_element(A){name=A.nodeName.toLowerCase();while((A=A.nextSibling)!=null){if(A.nodeName.toLowerCase()==name){return A}}return null}function xed_in_array(A,B){for(i=0;i0&&xed_in_array(A[i],B)){return true}if(A[i]==B){return true}}return false}function xed_get_selection(B){try{return document.getElementById(B).contentWindow.getSelection()}catch(A){return document.getElementById(B).contentWindow.document.selection}}function xed_select_node_contents(C,B){var A;if(!xed_msie){var D=xed_get_selection(C);A=document.getElementById(C).contentWindow.document.createRange();A.selectNodeContents(B);D.removeAllRanges();D.addRange(A);if(xed_safari){xed_selected_node=B}}else{A=document.getElementById(C).contentWindow.document.body.createTextRange();A.moveToElementText(B);A.select()}tag=B.tagName.toLowerCase();document.getElementById(C).contentWindow.focus();xed_update_path(C,tag)}function xed_select_node(D,C){var A;try{var E=xed_get_selection(D);A=document.getElementById(D).contentWindow.document.createRange();A.selectNode(C);E.removeAllRanges();E.addRange(A);if(xed_safari){xed_selected_node=C}}catch(B){A=document.getElementById(D).contentWindow.document.body.createTextRange();A.moveToElementText(C);A.select()}}function xed_create_range(C,D){try{document.getElementById(C).contentWindow.focus();if(typeof D!="undefined"){return D.getRangeAt(0)}else{return document.getElementById(C).contentWindow.document.createRange()}}catch(A){if(typeof D!="undefined"){try{return D.createRange()}catch(B){return false}}else{return document.getElementById(C).contentWindow.document.body.createTextRange()}}}function xed_error(A){if(!xed_error_window||xed_error_window.closed){xed_error_window=window.open("","test","top=10,left=10,height=700,width=200")}xed_error_window.document.write(A+"
    ")}function xed_get_parent(C){if(arguments.length>1){xed_selected=arguments[1]}var D=xed_get_selection(C);var B=xed_create_range(C,D);if(!B){return }if(!xed_msie){if(xed_selected!="a"&&B.endContainer&&B.startContainer==B.endContainer&&B.startContainer.nodeType==1){var A=null;if(B.startContainer.tagName.toLowerCase()=="img"){A=B.startContainer}else{if(B.endOffset-B.startOffset==1&&B.startContainer.childNodes[B.startOffset].tagName.toLowerCase()=="img"){A=B.startContainer.childNodes[B.startOffset]}}if(A!=null){return A}}if(xed_safari){if(xed_selected=="tr"&&B.startContainer){if(B.startContainer.tagName.toLowerCase()=="td"){var E=B.startContainer.parentNode}else{var E=B.startContainer}if(E.tagName.toLowerCase()=="tr"){return E}}if(xed_selected=="tbody"&&B.startContainer){var E=B.startContainer;while(E.tagName.toLowerCase()!=xed_selected){if(!E.parentNode){E=false;break}E=E.parentNode}if(E){return E}}if(xed_selected=="table"&&B.startContainer&&B.endContainer){if(xed_selected_node.tagName.toLowerCase()=="table"){return xed_selected_node}}if(xed_selected_node&&xed_selected_node.tagName.toLowerCase()=="img"){return xed_selected_node}}var E=B.commonAncestorContainer;while(E.nodeType==3){E=E.parentNode}return E}else{if(xed_selected=="a"){if(B.parentElement&&B.parentElement().tagName.toLowerCase()=="img"){A=B.parentElement();return A.parentNode}return B.parentElement?B.parentElement():document.getElementById(C).contentWindow.document.body}if(!B){return document.getElementById(C).contentWindow.document.body}if(B.item){return B.item(0)}return B.parentElement?B.parentElement():document.getElementById(C).contentWindow.document.body}}function xed_get_ancestors(B){if(arguments.length>1){xed_selected=arguments[1]}if(xed_selected){var C=xed_get_parent(B,xed_selected)}else{var C=xed_get_parent(B)}var A=new Array();while(C&&(C.tagName.toLowerCase()!="body")){if(C.nodeType!=1){continue}A.push(C);C=C.parentNode}A.push(document.getElementById(B).contentWindow.document.body);return A}function xed_get_ifname(A){if(xed_safari){xed_selected_node=A}A=(A.ownerDocument)?A.ownerDocument:A;return A.ifname}function xed_event(A){A=(A)?A:((event)?event:null);if(A){var B=(A.target)?A.target:((A.srcElement)?A.srcElement:null);if(B){B=(B.nodeType==1||B.nodeType==9)?B:B.parentNode;ifname=xed_get_ifname(B);if(A.type=="mousemove"){if(xed_msie){xed_mouse_x=A.clientX-document.body.scrollLeft;xed_mouse_y=A.clientY-document.body.scrollTop}else{xed_mouse_x=A.pageX;xed_mouse_y=A.pageY}}else{if(A.type=="mousedown"&&(A.button==0||A.button==1)){xed_update_path(ifname);if(xed_context_menu){xed_toggle_context_menu(ifname,A)}}else{if(A.type=="mousedown"&&(A.button==2||A.button==3)){xed_update_path(ifname);if(xed_msie){A.cancelBubble=true;A.returnValue=false}else{A.cancelBubble=true;A.returnValue=false;A.preventDefault();A.stopPropagation()}return false}else{if(A.type=="contextmenu"){xed_update_path(ifname);xed_toggle_context_menu(ifname,A);if(xed_msie){A.cancelBubble=true;A.returnValue=false}else{A.cancelBubble=true;A.returnValue=false;A.preventDefault();A.stopPropagation()}return false}else{xed_update_path(ifname);k=A.keyCode;if(!xed_msie&&k==0){k=A.charCode}if(A.type=="keypress"){xed_debug("key: "+k);if(k==10||k==13||k==33||k==44||k==46||k==59||k==63){xed_historian(ifname)}else{if(xed_prev_char>31&&(xed_prev_char!=8&&xed_prev_char!=46)&&(k==8||k==46)){xed_historian(ifname)}else{if((xed_prev_char==8||xed_prev_char==46)&&(k!=8&&k!=46)){xed_historian(ifname)}}}xed_prev_char=k}if(A.type=="keydown"&&(k==122||k==90)&&A.ctrlKey){if(A.shiftKey){xed_redo(ifname)}else{xed_undo(ifname)}if(xed_msie){A.cancelBubble=true;A.returnValue=false}else{A.cancelBubble=true;A.returnValue=false;A.preventDefault();A.stopPropagation()}return false}}}}}}}}function xed_add_event(B,A,C){if(xed_msie){B.attachEvent("on"+A,C)}else{B.addEventListener(A,C,true)}}function xed_add_events(B,A,C){for(i=0;i";break;case"h1":v="

    ";break;case"h2":v="

    ";break;case"h3":v="

    ";break;case"h4":v="

    ";break;case"h5":v="

    ";break;case"h6":v="
    ";break;case"address":v="
    ";break;case"pre":v="
    ";break;default:return false}for(i=0;i1){xed_selected=arguments[1]}else{xed_selected=false}doc=document.getElementById(C).contentWindow.document;path_div=document.getElementById("xed-"+C+"-path");path_div.innerHTML="";path_div.style.paddingBottom="0px";path_div.style.marginBottom="0px";path=document.createElement("span");try{path.style.cssFloat="left"}catch(F){path.style.styleFloat="right"}path.style.paddingRight="7px";path.style.paddingBottom="0px";path.style.marginBottom="0px";path.innerHTML="Path: ";if(xed_selected){var I=xed_get_ancestors(C,xed_selected)}else{var I=xed_get_ancestors(C)}var A=null;var E=false;var H=false;for(var D=I.length;--D>=0;){A=I[D];if(!A){continue}if(A.tagName.toLowerCase()=="table"){document.getElementById("xed-"+C+"-table-bar").style.display="block";H=true}if(!E){xed_update_formatblock(C,A.tagName.toLowerCase())}var G=document.createElement("a");G.href="#";G.el=A;G.editor=C;G.onclick=function(){this.blur();xed_select_node_contents(this.editor,this.el);return false};var B=A.tagName.toLowerCase();G.title=A.style.cssText;if(A.id){B+="#"+A.id}if(A.className){B+="."+A.className}G.appendChild(document.createTextNode(B));path.appendChild(G);if(D!=0){path.appendChild(document.createTextNode(" "+String.fromCharCode(187)+" "))}}if(!H){document.getElementById("xed-"+C+"-table-bar").style.display="none"}if(B!="body"){edit=document.createElement("a");edit.href="#";edit.el=A;edit.editor=C;edit.onclick=function(){xed_edit_properties(this.editor,this.el);return false};img=document.createElement("img");img.src=xed_path+"/pix/icons/edit-properties.gif";img.alt="Edit Properties";img.title="Edit Properties";img.border="0";edit.appendChild(img);dele=document.createElement("a");dele.href="#";dele.el=A;dele.editor=C;dele.onclick=function(){this.blur();xed_remove_element(this.editor,this.el);document.getElementById(this.editor).contentWindow.focus();return false};img=document.createElement("img");img.src=xed_path+"/pix/icons/remove-element.gif";img.alt="Remove Element";img.title="Remove Element";img.border="0";dele.appendChild(img);path_div.appendChild(path);path_div.appendChild(document.createTextNode(" "));path_div.appendChild(edit);path_div.appendChild(document.createTextNode(" "));path_div.appendChild(dele)}else{path_div.appendChild(path)}}function xed_outer_html(B){outer=B.outerHTML;if(typeof (outer)!="undefined"){return outer}outer="<"+B.tagName;if(B.attributes){for(var A in B.attributes){a=B.attributes[A];if(a.value){outer+=" "+a.name+'="'+a.value+'"'}}}outer+=">";outer+=B.innerHTML;outer+="";return outer}function xed_remove_element(C,B){xed_historian(C);new_html="";pn=B.parentNode;if(!pn){return false}len=pn.childNodes.length;if(xed_msie){for(var A in B.parentNode.childNodes){if(A>=len){break}n=B.parentNode.childNodes[A];if(n==B){if(B.tagName.toLowerCase()!="xt:box"&&B.tagName.toLowerCase()!="xt:form"){new_html+=B.innerHTML}}else{if(typeof (n)=="function"){}else{if(typeof (n)=="number"){}else{if(typeof (n)=="object"){if(n.outerHTML!==undefined){new_html+=n.outerHTML}else{new_html+=n.data}}}}}}}else{if(xed_safari){for(var A=0;A=len){break}n=B.parentNode.childNodes[A];if(n==B){if(B.tagName.toLowerCase()!="xt:box"&&B.tagName.toLowerCase()!="xt:form"){new_html+=B.innerHTML}}else{if(typeof (n)=="function"){}else{if(typeof (n)=="number"){}else{if(typeof (n)=="object"){if(n instanceof HTMLElement){new_html+=xed_outer_html(n)}else{new_html+=n.data}}}}}}}else{for(var A in B.parentNode.childNodes){if(A>=len){break}n=B.parentNode.childNodes[A];if(n==B){if(B.tagName.toLowerCase()!="xt:box"&&B.tagName.toLowerCase()!="xt:form"){new_html+=B.innerHTML}}else{if(typeof (n)=="function"){}else{if(typeof (n)=="number"){}else{if(typeof (n)=="object"){if(n instanceof HTMLElement){new_html+=xed_outer_html(n)}else{new_html+=n.data}}}}}}}}B.parentNode.innerHTML=new_html}function xed_strip_base_url(A){if(A.indexOf(xed_site_domain+xed_prefix+"/index/")!=-1){arr=A.split(xed_site_domain+xed_prefix+"/index/");return xed_prefix+"/index/"+arr.pop()}if(A.indexOf(xed_site_domain+xed_prefix+"/pix/")!=-1){arr=A.split(xed_site_domain+xed_prefix+"/pix/");return xed_prefix+"/pix/"+arr.pop()}if(xed_msie){if(A.indexOf(xed_site_domain)!=-1){arr=A.split(xed_site_domain);A=arr.pop()}if(A.indexOf("#")===0){return A}if(A.indexOf("http://")===0){return A}else{if(A.indexOf("www.")===0){return"http://"+A}}return A}var C=xed_site_url;C=C.replace(/[^\/]+$/,"");var B=new RegExp(C);A=A.replace(B,"");C=C.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1");B=new RegExp(C);return A.replace(B,"")}function xed_get_html(H,B,F){var E="";switch(H.nodeType){case 1:case 11:var G;var D;var K=(H.nodeType==1)?H.tagName.toLowerCase():"";if(K=="box"||K=="form"){K="xt:"+K}if(xed_msie&&K=="head"){if(B){E+=""}var M=RegExp.multiline;RegExp.multiline=true;var C=H.innerHTML.replace(xed_rx_tag_name,function(P,O,N){return O+N.toLowerCase()});RegExp.multiline=M;E+=C;if(B){E+=""}break}else{if(B){G=(!(H.hasChildNodes()||xed_needs_closing_tag(H)));E="<"+K;var L=H.attributes;for(D=0;D":">";if(K=="br"){E+="\n"}}}for(D=H.firstChild;D;D=D.nextSibling){E+=xed_get_html(D,true,F)}if(B&&!G){E+="";if(xed_is_block_tag(K)){E+="\n"}}break;case 3:if(!H.previousSibling&&!H.nextSibling&&H.data.match(/^\s*$/i)){E=" "}else{E=xed_html_entities(H.data)}break;case 8:E="";break}E=E.replace(/\n\n+/g,"\n\n");return E}function xed_get_source(A){if(xed_edit_state=="edit"){return xed_get_html(document.getElementById(A).contentWindow.document.body,false,false)}return document.getElementById("xed-"+A+"-source").value}function xed_get_anchors(A){html=xed_get_source(A);anchor_list=[];re=/<(h[1-6]).*?>(.+)<\/h[1-6]>/gim;i=0;while(matches=re.exec(html)){href=MD5(matches[1]+matches[2]);anchor_list.push({name:href,value:matches[2]});i++}return anchor_list}function xed_html_entities(A){re=/&/g;A=A.replace(re,"&");re=//g;A=A.replace(re,">");return A}function xed_html_entities_decode(A){orig=A;re=/"/g;A=A.replace(re,'"');re=/</g;A=A.replace(re,"<");re=/>/g;A=A.replace(re,">");re=/&/g;A=A.replace(re,"&");return A}function xed_url_encode(A){return escape(A)}function xed_parse_uri(A){el=new Object;tmp=A.split("?");el.box=tmp[0];el.args=new Array();if(tmp.length>1){tmp=tmp[1].split("&");for(i=0;i"+A;document.getElementById("xed-debug-msg").innerHTML=html;document.getElementById("xed-debug-msg").scrollTop=document.getElementById("xed-debug-msg").scrollHeight};
    \ No newline at end of file
    diff --git a/inc/app/xed/js/xed.js b/inc/app/xed/js/xed.js
    index ac3d1a46..a602805b 100755
    --- a/inc/app/xed/js/xed.js
    +++ b/inc/app/xed/js/xed.js
    @@ -118,6 +118,13 @@ function xed_do_nothing (n) {}
     // call this in the onload attribute of the body
     // ie. onload="xed_init ('editor')"
     function xed_init (ifname) {
    +	// decode initial values
    +	xed_initial_value[ifname] = decodeURIComponent (xed_initial_value[ifname]);
    +	xed_scroller_data = decodeURIComponent (xed_scroller_data);
    +	for (var i = 0; i < xed_templates.length; i++) {
    +		xed_templates[i] = decodeURIComponent (xed_templates[i]);
    +	}
    +
     	e = document.getElementById (ifname);
     	e.contentWindow.document.designMode = 'on';
     	if (xed_safari) {
    diff --git a/inc/app/xed/lib/Widget/Xeditor.php b/inc/app/xed/lib/Widget/Xeditor.php
    index 3bb653d0..73f89cae 100755
    --- a/inc/app/xed/lib/Widget/Xeditor.php
    +++ b/inc/app/xed/lib/Widget/Xeditor.php
    @@ -135,9 +135,9 @@ function getValue ($cgi = '') {
     	}
     
     	function formatValue ($value) {
    -		$value = preg_replace ("/(\r\n|\n\r|\r|\n)/", "'\n\t\t+ '\\n", addslashes ($value));
    -		$value = str_replace ('', '', $value);
    -		return $value;
    +		//$value = preg_replace ("/(\r\n|\n\r|\r|\n)/", "'\n\t\t+ '\\n", addslashes ($value));
    +		//$value = str_replace ('', '', $value);
    +		return rawurlencode ($value);
     	}
     
     	/*! 
    diff --git a/install/changes.txt b/install/changes.txt
    index c2b4aae5..f74976cd 100755
    --- a/install/changes.txt
    +++ b/install/changes.txt
    @@ -8,6 +8,7 @@ Changes in 5.0.2-stable
     - Fixed issue with many team permissions - NOTE: Requires upgrade utility run.
     - Removed change history from browse if page is locked/not editable.
     - All related collections can now be disabled with their apps.
    +- Fixed an encoding issue with international characters in Xed.
     
     Changes in 5.0.1-stable