
function clsAjax(){
	var iDiv;
	
	this.acquireXML=function(){
		};
	
	this.openFloatBox=function(sURL,e){
		iDiv = document.createElement('div');
		iDiv.setAttribute('id','iDiv');
		var browser = navigator.appName; 
		if(browser == "Microsoft Internet Explorer"){ 
			classProp="className";
		}else{ 
			classProp="class";
		} 
		iDiv.setAttribute(classProp,'clsGenPopUp');
		iDiv.setAttribute('type','text/html');
		iDiv.style.display='none';
		document.body.appendChild(iDiv);

		var theHandle = iDiv;
		var theRoot = iDiv;
		Drag.init(theHandle, theRoot);
		
		iDiv.innerHTML='Loading...';
		showon('iDiv',e);
	
		var xmlX = new HttpRequest();
		xmlX.onreadystatechangeXML=function(){
			iDiv.innerHTML=xmlX.responseText;
			}
		xmlX.openXML("post", sURL);
		xmlX.sendXML();
		return (iDiv);
	}
	
	this.closeFloatBox=function(){
		this.parentNode.removeChild(this);
		}
	return (true);
	}
	
//***************************************************************************************//
	goFloatBox=function(sURL,obj){
		
		obj.innerHTML='Loading...';
	
		var xmlX = new HttpRequest();
		xmlX.onreadystatechangeXML=function(){
			obj.innerHTML=xmlX.responseText;
			}
		xmlX.openXML("post", sURL);
		xmlX.sendXML();
		return (true);
	}

function loadAjaxContent(o,sURL){
		container = document.getElementById(o);
		var xmlX = new HttpRequest();
		xmlX.onreadystatechangeXML=function(){
			container.innerHTML=xmlX.responseText;
			}
		xmlX.openXML("get", sURL);
		xmlX.sendXML();
		return (true);
	
	return (true);
	}
	
//***************************************************************************************//
function HttpRequest() {
	var http;
	var objs;
	var sURL='';
	var responseText='';
	
    var browser = navigator.appName; 
	if(browser == "Microsoft Internet Explorer"){ 
		http = new ActiveXObject("Microsoft.XMLHTTP"); 
	}else{ 
		http = new XMLHttpRequest();
	} 
	
	this.onreadystatechangeXML=function(){
		return false;
	}
	this.openXML=function(method,pURL){
	    http.open('get', pURL);                 
		http.onreadystatechange= handleResponse;
		objs=this;
	    return (true);
	}
	this.sendXML=function(postdata){
    	http.send(null);
	}

	handleResponse=function() { 
    if(http.readyState == 4){ 
        objs.responseText = http.responseText; 
        objs.onreadystatechangeXML();
        }
    } 
}
