var htmlobj, textCtrl
var bodyProcessed

function BodyOnLoad()
{
	textCtrl = GetControl("KR23");
	htmlobj = GetControl("htmled");	

	if (htmlobj != null && textCtrl != null){
		bodyProcessed = true;
	 	if (textCtrl.value != null && textCtrl.value.length > 0) {		
			htmlobj.DocumentHTML = textCtrl.value;		
		}
		htmlobj.focus();
	} 

}

function GetHTMLText(idHtml, idText)
{

	textCtrl = GetControl(idText);
	htmlobj = GetControl(idHtml);	
	if (htmlobj != null && textCtrl != null){

		textCtrl.style.visibility = 'hidden';
		if (bodyProcessed && htmlobj.DocumentHTML){
			textCtrl.value = htmlobj.DocumentHTML;				
		}
	}
}
