function genericXmlManager() {
	/* give it a URL that will return XML, like an RSS feed, and it will wrap it up in a JSON object and spit it back to you. */
	
	this.getXmlAsData = function( urlLocation, handler ) {
		if( !urlLocation || !handler){
			return;
		}
		this.sendMessage( rhapsodyURL + "/" + urlLocation, handler);	
	};
	
	this.getXmlAsDataViaPost = function( urlLocation, handler ) {
		if( !urlLocation || !handler){
			return;
		}
		this.sendMessagePost( rhapsodyURL + "/" + urlLocation, handler);	
	};
    this.MSGCOUNT = 0;
	this.sendMessage = function( url,  callback){
          var wrappedCallback = function (requestObj, emptyData) {
              
				if(requestObj.status == 200){
					var text = requestObj.responseText;
					if (text.substring(0,2) == "[{"){
						var data = eval(text);
					} else {
						var data = eval('('+text+')');
					}
					callback(data);
				} else {
					var data = new Array();
					data.exception = new Array();
					data.exception.message="Bad response from ajax request. "
					data.exception.code=requestObj.status
					callback(data);
					return;
				}
			}
            
            new Ajax.Request( url,{
			    onSuccess: wrappedCallback,
			    method: 'get'});
	}
	this.sendMessagePost = function( url,  callback){
          var wrappedCallback = function (requestObj, emptyData) {
              	if(requestObj.status == 200){
					var text = requestObj.responseText;
					if (text.substring(0,2) == "[{"){
						var data = eval(text);
					} else {
						var data = eval('('+text+')');
					}
					callback(data);
				} else {
					var data = new Array();
					data.exception = new Array();
					data.exception.message="Bad response from ajax request. "
					data.exception.code=requestObj.status
					callback(data);
					return;
				}
			}
            new Ajax.Request( url,{
			    onSuccess: wrappedCallback,
			    method: 'post'
			});
	}
}



