﻿// JavaScript Document
window.onload = initialize;
    
function initialize() {
  dhtmlHistory.initialize();
  dhtmlHistory.addListener(historyChange);
  if (dhtmlHistory.isFirstLoad()) 
	{
   var currentLocation =dhtmlHistory.getCurrentLocation();
   historyChange(currentLocation,historyStorage.get(currentLocation));
  } 
	else
	{
		//alert('ssf');
	}
}
/** Our callback to receive history change
     events. */
function historyChange(newLocation,historyData)
{
	var historyItem=new Object(historyData);
	var goDefault=false;
	if(!(newLocation==null||newLocation==""))
	{
		if(!(historyItem.strQuery==null)||(historyItem.strQuery==""))
		{
			historyData.strQuery=historyData.strQuery.replace(/dotype/,"type");
			xmlSend('center',historyItem.strQuery);
		}
		else
		{goDefault=true;}
	}
	else
	{
		goDefault=true;
	}
	if(goDefault==true)
	{
		xmlSend('center',"mzid=2");
	}
}

