function selectSingleNode(xmlDoc, elementPath)
{
//alert("selectSingleNode");
//alert(xmlDoc);
//alert(elementPath);
if(window.ActiveXObject)
	{
		return xmlDoc.selectSingleNode(elementPath);
        }
else
        {
		var xpe = new XPathEvaluator();
		var nsResolver = xpe.createNSResolver( xmlDoc.ownerDocument == null ? xmlDoc.documentElement : xmlDoc.ownerDocument.documentElement);
		var results = xpe.evaluate(elementPath,xmlDoc,nsResolver,XPathResult.FIRST_ORDERED_NODE_TYPE, null);
		//alert(results.singleNodeValue);
		return results.singleNodeValue; 
        }
}
