function do_sbm(){	
	var __imgdir="/image/mdn/sbm";
	var __title = encodeURIComponent(document.title);
	var __url = encodeURIComponent(document.URL);
	_do_sbm('yahoobx', 'Yahoo', 'http://myweb.yahoo.com/myresults/bookmarklet?u=' + __url + '&t=' + __title + '&ei=UTF');
	_do_sbm('facebook', 'Facebook', 'http://www.facebook.com/share.php?u=' + __url);  
	_do_sbm('google', 'Google Bookmarks', 'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=' + __url + '&amp;title=' + __title);
	_do_sbm('slashdot', 'Slashdot', 'http://slashdot.org/bookmark.pl?url=' + __url + '&amp;title=' + title);
	_do_sbm('technorati', 'Technorati', 'http://technorati.com/faves?add=' + __url);
	_do_sbm('delicious', 'del.icio.us', 'http://del.icio.us/post?url=' + __url + '&amp;title=' + __title);
	_do_sbm('reddit', 'reddit', 'http://reddit.com/submit?url=' + __url + '&amp;title=' + __title);
}
function _do_sbm(icon, name, url) {document.write('<span class="socialAddButton" id="socialAddButton-' + icon + '"><a href="' + url + '" title="Add to ' + name +'"><img src="/image/mdn/sbm/' + icon + '.gif" alt="' + name + ' icon" /></a></span> ');}
do_sbm();

function _twitteradd() {
    var xfgd  = 'mainichijpedit';
    var fdsr = 'R_48d0d6ad6a202cacf54aebc96460e4c0';
    api = 'http://api.bit.ly/shorten' + '?version=2.0.1' + '&format=json' + '&callback=Callback' + '&login=' + xfgd + '&apiKey=' + fdsr + '&longUrl=';        
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = api + encodeURIComponent(location.href);
    document.body.appendChild(script);
}

function Callback(json) {
    var _url = 'http://twitter.com/home/?status=' + encodeURIComponent( document.title+' '+json.results[location.href]['shortUrl']);
        location.href = _url;
}