if (typeof(productLoaderObject) == 'undefined') 
{
	productLoaderObject = function()
    {
	    this.detailsContainer = '#productDetails';
	    this.loader = new eAJAXLoaderObject();
	    this.loading = false;
    }
}
productLoaderObject.prototype.load = function(id)
{
	if (!this.loading)
	{
		this.loading = true;
		
		this.remove();
		
		this.loader.show('Please wait...');
		
		var currentObject = this;		
		
		var postData = { __callHandler: 'loadDetails', 
		  		         id: id,
		  		       __ajaxEventUID: ajaxEventUID 
		};	
		
		$.post(selfUrl, postData,	
		function(responseData) { 
	  		currentObject.onGetResponse(responseData); 
		},
		'json');
	}
}
productLoaderObject.prototype.remove = function()
{
	$(this.detailsContainer).draggable("destroy");
	$(this.detailsContainer).remove();	
}
productLoaderObject.prototype.close = function()
{
	this.remove();
	this.loading = false;
}
productLoaderObject.prototype.hide = function()
{
	$(this.detailsContainer).hide();    
}
productLoaderObject.prototype.show = function()
{
	$(this.detailsContainer).show();    
}
productLoaderObject.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 != 0)
	{
		alert(responseData.Response.Message);
	}
	else
	{
		$('body').append(responseData.Response.Message);
		$(this.detailsContainer).center();
		//$(this.detailsContainer).draggable();
 	    //$(this.detailsContainer).css("cursor", "move"); 
	}
}