var FormObject;
var FormVal;

function setEditorName(fName)
{
alert("test")
//FormObject=fName
}

function setfocus()
{
//document.forms[0].ContentValue2.select();
//document.forms[0].ContentValue2.focus();
eval("document.forms[0]."+FormVal+".select()");
eval("document.forms[0]."+FormVal+".focus()");

}

function popup()
{
window.open('http://dahi.us/editor/keyboard4.gif','main','menubar=0,toolbar=0,location=0,directories=0,status=1,copyhistory=0,width=365,height=145');
}

function format_sel(v) {
  var str = document.selection.createRange().text;
  
  focusthis();
  
  //document.Compose.ContentValue2.focus();
  var sel = document.selection.createRange();
  sel.text = '<' + v + '>' + str + '</' + v + '>';
  return;
}

function copycb() {
setfocus();
  
//eval("textRange = document."+FormObject+".createTextRange()");
  
textRange = document.Compose.ContentValue2.createTextRange();
textRange.execCommand("RemoveFormat");
textRange.execCommand("Copy");
if ("!document.Compose.nomsg.checked")
alert("The text has been copied to your clipboard.\nOpen Blogger.com editor and just paste it there.");
}
function focusthis()
{
    FormObject="Compose"
	FormVal="ContentValue2"
	eval("document."+FormObject+"."+FormVal+".focus()");
}

function insert_link(url) {
  var str = document.selection.createRange().text;
  
  focusthis();
  //document.Compose.ContentValue2.focus();
  
 var my_link = prompt('Enter :',url);
  if (my_link != null) {
    var sel = document.selection.createRange();
	sel.text = '<a href=\"' + my_link + '\">' + str + '</a>';
  }
  return;
}

function insert_pic() {

focusthis();  
// document.Compose.ContentValue2.focus();
  var my_pic = prompt('Enter URL for picture:','http://');
  if (my_pic != null) {
    var sel = document.selection.createRange();
	sel.text = '<img src="' + my_pic + '">';
  }
  return;
}

function mouseover(el) {
  el.className = 'raised';
}

function mouseout(el) {
  el.className = 'tlbbutton';
}

function mousedown(el) {
  el.className = 'pressed';
}

function mouseup(el) {
  el.className = 'raised';
}


function popPrev()
{
var newWin;
newWin =window.open("ucode.asp","ucode","resizable=no,scrollbars=yes,width=550,height=300,toolbar=no")
}
