function toggleComments(id) {
	Effect.toggle('comments_'+id, 'blind');	
}

function postComment(id){
	var form_id = 'comment_form_'+id;
	$('comment_form_errors_'+id).innerHTML = "";
	
	
	var fields = $(form_id).getElements();
	
	var name = Form.Element.present(fields[0]);
	var email = Form.Element.present(fields[1]);
	var comment = Form.Element.present(fields[2]);
	
	if (name == 0 || email == 0 || comment == 0) {
		//blank field
		$('comment_form_errors_'+id).innerHTML = "Hmmm...I need all the fields filled out before you post a comment.";
		
	} else {
		
		new Ajax.Request('http://www.janegmeyer.com/actions/post_comment',
		{
			method:'post',
			parameters: $(form_id).serialize(true),
			onSuccess: function(transport){
			  $('comment_form_container_'+id).innerHTML = '<div class="comment_thanks"><b>Thanks for the comment!</b><br><i>(It\'s been submitted for approval.)</i></div>';
			},
			onFailure: function(){ 
			  $(form_id).enable();
			  $('comment_form_errors_'+id).innerHTML = "whoa buddy.  fill out the form right.";
			}
		});
		
		$(form_id).disable();
	}
}