// Bookmark Web Page Functionality
// Supports Windows IE5+, Netscape 6+, Firefox, Opera 7+, Safari, Macintosh IE5, iCab 3, Konqueror 3

function bookmarkURL(url, title) {
    var Konqueror=(Konqueror3 && Konqueror3());
    var Macintosh=(navigator.userAgent.toLowerCase().indexOf('mac')!=-1);
    var linkStr = Macintosh?'Command':'CTRL';

    if(window.external && (!document.createTextNode ||
      (typeof(window.external.AddFavorite)=='unknown'))) {
        window.external.AddFavorite(url, title);
    } else if(Konqueror) {
      alert('Please press CTRL + B to bookmark this Web page.');
    } else if(window.opera) {
      alert('Please press '+linkStr+' + D to bookmark this Web page.');
    } else if(window.home) {
      alert('Please press '+linkStr+' + D to bookmark this Web page.');
    } else if(!window.print || Macintosh) {
      alert('Please press Command + D to bookmark this Web page.');    
    } else {
      alert('To bookmark this Web page please to do so manually '+
        'through your browser.');
    }
  }

function Konqueror3() {
  if(!document.getElementById) return false;
  if(document.defaultCharset || window.opera || !window.print) return false;
  if(window.home) return false;
  if(document.all) return true;
  var likely = 1;
  eval("try{var str=document.all[0].tagName;}catch(err){likely=0;}");
  return likely;
}
