function getDetails(obj) {
    var details = new Ext.Panel({
    	id: 'file_details',
    	hidden:false,
        title:'',
        border: false,
        bodyStyle: 'padding:15px;',
		autoHeight: true,
		autoScroll: !repositoryFrontend,
		tbar: [
			{
	    		text    : jsModule.download,
	    		iconCls : 'edit-download',
	    		scope   : this,
	    		handler : function () {
	    			Download(obj);
//	    			window.location = '/repositories/download/'+obj.itemId;
	    		}
	    	},{
	    		text    : jsModule.edit_file,
	    		iconCls : 'edit',
	    		scope   : this,
	    		hidden	: !acos.fr_edit,
	    		href	: 'Javascript:;',
	    		handler : function(){
	    			Ext.History.add(obj.itemId+TD+Tokens.edit+TD+obj.itemName);
	    		}
	    	},{
	    		text    : jsModule.rate_file,
	    		iconCls : 'gold_star',
	    		scope   : this,
	    		href	: 'Javascript:;',
	    		handler : function(){
	    			RateItem(obj.itemId,'repository','file','ratingImgId','ratingVotesId',true);
	    		}
	    	},{
	    		text    : jsModule.manage_comments,
	    		iconCls : 'comment',
	    		scope   : this,
	    		hidden	: !acos.fr_comments,
	    		handler : function() {
	    			var handler = function() {
	    				details.fireEvent('show');
	    			}
	    			var commentsWindow = Comments('repository',obj.itemId,obj.siteId,handler);
	    			commentsWindow.show();
	    		}
	    	},
			(!repositoryFrontend)?
			{xtype: 'box',
			 autoEl: {
					tag: 'div',
					style: 'cursor:pointer; padding-left:10px; font-weign:bold',
					id: 'details_bradcrumbs_container',
					html: '<a onclick="Ext.History.add(\'#\')">All Files</a>'
				}
			}:{hidden:true}
		],
        listeners:{
        	'render':{
        		fn: function () {
        			// get item ID from token
    				if(obj.itemId){
//		        			this.el.mask("Loading...",'x-mask-loading');
	        			Ext.Ajax.request({
							url: '/repositories/getDetails/'+obj.itemId,
							scope: this,
							method:'POST',
							params: {},
							success: function(response, options) {
//									this.el.unmask();
								var data = Ext.decode(response.responseText);
								var html = data.html;
								obj.req_email=data.req_email;
								createBreadcrumbs(Ext.decode(response.responseText).breadcrumbs,'details_bradcrumbs_container');
								
								this.add({
									xtype:'box',
									autoEl:{tag:'div', id:'repositoryItemDetails', html:html}
								});
								this.doLayout();
							}
						});
    				}
        		}
        	}
        }
    });
    
    if (repositoryFrontend) {
		details.render('repository_container');
	} else {
		viewport.add(details);
		viewport.doLayout();
	}
}