Ext.onReady(function(){

var win =function (src, x, y, ww) {
	src = src.replace('s_', "b_");
		return new Ext.Window({
			width: 200,
			height: 200,
			id: 'ws',
			resizable: false,
			shodow: false,
			style: 'border: 10px;',
			closable: false,
			html: '<img src="'+src+'" style="width:200px; height:200px;"></div>',
			baseCls: 'window-plain'
		}).setPosition(x, y).show();
	}
	var doAction2 = function()
	{
            if (Ext.getCmp('ws'))
{
		Ext.getCmp('ws').close();
}
	}
	var doAction = function(e, t)
	{
		if (t.id == "")
		{
			t.id=Ext.id();
		}
              var x = e.xy[0]+10;
              var y = e.xy[1]-210;
              var xy = x+', '+y;
              
		var ww = Ext.get(t.id)
		var sd = /files/;
		if (sd.test(t.src))
		{
			if (!Ext.getCmp('ws'))
			{
				win(t.src, x, y, ww);
			}
			else
			{

			}
		}

		
		
		  
		
	}
	//Ext.getBody().on('mouseover', doAction, null,{delegate:'img'});
	//Ext.getBody().on('mouseout', doAction2, null,{delegate:'img'});

	Ext.QuickTips.init();
});
