var expectedHash="";
function makeHistory(newHash)
{
  window.location.hash = newHash;
  expectedHash = window.location.hash;
  return true;
}
function handleHistory()
{
  if ( window.location.hash != expectedHash )
  {
    expectedHash = window.location.hash;
	myAjaxEvent.connect(expectedHash.substring(expectedHash.lastIndexOf("#")+1),'pages','GET')
  }
  return true;
}

function pollHash() {
  handleHistory();
  window.setInterval("handleHistory()", 100);
  return true;
}
