function quote(blockquote, uid, title) {
    var blockquote;
    var blog_form = document.forms['edit_form'];
    var reply_to = blog_form['reply_to'];
    var current_content = blog_form['text'];
    var title_ob = blog_form['title'];
    var new_content = current_content.value + blockquote;

    current_content.value = new_content;
    current_content.focus();
    reply_to.value = uid;
    title_ob.value = title
    return false;
}

function emoticon(ecode, form_name) {
  // Inserts emoticon codes
  frm = document.forms[form_name];
  frm.text.value = frm.text.value + ecode;
  frm.text.focus();
  return false;
}

function wizard(wiz_type, form_name) {
  var content = document.forms[form_name].text
  var new_content;
  
  if (wiz_type == "email") {
    var tmp_image = prompt('Lütfen eposta adresini girin:', '');
    if (tmp_image) {
      var pseudo_html = '[eposta]' + tmp_image + '[/eposta]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
  if (wiz_type == "image") {
    var tmp_image = prompt('Lütfen resmin tam adresini yazın:', 'http://');
    if (tmp_image) {
      var pseudo_html = '[res]' + tmp_image + '[/res]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
  if (wiz_type == 'link') {
    var tmp_href = prompt('Lütfen bağlantının (link) tam adresini yazın:', 'http://');
    var tmp_title = prompt('Lütfen baglantiyi görünmesini istediginiz sekilde yazin:', tmp_href)
    if (tmp_href && tmp_title) {
      pseudo_html = '[url href="' + tmp_href + '"]' + tmp_title + '[/url]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
  if (wiz_type == "italic") {
    var tmp_word = prompt('Lütfen yatık harfle yazılacak kelimeleri yazın:', '');
    if (tmp_word) {
      var pseudo_html = '[yatik]' + tmp_word + '[/yatik]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
  if (wiz_type == "bold") {
    var tmp_word = prompt('Lütfen kalın harfle yazılacak kelimeleri yazın:', '');
    if (tmp_word) {
      var pseudo_html = '[kalin]' + tmp_word + '[/kalin]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
  if (wiz_type == "size") {
    var tmp_word = prompt('Lütfen büyük puntoyla yazılacak kelimeleri yazın:', '');
    if (tmp_word) {
      var pseudo_html = '[buyuk]' + tmp_word + '[/buyuk]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
  if (wiz_type == "big") {
    var tmp_word = prompt('Please enter a word or sentence:', '');
    if (tmp_word) {
      var pseudo_html = '[size]' + tmp_word + '[/size]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
  if (wiz_type == "code") {
    var tmp_word = prompt('Please enter a word or sentence:', '');
    if (tmp_word) {
      var pseudo_html = '[code]' + tmp_word + '[/code]';
      new_content = content.value + pseudo_html;
      content.value = new_content;
    }
    content.focus();
    return false;
  }
}

