//$Id: bshare.js,v 1.2 2009/10/12 14:08:05 dfarrar Exp $ //$Source: /bbsrc/web/docs/en/jscommon/RCS/bshare.js,v $ //$Revision: 1.2 $ var StoryURL=location.href; var StoryTitle=document.title; function sharePop(url, width, height, name) { testwindow= window.open(url, name, "location=1,status=1,scrollbars=1,resizable=1,width=" + width + ",height=" + height); } function shareBusinessExchange() { sharePop('http://bx.businessweek.com/api/add-article-to-bx.tn?url='+encodeURIComponent(StoryURL), 850, 500, 'BusinessExchangePopup'); } function shareTwitter() { sharePop('http://twitter.com/home?status='+encodeURIComponent(StoryURL), 850, 500, 'twitterPopup'); } function shareDelicious() { sharePop('http://del.icio.us/post?v=2&url='+encodeURIComponent(StoryURL)+'&title='+encodeURIComponent(HeadLine)+'&bodytext=' + encodeURIComponent(summary) + '&tags=news', 850, 500, 'deliciousPopup'); } function shareDigg() { sharePop('http://digg.com/submit?url='+encodeURIComponent(StoryURL)+'&title='+encodeURIComponent(HeadLine)+'&bodytext=' + encodeURIComponent(summary) + '&topic=business_finance', 850, 500, 'diggPopup'); } function shareFacebook() { sharePop('http://www.facebook.com/sharer.php?u='+encodeURIComponent(StoryURL)+'&t='+encodeURIComponent(HeadLine), 850, 500, 'facebookPopup'); } function shareLinkedIn() { sharePop('http://www.linkedin.com/shareArticle?mini=true&url='+encodeURIComponent(StoryURL)+'&title='+encodeURIComponent(HeadLine)+'&summary=' + encodeURIComponent(summary) + '&source=Bloomberg.com', 850, 500, 'linkedinPopup'); } function shareNewsvine() { sharePop('http://www.newsvine.com/_wine/save?popoff=1&h='+encodeURIComponent(HeadLine)+'&t=world-news&u='+encodeURIComponent(StoryURL)+'&e=', 850, 445, 'newsvinePopup'); } function shareProp() { sharePop('http://www.propeller.com/submit/?T='+encodeURIComponent(HeadLine)+'&U='+encodeURIComponent(StoryURL)+'&D=' + encodeURIComponent(summary) + '&tag=news', 850, 540, 'propPopup'); } function shareYahoo() { sharePop('http://buzz.yahoo.com/buzz?targetUrl=' + encodeURIComponent(StoryURL) + '&headline=' + encodeURIComponent(HeadLine) + '&summary=' + encodeURIComponent(summary), 980, 540, 'yahooPopup'); } var arrShareLinks = new Array( "Twitter", "javascript:shareTwitter();", "BusinessExcange", "javascript:shareBusinessExchange();", "Delicious", "javascript:shareDelicious();", "Digg", "javascript:shareDigg();", "Facebook", "javascript:shareFacebook();", "Mixx", "javascript:shareMixx();", "LinkedIn", "javascript:shareLinkedIn();", "Yahoo!", "javascript:shareYahoo();" ); var shareOverlayFocus = false; var shareInterval; // document.getElementById("shareLink").onclick = showShareOverlay; function trimTools(strText) { return strText.replace(/\\./,"").replace("!","").replace(" ",""); } function parseShareName(strWord) { if (strWord == "Delicious") strWord = "Del.icio.us"; return strWord; } function tryShareOverlay() { if (!document.getElementById("shareContainer")) { var shareDiv = document.createElement("div"); shareDiv.id = "shareContainer"; shareDiv.className = "hidden"; var objShareDiv = document.getElementById("atools").insertBefore(shareDiv, document.getElementById("autilities")); } if (document.getElementById("shareContainer").innerHTML == '') { showShareOverlay(); } else { hideShareOverlay(); } } function putShareLinks(id) { var cloz=""; if (id == "shr_v") { cloz = '