
var EditorRoot = APP_PATH+"/js/HtmlEditor/";


document.writeln(
'<style>'+

'	table.htmleditor_tab td {'+
'		display:block;'+
'	}'+
'	table.htmleditor_tab td.header {'+
'		border:1px solid #567089;'+
'		background-color: #c8dcf0;'+
'		font-family:Arial;'+
'		font-size:11px;'+
'		font-weight:bold;'+
'		padding:2px;'+
'		padding-left:8px;'+
'	}'+

'	table.htmleditor_tab_hid td.header {'+
'		border:1px solid #567089;'+
'		background-color: #c8dcf0;'+
'		font-family:Arial;'+
'		font-size:11px;'+
'		font-weight:bold;'+
'		padding:2px;'+
'		padding-left:8px;'+
'	}'+

'	.htmleditor_swap_btn {'+
'		border:1px solid #567089;'+
'		background-color: #c8dcf0;'+
'		font-family:Arial;'+
'		font-size:11px;'+
'		font-weight:bold;'+
'		width:100%;'+
'		text-align:left;'+
'		color:#4d4d4d;'+
'		padding:1px;'+
'		padding-left:8px;'+
'		cursor:hand;'+
'		margin-bottom:1px;'+
'	}'+

'	.htmleditor_accent_btn {'+
'		border:1px solid #567089;'+
'		background-color: #c8dcf0;'+
'		font-family:Arial;'+
'		font-size:11px;'+
'		font-weight:normal;'+
'		width:18px;'+
'		height:18px;'+
'		text-align:center;'+
'		color:#4d4d4d;'+
'		padding:1px;'+
'		margin:1px;'+
'		cursor:hand;'+
'	}'+

'	table.htmleditor_tab td.header ul {'+
'		margin:0px;'+
'		margin-left:11px;'+
'		list-style-image: url('+EditorRoot+'images/treenode_minus_arrow.gif)'+
'	}'+

'	table.htmleditor_tab_hid td.header ul {'+
'		margin:0px;'+
'		margin-left:11px;'+
'		list-style-image: url('+EditorRoot+'images/treenode_plus_arrow.gif)'+
'	}'+


'	table.htmleditor_tab td.header a,'+
'	table.htmleditor_tab td.header a:link,'+
'	table.htmleditor_tab td.header a.visited {'+
'		text-decoration:none;'+
'		color:#4d4d4d;'+
'	}'+
'	table.htmleditor_tab_hid td.header a,'+
'	table.htmleditor_tab_hid td.header a:link,'+
'	table.htmleditor_tab_hid td.header a.visited {'+
'		text-decoration:none;'+
'		color:#4d4d4d;'+
'	}'+


'	table.htmleditor_tab td.vis {'+
'		display:block;'+
'		background-color: #b4cfea;'+
'	}'+

'	table.htmleditor_tab td.hid {'+
'		display:none;'+
'	}'+
'	table.htmleditor_tab_hid td.hid {'+
'		display:none;'+
'	}'+

'</style>'
);


function ROIHtmlEditor(name,controlname)
{
	this.Name = name;
	this.ControlName = controlname;
	this.hex = new Array(6);
	this.hex[0] = "FF";
	this.hex[1] = "CC";
	this.hex[2] = "99";
	this.hex[3] = "66";
	this.hex[4] = "33";
	this.hex[5] = "00";

	this.HtmlEditor_GetWorkFrame = HtmlEditor_GetWorkFrame;
	this.HtmlEditor_GetFont = HtmlEditor_GetFont;
	this.HtmlEditor_GetUrl = HtmlEditor_GetUrl;
	this.HtmlEditor_GetSize = HtmlEditor_GetSize;
	this.HtmlEditor_GetWhat = HtmlEditor_GetWhat;
	this.HtmlEditor_GetSwapButton = HtmlEditor_GetSwapButton;
	
	this.HtmlEditor_InitEditor = HtmlEditor_InitEditor;
	this.HtmlEditor_CopyValue = HtmlEditor_CopyValue;
	this.HtmlEditor_initToolBar = HtmlEditor_initToolBar;
	this.HtmlEditor_doFormat = HtmlEditor_doFormat;
	this.HtmlEditor_swapMode = HtmlEditor_swapMode;
	this.HtmlEditor_create = HtmlEditor_create;
	this.HtmlEditor_newFile = HtmlEditor_newFile;
	this.HtmlEditor_makeUrl = HtmlEditor_makeUrl;
	this.HtmlEditor_copyValue = HtmlEditor_copyValue;
	this.HtmlEditor_SwapView_OnClick = HtmlEditor_SwapView_OnClick;
	this.HtmlEditor_ColorPalette_OnClick = HtmlEditor_ColorPalette_OnClick;
	
	this.HtmlEditor_AddAccent = HtmlEditor_AddAccent;
	this.HtmlEditor_AccentsPanel = HtmlEditor_AccentsPanel;
	
	this.HtmlEditor_drawCell = HtmlEditor_drawCell;
	this.HtmlEditor_drawRow = HtmlEditor_drawRow;
	this.HtmlEditor_drawTable = HtmlEditor_drawTable;
	this.HtmlEditor_drawCube = HtmlEditor_drawCube;
	this.DrawHtmlEditor = DrawHtmlEditor;

}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


function HtmlEditor_GetWorkFrame()
{
	//return document.getElementById(this.Name+"_myEditor");
	return window.frames[this.Name+"_myEditor"];
}

function HtmlEditor_GetFont()
{
	return document.getElementById(this.Name+"_font");
}

function HtmlEditor_GetUrl()
{
	return document.getElementById(this.Name+"_url");
}

function HtmlEditor_GetSize()
{
	return document.getElementById(this.Name+"_size");
}
function HtmlEditor_GetWhat()
{
	return document.getElementById(this.Name+"_what");
}

function HtmlEditor_GetSwapButton()
{
	return document.getElementById(this.Name+"_btnSwapView");
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

function HtmlEditor_ColorPalette_OnClick(colorString)
{
	this.HtmlEditor_doFormat('ForeColor',colorString);
}

function HtmlEditor_InitEditor()
{
	var editor = this.HtmlEditor_GetWorkFrame();
	editor.initEditor( document.getElementById(this.ControlName).value );
}

function HtmlEditor_CopyValue()
{
	var editor = this.HtmlEditor_GetWorkFrame();
	document.getElementById(this.ControlName).value = editor.getValue();
}

function HtmlEditor_initToolBar(ed)
{
	//alert('test');
//    var eb = document.all.<?=$name?>_;
//        if (ed!=null) { eb._editor = window.frames['<?=$name?>_myEditor']; }
}

function HtmlEditor_doFormat(what)
{
	var editor = this.HtmlEditor_GetWorkFrame();
	if (what == "FontName")
	{
		if(arguments[1] != 1)
		{
			editor.execCommand(what, arguments[1]);
			this.HtmlEditor_GetFont().selectedIndex = 0;
		}
	}
	else
	if (what == "FontSize")
	{
		if(arguments[1] != 1)
		{
			editor.execCommand(what, arguments[1]);
			this.HtmlEditor_GetSize.selectedIndex = 0;
		}
	}
	else
	{
		editor.execCommand(what, arguments[1]);
	}
}

function HtmlEditor_swapMode()
{
	var editor = this.HtmlEditor_GetWorkFrame();
	editor.HtmlEditor_swapModes();
}

function HtmlEditor_create()
{
    var editor = this.HtmlEditor_GetWorkFrame();
	editor.newDocument();
}
function HtmlEditor_newFile()
{
	var editor = this.HtmlEditor_GetWorkFrame();
	editor.newDocument();
}
function HtmlEditor_makeUrl()
{
	var sUrl;
	sUrl = this.HtmlEditor_GetWhat().value + this.HtmlEditor_GetUrl().value;
	this.HtmlEditor_doFormat('CreateLink',sUrl);
}
function HtmlEditor_copyValue()
{
	if(this.HtmlEditor_GetSwapButton().value != "Html")
	{
		this.HtmlEditor_swapMode();
	}
	var theHtml = 
		this.HtmlEditor_GetWorkFrame().document.frames("textEdit").document.body.innerHTML;
	document.getElementById(this.Name).value;
}
function HtmlEditor_SwapView_OnClick()
{
	if(this.HtmlEditor_GetSwapButton().value == "Html")
	{
		var sMes = "Text";
		var sStatusBarMes = "Current mode is Html";
	}
	else
	{
		var sMes = "Html"
		var sStatusBarMes = "Current mode is Text";
	}
	this.HtmlEditor_GetSwapButton().value = sMes;
	this.HtmlEditor_swapMode();
}


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


function HtmlEditor_display_color(triplet, EditorName)
{
	eval(EditorName+'.HtmlEditor_ColorPalette_OnClick(\'#'+triplet+'\');');
}

function HtmlEditor_drawCell(red, green, blue)
{
	var out = 
	'<TD BGCOLOR="#' + red + green + blue + '">'+
	'<A OnClick="HtmlEditor_display_color(\'' + (red + green + blue) + '\',\''+this.Name+'\'); return false;">'+
	'<IMG SRC="place.gif" style="border:1px solid black" HEIGHT=5 WIDTH=10>'+
	'</A>'+
	'</TD>';
	return out;
}
function HtmlEditor_drawRow(red, blue)
{
	var out = '<TR>';
	for (var i = 0; i< 6; ++i)
	{
		out += this.HtmlEditor_drawCell(red, this.hex[i], blue);
	}
	out += '</TR>';
	return out;
}
function HtmlEditor_drawTable(blue)
{
	var out =
	'<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>';
	for (var i = 0; i< 6; ++i)
	{
		out += this.HtmlEditor_drawRow(this.hex[i], blue);
	}
	out += '</TABLE>';
	return out;
}
function HtmlEditor_drawCube()
{
	var out =
	'<TABLE WIDTH=100% CELLPADDING=3 CELLSPACING=0 BORDER=0><TR>';
	for (var i = 5; i>= 0; --i)
	{
		out += '<TR><TD>';
		out += this.HtmlEditor_drawTable(this.hex[i]);
		out += '</TD></TR>';
	}
	out += '</TR></TABLE>';
	return out;
}


function DrawHtmlEditor()
{
	var out;
	if (window.navigator.appName.toLowerCase().indexOf("microsoft inter") == -1)
		return DrawHtmlEditor_ForNonIEBrowser();
	else
	out =
	'<table bgcolor="#000000" cellpadding="0" cellspacing="1" align="center"><tr><td>\n'+
	'  <table border="0" cellspacing="0" cellpadding="0" bgcolor="#A6C5E3" width="100%" height="40%" bordercolor="#CCCCCC" align="center">\n'+
	'    <tr valign="top">\n'+
	'      <td>\n'+
	'        <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">\n'+
	'          <tr valign="top">\n'+
	'            <td valign="top">\n'+
	'              <div>\n'+
	'                <table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">\n'+
	'                  <tr>\n'+
	'                    <td>\n'+
	'                      <table border="0" cellpadding="0" cellspacing="0">\n'+
	'                        <tr>\n'+
	'                          <td>\n'+
	'                            <table border="0">\n'+
	'                              <tr valign="baseline">\n'+
	'                                <td nowrap>'+
	'								   <img class="clsCursor" src="'+EditorRoot+'images/editor_new.gif" width="20" height="20" border="0" alt="New Blank Document" onClick="'+this.Name+'.HtmlEditor_newFile();">&nbsp;\n'+
	'                                  <img class="clsCursor" src="'+EditorRoot+'images/editor_cut.gif" width="20" height="20" border="0" alt="Cut" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Cut\')">&nbsp;\n'+
	'                                  <img class="clsCursor" src="'+EditorRoot+'images/editor_copy.gif" width="20" height="20" border="0" alt="Copy" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Copy\')">&nbsp;\n'+
	'                                  <img class="clsCursor" src="'+EditorRoot+'images/editor_paste.gif" border="0" alt="Paste" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Paste\')" width="20" height="20">&nbsp;\n'+
	'								   <img class="clsCursor" src="'+EditorRoot+'images/editor_bulletlist.gif" width="20" height="20" border="0" alt="Bullets" onClick="'+this.Name+'.HtmlEditor_doFormat(\'InsertUnorderedList\');" >&nbsp;\n'+
	'                                  <img class="clsCursor" src="'+EditorRoot+'images/editor_numberedlist.gif" width="20" height="20" border="0" alt="Numbering" onClick="'+this.Name+'.HtmlEditor_doFormat(\'InsertOrderedList\');" >&nbsp;\n'+
	'                                  <img class="clsCursor" src="'+EditorRoot+'images/editor_indent.gif" width="20" height="20" alt="Increase Indent" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Indent\')">&nbsp;\n'+
	'                                  <img class="clsCursor" src="'+EditorRoot+'images/editor_outdent.gif" width="20" height="20" alt="Decrease Indent" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Outdent\')">&nbsp;\n'+
	'                                  <img class="clsCursor" src="'+EditorRoot+'images/editor_hr.gif" width="20" height="20" alt="Add Horizontal Line" onClick="'+this.Name+'.HtmlEditor_doFormat(\'InsertHorizontalRule\')">&nbsp;\n'+
	'	                               <img class="clsCursor" src="'+EditorRoot+'images/editor_bold.gif" width="20" height="20" border="0" align="absmiddle" alt="Bold" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Bold\')">&nbsp;\n'+
	'	                               <img class="clsCursor" src="'+EditorRoot+'images/editor_italic.gif" width="20" height="20" border="0" align="absmiddle" alt="Italic" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Italic\')">&nbsp;\n'+
	'	                               <img class="clsCursor" src="'+EditorRoot+'images/editor_underline.gif" width="20" height="20" border="0" align="absmiddle" alt="Underline" onClick="'+this.Name+'.HtmlEditor_doFormat(\'Underline\')" >&nbsp;\n'+
	'								   <img class="clsCursor" src="'+EditorRoot+'images/editor_alignleft.gif" width="20" height="20" border="0" alt="Align Left" align="absmiddle"  onClick="'+this.Name+'.HtmlEditor_doFormat(\'JustifyLeft\')">\n'+
	'	                               <img class="clsCursor" src="'+EditorRoot+'images/editor_aligncenter.gif" width="20" height="20" border="0" alt="Center" align="absmiddle" onClick="'+this.Name+'.HtmlEditor_doFormat(\'JustifyCenter\')">&nbsp;\n'+
	'	                               <img class="clsCursor" src="'+EditorRoot+'images/editor_alignright.gif" width="20" height="20" border="0" alt="Align Right" align="absmiddle"  onClick="'+this.Name+'.HtmlEditor_doFormat(\'JustifyRight\')">&nbsp;\n'+
	'		 	 					   <img class="clsCursor" src="'+EditorRoot+'images/editor_alignwidth.gif" width="20" height="20" border="0" alt="Justify" align="absmiddle"  onClick="'+this.Name+'.HtmlEditor_doFormat(\'JustifyFull\')">&nbsp;\n'+
	'								</td>\n'+
	'                              </tr>\n'+
	'                            </table>\n'+
	'                          </td>\n'+
	'                          <td>&nbsp;</td><td>&nbsp;</td>\n'+
	'                          <td> </td>\n'+
	'                        </tr>\n'+
	'                      </table>\n'+
	'                    </td>\n'+
	'                  </tr>\n'+
	'                </table>\n'+
	'              </div>\n'+
	'            </td>\n'+
	'          </tr>\n'+
	'          <tr>\n'+
	'            <td valign="top">\n'+
	'              <table width="100%" border="0" height="100">\n'+
	'                <tr valign="top">\n'+
	'                  <td width="100%" height="100%">\n'+
	'                    <table width="500" border="0" cellspacing="0" cellpadding="0" height="100%">\n'+
	'                      <tr>\n'+
	'                        <td valign="top" bgcolor="#FFFFFF" height="370"><iframe name="iframe_'+this.Name+'" id="'+this.Name+'_myEditor" src="'+EditorRoot+'htmleditor.htm" !onFocus="'+this.Name+'_initToolBar(this)" width=100% height=100%"></iframe></td>\n'+
	'                      </tr>\n'+
	'                    </table>\n'+
	'                  </td>\n'+
	'                </tr>\n'+
	'              </table>\n'+
	'            </td>\n'+
	'          </tr>\n'+
	'        </table>\n'+
	'      </td>\n'+
	'      <td>\n'+
	
	'		<input type="button" id="'+this.Name+'_btnSwapView" value="Html" onClick="'+this.Name+'.HtmlEditor_SwapView_OnClick();" class="htmleditor_swap_btn">\n'+
			HtmlEditor_DrawTab('ColorPalette','Color', this.HtmlEditor_drawCube(), false )+
			
			HtmlEditor_DrawTab('Font','Font',
			'<div style="padding:3px">'+
			'Font:<br>'+
			'<select id="'+this.Name+'_font" onChange="'+this.Name+'.HtmlEditor_doFormat(\'FontName\',document.all.'+this.Name+'_font.value);" style="font: 8pt verdana;">\n'+
			'	<option value="1" selected ></option>\n'+
			'	<option value="arial">Arial</option>\n'+
			'	<option value="times" >Times</option>\n'+
			'	<option value="courier">Courier</option>\n'+
			'	<option value="tahoma">Tahoma</option>\n'+
			'	<option value="verdana">Verdana</option>\n'+
			'</select>\n'+
			'</div>'+
			'<div style="padding:3px">'+
			'Size:<br>'+
			'<select id="'+this.Name+'_size" onChange="'+this.Name+'.HtmlEditor_doFormat(\'FontSize\',document.all.'+this.Name+'_size.value);" style="font: 8pt verdana;">\n'+
			'	<option value="None" selected></option>\n'+
			'	<option value="1">1</option>\n'+
			'	<option value="2">2</option>\n'+
			'	<option value="3">3</option>\n'+
			'	<option value="4">4</option>\n'+
			'	<option value="5">5</option>\n'+
			'	<option value="6">6</option>\n'+
			'	<option value="7">7</option>\n'+
			'	<option value="+1">+1</option>\n'+
			'	<option value="+2">+2</option>\n'+
			'	<option value="+3">+3</option>\n'+
			'	<option value="+4">+4</option>\n'+
			'	<option value="+5">+5</option>\n'+
			'	<option value="+6">+6</option>\n'+
			'	<option value="+7">+7</option>\n'+
			'</select></div><br>\n'+			

			''+
			''+
			''+
			''
			,
			false )+
			
			
			HtmlEditor_DrawTab('Hyperlink','Hyperlink', 
			'							  <table border="0">\n'+
			'                              <tr>\n'+
			'                                <td nowrap>\n'+
			'                                  <select id="'+this.Name+'_what" style="font: 8pt verdana;">\n'+
			'                                    <option value="http://" selected>http://</option>\n'+
			'                                    <option value="mailto:">mailto:</option>\n'+
			'                                    <option value="ftp://">ftp://</option>\n'+
			'                                    <option value="https://">https://</option>\n'+
			'                                  </select>\n'+
			'                                </td>\n'+
			'                              </tr>\n'+
			'                              <tr>\n'+
			'                                <td>\n'+
			'                                  <input type="text" name="'+this.Name+'_url" size="10" style="font: 8pt verdana;">\n'+
			'                                </td>\n'+
			'                              </tr>\n'+
			'                              <tr>\n'+
			'								<td>\n'+
			'								 <input type="button" value="<< Add link" onClick="'+this.Name+'.HtmlEditor_makeUrl();" class="htmleditor_swap_btn">\n'+
			'	 							 </td>\n'+
			'                              </tr>\n'+
			'                            </table>\n',
			false )+
			
			HtmlEditor_DrawTab('Accents','Accents',
				this.HtmlEditor_AccentsPanel(),
			false )+
			
	
	'<img src="images/pixel.gif" height=1px width=81px>'+
	'      </td>\n'+
	'    </tr>\n'+
	'  </table>\n'+
	'</td>\n'+
	'</tr>\n'+
	'</table>';
	return out;
}



function DrawHtmlEditor_ForNonIEBrowser()
{
	var out;
	out = 'Sorry! The Html editor doesn\'t support non-ie browsers';
	return out;
}



/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

function HtmlEditor_AddAccent(accent)
{
	var editor = this.HtmlEditor_GetWorkFrame();
	editor.textEdit.focus();
	this.HtmlEditor_doFormat("Paste",accent);
}


function HtmlEditor_AccentsPanel()
{
	var out;
	out = 
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Aacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Aacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&aacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&aacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Acirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Acirc;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&acirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&acirc;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Agrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Agrave;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&agrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&agrave;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&AElig;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&AElig;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&aelig;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&aelig;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Auml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Auml;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&auml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&auml;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Ccedil;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Ccedil;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&ccedil;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&ccedil;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Eacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Eacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&eacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&eacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Ecirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Ecirc;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&ecirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&ecirc;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Egrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Egrave;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&egrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&egrave;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Iacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Iacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&iacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&iacute;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Icirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Icirc;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&icirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&icirc;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Igrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Igrave;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&igrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&igrave;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Iuml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Iuml;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&iuml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&iuml;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Oacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Oacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&oacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&oacute;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Ocirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Ocirc;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&ocirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&ocirc;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Ograve;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Ograve;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&ograve;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&ograve;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&OElig;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&OElig;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&oelig;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&oelig;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Ouml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Ouml;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&ouml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&ouml;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Uacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Uacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&uacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&uacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Ucirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Ucirc;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&ucirc;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&ucirc;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Ugrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Ugrave;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&ugrave;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&ugrave;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Uuml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Uuml;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&uuml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&uuml;\'); return false;">'+
'<br>'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Yacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Yacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&yacute;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&yacute;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&Yuml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&Yuml;\'); return false;">'+
'<input class=htmleditor_accent_btn type=button width=15 height=15 value="&yuml;" onclick="'+this.Name+'.HtmlEditor_AddAccent(\'&yuml;\'); return false;">';

	return out;

}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


function HtmlEditor_DrawTab(name,title,content,expanded)
{
	var out;
	var cl = expanded ? 'htmleditor_tab' : 'htmleditor_tab_hid';
	var c2 = expanded ? 'vis' : 'hid';
	out = 
	'<table cellspacing=0 cellpadding=0 width=100% class="'+cl+'" id="con_'+name+'">'+
	'	<tr>'+
	'		<td class="header"><ul><li><a href=# onClick="var c=document.getElementById(\'con_'+name+'\'); c.className=c.className==\'htmleditor_tab\'?\'htmleditor_tab_hid\':\'htmleditor_tab\'; '+
	'var o=document.getElementById(\'contd_'+name+'\'); o.className=o.className==\'hid\'?\'vis\':\'hid\';'+
	'return false;">'+title+'</a></li></ul></td>'+
	'	</tr>'+
	'	<tr>'+
	'		<td class="'+c2+'" id="contd_'+name+'">'+
			content+
	'		</td>'+
	'	</tr>'+
	'</table>';
	return out;
}



