if (typeof GroupSearchForm == "undefined")
{
	GroupSearchForm = MooForm.extend({
			initialize: function (form) {
				this.parent(form, '/hamster.php', $('groupSearchFormMessage'));

				new BlankingInput(this.form.elements["q"], "Group Search");
			},

			onActionSuccess: function (result) {
				this.parent(result);

				this.message("Showing results, please wait...");
				location.href = "/group/?q="+ escape(result.data.q);
			}
		});

	window.addEvent('domready', function(){
			var nodes = $$('.groupSearchForm');
			for (var i = nodes.length; i--;)
				new GroupSearchForm(nodes[i]);
		});
}
