function XMLParser(xmlDocument)
{
	this.className = 'XMLParser';
	this.xmlDocument = xmlDocument;
	this.nodeArray = new Array();
}

XMLParser.prototype.getNodeValue = function(nodeName) 
{
	if(this.xmlDocument.getElementsByTagName(nodeName).length > 0)
	{
		for (i = 0; i < this.xmlDocument.getElementsByTagName(nodeName).length; i++)
		{
			if(this.xmlDocument.getElementsByTagName(nodeName)[i].hasChildNodes())
			{
				var el = this.xmlDocument.getElementsByTagName(nodeName)[i];
				if (el.firstChild)
				{
					if (el.firstChild.nodeName.indexOf('text') > -1)
					{
						this.nodeArray.push(el.firstChild.nodeValue);
					}
					else
					{
						this.nodeArray.push(el);
					}
				}
				else
				{
					this.nodeArray.push(null);
				}
			}
		}

		var array = this.nodeArray;
		this.nodeArray = null;
		this.nodeArray = new Array();

		return array;
	}
	else
	{
		return null;
	}
}