// old_ b7bc5eaf41cdd40f049898db61e55b3e284ee893

function WriteSB(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" />Hatena Bookmark</a> ');
	document.write('<a href="http://buzzurl.jp/entry/'+url+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/buzzurl.gif" width="16" height="16" />buzzurl</a> ');
	document.write('<a href="http://clip.livedoor.com/redirect?link='+url_encoded+'&title='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/livedoor.gif" width="16" height="16"/>livedoor clip</a> ');
	document.write('<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" />Yahoo! Bookmarks</a> ');
	document.write('<a href="http://del.icio.us/post?url='+url+'&title='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/delicious.gif" width="16" height="16" />del.icio.us </a> ');
	//document.write('<a href="http://twitter.com/?status='+url_encoded+' '+ttl+' '+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a><script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script> ');
	document.write('<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true" title="facebook"></iframe> ');
}

/* 2011/01/20 現在使用中のfunction */
function WriteSB2(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("?")[0].split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<div style="float:left; margin:1px 0px 0px 0px;">');
	document.write('<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;');
	document.write('<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('</div>');

	document.write('<div style="float:left; margin-right:2px;">');
	document.write('<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=20" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:70px; height:20px;" allowTransparency="true"></iframe>');
	document.write('</div>');

	document.write('<div style="float:left;">');
	document.write('<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true" title="facebook"></iframe>');
	document.write('</div>');

	document.write('<div style="clear:both"></div>');
}

/* 2011/01/20 現在使用中のfunction */
function WriteSB2_innerHTML(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("?")[0].split("#")[0];
	var _p, _url="", _meta=document.getElementsByTagName('meta');
	for (var i=0;i<_meta.length;i++) { if ( typeof _meta.item(i).getAttribute("property") != "undefined" && _meta.item(i).getAttribute("property") === "og:url" ) { _url=_meta.item(i).getAttribute("content"); break; } }
	url = ( _url === "" ) ? url: _url;
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);
	var _html="";

	_html+='<div style="float:left; margin:1px 0px 0px 0px;">';
	_html+='<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;';
	_html+='<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;';
	_html+='<a href="http://twitter.com/home?status='+url_encoded+' '+ttl+' '+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;';
	_html+='<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a>&nbsp;';
	_html+='</div>';

	_html+='<div style="float:left; margin:3px 3px 0 0;">';
	_html+='<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=16" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:61px; height:16px;" allowTransparency="true"></iframe>';
	_html+='</div>';

	_html+='<div style="float:left; margin: 1px 0 0 0;">';
	_html+='<iframe src="http://www.facebook.com/plugins/like.php?href='+url_encoded+'&amp;send=false&amp;layout=button_count&amp;width=115&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=227327977317065" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:115px; height:21px;" allowTransparency="true"></iframe>';
	_html+='</div>';

	_html+='<div style="clear:both"></div>';

	document.getElementById("socialbookmark").innerHTML=_html;
	document.write('<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>');
}

/* 2011/10/06 現在使用中のfunction */
function WriteSB2_blog(url,ttl){
	url = url.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp");
	url = url.split("?")[0].split("#")[0];
	ttl = encodeURIComponent(ttl);

	var url_encoded=encodeURIComponent(url);
	var isPC = true;
	var _html="";

	if ( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i) ) { isPC = false; }

	_html+='<div style="float:left; margin:1px 0px 0px 0px;">';
	_html+= ( isPC ) ? '<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;': "";
	_html+= ( isPC ) ? '<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;': "";
	_html+='<a href="http://twitter.com/home?status='+url_encoded+' '+ttl+' '+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;';
	_html+='<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="76eb5b45f1c18a97adfbec40ff88f432d777b1ce" title="mixi"></a>&nbsp;';
	_html+='</div>';

	_html+= ( isPC ) ? '<div style="float:left; margin:3px 3px 0 0;"><iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=16" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:61px; height:16px;" allowTransparency="true"></iframe></div>': "";

	_html+='<div style="float:left; margin: 1px 0 0 0;">';
	_html+='<iframe src="http://www.facebook.com/plugins/like.php?href='+url_encoded+'&amp;layout=button_count&amp;show_faces=true&amp;width=115&amp;action=like&amp;colorscheme=light&amp;height=24" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:115px; height:24px;" allowTransparency="true" title="facebook"></iframe>';
	_html+='</div>';

	_html+='<div style="clear:both"></div>';

	document.write(_html);
	document.write('<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>');
}

/* 2011/12/19 現在使用中のfunction */
function WriteSB2_SP(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("?")[0].split("#")[0];
	var _p, _url="", _meta=document.getElementsByTagName('meta');
	for (var i=0;i<_meta.length;i++) { if ( typeof _meta.item(i).getAttribute("property") != "undefined" && _meta.item(i).getAttribute("property") === "og:url" ) { _url=_meta.item(i).getAttribute("content"); break; } }
	url = ( _url === "" ) ? url: _url;
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);
	var ttl_url = decodeURIComponent(url_encoded);
	var ttl_tw = decodeURIComponent(ttl);
	var _html = "";
	_html += '<span class="sb_fb"><iframe src="http://www.facebook.com/plugins/like.php?href='+url_encoded+'&amp;send=false&amp;layout=button_count&amp;width=115&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=227327977317065" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:133px; height:24px;" allowTransparency="true"></iframe></span>';
	_html += '<span class="sb_mixi"><a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi" data-button="button-6"></a></span>';
	_html += '<span class="sb_twitter"><a href="https://twitter.com/share" data-url=" " data-text="' + ttl_tw + ' ' + ttl_url + '" class="twitter-share-button" data-lang="ja" data-count="none">Tweet</a></span>';
	// for twitter
	!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
	// for mixi
	var scriptMixi = document.createElement("script");
	scriptMixi.setAttribute("type", "text/javascript");
	scriptMixi.setAttribute("src","http://static.mixi.jp/js/share.js");
	document.getElementsByTagName("head")[0].appendChild(scriptMixi);
	return _html;
}

/* 2011/09/05 movie player */
function WriteSB2_MoviePlayer(url,ttl){
	url = url.split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);
	var _html="";

	_html+='<div class="socialbox">';
	_html+='<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;';
	_html+='<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;';
	_html+='<a href="http://twitter.com/home?status='+url_encoded+' '+ttl+' '+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;';
	_html+= ( url.indexOf("www.fujitv.co.jp") !== -1 ) ? '<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a>': "";
	_html+='<iframe src="http://share.gree.jp/share?url='+url_encoded+'&amp;type=0&amp;height=20" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:70px; height:20px;" allowTransparency="true"></iframe>';
	_html+='</div>';

	_html+='<div class="socialbox">';
	_html+='<div id="div_send"></div>';
	_html+='<iframe src="http://www.facebook.com/plugins/like.php?href='+url_encoded+'&amp;layout=button_count&amp;show_faces=true&amp;width=115&amp;action=like&amp;colorscheme=light&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:115px; height:20px;" allowTransparency="true" title="facebook"></iframe>';
	//_html+='<div class="g-plusone" size="medium" count="true" data-size="medium" data-count="true"></div>';
	_html+='</div>';

	$("#fp_social").html(_html);
	$("body").append('<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></scri'+'pt>');
	$("body").append('<script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button_wo_al.js" charset="utf-8" async="async"></scri'+'pt>');
	/*
	$("body").append('<script type="text/javascript">gapi.plusone.go();</script>');
	*/
}

/* 2011/10/20 div指定書き出し */
function WriteSB2_common(_div){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("?")[0].split("#")[0];
	var _p, _url="", _meta=document.getElementsByTagName('meta');
	for (var i=0;i<_meta.length;i++) { if ( typeof _meta.item(i).getAttribute("property") != "undefined" && _meta.item(i).getAttribute("property") === "og:url" ) { _url=_meta.item(i).getAttribute("content"); break; } }
	url = ( _url === "" ) ? url: _url;

	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);
	var _html="";

	_html+='<div style="float:left; margin:1px 0px 0px 0px;">';
	_html+='<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;';
	_html+='<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;';
	_html+='<a href="http://twitter.com/home?status='+url_encoded+' '+ttl+' '+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;';
    _html+='<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a>&nbsp;';
	_html+='</div>';

	_html+='<div style="float:left; margin:3px 3px 0 0;">';
	_html+='<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=16" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:61px; height:16px;" allowTransparency="true"></iframe>';
	_html+='</div>';

	_html+='<div style="float:left; margin: 1px 0 0 0;">';
	_html+='<iframe src="http://www.facebook.com/plugins/like.php?href='+url_encoded+'&amp;send=false&amp;layout=button_count&amp;width=115&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=227327977317065" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:115px; height:21px;" allowTransparency="true"></iframe>';
	//_html+='<div class="fb-like" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>';
	_html+='</div>';

	_html+='<div style="clear:both"></div>';

	document.getElementById(_div).innerHTML=_html;
	document.getElementById(_div).style.marginTop="3px";
	document.write('<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>');
}

/* 2011/07/28 b_hp */
function WriteSB2_bhp_innerHTML(_div){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("?")[0].split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);
	var _html="";

	_html+='<div style="float:left; margin:1px 0px 0px 0px;">';
	_html+='<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;';
	_html+='<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;';
	_html+='<a href="http://twitter.com/home?status='+url_encoded+' '+ttl+' '+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;';
    _html+='<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a>&nbsp;';
	_html+='</div>';

	_html+='<div style="float:left; margin:3px 3px 0 0;">';
	_html+='<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=16" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:61px; height:16px;" allowTransparency="true"></iframe>';
	_html+='</div>';

	_html+='<div style="float:left; margin: 1px 0 0 0;">';
	_html+='<iframe src="http://www.facebook.com/plugins/like.php?href='+url_encoded+'&amp;layout=button_count&amp;show_faces=true&amp;width=115&amp;action=like&amp;colorscheme=light&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:115px; height:20px;" allowTransparency="true" title="facebook"></iframe>';
	_html+='</div>';

	_html+='<div style="clear:both"></div>';

	document.getElementById(_div).innerHTML=_html;
	document.getElementById(_div).style.marginTop="3px";
	document.write('<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>');
}

/* 2011/07/28 b_hp */
function WriteSB2_torefuji_innerHTML(_div){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("?")[0].split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);
	var _html="";

	_html+='<div style="float:right;">';
	_html+='<iframe src="http://www.facebook.com/plugins/like.php?href='+url_encoded+'&amp;layout=button_count&amp;show_faces=true&amp;width=115&amp;action=like&amp;colorscheme=light&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:115px; height:20px;" allowTransparency="true" title="facebook"></iframe>';
	_html+='</div>';

	_html+='<div style="float:right; margin:2px 3px 0 0;">';
	_html+='<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=16" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:61px; height:16px;" allowTransparency="true"></iframe>';
	_html+='</div>';

	_html+='<div style="float:right;">';
	_html+='<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;';
	_html+='<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;';
	_html+='<a href="http://twitter.com/home?status='+url_encoded+' '+ttl+' '+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;';
	_html+='<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a>&nbsp;';
	_html+='</div>';

	_html+='<div style="clear:both"></div>';

	document.getElementById(_div).innerHTML=_html;
	document.getElementById(_div).style.marginTop="3px";
	document.write('<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>');
}

/* 2011/01/25 GREE無し */
function WriteSB2_NoGREE(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<div style="float:left; margin:1px 0px 0px 0px;">');
	document.write('<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;');
	document.write('<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('</div>');
	document.write('<div style="float:left;">');
	document.write('<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true" title="facebook"></iframe>');
	document.write('</div>');

	document.write('<div style="clear:both"></div>');
}

/* 2011/01/25 mixi無し */
function WriteSB2_Nomixi(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<div style="float:left; margin:1px 0px 0px 0px;">');
	document.write('<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;');
	document.write('<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('</div>');
	document.write('<div style="float:left; margin-right:2px;">');
	document.write('<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=20" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:70px; height:20px;" allowTransparency="true"></iframe>');
	document.write('</div>');
	document.write('<div style="float:left;">');
	document.write('<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true" title="facebook"></iframe>');
	document.write('</div>');

	document.write('<div style="clear:both"></div>');
}

/* 2011/03/18 buzzurl無し */
function WriteSB2_Nobuzzurl(url,ttl){

	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<div style="width: 325px;">');
	document.write('<div style="float:left; margin:1px 0px 0px 0px;">');
	document.write('<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;');
	document.write('<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a>&nbsp;<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>');
	document.write('</div>');
	document.write('<div style="float:left; margin-right:2px;">');
	document.write('<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=20" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:70px; height:20px;" allowTransparency="true"></iframe>');
	document.write('</div>');
	document.write('<div style="width: 110px; float:left;">');
	document.write('<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php?u='+url+'&t='+ttl+'">シェア</a>');
	document.write('</div>');
	document.write('<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>');
	document.write('</div>');

	document.write('<div style="clear:both"></div>');
}

/* 2011/03/25 JPTop用 */
function WriteSB2_Top(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<div style="float:left; margin:1px 0px 0px 0px;">');
	document.write('<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;');
	document.write('<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('</div>');
	document.write('<div style="float:left; margin:3px 3px 0px 0px;">');
	document.write('<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=16" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:61px; height:16px;" allowTransparency="true"></iframe>');
	document.write('</div>');
	document.write('<div style="float:left; margin:1px 0px 0px 0px">');
	document.write('<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=120&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:21px;" allowTransparency="true" title="facebook"></iframe>');
	document.write('</div>');

	document.write('<div style="clear:both"></div>');
}

function WriteSB2SB(url,ttl){

	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<div style="margin:2px 2px 0px;">');
	document.write('<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;');
	document.write('<a href="http://buzzurl.jp/entry/'+url+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/buzzurl.gif" width="16" height="16" title="buzzurl" /></a>&nbsp;');
	document.write('<a href="http://clip.livedoor.com/redirect?link='+url_encoded+'&title='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/livedoor.gif" width="16" height="16"title="livedoor clip" /></a>&nbsp;');
	document.write('<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;');
	document.write('<a href="http://del.icio.us/post?url='+url_encoded+'&title='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/delicious.gif" width="16" height="16" title="del.icio.us" /></a>&nbsp;');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('</div>');

	document.write('<div>');

	document.write('<div style="float:left; margin:1px 0px 0px 0px;">');
	document.write('<a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="b67834bee19c797de84d9d51c68570e1f905a018" title="mixi"></a>&nbsp;<script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script>');
	document.write('</div>');

	document.write('<div style="float:left;">');
	document.write('<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=200&amp;action=like&amp;colorscheme=light&amp;height=42" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:42px;" allowTransparency="true" title="facebook"></iframe>');
	document.write('</div>');

	document.write('<div style="clear:both"></div>');

	document.write('</div>');
}


/* 2011/02/17 国際局向け */
function WriteSB_For_International(url,ttl){
	var url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0];
	var url_encoded = encodeURIComponent(url);
	var ttl = encodeURIComponent(document.title);

	document.write('<div style="float:left; margin:1px 0px 0px 0px;">');
	document.write('<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;');
	document.write('</div>');

	document.write('<div style="float:left;">');
	document.write('<iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true" title="facebook"></iframe>');
	document.write('</div>');

	document.write('<div style="clear:both"></div>');
}

// 2011/05/27 hashタグ等々追加対応用function
function rewrite_social(url,ttl,hsh) {
	if ( url == "" ) { url = window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("#")[0]; }
	if ( ttl == "" ) { ttl = encodeURIComponent(document.title); }
	hsh = encodeURIComponent(hsh);

	var url_encoded = encodeURIComponent(url);
	var _html="";

	_html+='<div style="float:left; margin:1px 0px 0px 0px;">';
	_html+='<a href="http://b.hatena.ne.jp/append?'+url_encoded+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/hatena.gif" width="16" height="12" title="Hatena Bookmark"/></a>&nbsp;';
	_html+='<a href="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+ttl+'&u='+url_encoded+'&opener=bm&ei=UTF-8" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif" width="16" height="16" title="Yahoo! Bookmarks" /></a>&nbsp;';
	_html+='<a href="http://twitter.com/share?url='+url_encoded+'&text='+ttl+'+'+hsh+'" target="_blank"><img src="http://www.fujitv.co.jp/socialbookmark/img/twitter.gif" width="16" height="16" title="twitter" /></a>&nbsp;';
	_html+='</div>';

	_html+='<div style="float:left; margin-right:2px;">';
	_html+='<iframe src="http://share.gree.jp/share?url='+url+'&amp;type=0&amp;height=20" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:70px; height:20px;" allowTransparency="true"></iframe>';
	_html+='</div>';

	_html+='<div style="float:left;">';
	_html+='<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true" title="facebook"></iframe>';
	_html+='</div>';

	_html+='<div style="clear:both"></div>';
	
	document.getElementById("socialbookmark").innerHTML=_html;
}

/*
2012/02/01 標準化
*/
var sb = new Object();

// 表示ボタン制御（デフォルトでは全表示※Facebookはlike）
sb.btn = { 'hatena': true, 'yahoo': true, 'twitter': true, 'gree': true, 'mixi': true, 'google': true, 'facebook-like': true, 'facebook-share': false };

// ボタン用スタイル書き出し（※google、facebookは指定無し）
sb.style = "";
sb.style += ".hatena-bookmark-button {}";
sb.style += ".hatena-bookmark-button img { width: 20px; height:20px; border: none;}";
sb.style += ".yahoo-bookmark {}";
sb.style += ".yahoo-bookmark img { width: 16px; height: 16px; margin:2px 0px; }";
sb.style += "iframe.gree-irame { border:none; overflow:hidden; width:70px; height:20px; }";
sb.style += ".mixi-check-button {}";
sb.style += ".g-plusone { width: 80px!important; }";
sb.style += "iframe.twitter-share-button { width: 61px!important; }";
sb.style += "iframe.facebook-iframe { border:none; overflow:hidden; width:115px; height:20px; }";
sb.style += ".facebook-share {}";
sb.style += "#socialbookmark iframe {}";
sb.style += ".sb-margin { margin-right: 5px; }";
document.write("<style>"+sb.style+"</style>");

// ソーシャルボタン書き出し
sb.write = function(url,ttl,tgt) {
	
	var ogurl="";
	var ogttl="";

	// ogp情報取得
	var flg = 0;
	var _meta = document.getElementsByTagName('meta');
	for (var i=0;i<_meta.length;i++) {
		if ( typeof _meta.item(i).getAttribute("property") != "undefined" && _meta.item(i).getAttribute("property") === "og:url" ) { ogurl=_meta.item(i).getAttribute("content"); flg+=1; }
		if ( typeof _meta.item(i).getAttribute("property") != "undefined" && _meta.item(i).getAttribute("property") === "og:title" ) { ogttl=_meta.item(i).getAttribute("content"); flg+=1; }
		if ( flg > 1 ) { break; }
	}

	// OGP情報が無ければページ情報を取得
	ogurl = ( ogurl === "" ) ? window.location.href.replace("wwwz\.fujitv\.co\.jp","www\.fujitv\.co\.jp").split("?")[0].split("#")[0]: ogurl;
	ogttl = ( ogttl === "" ) ? document.title: ogttl;

	// URL、タイトルが空ならOGP情報（ページ情報）を取得
	url = ( typeof url === "undefined" || url === "" ) ? ogurl: url;
	ttl = ( typeof ttl === "undefined" || ttl === "" ) ? ogttl: ttl;

	// ターゲットIDが空ならsocialbookmark
	tgt = ( typeof tgt === "undefined" || tgt === "" ) ? "socialbookmark": tgt;

	// URLエンコード
	var url_encoded = encodeURIComponent(url);
	var ttl_encoded = encodeURIComponent(ttl);

	// HTML生成
	var _html="";
	_html+= ( sb.btn["hatena"] ) ? "<a class=\"hatena-bookmark-button sb-margin\" href=\"http://b.hatena.ne.jp/entry/"+url_encoded+"\" data-hatena-bookmark-title=\""+ttl+"\" data-hatena-bookmark-layout=\"simple\" title=\"このエントリーをはてなブックマークに追加\"><img src=\"http://b.st-hatena.com/images/entry-button/button-only.gif\" alt=\"このエントリーをはてなブックマークに追加\" /></a>": "";
	_html+= ( sb.btn["yahoo"] ) ? "<a class=\"yahoo-bookmark sb-margin\" href=\"http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t="+ttl_encoded+"&u="+url_encoded+"&opener=bm&ei=UTF-8\" target=\"_blank\"><img src=\"http://www.fujitv.co.jp/socialbookmark/img/yahoo.gif\" title=\"Yahoo! Bookmarks\" /></a>": "";
	_html+= ( sb.btn["gree"] ) ? "<iframe class=\"gree-irame sb-margin\" src=\"http://share.gree.jp/share?url="+url_encoded+"&amp;type=0&amp;height=20\" scrolling=\"no\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" allowTransparency=\"true\"></iframe>": "";
	/*
	_html+= ( sb.btn["mixi"] ) ? "<a class=\"mixi-check-button sb-margin\" href=\"http://mixi.jp/share.pl\" data-key=\"b67834bee19c797de84d9d51c68570e1f905a018\" data-url=\""+url_encoded+"\" title=\"mixi\" data-button=\"button-6\"></a>": "";
	*/
	
	_html+= ( sb.btn["mixi"] ) ? "<div class=\"sb-margin\" data-plugins-type=\"mixi-favorite\" data-service-key=\"b67834bee19c797de84d9d51c68570e1f905a018\" data-size=\"medium\" data-href=\""+url+"\" data-show-faces=\"false\" data-show-count=\"false\" data-show-comment=\"true\"></div>": "";
	
	_html+= ( sb.btn["twitter"] ) ? "<a class=\"twitter-share-button sb-margin\" href=\"https://twitter.com/intent/tweet\" data-url=\""+url+"\" data-text=\""+ttl+"\" data-lang=\"ja\" data-count=\"none\"></a>": "";
	_html+= ( sb.btn["facebook-share"] ) ? "<a class=\"facebook-share sb-margin\" href=\"http://www.facebook.com/sharer.php?u="+url_encoded+"&amp;t="+ttl_encoded+"\" rel=\"nofollow\" target=\"_blank\"><img src=\"http://www.fujitv.co.jp/images/share.png\" title=\"Facebook\" /></a>": "";
	//_html+= ( sb.btn["facebook-share"] ) ? "<a class=\"facebook-share\" share_url=\""+url+"\" name=\"fb_share\" type=\"button_count\"></a>": "";
	_html+= ( sb.btn["google"] ) ? "<div class=\"g-plusone\" data-size=\"medium\" data-href=\""+url+"\"></div>": "";
	_html+= ( sb.btn["facebook-like"] ) ? "<iframe class=\"facebook-iframe\" src=\"http://www.facebook.com/plugins/like.php?href="+url_encoded+"&amp;send=false&amp;layout=button_count&amp;width=115&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\"></iframe>": "";
	document.getElementById(tgt).innerHTML=_html;

}

sb.exec = function() {

	// 各ソーシャルボタン用スクリプト
	if ( sb.btn["hatena"] ) { document.write("<script type=\"text/javascript\" src=\"http://b.st-hatena.com/js/bookmark_button.js\" charset=\"utf-8\" async=\"async\"></script>"); }
	if ( sb.btn["mixi"] ) { (function(d) {var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true;s.src = '//static.mixi.jp/js/plugins.js#lang=ja';d.getElementsByTagName('head')[0].appendChild(s);})(document); }
	if ( sb.btn["twitter"] ) { !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); }
	if ( sb.btn["google"] ) { document.write("<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\">{lang: 'ja'}</script>"); }

}














