ourURL="http://www.cainer.com";//global
var theTitle;
var nsString;
var is_mac = navigator.userAgent.toLowerCase().indexOf("mac")!=-1;
theTitle = "Jonathan Cainer's Stars";
str = is_mac ? "Apple":"Ctrl"
nsString = "Close this box and type "+str+"+D to bookmark this site"
function AddToFavourites () {
  if (navigator.appName!="Netscape"&&!is_mac){
    window.external.AddFavorite(ourURL, theTitle);
    }
  else{
    alert (nsString);
  }

}
function drawButtons () {
if (((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))) {
document.write('<FO'+'RM>');
document.write('<INP'+'UT border=0 TYPE=IMAGE vspace=0 src="/gifs/addfav.gif" VALUE="Add to favourites" onClick="AddToFavourites (); return false;"><br>');
HM_DOM = (document.getElementById) ? true : false;
}

if ( navigator.appName=="Netscape") {
document.write('<FO'+'RM>');
document.write('<INP'+'UT TYPE=SUBMIT VALUE="Add to favourites" onClick="AddToFavourites (); return false;"><br>');
HM_DOM = (document.getElementById) ? true : false;
}

if ((navigator.appName == "Microsoft Internet Explorer") && HM_DOM) {
  document.write('<INP'+'UT TYPE=IMAGE vspace=0 border=0 SRC="/gifs/makehome.gif" VALUE="Make this my homepage!" onClick="this.style.behavior=');
  document.write("'url(#default#homepage)';");
  document.write('this.setHomePage(ourURL); return false">');
}
document.write('<\/FO'+'RM>');
}
