Uwd.System.Logout = function() {
	if (!systemLogoutWin) {
		var system = window.system;
		var systemLogoutWin = new Ext.Window({
			title: Uwd.System.SystemLanguage.logout,
			layout:'fit',
			resizable: false,
			closable: false,
			draggable: true,
			proxy: false,
			width:200,
			height:134,
			closeAction:'hide',
			modal:true,
			plain: true,
			html: '<div style="background-color:#FBC5BB; border: none; height: 65px; padding: 5px;"><div class="logout-image"></div><span style="color: #000000">' + Uwd.System.SystemLanguage.logoutMsg + '<br />&nbsp;</span></div>',			
			buttons: [{
				text: Uwd.System.SystemLanguage.logout,
				handler: function(){
					Ext.Ajax.request({
						url: system.getBackendUrl(),
						method:'post',
						params: {
							controller: 'Login',
							basePath: 'system/',
							action: 'logout'
						},
						scope: this,
						success: function (result, request) { 
							window.location.reload();
						}.createDelegate(this),
						failure: function (result, request) { 
							Ext.MessageBox.alert(Uwd.System.SystemLanguage.error, Uwd.System.SystemLanguage.connectionError);
						}.createDelegate(this) 
					});
				}
			},{
				text: Uwd.System.SystemLanguage.buttonAbort,
				handler: function(){
					systemLogoutWin.hide();
				}
			}]
		});
		systemLogoutWin.show(this);
	}
};