      function preview(filename, width, height)
      {
        preview_window = window.open('', '_blank', 'width=' + width + ',height=' + height);
        preview_window.document.write('<html><head><style type="text/css">body { margin: 0; }</style></head><body onblur="window.close();">');
        preview_window.document.write('<img name="theimage" src="' + filename + '" width="' + width + '" height="' + height + '" />');
        preview_window.document.write('</body></html>');
        preview_window.document.close();      
      } 
      
      function tagExternalLinks()
      {
        var anchors = document.getElementsByTagName('A');
        for (var i = 0; i < anchors.length; i++)
        {
          if (anchors[i].rel == 'external')
          {
            anchors[i].onclick = function() { return confirm('You will now leave this website, are you sure?'); }
          }
        }
      }
      

function addToFavorites() 
{ 
  var urlAddress = top.location.href; 
  var pageName = document.title; 

  if (window.external) 
  { 
    window.external.AddFavorite(urlAddress, pageName) 
  } else 
  { 
    alert("Sorry! Your browser doesn't support this function."); 
  } 
}
