
/* Neuen MSG auf dem Userboard anzeigen */
function comment_new()
{
		var data 	= Form.serialize('new_comment_msg');
		new Ajax.Request('http://www.wo-war-ich-schon.de/function/function_comment.php', 
									{
										method:			'post', 
										onComplete: 	newCommentMsg,
										asynchronous:	true, 
										evalScripts:	true, 
										parameters: 	data
									}); 
}

// einfügen und hochzhälen
function newCommentMsg(requestObject)
{
	new Insertion.Bottom('commentBoard',requestObject.responseText);

	var anzahl 		= new Number($('countComment').innerHTML);

	Element.update('countComment',anzahl+1);
}

// löschen und runterzählen
function comment_del(id, del)
{
	Effect.SwitchOff('comment_board_'+id);

	var data = 'comment_id='+id+'&del='+del;

	new Ajax.Request('http://www.wo-war-ich-schon.de/function/function_comment.php',
	{
		method:	   		'post',
		asynchronous:	true,
		onComplete:		comment_del_count,
		evalScripts:	true,
		parameters: 	data
	});
}

// runterzählen
function comment_del_count()
{
	var anzahl 		= new Number($('countComment').innerHTML);

	Element.update('countComment',anzahl-1);

}


function del_Text()
{
	Element.update('text','');
}


