window.addEvent('domready', function()
{
	if ($('homenextcomment')) { $('homenextcomment').addEvent('click', function(_evt){ _evt = new Event(_evt).stop(); new  load_new_comment(this);}); }
});

var load_new_comment = new Class(
{
	ms_domain: 'http://www.osullivan-quebec.qc.ca',
	initialize: function(_obj_link)
	{
		//we just submitted our form, so we get the url where to submit to:
		var s_url = this.ms_domain + _obj_link.get('href');

		//we then send our ajax query:
		new Request.JSON({
			'url': s_url,
			onComplete: function(_obj, _s_text) 
			{
				//we set our values:
				$('comment_comment').set('html', _obj.commentaire);
				$('comment_name').set('html',_obj.name);
				$('comment_prog_name').set('html',_obj.programme_name);
				
				
				
			}
		}).post({
				'random': 'comment'
		});
	}
});