var FotoPrintDocumentHelper = 
{
	appendChild: function(parent, child)
	{
		parent.appendChild(child);

		return child;
	},

	clearChildren: function(element)
	{
		if (element)
		{
			while (element.firstChild)
			{
				element.removeChild(element.firstChild);
			}
		}
	    
		return element;
	},

	createElement: function(nodeType, attributes)
	{
		var element = document.createElement(nodeType);

		for (var i in attributes)
		{
			element.setAttribute(i, attributes[i]);
			//element[i] = attributes[i];
		}

		return element;
	},

	createTextNode: function(text)
	{
		return document.createTextNode(text);
	},

	debug: function(msg)
	{
	},

	moveChild: function(newParent, child)
	{
		child.parentNode.removeChild(child);

		newParent.appendChild(child);

		return child;
	},

	toggleAlbumSelected: function(albumId, isSelected, className)
	{
		var albumElement = $(albumId);
		if (isSelected)
		{
			albumElement.className = className + ' ' + className + 'Selected';
		}
		else
		{
			albumElement.className = className;
		}
	}
}