var msg_poster=Array();
function quotePost(post_id) {
	
	msg		=	document.getElementById("msg"+post_id).innerHTML;
	// fix quotes
	msg		=	msg.replace(/(<\/blockquote>)/ig, "[/quote]");
	msg		=	msg.replace(/(<blockquote><cite>)/ig, "[quote=");
	msg		=	msg.replace(/(<\/cite>)/ig, "]");
	msg		=	msg.replace(/(<blockquote>)/ig, "[quote]");
	
	// kill html
		// fix for ie not recognizing pre-existing newlines!
			msg = msg.replace(/(\n|\r)/ig, "");
			msg = msg.replace(/(<BR\/>)/ig, "\r\n");
			msg = msg.replace(/(<BR \/>)/ig, "\r\n");
			msg = msg.replace(/(<BR>)/ig, "\r\n");

	msg		=	msg.replace(/(<([^>]+)>)/ig, "");
		
	// take care of newlines (for ie compatibility)
	//	msg		=	msg.replace();
	
	msg		=	"[quote="+msg_poster[post_id]+"]"+msg+"[/quote]";

	if (document.getElementById("post_content").value)	
		document.getElementById("post_content").value=document.getElementById("post_content").value+'\n\n'

	document.getElementById("post_content").value= document.getElementById("post_content").value+msg+'\n\n';
	
	if (location.hash!="#post")
		location.hash="#post";
	
	 document.getElementById("post_content").focus();	

} // END FUNCTION: quotePost
