	function submit_updater(dom_id, controller, contr_function, args) {

		new Ajax.Updater(dom_id, 'view_ax.php?submit__'+controller+'__'+contr_function+'__'+args,
        {
          method      : 'post',
          postBody    : 'mimeType=text/html',
          onFailure   : function(resp) {
                           alert('Fehler: ' + resp.responseText);
                        },
          onException : function(resp, exception) {
                           alert('Ausnahme ' + exception);
                        }
        });
	}

	function submit_request(controller, contr_function, args) {

		new Ajax.Request('view_ax.php?submit__'+controller+'__'+contr_function+'__'+args,
        {
          method      : 'post',
          postBody    : 'mimeType=text/html',
          onFailure   : function(resp) {
                           alert('Fehler: ' + resp.responseText);
                        },
          onException : function(resp, exception) {
                           alert('Ausnahme ' + exception);
                        }
        });
	}
	
	function open_movie(url) {
		video_window=open(url,"hoeren","toolbar=no, status=no, height=350, resizable=yes, menubar=no, scrollbars=yes, width=380");
		return false;
	}
	
	function show_image_of_gallery(gallery_id, tobj_id, img_h) {
		submit_updater("image_view_"+gallery_id,"image_ax_gallery","ax_show_image", tobj_id+"__"+gallery_id+"__"+img_h);
	}

	// Galerieliste mit Buchstaben
	document.observe('click', function (event, element) {

		if (element=event.findElement('.list_by_char')) {
			var param=element.readAttribute('rel');
			submit_updater('gallery_list','gallery','show_list',param);
			event.stop();
		};
		
		if (element=event.findElement('.gallery_list_link')) {
			var param=element.readAttribute('rel');
			submit_updater('gallery_list','gallery','show_detail',param);
			event.stop();
		};
		
		if (element=event.findElement('.gallery_browse')) {
			var param=element.readAttribute('rel');
			submit_updater('gallery_list','gallery','show_detail',param);
			event.stop();
		};
		
	});
