/**
 cor-toolman.js
 @package      Core
 @copyright    Copyright (c) 2007 - 2009 Ragnar.cz. All rights reserved
 @license      GNU/GPL http://www.gnu.org/copyleft/gpl.html

 Albireo is free software!
*/
 
    var dragsort = ToolMan.dragsort ();
    var junkdrawer = ToolMan.junkdrawer ();
	

    function verticalOnly ( item ) {
	item.toolManDragGroup.verticalOnly();
    }

    function speak ( id, what ) {
	var element = document.getElementById ( id );
	element.innerHTML = 'Clicked ' + what;
    }

    function saveOrder ( item ) {
	var group = item.toolManDragGroup;
	var list = group.element.parentNode;
	var id = list.getAttribute ( "id" );
	if ( id == null ) return;
	group.register ( 'dragend', function () {
	    ToolMan.cookies ().set ( "list-" + id, junkdrawer.serializeList ( list ), 365 );
	});
    }