Edit in JSFiddle

var map;

//Create a map with an empty array of controls
map = new OpenLayers.Map('map_element', {
    controls: [
	    new OpenLayers.Control.Navigation(),
		new OpenLayers.Control.PanZoomBar(),
		new OpenLayers.Control.LayerSwitcher()],
	//panMethod: OpenLayers.Easing.Quad.easeInOut,
	panMethod : OpenLayers.Easing.Expo.easeOut,
	panDuration: 100

//Create a base layer
var wms_layer_all = new OpenLayers.Layer.WMS(
    'OpenLayers WMS',
	'http://vmap0.tiles.osgeo.org/wms/vmap0', {
	layers: 'basic'
}, {});


if (!map.getCenter()) {

<div id='map_element' style='width: 400px; height: 400px;'></div>


External resources loaded into this fiddle: