// <script>
	function ErstelleSortable() {
		Sortable.create('profilliste');

		document.getElementById('reorderlink').className = "hidden";
		document.getElementById('savelink').className = "";
		document.getElementById('saveform').className = "hidden";

		var links = document.getElementById('profilliste').getElementsByTagName('a');
		for (var i = 0; i < links.length; i++) {
			var link = links[i];
			link.setAttribute('oldhref', link.href);
			link.href = '';
		}

		new Effect.Highlight('reorderbox', '#DDF2BC', '#FFFFFF');
		new Effect.Highlight('profilliste', '#DDF2BC', '#FFFFFF');
	}

	function BeendeSortable() {
		poststring = Sortable.serialize('profilliste', {name:'liste'} );

		with ( document.getElementById('saveform') ) {
			action = "/profiles/sort/ordered";
			className = "";
		}

		with ( document.getElementById('profilliste') ) {
			var links = getElementsByTagName('a');
			for (var i = 0; i < links.length; i++) {
				var link = links[i];
					link.href = link.getAttribute('oldhref');
				}
		}

		document.getElementById('reorderlink').className = "";
		document.getElementById('savelink').className = "hidden";
		document.getElementById('liste').value=poststring;

		new Effect.Highlight('reorderbox', {startcolor:'#DDF2BC' });

		document.getElementById('saveform').submit();
	}