<!--

function sendToFriend() {
location='envoyer-a-un-ami.html#url='+location.href;
}

function resettoggle() {
var e = document.getElementById('foo');
e.style.display = 'none';
}

function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}
//-->

function commonPopup(url, width, height, toolsInd, wname)
{
    var options = "width=" + width + ",height=" + height + ",top=" + ((screen.height - height) / 4).toString() + ",left=" + ((screen.width - width) / 2).toString();

    switch (toolsInd)
    {
        case 1:
            options += ",toolbar=no,status=no,resizable=no,scrollbars=yes";
            break;
        case 2:
            options += ",resizable=no,scrollbars=no,status=no,menubar=no,toolbar=no,directories=no,location=no";
            break;
        case 3:
            options += ",menubar=yes,toolbar=yes,status=yes,resizable=yes,location=yes,scrollbars=yes";
            break;
        case 4:
            options += ",top=50,left=50,resizable=yes,scrollbars=yes,status=no,menubar=no,toolbar=no,location=yes";
            break;
        default:
            //do nothing
            break;
    }

    if (!wname)
    {
        wname = "reutersPopup";
    }

    popupWindow = window.open(url, wname, options);

    if (popupWindow)
    {
        popupWindow.focus();
    }
}

var articleURL = location.href;
//add
var articleTitle = document.title;
var articleBlurb = "";

if (location.href.search("\\?") != -1) {
	articleURL = location.href.split("?")[0];
}

//Google
function shareGoogle() {
	
			commonPopup('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(articleURL)+'&title='+encodeURIComponent(articleTitle)+'&annotation='+encodeURIComponent(articleBlurb)+'&labels=', 700, 600, 1, 'googlePopup');
}

//Delicious
function shareDelicious() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://del.icio.us/post?url='+encodeURIComponent(articleURL)+'&title='+encodeURIComponent(articleTitle)+'&notes='+encodeURIComponent(articleBlurb)+'&tags=news', 680, 750, 1, 'deliciousPopup');
}

//Favorites (of your browser)
function shareFavorites() {
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(articleTitle, articleURL,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( articleURL, articleTitle); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }

//Facebook
function shareFacebook() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://www.facebook.com/sharer.php?u='+encodeURIComponent(articleURL)+'&t='+encodeURIComponent(articleTitle), 626, 448, 1, 'facebookPopup');
}

//Live
function shareLive() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://spaces.msn.com/BlogIt.aspx?SourceURL='+encodeURIComponent(articleURL)+'&Title='+encodeURIComponent(articleTitle), 680, 540, 1, 'livePopup');
}

//Digg
function shareDigg() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://digg.com/remote-submit?phase=2&url='+encodeURIComponent(articleURL)+'&title='+encodeURIComponent(articleTitle)+'&bodytext='+encodeURIComponent(articleBlurb), 540, 536, 1, 'diggPopup');
}

//Yahoo MyWeb
function shareYahoo() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(articleTitle)+'&u='+encodeURIComponent(articleURL)+'&ei=UTF-8'+'&d='+encodeURIComponent(articleBlurb)+'&tag=news', 620, 568, 1, 'yahooPopup');
}

//Furl
function shareFurl() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(articleURL)+'&t='+encodeURIComponent(articleTitle), 626, 518, 1, 'furlPopup');
}

//StumbleUpon
function shareStumbleUpon() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://www.stumbleupon.com/submit?url='+encodeURIComponent(articleURL)+'&title='+encodeURIComponent(articleTitle), 750, 436, 1, 'stumbleUponPopup');
}


function shareNewsvine() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://www.newsvine.com/_wine/save?aff=reuters&h='+encodeURIComponent(articleTitle)+'&t=world-news&u='+encodeURIComponent(articleURL)+'&e='+encodeURIComponent(articleBlurb), 650, 445, 1, 'newsvinePopup');
}



function shareMixx() {
	//if (typeof(articleTitle) != 'undefined')
		commonPopup('http://www.mixx.com/submit/story?title='+encodeURIComponent(articleTitle)+'&page_url='+encodeURIComponent(articleURL)+'&partner=REU&description='+encodeURIComponent(articleBlurb), 1024, 640, 1, 'mixxPopup');
}



var arrShareLinks = new Array(
	"Google",
	"javascript:shareGoogle();",
	"Delicious",
	"javascript:shareDelicious();",
	"Favorites",
	"javascript:shareFavorites();",
	"Facebook",
	"javascript:shareFacebook();",
	"Live",
	"javascript:shareLive();",
	"Digg",
	"javascript:shareDigg();",		
	"Yahoo!",
	"javascript:shareYahoo();",
	"Furl",
	"javascript:shareFurl();",	
	"Stumble",
	"javascript:shareStumbleUpon();",	
	"Newsvine",
	"javascript:shareNewsvine();"
	
);