//Element.prototype.getStyle=function(styleProp){
function addBookmark(url,title){
  var bookmark;
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

  // Blogger - Replace with <$BlogItemPermalinkURL$> 
  // MovableType - Replace with <$MTEntryPermalink$>
  // WordPress - <?php bloginfo('url'); ?>

  if (window.sidebar) { // Mozilla Firefox Bookmark
    bookmark='window.sidebar.addPanel(\''+title+'\', \''+url+'\',\'\');';
  }
  else if( window.external ) { // IE Favorite
//    bookmark='window.external.AddFavorite( url, title);';
    bookmark='window.external.AddFavorite(\''+url+'\', \''+title+'\');';
  }
  else if(window.opera && window.print) { // Opera Hotlist
    return false; 
  }
  document.write('<a href="javascript:'+bookmark+'");">Bookmark  This Page</a>'); 
  return false;
}
function getStyle(el,styleProp){
  var x=el;
  /*
  if (x.currentStyle)
    var y = x.currentStyle[styleProp];
  else if (window.getComputedStyle)
    var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
    */
    var y = (x.currentStyle) ? x.currentStyle[styleProp] : document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
  return y;
}
function testshowhide(){
  document.write('testinshowhide');
}
function showhidelayer(id)
{
  s=document.getElementById(id);
  if(s){ //to make sure that ID exists in the HTML page
    if(getStyle(s,'display')=="inline"||getStyle(s,'display')=="block"){
      s.style.display="none";
    }
    else if(getStyle(s,'display')=="none" && (s.tagName=="span"||s.tagName=="a")){
      s.style.display="inline";
    }
    else{
      s.style.display="block";
    }
  }
}
function shownhide(s,h){
  document.getElementById(s).style.display="block";
  document.getElementById(h).style.display="none";
}
function unsummarize(s,l){
  document.write('<span style="font-size:0.5em"><a href="#" onClick="shownhide(\'' +s+ '\',\'' +l+ '\')">(un)summarize</a></span>');
  //document.write('<span style="font-size:0.5em"><a href="#" onClick="showhidelayer(\''+s+'\');showhidelayer(\''+l+'\')">(un)summarize</a></span>');
}
