// Courtesy of http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript/
function makeTag(tag) {
  field = document.forms['PostForm'].elements[4]
  // IE support
  if (document.selection) {
    field.focus();
    sel = document.selection.createRange();
    sel.text = tag;
  }
  // Mozilla support
  else if (field.selectionStart || field.selectionStart == '0') {
    var startPos = field.selectionStart;
    var endPos = field.selectionEnd;
    field.value = field.value.substring(0, startPos)
      + tag
      + field.value.substring(endPos, field.value.length);
  } 
  else {
    field.value += tag;
  }
}

function confirmFileDelete(type) {
    return confirm('Are you sure you want to delete the selected files?')
	}

function confirmPostDelete(type) {
    return confirm('Are you sure you want to delete this post?')
	}