function loadComments(element, dir, file) {
	Effect.toggle(element, 'blind', {
		beforeStart : function() {
			if($(element).style.display == 'none') {
				new Ajax.Updater(element, '/comments/show/?noLayout=true&content=' + dir + '/' + file, {
					onCreate : function() {
						$(element).update('Kommentare werden geladen! Bitte warten...');
					}
				});
			}
		}
	});
}

function sendComment(element, url) {		
	new Effect.BlindUp(element, {
		afterFinish: function() {
			$(element + 'Loading').style.display = 'block';
			$(element + 'Loading').update('<img src="/images/ajaxload.gif" alt="" title="" /> Kommentar wird überprüft! Bitte warten...');
			new Ajax.Updater(element + 'Container', url, {				
				parameters: 'name=' + $F('name') + '&email=' + $F('email') +
							'&title=' + $F('title') + '&comment=' + $F('comment') +
							'&userCaptcha=' + $F('userCaptcha'),				
				onComplete: function(transport) {
				$(element).update(transport.responseText);
					new Effect.BlindDown(element, {						
						beforeSetup: function() {
							$(element + 'Loading').style.display = 'none';
							$(element + 'Loading').update('');
						}
					});					
				}
			});			
		}
	});
}