// Recobar v6.1
// (c) 2005-2009 Javier M. Arpa
//
// Uses some icons from “Led Icon Set” v1.0 - http://led24.de/iconset/

function stopError() { return true; }
window.onerror = stopError;

var rbxp_htqtitle,rbxp_htqqtitle;

function shareit() {
  window.open('mailto:?Subject=Interesting%20website&Body=Hi!%0a%0aI%27m%20surfing%20the%20web%20and%20just%20found%20this%20website%20that%20may%20be%20of%20interest%20to%20you:%0a%0a'+top.location.href);
}

function dw(t) { document.write(t); }

function SBM(actionurl,img,htqnote) {
  dw(' <a target="_blank" href="'+actionurl+'" onMouseOver="window.status=\''+htqnote+rbxp_htqqtitle+'\'; return true;" onMouseOut="window.status=\'\'; return true;"><img src="/gif/bookmark/'+img+'" width="18" height="18" border="0" alt="'+htqnote+rbxp_htqtitle+'"/></a>');
}

function socialBMs()
{
  var ititle=top.document.title;
  var etitle=escape(ititle);
  var eurl=escape(top.location.href);
  rbxp_htqtitle=ititle.replace( /"/g, "'" );
  rbxp_htqqtitle=rbxp_htqtitle.replace( /'/g, "\\'" );
  var pcidx=top.location.href.indexOf("%"); // Some services make up an invalid bookmark if % in urls
  SBM('http://digg.com/submit?phase=2&url='+eurl+'&title='+etitle,'diggman.png','Digg at Digg.com: ');
  SBM('http://del.icio.us/post?url='+eurl+'&title='+etitle,'delicious.png','Bookmark at del.icio.us: ');
  SBM('http://reddit.com/submit?url='+eurl+'&title='+etitle,'reddit.png','Bookmark at reddit.com: ');
  //SBM('http://cgi.fark.com/cgi/fark/edit.pl?new_url='+eurl+'&new_comment='+etitle+'&new_link_other=&linktype=Misc','fark.png','Fark at Fark.com: ');
  if (pcidx<0) { SBM('http://www.furl.net/savedialog.jsp?t='+etitle+'&u='+eurl+'&r=','furl.png','Furl at Furl.net: '); }
  //SBM('http://www.newsvine.com/_tools/seed&save?u='+eurl+'&h='+etitle,'newsvine.png','Bookmark at NewsVine: ');
  if (pcidx<0) { SBM('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url='+eurl+'&Title='+etitle,'blinklist.png','Blink at blinklist.com: '); }
  SBM('http://www.simpy.com/simpy/LinkAdd.do?href='+eurl+'&title='+etitle,'simpy.png','Bookmark at Simpy.com: ');
  //SBM('http://www.spurl.net/spurl.php?title='+etitle+'&url='+eurl,'spurl.png','Bookmark at Spurl.net: ');
  SBM('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+etitle+'&u='+eurl,'yahoomyweb.png','Bookmark at YahooMyWeb: ');
}

var forecolor="black";
var bartextstyle="color:"+forecolor+";font:9pt,arial;cursor:hand";

if (top.location==location)
{
 dw('<table width=100% border=0 cellpadding=0 cellspacing=0><tr>');
 if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4))
 {
  dw('<td id=mainbar colspan=2 align=center style=color:'+forecolor+';font:8pt,arial;cursor:default>');
  dw('&nbsp;&nbsp;&nbsp;&nbsp;<span id=addfav1 style=cursor:hand onclick=window.external.AddFavorite(top.location.href,top.document.title);><img src="/js/star_2.png" border="0" width="16" height="16" alt="Add to favorites"> <span id=addfav3 style='+bartextstyle+'>Add this page to Favorites</span></span>');
  dw('&nbsp;at&nbsp;'); socialBMs();
  dw('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id=recommend1 style=cursor:hand OnClick="javascript:shareit();"><img src="/js/envelope.png" border="0" width="16" height="16" alt="Share it with a friend"> <span id=recommend3 style='+bartextstyle+'>Share it with a Friend</span></span>');
  dw('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id=sethome1 style=cursor:hand onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(top.location.href)"><img src="/js/house.png" border="0" width="16" height="16" alt="Make it your homepage"> <span id=sethome3 style='+bartextstyle+'>Make&nbsp;it&nbsp;your&nbsp;Homepage!</span></span>');
 }
 else
 {
  dw('<td id=mainbar colspan=2 align=center style=color:'+forecolor+';font:9pt,arial;cursor:default>');
  dw('&nbsp;&nbsp;&nbsp;&nbsp;<span id=addfav2 style=font:14pt,wingdings;color:red>*</span> Bookmark this page');
  dw('&nbsp;at&nbsp;'); socialBMs();
  dw('&nbsp;&nbsp;&nbsp;&nbsp;<span id=recommend1 style=cursor:hand OnClick="javascript:shareit();"><span id=recommend2 style=font:14pt,wingdings;color:red>*</span> <span id=recommend3 style='+bartextstyle+'><a href="javascript:shareit();">Share it with a Friend</a></span></span>');
 }
 dw('</td></tr></table>');
}
