function Toggle(ObjectID, LObj)
{
	var Object = document.getElementById(ObjectID);

	if(Object.style.display == 'none')
	{
		Object.style.display = 'block';
		LObj.firstChild.alt = '-';
		LObj.firstChild.src = LObj.firstChild.src.replace('Open', 'Close');
	}
	else
	{
		Object.style.display = 'none';
		LObj.firstChild.alt = '+';
		LObj.firstChild.src = LObj.firstChild.src.replace('Close', 'Open');
	}
}

function MoveItems(from, to)
{
	var LFrom = document.getElementById(from);
	var LTo   = document.getElementById(to);
	var i, temp;

	for(i = LFrom.length-1; i >= 0; i--)
	{
		if(LFrom.options[i].selected)
		{
			temp = new Option(LFrom.options[i].text, LFrom.options[i].value);
			LTo.options[LTo.length] = temp;
			LFrom.options[i] = null;
		}
	}
}

function SelectAllItems(id)
{
	var Obj = document.getElementById(id);
	var i;

	for(i = Obj.length-1; i >= 0; i--)
	{
		Obj.options[i].selected = true;
	}
}

function getElementPos(elem)
{
	var x = 0;
	var y = 0;

	var E = elem;

	while(E != null)
	{
		x += E.offsetLeft;
		y += E.offsetTop;
		E = E.offsetParent;
	}

	this.X = x;
	this.Y = y;
}

function PSESTAR(arr) // PHP-Serialize String Array
{
	var data = "";

	for(var key in arr)
	{
		data += 's:'+key.length+':"'+key+'";s:'+arr[key].length+':"'+arr[key]+'";';
	}

	return 'a:'+arr.length+':{'+data+'}';
}