function initialize() 
{
	// initialize our DHTML history
	dhtmlHistory.initialize();
	// subscribe to DHTML history change events
	dhtmlHistory.addListener(historyChange);

	// if this is the first time we have
	// loaded the page...
	if (dhtmlHistory.isFirstLoad()) 
	{
		// start adding history
		dhtmlHistory.add("startaddress", 0);
		// start the entire thing going
		StartProcess();
	}
}

/** Our callback to receive history 
    change events. */
function historyChange(newLocation, historyData) 
{
	var historyMsg = historyData;

	if (newLocation == "complexObject") 
	{
		historyMsg =JSON.stringify(historyData);
	}
	debugMsg(
			"<b>A history change has "
			+ "occured:</b> "
			+ "newLocation="+newLocation
			+ ", historyData="+historyMsg);
	        
	// process the back
	ProcessBack(newLocation,historyMsg);
}

function debugMsg(msg) 
{
//alert(msg);
}

