with(document){
     writeln('<style type="text\/css">                           ');
     writeln('  #bookmark { font-family:  verdana;');
     writeln('              font-size:   10px;                   ');
     writeln('              color:       #F00;                   ');
     writeln('              cursor:      pointer;                ');
     writeln('              cursor:      hand;                   ');
     writeln('              width:       135px;                  ');
     writeln('  }                                                ');
     writeln('<\/style>                                          ');
     writeln('<span id="bookmark">Bookmark this Page</span>      ');
}    document.close();

var IE = navigator.appName.match(/(Microsoft Internet Explorer)/gi),
    NS = navigator.appName.match(/(Netscape)/gi),
    OP = navigator.appName.match(/(Opera)/gi),
    BK = document.getElementById('bookmark');
    BK.onmouseout = function(){
       window.status = '';
       return true;
    }

    if(IE && document.uniqueID){
       BK.onclick = function(){
          window.external.AddFavorite(location.href,document.title);
       }
       BK.onmouseover = function(){
          window.status='Click to add this page to your '+RegExp.$1+' favorites';
          return true;
       }
    }

    else if(OP || IE && !document.uniqueID){
       BK.onclick = function(){
          alert('Your '+RegExp.$1+' browser requires that you\nPress Ctrl & T to Bookmark this page.');
       }
       BK.onmouseover = function(){
          window.status='Your '+RegExp.$1+' browser requires that you Press Ctrl & T to Bookmark this page.';
          return true;
       }
    }

    else if(NS){
       BK.onclick = function(){
          alert('Your '+RegExp.$1+' browser requires that you\nPress Ctrl & D to Bookmark this page.');
       }
       BK.onmouseover = function(){
          window.status='Your '+RegExp.$1+' browser requires that you press Ctrl & D to Bookmark this page.';
          return true;
       }
    }

    else{ BK.innerHTML = '' }
