var show_editform = 0;
function ShowEditField(cont, post) {
	if(show_editform == 0) {
		document.getElementById("post" + post).innerHTML = '<textarea name="post' + post + '" style="width:99%; height:300px;">' + cont + '</textarea><br /><br /><center><input type="button" value="&Auml;nderungen speichern" onclick="" /></center><br /><br />';
		var oFCKeditor = new FCKeditor('post' + post);
		oFCKeditor.BasePath = "_system/js/fckeditor/";
		oFCKeditor.ReplaceTextarea();
		show_editform = 1;
	}
	else {
		document.getElementById("post" + post).innerHTML = '';
		show_editform = 0;
	}
}

/*
AjaxEditPost = new NewAjax();
var PostToEdit;
function EditPost(post, user, md5) {
	if(post && user) {
		PostToEdit = post;
		var action = 'show_editfield';
		AjaxEditPost.open("POST", '_system/ajax_inc/forum.php', true);
		AjaxEditPost.onreadystatechange = ShowEditField;
		AjaxEditPost.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		AjaxEditPost.send("action=" + action + "&post=" + post + "&user=" + user + "&md5=" + md5);
	}
}*/
