
function nodeToXML (node)
{
	result = "";	
	if (node.nodeType == 1)
	{
		result += "<"+node.tagName.toLowerCase()+" ";
		for (var i = 0; i < node.attributes.length; i ++)
		{
			if (node.attributes[i].value != null && node.attributes[i].value != "null" && node.attributes[i].value != "")
				result += node.attributes[i].name.toLowerCase() + "=\""+node.attributes[i].value+"\" ";
		}
		
		result += ">";
		for (var i = 0; i < node.childNodes.length; i ++)
		{
			result += nodeToXML(node.childNodes[i]);
		}
		result +="</"+node.tagName.toLowerCase()+">"
	}
	else if (node.nodeType == 3)
	{
		result += node.nodeValue;
	}
	
	return result;
}

function changeHeight (targetId, height)
{
	setStyleById(targetId, 'height', height+'px');
}

function changeWidth (targetId, width)
{
	setStyleById(targetId, 'width', width+'px');
}

function changeSize (targetId, width, height)
{
	changeHeight(targetId, width);
	changeWidth(targetId, height);
}

function getElem (elemId) {
	return document.getElementById(elemId);	
}