function open_comment_form(message_id, thread, view)
{
	if (message_id == 0) { var real_message_id = 'comment_top'; }
	else { var real_message_id = "post_" + message_id; }
	var caller = document.getElementById(real_message_id);

	if (document.getElementById("replyflag" + message_id).value == 0)
	{
		document.getElementById("replyflag" + message_id).value = 1;
		var my_div = document.createElement("div");
		my_div.className = 'postDiv';
		my_div.setAttribute("id", "replydiv" + message_id);
		var markup = "<form method='post'>\n";
		markup += "<input type='hidden' name='sid' value='" + sid + "'>\n";
		markup += "<input type='hidden' name='nid' value='" + nid + "'>\n";
		markup += "<input type='hidden' name='comment_id' value='" + comment_id + "'>\n";
		markup += "<input type='hidden' name='parent' value='" + message_id + "'>\n";
		markup += "<input type='hidden' name='thread' value='" + thread + "'>\n";
		markup += "<input type='hidden' name='view' value='" + view + "'>\n";
		markup += "<div style=\" float: right; position: relative; right: 180px; font-size: 10px; color: #1774BF;\">Click <a href=\"/public/member/home\" style=\"text-decoration: underline; color: #418F3E;\">here</a> to update your account settings.</div>";
		
		markup += "Comment<br />\n";
		markup += "<textarea name = 'message' cols='60' rows='15' class='postMessage'></textarea><br />\n";
		markup += "<input type='submit' value='Submit Comment'><br />\n";
		markup += "<div style='margin-top: 6px; padding-top: 3px; border-top: 2px solid #ccc; font-size: 11px; color: #555;'>Please help keep our comment boards family friendly by reporting abusive or inappropriate comments.</div>";
		markup += "<div style='margin-top: 2px; font-size: 11px; color: #555;'>Read the KSL.com <a href='./?sid=160754&nid=250' style='color: #369; text-decoration: underline;'>Comment Board Guildlines</a>.</div>";
		//alert('sid:' + sid + ' nid:' + nid + ' comment_id:' + comment_id + ' parent:' + message_id + ' thread:' + thread + ' view:' + view);

		my_div.innerHTML = markup;
		caller.appendChild(my_div);
	}
	else
	{
		document.getElementById("replyflag" + message_id).value = 0;
		caller.removeChild(document.getElementById("replydiv" + message_id));
	}
}

