//call when page loads
window.onload = jumptoanchor;

//jumps to ancchor
function jumptoanchor()
{
  //test for anchor existence
  if(window.location && window.location.href.match(/#(\w.+)/))
  {
    //jump to anchor
    window.location.hash=window.location.href.match(/#(\w.+)/)[1]; 
  }
}// JavaScript Document