var otherDoc;
document.frames.TheFrame.document.designMode = "On";

function showSelectionFont() {
  var f;
 // f = document.frames.TheFrame.document.queryCommandValue("FontName");
  f = otherDoc.queryCommandValue("FontName");
  if (!f) 
    f = "null";
  // to lower the string before comparting it - use all lower for all id's.
  f = f.toLowerCase();

  // c = document.forms.editform.FontSelection.all[f];
c = FontSelection.all[f];
  
  if ((c) && (!c.selected)) {
    c.selected = true;
  }
  
}

function init() {
 otherDoc = document.frames.TheFrame.document;
// otherDoc.body.onselect = showSelectionFont;
 //document.frames.TheFrame.document.body.onselect = showSelectionFont; 
 //  otherDoc.body.onselect = showSelectionSize;

}

window.onload = init;
