
function blogPostShare(linkObj,site,title,byline,keyword,pubdate,description,section,popUpUrl){  
	switch (site) {
	case "facebook":
		return postPopUp(linkObj, 'http://www.facebook.com/sharer.php?u=' + popUpUrl + '&t=' + title);
		break;
   case "digg":
		return postPopUp(linkObj, 'http://digg.com/remote-submit?phase=2&url=' + popUpUrl + '&title=' + title + '&bodytext=' + description);
		break;
	case "permalink":
		return postPopUp(linkObj, 'http://www.nytimes.com/export_html/common/new_article_post.html?url=' + popUpUrl + '&title=' + title+ '&summary=' + description + '&section=' + section + '&pubdate=' + pubdate + '&byline=' + byline);
		break;
	case "delicious":
		return postPopUp(linkObj, 'http://del.icio.us/post?v=4&partner=nyt&noui&jump=close&url=' + popUpUrl + '&title=' + title + '&bodytext=' + description);
		break;
	case "twitter":
		var status = encodeURIComponent('我正在看《')+title+encodeURIComponent('》这篇文章，还不错。文章链接：');
		return postPopUp(linkObj, 'http://twitter.com/home?status='+ status + popUpUrl);
		break;
	case "yahoobuzz":
    	return postPopUp(linkObj, 'http://buzz.yahoo.com/article/caijing/'+ popUpUrl);
		break;

	case "xiaonei":
    	return postPopUp(linkObj, 'http://share.xiaonei.com/share/ShareOperate.do?action=sharelink&weblink='+ popUpUrl);
		break;

    case "kaixin":
    	return postPopUp(linkObj, 'http://www.kaixin001.com/repaste/share.php?rtitle='+title+'&rcontent='+description+'&rurl='+popUpUrl);
		break;

	case "mixx":
		try {
		    var otherParams =
			     '&title='       + title
			   + '&description=' + description
			   + '&tags='        + keywords
			   + '&partner=http://'     + window.location.host;
		    return postPopUp(linkObj, 
			   'http://mini.mixx.com/submit/story'
			   + '?page_url='    + popUpUrl
			   + otherParams);
		} catch(e) {
		    return postPopUp(linkObj, 
			   'http://mini.mixx.com/submit/story'
			   + '?page_url='    + popUpUrl
			   + '&title='       + title
			   + '&partner=http://'     + window.location.host);
		}
		break;

	case "linkedin":
        return postPopUp(linkObj, 
		     'http://www.linkedin.com/shareArticle?mini=true'
			   + '&url='         + popUpUrl
			   + '&title='       + title
			   + '&summary='     + description
			   + '&source=http://'      + window.location.host
		  );
		break;
	}
}

function postPopUp(linkObj,url){
	linkObj.href = url;
	return true;
}


