function showChildrenElements(className)
{
	YUI().use('node', 'anim', function(Y)
	{
		childrenElements = Y.all('.'+className);
		childrenElements.each(function(el)
		{
			childrenElement = el;
			childrenElement.setStyle('display','block');
			var animUp = new Y.Anim({
				node: childrenElement,
				from: { opacity: 0, height: 80},
				to: { opacity: 1, height: 80},
				duration: 0.6,
				easing: Y.Easing.easeNone
			});
			animUp.run();
		});
	});
}
function changeStadt(stadtId)
{
	YUI().use("io-base", function(Y) {
		var uri = rootUrl + "X=catalogue_blockEditorFromGeschaftenSelectGET";
		var cfg = {
			method: 'POST',
			data: 'stadtId=' + stadtId
		}
		function complete(id, o, args) {
			document.getElementById('d_changeEditor').innerHTML = o.responseText;
			listeGeschaftenGET(stadtId,0);
		};
		Y.on('io:complete', complete, Y, ['lorem', 'ipsum']);
		var request = Y.io(uri,cfg);
	});
}
function changeStadtFromGeschaft(stadtId)
{
	thisEditorId = document.getElementById('i_editorId').value;
	if ( parseInt(stadtId) > 0 && parseInt(thisEditorId) > 0 )
	{
		listeGeschaftenGET(stadtId,thisEditorId);
	}
}
function listeGeschaftenGET(stadtId,editorId)
{
	YUI().use("io-base", function(Y) {
		var uri = rootUrl + "X=catalogue_listeGeschaftenGET";
		var cfg = {
			method: 'POST',
			data: 'stadtId=' + stadtId + '&' + 'editorId=' + editorId
		}
		function complete(id, o, args) {
			document.getElementById('d_listeGeschaften').innerHTML = o.responseText;
			windowoptions();
			scrollContent();
		};
		Y.on('io:complete', complete, Y, ['lorem', 'ipsum']);
		var request = Y.io(uri,cfg);
	});
}
function changeEditorFromGeschaften(editorId)
{
	stadtId = document.getElementById('i_stadtId').value;
	if ( parseInt(editorId) > 0 && parseInt(stadtId) > 0 )
	{
		listeGeschaftenGET(stadtId,editorId);
	}
}
var parentCollectionElementId = '0';
function toggleParentCollectionElement(collectionElementId)
{
	document.getElementById('d_'+collectionElementId).style.backgroundColor='#316ac5';
	toggleCheckbox('i_parentId_'+collectionElementId);
	if ( parentCollectionElementId != collectionElementId )
	{
		document.getElementById('d_'+parentCollectionElementId).style.backgroundColor = '#FFFFFF';
		parentCollectionElementId = collectionElementId;
	}
}
function setArtikelTextStatus(status)
{
	YUI().use("io-base", function(Y) {
		var uri = rootUrl + "X=catalogue_setArtikelTextStatus";
	 	var cfg = {
			method: 'POST',
			data: 'status=' + status
		}
		var request = Y.io(uri,cfg);
	});
}
function blockEditorsSelectShow(kategorieId)
{
	YUI().use("io-base", function(Y) {
		var uri = serviceUrl + "X=catalogue_blockEditorsSelectGET";
	 	var cfg = {
			method: 'POST',
			data: 'kategorieId=' + kategorieId
		}
		function complete(id, o, args) {
			document.getElementById('d_blockEditorsSelect').innerHTML = o.responseText;
		};
		Y.on('io:complete', complete, Y, ['lorem', 'ipsum']);
		var request = Y.io(uri,cfg);
	});
}
