
Ext.onReady(function(){
    var win;
    var button = Ext.get('IngresarBtn');

    button.on('click', function(){
        Ext.get('Barra1_Ingreso1_UsuarioTxt').focus();
        // create the window on the first click and reuse on subsequent clicks
        if(!win){
            win = new Ext.Window({
                el:'IngresarWin',
                layout:'fit',
                width:180,
                height:115,
                closeAction:'hide',
                plain: true,

                items: new Ext.Container({
                    el: 'ContenidoWin',
                    deferredRender:false,
                    border:false
                })
            });
        }
        win.show(this);
//        setTimeOut("document.getElementById('Barra1_Ingreso1_UsuarioTxt').focus()", 1500);
    });
    
    var button2 = Ext.get('Barra1_Ingreso1_IngresarBtn2');    
	button2.on('click', function(){
		var win = document.getElementById('IngresarWin');
	    document.forms["Form1"].appendChild(win);
		__doPostBack('Barra1$Ingreso1$IngresarBtn2','')
    });
});
