/**
 * @author gavinwilliams
 */
var DirectoryManager = function(){
	this.response = new Array();
	this.requestUrl = '/json/?controller=directory&method=search';
}

DirectoryManager.prototype.search = function(params){
	if (mapObj) {
		mapObj.showLoading();
	}
	$.getJSON(this.requestUrl, params, this.processResponse);
}

DirectoryManager.prototype.processResponse = function(response){
	if (mapObj) {
		mapObj.processResponse(response);
		mapObj.hideLoading();
	}
	
	if (tabDataManager) {
		tabDataManager.processResponse(response);
	}
}