Ext.onReady(function() {
    var tilecacheBbox = new OpenLayers.Bounds(94.4,1.7,98.9,6.0);
    var map = new OpenLayers.Map({'maxExtent': tilecacheBbox,'maxResolution': 0.0087890625,controls: []});
    var layer = new OpenLayers.Layer.WMS("Base", "http://gdc.acehprov.go.id:81/cgi-bin/TileCache/tilecache.cgi?",{
		layers: 'base_dem',
		format: 'image/png'
	}, {
		isBaseLayer: true
	});

    map.addLayer(layer);
	
	var ctrl, toolbarItems = [], action, actions = {};
    // ZoomToMaxExtent control, a "button" control
    action = new GeoExt.Action({
		control: new OpenLayers.Control.ZoomToMaxExtent(),
		map: map,
		//text: "max extent",
		tooltip: "zoom to max extent",
		iconCls: 'extent'
	});
	actions["max_extent"] = action;
    toolbarItems.push(action);
    toolbarItems.push("-");
	
	    action = new GeoExt.Action({
			//text: "nav",
			control: new OpenLayers.Control.Navigation(),
			map: map,
			// button options
			toggleGroup: "draw",
			allowDepress: false,
			pressed: false,
			tooltip: "navigate",
			// check item options
			   group: "draw",
			//checked: true
			iconCls:'pan'
		});
    actions["nav"] = action;
    toolbarItems.push(action);
	toolbarItems.push("-");
	
	 action = new GeoExt.Action({
			//text: "Zoom In",
			control: new OpenLayers.Control.ZoomBox(),
			map: map,
			// button options
			toggleGroup: "draw",
			allowDepress: false,
			pressed: false,
			tooltip: "zoom in",
			// check item options
			group: "draw",
			checked: false,
			iconCls: 'zoom-in'
		});
    actions["Zoom-in"] = action;
    toolbarItems.push(action);
	toolbarItems.push("-");
	
	action = new GeoExt.Action({
			//text: "Zoom Out",
			control: new OpenLayers.Control.ZoomBox({
				out: true
			}),
			map: map,
			toggleGroup: "draw",
			allowDepress: false,
			pressed: false,
			tooltip: "zoom Out",
			group: "draw",
			checked: true,
			iconCls:'zoom-out'
		});
    actions["Zoom-out"] = action;
    toolbarItems.push(action);

    mapPanel = new GeoExt.MapPanel({
       // title: "GeoExt MapPanel",
        renderTo: "mappanel",
        height: 500,
        width: 500,
        map: map,
		tbar: toolbarItems
        //center: new OpenLayers.LonLat(94.4,1.7,98.9,6.0),
       // zoom: 4
    });
});

// functions for resizing the map panel



