var DeleteProfileOverlay = function (id) {
	this.overlay = new Overlay(id, {	width: '350px',
										draggable: true,
										visible: false,
										zindex: 1000,
										fixedcenter: true,
										constraintoviewport: true
	});

	// Identifica un overlay a pił passi
	this.overlay.stepOverlay = true;
		
	this.show = function (anchorShow, text, anchorHide) {
		this.overlay.show(null, this.overlay.generateOverlay(text), null);
	};
	
	this.stepOne = function (overlay, profile_id) {
		this.overlay.scriptUrl = "http://" + conf.baseUrl + "/overlay_manager/elimina_profilo";
		var actionString = 'profile_id=' + profile_id;
		
		// definisce cosa fare nello step 2, in realtą chiama step 2
		this.overlay.setContentByAjax(actionString, null, null, this);
	};
	
	this.stepTwo = function (profile_id) {
		this.overlay.scriptUrl = "http://" + conf.baseUrl + "/gui_manager/elimina_profilo";
		var actionString = 'profile_id=' + profile_id;
		
		this.show(null, this.overlay.loaderContent.body, null);
		this.overlay.getResultByAjax(actionString, this, this.setBodyByResult);
	};
	
	this.setBodyByResult = function (obj, pResult) {		
		var responseText = pResult.header + pResult.body;		
		obj.show(null, responseText, null);		
		location.href = "http://" + conf.dynamicUrl;
	};
	
	
};