var sb_blank_image_url = 'http://c.orange.fr/z.gif';
var sb_sprite_url = 'http://c.orange.fr/Icons/sb_sprite.gif';
var sb_page_url = document.location.href;
var sb_page_title = (document.title ? document.title : '');
var sb_accepted = '';
var sb_ignored = '';
var sb_list = {};
function sb_init() {
sb_list = {
'favoris':{name:'Favoris',type:'html',alt:'Ajouter à mes favoris',posX:-128,url:'',script:sb_favorites},
'facebook':{name:'Facebook',type:'html',alt:'Ajouter cet article sur Facebook',posX:0,url:'http://www.facebook.com/sharer.php?u=' + encodeURIComponent(sb_page_url) + '&t=' + encodeURIComponent(sb_page_title)},
'delicious':{name:'Del.icio.us',type:'html',alt:'Ajouter cet article sur Delicious',posX:-32,url:'http://del.icio.us/post?url=' + encodeURIComponent(sb_page_url) + '&title=' + encodeURIComponent(sb_page_title)},
'viadeo':{name:'Viadeo',type:'html',alt:'Ajouter cet article sur Viadeo',posX:-48,url:'http://www.viadeo.com/shareit/share/?url=' + encodeURIComponent(sb_page_url) + '&urllanguage=fr&title=' + encodeURIComponent(sb_page_title)},
'myspace':{name:'Myspace',type:'html',alt:'Ajouter cet article sur Myspace',posX:-64,url:'http://www.myspace.com/Modules/PostTo/Pages/?t=' + encodeURIComponent(sb_page_title) + '&c=&l=1&u=' + encodeURIComponent(sb_page_url)},
'google':{name:'Google',type:'html',alt:'Ajouter cet article sur Google',posX:-80,url:'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=' + encodeURIComponent(sb_page_url) + '&title=' + encodeURIComponent(sb_page_title)},
'windowslive':{name:'Live',type:'html',alt:'Ajouter cet article sur Windows live',posX:-96,url:'https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url=' + encodeURIComponent(sb_page_url) + '&title=' + encodeURIComponent(sb_page_title) + '&top=1'},
'yahoobuzz':{name:'Yahoo! Buzz',type:'html',alt:'Ajouter cet article sur Yahoo! Buzz',posX:-144,url:'http://buzz.yahoo.com/buzz?publisherurn=search_engine981&guid=' + encodeURIComponent(sb_page_url)},
'yahoo':{name:'Yahoo!',type:'html',alt:'Ajouter cet article sur Yahoo!',posX:-112,url:'http://myweb.yahoo.com/myresults/bookmarklet?u=' + encodeURIComponent(sb_page_url) + '&t=' + (sb_page_title) + '&ei=UTF'},
'digg':{name:'Digg',type:'html',alt:'Ajouter cet article sur Digg',posX:-160,url:'http://digg.com/submit?phase=2&url=' + encodeURIComponent(sb_page_url) + '&title=' + encodeURIComponent(sb_page_title)},
'twitter':{name:'Twitter',type:'html',alt:'Ajouter cet article sur Twitter',posX:-192,url:'http://twitter.com/home?status=Add+This:+' + encodeURIComponent(sb_page_url) + '&t=' + encodeURIComponent(sb_page_title)},
'wikio':{name:'Wikio',type:'html',alt:'Ajouter cet article sur Wikio',posX:-176,url:'http://www.wikio.fr/vote?url=' + encodeURIComponent(sb_page_url)}
};
}
function sb_add(objectId) {
sb_init();
var displayedContent = '';
if (objectId) {
for (book in sb_list) {
if ('' == sb_accepted || -1 != sb_accepted.indexOf(book)) {
if ('' == sb_ignored || -1 == sb_ignored.indexOf(book)) {
displayedContent += '<a href="javascript:void(0);" '
+ 'onclick="sb_run_action(\'' + book + '\');" title="'
+ sb_list[book]['alt']
+ '"><img style="'
+ 'background:url(\'' + sb_sprite_url + '\') no-repeat '
+ sb_list[book]['posX'] + 'px 0px;width:16px;'
+ 'height:16px;overflow:hidden;" src="' + sb_blank_image_url + '" '
+ 'border="0" width="16" height="16" alt="'
+ sb_list[book]['alt'] + '"/>'
+ '<span>' + sb_list[book]['name'] + '</span>'
+ '</a>';
}
}
}
objectId.innerHTML += displayedContent;
}
}
function sb_run_action(code) {
if (sb_list[code]) {
if (sb_list[code]['url'] != '') {
window.open(sb_list[code]['url']);
}
else if (sb_list[code]['script'] != '') {
sb_list[code]['script']();
}
}
}
function sb_favorites() {
if (typeof(window.sidebar) != 'undefined') {
window.sidebar.addPanel(sb_page_title, sb_page_url,'');
}
else if (typeof(window.external) == 'object') {
window.external.AddFavorite(sb_page_url, sb_page_title);
}
}

