function DoCommand(commandname)
 {
  document.getElementById("editor_content").focus();
  document.execCommand(commandname); 
  document.getElementById("editor_content").focus();
 }
function addchr(charvalue)
 {
  document.getElementById("editor_content").innerHTML+=charvalue;
 }
function displaypopup(popupid) 
 {
  document.getElementById(popupid).style.display =document.getElementById(popupid).style.display == "none" ? "block" : "none";
 }
function doCommandStyle(whatcmd,cmdValue)
 {
  document.getElementById("editor_content").focus();
  document.execCommand(whatcmd, false,cmdValue);
  document.getElementById("editor_content").focus();
 }
function insertimage(imgsrc)
 {
   document.getElementById("editor_content").innerHTML+="<img src=" + imgsrc + " />"
   document.getElementById("editor_content").focus();
 }
