// CLOSED-CMS ///////////////////////////////////////////////
/////////////////////////////////////////////////////////////
//                                                         //
// COPYRIGHT (C) 2009 T. Baerisch (AKHE-Websolutions)      //
// Dieses Script ist Bestandteil des AKHE-CMS              //
//                                                         //
// Du hast das Recht, das Script                           //
// EINMAL zu installieren und EINMAL zu betreiben. Du      //
// darfst es keinesfalls zum Verkauf anbieten, oder        //
// mehrfach installieren und betreiben. Der Quellcode darf //
// geändert werden und der Copyright Hinweis nicht entfernt//
// werden. Desweiteren übernehmen wir keine Haftung für    //
// Schäden, die durch die Scripte entstehen könnten.       //
//                                                         //
/////////////////////////////////////////////////////////////
////////////////////////////////////////////////// AKHE.DE //
/////////////////////////////////////////////////////////////
var pagedefjsx=pagedefjsy=0;
var pagedefjsclicked=0;
var pagedefjsaction="";
var pagedefjsparentchild="";
var pagemotherelement="";
function placeDiv(strId) {
	if(!core.isIE)
		document.getElementById('ajxload').focus();
	document.getElementById(strId).style.left = (core.mouseposx+5) +"px";
	document.getElementById(strId).style.top = (core.mouseposy+5) +"px";
}
function dragthis(strId,how)
{
	if(pagedefjsaction=="")
	{
		document.getElementById('body').appendChild(document.getElementById(strId));
		document.getElementById(strId).style.position='absolute';
		placeDiv(strId);
		pagedefjsaction=strId;
	}
}
function changeactiveparent(strId)
{
	pagemotherelement=strId;
}
function stopdrag()
{
	if(pagedefjsaction!="")
	{
		if(pagemotherelement==""){pagemotherelement="editierung";}
		document.getElementById(pagemotherelement).appendChild(document.getElementById(pagedefjsaction));
		document.getElementById(pagedefjsaction).style.left='0px';
		document.getElementById(pagedefjsaction).style.top='0px';
		document.getElementById(pagedefjsaction).style.position='relative';
		pagedefjsaction="";
	}
}
function calculatepagedef()
{
	var str=""
	var motherid="";
	for (var i=0; i<document.getElementById('inhalt').childNodes.length;i++)
	{
		motherid=document.getElementById('inhalt').childNodes[i].id;
		if(motherid)
		{
			str+="|"+motherid+"-";
			for(var x=0;x<document.getElementById(motherid).childNodes.length;x++)
			{
				str+=document.getElementById(motherid).childNodes[x].id+"-";
			}
		}
	}
	document.getElementById('inhaltcompl').value=str;
	document.getElementById('formular').submit();
}
function checkmark()
{
	if(pagedefjsaction==""){return true;}
	return false;
}
