

SocialBook = {
  Sites: [],
  Build: function(Instance, FormStyle, URL, Title) {
    var out= "";
  	for(var x=0, xm=SocialBook.Sites.length; x<xm; x++) {
  		var Site= SocialBook.Sites[x];
  		var Link= SocialBook.BuildLink(Site,URL,Title);
  		out += '<a href="'+Link+'" target="_blank" title="'+Site+'" rel="nofollow external" class="SocialBook_'+Site+'">&nbsp;</a>';
  	}
  	var L= document.getElementById("SocialBooks_"+Instance);
  	if(L) L.innerHTML= out+'<div style="clear:both"></div>';
  },
  BuildLink: function(Site,URL,Title) {
    if(Site=="Digg") return "http://digg.com/submit?phase=2&amp;url="+URL+"&amp;title="+Title;
	if(Site=="Technocrati") return "http://technorati.com/faves?add="+URL;
	if(Site=="Delicious") return "http://del.icio.us/post?url="+URL+"&amp;title="+Title;
	if(Site=="Stumble") return "http://www.stumbleupon.com/submit?url="+URL+"&amp;title="+Title;
	if(Site=="Reddit") return "http://reddit.com/submit?url="+URL+"&amp;title="+Title;
	if(Site=="BlinkList") return "http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url="+URL+"&amp;Title="+Title;
	if(Site=="Furl") return "http://www.furl.net/storeIt.jsp?t="+Title+"&amp;u="+URL;
	if(Site=="Mixx") return "http://www.mixx.com/submit?page_url="+Title+"&amp;u="+URL;
	if(Site=="Facebook") return "http://www.facebook.com/sharer.php?u="+Title+"&amp;u="+URL;
	if(Site=="Google") return "http://www.google.com/bookmarks/mark?op=edit&amp;bkmk="+URL+"&amp;title="+Title+"&amp;output=popup";
	if(Site=="YahooMyWeb") return "http://myweb.yahoo.com/myresults/bookmarklet?u="+URL+"&amp;t="+Title+"&amp;ei=UTF";
	if(Site=="YahooBuzz") return "http://buzz.yahoo.com/submit/?submitUrl="+URL+"&amp;submitHeadline="+Title;
	if(Site=="Newsvine") return "http://www.newsvine.com/_tools/seed&amp;save?u="+URL+"&amp;T="+Title;
	if(Site=="Netscape") return "http://www.netscape.com/submit/?U="+URL+"&amp;T="+Title;
	if(Site=="WinLive") return "https://favorites.live.com/quickadd.aspx?marklet=1&amp;mkt=en-us&amp;url="+URL+"&amp;title="+Title+"&amp;top=1";
	if(Site=="Ask") return "http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&amp;t=webpages&amp;url="+URL+"&amp;title="+Title;
	if(Site=="Twitter") return "http://twitter.com/home?status="+URL;
	if(Site=="MySpace") return "http://www.myspace.com/Modules/PostTo/Pages/?l=3&u="+URL;
	if(Site=="SlashDot") return "http://slashdot.org/bookmark.pl?url="+URL;
	if(Site=="Spurl") return "http://www.spurl.net/spurl.php?url="+URL+"&amp;title="+Title;
	return "";
  }
}
