  window.dhtmlHistory.create({
		toJSON: function(o) {
			return Object.toJSON(o);       
		}
        , fromJSON: function(s) {
			return s.evalJSON();        
		}
  });
 
   var yourListenerA = function(newLocation, historyData) { 
	//var msg = "A history change has occured:\n oldLocation=" + oldLocation + "\n historyData=" + historyMsg ; 
	//var msg = "test";
	// myRestorePage(oldLocation, historyData) 
	new Ajax.Updater(historyData, newLocation, {asynchronous:true, evalScripts:true});; return false;
	//alert('test');
  }
  window.onload = function() {
		dhtmlHistory.initialize();
        dhtmlHistory.addListener(yourListenerA);
  };
