var loadedobjects=""
var rootdomain="http://"+window.location.hostname


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)
		{
		alert(e)
		}
 	} 
	else 
	{
  		try 
		{
   			xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
  		} 
		catch (e) 
		{ 
			xmlDoc = new ActiveXObject("Msxml.DOMDocument");
  		}
  		xmlDoc.async=false;
		xmlDoc.load(strURL); 		
 	} 
	return xmlDoc;
}

function getDocumentAsText(strURL) 
{
	if (!document.all) 
	{
		try
		{
		    var strContent = ""
			var xmlDoc = document.implementation.createDocument('','xmlDocument',null);
  			var xmlHTTP = new XMLHttpRequest();
  			xmlHTTP.overrideMimeType("text/xml");
  			xmlHTTP.open("GET",strURL, false);
  			xmlHTTP.send(null);
  			strContent=xmlHTTP.responseText;
 		}
		catch(e)
		{}
 	} 
	else 
	{
  		try 
		{
   			xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
			xmlHTTP = new ActiveXObject("Msxml2.XMLHTTP");
  		} 
		catch (e) 
		{ 
			xmlDoc = new ActiveXObject("Msxml.DOMDocument");
			xmlHTTP = new ActiveXObject("Msxml.XMLHTTP");
  		}
  		xmlHTTP.open("GET",strURL, false);
  		xmlHTTP.send(null);
  		strContent = xmlHTTP.responseText;
 	} 
	return strContent;
}

   function getNodeText(xmlDoc,nodeName,altVal)
   {
   		if(xmlDoc.selectSingleNode(nodeName)!=null&&xmlDoc.selectSingleNode(nodeName).text!=null)
		{
			return xmlDoc.selectSingleNode(nodeName).text;
		}
		else
		{
			return altVal;
		}
   }
   
   function getNodeAttribute(xmlDoc,nodeName,attName,altVal)
   {
   		if(xmlDoc.selectSingleNode(nodeName)!=null)
		{
			return (xmlDoc.selectSingleNode(nodeName).getAttribute(attName)!=null?xmlDoc.selectSingleNode(nodeName).getAttribute(attName):altVal);
		}
		else
		{
			return altVal;
		}
   }
   
 