function addtofacebook() {u=location.href;t=document.title;window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t));}

function addtoplurk(){
var u = location.href;var titles=document.getElementsByTagName('title');var title=titles[0].innerHTML;var metas=document.getElementsByTagName('meta');for(var i=0;i<metas.length;i++){if(metas[i].getAttribute('name')=='title'){title=metas[i].getAttribute('content');break;}}
var url='http://www.plurk.com/?qualifier=shares&status=';url+=encodeURIComponent(u)+' '+encodeURIComponent('('+title+') ');window.open(url);}

function addtotwitter() {u=location.href;t=document.title;window.open("http://twitter.com/?status="+encodeURIComponent(u)+" ("+encodeURIComponent(t)+") ");}

function addtofavorite() {
var title = document.title;
var url   = location.href;

if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

<!-- weibo begin -->
 var sendT = {
	getHeader : function(){
		var titles=document.getElementsByTagName('title');var g_title=titles[0].innerHTML;
		var re = /<[^<>]*?font[^<>]*?>/gi;
		g_title = g_title.replace(re,"");
		return g_title;
	},
	getFirstImgSrc : function(){
		if (document.getElementById("weiboimg").getElementsByTagName("img")[0])
		{
			return document.getElementById("weiboimg").getElementsByTagName("img")[0].src;
		}
		else
		{
			return null;
		}

	}
}
function addtoweibo(){

 (function(s,d,e,r,l,p,t,z,c){
	 var f='http://service.weibo.com/share/share.php?ralateUid=2478752357&appkey=318052832&',u=z||d.location,p=['url=',e(u),'&title=',e(sendT.getHeader()),'&source=',e(r),'&sourceUrl=',e(l),'&content=',c||'utf-8','&pic=',e(p||'')].join('');
	 function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');
	 };
	 if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();
})(screen,document,encodeURIComponent,'新浪星座算命','http://mindcity.sina.com.tw/',sendT.getFirstImgSrc(),null,null,null);
}

<!-- weibo end -->

