function  getServices(){
			
			var buttons=$.ajax({
				  url: "js_wrapper.php?mod=inet&act=buttons",
				  async: false
				 }).responseText;

			var r_menu=$.ajax({
				  url: "js_wrapper.php?mod=inet&act=r_menu",
				  async: false
				 }).responseText;

			var fields = [
							{name: 'id'},
							{name: 'login'},
							{name: 'pname'},
							{name: 'pay_day'},
							{name: 'vname'},
							{name: 'ip'},
							{name: 'mac'},
							{name: 'status'}
						];
						
			var mapping = [
							{name: 'id', mapping: 'id'},
							{name: 'login', mapping: 'login'},
							{name: 'pname', mapping: 'pname'},
							{name: 'pay_day', mapping: 'pay_day'},
							{name: 'vname', mapping: 'vname'},
							{name: 'ip', mapping: 'ip'},
							{name: 'mac', mapping: 'mac'},
							{name: 'status', mapping: 'status'}
						];	
						
						
			var columns = 	[
								{
									header: '#',
									dataIndex: 'id',
									hidden: true,
									sortable: true
								},{
									header: 'Логин',
									dataIndex: 'login',
									sortable: true
								},{
									header: 'Пакет',
									dataIndex: 'pname',
									sortable: true
								},{
									header: 'Расчётный период',
									dataIndex: 'pay_day',
									sortable: true
								},{
									header: 'Vlan',
									dataIndex: 'vname',
									sortable: true
								},{
									header: 'IP-адрес',
									dataIndex: 'ip',
									sortable: true
								},{
									header: 'MAC-адрес',
									dataIndex: 'mac',
									sortable: true
								},{
									header: 'Статус услуги',
									dataIndex: 'status',
									sortable: false
								}
							];					
		
		var store = new Ext.data.GroupingStore({
				remoteSort: true,
				sortInfo:{field: 'id', direction: "DESC"},
				proxy: new Ext.data.HttpProxy({
					url: "wrapper.php?mod=inet&act=get"
				}),
				reader: new Ext.data.JsonReader({
					root: 'data',
					id: 'id',
					totalProperty: 'totalCount',
					fields: fields
				},
					mapping
				)
			});
		
		var grid = new Ext.grid.GridPanel({
			id: 'grid-internet-',
			region: 'center',
			closable: true,
			store: store,
			groupField:'id',
			columns:columns,
			view: new Ext.grid.GroupingView({
				forceFit:true,
				groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
		    }),
			sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
			iconCls: "inet-world-link",
			title: 'Услуги Интернет',
			loadMask: {
				msg: "Получение данных..."
			},
			tbar: eval(buttons),

			bbar: new Ext.PagingToolbar({
				pageSize: 50,
				store: store,
				displayInfo: true,
				displayMsg: 'Отображаемые записи {0} - {1} of {2}',
				emptyMsg: "Нет записей"
			}),
			onContextClick: function(grid, index, e){
			var row=grid.getSelectionModel().getSelected();
			
			this.menu = new Ext.menu.Menu({
			id: 'grid-ctx',
			items: eval(r_menu)
					});
					
					e.stopEvent();
					this.menu.showAt(e.getXY());
				},
			view: new Ext.grid.GroupingView({
	            forceFit:true,
	            showGroupName: false,
	            enableNoGroups:false, // REQUIRED!
	            hideGroupedColumn: true
	        })
		});
			grid.on('rowcontextmenu', grid.onContextClick, grid);
				function submitSearch() {
		        var params=store.lastOptions.params;
		        params['no_validation']='';
		        params['start']=0;
		        var fFields=searchForm.getForm().getValues();
		        for(var f in fFields){     
		        	params[f]=fFields[f];
		        }
				store.reload({params: params});			
			}	    
		
			var panelCol1 = new Ext.Panel({  
				layout:'form',
				width: 170, 
				items: [{
						xtype:'textfield',
						hideLabel: true,	
						name: 'login',
						anchor:'100%',
						emptyText:'Логин',
						fireKey: function(e){if (e.getKey() == e.ENTER) { submitSearch(); } }
					},{
						xtype:'textfield',
						hideLabel: true,	
						name: 'ip',
						anchor:'100%',
						emptyText:'IP-адрес',
						fireKey: function(e){if (e.getKey() == e.ENTER) { submitSearch(); } }
					},{
						xtype:'textfield',
						hideLabel: true,	
						name: 'mac',
						anchor:'100%',
						emptyText:'МАС-адрес',
						fireKey: function(e){if (e.getKey() == e.ENTER) { submitSearch(); } }
					}
				]
			}); 
			
		    var searchForm = new Ext.FormPanel({
				titlebar: false, 
		        title: 'Поиск',
		        collapsible:true,
		        collapsed:true,
		        autoHeight: true,
		        split:true,
				width: 180,
				defaults:{autoHeight:true}, 
		    	frame:true,
		        region: 'east',
		        layout:'column',
				items:[panelCol1],
		        buttons:[{
		        	text: 'Искать',
		        	handler: function(){
						submitSearch();
		        	}
		        },{
		        	text: 'Сбросить',
		        	handler: function(){
		        		searchForm.getForm().reset();
		        		store.reload({params: {start: 0, limit: 50}});
		        	}
		        }]
		    });
		
		    var panel= {
		    	id: 'panel-internet-',
				title: 'Услуги Интернет',
				iconCls: 'inet-world-link',
				closable: true,
				layout:'border',
				items:[searchForm,grid]
			};
			
		var tp = Ext.getCmp('main-tabs');
		tp.add(panel).show();
		tp.doLayout();
		
		store.load({
			params: {
				start: 0,
				limit: 50
			}
		});
	}