
	var Xblock = Ext.extend(Ext.Panel,{
		initComponent:function()
		{
			
			this.shadow=false;
			this.frame=true;
			this.border=false;
			
			if(this.applyTo.dom.getAttribute('buttononly'))
			{
				this.collapsed=true;
				this.collapsible=false;
			}
			
			
			
			Xblock.superclass.initComponent.call(this);
			this.on('render',function(panel){
				//panel.el.addClass('x-block');
				if(this.collapsible){
					panel.el.addClass('x-block-collapsible');
				}
			});
			if(typeof window['block_construct_'+this.id]=='function') window['block_construct_'+this.id](this);
		},
		createGhost:function()
		{
				return Xblock.superclass.createGhost.call(this,Array.prototype.slice.call(arguments,0)).addClass('x-block');
		}
	});
	/*
  	Ext.onReady(function(){
		
		Ext.select('div.x-panel',true).each(function(el){
			new Xblock({
				applyTo:el,
				draggable:true
			});
		});
		
		//alert(document.body.innerHTML);
		var portalzone = new Ext.ux.PortalDropZone('cols',{
			colums:['cols'],
			itemSelector:'.x-panel'
		});
	});*/
