var RTR_ArticleURL = location.href;
var mySplitResult = RTR_ArticleURL.split("/");
var RTR_ArticleTitle=mySplitResult[8];
function shareDelicious() {	
	window.open('http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(RTR_ArticleURL)+'&tags=news','deliciousPopup','width=540,height=600');
}

function shareFacebook() {

		window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(RTR_ArticleURL)+'&t='+encodeURIComponent(RTR_ArticleTitle), 'facebookPopup','width=626,height=436');
}

function shareNewsvine() {

		window.open('http://www.newsvine.com/_wine/save?aff=reuters&h='+encodeURIComponent(RTR_ArticleTitle)+'&t=world-news&u='+encodeURIComponent(RTR_ArticleURL)+'&e='+encodeURIComponent(RTR_ArticleTitle),'newsvinePopup','width=650,height=445');
}

function shareYahoo() {

		window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(RTR_ArticleTitle)+'&u='+encodeURIComponent(RTR_ArticleURL+"?rpc=46")+'&ei=UTF-8'+'&d='+encodeURIComponent(RTR_ArticleTitle)+'&tag=news', 'yahooPopup','width=620,height=540');
}

function shareMixx() {

		window.open('http://www.mixx.com/submit/story?title='+encodeURIComponent(RTR_ArticleTitle)+'&page_url='+encodeURIComponent(RTR_ArticleURL+"?rpc=62")+'&partner=REU&description='+encodeURIComponent(RTR_ArticleTitle),'mixxPopup','width=1024,height=640');
}

function shareDigg() {

		window.open('http://digg.com/remote-submit?phase=2&url='+encodeURIComponent(RTR_ArticleURL+"?rpc=64")+'&title='+encodeURIComponent(RTR_ArticleTitle)+'&bodytext='+encodeURIComponent(RTR_ArticleTitle)+'&topic=world_news','diggPopup','width=540,height=500');
}

function shareLinkedIn() {
		
		window.open('http://www.linkedin.com/shareArticle?mini=true&url='+encodeURIComponent(RTR_ArticleURL+"?rpc=59")+'&title='+encodeURIComponent(RTR_ArticleTitle)+'&summary='+encodeURIComponent(RTR_ArticleTitle)+'&source=Reuters','linkedinPopup','width=520,height=570');
}

var arrShareLinks = new Array(
	"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;
}
