var  win;
function showWindows(){
 var tpanels = new Ext.form.FormPanel({
		renderTo:'Tpanel',	
		width: 480,
		height:378,
		border:false,
		items: {
			    border:false,
    		    defaults:{autoHeight:true, bodyStyle:'padding:0px'}, 
				items:[
					{
					    contentEl:'panel1'
					}
				]
		}
	});
	
	var windows = new Ext.Window({
	        title: 'Обратный звонок',
	        width: 680,
	        height:285,
	        minWidth: 400,
	        minHeight: 300,
			resizable:false,
		    modal:true,
	        layout: 'fit',
			closeAction:'hide', 
	        plain:false,
	        bodyStyle:'padding:5px;',

	        buttonAlign:'center',
			items:tpanels,
			onEsc : function(){
				  windows.hide();
			}
	    });

	win = windows;
	windows.show();
}

function alluser(){
	Ext.MessageBox.show({
					       msg: 'Проверка , ждите...',
						   progressText: 'Загрузка...',
						   width:300,
						   wait:true,
						   waitConfig: {interval:200},
						   animEl: 'mb7'
						 });

		Ext.Ajax.request({
				  url:'/lib/mode/shop/form_order_phone.php',
				  method:'POST',
				  form:'form_phone',
				  success:function(response){
					  Ext.MessageBox.hide();
					  	 if (response.responseText=='true'){
							 Ext.MessageBox.hide();
							 win.hide();
							 document.form_phone.reset();
							}
							else {
							     //document.forms2.reset();
								 Ext.MessageBox.hide();
							     Ext.MessageBox.show({
							         title: '',
							         msg: response.responseText,
							         buttons: Ext.MessageBox.OK,
									 animEl: 'mb9',
								     icon:Ext.MessageBox.ERROR
							     });
							 }
					   }
							  
	});

}
