diff --git a/inc/app/xed/js/xed-compressed.js b/inc/app/xed/js/xed-compressed.js index b544184a..3a50e7c8 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_ff36=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(g){}function xed_init(l){try{xed_initial_value[l]=decodeURIComponent(xed_initial_value[l])}catch(m){xed_initial_value[l]=unescape(xed_initial_value[l])}try{xed_scroller_data=decodeURIComponent(xed_scroller_data)}catch(m){xed_scroller_data=unescape(xed_scroller_data)}for(var j=0;jEnter your content here.

"}if(xed_initial_value[l].length>0){try{m.contentWindow.document.body.innerHTML=xed_initial_value[l]}catch(g){if(xed_initial_value[l].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;m.style.width=width;m.style.height=height}m=document.getElementById(l);m.contentWindow.document.designMode="off";m.contentWindow.document.designMode="on";if(xed_safari){m.contentWindow.document.execCommand("styleWithCSS",false,false)}else{if(!xed_msie){try{m.contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){m.contentWindow.document.execCommand("useCSS",false,"")}}}xed_add_events(m.contentWindow.document,["keydown","keypress","mousedown","mouseup","drag","focus","mousemove"],xed_event);if(xed_adobeair){m.contentWindow.document.addEventListener("click",function(q){if(q.srcElement.nodeName.toLowerCase()=="a"){q.preventDefault()}},true)}m.contentWindow.document.ifname=l;xed_login_timer=setInterval("rpc_call (xed_web_path + '/index/xed-notimeout-action');",900000);if(xed_scroller){scroller_init("xed-"+l+"-reference",l);r=document.getElementById("xed-"+l+"-reference");try{r.contentWindow.document.body.innerHTML=xed_scroller_data}catch(g){r.contentWindow.document.write(s.value)}}}function xed_copy_value(j,g){html=xed_get_source(g);j.elements[g].value=html}function xed_preview(g){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(g));if(xed_preview_insert_close){p.document.write('

Close Window

')}return false}function xed_write_to_element(j,g){document.getElementById(g).innerHTML=xed_html_entities(xed_get_source(j));return false}function xed_safari_fix(g){if(!xed_safari){return false}html=xed_get_source(g);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(g,html)}function xed_bold(j){xed_historian(j);if(!xed_msie){try{document.getElementById(j).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){document.getElementById(j).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(j).contentWindow.document.execCommand("Bold",false,null);xed_safari_fix(j);document.getElementById(j).contentWindow.focus();return false}function xed_italic(j){xed_historian(j);if(!xed_msie){try{document.getElementById(j).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){document.getElementById(j).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(j).contentWindow.document.execCommand("Italic",false,null);xed_safari_fix(j);document.getElementById(j).contentWindow.focus();return false}function xed_horizontal_rule(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("InsertHorizontalRule",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_underline(j){xed_historian(j);if(!xed_msie){try{document.getElementById(j).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){document.getElementById(j).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(j).contentWindow.document.execCommand("Underline",false,null);xed_safari_fix(j);document.getElementById(j).contentWindow.focus();return false}function xed_align_left(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("JustifyLeft",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_align_right(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("JustifyRight",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_align_center(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("JustifyCenter",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_unordered_list(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("InsertUnorderedList",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_ordered_list(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("InsertOrderedList",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_indent(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("Indent",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_outdent(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("Outdent",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_link(g){n=xed_get_parent(g);if(n.tagName.toLowerCase()=="a"){xed_select_node(g,n);return xed_unlink(g)}if(xed_msie){h=350}else{h=300}w=window.open(xed_web_path+"/index/xed-link-form?ifname="+g,"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(j,g){xed_historian(j);if(xed_get_selection(j)==""){n=xed_get_parent(j);xed_select_node(j,n)}xed_insert_element(j,"a",g);document.getElementById(j).contentWindow.focus()}function xed_unlink(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("Unlink",false,null);document.getElementById(g).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(l,q,m,u,j,g){xed_historian(l);e=document.getElementById(l);if(xed_max_heightg){g=g*(xed_max_height/j);j=xed_max_height}else{j=j*(xed_max_width/g);g=xed_max_width}}else{hw_resized=false}if(document.all){img="";if(hw_resized&&xed_img_popup){img+=''}img+=''+m+'';if(hw_resized&&xed_img_popup){img+=""}document.getElementById(l).contentWindow.focus()}else{img=e.contentWindow.document.createElement("img");img.setAttribute("src",q);if(j!=false&&g!=false){img.setAttribute("height",j);img.setAttribute("width",g)}if(u!=false){img.setAttribute("align",u)}img.setAttribute("alt",m);img.setAttribute("border",0);if(hw_resized&&xed_img_popup){img_inner=img;img=e.contentWindow.document.createElement("a");img.setAttribute("href",q);img.setAttribute("target","_blank");img.appendChild(img_inner)}}xed_insert_node_at_selection(e.contentWindow,img);document.getElementById(l).contentWindow.focus()}function xed_clean(g){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,g);t=f.target;a=f.action;f.target="xedCleanersWindow";f.action=xed_prefix+"/index/xed-cleaners-action?ifname="+g;f.submit();f.target=t;f.action=a;return false}function xed_cleaner(g,j){xed_historian(g);document.getElementById(g).contentWindow.document.body.innerHTML=unescape(j);return false}function xed_filechooser(g){filechooser_attrs=true;filechooser_get_file(g);return false}function xed_set_file(j,l,g){xed_historian(j);e=document.getElementById(j);if(document.all){arr=l.split("?file=");g=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=g}file=''+txt+""}else{file=e.contentWindow.document.createElement("a");file.setAttribute("href",l);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=g}txt=e.contentWindow.document.createTextNode(txt);file.appendChild(txt)}document.getElementById(j).contentWindow.focus();xed_insert_node_at_selection(e.contentWindow,file);document.getElementById(j).contentWindow.focus()}function xed_select(j,l){xed_historian(j);c1=document.getElementById(l).selectedIndex;var g=document.getElementById(l).options[c1].value;if(g.length==0){g="

"}if(g=="

"){xed_insert_pre(j)}else{document.getElementById(j).contentWindow.document.execCommand("formatblock",false,g);document.getElementById(l).selectedIndex=0}document.getElementById(j).contentWindow.focus();return false}function xed_table(g){w=window.open(xed_web_path+"/index/xed-tablesizer-action?ifname="+g,"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(u,q){xed_historian(u);var g=q.split("x");var G=g.shift();var C=g.shift();var B=document.getElementById(u);if(document.all){var E='';for(var A=0;A";for(var m=0;m
'}E=E+"\n\t"}E=E+"\n
\n"}else{var E=B.contentWindow.document.createElement("table");E.setAttribute("width","98%");for(var A=0;A";if(xed_msie){g.insertBefore(j,g.cells(u.cellIndex))}else{g.insertBefore(j,g.cells[u.cellIndex])}g=xed_get_next_element(g)}}function xed_table_row_before(l){xed_historian(l);var g=xed_get_ancestors(l);var m=null;var j=null;for(i=0;i";new_td.colSpan=m.cells[i].colSpan}return}e=document.getElementById(l);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=m.cells[i].colSpan;new_tr.appendChild(td)}m.parentNode.insertBefore(new_tr,m)}function xed_table_row_after(l){xed_historian(l);var g=xed_get_ancestors(l);var m=null;var j=null;for(i=0;i";new_td.colSpan=m.cells[i].colSpan}return}e=document.getElementById(l);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=m.cells[i].colSpan;new_tr.appendChild(td)}next=xed_get_next_element(m);if(next){next.parentNode.insertBefore(new_tr,next)}else{m.parentNode.appendChild(new_tr)}}function xed_table_row_delete(m){xed_historian(m);var j=xed_get_ancestors(m);var q=null;var l=null;for(var g=j.length;--g>=0;){el=j[g];if(!el){continue}if(el.tagName.toLowerCase()=="tr"){q=el}else{if(el.tagName.toLowerCase()=="table"){l=el}}}q.parentNode.removeChild(q)}function xed_table_col_before(l){xed_historian(l);var C=xed_get_ancestors(l);var j=null;var B=null;for(var m=C.length;--m>=0;){el=C[m];if(!el){continue}if(el.tagName.toLowerCase()=="td"){j=el}else{if(el.tagName.toLowerCase()=="table"){B=el}}}var g=xed_table_grid(B);var u=xed_table_cellpos(g,j);var A=null;if(xed_msie){for(var q=0;q";new_td.rowSpan=j.rowSpan}else{j.colSpan++}A=j}}return}for(var q=0;j=xed_table_get_cell(g,q,u.cellindex);q++){if(j!=A){sd=xed_table_cellspan(j);if(sd.colspan==1){new_td=document.getElementById(l).contentWindow.document.createElement(j.nodeName);new_td.innerHTML="
";new_td.rowSpan=j.rowSpan;j.parentNode.insertBefore(new_td,j)}else{j.colSpan++}A=j}}}function xed_table_col_after(l){xed_historian(l);var C=xed_get_ancestors(l);var j=null;var B=null;for(var m=C.length;--m>=0;){el=C[m];if(!el){continue}if(el.tagName.toLowerCase()=="td"){j=el}else{if(el.tagName.toLowerCase()=="table"){B=el}}}var g=xed_table_grid(B);var u=xed_table_cellpos(g,j);var A=null;if(xed_msie){for(var q=0;q";new_td.rowSpan=j.rowSpan}else{j.colSpan++}A=j}}return}for(var q=0;j=xed_table_get_cell(g,q,u.cellindex);q++){if(j!=A){sd=xed_table_cellspan(j);if(sd.colspan==1){new_td=document.getElementById(l).contentWindow.document.createElement(j.nodeName);new_td.innerHTML="
";new_td.rowSpan=j.rowSpan;next=xed_get_next_element(j);if(next){next.parentNode.insertBefore(new_td,next)}else{j.parentNode.appendChild(new_td)}}else{j.colSpan++}A=j}}}function xed_table_col_delete(q){xed_historian(q);var l=xed_get_ancestors(q);var B=null;var m=null;for(var j=l.length;--j>=0;){el=l[j];if(!el){continue}if(el.tagName.toLowerCase()=="td"){B=el}else{if(el.tagName.toLowerCase()=="table"){m=el}}}var g=xed_table_grid(m);var A=xed_table_cellpos(g,B);for(var u=0;B=xed_table_get_cell(g,u,A.cellindex);u++){B.parentNode.removeChild(B)}}function xed_table_merge(U){xed_historian(U);var N=new Array();var S=xed_get_selection(U);var m=xed_get_ancestors(U);var J=null;var q=null;var X=null;for(var T=m.length;--T>=0;){el=m[T];if(!el){continue}if(el.tagName.toLowerCase()=="td"){J=el}else{if(el.tagName.toLowerCase()=="tr"){q=el}else{if(el.tagName.toLowerCase()=="table"){X=el}}}}var j=xed_table_grid(X);if(xed_msie||S.rangeCount==1){if(!J){if(!q){return}J=q.cells[0]}var Q=xed_get_next_element(J);J.colSpan=J.colSpan+Q.colSpan;Q.parentNode.deleteCell(Q.cellIndex);return}else{var D=new Array();var S=xed_get_selection(U);var E=null;var Y=null;var W=-1,B=-1,V,A;if(S.rangeCount<2){return true}for(var T=0;T0){N[N.length]=G}}var Y=new Array();var E=null;for(var L=0;LI){I=K}aa=-1}var u=-1;for(var M=0;MC){C=P}u=-1}J=N[0][0];J.rowSpan=C;J.colSpan=I;for(var L=0;L0)){J.innerHTML+=O}if(N[L][M]!=J&&!N[L][M]._deleted){var l=xed_table_cellpos(j,N[L][M]);var q=N[L][M].parentNode;q.removeChild(N[L][M]);N[L][M]._deleted=true;if(!q.hasChildNodes()){q.parentNode.removeChild(q);var R=null;for(var M=0;cell=xed_table_get_cell(j,l.rowindex,M);M++){if(cell!=last_cell&&cell.rowSpan>1){cell.rowSpan--}last_cell=cell}if(J.rowSpan>1){J.rowSpan--}}}}}}function xed_table_split_merged(m){xed_historian(m);var l=xed_get_ancestors(m);var B=null;for(j=0;j1||q>1){B.colSpan=1;for(var j=1;j";B.parentNode.insertBefore(g,xed_get_next_element(B));if(q>1){xed_table_add_rows(g,B.parentNode,q)}}xed_table_add_rows(B,B.parentNode,q)}}function xed_insert_element(l,j,g){xed_historian(l);e=document.getElementById(l);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="<"+j;for(i=0;i";sel=document.getElementById(l).contentWindow.getSelection();range=document.getElementById(l).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(l);html=html.replace(/##STARTNEWELEMENT##/g,tag2);html=html.replace(/##ENDNEWELEMENT##/g,tag2_end);xed_set_source(l,html,true)}else{len=j.length+2;tag=d.createElement(j);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(g){w=window.open(xed_web_path+"/index/xed-charmap-action?ifname="+g,"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(g,j){xed_historian(g);if(document.all){sel=document.getElementById(g).contentWindow.document.selection;range=sel.createRange();range.cutHTML;range.pasteHTML("&#"+j+";")}else{xed_insert_html_at_selection(g,"&#"+j+";")}document.getElementById(g).contentWindow.focus();return false}function xed_edit_properties(j,g){if(!g){g=xed_get_parent(j)}if(g.tagName.toLowerCase()=="tbody"){g=g.parentNode}if(xed_msie&&g.tagName.toLowerCase()=="box"){tag_name="xt:box"}else{tag_name=g.tagName.toLowerCase()}p="?ifname="+j+"&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(g){o="";for(i=0;i0){c=xed_get_source(g);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(g).contentWindow.document.body.innerHTML=s}document.getElementById(g).contentWindow.focus();return false}function xed_redo(g){if(xed_future.length>0){c=xed_get_source(g);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(g).contentWindow.document.body.innerHTML=s}document.getElementById(g).contentWindow.focus();return false}function xed_cut(g){try{document.getElementById(g).contentWindow.document.execCommand("cut",false,null)}catch(j){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(g).contentWindow.focus();return false}function xed_copy(g){try{document.getElementById(g).contentWindow.document.execCommand("copy",false,null)}catch(j){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(g).contentWindow.focus();return false}function xed_paste(g){try{document.getElementById(g).contentWindow.document.execCommand("paste",false,null)}catch(j){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(g).contentWindow.focus();return false}function xed_help(g){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(g){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-"+g+"-fsform");f.elements.xeditor.value=xed_get_source(g);f.submit();return false}function xed_template(l,j){xed_historian(l);c1=document.getElementById(j).selectedIndex;if(c1!=0){var g=document.getElementById(j).options[c1].value;document.getElementById(j).selectedIndex=0;if(g==""){}else{if(g=="ADD TEMPLATE"){var q=l;var m=j;prompt("Please enter a name for your template","",function(u){if(u==false||u==null||u.length==0){return}value=xed_get_source(q);rpc_call(xed_web_path+"/index/xed-template-add-action?name="+u+"&body="+xed_url_encode(value));tlist=document.getElementById(m);for(i=0;i0){for(i=0;i";txt=j;if(g.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:box");box.setAttribute("name",j);box.setAttribute("title",j);box.setAttribute("style","word-wrap: break-word; display: list-item; list-style-type: none; background-color: #b7c3cf; -moz-border-radius: 10px; min-height: 20px; width: 575px; font-weight: normal; padding: 15px 15px 15px 15px; margin: 5px;");if(g.length>0){for(i=0;i0){txt+=" (";sep="";for(i=0;i0){for(i=0;i";txt=j;if(g.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:form");box.setAttribute("name",j);box.setAttribute("title",j);box.setAttribute("style","display: list-item; list-style-type: none; background-color: #b7c3cf; -moz-border-radius: 10px; min-height: 20px; width: 575px; font-weight: normal; padding: 15px 15px 15px 15px; margin: 5px;");if(g.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=g.clientX+p.x;menu.style.top=g.clientY+p.y}else{menu.style.left=g.clientX+p.x;menu.style.top=g.clientY+p.y}}else{menu.style.left=g.pageX+p.x-e.contentWindow.scrollX;menu.style.top=g.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(g){var j=" head script style p div span tr td tbody table em strong font a title xt:box xt:form box form ";return(j.indexOf(" "+g.tagName.toLowerCase()+" ")!=-1)}function xed_is_block_tag(j){var g=" 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(g.indexOf(" "+j+" ")!=-1)}function xed_get_element_pos(l){var j={x:l.offsetLeft,y:l.offsetTop};if(l.offsetParent){if(l.offsetParent==document.getElementById("cms-edit")){return j}var g=xed_get_element_pos(l.offsetParent);j.x+=g.x;j.y+=g.y}return j}function xed_get_next_element(g){name=g.nodeName.toLowerCase();while((g=g.nextSibling)!=null){if(g.nodeName.toLowerCase()==name){return g}}return null}function xed_in_array(g,j){for(i=0;i0&&xed_in_array(g[i],j)){return true}if(g[i]==j){return true}}return false}function xed_get_selection(j){try{return document.getElementById(j).contentWindow.getSelection()}catch(g){return document.getElementById(j).contentWindow.document.selection}}function xed_select_node_contents(l,j){var g;if(!xed_msie){var m=xed_get_selection(l);g=document.getElementById(l).contentWindow.document.createRange();g.selectNodeContents(j);m.removeAllRanges();m.addRange(g);if(xed_safari){xed_selected_node=j}}else{g=document.getElementById(l).contentWindow.document.body.createTextRange();g.moveToElementText(j);g.select()}tag=j.tagName.toLowerCase();document.getElementById(l).contentWindow.focus();xed_update_path(l,tag)}function xed_select_node(m,l){var g;try{var q=xed_get_selection(m);g=document.getElementById(m).contentWindow.document.createRange();g.selectNode(l);q.removeAllRanges();q.addRange(g);if(xed_safari){xed_selected_node=l}}catch(j){g=document.getElementById(m).contentWindow.document.body.createTextRange();g.moveToElementText(l);g.select()}}function xed_create_range(l,m){try{document.getElementById(l).contentWindow.focus();if(typeof m!="undefined"){return m.getRangeAt(0)}else{return document.getElementById(l).contentWindow.document.createRange()}}catch(g){if(typeof m!="undefined"){try{return m.createRange()}catch(j){return false}}else{return document.getElementById(l).contentWindow.document.body.createTextRange()}}}function xed_error(g){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(g+"
    ")}function xed_get_parent(l){if(arguments.length>1){xed_selected=arguments[1]}var m=xed_get_selection(l);var j=xed_create_range(l,m);if(!j){return}if(!xed_msie){if(xed_selected!="a"&&j.endContainer&&j.startContainer==j.endContainer&&j.startContainer.nodeType==1){var g=null;if(j.startContainer.tagName.toLowerCase()=="img"){g=j.startContainer}else{if(j.endOffset-j.startOffset==1&&j.startContainer.childNodes[j.startOffset].tagName.toLowerCase()=="img"){g=j.startContainer.childNodes[j.startOffset]}}if(g!=null){return g}}if(xed_safari){if(xed_selected=="tr"&&j.startContainer){if(j.startContainer.tagName.toLowerCase()=="td"){var q=j.startContainer.parentNode}else{var q=j.startContainer}if(q.tagName.toLowerCase()=="tr"){return q}}if(xed_selected=="tbody"&&j.startContainer){var q=j.startContainer;while(q.tagName.toLowerCase()!=xed_selected){if(!q.parentNode){q=false;break}q=q.parentNode}if(q){return q}}if(xed_selected=="table"&&j.startContainer&&j.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 q=j.commonAncestorContainer;while(q.nodeType==3){q=q.parentNode}return q}else{if(xed_selected=="a"){if(j.parentElement&&j.parentElement().tagName.toLowerCase()=="img"){g=j.parentElement();return g.parentNode}return j.parentElement?j.parentElement():document.getElementById(l).contentWindow.document.body}if(!j){return document.getElementById(l).contentWindow.document.body}if(j.item){return j.item(0)}return j.parentElement?j.parentElement():document.getElementById(l).contentWindow.document.body}}function xed_get_ancestors(j){if(arguments.length>1){xed_selected=arguments[1]}if(xed_selected){var l=xed_get_parent(j,xed_selected)}else{var l=xed_get_parent(j)}var g=new Array();while(l&&(l.tagName.toLowerCase()!="body")){if(l.nodeType!=1){continue}g.push(l);l=l.parentNode}g.push(document.getElementById(j).contentWindow.document.body);return g}function xed_get_ifname(g){if(xed_safari){xed_selected_node=g}g=(g.ownerDocument)?g.ownerDocument:g;return g.ifname}function xed_event(g){g=(g)?g:((event)?event:null);if(g){var j=(g.target)?g.target:((g.srcElement)?g.srcElement:null);if(j){j=(j.nodeType==1||j.nodeType==9)?j:j.parentNode;ifname=xed_get_ifname(j);if(g.type=="mousemove"){if(xed_msie){xed_mouse_x=g.clientX-document.body.scrollLeft;xed_mouse_y=g.clientY-document.body.scrollTop}else{xed_mouse_x=g.pageX;xed_mouse_y=g.pageY}}else{if(g.type=="mousedown"&&(g.button==0||g.button==1)){xed_update_path(ifname);if(xed_context_menu){xed_toggle_context_menu(ifname,g)}}else{if(g.type=="mousedown"&&(g.button==2||g.button==3)){xed_update_path(ifname);if(xed_msie){g.cancelBubble=true;g.returnValue=false}else{g.cancelBubble=true;g.returnValue=false;g.preventDefault();g.stopPropagation()}return false}else{if(g.type=="contextmenu"){xed_update_path(ifname);xed_toggle_context_menu(ifname,g);if(xed_msie){g.cancelBubble=true;g.returnValue=false}else{g.cancelBubble=true;g.returnValue=false;g.preventDefault();g.stopPropagation()}return false}else{xed_update_path(ifname);k=g.keyCode;if(!xed_msie&&k==0){k=g.charCode}if(g.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(g.type=="keydown"&&(k==122||k==90)&&g.ctrlKey){if(g.shiftKey){xed_redo(ifname)}else{xed_undo(ifname)}if(xed_msie){g.cancelBubble=true;g.returnValue=false}else{g.cancelBubble=true;g.returnValue=false;g.preventDefault();g.stopPropagation()}return false}}}}}}}}function xed_add_event(j,g,l){if(xed_msie){j.attachEvent("on"+g,l)}else{j.addEventListener(g,l,true)}}function xed_add_events(j,g,l){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(l).contentWindow.document;path_div=document.getElementById("xed-"+l+"-path");path_div.innerHTML="";path_div.style.paddingBottom="0px";path_div.style.marginBottom="0px";path=document.createElement("span");try{path.style.cssFloat="left"}catch(u){path.style.styleFloat="right"}path.style.paddingRight="7px";path.style.paddingBottom="0px";path.style.marginBottom="0px";path.innerHTML="Path: ";if(xed_selected){var C=xed_get_ancestors(l,xed_selected)}else{var C=xed_get_ancestors(l)}var g=null;var q=false;var B=false;for(var m=C.length;--m>=0;){g=C[m];if(!g){continue}if(g.tagName.toLowerCase()=="table"){document.getElementById("xed-"+l+"-table-bar").style.display="block";B=true}if(!q){xed_update_formatblock(l,g.tagName.toLowerCase())}var A=document.createElement("a");A.href="#";A.el=g;A.editor=l;A.onclick=function(){this.blur();xed_select_node_contents(this.editor,this.el);return false};var j=g.tagName.toLowerCase();A.title=g.style.cssText;if(g.id){j+="#"+g.id}if(g.className){j+="."+g.className}A.appendChild(document.createTextNode(j));path.appendChild(A);if(m!=0){path.appendChild(document.createTextNode(" "+String.fromCharCode(187)+" "))}}if(!B){document.getElementById("xed-"+l+"-table-bar").style.display="none"}if(j!="body"){edit=document.createElement("a");edit.href="#";edit.el=g;edit.editor=l;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=g;dele.editor=l;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(j){outer=j.outerHTML;if(typeof(outer)!="undefined"){return outer}outer="<"+j.tagName;if(j.attributes){for(var g in j.attributes){a=j.attributes[g];if(a.value){outer+=" "+a.name+'="'+a.value+'"'}}}outer+=">";outer+=j.innerHTML;outer+="";return outer}function xed_remove_element(l,j){xed_historian(l);new_html="";pn=j.parentNode;if(!pn){return false}len=pn.childNodes.length;if(xed_msie){for(var g in j.parentNode.childNodes){if(g>=len){break}n=j.parentNode.childNodes[g];if(n==j){if(j.tagName.toLowerCase()!="xt:box"&&j.tagName.toLowerCase()!="xt:form"){new_html+=j.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 g=0;g=len){break}n=j.parentNode.childNodes[g];if(n==j){if(j.tagName.toLowerCase()!="xt:box"&&j.tagName.toLowerCase()!="xt:form"){new_html+=j.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 g in j.parentNode.childNodes){if(g>=len){break}n=j.parentNode.childNodes[g];if(n==j){if(j.tagName.toLowerCase()!="xt:box"&&j.tagName.toLowerCase()!="xt:form"){new_html+=j.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}}}}}}}}j.parentNode.innerHTML=new_html}function xed_strip_base_url(g){if(g.indexOf(xed_site_domain+xed_prefix+"/index/")!=-1){arr=g.split(xed_site_domain+xed_prefix+"/index/");return xed_prefix+"/index/"+arr.pop()}if(g.indexOf(xed_site_domain+xed_prefix+"/pix/")!=-1){arr=g.split(xed_site_domain+xed_prefix+"/pix/");return xed_prefix+"/pix/"+arr.pop()}if(xed_msie){if(g.indexOf(xed_site_domain)!=-1){arr=g.split(xed_site_domain);g=arr.pop()}if(g.indexOf("#")===0){return g}if(g.indexOf("http://")===0){return g}else{if(g.indexOf("www.")===0){return"http://"+g}}return g}var l=xed_site_url;l=l.replace(/[^\/]+$/,"");var j=new RegExp(l);g=g.replace(j,"");l=l.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1");j=new RegExp(l);return g.replace(j,"")}function xed_get_html(B,j,u){var q="";switch(B.nodeType){case 1:case 11:var A;var m;var E=(B.nodeType==1)?B.tagName.toLowerCase():"";if(E=="box"||E=="form"){E="xt:"+E}if(xed_msie&&E=="head"){if(j){q+=""}var G=RegExp.multiline;RegExp.multiline=true;var l=B.innerHTML.replace(xed_rx_tag_name,function(J,I,H){return I+H.toLowerCase()});RegExp.multiline=G;q+=l;if(j){q+=""}break}else{if(j){A=(!(B.hasChildNodes()||xed_needs_closing_tag(B)));q="<"+E;var F=B.attributes;for(m=0;m":">";if(E=="br"){q+="\n"}}}for(m=B.firstChild;m;m=m.nextSibling){q+=xed_get_html(m,true,u)}if(j&&!A){q+="";if(xed_is_block_tag(E)){q+="\n"}}break;case 3:if(!B.previousSibling&&!B.nextSibling&&B.data.match(/^\s*$/i)){q=" "}else{q=xed_html_entities(B.data)}break;case 8:q="";break}q=q.replace(/\n\n+/g,"\n\n");return q}function xed_get_source(g){if(xed_edit_state=="edit"){return xed_get_html(document.getElementById(g).contentWindow.document.body,false,false)}return document.getElementById("xed-"+g+"-source").value}function xed_get_anchors(g){html=xed_get_source(g);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(g){re=/&/g;g=g.replace(re,"&");re=//g;g=g.replace(re,">");return g}function xed_html_entities_decode(g){orig=g;re=/"/g;g=g.replace(re,'"');re=/</g;g=g.replace(re,"<");re=/>/g;g=g.replace(re,">");re=/&/g;g=g.replace(re,"&");return g}function xed_url_encode(g){return escape(g)}function xed_parse_uri(g){el=new Object;tmp=g.split("?");el.box=tmp[0];el.args=new Array();if(tmp.length>1){tmp=tmp[1].split("&");for(i=0;i"+g;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_ff36=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(g){}function xed_init(l){try{xed_initial_value[l]=decodeURIComponent(xed_initial_value[l])}catch(m){xed_initial_value[l]=unescape(xed_initial_value[l])}try{xed_scroller_data=decodeURIComponent(xed_scroller_data)}catch(m){xed_scroller_data=unescape(xed_scroller_data)}for(var j=0;jEnter your content here.

    "}if(xed_initial_value[l].length>0){try{m.contentWindow.document.body.innerHTML=xed_initial_value[l]}catch(g){if(xed_initial_value[l].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;m.style.width=width;m.style.height=height}m=document.getElementById(l);m.contentWindow.document.designMode="off";m.contentWindow.document.designMode="on";if(xed_safari){m.contentWindow.document.execCommand("styleWithCSS",false,false)}else{if(!xed_msie){try{m.contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){m.contentWindow.document.execCommand("useCSS",false,"")}}}xed_add_events(m.contentWindow.document,["keydown","keypress","mousedown","mouseup","drag","focus","mousemove"],xed_event);if(xed_adobeair){m.contentWindow.document.addEventListener("click",function(q){if(q.srcElement.nodeName.toLowerCase()=="a"){q.preventDefault()}},true)}m.contentWindow.document.ifname=l;xed_login_timer=setInterval("rpc_call (xed_web_path + '/index/xed-notimeout-action');",900000);if(xed_scroller){scroller_init("xed-"+l+"-reference",l);r=document.getElementById("xed-"+l+"-reference");try{r.contentWindow.document.body.innerHTML=xed_scroller_data}catch(g){r.contentWindow.document.write(s.value)}}}function xed_copy_value(j,g){html=xed_get_source(g);j.elements[g].value=html}function xed_preview(g){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(g));if(xed_preview_insert_close){p.document.write('

    Close Window

    ')}return false}function xed_write_to_element(j,g){document.getElementById(g).innerHTML=xed_html_entities(xed_get_source(j));return false}function xed_safari_fix(g){if(!xed_safari){return false}html=xed_get_source(g);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(g,html)}function xed_bold(j){xed_historian(j);if(!xed_msie){try{document.getElementById(j).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){document.getElementById(j).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(j).contentWindow.document.execCommand("Bold",false,null);xed_safari_fix(j);document.getElementById(j).contentWindow.focus();return false}function xed_italic(j){xed_historian(j);if(!xed_msie){try{document.getElementById(j).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){document.getElementById(j).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(j).contentWindow.document.execCommand("Italic",false,null);xed_safari_fix(j);document.getElementById(j).contentWindow.focus();return false}function xed_horizontal_rule(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("InsertHorizontalRule",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_underline(j){xed_historian(j);if(!xed_msie){try{document.getElementById(j).contentWindow.document.execCommand("styleWithCSS",false,false)}catch(g){document.getElementById(j).contentWindow.document.execCommand("useCSS",false,"")}}document.getElementById(j).contentWindow.document.execCommand("Underline",false,null);xed_safari_fix(j);document.getElementById(j).contentWindow.focus();return false}function xed_align_left(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("JustifyLeft",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_align_right(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("JustifyRight",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_align_center(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("JustifyCenter",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_unordered_list(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("InsertUnorderedList",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_ordered_list(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("InsertOrderedList",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_indent(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("Indent",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_outdent(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("Outdent",false,null);document.getElementById(g).contentWindow.focus();return false}function xed_link(g){n=xed_get_parent(g);if(n.tagName.toLowerCase()=="a"){xed_select_node(g,n);return xed_unlink(g)}if(xed_msie){h=350}else{h=300}w=window.open(xed_web_path+"/index/xed-link-form?ifname="+g,"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(j,g){xed_historian(j);if(xed_get_selection(j)==""){n=xed_get_parent(j);xed_select_node(j,n)}xed_insert_element(j,"a",g);document.getElementById(j).contentWindow.focus()}function xed_unlink(g){xed_historian(g);document.getElementById(g).contentWindow.document.execCommand("Unlink",false,null);document.getElementById(g).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(l,q,m,u,j,g){xed_historian(l);e=document.getElementById(l);if(xed_max_heightg){g=g*(xed_max_height/j);j=xed_max_height}else{j=j*(xed_max_width/g);g=xed_max_width}}else{hw_resized=false}if(document.all){img="";if(hw_resized&&xed_img_popup){img+=''}img+=''+m+'';if(hw_resized&&xed_img_popup){img+=""}document.getElementById(l).contentWindow.focus()}else{img=e.contentWindow.document.createElement("img");img.setAttribute("src",q);if(j!=false&&g!=false){img.setAttribute("height",j);img.setAttribute("width",g)}if(u!=false){img.setAttribute("align",u)}img.setAttribute("alt",m);img.setAttribute("border",0);if(hw_resized&&xed_img_popup){img_inner=img;img=e.contentWindow.document.createElement("a");img.setAttribute("href",q);img.setAttribute("target","_blank");img.appendChild(img_inner)}}xed_insert_node_at_selection(e.contentWindow,img);document.getElementById(l).contentWindow.focus()}function xed_clean(g){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,g);t=f.target;a=f.action;f.target="xedCleanersWindow";f.action=xed_prefix+"/index/xed-cleaners-action?ifname="+g;f.submit();f.target=t;f.action=a;return false}function xed_cleaner(g,j){xed_historian(g);document.getElementById(g).contentWindow.document.body.innerHTML=unescape(j);return false}function xed_filechooser(g){filechooser_attrs=true;filechooser_get_file(g);return false}function xed_set_file(j,l,g){xed_historian(j);e=document.getElementById(j);if(document.all){arr=l.split("?file=");g=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=g}file=''+txt+""}else{file=e.contentWindow.document.createElement("a");file.setAttribute("href",l);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=g}txt=e.contentWindow.document.createTextNode(txt);file.appendChild(txt)}document.getElementById(j).contentWindow.focus();xed_insert_node_at_selection(e.contentWindow,file);document.getElementById(j).contentWindow.focus()}function xed_select(j,l){xed_historian(j);c1=document.getElementById(l).selectedIndex;var g=document.getElementById(l).options[c1].value;if(g.length==0){g="

    "}if(g=="

    "){xed_insert_pre(j)}else{document.getElementById(j).contentWindow.document.execCommand("formatblock",false,g);document.getElementById(l).selectedIndex=0}document.getElementById(j).contentWindow.focus();return false}function xed_table(g){w=window.open(xed_web_path+"/index/xed-tablesizer-action?ifname="+g,"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(u,q){xed_historian(u);var g=q.split("x");var G=g.shift();var C=g.shift();var B=document.getElementById(u);if(document.all){var E='';for(var A=0;A";for(var m=0;m
    '}E=E+"\n\t"}E=E+"\n
    \n"}else{var E=B.contentWindow.document.createElement("table");E.setAttribute("width","98%");for(var A=0;A";if(xed_msie){g.insertBefore(j,g.cells(u.cellIndex))}else{g.insertBefore(j,g.cells[u.cellIndex])}g=xed_get_next_element(g)}}function xed_table_row_before(l){xed_historian(l);var g=xed_get_ancestors(l);var m=null;var j=null;for(i=0;i";new_td.colSpan=m.cells[i].colSpan}return}e=document.getElementById(l);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=m.cells[i].colSpan;new_tr.appendChild(td)}m.parentNode.insertBefore(new_tr,m)}function xed_table_row_after(l){xed_historian(l);var g=xed_get_ancestors(l);var m=null;var j=null;for(i=0;i";new_td.colSpan=m.cells[i].colSpan}return}e=document.getElementById(l);new_tr=e.contentWindow.document.createElement("tr");for(i=0;i";td.colSpan=m.cells[i].colSpan;new_tr.appendChild(td)}next=xed_get_next_element(m);if(next){next.parentNode.insertBefore(new_tr,next)}else{m.parentNode.appendChild(new_tr)}}function xed_table_row_delete(m){xed_historian(m);var j=xed_get_ancestors(m);var q=null;var l=null;for(var g=j.length;--g>=0;){el=j[g];if(!el){continue}if(el.tagName.toLowerCase()=="tr"){q=el}else{if(el.tagName.toLowerCase()=="table"){l=el}}}q.parentNode.removeChild(q)}function xed_table_col_before(l){xed_historian(l);var C=xed_get_ancestors(l);var j=null;var B=null;for(var m=C.length;--m>=0;){el=C[m];if(!el){continue}if(el.tagName.toLowerCase()=="td"){j=el}else{if(el.tagName.toLowerCase()=="table"){B=el}}}var g=xed_table_grid(B);var u=xed_table_cellpos(g,j);var A=null;if(xed_msie){for(var q=0;q";new_td.rowSpan=j.rowSpan}else{j.colSpan++}A=j}}return}for(var q=0;j=xed_table_get_cell(g,q,u.cellindex);q++){if(j!=A){sd=xed_table_cellspan(j);if(sd.colspan==1){new_td=document.getElementById(l).contentWindow.document.createElement(j.nodeName);new_td.innerHTML="
    ";new_td.rowSpan=j.rowSpan;j.parentNode.insertBefore(new_td,j)}else{j.colSpan++}A=j}}}function xed_table_col_after(l){xed_historian(l);var C=xed_get_ancestors(l);var j=null;var B=null;for(var m=C.length;--m>=0;){el=C[m];if(!el){continue}if(el.tagName.toLowerCase()=="td"){j=el}else{if(el.tagName.toLowerCase()=="table"){B=el}}}var g=xed_table_grid(B);var u=xed_table_cellpos(g,j);var A=null;if(xed_msie){for(var q=0;q";new_td.rowSpan=j.rowSpan}else{j.colSpan++}A=j}}return}for(var q=0;j=xed_table_get_cell(g,q,u.cellindex);q++){if(j!=A){sd=xed_table_cellspan(j);if(sd.colspan==1){new_td=document.getElementById(l).contentWindow.document.createElement(j.nodeName);new_td.innerHTML="
    ";new_td.rowSpan=j.rowSpan;next=xed_get_next_element(j);if(next){next.parentNode.insertBefore(new_td,next)}else{j.parentNode.appendChild(new_td)}}else{j.colSpan++}A=j}}}function xed_table_col_delete(q){xed_historian(q);var l=xed_get_ancestors(q);var B=null;var m=null;for(var j=l.length;--j>=0;){el=l[j];if(!el){continue}if(el.tagName.toLowerCase()=="td"){B=el}else{if(el.tagName.toLowerCase()=="table"){m=el}}}var g=xed_table_grid(m);var A=xed_table_cellpos(g,B);for(var u=0;B=xed_table_get_cell(g,u,A.cellindex);u++){B.parentNode.removeChild(B)}}function xed_table_merge(U){xed_historian(U);var N=new Array();var S=xed_get_selection(U);var m=xed_get_ancestors(U);var J=null;var q=null;var X=null;for(var T=m.length;--T>=0;){el=m[T];if(!el){continue}if(el.tagName.toLowerCase()=="td"){J=el}else{if(el.tagName.toLowerCase()=="tr"){q=el}else{if(el.tagName.toLowerCase()=="table"){X=el}}}}var j=xed_table_grid(X);if(xed_msie||S.rangeCount==1){if(!J){if(!q){return}J=q.cells[0]}var Q=xed_get_next_element(J);J.colSpan=J.colSpan+Q.colSpan;Q.parentNode.deleteCell(Q.cellIndex);return}else{var D=new Array();var S=xed_get_selection(U);var E=null;var Y=null;var W=-1,B=-1,V,A;if(S.rangeCount<2){return true}for(var T=0;T0){N[N.length]=G}}var Y=new Array();var E=null;for(var L=0;LI){I=K}aa=-1}var u=-1;for(var M=0;MC){C=P}u=-1}J=N[0][0];J.rowSpan=C;J.colSpan=I;for(var L=0;L0)){J.innerHTML+=O}if(N[L][M]!=J&&!N[L][M]._deleted){var l=xed_table_cellpos(j,N[L][M]);var q=N[L][M].parentNode;q.removeChild(N[L][M]);N[L][M]._deleted=true;if(!q.hasChildNodes()){q.parentNode.removeChild(q);var R=null;for(var M=0;cell=xed_table_get_cell(j,l.rowindex,M);M++){if(cell!=last_cell&&cell.rowSpan>1){cell.rowSpan--}last_cell=cell}if(J.rowSpan>1){J.rowSpan--}}}}}}function xed_table_split_merged(m){xed_historian(m);var l=xed_get_ancestors(m);var B=null;for(j=0;j1||q>1){B.colSpan=1;for(var j=1;j";B.parentNode.insertBefore(g,xed_get_next_element(B));if(q>1){xed_table_add_rows(g,B.parentNode,q)}}xed_table_add_rows(B,B.parentNode,q)}}function xed_insert_element(l,j,g){xed_historian(l);e=document.getElementById(l);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="<"+j;for(i=0;i";sel=document.getElementById(l).contentWindow.getSelection();range=document.getElementById(l).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(l);html=html.replace(/##STARTNEWELEMENT##/g,tag2);html=html.replace(/##ENDNEWELEMENT##/g,tag2_end);xed_set_source(l,html,true)}else{len=j.length+2;tag=d.createElement(j);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(g){w=window.open(xed_web_path+"/index/xed-charmap-action?ifname="+g,"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(g,j){xed_historian(g);xed_insert_html_at_selection(g,"&#"+j+";");document.getElementById(g).contentWindow.focus();return false}function xed_edit_properties(j,g){if(!g){g=xed_get_parent(j)}if(g.tagName.toLowerCase()=="tbody"){g=g.parentNode}if(xed_msie&&g.tagName.toLowerCase()=="box"){tag_name="xt:box"}else{tag_name=g.tagName.toLowerCase()}p="?ifname="+j+"&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(g){o="";for(i=0;i0){c=xed_get_source(g);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(g).contentWindow.document.body.innerHTML=s}document.getElementById(g).contentWindow.focus();return false}function xed_redo(g){if(xed_future.length>0){c=xed_get_source(g);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(g).contentWindow.document.body.innerHTML=s}document.getElementById(g).contentWindow.focus();return false}function xed_cut(g){try{document.getElementById(g).contentWindow.document.execCommand("cut",false,null)}catch(j){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(g).contentWindow.focus();return false}function xed_copy(g){try{document.getElementById(g).contentWindow.document.execCommand("copy",false,null)}catch(j){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(g).contentWindow.focus();return false}function xed_paste(g){try{document.getElementById(g).contentWindow.document.execCommand("paste",false,null)}catch(j){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(g).contentWindow.focus();return false}function xed_help(g){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(g){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-"+g+"-fsform");f.elements.xeditor.value=xed_get_source(g);f.submit();return false}function xed_template(l,j){xed_historian(l);c1=document.getElementById(j).selectedIndex;if(c1!=0){var g=document.getElementById(j).options[c1].value;document.getElementById(j).selectedIndex=0;if(g==""){}else{if(g=="ADD TEMPLATE"){var q=l;var m=j;prompt("Please enter a name for your template","",function(u){if(u==false||u==null||u.length==0){return}value=xed_get_source(q);rpc_call(xed_web_path+"/index/xed-template-add-action?name="+u+"&body="+xed_url_encode(value));tlist=document.getElementById(m);for(i=0;i0){for(i=0;i";txt=j;if(g.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:box");box.setAttribute("name",j);box.setAttribute("title",j);box.setAttribute("style","word-wrap: break-word; display: list-item; list-style-type: none; background-color: #b7c3cf; -moz-border-radius: 10px; min-height: 20px; width: 575px; font-weight: normal; padding: 15px 15px 15px 15px; margin: 5px;");if(g.length>0){for(i=0;i0){txt+=" (";sep="";for(i=0;i0){for(i=0;i";txt=j;if(g.length>0){txt+=" (";sep="";for(i=0;i"}else{box=e.contentWindow.document.createElement("xt:form");box.setAttribute("name",j);box.setAttribute("title",j);box.setAttribute("style","display: list-item; list-style-type: none; background-color: #b7c3cf; -moz-border-radius: 10px; min-height: 20px; width: 575px; font-weight: normal; padding: 15px 15px 15px 15px; margin: 5px;");if(g.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=g.clientX+p.x;menu.style.top=g.clientY+p.y}else{menu.style.left=g.clientX+p.x;menu.style.top=g.clientY+p.y}}else{menu.style.left=g.pageX+p.x-e.contentWindow.scrollX;menu.style.top=g.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(g){var j=" head script style p div span tr td tbody table em strong font a title xt:box xt:form box form ";return(j.indexOf(" "+g.tagName.toLowerCase()+" ")!=-1)}function xed_is_block_tag(j){var g=" 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(g.indexOf(" "+j+" ")!=-1)}function xed_get_element_pos(l){var j={x:l.offsetLeft,y:l.offsetTop};if(l.offsetParent){if(l.offsetParent==document.getElementById("cms-edit")){return j}var g=xed_get_element_pos(l.offsetParent);j.x+=g.x;j.y+=g.y}return j}function xed_get_next_element(g){name=g.nodeName.toLowerCase();while((g=g.nextSibling)!=null){if(g.nodeName.toLowerCase()==name){return g}}return null}function xed_in_array(g,j){for(i=0;i0&&xed_in_array(g[i],j)){return true}if(g[i]==j){return true}}return false}function xed_get_selection(j){try{return document.getElementById(j).contentWindow.getSelection()}catch(g){return document.getElementById(j).contentWindow.document.selection}}function xed_select_node_contents(l,j){var g;if(!xed_msie){var m=xed_get_selection(l);g=document.getElementById(l).contentWindow.document.createRange();g.selectNodeContents(j);m.removeAllRanges();m.addRange(g);if(xed_safari){xed_selected_node=j}}else{g=document.getElementById(l).contentWindow.document.body.createTextRange();g.moveToElementText(j);g.select()}tag=j.tagName.toLowerCase();document.getElementById(l).contentWindow.focus();xed_update_path(l,tag)}function xed_select_node(m,l){var g;try{var q=xed_get_selection(m);g=document.getElementById(m).contentWindow.document.createRange();g.selectNode(l);q.removeAllRanges();q.addRange(g);if(xed_safari){xed_selected_node=l}}catch(j){g=document.getElementById(m).contentWindow.document.body.createTextRange();g.moveToElementText(l);g.select()}}function xed_create_range(l,m){try{document.getElementById(l).contentWindow.focus();if(typeof m!="undefined"){return m.getRangeAt(0)}else{return document.getElementById(l).contentWindow.document.createRange()}}catch(g){if(typeof m!="undefined"){try{return m.createRange()}catch(j){return false}}else{return document.getElementById(l).contentWindow.document.body.createTextRange()}}}function xed_error(g){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(g+"
    ")}function xed_get_parent(l){if(arguments.length>1){xed_selected=arguments[1]}var m=xed_get_selection(l);var j=xed_create_range(l,m);if(!j){return}if(!xed_msie){if(xed_selected!="a"&&j.endContainer&&j.startContainer==j.endContainer&&j.startContainer.nodeType==1){var g=null;if(j.startContainer.tagName.toLowerCase()=="img"){g=j.startContainer}else{if(j.endOffset-j.startOffset==1&&j.startContainer.childNodes[j.startOffset].tagName.toLowerCase()=="img"){g=j.startContainer.childNodes[j.startOffset]}}if(g!=null){return g}}if(xed_safari){if(xed_selected=="tr"&&j.startContainer){if(j.startContainer.tagName.toLowerCase()=="td"){var q=j.startContainer.parentNode}else{var q=j.startContainer}if(q.tagName.toLowerCase()=="tr"){return q}}if(xed_selected=="tbody"&&j.startContainer){var q=j.startContainer;while(q.tagName.toLowerCase()!=xed_selected){if(!q.parentNode){q=false;break}q=q.parentNode}if(q){return q}}if(xed_selected=="table"&&j.startContainer&&j.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 q=j.commonAncestorContainer;while(q.nodeType==3){q=q.parentNode}return q}else{if(xed_selected=="a"){if(j.parentElement&&j.parentElement().tagName.toLowerCase()=="img"){g=j.parentElement();return g.parentNode}return j.parentElement?j.parentElement():document.getElementById(l).contentWindow.document.body}if(!j){return document.getElementById(l).contentWindow.document.body}if(j.item){return j.item(0)}return j.parentElement?j.parentElement():document.getElementById(l).contentWindow.document.body}}function xed_get_ancestors(j){if(arguments.length>1){xed_selected=arguments[1]}if(xed_selected){var l=xed_get_parent(j,xed_selected)}else{var l=xed_get_parent(j)}var g=new Array();while(l&&(l.tagName.toLowerCase()!="body")){if(l.nodeType!=1){continue}g.push(l);l=l.parentNode}g.push(document.getElementById(j).contentWindow.document.body);return g}function xed_get_ifname(g){if(xed_safari){xed_selected_node=g}g=(g.ownerDocument)?g.ownerDocument:g;return g.ifname}function xed_event(g){g=(g)?g:((event)?event:null);if(g){var j=(g.target)?g.target:((g.srcElement)?g.srcElement:null);if(j){j=(j.nodeType==1||j.nodeType==9)?j:j.parentNode;ifname=xed_get_ifname(j);if(g.type=="mousemove"){if(xed_msie){xed_mouse_x=g.clientX-document.body.scrollLeft;xed_mouse_y=g.clientY-document.body.scrollTop}else{xed_mouse_x=g.pageX;xed_mouse_y=g.pageY}}else{if(g.type=="mousedown"&&(g.button==0||g.button==1)){xed_update_path(ifname);if(xed_context_menu){xed_toggle_context_menu(ifname,g)}}else{if(g.type=="mousedown"&&(g.button==2||g.button==3)){xed_update_path(ifname);if(xed_msie){g.cancelBubble=true;g.returnValue=false}else{g.cancelBubble=true;g.returnValue=false;g.preventDefault();g.stopPropagation()}return false}else{if(g.type=="contextmenu"){xed_update_path(ifname);xed_toggle_context_menu(ifname,g);if(xed_msie){g.cancelBubble=true;g.returnValue=false}else{g.cancelBubble=true;g.returnValue=false;g.preventDefault();g.stopPropagation()}return false}else{xed_update_path(ifname);k=g.keyCode;if(!xed_msie&&k==0){k=g.charCode}if(g.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(g.type=="keydown"&&(k==122||k==90)&&g.ctrlKey){if(g.shiftKey){xed_redo(ifname)}else{xed_undo(ifname)}if(xed_msie){g.cancelBubble=true;g.returnValue=false}else{g.cancelBubble=true;g.returnValue=false;g.preventDefault();g.stopPropagation()}return false}}}}}}}}function xed_add_event(j,g,l){if(xed_msie){j.attachEvent("on"+g,l)}else{j.addEventListener(g,l,true)}}function xed_add_events(j,g,l){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(l).contentWindow.document;path_div=document.getElementById("xed-"+l+"-path");path_div.innerHTML="";path_div.style.paddingBottom="0px";path_div.style.marginBottom="0px";path=document.createElement("span");try{path.style.cssFloat="left"}catch(u){path.style.styleFloat="right"}path.style.paddingRight="7px";path.style.paddingBottom="0px";path.style.marginBottom="0px";path.innerHTML="Path: ";if(xed_selected){var C=xed_get_ancestors(l,xed_selected)}else{var C=xed_get_ancestors(l)}var g=null;var q=false;var B=false;for(var m=C.length;--m>=0;){g=C[m];if(!g){continue}if(g.tagName.toLowerCase()=="table"){document.getElementById("xed-"+l+"-table-bar").style.display="block";B=true}if(!q){xed_update_formatblock(l,g.tagName.toLowerCase())}var A=document.createElement("a");A.href="#";A.el=g;A.editor=l;A.onclick=function(){this.blur();xed_select_node_contents(this.editor,this.el);return false};var j=g.tagName.toLowerCase();A.title=g.style.cssText;if(g.id){j+="#"+g.id}if(g.className){j+="."+g.className}A.appendChild(document.createTextNode(j));path.appendChild(A);if(m!=0){path.appendChild(document.createTextNode(" "+String.fromCharCode(187)+" "))}}if(!B){document.getElementById("xed-"+l+"-table-bar").style.display="none"}if(j!="body"){edit=document.createElement("a");edit.href="#";edit.el=g;edit.editor=l;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=g;dele.editor=l;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(j){outer=j.outerHTML;if(typeof(outer)!="undefined"){return outer}outer="<"+j.tagName;if(j.attributes){for(var g in j.attributes){a=j.attributes[g];if(a.value){outer+=" "+a.name+'="'+a.value+'"'}}}outer+=">";outer+=j.innerHTML;outer+="";return outer}function xed_remove_element(l,j){xed_historian(l);new_html="";pn=j.parentNode;if(!pn){return false}len=pn.childNodes.length;if(xed_msie){for(var g in j.parentNode.childNodes){if(g>=len){break}n=j.parentNode.childNodes[g];if(n==j){if(j.tagName.toLowerCase()!="xt:box"&&j.tagName.toLowerCase()!="xt:form"){new_html+=j.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 g=0;g=len){break}n=j.parentNode.childNodes[g];if(n==j){if(j.tagName.toLowerCase()!="xt:box"&&j.tagName.toLowerCase()!="xt:form"){new_html+=j.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 g in j.parentNode.childNodes){if(g>=len){break}n=j.parentNode.childNodes[g];if(n==j){if(j.tagName.toLowerCase()!="xt:box"&&j.tagName.toLowerCase()!="xt:form"){new_html+=j.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}}}}}}}}j.parentNode.innerHTML=new_html}function xed_strip_base_url(g){if(g.indexOf(xed_site_domain+xed_prefix+"/index/")!=-1){arr=g.split(xed_site_domain+xed_prefix+"/index/");return xed_prefix+"/index/"+arr.pop()}if(g.indexOf(xed_site_domain+xed_prefix+"/pix/")!=-1){arr=g.split(xed_site_domain+xed_prefix+"/pix/");return xed_prefix+"/pix/"+arr.pop()}if(xed_msie){if(g.indexOf(xed_site_domain)!=-1){arr=g.split(xed_site_domain);g=arr.pop()}if(g.indexOf("#")===0){return g}if(g.indexOf("http://")===0){return g}else{if(g.indexOf("www.")===0){return"http://"+g}}return g}var l=xed_site_url;l=l.replace(/[^\/]+$/,"");var j=new RegExp(l);g=g.replace(j,"");l=l.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1");j=new RegExp(l);return g.replace(j,"")}function xed_get_html(B,j,u){var q="";switch(B.nodeType){case 1:case 11:var A;var m;var E=(B.nodeType==1)?B.tagName.toLowerCase():"";if(E=="box"||E=="form"){E="xt:"+E}if(xed_msie&&E=="head"){if(j){q+=""}var G=RegExp.multiline;RegExp.multiline=true;var l=B.innerHTML.replace(xed_rx_tag_name,function(J,I,H){return I+H.toLowerCase()});RegExp.multiline=G;q+=l;if(j){q+=""}break}else{if(j){A=(!(B.hasChildNodes()||xed_needs_closing_tag(B)));q="<"+E;var F=B.attributes;for(m=0;m":">";if(E=="br"){q+="\n"}}}for(m=B.firstChild;m;m=m.nextSibling){q+=xed_get_html(m,true,u)}if(j&&!A){q+="";if(xed_is_block_tag(E)){q+="\n"}}break;case 3:if(!B.previousSibling&&!B.nextSibling&&B.data.match(/^\s*$/i)){q=" "}else{q=xed_html_entities(B.data)}break;case 8:q="";break}q=q.replace(/\n\n+/g,"\n\n");return q}function xed_get_source(g){if(xed_edit_state=="edit"){return xed_get_html(document.getElementById(g).contentWindow.document.body,false,false)}return document.getElementById("xed-"+g+"-source").value}function xed_get_anchors(g){html=xed_get_source(g);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(g){re=/&/g;g=g.replace(re,"&");re=//g;g=g.replace(re,">");return g}function xed_html_entities_decode(g){orig=g;re=/"/g;g=g.replace(re,'"');re=/</g;g=g.replace(re,"<");re=/>/g;g=g.replace(re,">");re=/&/g;g=g.replace(re,"&");return g}function xed_url_encode(g){return escape(g)}function xed_parse_uri(g){el=new Object;tmp=g.split("?");el.box=tmp[0];el.args=new Array();if(tmp.length>1){tmp=tmp[1].split("&");for(i=0;i"+g;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 d3f5a30f..819591f9 100644
    --- a/inc/app/xed/js/xed.js
    +++ b/inc/app/xed/js/xed.js
    @@ -1570,14 +1570,7 @@ function xed_charmap (ifname) {
     
     function xed_insert_character (ifname, n) {
     	xed_historian (ifname);
    -	if (document.all) {
    -		sel = document.getElementById (ifname).contentWindow.document.selection;
    -		range = sel.createRange ();
    -		range.cutHTML;
    -		range.pasteHTML ('&#' + n + ';');
    -	} else {
     		xed_insert_html_at_selection (ifname, '&#' + n + ';');
    -	}
     	document.getElementById (ifname).contentWindow.focus ();
     	return false;
     }