function AddCommentBox(id, comment_template) {
	this.id = id;
	this.comment_template = comment_template;
	this.listdiv = _('comments_'+id);
}

AddCommentBox.prototype.post = function() {
	var textbox = _('txt_'+this.id);
	var comment = textbox.value; 
	var time = 'just now (refresh page for replies)';
	addInnerHTML(this.listdiv, fillTemplate(this.comment_template, {'TEXT':comment, 'TIME':time}));
	textbox.value='';
	//hide('addcomment_'+this.id);
	
	// update count here
}
/*
function AddCommentBoxMulti(comment_template) {
	this.comment_template = comment_template;
}

AddCommentBoxMulti.prototype.post = function(id) {
	var listdiv = _('comments_'+id);
	var textbox = _('txt_'+id);
	var comment = textbox.value.replace(/\n/g,'<br />');
	var time = 'just now (refresh page for replies)';
	addInnerHTML(listdiv, fillTemplate(this.comment_template, {'TEXT':comment, 'TIME':time}));
	textbox.value='';
	
	// update count here
}*/
function mcl_AddComment(id) {
	ac = _('addcomment_'+id);
	cs = _('comments_'+id);
	if (ac.style.display=='none') {
		ac.style.display='block';
		cs.style.display='block';
	}
	_('txt_'+id).focus();
}
function toggleComments(id) {
	ac = _('addcomment_'+id);
	cs = _('comments_'+id);
	if (cs.style.display=='none') {
		cs.style.display='block';
		if (ac) {
			ac.style.display='block';
			setTimeout('ac.focus()',100);
		}
	} else {
		cs.style.display='none';
		if (ac) ac.style.display='none';
	}
}