sections = ['group1','group2'];

function createLineItemSortables() {
	for(var i = 0; i < sections.length; i++) {
		Sortable.create(sections[i],{tag:'div',dropOnEmpty: true, containment: sections,only:'lineitem'});
	}
}

function destroyLineItemSortables() {
	for(var i = 0; i < sections.length; i++) {
		Sortable.destroy(sections[i]);
	}
}

/*
Debug Functions for checking the group and item order
*/
function setTopics() {
	var sections = document.getElementsByClassName('section');
	sections.each(function(section) {
		var sectionID = section.id;
		var order = Sortable.serialize(sectionID);
		document.forms[1].elements[sectionID].value = Sortable.sequence(section);
	});
	return false;
}
