/**********************
 * SP_MyPopUpHandling
 *
 * @description Utility class for Imagehandling portlet
  * @params Object
 */
var SP_MyPopUpHandling = Class.create({
    initialize : function() {
        this.err = null;
        this.res = null;
        this.url = null;
          },
    setup : function() {
        var props = arguments[0] || {};
        this.err = $(props.err) || this.err;
        this.res = $(props.res) || this.res;
    },  
    getMyPopUp : function(url) {
    	try {
         var options = {
            method     : 'post',
            parameters : {},
            onSuccess  : this.onSuccessGetMyCases.bind(this),
            onFailure  : this.onFailure.bind(this)
        };
        new Ajax.Request(url, options);
    	}
    	catch (e)
    	{    		
    		alert ("Ett fel uppstod när datat skulle hämtas.");
    	}
    },    onSuccessGetMyCases : function(response) {   
    	
        if(this.err) this.err.hide();
        if(!this.res) return;
        this.res.innerHTML = response.responseText;
        
    },
    onFailure : function(response) {
    	
        if(this.err) this.err.show();
    }

});
