var sbm_ary = {
	"hatena"    : ["はてなブックマーク","http://b.hatena.ne.jp/append?{url}",1],
	"livedoor"  : ["livedoorクリップ","http://clip.livedoor.com/clip/add?link={url}&title={title}",0],
	"yahoo"     : ["Yahoo!ブックマーク","http://bookmarks.yahoo.co.jp/action/bookmark?t={title}&u={url}",0],
	"google"    : ["Google Bookmarks","http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}",0],
	"delicious" : ["Del.icio.us","http://del.icio.us/post?url={url}&title={title}",0],
	"twitter"   : ["Twitter","http://twitter.com/home/?status={title}{url}",0]
};
var link = "";
for(key in sbm_ary){
	var _url=location.href;
	var _title=document.title;
	var url=encodeURIComponent(_url);
	var title=encodeURIComponent(_title);
	var base=sbm_ary[key][1];
	// エンコード要
	if(sbm_ary[key][2]==0){
		base = base.replace('{url}', url);
		base = base.replace('{title}', title);
	// エンコード不要
	}else{
		base = base.replace('{url}', _url);
		base = base.replace('{title}', _title);
	}
	link += "<li><a href=\"" + base + "\" target=\"_blank\">";
	link += "<img src=\"/media/img/" + key + ".gif\" alt=\"" + sbm_ary[key][0] + "\" />"
	link += "</a></li>"
}
document.getElementById("icons").innerHTML = link;

