function insert(form, element, aTag, eTag) {
  //var input = document.forms['formular'].elements['eingabe'];
	var input = document.forms[form].elements[element];
  /* f�r Internet Explorer */
  if(typeof document.selection != 'undefined') {
    /* Einfügen des Formatierungscodes */
    var range = document.selection.createRange();
    var insText = range.text;
    range.text = aTag + insText + eTag;
    /* Anpassen der Cursorposition */
    range = document.selection.createRange();
    if (insText.length == 0) {
      range.move('character', -eTag.length);
    } else {
      range.moveStart('character', aTag.length + insText.length + eTag.length);
    }
    range.select();
  }
  /* für neuere auf Gecko basierende Browser */
  else if(typeof input.selectionStart != 'undefined')
  {
    /* Einfügen des Formatierungscodes */
    var start = input.selectionStart;
    var end = input.selectionEnd;
    var insText = input.value.substring(start, end);
    input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
    /* Anpassen der Cursorposition */
    var pos;
    if (insText.length == 0) {
      pos = start + aTag.length;
    } else {
      pos = start + aTag.length + insText.length + eTag.length;
    }
    input.selectionStart = pos;
    input.selectionEnd = pos;
  }
  /* für die übrigen Browser */
  else
  {
    /* Abfrage der Einfügeposition */
    var pos;
    var re = new RegExp('^[0-9]{0,3}$');
    while(!re.test(pos)) {
      pos = prompt("Einfügen an Position (0.." + input.value.length + "):", "0");
    }
    if(pos > input.value.length) {
      pos = input.value.length;
    }
    /* Einfügen des Formatierungscodes */
    var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:");
    input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos);
  }
}

function save() {
	var oEditor = FCKeditorAPI.GetInstance('oFCKeditor1')
	var html = oEditor.EditorDocument.body.innerHTML;
	html = html.replace(/&/g, "@@@");
	document.edit.text.value = html;
	document.edit.submit();
}
function initEditor(code){
	var oEditor = FCKeditorAPI.GetInstance('oFCKeditor1') ;
	oEditor.SetData(code);
	alert(code)
}
function getCurrent(id){
    document.location.href = "new-detail.php?id=" + id;
}

function getPresse(id){
    document.location.href = "presse-detail.php?id=" + id;
}

function getSpezialisten(id){
    document.location.href = "spezialisten-detail.php?id=" + id;
}

function getLagernews(id){
    document.location.href = "lagernews-detail.php?id=" + id;
}

function getErfolg(id){
    document.location.href = "erfolg-detail.php?id=" + id;
}