if (typeof(eSearchPanelObject) == 'undefined') 
{
    eSearchPanelObject = function(objectName, ajaxEventUID)
    {
    	this.objectName   = objectName;
    	this.ajaxEventUID = ajaxEventUID;
	    this.loader = new eAJAXLoaderObject();
    }
}
eSearchPanelObject.prototype.add = function(attrId, attrValue)
{
	this.loader.show('Please wait ...');
	
	var currentObject = this;
	
	var postData = { __callHandler: 'add', 
	  		         attrId: attrId,
	  		         attrValue: attrValue	  		          
	}; 
	postData[currentObject.objectName + '__ajaxEventUID'] = this.ajaxEventUID;
	
	$.post(selfUrl, postData,	
	function(responseData) { 
  		currentObject.onGetResponse(responseData); 
	},
	'json');
}
eSearchPanelObject.prototype.remove = function(attrId, attrValue)
{
	this.loader.show('Please wait ...');
	
	var currentObject = this;
	
	var postData = { __callHandler: 'remove', 
	  		         attrId: attrId,
	  		         attrValue: attrValue	  		          
	}; 
	postData[currentObject.objectName + '__ajaxEventUID'] = this.ajaxEventUID;
	
	$.post(selfUrl, postData,	
	function(responseData) { 
  		currentObject.onGetResponse(responseData); 
	},
	'json');
}
eSearchPanelObject.prototype.removeAll = function()
{
	this.loader.show('Please wait ...');
	
	var currentObject = this;
	
	var postData = { __callHandler: 'removeAll' }; 
	postData[currentObject.objectName + '__ajaxEventUID'] = this.ajaxEventUID;
	
	$.post(selfUrl, postData,	
	function(responseData) { 
  		currentObject.onGetResponse(responseData); 
	},
	'json');
}
eSearchPanelObject.prototype.onGetResponse = function(responseData)
{
	this.loader.hide();
	
    if ((typeof(showAJAXDebugInfo) != 'undefined') && responseData.PHPAJAXDebug != null) 
    {
        showAJAXDebugInfo(responseData.PHPAJAXDebug.Info, responseData.PHPAJAXDebug.Owner);
    }
	
	if (responseData.Response.Code == 1)
	{
		alert(responseData.Response.Message);
	}
	else
	{
	    var href = window.location.href;
	    window.location.href = href;
        //window.location.reload();	    
	}
}
