function Connexion(baseUrl)
{
	this._baseUrl = 'content.php';
	if(baseUrl) this._baseUrl = baseUrl;
	this._libUrl = 'include/js';
	this._parameters = new Hash();
	this.addParameter('get_action', 'xml_listing');
}

Connexion.prototype.addParameter = function (paramName, paramValue)
{
	this._parameters[paramName] = paramValue;	
}

Connexion.prototype.setParameters = function(hParameters)
{
	this._parameters = hParameters;
}

Connexion.prototype.sendAsync = function()
{	
	var oThis = this;
	new Ajax.Request(this._baseUrl, 
	{
		method:'get',
		onComplete:this.onComplete,
		parameters:this._parameters
	});
}

Connexion.prototype.loadLibrary = function(fileName, onLoadedCode)
{
	var oThis = this;
	new Ajax.Request(this._libUrl+'/'+fileName, 
	{
		method:'get',
		asynchronous: false,
		onComplete:function(transport){
			if(transport.responseText) 
			{
				try
				{
					var script = transport.responseText;					
				    if (window.execScript){	
				        window.execScript( script );
				    }
				    else{
						window.eval( script );
				    }
					if(onLoadedCode != null) window.setTimeout(onLoadedCode, 0);				        
				}
				catch(e)
				{
					alert(e);
					//errorWindow=window.open("", "", "height=500, width=600,toolbar=no,scrollbars=yes,menubar=no,resizable=yes");
					//errorWindow.document.write(transport.responseText);
				}
			}
		}
	});	
}
