/*----------------------------------------------------------------------------------*//*----------------------------------------------------------------------------------*//*----------------------------------------------------------------------------------*/function Ajax(strURL, fnCallback, strOverrideMime, strMethod, objCaller)
{
  //Properties
  this.m_URL = strURL;
  this.m_Callback = fnCallback; 
  this.m_Request = null;
  this.m_OverrideMime = strOverrideMime;
  this.m_Method = strMethod;
  this.m_Caller = objCaller;
  
  //Methods
  this.Get = Get;
  //Create instance of request object
	if (window.XMLHttpRequest)
	{
		this.m_Request = new XMLHttpRequest();
		if (this.m_Request.overrideMimeType && this.m_OverrideMime!="") 
		{
			this.m_Request.overrideMimeType(this.m_OverrideMime);
		}
	} 
	else if (window.ActiveXObject) 
	{
		try 
		{
			this.m_Request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e)
		{
			try 
			{
				this.m_Request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
  }
  var objRequest = this.m_Request;
  //Set the callback function for the request
	this.m_Request.onreadystatechange = function(){fnCallback(objRequest, objCaller)};
}
function Get()
{
		//Open the connection
		this.m_Request.open(this.m_Method, this.m_URL, true); 
		//Send the request
		this.m_Request.send(null); 
}

function GetNodeText(objXMLNode) {
	var strText = (objXMLNode.nodeValue ? objXMLNode.nodeValue : "");
	for (var i = 0; i < objXMLNode.childNodes.length; ++i) {
		var objChildNode = objXMLNode.childNodes[i];
		//Concateniamo eventuali CDATA o TEXT
		if (objChildNode.nodeType == 3 || objChildNode.nodeType == 4)
			strText += GetNodeText(objChildNode);
	}

	return strText;
}
function GetNodeID(objNode) {
	//No ID if no node
	if (!objNode)
		return "";
	var strNodeID = GetAttribute(objNode, "ID");
	return strNodeID;
}
