var currentId;
function show(id){
  
  if(document.getElementById)	 {
    var obj = document.getElementById('index_' + id);
    var obj2 = document.getElementById('ilink_' + id);
    if (obj && obj2) {
      if((currentId != null) && (currentId != id)) {
        var old_obj = document.getElementById('index_' + currentId);
        var old_obj2 = document.getElementById('ilink_' + currentId);
        old_obj.style.visibility = "hidden";
        old_obj.style.display = "none";
        old_obj2.style.color = "#134880";
      } 
      obj.style.visibility = "visible";         
      obj.style.display  = "block";   
      
      obj2.style.color = "#cccccc";
                
      currentId = id;
    }
  }
}

/* 
* Helper Function. Only called if returning to an opened view of the page
* Calls the show function with the letter to view parsed from the location
* bar
*/
function showOnLoad() {
  var id = location.hash.replace(/#view_/ ,'');
  show(id);
}

// pre-parser in case we're coming on a print view of bookmark. 
if (location.hash){      
  var id = location.hash.replace(/#view_/ ,'');
  var regex = /[a-z]/;
  if (id.match(regex)){
    // Coming to a hashed link of the page, call the helper
    // after a delay to ensure elements have loaded.
    document.onload = setTimeout(showOnLoad, 400);
  }
} else {
  currentId = 'a';
}
 