function getXMLDocument(strURL) 
{
	if (!document.all) 
	{
		try
		{
			var xmlDoc = document.implementation.createDocument('','xmlDocument',null);
  			var xmlHTTP = new XMLHttpRequest();
  			xmlHTTP.overrideMimeType("text/xml");
  			xmlHTTP.open("GET",strURL, false);
  			xmlHTTP.send(null);
  			xmlDoc=xmlHTTP.responseXML;
 		}
		catch(e)
		{}
 	} 
	else 
	{
  		try 
		{
   			xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
  		} 
		catch (e) 
		{ 
			xmlDoc = new ActiveXObject("Msxml.DOMDocument");
  		}
  		xmlDoc.async="false";
		xmlDoc.load(strURL); 		
 	} 
	return xmlDoc;
}

try
{
Document.prototype.selectNodes = function(XPath, XNode) {
if(!XNode) XNode = this;
this.ns = this.createNSResolver(this.documentElement);
this.qI = this.evaluate(XPath, XNode, this.ns, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
aResult = [];
for(i=0; i<this.qI.snapshotLength; i++)
aResult[i] = this.qI.snapshotItem(i);
return aResult;
}
Document.prototype.selectSingleNode = function(XPath, XNode) {
if(!XNode) XNode = this;
this.xI = this.selectNodes(XPath, XNode);
return (this.xI.length > 0)? this.xI[0] : null ;
}
Element.prototype.selectNodes = function(XPath) {
return this.ownerDocument.selectNodes(XPath, this);
}
Element.prototype.selectSingleNode = function(XPath) {
return this.ownerDocument.selectSingleNode(XPath, this);
} 
}catch(e)
{}




function processXMLDataToTable(xmlDoc,strFunction,strElements,strRealNames,lngBorder,strClassName,strMouseOver,strMouseOut,blnIncludeHeader,spanFiller,strObjectName)
{
	var strContent = "<table cellpadding=\"3\" cellspacing=\"0\" border=\"" + lngBorder + "\" "
		if(strClassName>"")
			strContent += "class=\"" + strClassName + "\">\n"
		else
			strContent += ">\n"
	var nodelist = xmlDoc.getElementsByTagName("Element");
	var arrElements = strElements.split(",");
	var arrRealNames = strRealNames.split(",")
	if(blnIncludeHeader)
	{
		strContent += "<TR  class=\"gridHeaderStyle\">\n"
		for(i=0;i<arrRealNames.length;i++)
		{
			if(i>0)
				strContent += "<TD><strong>" + arrRealNames[i].toUpperCase() + "</strong></TD>\n"
			else
				strContent += "<TD style=\"width:135px;\"><strong>" + arrRealNames[i].toUpperCase() + "</strong></TD>\n"
		}
		strContent += "</TR>\n"
	}
	document.getElementById(spanFiller).innerHTML = strContent
	for(i=0;i<nodelist.length;i++)
 	{
		strContent += "<TR  class=\"gridItemStyle\" style=\"cursor:hand\" "
		strContent += "onMouseOver=\"this.style.backgroundColor='"+strMouseOver+"'\" "
		strContent += "onMouseOut=\"this.style.backgroundColor='"+strMouseOut+"'\" onClick=\" "
		strContent += strFunction + "("
		for(z=0;z<arrElements.length;z++)
		{
			if(z>0)
				strContent += ","
			strContent +=  "'" + escape(nodelist[i].getAttribute(arrElements[z])) + "'"
		}
		strContent += "," + strObjectName  + ")\" >\n"
		for(z=0;z<arrElements.length;z++)
		{
			strContent += "<TD>"
			strContent += nodelist[i].getAttribute(arrElements[z])
			strContent += "</TD>\n"
		}
		strContent += "</TR>\n"
		window.status = i;
	}
	strContent += "</table>\n"
	document.getElementById(spanFiller).innerHTML = strContent
}

function processXMLDataToSelect(xmlDoc,strNameField,strValueField,strClassName,objSelect,strSelected)
{
	var nodelist = xmlDoc.getElementsByTagName("Element");
	for(i=0;i<nodelist.length;i++)
	{
		var opt = new Option(nodelist[i].getAttribute(strNameField),nodelist[i].getAttribute(strValueField));
		objSelect[objSelect.length] = opt;
		if(strSelected>"")
			if(objSelect[objSelect.length-1].value == strSelected)
			{
				objSelect[objSelect.length-1].selected=true;
			}
	}
}