/**********************************************************************
	Version: FreeRichTextEditor.com Public Beta 0.9.5.
	License: http://creativecommons.org/licenses/by/2.5/
	Description: Configuration File.
	Author: Copyright (C) 2006  Steven Ewing
**********************************************************************/

function rteGetOffsetTop(elm) { var mOffsetTop = elm.offsetTop; var mOffsetParent = elm.offsetParent; while(mOffsetParent) { mOffsetTop += mOffsetParent.offsetTop; mOffsetParent = mOffsetParent.offsetParent;}
return mOffsetTop;}; function rteGetOffsetLeft(elm) { var mOffsetLeft = elm.offsetLeft; var mOffsetParent = elm.offsetParent; while(mOffsetParent) { mOffsetLeft += mOffsetParent.offsetLeft; mOffsetParent = mOffsetParent.offsetParent;}
return mOffsetLeft;}; function rteHideMenus() { rteMouseOutFormatMenu(); document.getElementById("format3").style.display = "none"; rteMouseOutFontFaceMenu(); document.getElementById("fontface3").style.display = "none"; rteMouseOutFontSizeMenu(); document.getElementById("fontsize3").style.display = "none"; rteMouseOutFontColorMenu(); document.getElementById("fontcolor3").style.display = "none";}; function rteColorClick(hexcolor) { rteHideMenus(); document.getElementById(rteName).contentWindow.document.execCommand("forecolor", false, hexcolor); document.getElementById("fontcolor4").style.backgroundColor = hexcolor;}; function rteMouseOverMenuFontColorContents() { this.className = "rtedropdown14";}; function rteMouseOutMenuFontColorContents() { this.className = "rtedropdown13";}; function rteMouseOverMenuContents() { this.style.color = "#FFFFFF"; this.style.backgroundColor = "#316AC5"; document.getElementById(rteName).contentWindow.focus();}; function rteMouseOutMenuContents() { this.style.color = "#000000"; this.style.backgroundColor = "#FFFFFF";}; function rteMouseDownMenuContents() { if (this.innerHTML == "Header 1") { document.getElementById(rteName).contentWindow.document.execCommand("formatblock", false, "<h1>"); document.getElementById("format1").innerHTML = "Header 1";} else if (this.innerHTML == "Header 2") { document.getElementById(rteName).contentWindow.document.execCommand("formatblock", false, "<h2>"); document.getElementById("format1").innerHTML = "Header 2";} else if (this.innerHTML == "Header 3") { document.getElementById(rteName).contentWindow.document.execCommand("formatblock", false, "<h3>"); document.getElementById("format1").innerHTML = "Header 3";} else if (this.innerHTML == "Header 4") { document.getElementById(rteName).contentWindow.document.execCommand("formatblock", false, "<h4>"); document.getElementById("format1").innerHTML = "Header 4";} else if (this.innerHTML == "Header 5") { document.getElementById(rteName).contentWindow.document.execCommand("formatblock", false, "<h5>"); document.getElementById("format1").innerHTML = "Header 5";} else if (this.innerHTML == "Header 6") { document.getElementById(rteName).contentWindow.document.execCommand("formatblock", false, "<h6>"); document.getElementById("format1").innerHTML = "Header 6";} else if (this.innerHTML == "Paragraph") { document.getElementById(rteName).contentWindow.document.execCommand("formatblock", false, "<p>"); document.getElementById("format1").innerHTML = "Paragraph";} else if (this.innerHTML == "Arial") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "arial"); document.getElementById("fontface1").innerHTML = "Arial";} else if (this.innerHTML == "Arial Black") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "arial black"); document.getElementById("fontface1").innerHTML = "Arial Black";} else if (this.innerHTML == "Arial Narrow") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "arial narrow"); document.getElementById("fontface1").innerHTML = "Arial Narrow";} else if (this.innerHTML == "Courier New") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "courier new"); document.getElementById("fontface1").innerHTML = "Courier New";} else if (this.innerHTML == "Century Gothic") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "century gothic"); document.getElementById("fontface1").innerHTML = "Century Gothic";} else if (this.innerHTML == "Comic Sans MS") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "comic sans ms"); document.getElementById("fontface1").innerHTML = "Comic Sans MS";} else if (this.innerHTML == "Impact") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "impact"); document.getElementById("fontface1").innerHTML = "Impact";} else if (this.innerHTML == "Tahoma") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "tahoma"); document.getElementById("fontface1").innerHTML = "Tahoma";} else if (this.innerHTML == "Times New Roman") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "times new roman"); document.getElementById("fontface1").innerHTML = "Times New Roman";} else if (this.innerHTML == "Trebuchet MS") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "trebuchet ms"); document.getElementById("fontface1").innerHTML = "Trebuchet MS";} else if (this.innerHTML == "Verdana") { document.getElementById(rteName).contentWindow.document.execCommand("fontname", false, "verdana"); document.getElementById("fontface1").innerHTML = "Verdana";} else if (this.innerHTML == "1") { document.getElementById(rteName).contentWindow.document.execCommand("fontsize", false, "1"); document.getElementById("fontsize1").innerHTML = "1";} else if (this.innerHTML == "2") { document.getElementById(rteName).contentWindow.document.execCommand("fontsize", false, "2"); document.getElementById("fontsize1").innerHTML = "2";} else if (this.innerHTML == "3") { document.getElementById(rteName).contentWindow.document.execCommand("fontsize", false, "3"); document.getElementById("fontsize1").innerHTML = "3";} else if (this.innerHTML == "4") { document.getElementById(rteName).contentWindow.document.execCommand("fontsize", false, "4"); document.getElementById("fontsize1").innerHTML = "4";} else if (this.innerHTML == "5") { document.getElementById(rteName).contentWindow.document.execCommand("fontsize", false, "5"); document.getElementById("fontsize1").innerHTML = "5";} else if (this.innerHTML == "6") { document.getElementById(rteName).contentWindow.document.execCommand("fontsize", false, "6"); document.getElementById("fontsize1").innerHTML = "6";} else if (this.innerHTML == "7") { document.getElementById(rteName).contentWindow.document.execCommand("fontsize", false, "7"); document.getElementById("fontsize1").innerHTML = "7";}
this.style.color = "#000000"; this.style.backgroundColor = "#FFFFFF"; rteHideMenus();}; function rteMouseOverFormatMenu() { document.getElementById("format1").className = "rtedropdown4"; document.getElementById("format2").className = "rtedropdown5";}; function rteMouseDownFormatMenu() { rteHideMenus(); document.getElementById("format1").className = "rtedropdown4"; document.getElementById("format2").className = "rtedropdown6"; document.getElementById("format1").style.left = rteGetOffsetLeft(document.getElementById("format1")); document.getElementById("format1").style.top = rteGetOffsetTop(document.getElementById("format1")) + document.getElementById("format1").offsetHeight; document.getElementById("format3").style.display = (document.getElementById("format3").style.display == "none" ) ? "" : "none"; var kids = document.getElementsByTagName('DIV'); for (var i=0; i < kids.length; i++) { if (kids[i].id == "format1" || kids[i].id == "format2") { kids[i].onmouseout = rteMouseDownFormatMenu;} else if (kids[i].id == "fontface1" || kids[i].id == "fontface2") { kids[i].onmouseout = rteMouseOutFontFaceMenu;} else if (kids[i].id == "fontsize1" || kids[i].id == "fontsize2") { kids[i].onmouseout = rteMouseOutFontSizeMenu;} else if (kids[i].id == "fontcolor1" || kids[i].id == "fontcolor2") { kids[i].onmouseout = rteMouseOutFontColorMenu;}
}
}; function rteMouseOutFormatMenu() { document.getElementById("format1").className = "rtedropdown1"; document.getElementById("format2").className = "rtedropdown2";}; function rteMouseOverFontFaceMenu() { document.getElementById("fontface1").className = "rtedropdown4"; document.getElementById("fontface2").className = "rtedropdown5";}; function rteMouseDownFontFaceMenu() { rteHideMenus(); document.getElementById("fontface1").className = "rtedropdown4"; document.getElementById("fontface2").className = "rtedropdown6"; document.getElementById("fontface1").style.left = rteGetOffsetLeft(document.getElementById("fontface1")); document.getElementById("fontface1").style.top = rteGetOffsetTop(document.getElementById("fontface1")) + document.getElementById("fontface1").offsetHeight; document.getElementById("fontface3").style.display = (document.getElementById("fontface3").style.display == "none" ) ? "" : "none"; var kids = document.getElementsByTagName('DIV'); for (var i=0; i < kids.length; i++) { if (kids[i].id == "format1" || kids[i].id == "format2") { kids[i].onmouseout = rteMouseOutFormatMenu;} else if (kids[i].id == "fontface1" || kids[i].id == "fontface2") { kids[i].onmouseout = rteMouseDownFontFaceMenu;} else if (kids[i].id == "fontsize1" || kids[i].id == "fontsize2") { kids[i].onmouseout = rteMouseOutFontSizeMenu;} else if (kids[i].id == "fontcolor1" || kids[i].id == "fontcolor2") { kids[i].onmouseout = rteMouseOutFontColorMenu;}
}
}; function rteMouseOutFontFaceMenu() { document.getElementById("fontface1").className = "rtedropdown1"; document.getElementById("fontface2").className = "rtedropdown2";}; function rteMouseOverFontSizeMenu() { document.getElementById("fontsize1").className = "rtedropdown4"; document.getElementById("fontsize2").className = "rtedropdown5";}; function rteMouseDownFontSizeMenu() { rteHideMenus(); document.getElementById("fontsize1").className = "rtedropdown4"; document.getElementById("fontsize2").className = "rtedropdown6"; document.getElementById("fontsize1").style.left = rteGetOffsetLeft(document.getElementById("fontsize1")); document.getElementById("fontsize1").style.top = rteGetOffsetTop(document.getElementById("fontsize1")) + document.getElementById("fontsize1").offsetHeight; document.getElementById("fontsize3").style.display = (document.getElementById("fontsize3").style.display == "none" ) ? "" : "none"; var kids = document.getElementsByTagName('DIV'); for (var i=0; i < kids.length; i++) { if (kids[i].id == "format1" || kids[i].id == "format2") { kids[i].onmouseout = rteMouseOutFormatMenu;} else if (kids[i].id == "fontface1" || kids[i].id == "fontface2") { kids[i].onmouseout = rteMouseOutFontFaceMenu;} else if (kids[i].id == "fontsize1" || kids[i].id == "fontsize2") { kids[i].onmouseout = rteMouseDownFontSizeMenu;} else if (kids[i].id == "fontcolor1" || kids[i].id == "fontcolor2") { kids[i].onmouseout = rteMouseOutFontColorMenu;}
}
}; function rteMouseOutFontSizeMenu() { document.getElementById("fontsize1").className = "rtedropdown1"; document.getElementById("fontsize2").className = "rtedropdown2";}; function rteMouseOverFontColorMenu() { document.getElementById("fontcolor1").className = "rtedropdown8"; document.getElementById("fontcolor2").className = "rtedropdown5b";}; function rteMouseDownFontColorMenu() { rteHideMenus(); document.getElementById("fontcolor1").className = "rtedropdown12"; document.getElementById("fontcolor2").className = "rtedropdown9b"; document.getElementById("fontcolor1").style.left = rteGetOffsetLeft(document.getElementById("fontcolor1")); document.getElementById("fontcolor1").style.top = rteGetOffsetTop(document.getElementById("fontcolor1")) + document.getElementById("fontcolor1").offsetHeight; document.getElementById("fontcolor3").style.display = (document.getElementById("fontcolor3").style.display == "none" ) ? "" : "none"; var kids = document.getElementsByTagName('DIV'); for (var i=0; i < kids.length; i++) { if (kids[i].id == "format1" || kids[i].id == "format2") { kids[i].onmouseout = rteMouseOutFormatMenu;} else if (kids[i].id == "fontface1" || kids[i].id == "fontface2") { kids[i].onmouseout = rteMouseOutFontFaceMenu;} else if (kids[i].id == "fontsize1" || kids[i].id == "fontsize2") { kids[i].onmouseout = rteMouseOutFontSizeMenu;} else if (kids[i].id == "fontcolor1" || kids[i].id == "fontcolor2") { kids[i].onmouseout = rteMouseDownFontColorMenu;}
}
}; function rteMouseOutFontColorMenu() { document.getElementById("fontcolor1").className = "rtedropdown10"; document.getElementById("fontcolor2").className = "rtedropdown11b";}; function rteBtnMouseUpBottom() { this.className = "rtebtn9";}; function rteBtnMouseOutBottom() { this.className = "rtebtn6";}; function rteBtnMouseOutDownBottom() { this.className = "rtebtn9";}; function rteBtnMouseOverBottom() { this.className = "rtebtn7";}; function rteModeType(id) { if (id == "rte_design_mode") { rteFormHandler2(); document.getElementById(rteName).contentWindow.document.body.innerHTML = document.getElementById(rteFormName).value; document.getElementById("tb1").style.display = ""; document.getElementById("tb2").style.display = ""; document.getElementById("tb3").style.display = ""; document.getElementById(rteFormName).style.display = "none"; document.getElementById(rteName).style.display = ""; document.getElementById("preview_" + rteName).style.display = "none"; document.getElementById(rteName).contentWindow.focus(); return false;} else if (id == "rte_code_mode") { rteFormHandler(); document.getElementById(rteFormName).value = document.getElementById(rteName).contentWindow.document.body.innerHTML; document.getElementById("tb1").style.display = "none"; document.getElementById("tb2").style.display = "none"; document.getElementById("tb3").style.display = "none"; document.getElementById(rteFormName).style.display = ""; document.getElementById(rteName).style.display = "none"; document.getElementById("preview_" + rteName).style.display = "none";} else if (id == "rte_preview_mode") { rteFormHandler(); html = "<div style=\"padding:5px;\">" + document.getElementById(rteFormName).value + "</div>"; document.getElementById('preview_' + rteName).contentWindow.document.open(); document.getElementById('preview_' + rteName).contentWindow.document.write("<html><head><style type=\"text/css\">@import url("+document.getElementById("preview_css").value+");</style></head><body>" + html + "</body></html>"); document.getElementById('preview_' + rteName).contentWindow.document.close(); document.getElementById("tb1").style.display = "none"; document.getElementById("tb2").style.display = "none"; document.getElementById("tb3").style.display = "none"; document.getElementById(rteFormName).style.display = "none"; document.getElementById(rteName).style.display = "none"; document.getElementById("preview_" + rteName).style.display = "";}
}; function rteBtnMouseDownBottom() { var kids = document.getElementsByTagName("DIV"); for (var i=0; i < kids.length; i++) { if(kids[i].className == "rtebtn6" || kids[i].className == "rtebtn7" || kids[i].className == "rtebtn8" || kids[i].className == "rtebtn9"){ kids[i].className = "rtebtn6"; kids[i].onmouseover = rteBtnMouseOverBottom; kids[i].onmouseout = rteBtnMouseOutBottom; kids[i].onmousedown = rteBtnMouseDownBottom; kids[i].onmouseup = rteBtnMouseUpBottom;}
}
this.className = "rtebtn9"; this.onmouseover = rteBtnMouseOverBottom; this.onmouseout = rteBtnMouseOutDownBottom; this.onmouseup = rteBtnMouseUpBottom;}; function rteBtnMouseDown() { var kids = document.getElementsByTagName('DIV'); for (var i=0; i < kids.length; i++) { if (kids[i].className == "rtebtn2" || kids[i].className == "rtebtn3" || kids[i].className == "rtebtn4") { kids[i].className = "rtebtn1";}
}
rteSelection(); this.className = "rtebtn4";}; function rteBtnMouseUp() { this.className = "rtebtn4";}; function rteBtnMouseOut() { this.className = "rtebtn1";}; function rteBtnMouseOver() { this.className = "rtebtn2";}; function rteBtnInsertImage() { window.open(rteHTMLPathInsertImage , "blank","toolbar=no,width=300,height=220");}; function rteBtnEditLink() { window.open(rteHTMLPathEditLink , "blank","toolbar=no,width=250,height=300");}; function rteBtnEditTable() { window.open(rteHTMLPathEditTable , "blank","toolbar=no,width=320,height=210");}; function rteBtnCreateLink() { window.open(rteHTMLPathInsertLink , "blank","toolbar=no,width=250,height=300");}; function rteBtnPrint() { if (document.all)
{ var oFrame = window.frames[rteName]; oFrame.focus(); oFrame.print();}
else
{ var oFrame = document.getElementById(rteName).contentWindow; oFrame.focus(); oFrame.window.print();}
}; function rteInsertHTML(html) { if (document.all) { var oRng = document.getElementById(rteName).contentWindow.document.selection.createRange(); oRng.pasteHTML(html); oRng.collapse(false); oRng.select();} else { document.getElementById(rteName).contentWindow.document.execCommand('insertHTML', false, html);}
}; function rteBtnInsertForm() { 
window.open(rteHTMLPathInsertForm , "blank","toolbar=no,width=320,height=180");}; 
function rteBtnInsertCheckbox() { 
window.open(rteHTMLPathInsertCheckbox , "blank","toolbar=no,width=320,height=150");}; 
function rteBtnInsertRadio() { window.open(rteHTMLPathInsertRadiobutton , "blank","toolbar=no,width=320,height=150");}; 
function rteBtnInsertDropDown() { alert('Not yet supported.');}; 
function rteBtnInsertFlash() { window.open(rteHTMLPathInsertFlash , "blank","toolbar=no,width=350,height=130");}; 
function rteBtnInsertTextArea() { window.open(rteHTMLPathInsertTextArea , "blank","toolbar=no,width=320,height=230");}; 
function rteBtnInsertSubmit() { window.open(rteHTMLPathInsertSubmit , "blank","toolbar=no,width=320,height=130");}; 
function rteBtnInsertImageSubmit() { window.open(rteHTMLPathInsertImageSubmit , "blank","toolbar=no,width=320,height=130");}; 
function rteBtnInsertReset() { window.open(rteHTMLPathInsertReset , "blank","toolbar=no,width=320,height=130");}; 
function rteBtnInsertHidden() { window.open(rteHTMLPathInsertHidden , "blank","toolbar=no,width=320,height=130");}; 
function rteBtnInsertPassword() { window.open(rteHTMLPathInsertPassword , "blank","toolbar=no,width=320,height=150");}; 
function rteBtnInsertText() { window.open(rteHTMLPathInsertText , "blank","toolbar=no,width=320,height=170");}; 
function rteAbout() { 
}
function rteAbout2() { 
msg=window.open("","msg","height=100,width=320"); 
msg.document.write("<style>"); msg.document.write("body, td {"); 
msg.document.write("background-color:#ECE9D8;"); msg.document.write("font-family:arial;"); 
msg.document.write("font-size:11px;"); msg.document.write("}"); 
msg.document.write("input {"); msg.document.write("font-family:arial;"); 
msg.document.write("font-size:11px;"); msg.document.write("}"); 
msg.document.write("select {"); 
msg.document.write("font-family:arial;"); 
msg.document.write("font-size:11px;"); msg.document.write("}"); 
msg.document.write("</style>"); 
msg.document.write("<fieldset>"); 
msg.document.write("<legend><b>About FreeRichTextEditor</b></legend>"); 
msg.document.write("<table width=\"100%\" cellspacing=\"2\" cellpadding=\"0\" border=\"0\">"); 
msg.document.write("<tr>"); 
msg.document.write("<td colspan=\"2\" align=\"center\">Copyright &copy; 2006 Steven Ewing<br><a href=\"http://www.freerichtexteditor.com\" target=\"_blank\">www.FreeRichTextEditor.com</a></td>"); 
msg.document.write("</tr>"); 
msg.document.write("<tr>");
msg.document.write("<td colspan=\"2\" align=\"center\"><input type=\"button\" value=\"License\" onclick=\"window.open('http://www.freerichtexteditor.com/page/5.htm' , 'blank','');\"><input type=\"button\" value=\"Donate\" onclick=\"window.open('http://www.freerichtexteditor.com/page/7.htm' , 'blank','');\"><input type=\"button\" value=\"Download\" onclick=\"window.open('http://www.freerichtexteditor.com/page/4.htm' , 'blank','');\"></td>"); 
msg.document.write("</tr>"); 
msg.document.write("</table>"); 
msg.document.write("</fieldset>"); 
msg.document.close();}; 

function rteBtnInsertTable() { window.open(rteHTMLPathInsertTable , "blank","toolbar=no,width=320,height=240");}; 
function rteBtnInsertTableRowBefore() { if (window.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.window.getSelection().focusNode;}
else if (document.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.getSelection().focusNode;}
else if (document.selection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();}
current_tag = selected_obj; while(current_tag.tagName != "TABLE"){ if (current_tag.tagName == "TR") { cellTotal = current_tag.cells.length; RowIndex = current_tag.rowIndex;}
if (current_tag.parentNode.tagName == "TBODY") { var x=current_tag.parentNode.insertRow(RowIndex); for (i=0; i < cellTotal; i++)
{ var j=x.insertCell(i); j.innerHTML="&nbsp;";}
}
current_tag = current_tag.parentNode;}
}; function rteBtnInsertTableRowAfter() { if (window.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.window.getSelection().focusNode;}
else if (document.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.getSelection().focusNode;}
else if (document.selection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();}
current_tag = selected_obj; while(current_tag.tagName != "TABLE"){ if (current_tag.tagName == "TR") { cellTotal = current_tag.cells.length; RowIndex = current_tag.rowIndex;}
if (current_tag.parentNode.tagName == "TBODY") { var x=current_tag.parentNode.insertRow(RowIndex+1); for (i=0; i < cellTotal; i++)
{ var j=x.insertCell(i); j.innerHTML="&nbsp;";}
}
current_tag = current_tag.parentNode;}
}; function rteBtnInsertTableColumnBefore() { if (window.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.window.getSelection().focusNode;}
else if (document.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.getSelection().focusNode;}
else if (document.selection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();}
current_tag = selected_obj; while(current_tag.tagName != "TABLE"){ if (current_tag.tagName == "TD") { cellIndex = current_tag.cellIndex;}
if (current_tag.tagName == "TBODY") { RowTotal = current_tag.parentNode.rows.length; var x=current_tag.parentNode; for (i=0; i < RowTotal; i++)
{ var j=x.rows[i].insertCell(cellIndex); j.innerHTML="&nbsp;";}
}
current_tag = current_tag.parentNode;}
}; function rteBtnInsertTableColumnAfter() { if (window.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.window.getSelection().focusNode;}
else if (document.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.getSelection().focusNode;}
else if (document.selection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();}
current_tag = selected_obj; while(current_tag.tagName != "TABLE"){ if (current_tag.tagName == "TD") { cellIndex = current_tag.cellIndex;}
if (current_tag.tagName == "TBODY") { RowTotal = current_tag.parentNode.rows.length; var x=current_tag.parentNode; for (i=0; i < RowTotal; i++)
{ var j=x.rows[i].insertCell(cellIndex+1); j.innerHTML="&nbsp;";}
}
current_tag = current_tag.parentNode;}
}; function rteBtnDeleteTableColumn() { if (window.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.window.getSelection().focusNode;}
else if (document.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.getSelection().focusNode;}
else if (document.selection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();}
current_tag = selected_obj; while(current_tag.tagName != "TABLE"){ if (current_tag.tagName == "TD") { cellIndex = current_tag.cellIndex;}
if (current_tag.tagName == "TBODY") { RowTotal = current_tag.parentNode.rows.length; var x=current_tag.parentNode; for(i=0; i < RowTotal; i++ ) { j=x.rows[i].deleteCell(cellIndex);}
}
current_tag = current_tag.parentNode;}
}; function rteBtnDeleteTableRow() { if (window.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.window.getSelection().focusNode;}
else if (document.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.getSelection().focusNode;}
else if (document.selection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();}
current_tag = selected_obj; while(current_tag.tagName != "TABLE"){ if (current_tag.tagName == "TR") { RowIndex = current_tag.rowIndex;}
if (current_tag.tagName == "TBODY") { RowTotal = current_tag.parentNode.rows.length; var x=current_tag.parentNode; x.deleteRow(RowIndex);}
current_tag = current_tag.parentNode;}
}; function rteAction(ID) { rteHideMenus(); if (this.id != "editlink" && this.id != "insertflash"&& this.id != "edittable" && this.id != "createlink" && this.id != "insertimage" && this.id != "inserttable" && this.id != "insertrowbelow" && this.id != "insertrowabove" && this.id != "insertcolumnleft" && this.id != "insertcolumnright" && this.id != "deletecolumn" && this.id != "deleterow" && this.id != "insertform" && this.id != "form_checkbox" && this.id != "form_radio" && this.id != "form_dropdown" && this.id != "form_textarea" && this.id != "form_submit" && this.id != "form_image_submit" && this.id != "form_reset" && this.id != "form_hidden" && this.id != "form_password" && this.id != "form_textfield" && this.id != "spellcheck" && this.id != "printrte" && this.id != "aboutrte") { document.getElementById(rteName).contentWindow.document.execCommand(this.id, false, null); document.getElementById(this.id).className = "rtebtn4"; document.getElementById(this.id).onmouseout = rteBtnMouseDown; document.getElementById(rteName).contentWindow.focus();}
}; function startRTE(rtePreloadContent) { rteCSS = document.getElementById("preview_css").value; var kids = document.getElementsByTagName("FORM"); for (var i=0; i < kids.length; i++) { kids[i].onsubmit = rteFormHandler;}
document.getElementById(rteName).contentWindow.document.designMode = "on"; document.getElementById(rteFormName).value = rtePreloadContent; document.getElementById(rteName).contentWindow.document.open(); document.getElementById(rteName).contentWindow.document.write("<html><head><style type=\"text/css\">@import url("+rteCSS+");</style></head><body>" + rtePreloadContent + "</body></html>"); document.getElementById(rteName).contentWindow.document.close(); if (document.all && !window.opera) { document.getElementById(rteName).contentWindow.document.attachEvent("onkeypress", rteSelection); document.getElementById(rteName).contentWindow.document.attachEvent("onclick", rteSelection); document.getElementById(rteName).contentWindow.document.attachEvent("onmouseup", rteSelection);} else { document.getElementById(rteName).contentWindow.document.execCommand("useCSS", false, null); document.getElementById(rteName).contentWindow.document.addEventListener("keypress", rteSelection, true); document.getElementById(rteName).contentWindow.document.addEventListener("click", rteSelection, true); document.getElementById(rteName).contentWindow.document.addEventListener("mouseup", rteSelection, true);}
rteSelection(); var kids = document.getElementsByTagName("DIV"); for (var i=0; i < kids.length; i++) { if(kids[i].className == "rtebtn6"){ kids[i].onmouseover = rteBtnMouseOverBottom; kids[i].onmouseout = rteBtnMouseOutBottom; kids[i].onmousedown = rteBtnMouseDownBottom; kids[i].onmouseup = rteBtnMouseUpBottom;}
}
}; function rteFormHandler() { if (document.getElementById(rteFormName).style.display == "")
{ var newHTML = document.getElementById(rteFormName).value;}
else
{ var newHTML = document.getElementById(rteName).contentWindow.document.body.innerHTML;}
pattern = /<div[^>]*border: 1px dotted red[^>]*>.*<\/form><\/div>/gi; matchesArray = newHTML.match(pattern); if (matchesArray != null)
{ for (i=0; i<matchesArray.length; i++){ pattern2 = /<div[^>]*border: 1px dotted red[^>]*>/gi; pattern3 = /<\/div>/gi; replacement = matchesArray[i]; replacement = replacement.replace(pattern2, ""); replacement = replacement.replace(pattern3, ""); if (document.getElementById(rteFormName).style.display == "")
{ newHTML = document.getElementById(rteFormName).value.replace(matchesArray[i], replacement);}
else
{ newHTML = document.getElementById(rteName).contentWindow.document.body.innerHTML.replace(matchesArray[i], replacement);}
}
}
pattern = /<table[^>]*class=\"rte_tbl\"[^>]*>/gi; matchesArray = newHTML.match(pattern); if (matchesArray != null)
{ for (i=0; i<matchesArray.length; i++){ pattern2 = /class=\"rte_tbl\"/gi; replacement = matchesArray[i]; replacement = replacement.replace(pattern2, ""); newHTML = newHTML.replace(matchesArray[i], replacement);}
}
document.getElementById(rteFormName).value = newHTML; document.getElementById(rteName).contentWindow.document.body.innerHTML = newHTML;}; function rteFormHandler2() { if (document.getElementById(rteFormName).style.display == "")
{ var newHTML = document.getElementById(rteFormName).value;}
else
{ var newHTML = document.getElementById(rteName).contentWindow.document.body.innerHTML;}
pattern = /<form[^>]*>[^<]*<\/form>/gi; matchesArray = newHTML.match(pattern); if (matchesArray != null)
{ for (i=0; i<matchesArray.length; i++){ replacement = matchesArray[i]; replacement = replacement.replace(matchesArray[i], "<div style=\"border: 1px dotted red;\">" + matchesArray[i] + "</div>"); if (document.getElementById(rteFormName).style.display == "")
{ newHTML = document.getElementById(rteFormName).value.replace(matchesArray[i], replacement);}
else
{ newHTML = document.getElementById(rteName).contentWindow.document.body.innerHTML.replace(matchesArray[i], replacement);}
}
}
pattern = /<table[^>]*border=\"0\"[^>]*>/gi; matchesArray = newHTML.match(pattern); if (matchesArray != null)
{ for (i=0; i<matchesArray.length; i++){ pattern2 = /border=\"0\"/gi; replacement = matchesArray[i]; replacement = replacement.replace(pattern2, "border=\"0\" class=\"rte_tbl\""); newHTML = newHTML.replace(matchesArray[i], replacement);}
}
if (document.getElementById(rteFormName).style.display == "")
{ document.getElementById(rteFormName).value = newHTML;}
else
{ document.getElementById(rteName).contentWindow.document.body.innerHTML = newHTML;}
}; function rteSelection() { rteHideMenus(); if (document.getElementById("rte_code_mode").className == "rtebtn9")
{ document.getElementById("tb1").style.display = "none"; document.getElementById("tb2").style.display = "none"; document.getElementById("tb3").style.display = "none";} else { document.getElementById("format1").innerHTML = "Paragraph"; document.getElementById("fontface1").innerHTML = "Verdana"; document.getElementById("fontsize1").innerHTML = "2"; var kids = document.getElementsByTagName('DIV'); for (var i=0; i < kids.length; i++) { switch(kids[i].className)
{ case "rtebtn1":
if (kids[i].onmouseover != rteBtnMouseOver)
{ kids[i].onmouseover = rteBtnMouseOver;}
if (kids[i].onclick != rteAction)
{ kids[i].onclick = rteAction;}
if (kids[i].className == "rtebtn4") { if (kids[i].onmouseout != rteBtnMouseDown)
{ kids[i].onmouseout = rteBtnMouseDown;}
} else { if (kids[i].onmouseout != rteBtnMouseOut)
{ kids[i].onmouseout = rteBtnMouseOut;}
}
if (kids[i].onmousedown != rteBtnMouseDown)
{ kids[i].onmousedown = rteBtnMouseDown;}
if (kids[i].onmouseup != rteBtnMouseUp)
{ kids[i].onmouseup = rteBtnMouseUp;}
break; case "rtebtn2":
kids[i].className = "rtebtn1"; if (kids[i].onmouseover != rteBtnMouseOver)
{ kids[i].onmouseover = rteBtnMouseOver;}
if (kids[i].onclick != rteAction)
{ kids[i].onclick = rteAction;}
if (kids[i].className == "rtebtn4") { if (kids[i].onmouseout = rteBtnMouseDown)
{ kids[i].onmouseout = rteBtnMouseDown;}
} else { if (kids[i].onmouseout != rteBtnMouseOut)
{ kids[i].onmouseout = rteBtnMouseOut;}
}
if (kids[i].onmousedown != rteBtnMouseDown)
{ kids[i].onmousedown = rteBtnMouseDown;}
if (kids[i].onmouseup != rteBtnMouseUp)
{ kids[i].onmouseup = rteBtnMouseUp;}
break; case "rtebtn3":
kids[i].className = "rtebtn1"; if (kids[i].onmouseover != rteBtnMouseOver)
{ kids[i].onmouseover = rteBtnMouseOver;}
if (kids[i].onclick != rteAction)
{ kids[i].onclick = rteAction;}
if (kids[i].className == "rtebtn4") { if (kids[i].onmouseout != rteBtnMouseDown)
{ kids[i].onmouseout = rteBtnMouseDown;}
} else { if (kids[i].onmouseout != rteBtnMouseOut)
{ kids[i].onmouseout = rteBtnMouseOut;}
}
if (kids[i].onmousedown != rteBtnMouseDown)
{ kids[i].onmousedown = rteBtnMouseDown;}
if (kids[i].onmouseup != rteBtnMouseUp)
{ kids[i].onmouseup = rteBtnMouseUp;}
break; case "rtebtn4":
kids[i].className = "rtebtn1"; if (kids[i].onmouseover != rteBtnMouseOver)
{ kids[i].onmouseover = rteBtnMouseOver;}
if (kids[i].onclick != rteAction)
{ kids[i].onclick = rteAction;}
if (kids[i].onmouseout != rteBtnMouseOut)
{ kids[i].onmouseout = rteBtnMouseOut;}
if (kids[i].onmousedown != rteBtnMouseDown)
{ kids[i].onmousedown = rteBtnMouseDown;}
if (kids[i].onmouseup != rteBtnMouseUp)
{ kids[i].onmouseup = rteBtnMouseUp;}
break;}
switch(kids[i].id)
{ case "format1":
if (kids[i].onmouseover != rteMouseOverFormatMenu)
{ kids[i].onmouseover = rteMouseOverFormatMenu;}
if (kids[i].onmousedown != rteMouseDownFormatMenu)
{ kids[i].onmousedown = rteMouseDownFormatMenu;}
if (kids[i].onmouseout != rteMouseOutFormatMenu)
{ kids[i].onmouseout = rteMouseOutFormatMenu;}
if (kids[i].className == "rtedropdown6") { if (kids[i].onmouseout != rteMouseDownFormatMenu)
{ kids[i].onmouseout = rteMouseDownFormatMenu;}
} else { if (kids[i].onmouseout != rteMouseOutFormatMenu)
{ kids[i].onmouseout = rteMouseOutFormatMenu;}
}
break; case "format2":
if (kids[i].onmouseover != rteMouseOverFormatMenu)
{ kids[i].onmouseover = rteMouseOverFormatMenu;}
if (kids[i].onmousedown != rteMouseDownFormatMenu)
{ kids[i].onmousedown = rteMouseDownFormatMenu;}
if (kids[i].onmouseout != rteMouseOutFormatMenu)
{ kids[i].onmouseout = rteMouseOutFormatMenu;}
if (kids[i].className == "rtedropdown6") { kids[i].onmouseout = rteMouseDownFormatMenu;} else { kids[i].onmouseout = rteMouseOutFormatMenu;}
break; case "fontface1":
if (kids[i].onmouseover != rteMouseOverFontFaceMenu)
{ kids[i].onmouseover = rteMouseOverFontFaceMenu;}
if (kids[i].onmousedown != rteMouseDownFontFaceMenu)
{ kids[i].onmousedown = rteMouseDownFontFaceMenu;}
if (kids[i].onmouseout != rteMouseOutFontFaceMenu)
{ kids[i].onmouseout = rteMouseOutFontFaceMenu;}
if (kids[i].className == "rtedropdown6") { if (kids[i].onmouseout != rteMouseDownFontFaceMenu)
{ kids[i].onmouseout = rteMouseDownFontFaceMenu;}
} else { if (kids[i].onmouseout != rteMouseOutFontFaceMenu)
{ kids[i].onmouseout = rteMouseOutFontFaceMenu;}
}
break; case "fontface2":
if (kids[i].onmouseover != rteMouseOverFontFaceMenu)
{ kids[i].onmouseover = rteMouseOverFontFaceMenu;}
if (kids[i].onmousedown != rteMouseDownFontFaceMenu)
{ kids[i].onmousedown = rteMouseDownFontFaceMenu;}
if (kids[i].onmouseout != rteMouseOutFontFaceMenu)
{ kids[i].onmouseout = rteMouseOutFontFaceMenu;}
if (kids[i].className == "rtedropdown6") { if (kids[i].onmouseout != rteMouseDownFontFaceMenu)
{ kids[i].onmouseout = rteMouseDownFontFaceMenu;}
} else { if (kids[i].onmouseout != rteMouseOutFontFaceMenu)
{ kids[i].onmouseout = rteMouseOutFontFaceMenu;}
}
break; case "fontsize1":
if (kids[i].onmouseover != rteMouseOverFontSizeMenu)
{ kids[i].onmouseover = rteMouseOverFontSizeMenu;}
if (kids[i].onmousedown != rteMouseDownFontSizeMenu)
{ kids[i].onmousedown = rteMouseDownFontSizeMenu;}
if (kids[i].onmouseout != rteMouseOutFontSizeMenu)
{ kids[i].onmouseout = rteMouseOutFontSizeMenu;}
if (kids[i].className == "rtedropdown6") { if (kids[i].onmouseout != rteMouseDownFontSizeMenu)
{ kids[i].onmouseout = rteMouseDownFontSizeMenu;}
} else { if (kids[i].onmouseout != rteMouseOutFontSizeMenu)
{ kids[i].onmouseout = rteMouseOutFontSizeMenu;}
}
break; case "fontsize2":
if (kids[i].onmouseover != rteMouseOverFontSizeMenu)
{ kids[i].onmouseover = rteMouseOverFontSizeMenu;}
if (kids[i].onmousedown != rteMouseDownFontSizeMenu)
{ kids[i].onmousedown = rteMouseDownFontSizeMenu;}
if (kids[i].onmouseout != rteMouseOutFontSizeMenu)
{ kids[i].onmouseout = rteMouseOutFontSizeMenu;}
if (kids[i].className == "rtedropdown6") { if (kids[i].onmouseout != rteMouseDownFontSizeMenu)
{ kids[i].onmouseout = rteMouseDownFontSizeMenu;}
} else { if (kids[i].onmouseout != rteMouseOutFontSizeMenu)
{ kids[i].onmouseout = rteMouseOutFontSizeMenu;}
}
break; case "fontcolor1":
if (kids[i].onmouseover != rteMouseOverFontColorMenu)
{ kids[i].onmouseover = rteMouseOverFontColorMenu;}
if (kids[i].onmousedown != rteMouseDownFontColorMenu)
{ kids[i].onmousedown = rteMouseDownFontColorMenu;}
if (kids[i].onmouseout != rteMouseOutFontColorMenu)
{ kids[i].onmouseout = rteMouseOutFontColorMenu;}
if (kids[i].className == "rtedropdown9") { if (kids[i].onmouseout != rteMouseDownFontColorMenu)
{ kids[i].onmouseout = rteMouseDownFontColorMenu;}
} else { if (kids[i].onmouseout != rteMouseOutFontColorMenu)
{ kids[i].onmouseout = rteMouseOutFontColorMenu;}
}
break; case "fontcolor2":
if (kids[i].onmouseover != rteMouseOverFontColorMenu)
{ kids[i].onmouseover = rteMouseOverFontColorMenu;}
if (kids[i].onmousedown != rteMouseDownFontColorMenu)
{ kids[i].onmousedown = rteMouseDownFontColorMenu;}
if (kids[i].onmouseout != rteMouseOutFontColorMenu)
{ kids[i].onmouseout = rteMouseOutFontColorMenu;}
if (kids[i].className == "rtedropdown9") { if (kids[i].onmouseout != rteMouseDownFontColorMenu)
{ kids[i].onmouseout = rteMouseDownFontColorMenu;}
} else { if (kids[i].onmouseout != rteMouseOutFontColorMenu)
{ kids[i].onmouseout = rteMouseOutFontColorMenu;}
}
break; case "formatblock":
if (kids[i].onmouseover != rteMouseOverMenuContents)
{ kids[i].onmouseover = rteMouseOverMenuContents;}
if (kids[i].onmouseout != rteMouseOutMenuContents)
{ kids[i].onmouseout = rteMouseOutMenuContents;}
if (kids[i].onmousedown != rteMouseDownMenuContents)
{ kids[i].onmousedown = rteMouseDownMenuContents;}
break; case "fontface":
if (kids[i].onmouseover != rteMouseOverMenuContents)
{ kids[i].onmouseover = rteMouseOverMenuContents;}
if (kids[i].onmouseout != rteMouseOutMenuContents)
{ kids[i].onmouseout = rteMouseOutMenuContents;}
if (kids[i].onmousedown != rteMouseDownMenuContents)
{ kids[i].onmousedown = rteMouseDownMenuContents;}
break; case "fontsize":
if (kids[i].onmouseover != rteMouseOverMenuContents)
{ kids[i].onmouseover = rteMouseOverMenuContents;}
if (kids[i].onmouseout != rteMouseOutMenuContents)
{ kids[i].onmouseout = rteMouseOutMenuContents;}
if (kids[i].onmousedown != rteMouseDownMenuContents)
{ kids[i].onmousedown = rteMouseDownMenuContents;}
break; case "fontcolor":
if (kids[i].onmouseover != rteMouseOverMenuFontColorContents)
{ kids[i].onmouseover = rteMouseOverMenuFontColorContents;}
if (kids[i].onmouseout != rteMouseOutMenuFontColorContents)
{ kids[i].onmouseout = rteMouseOutMenuFontColorContents;}
break;}
}
var tbl = false; var in_list = false; if (window.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.window.getSelection().focusNode;}
else if (document.getSelection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.getSelection().focusNode;}
else if (document.selection)
{ var selected_obj = document.getElementById(rteName).contentWindow.document.selection.createRange().parentElement();}
var is_link = false; var is_table = false; var current_tag = selected_obj; var previous_tagName = selected_obj.tagName; var textcolor = ""; document.getElementById("fontcolor4").style.backgroundColor = "#000000"; while(previous_tagName != "HTML"){ if(previous_tagName == "B" || previous_tagName == "STRONG"){ document.getElementById("bold").className = "rtebtn4"; document.getElementById("bold").onmouseout = rteBtnMouseDown;}
if (previous_tagName == "LI") { in_list = true;}
if (previous_tagName == "TD" && !is_table) { is_table = true;}
if(previous_tagName == "I" || previous_tagName == "EM"){ document.getElementById("italic").className = "rtebtn4"; document.getElementById("italic").onmouseout = rteBtnMouseDown;}
if(previous_tagName == "U"){ document.getElementById("underline").className = "rtebtn4"; document.getElementById("underline").onmouseout = rteBtnMouseDown;}
if(previous_tagName == "STRIKE"){ document.getElementById("strikethrough").className = "rtebtn4"; document.getElementById("strikethrough").onmouseout = rteBtnMouseDown;}
if(previous_tagName == "A"){ is_link = true; document.getElementById("editlink").className = "rtebtn4"; document.getElementById("editlink").onmouseout = rteBtnMouseDown;}
if(previous_tagName == "UL"){ document.getElementById("insertunorderedlist").className = "rtebtn4"; document.getElementById("insertunorderedlist").onmouseout = rteBtnMouseDown;}
if(previous_tagName == "OL"){ document.getElementById("insertorderedlist").className = "rtebtn4"; document.getElementById("insertorderedlist").onmouseout = rteBtnMouseDown;}
if(previous_tagName == "SUB"){ document.getElementById("subscript").className = "rtebtn4"; document.getElementById("subscript").onmouseout = rteBtnMouseDown;}
//if(previous_tagName == "SUP"){ document.getElementById("superscript").className = "rtebtn4";
// document.getElementById("superscript").onmouseout = rteBtnMouseDown;}
if(previous_tagName == "H1"){ document.getElementById("format1").innerHTML = "Header 1";}
if(previous_tagName == "H2"){ document.getElementById("format1").innerHTML = "Header 2";}
if(previous_tagName == "H3"){ document.getElementById("format1").innerHTML = "Header 3";}
if(previous_tagName == "H4"){ document.getElementById("format1").innerHTML = "Header 4";}
if(previous_tagName == "H5"){ document.getElementById("format1").innerHTML = "Header 5";}
if(previous_tagName == "H6"){ document.getElementById("format1").innerHTML = "Header 6";}
if(previous_tagName == "BLOCKQUOTE"){ document.getElementById("indent").className = "rtebtn4"; document.getElementById("indent").onmouseout = rteBtnMouseDown;}
if (is_table) { document.getElementById("table_options_on").style.display = ""; document.getElementById("table_options_off").style.display = "none";} else { document.getElementById("table_options_on").style.display = "none"; document.getElementById("table_options_off").style.display = "";}
if (current_tag.align == "left") { document.getElementById("justifyleft").className = "rtebtn4"; document.getElementById("justifyleft").onmouseout = rteBtnMouseDown;} else if (current_tag.align == "center") { document.getElementById("justifycenter").className = "rtebtn4"; document.getElementById("justifycenter").onmouseout = rteBtnMouseDown;} else if (current_tag.align == "right") { document.getElementById("justifyright").className = "rtebtn4"; document.getElementById("justifyright").onmouseout = rteBtnMouseDown;} else if (current_tag.align == "justify") { document.getElementById("justifyfull").className = "rtebtn4"; document.getElementById("justifyfull").onmouseout = rteBtnMouseDown;} else if (current_tag.align == "") { document.getElementById("justifyleft").className = "rtebtn1";} else { }
if (current_tag.face == "arial") { document.getElementById("fontface1").innerHTML = "Arial";} else if (current_tag.face == "arial black") { document.getElementById("fontface1").innerHTML = "Arial Black";} else if (current_tag.face == "arial narrow") { document.getElementById("fontface1").innerHTML = "Arial Narrow";} else if (current_tag.face == "courier new") { document.getElementById("fontface1").innerHTML = "Courier New";} else if (current_tag.face == "century gothic") { document.getElementById("fontface1").innerHTML = "Century Gothic";} else if (current_tag.face == "comic sans ms") { document.getElementById("fontface1").innerHTML = "Comic Sans MS";} else if (current_tag.face == "impact") { document.getElementById("fontface1").innerHTML = "Impact";} else if (current_tag.face == "tahoma") { document.getElementById("fontface1").innerHTML = "Tahoma";} else if (current_tag.face == "times new roman") { document.getElementById("fontface1").innerHTML = "Times New Roman";} else if (current_tag.face == "trebuchet ms") { document.getElementById("fontface1").innerHTML = "Trebuchet MS";} else if (current_tag.face == "verdana") { document.getElementById("fontface1").innerHTML = "Verdana";}
if (current_tag.size == "1") { document.getElementById("fontsize1").innerHTML = "1";} else if (current_tag.size == "2") { document.getElementById("fontsize1").innerHTML = "2";} else if (current_tag.size == "3") { document.getElementById("fontsize1").innerHTML = "3";} else if (current_tag.size == "4") { document.getElementById("fontsize1").innerHTML = "4";} else if (current_tag.size == "5") { document.getElementById("fontsize1").innerHTML = "5";} else if (current_tag.size == "6") { document.getElementById("fontsize1").innerHTML = "6";} else if (current_tag.size == "7") { document.getElementById("fontsize1").innerHTML = "7";} else { }
if (current_tag.color != null) { textcolor = current_tag.color;}
current_tag = current_tag.parentNode; previous_tagName = current_tag.tagName;}
if (in_list)
{ }
}
if (textcolor == "") { textcolor = "#000000";}
if (is_table)
{ document.getElementById("edittable").className = "rtebtn4"; document.getElementById("edittable").onmouseout = rteBtnMouseDown; document.getElementById("inserttable").style.display = "none"; document.getElementById("edittable").style.display = "";}
else
{ 
document.getElementById("edittable").className = "rtebtn1"; 
document.getElementById("edittable").onmouseout = rteBtnMouseOut; document.getElementById("inserttable").style.display = ""; 
document.getElementById("edittable").style.display = "none";}
document.getElementById("fontcolor4").style.backgroundColor = textcolor; 
//if (is_link)
//{ 
//document.getElementById("createlink").style.display = "none"; document.getElementById("editlink").style.display = "";}
//else
//{ 
//document.getElementById("createlink").style.display = ""; document.getElementById("editlink").style.display = "none";}
}; 

function menuBuilder() { if (rteFormat) { document.getElementById("rteformat").style.display = "";} else { document.getElementById("rteformat").style.display = "none";}
if (rteFontFace) { document.getElementById("rtefontface").style.display = "";} else { document.getElementById("rtefontface").style.display = "none";}
if (rteFontSize) { document.getElementById("rtefontsize").style.display = "";} else { document.getElementById("rtefontsize").style.display = "none";}
if (rteFontColor) { document.getElementById("rtefontcolor").style.display = "";} else { document.getElementById("rtefontcolor").style.display = "none";}
if (rteBold) { document.getElementById("bold").style.display = "";} else { document.getElementById("bold").style.display = "none";}
if (rteItalic) { document.getElementById("italic").style.display = "";} else { document.getElementById("italic").style.display = "none";}
if (rteUnderline) { document.getElementById("underline").style.display = "";} else { document.getElementById("underline").style.display = "none";}
if (rteStrikeThrough) { document.getElementById("strikethrough").style.display = "";} else { document.getElementById("strikethrough").style.display = "none";}
if (rteLeftAlign) { document.getElementById("justifyleft").style.display = "";} else { document.getElementById("justifyleft").style.display = "none";}
if (rteCenterAlign) { document.getElementById("justifycenter").style.display = "";} else { document.getElementById("justifycenter").style.display = "none";}
if (rteRightAlign) { document.getElementById("justifyright").style.display = "";} else { document.getElementById("justifyright").style.display = "none";}
if (rteFullAlign) { document.getElementById("justifyfull").style.display = "";} else { document.getElementById("justifyfull").style.display = "none";}
if (rteHorizontalRule) { document.getElementById("inserthorizontalrule").style.display = "";} else { document.getElementById("inserthorizontalrule").style.display = "none";}
//if (rteSubscript) { document.getElementById("subscript").style.display = "";} else { document.getElementById("subscript").style.display = "none";}
//if (rteSuperscript) { document.getElementById("superscript").style.display = "";} else { document.getElementById("superscript").style.display = "none";}
//if (rteLink) { 
//document.getElementById("createlink").style.display = "";
//}
// else { document.getElementById("createlink").style.display = "none";
// }
//if (rteUnlink) { document.getElementById("unlink").style.display = "";} else { document.getElementById("unlink").style.display = "none";}
if (rteImages) { document.getElementById("insertimage").style.display = "";} else { document.getElementById("insertimage").style.display = "none";}
if (rteRemoveFormat) { document.getElementById("removeformat").style.display = "";} else { document.getElementById("removeformat").style.display = "none";}
if (rteTables) { document.getElementById("tables").style.display = "";} else { document.getElementById("tables").style.display = "none";}
if (rteOrderedList) { document.getElementById("insertorderedlist").style.display = "";} else { document.getElementById("insertorderedlist").style.display = "none";}
if (rteUnorderedList) { document.getElementById("insertunorderedlist").style.display = "";} else { document.getElementById("insertunorderedlist").style.display = "none";}
if (rteIndent) { document.getElementById("indent").style.display = "";} else { document.getElementById("indent").style.display = "none";}
if (rteOutdent) { document.getElementById("outdent").style.display = "";} else { document.getElementById("outdent").style.display = "none";}
if (rteUndo) { document.getElementById("undo").style.display = "";} else { document.getElementById("undo").style.display = "none";}
if (rteRedo) { document.getElementById("redo").style.display = "";} else { document.getElementById("redo").style.display = "none";}
if (rteCutCopyPaste) { document.getElementById("cutcopypaste").style.display = "";} else { document.getElementById("cutcopypaste").style.display = "none";}
if (rteInsertForm) { document.getElementById("insertform").style.display = "";} else { document.getElementById("insertform").style.display = "none";}
if (rteInsertCheckbox) { document.getElementById("form_checkbox").style.display = "";} else { document.getElementById("form_checkbox").style.display = "none";}
if (rteInsertRadio) { document.getElementById("form_radio").style.display = "";} else { document.getElementById("form_radio").style.display = "none";}
if (rteInsertSelect) { document.getElementById("form_dropdown").style.display = "";} else { document.getElementById("form_dropdown").style.display = "none";}
if (rteInsertTextArea) { document.getElementById("form_textarea").style.display = "";} else { document.getElementById("form_textarea").style.display = "none";}
if (rteInsertSubmit) { document.getElementById("form_submit").style.display = "";} else { document.getElementById("form_submit").style.display = "none";}
if (rteInsertImageSubmit) { document.getElementById("form_image_submit").style.display = "";} else { document.getElementById("form_image_submit").style.display = "none";}
if (rteInsertReset) { document.getElementById("form_reset").style.display = "";} else { document.getElementById("form_reset").style.display = "none";}
if (rteInsertHidden) { document.getElementById("form_hidden").style.display = "";} else { document.getElementById("form_hidden").style.display = "none";}
if (rteInsertPassword) { document.getElementById("form_password").style.display = "";} else { document.getElementById("form_password").style.display = "none";}
if (rteInsertTextField) { document.getElementById("form_textfield").style.display = "";} else { document.getElementById("form_textfield").style.display = "none";}
if (rtePrint) { document.getElementById("printrte").style.display = "";} else { document.getElementById("printrte").style.display = "none";}
if (rteSelectAll) { document.getElementById("selectall").style.display = "";} else { document.getElementById("selectall").style.display = "none";}

if (!rteFormat && !rteFontFace && !rteFontSize && !rteFontColor) { document.getElementById("rtesep1").style.display = "none"; document.getElementById("rtesep2").style.display = "none";}
if (!rteBold && !rteItalic && !rteUnderline && !rteStrikeThrough) { document.getElementById("rtesep3").style.display = "none";}
if (!rteLeftAlign && !rteCenterAlign && !rteRightAlign && !rteFullAlign && !rteHorizontalRule) { document.getElementById("rtesep4").style.display = "none";}
if (!rteFormat && !rteFontFace && !rteFontSize && !rteBold && !rteItalic && !rteUnderline && !rteStrikeThrough && !rteLeftAlign && !rteCenterAlign && !rteRightAlign && !rteFullAlign && !rteHorizontalRule && !rteSuperscript && !rteSubscript) { document.getElementById("tb1").style.display = "none";}
if (!rteLink && !rteUnlink && !rteImages && !rteRemoveFormat && !rteTables && !rteOrderedList && !rteUnorderedList && !rteIndent && !rteOutdent && !rteUndo && !rteRedo && !rteCutCopyPaste) { document.getElementById("tb2").style.display = "none";}
if (!rteLink && !rteUnlink) { document.getElementById("rtesep5").style.display = "none";}
if (!rteImages && !rteRemoveFormat) { document.getElementById("rtesep6").style.display = "none";}
if (!rteTables) { document.getElementById("rtesep7").style.display = "none";}
if (!rteOrderedList && !rteUnorderedList && !rteIndent && !rteOutdent) { document.getElementById("rtesep8").style.display = "none";}
if (!rteUndo && !rteRedo) { document.getElementById("rtesep9").style.display = "none";}
if (!rteInsertForm && !rteInsertCheckbox && !rteInsertRadio && !rteInsertSelect && !rteInsertTextArea && !rteInsertSubmit && !rteInsertImageSubmit && !rteInsertReset && !rteInsertHidden && !rteInsertPassword && !rteInsertTextField) 
{ 
//document.getElementById("rtesep10").style.display = "none";
}
if (!rtePrint && !rteSelectAll && !rteSpellCheck) { document.getElementById("rtesep11").style.display = "none";}
}; function initRTE(rtePreloadContent, rteCSS) { 
if (!document.designMode) { 
document.write('<textarea id="' + rteFormName + '" name="' + rteFormName + '" style="width:' + rteWidth + ';height:' + rteHeight + ';"></textarea>');} else { document.write('<style>'); document.write('.rtebg {'); 
//document.write('	background-image:url(' + rteImagePath + 'bg.gif);'); 
document.write('	font-family:Arial, Helvetica, sans-serif;'); 
document.write('	font-size:6px;'); 
document.write('}'); 
document.write('.rtedropdown1 {'); document.write('	height:16px;'); document.write('	font-family:Arial, Helvetica, sans-serif;'); document.write('	padding-left:3px;'); document.write('	padding-right:3px;'); document.write('	font-size:11px;'); document.write('	border:1px solid #FFFFFF;'); document.write('	cursor:default;'); document.write('}'); document.write('.rtedropdown2 {'); document.write('	width:11px;'); document.write('	background-image:url(' + rteImagePath + 'bg.gif);'); document.write('	border-top:1px solid #FFFFFF;'); document.write('	border-right:1px solid #FFFFFF;'); document.write('	border-bottom:1px solid #FFFFFF;'); document.write('	cursor:default;'); if (document.all && !window.opera)
{ document.write('	height:2px;');}
else
{ document.write('	height:1px;');}
document.write('}'); 
document.write('.rtedropdown4 {'); 
document.write('	font-family:Arial, Helvetica, sans-serif;'); 
document.write('	padding-left:3px;'); 
document.write('	padding-right:3px;'); 
document.write('	font-size:11px;'); 
document.write('	border:1px solid #002D96;'); 
document.write('	cursor:default;'); 
if (document.all && !window.opera)
{ document.write('	line-height:18px;');}
else
{ document.write('	height:16px;');}
document.write('}'); 
document.write('.rtedropdown5 {'); 
document.write('	background-image:url(' + rteImagePath + 'bgover.gif);'); 
document.write('	border-top:1px solid #000080;'); 
document.write('	border-right:1px solid #000080;'); 
document.write('	border-bottom:1px solid #000080;'); 
document.write('	cursor:default;'); 
if (document.all && !window.opera)
{ document.write('	height:20px;');}
else
{ document.write('	height:16px;');}
document.write('}'); 
document.write('.rtedropdown5b {'); 
document.write('	background-image:url(' + rteImagePath + 'bgover.gif);'); 
document.write('	border-top:1px solid #000080;'); 
document.write('	border-right:1px solid #000080;'); 
document.write('	border-bottom:1px solid #000080;'); 
document.write('	cursor:default;'); 
if (document.all && !window.opera)
{ document.write('	height:21px;');}
else
{ document.write('	height:19px;');}
document.write('}'); 
document.write('.rtedropdown6 {'); document.write('	width:11px;'); document.write('	background-image:url(' + rteImagePath + 'bgdown.gif);'); document.write('	border-top:1px solid #000080;'); document.write('	border-right:1px solid #000080;'); document.write('	border-bottom:1px solid #000080;'); document.write('	cursor:default;'); if (document.all && !window.opera)
{ document.write('	height:20px;');}
else
{ document.write('	height:16px;');}
document.write('}'); 
document.write('.rtedropdown7 {'); document.write('	border:1px solid #002D96;'); document.write('	background-color:#FFFFFF;'); document.write('	font-family:Arial, Helvetica, sans-serif;'); document.write('	cursor:default;'); document.write('}'); document.write('.rtedropdown8 {'); document.write('	background-image:url(' + rteImagePath + 'bgover.gif);'); document.write('	border:1px solid #002D96;'); document.write('	cursor:default;'); document.write('}'); document.write('.rtedropdown9 {'); document.write('	background-image:url(' + rteImagePath + 'bgdown.gif);'); document.write('	border-top:1px solid #000080;'); document.write('	border-right:1px solid #000080;'); document.write('	border-bottom:1px solid #000080;'); document.write('	cursor:default;'); document.write('}'); document.write('.rtedropdown9b {'); document.write('	background-image:url(' + rteImagePath + 'bgdown.gif);'); document.write('	border-top:1px solid #000080;'); document.write('	border-right:1px solid #000080;'); document.write('	border-bottom:1px solid #000080;'); document.write('	cursor:default;'); if (document.all && !window.opera)
{ document.write('	height:21px;');}
else
{ document.write('	height:19px;');}
document.write('}'); 
document.write('.rtedropdown10 {'); 
document.write('	border:0px solid transparent;'); 
document.write('	cursor:default;'); 
document.write('}'); 
document.write('.rtedropdown11 {'); 
document.write('	border-top:0px solid transparent;'); 
document.write('	border-right:0px solid transparent;'); 
document.write('	border-bottom:0px solid transparent;'); 
document.write('	cursor:default;'); 
document.write('}'); 
document.write('.rtedropdown11b {'); 
document.write('	border-top:0px solid transparent;'); 
document.write('	border-right:0px solid transparent;'); 
document.write('	border-bottom:0px solid transparent;'); 
document.write('	cursor:default;'); 
document.write('	height:19px;'); 
document.write('}'); 
document.write('.rtedropdown12 {'); 
document.write('	background-image:url(' + rteImagePath + 'bgdown.gif);'); 
document.write('	border:1px solid #000080;'); 
document.write('	cursor:default;'); 
document.write('}'); 
document.write('.rtedropdown13 {'); 
document.write('	padding:1px;'); 
document.write('	border:1px solid #FFFFFF;'); 
document.write('	background-color:#FFFFFF;'); 
document.write('}'); 
document.write('.rtedropdown14 {'); 
document.write('	padding:1px;'); 
document.write('	border:1px solid #000080;'); 
document.write('	background-color:#FFEEC2;'); 
document.write('}'); 
document.write('.rtebtn1 {'); 
document.write('	display:block;'); 
document.write('	width:21px;'); 
document.write('	height:20px;'); 
document.write('	padding: 1px;'); 
document.write('	background-image:url(' + rteImagePath + 'bg.gif);'); 
document.write('}'); 
document.write('.rtebtn2 {'); 
document.write('	display:block;'); 
document.write('	width:21px;'); 
document.write('	height:20px;'); 
document.write('	border:1px solid #000080;'); 
document.write('	background-image:url(' + rteImagePath + 'bgover.gif);'); 
document.write('}'); 
document.write('.rtebtn3 {'); 
document.write('	display:block;'); 
document.write('	width:21px;'); 
document.write('	height:20px;'); 
document.write('	border:1px solid #000080;'); 
document.write('	background-image:url(' + rteImagePath + 'bgselect.gif);'); 
document.write('}'); document.write('.rtebtn4 {'); 
document.write('	display:block;'); 
document.write('	width:21px;'); 
document.write('	height:20px;'); 
document.write('	border:1px solid #000080;'); 
document.write('	background-image:url(' + rteImagePath + 'bgdown.gif);'); 
document.write('}'); 
document.write('.rtebtn5 {'); 
document.write('	display:block;'); 
document.write('	width:21px;'); 
document.write('	height:20px;'); 
document.write('	padding: 1px;'); 
document.write('	background-image:url(' + rteImagePath + 'bg.gif);');
 document.write('}'); 
 document.write('.rtebtn6 {'); 
 document.write('	display:block;'); 
 document.write('	padding: 3px;'); 
 document.write('	cursor:default;'); 
 document.write('}'); 
 document.write('.rtebtn7 {'); 
 document.write('	display:block;'); 
 document.write('	border:1px solid #000080;'); 
 document.write('	background-image:url(' + rteImagePath + 'bgover.gif);'); 
 document.write('	cursor:default;'); 
 document.write('	padding: 2px;'); 
 document.write('}'); 
 document.write('.rtebtn8 {'); 
 document.write('	display:block;'); 
 document.write('	border:1px solid #000080;'); 
 document.write('	background-image:url(' + rteImagePath + 'bgselect.gif);'); 
 document.write('	cursor:default;'); 
 document.write('	padding: 2px;'); 
 document.write('}'); 
 document.write('.rtebtn9 {'); 
 document.write('	display:block;'); 
 document.write('	border:1px solid #000080;'); 
 document.write('	background-image:url(' + rteImagePath + 'bgdown.gif);'); 
 document.write('	cursor:default;'); 
 document.write('	padding: 2px;'); 
 document.write('}'); 
 document.write('</style>'); 
 document.write('<input type="hidden" id="preview_css" value="' + rteCSS + '">'); 
 document.write('<input type="hidden" id="iframe_name" value="' + rteName + '">'); 
 document.write('<table style="width:' + 400 + ';border-left:1px solid #3B619C;border-right:1px solid #3B619C;border-top:1px solid #3B619C;" cellpadding="0" cellspacing="0">'); 
 document.write('  <tr>'); 
 document.write('    <td bgcolor="#C3DAF9">'); 
 document.write('	<table cellpadding="0" cellspacing="0" id="tb1" onmousedown="return false;">'); 
 document.write('      <tr>'); 
 document.write('        <td width="7"><img src="' + rteImagePath + 'start.gif" width="7" height="25"></td>'); 
 document.write('        <td class="rtebg" id="rtesep1"><img src="' + rteImagePath + 'blank.gif"></td>'); 
 document.write('        <td background="' + rteImagePath + 'bg.gif" id="rteformat">'); 
 document.write('		<table width="100%" cellpadding="0" cellspacing="0" id="format4" bgcolor="#FFFFFF" title="Style">'); 
 document.write('          <tr>'); 
 document.write('            <td nowrap><div unselectable="on" id="format1" class="rtedropdown1" style="width:58px;font-family:arial;font-size:11px;color:#000000;">Paragraph</div></td>'); 
 document.write('            <td><div unselectable="on" id="format2" class="rtedropdown2"><img src="' + rteImagePath + 'arrow.gif" width="11" height="16"></div></td>'); 
 document.write('          </tr>'); 
 document.write('        </table>'); 
 document.write('		<div id="format3" class="rtedropdown7" style="position:absolute;display:none;">'); 
 document.write('			<div unselectable="on" id="formatblock" style="font-size:24px; font-family:arial;color:#000000;font-weight:bold;padding:5px;" nowrap>Header 1</div>'); 
 document.write('			<div unselectable="on" id="formatblock" style="font-size:18px; font-family:arial;color:#000000;font-weight:bold;padding:5px;" nowrap>Header 2</div>'); 
 document.write('			<div unselectable="on" id="formatblock" style="font-size:16px; font-family:arial;color:#000000;font-weight:bold;padding:5px;" nowrap>Header 3</div>'); 
 document.write('			<div unselectable="on" id="formatblock" style="font-size:14px; font-family:arial;color:#000000;font-weight:bold;padding:5px;" nowrap>Header 4</div>'); 
 document.write('			<div unselectable="on" id="formatblock" style="font-size:12px; font-family:arial;color:#000000;font-weight:bold;padding:5px;" nowrap>Header 5</div>'); 
 document.write('			<div unselectable="on" id="formatblock" style="font-size:10px; font-family:arial;color:#000000;font-weight:bold;padding:5px;" nowrap>Header 6</div>'); 
 document.write('			<div unselectable="on" id="formatblock" style="font-size:12px; font-family:arial;color:#000000;font-weight:bold;padding:5px;" nowrap>Paragraph</div>'); 
 document.write('		</div>'); 
 document.write('        </td>'); 
 document.write('        <td class="rtebg"><img src="' + rteImagePath + 'blank.gif"></td>'); 
 document.write('        <td background="' + rteImagePath + 'bg.gif" id="rtefontface">'); 
 document.write('		<table style="width:110px;" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" title="Font">'); 
 document.write('          <tr>'); 
 document.write('            <td nowrap><div unselectable="on" id="fontface1" class="rtedropdown1" style="width:98px;font-family:arial;font-size:11px;color:#000000;">Verdana</div></td>'); 
 document.write('            <td><div unselectable="on" id="fontface2" class="rtedropdown2"><img src="' + rteImagePath + 'arrow.gif" width="11" height="16"></div></td>'); 
 document.write('          </tr>'); 
 document.write('        </table>'); 
 document.write('		<div id="fontface3" class="rtedropdown7" style="position:absolute;display:none;">'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:arial;padding:5px;" nowrap>Arial</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:arial black;padding:5px;" nowrap>Arial Black</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:arial narrow;padding:5px;" nowrap>Arial Narrow</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:courier new;padding:5px;" nowrap>Courier New</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:century gothic;padding:5px;" nowrap>Century Gothic</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:comic sans ms;padding:5px;" nowrap>Comic Sans MS</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:impact;padding:5px;" nowrap>Impact</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:tahoma;padding:5px;" nowrap>Tahoma</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:times new roman;padding:5px;" nowrap>Times New Roman</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:trebuchet ms;padding:5px;" nowrap>Trebuchet MS</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="color:#000000;font-family:verdana;padding:5px;" nowrap>Verdana</div>'); 
 document.write('		</div>'); document.write('        </td>'); 
 document.write('        <td class="rtebg"><img src="' + rteImagePath + 'blank.gif"></td>'); 
 document.write('        <td background="' + rteImagePath + 'bg.gif" id="rtefontsize">'); 
 document.write('		<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" title="Font Size">'); 
 document.write('          <tr>'); 
 document.write('            <td><div unselectable="on" id="fontsize1" class="rtedropdown1" style="font-family:arial;font-size:11px;color:#000000;">2</div></td>'); 
 document.write('            <td><div unselectable="on" id="fontsize2" class="rtedropdown2"><img src="' + rteImagePath + 'arrow.gif" width="11" height="16"></div></td>'); 
 document.write('          </tr>'); 
 document.write('        </table>'); 
 document.write('		<div id="fontsize3" class="rtedropdown7" style="position:absolute;display:none;">'); 
 document.write('			<div unselectable="on" id="fontface" style="font-family:arial;color:#000000;font-size:7px;padding:5px;">1</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="font-family:arial;color:#000000;font-size:10px;padding:5px;">2</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="font-family:arial;color:#000000;font-size:12px;padding:5px;">3</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="font-family:arial;color:#000000;font-size:13px;padding:5px;">4</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="font-family:arial;color:#000000;font-size:17px;padding:5px;">5</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="font-family:arial;color:#000000;font-size:23px;padding:5px;">6</div>'); 
 document.write('			<div unselectable="on" id="fontface" style="font-family:arial;color:#000000;font-size:35px;padding:5px;">7</div>'); 
 document.write('		</div>'); 
 document.write('        </td>'); 
 document.write('        <td class="rtebg"><img src="' + rteImagePath + 'blank.gif"></td>'); 
 document.write('        <td class="rtebg" id="rtefontcolor" title="Font Color">'); 
 document.write('        	<table style="width:35px;" border="0" cellspacing="0" cellpadding="0">'); 
 document.write('        		<tr>'); if (!document.all || window.opera)
{ document.write('        			<td><div id="fontcolor1" align="center" class="rtedropdown5" style="padding-bottom:1px;"><img src="' + rteImagePath + 'fontcolor.gif"><br><img id="fontcolor4" src="' + rteImagePath + 'fontcolor2.gif" style="background-color:#FF0000;"></div></td>'); 
document.write('        			<td><div align="center" id="fontcolor2" class="rtedropdown8"><img src="' + rteImagePath + 'arrow.gif"></div></td>');}
else
{ document.write('        			<td><div id="fontcolor1" align="center" class="rtedropdown5" style="padding-bottom:1px;"><img src="' + rteImagePath + 'fontcolor.gif"><br><img id="fontcolor4" src="' + rteImagePath + 'fontcolor2.gif" style="background-color:#FF0000;"></div></td>'); 
document.write('        			<td><div align="center" id="fontcolor2" class="rtedropdown8"><img src="' + rteImagePath + 'arrow.gif"></div></td>');}
document.write('        		</tr>'); 
document.write('        	</table>'); 
document.write('		<div id="fontcolor3" class="rtedropdown7" style="position:absolute;display:none;padding:4px;border:1px solid #002D96;">'); 
document.write('			<table border="0" cellspacing="1" cellpadding="0">'); 
document.write('				<tr>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#000000;" onClick="rteColorClick(\'#000000\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#993300;" onClick="rteColorClick(\'#993300\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#333300;" onClick="rteColorClick(\'#333300\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#003300;" onClick="rteColorClick(\'#003300\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#003366;" onClick="rteColorClick(\'#003366\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#000080;" onClick="rteColorClick(\'#000080\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#333399;" onClick="rteColorClick(\'#333399\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#333333;" onClick="rteColorClick(\'#333333\');"></div></td>'); 
document.write('				</tr>'); 
document.write('				<tr>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#800000;" onClick="rteColorClick(\'#800000\');"></div></td>');
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FF6600;" onClick="rteColorClick(\'#FF6600\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#808000;" onClick="rteColorClick(\'#808000\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#008000;" onClick="rteColorClick(\'#008000\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#008080;" onClick="rteColorClick(\'#008080\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#0000FF;" onClick="rteColorClick(\'#0000FF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#666699;" onClick="rteColorClick(\'#666699\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#808080;" onClick="rteColorClick(\'#808080\');"></div></td>'); 
document.write('				</tr>'); 
document.write('				<tr>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FF0000;" onClick="rteColorClick(\'#FF0000\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FF9900;" onClick="rteColorClick(\'#FF9900\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#99CC00;" onClick="rteColorClick(\'#99CC00\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#339966;" onClick="rteColorClick(\'#339966\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#33CCCC;" onClick="rteColorClick(\'#33CCCC\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#3366FF;" onClick="rteColorClick(\'#3366FF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#800080;" onClick="rteColorClick(\'#800080\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#999999;" onClick="rteColorClick(\'#999999\');"></div></td>'); 
document.write('				</tr>'); 
document.write('				<tr>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FF00FF;" onClick="rteColorClick(\'#FF00FF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FFCC00;" onClick="rteColorClick(\'#FFCC00\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FFFF00;" onClick="rteColorClick(\'#FFFF00\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#00FF00;" onClick="rteColorClick(\'#00FF00\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#00FFFF;" onClick="rteColorClick(\'#00FFFF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#00CCFF;" onClick="rteColorClick(\'#00CCFF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#993366;" onClick="rteColorClick(\'#993366\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#C0C0C0;" onClick="rteColorClick(\'#C0C0C0\');"></div></td>'); 
document.write('				</tr>'); 
document.write('				<tr>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FF99CC;" onClick="rteColorClick(\'#FF99CC\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FFCC99;" onClick="rteColorClick(\'#FFCC99\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FFFF99;" onClick="rteColorClick(\'#FFFF99\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#CCFFCC;" onClick="rteColorClick(\'#CCFFCC\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#CCFFFF;" onClick="rteColorClick(\'#CCFFFF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#99CCFF;" onClick="rteColorClick(\'#99CCFF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#CC99FF;" onClick="rteColorClick(\'#CC99FF\');"></div></td>'); 
document.write('					<td><div id="fontcolor" class="rtedropdown13"><img src="' + rteImagePath + 'fontcolor3.gif" style="background-color:#FFFFFF;" onClick="rteColorClick(\'#FFFFFF\');"></div></td>'); 
document.write('				</tr>'); 
document.write('			</table>'); 
document.write('		</div>'); 
document.write('        </td>'); 
document.write('        <td class="rtebg" id="rtesep2"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
document.write('        <td class="rtebg" title="Bold"><div id="bold" class="rtebtn1"><img src="' + rteImagePath + 'bold.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Italic"><div id="italic" class="rtebtn1"><img src="' + rteImagePath + 'italic.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Underline"><div id="underline" class="rtebtn1"><img src="' + rteImagePath + 'underline.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Strikethrough"><div id="strikethrough" class="rtebtn1"><img src="' + rteImagePath + 'strikethrough.gif"></div></td>'); 
document.write('        <td class="rtebg" id="rtesep3"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
document.write('        <td class="rtebg" title="Align Left"><div id="justifyleft" class="rtebtn1"><img src="' + rteImagePath + 'leftalign.gif" width="21" height="20"></div></td>'); 
document.write('        <td class="rtebg" title="Center"><div id="justifycenter" class="rtebtn1"><img src="' + rteImagePath + 'centeralign.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Align Right"><div id="justifyright" class="rtebtn1"><img src="' + rteImagePath + 'rightalign.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Justify"><div id="justifyfull" class="rtebtn1"><img src="' + rteImagePath + 'fullalign.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Decrease Indent"><div id="outdent" class="rtebtn1"><img src="' + rteImagePath + 'decreaseindent.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Increase Indent"><div id="indent" class="rtebtn1"><img src="' + rteImagePath + 'increaseindent.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Undo"><div id="undo" class="rtebtn1"><img src="' + rteImagePath + 'undo.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Redo"><div id="redo" class="rtebtn1"><img src="' + rteImagePath + 'redo.gif"></div></td>'); 
document.write('		<td class="rtebg" id="cutcopypaste">'); 
document.write('		<table border="0" width="0" cellspacing="0" cellpadding="0">'); 
document.write('		<tr>');
 if (!document.all || window.opera)
{ 
document.write('        <td title="Cut"><div class="rtebtn5"><img src="' + rteImagePath + 'cutgrey.gif"></div></td>'); 
document.write('        <td title="Copy"><div class="rtebtn5"><img src="' + rteImagePath + 'copygrey.gif"></div></td>'); 
document.write('        <td title="Paste"><div class="rtebtn5"><img src="' + rteImagePath + 'pastegrey.gif"></div></td>');}
else
{ document.write('        <td title="Cut"><div id="cut" class="rtebtn1"><img src="' + rteImagePath + 'cut.gif"></div></td>'); 
document.write('        <td title="Copy"><div id="copy" class="rtebtn1"><img src="' + rteImagePath + 'copy.gif"></div></td>'); 
document.write('        <td title="Paste"><div id="paste" class="rtebtn1"><img src="' + rteImagePath + 'paste.gif"></div></td>');
}
document.write('        <td class="rtebg" title="Select All"><div id="selectall" class="rtebtn1"><img src="' + rteImagePath + 'selectall.gif"></div></td>'); 

document.write('		</tr>'); 
document.write('		</table>'); 
document.write('		</td>'); 


document.write('        <td class="rtebg" title="Horizontal Rule"><div id="inserthorizontalrule" class="rtebtn1"><img src="' + rteImagePath + 'hr.gif"></div></td>');
//document.write('        <td class="rtebg" id="rtesep4"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
//document.write('        <td class="rtebg" title="Superscript"><div id="superscript" class="rtebtn1"><img src="' + rteImagePath + 'superscript.gif"></div></td>'); 
//document.write('        <td class="rtebg" title="Subscript"><div id="subscript" class="rtebtn1"><img src="' + rteImagePath + 'subscript.gif"></div></td>'); 
//document.write('        <td width="14"><img src="' + rteImagePath + 'finish.gif" width="14" height="25"></td>'); 
document.write('		<td width="100%"></td>'); 
document.write('      </tr>'); 
document.write('    </table></td>'); 
document.write('  </tr>'); 
document.write('  <tr height="2">'); 
document.write('    <td bgcolor="#C3DAF9" height="2">'); 
document.write('	<table cellpadding="0" cellspacing="0" id="tb2" onmousedown="return false;" height="2">'); 
document.write('      <tr  height="2">'); 
//document.write('        <td width="7"><img src="' + rteImagePath + 'start.gif" width="7" height="25" /></td>'); 
document.write('        <td class="rtebg"><img src="' + rteImagePath + 'blank.gif"></td>'); 
//document.write('        <td class="rtebg"><div id="createlink" class="rtebtn1" title="Insert Hyperlink"><a href="javascript:rteBtnCreateLink();" style="cursor:default;"><img src="' + rteImagePath + 'insertlink.gif" border="0"></a></div><div style="display:none;" id="editlink" class="rtebtn1" title="Edit Hyperlink"><a href="javascript:rteBtnEditLink();" style="cursor:default;"><img src="' + rteImagePath + 'insertlink.gif"border="0"></a></div></td>'); 
//document.write('        <td class="rtebg" title="Remove Hyperlink"><div id="unlink" class="rtebtn1"><img src="' + rteImagePath + 'unlink.gif"></div></td>'); 
document.write('        <td class="rtebg" id="rtesep5"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
document.write('        <td class="rtebg" title="Insert Image"><div id="insertimage" class="rtebtn1"><a href="javascript:rteBtnInsertImage();" style="cursor:default;"><img src="' + rteImagePath + 'insertimage.gif" border="0"></a></div></td>'); 
document.write('        <td class="rtebg" title="Remove Formatting"><div id="removeformat" class="rtebtn1"><img src="' + rteImagePath + 'format.gif"></div></td>'); 
document.write('        <td class="rtebg" id="rtesep6"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
document.write('        <td class="rtebg" id="tables">'); 
document.write('		<table border="0" width="0" cellspacing="0" cellpadding="0" id="table_options_on" style="display:none;">'); 
document.write('		<tr>'); 
document.write('        <td><div id="inserttable" class="rtebtn1" title="Insert Table"><a href="javascript:rteBtnInsertTable();" style="cursor:default;"><img src="' + rteImagePath + 'inserttable.gif" border="0"></a></div><div id="edittable" class="rtebtn1" title="Edit Table Properties"><a href="javascript:rteBtnEditTable();" style="cursor:default;"><img src="' + rteImagePath + 'inserttable.gif" border="0"></a></div></td>'); 
document.write('        <td><div id="insertcolumnleft" class="rtebtn1" title="Insert Column to the left"><img src="' + rteImagePath + 'insertcolumnleft.gif" onClick="rteBtnInsertTableColumnBefore();"></div></td>'); 
document.write('        <td><div id="insertcolumnright" class="rtebtn1" title="Insert Column to the right"><img src="' + rteImagePath + 'insertcolumnright.gif" onClick="rteBtnInsertTableColumnAfter();"></div></td>'); 
document.write('        <td><div id="insertrowabove" class="rtebtn1" title="Insert Row above"><img src="' + rteImagePath + 'insertrowabove.gif" onClick="rteBtnInsertTableRowBefore();"></div></td>'); 
document.write('        <td><div id="insertrowbelow" class="rtebtn1" title="Insert Row below"><img src="' + rteImagePath + 'insertrowbelow.gif" onClick="rteBtnInsertTableRowAfter();"></div></td>'); 
document.write('        <td><div id="deletecolumn" class="rtebtn1" title="Delete Current column"><img src="' + rteImagePath + 'deletecolumn.gif" onClick="rteBtnDeleteTableColumn();"></div></td>'); 
document.write('        <td><div id="deleterow" class="rtebtn1" title="Delete Current row"><img src="' + rteImagePath + 'deleterow.gif" onClick="rteBtnDeleteTableRow();"></div></td>'); 
document.write('        </tr>'); 
document.write('		</table>'); 
document.write('		<table border="0" width="0" cellspacing="0" cellpadding="0" id="table_options_off">'); 
document.write('		<tr>'); 
document.write('        <td><div id="inserttable" class="rtebtn1" title="Insert Table"><a href="javascript:rteBtnInsertTable();" style="cursor:default;"><img src="' + rteImagePath + 'inserttable.gif" border="0"></div></a></td>'); 
document.write('        <td><div class="rtebtn5" title="Insert Column to the left"><img src="' + rteImagePath + 'insertcolumnleftgrey.gif"></div></td>'); 
document.write('        <td><div class="rtebtn5" title="Insert Column to the right"><img src="' + rteImagePath + 'insertcolumnrightgrey.gif"></div></td>'); 
document.write('        <td><div class="rtebtn5" title="Insert Row above"><img src="' + rteImagePath + 'insertrowabovegrey.gif"></div></td>'); 
document.write('        <td><div class="rtebtn5" title="Insert Row below"><img src="' + rteImagePath + 'insertrowbelowgrey.gif"></div></td>'); 
document.write('        <td><div class="rtebtn5" title="Delete Current column"><img src="' + rteImagePath + 'deletecolumngrey.gif"></div></td>'); 
document.write('        <td><div class="rtebtn5" title="Delete Current row"><img src="' + rteImagePath + 'deleterowgrey.gif"></div></td>'); 
document.write('        </tr>'); 
document.write('		</table>'); 
document.write('		</td>'); 
document.write('        <td class="rtebg" id="rtesep7"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
document.write('        <td class="rtebg" title="Numbering"><div id="insertorderedlist" class="rtebtn1"><img src="' + rteImagePath + 'orderedlist.gif"></div></td>'); 
document.write('        <td class="rtebg" title="Bullets"><div id="insertunorderedlist" class="rtebtn1"><img src="' + rteImagePath + 'unorderedlist.gif"></div></td>'); 
//document.write('        <td class="rtebg" title="Decrease Indent"><div id="outdent" class="rtebtn1"><img src="' + rteImagePath + 'decreaseindent.gif"></div></td>'); 
//document.write('        <td class="rtebg" title="Increase Indent"><div id="indent" class="rtebtn1"><img src="' + rteImagePath + 'increaseindent.gif"></div></td>'); 
//document.write('        <td class="rtebg" id="rtesep8"><img src="' + rteImagePath + 'seperator.gif"></td>'); 

//document.write('        <td width="14"><img src="' + rteImagePath + 'finish.gif" width="14" height="25" /></td>'); 
document.write('        <td width="100%"></td>'); 
//document.write('      </tr>'); 
//document.write('    </table></td>'); 
//document.write('  </tr>'); 
//document.write('  <tr>'); 
document.write('    <td ">'); 
document.write('	<table cellpadding="0" cellspacing="0" id="tb3" onmousedown="return false;">'); 
document.write('      <tr>'); 
//document.write('        <td width="7"><img src="' + rteImagePath + 'start.gif" width="7" height="25" /></td>'); 
document.write('        <td class="rtebg" title="Form"><a href="javascript:rteBtnInsertForm();" style="cursor:default;"><div id="insertform" class="rtebtn1"><img src="' + rteImagePath + 'form.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Check Box"><a href="javascript:rteBtnInsertCheckbox();" style="cursor:default;"><div id="form_checkbox" class="rtebtn1"><img src="' + rteImagePath + 'checkbox.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Radio Button"><a href="javascript:rteBtnInsertRadio();" style="cursor:default;"><div id="form_radio" class="rtebtn1"><img src="' + rteImagePath + 'radio.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Select Menu"><a href="javascript:rteBtnInsertDropDown();" style="cursor:default;"><div id="form_dropdown" class="rtebtn1"><img src="' + rteImagePath + 'dropdown.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Text Area"><a href="javascript:rteBtnInsertTextArea();" style="cursor:default;"><div id="form_textarea" class="rtebtn1"><img src="' + rteImagePath + 'textarea.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Submit Button"><a href="javascript:rteBtnInsertSubmit();" style="cursor:default;"><div id="form_submit" class="rtebtn1"><img src="' + rteImagePath + 'submit.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Image Button"><a href="javascript:rteBtnInsertImageSubmit();" style="cursor:default;"><div id="form_image_submit" class="rtebtn1"><img src="' + rteImagePath + 'imagesubmit.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Reset Button"><a href="javascript:rteBtnInsertReset();" style="cursor:default;"><div id="form_reset" class="rtebtn1"><img src="' + rteImagePath + 'reset.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Hidden Field"><a href="javascript:rteBtnInsertHidden();" style="cursor:default;"><div id="form_hidden" class="rtebtn1"><img src="' + rteImagePath + 'hidden.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Password Field"><a href="javascript:rteBtnInsertPassword();" style="cursor:default;"><div id="form_password" class="rtebtn1"><img src="' + rteImagePath + 'password.gif" border="0"></div></a></td>'); 
document.write('        <td class="rtebg" title="Text Field"><a href="javascript:rteBtnInsertText();" style="cursor:default;"><div id="form_textfield" class="rtebtn1"><img src="' + rteImagePath + 'textfield.gif" border="0"></div></a></td>'); 
//document.write('        <td class="rtebg" id="rtesep10"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
document.write('        <td class="rtebg" title="Print"><div id="printrte" class="rtebtn1"><img src="' + rteImagePath + 'print.gif" onClick="rteBtnPrint();"></div></td>'); 
//if (!document.all || window.opera) 
//{ 
//document.write('        <td id="spellchecker" class="rtebg" title="Spell Check"><div id="spellcheck" class="rtebtn5"><img src="' + rteImagePath + 'spellcheckgrey.gif"></div></td>');}
// else { document.write('        <td id="spellchecker" class="rtebg" title="Spell Check"><div id="spellcheck" class="rtebtn5"><img src="' + rteImagePath + 'spellcheckgrey.gif"></div></td>');
// }
//document.write('        <td class="rtebg" id="rtesep11"><img src="' + rteImagePath + 'seperator.gif"></td>'); 
//document.write('        <td class="rtebg" title="About Free Rich Text Editor"><a href="javascript:rteAbout();" style="cursor:default;"><div id="aboutrte" class="rtebtn1"><img src="' + rteImagePath + 'about.gif" border="0"></div></a></td>'); 
//document.write('        <td width="14"><img src="' + rteImagePath + 'finish.gif" width="14" height="25" /></td>'); 
document.write('        <td width="100%"></td>'); 
document.write('	  </tr>'); 
document.write('    </table>'); 
document.write('    </td>'); 
document.write('  <tr>'); 
document.write('    <td style="border:1px solid #C3DAF9; ">'); 
document.write('		<iframe name="' + rteName + '" id="' + rteName + '" style="width:100%; height:' + rteHeight + '; background-color:#FFFFFF;" frameborder="0"></iframe>'); 
document.write('		<textarea name="' + rteFormName + '" id="' + rteFormName + '" style="display:none;width:' + rteWidth + '; height:' + rteHeight + '; background-color:#FFFFFF; font-family:courier new; font-size:12px; color:#000000; border:0px;"></textarea>'); 
document.write('		<iframe id="preview_' + rteName + '" style="width:' + rteWidth + '; height:' + rteHeight + '; background-color:#FFFFFF; display:none;" frameborder="0"></iframe>'); 
document.write('	</td>'); 
document.write('  </tr>'); 

document.write('  <tr>'); 
document.write('    <td bgcolor="#C3DAF9" height="0" class="rtebg">'); 
document.write('		<table width="100%" cellspacing="0" cellpadding="0" border="0" onmousedown="return false;">'); 
document.write('			<tr>'); 
document.write('				<td>')
document.write('					<table width="0" cellspacing="3" cellpadding="0" border="0" class="rtebg">'); 
document.write('						<tr>'); 
if (rteDesignMode) { 
document.write('							<td style="color:#000000; font-family:arial; font-size:11px;"><div class="rtebtn9" id="rte_design_mode" onclick="rteModeType(\'rte_design_mode\');"><img src="' + rteImagePath + 'design.gif">&nbsp;Design</div></td>');}
else
{ document.write('							<td style="display:none;color:#000000; font-family:arial; font-size:11px;"><div class="rtebtn9" id="rte_design_mode"><img src="' + rteImagePath + 'design.gif">&nbsp;Design</div></td>');}
if (rteCodeMode) { 
document.write('							<td style="color:#000000; font-family:arial; font-size:11px;"><div class="rtebtn6" id="rte_code_mode" onclick="rteModeType(\'rte_code_mode\');"><img src="' + rteImagePath + 'code.gif">&nbsp;Code</div></td>');}
else
{ 
document.write('							<td style="display:none;color:#000000; font-family:arial; font-size:11px;"><div class="rtebtn6" id="rte_code_mode"><img src="' + rteImagePath + 'code.gif">&nbsp;Code</div></td>');}
if (rtePreviewMode) { 
document.write('							<td style="color:#000000; font-family:arial; font-size:11px;"><div class="rtebtn6" id="rte_preview_mode" onclick="rteModeType(\'rte_preview_mode\');"><img src="' + rteImagePath + 'preview.gif">&nbsp;Preview</div></td>');}
else
{
document.write('							<td style="display:none;color:#000000; font-family:arial; font-size:11px;"><div class="rtebtn6" id="rte_preview_mode"><img src="' + rteImagePath + 'preview.gif">&nbsp;Preview</div></td>');}
document.write('						</tr>'); 
document.write('					</table>'); 
document.write('				</td>'); 
document.write('			</tr>'); 
document.write('		</table>'); 
document.write('	</td>'); 
document.write('  </tr>'); 

document.write('</table>'); 
startRTE(rtePreloadContent);
 menuBuilder();}
}; 
