function edShowExtraCookie(){var a=document.cookie.split(";");for(var b=0;b'+prompt("Enter the name of the source","")+")";edInsertContent(a,b)}}function countInstances(a,b){var c=a.split(b);return c.length-1}function edInsertFootnote(a){myField=document.getElementById(a);var b=prompt("Enter the footnote:","");if(!b||b==""){return false}var c=new Date;var d="fn"+c.getTime();var e=myField.value.indexOf('
    ');if(e!=-1){var f=myField.value.substring(0,e);var g=myField.value.substring(e,myField.value.length);var h=countInstances(g,'
  1. '+h+"";edInsertContent(a,h);if(e!=-1){f=myField.value.substring(0,e+h.length);g=myField.value.substring(e+h.length,myField.value.length)}else{var f=myField.value;var g="\n\n"+'
      '+"\n"+"
    "+"\n"}var i='\t
  2. '+b+' [back]
  3. '+"\n"+"
";myField.value=f+g.replace("",i)}function edInsertImage(a){myField=document.getElementById(a);var b=prompt("Enter the URL of the image","http://");if(b){b=''+prompt(';edInsertContent(a,b)}}function edInsertExtLink(a,b,c){myField=document.getElementById(a);if(!c){c="http://"}if(!edCheckOpenTags(a,b)){var d=prompt("Enter the URL",c);if(d){edButtons[b].tagStart='';edInsertTag(a,b)}}else{edInsertTag(a,b)}}function edInsertLink(a,b,c){myField=document.getElementById(a);if(!c){c="http://"}if(!edCheckOpenTags(a,b)){var d=prompt("Enter the URL",c);if(d){edButtons[b].tagStart='';edInsertTag(a,b)}}else{edInsertTag(a,b)}}function edInsertContent(a,b){myField=document.getElementById(a);if(document.selection){myField.focus();sel=document.selection.createRange();sel.text=b;myField.focus()}else if(myField.selectionStart||myField.selectionStart=="0"){var c=myField.selectionStart;var d=myField.selectionEnd;var e=myField.scrollTop;myField.value=myField.value.substring(0,c)+b+myField.value.substring(d,myField.value.length);myField.focus();myField.selectionStart=c+b.length;myField.selectionEnd=c+b.length;myField.scrollTop=e}else{myField.value+=b;myField.focus()}}function edInsertTag(a,b){myField=document.getElementById(a);if(document.selection){myField.focus();sel=document.selection.createRange();if(sel.text.length>0){sel.text=edButtons[b].tagStart+sel.text+edButtons[b].tagEnd}else{if(!edCheckOpenTags(a,b)||edButtons[b].tagEnd==""){sel.text=edButtons[b].tagStart;edAddTag(a,b)}else{sel.text=edButtons[b].tagEnd;edRemoveTag(a,b)}}myField.focus()}else if(myField.selectionStart||myField.selectionStart=="0"){var c=myField.selectionStart;var d=myField.selectionEnd;var e=d;var f=myField.scrollTop;if(c!=d){myField.value=myField.value.substring(0,c)+edButtons[b].tagStart+myField.value.substring(c,d)+edButtons[b].tagEnd+myField.value.substring(d,myField.value.length);e+=edButtons[b].tagStart.length+edButtons[b].tagEnd.length}else{if(!edCheckOpenTags(a,b)||edButtons[b].tagEnd==""){myField.value=myField.value.substring(0,c)+edButtons[b].tagStart+myField.value.substring(d,myField.value.length);edAddTag(a,b);e=c+edButtons[b].tagStart.length}else{myField.value=myField.value.substring(0,c)+edButtons[b].tagEnd+myField.value.substring(d,myField.value.length);edRemoveTag(a,b);e=c+edButtons[b].tagEnd.length}}myField.focus();myField.selectionStart=e;myField.selectionEnd=e;myField.scrollTop=f}else{if(!edCheckOpenTags(a,b)||edButtons[b].tagEnd==""){myField.value+=edButtons[b].tagStart;edAddTag(a,b)}else{myField.value+=edButtons[b].tagEnd;edRemoveTag(a,b)}myField.focus()}}function edHideExtra(a){document.getElementById("ed_extra_buttons_"+a).style.display="none";document.getElementById("ed_extra_show_"+a).style.visibility="visible";edSetCookie("js_quicktags_extra","hide",new Date("December 31, 2100"))}function edShowExtra(a){document.getElementById("ed_extra_show_"+a).style.visibility="hidden";document.getElementById("ed_extra_buttons_"+a).style.display="block";edSetCookie("js_quicktags_extra","show",new Date("December 31, 2100"))}function edToolbar(a){document.write('
');for(i=0;i'+'')}else{document.write(''+'')}for(i=extendedStart;i");document.write("
");edOpenTags[a]=new Array}function edSpell(a){myField=document.getElementById(a);var b="";if(document.selection){myField.focus();var c=document.selection.createRange();if(c.text.length>0){b=c.text}}else if(myField.selectionStart||myField.selectionStart=="0"){var d=myField.selectionStart;var e=myField.selectionEnd;if(d!=e){b=myField.value.substring(d,e)}}if(b==""){b=prompt("Enter a word to look up:","")}if(b!=""){window.open(dictionaryUrl+escape(b))}}function edQuickLink(a,b){if(a>-1){var c="";if(edLinks[a].newWin==1){c=' target="_blank"'}var d='
"+edLinks[a].display+"";b.selectedIndex=0;edInsertContent(edCanvas,d)}else{b.selectedIndex=0}}function edCloseAllTags(a){var b=edOpenTags[a].length;for(o=0;o0){return true}else{return false}}function edRemoveTag(a,b){for(i=0;i'+edLinks[i].display+""}a+="";document.write(a)}function edShowButton(a,b,c){if(b.access){var d=' accesskey = "'+b.access+'"'}else{var d=""}switch(b.id){case"ed_img":document.write('');break;case"ed_link":document.write('');break;case"ed_ext_link":document.write('');break;case"ed_footnote":document.write('');break;case"ed_via":document.write('');break;default:document.write('');break}}function edLink(a,b,c){this.display=a;this.URL=b;if(!c){c=0}this.newWin=c}function edButton(a,b,c,d,e,f){this.id=a;this.display=b;this.tagStart=c;this.tagEnd=d;this.access=e;this.open=f}var dictionaryUrl="http://www.ninjawords.com/";var edButtons=new Array;var edLinks=new Array;var edOpenTags=new Array;edButtons.push(new edButton("ed_bold","B","","","b"));edButtons.push(new edButton("ed_italic","I","","","i"));edButtons.push(new edButton("ed_link","Link","","","a"));edButtons.push(new edButton("ed_block","B-QUOTE","
","
","q"));edButtons.push(new edButton("ed_img","IMG","","","m",-1));edButtons.push(new edButton("ed_ul","UL","
    \n","
\n\n","u"));edButtons.push(new edButton("ed_ol","OL","
    \n","
\n\n","o"));edButtons.push(new edButton("ed_li","LI","\t
  • ","
  • \n","l"));edButtons.push(new edButton("ed_code","CODE","","","c"));var extendedStart=edButtons.length;edLinks[edLinks.length]=new edLink("alexking.org","http://www.alexking.org/")