// javascript bookmark function, Jason, 30/12/2003 - updated to /sg/, MW 24sep04

function cart_submit() {
    document.cart.submit();
}

function bookmark_fn() {
  // display bookmark string if the browser is one of the following
  // Mac: Safari, IE
  // Win: IE
  
  var user_agent = navigator.userAgent;
  var buf = '';
  
  // detect platform
  is_mac = user_agent.match(/Mac/);
  is_win = user_agent.match(/Win/);
  
  //detect browser
  is_opera  = user_agent.match(/Opera/);
  is_ie     = user_agent.match(/MSIE/);
  is_safari = user_agent.match(/Safari/);
  
  var show_it = false;
  
  if (is_mac && (is_ie || is_safari) && (!is_opera) ) {
    buf = '<img src=/sg/bm_apple.gif width=191 height=17 alt="" border=0>'; // image for mac
    show_it = true;
  }
  
  if ( (is_win && is_ie) && !is_opera) {
    buf  = '<span style="cursor:hand" onclick="window.external.AddFavorite(location.href, document.title);">';
    buf += '<img src=/sg/bm_mac.gif width=191 height=17 alt="" border=0>'; // image for windows
    buf += '</span>';
    show_it = true;
  }
  
  if (show_it) {
    document.write('<center>' + buf + '</center>');
  }
}

