if (!document.lcboLibrary) {

	document.lcboLibrary = { 

		getXMLDocFromText : function(text) {
			var xmlDoc = null;
			if (window.DOMParser) {
				parser=new DOMParser();
				xmlDoc=parser.parseFromString(text,"text/xml");
			} else {
				xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
				xmlDoc.async="false";
				xmlDoc.loadXML(text); 
			}
			return xmlDoc;
		},
		
		isIE : function(){ 
			return (document.all ? true : false);
		}
  		    
	}
}

if (!document.lcboLibrary.Http) {
	
	document.lcboLibrary.Http = {
	
		getHttpRequest : function() {  
			if (window.XMLHttpRequest){  
				return new XMLHttpRequest();
			} else if (window.ActiveXObject) { 
				return new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		
	}
		       
	document.lcboLibrary.Http.AjaxRequest = function() {
		this._xmlHttp = document.lcboLibrary.Http.getHttpRequest();
		this.callback = null;   
		this.params = new Array(); 
	}  
		 
	document.lcboLibrary.Http.AjaxRequest.prototype.setParameter = function(param, val) {
		this.params[param] = val; 
	}  
		  
	document.lcboLibrary.Http.AjaxRequest.prototype.setCallBack = function(ref) {
		this.complete = ref; 
	}
  		  
	document.lcboLibrary.Http.AjaxRequest.prototype.call = function(url) { 
		var instance = this;
		this._xmlHttp.open('GET', url, true); 
 		this._xmlHttp.onreadystatechange =  function() {
			switch(instance._xmlHttp.readyState) {
				case 1:
					instance.loading();
					break;
				case 2: 
					instance.loaded();
					break;
				case 3:
					instance.interactive();
					break;
				case 4:    
					if(instance.complete) {
						instance.complete(instance._xmlHttp, instance.params);
					}
					break;
			}		
		}
		this._xmlHttp.send(null);
	}
		
	document.lcboLibrary.Http.AjaxRequest.prototype.loading = function() {
	}
	document.lcboLibrary.Http.AjaxRequest.prototype.loaded = function() {
	}
	document.lcboLibrary.Http.AjaxRequest.prototype.interactive = function() {
	} 
	document.lcboLibrary.Http.AjaxRequest.prototype.complete = function(request, params) { 
	}	  
				
} 

