////////////////////////////////////
function getHTTPObject() {
		try 
		{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e){
			try
			{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch (E){
				xmlhttp = false;
			}
		}
		
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			try 
			{
				xmlhttp = new XMLHttpRequest();
			}catch (e){
				xmlhttp=false;
			}
		}
		
		if (!xmlhttp && window.createRequest) 
		{
			try
			{
				xmlhttp = window.createRequest();
			}catch (e){
				xmlhttp=false;
			}
		}
		return xmlhttp;
}

function ReturnHtml() 
{
	if (http.readyState == 4) {
		isWorking = false
		if (http.responseText.indexOf('invalid') == -1) {
			var xmlDocument = http.responseXML;
			
			//Return the edit form via the XML
			var FormHtml = xmlDocument.getElementsByTagName('FormHtml').item(0).firstChild.data;
			//Return the Div Id 
			var DivId = xmlDocument.getElementsByTagName('DivId').item(0).firstChild.data;
			//Select the correct container using the id retrieved from the XML and populate the edit form			
			if(document.getElementById(DivId).innerHTML != 'undefined') document.getElementById(DivId).innerHTML = FormHtml;
			isWorking = false;
		}else{
		//If the xml was not return we do nothing YET.  Probably will do some error trapping.
		}

	}
}
function DeadFunction()
{
	isWorking = false;
}

var http = getHTTPObject(); // We create the HTTP Object