
// はてなブックマークへのブックマーク追加
var writeHatenaBookmark = function(idName) {
	var obj1 = document.getElementById(idName);
	var a = document.createElement('a');
	var btnimg = document.createElement('img');
	with(btnimg) {
		src = "http://ch3cooh.jp/images/b_entry.gif";
		width = 16;
		height = 12;
		style.border = 'none';
		style.verticalAlign = 'middle';
		alt = 'このエントリーを含むはてなブックマーク';
		title = 'このエントリーを含むはてなブックマーク';
	}
	var ctrimg = document.createElement('img');
	with(ctrimg) {
		src = 'http://b.hatena.ne.jp/entry/image/' + location.href;
		style.border = 'none';
		style.verticalAlign = 'middle';
	}	
	with(a) {
		href = 'http://b.hatena.ne.jp/entry/' + location.href;
		appendChild(btnimg);
		appendChild(ctrimg);
	}
	obj1.appendChild(a);
}

// Livedoorクリップへのブックマーク追加
var writeLivedoorClip = function(idName) {
	var obj1 = document.getElementById(idName);
	var a = document.createElement('a');
	var btnimg = document.createElement('img');
	with(btnimg) {
		src = "http://ch3cooh.jp/images/livedoor_ico.gif";
		width = 16;
		height = 16;
		style.border = 'none';
		style.verticalAlign = 'middle';
		alt = 'このエントリーをlivedoorクリップに追加';
		title = 'このエントリーをlivedoorクリップに追加';
	}
	var ctrimg = document.createElement('img');
	with(ctrimg) {
		src = 'http://image.clip.livedoor.com/counter/' + location.href;
		style.border = 'none';
		style.verticalAlign = 'middle';
	}	
	with(a) {
		href = "http://clip.livedoor.com/clip/add?link=" + location.href + "&title=" + encodeURIComponent(document.title) + "&jump=ref";
		appendChild(btnimg);
		appendChild(ctrimg);
	}
	obj1.appendChild(a);
}

// FC2ブックマークへのブックマーク追加
var writeFc2Bookmark = function(idName) {
	var obj1 = document.getElementById(idName);
	var a = document.createElement('a');
	var btnimg = document.createElement('img');
	with(btnimg) {
		src = "http://ch3cooh.jp/images/fc2_ico.gif";
		width = 16;
		height = 16;
		style.border = 'none';
		style.verticalAlign = 'middle';
		alt = 'このエントリーをFC2ブックマークに追加';
		title = 'このエントリーをFC2ブックマークに追加';
	}
	var ctrimg = document.createElement('img');
	with(ctrimg) {
		src = 'http://bookmark.fc2.com/image/users/' + location.href;
		style.border = 'none';
		style.verticalAlign = 'middle';
	}	
	with(a) {
		href = "http://bookmark.fc2.com/user/post?url=" + encodeURIComponent(location.href) + "&title=" + encodeURIComponent(document.title) + "&jump=ref";
		appendChild(btnimg);
		appendChild(ctrimg);
	}
	obj1.appendChild(a);
}

// buzzurlへのブックマーク追加
var writeBuzzurlBookmark = function(idName) {
	var obj1 = document.getElementById(idName);
	var a = document.createElement('a');
	var btnimg = document.createElement('img');
	with(btnimg) {
		src = "http://ch3cooh.jp/images/buzzurl_ico.gif";
		width = 16;
		height = 16;
		style.border = 'none';
		style.verticalAlign = 'middle';
		alt = 'このエントリーをbuzzurlブックマークに追加';
		title = 'このエントリーをbuzzurlブックマークに追加';
	}
	var ctrimg = document.createElement('img');
	with(ctrimg) {
		src = 'http://api.buzzurl.jp/api/counter/' + location.href;
		style.border = 'none';
		style.verticalAlign = 'middle';
	}	
	with(a) {
		href = "http://buzzurl.jp/entry/" + location.href;
		appendChild(btnimg);
		appendChild(ctrimg);
	}
	obj1.appendChild(a);
}

// Yahooブックマークへのブックマーク追加
var writeYahooBookmark = function(idName) {
	var obj1 = document.getElementById(idName);
	var a = document.createElement('a');
	var btnimg = document.createElement('img');
	with(btnimg) {
		src = "http://ch3cooh.jp/images/yahoo_ico.gif";
		width = 16;
		height = 16;
		style.border = 'none';
		style.verticalAlign = 'middle';
		alt = 'このエントリーをYahoo ブックマークに追加';
		title = 'このエントリーをYahoo ブックマークに追加';
	}
	var ctrimg = document.createElement('img');
	with(ctrimg) {
		src = 'http://num.bookmarks.yahoo.co.jp/image/small/' + location.href;
		style.border = 'none';
		style.verticalAlign = 'middle';
	}	
	with(a) {
		href = "http://bookmarks.yahoo.co.jp/url?url=" + location.href;
		appendChild(btnimg);
		appendChild(ctrimg);
	}
	obj1.appendChild(a);
}

// Googleブックマークへのブックマーク追加
var writeGoogleBookmark = function(idName) {
	var obj1 = document.getElementById(idName);
	var a = document.createElement('a');
	var btnimg = document.createElement('img');
	with(btnimg) {
		src = "http://ch3cooh.jp/images/google_ico.gif";
		width = 16;
		height = 16;
		style.border = 'none';
		style.verticalAlign = 'middle';
		alt = 'このエントリーをGoogleブックマークに追加';
		title = 'このエントリーをGoogleブックマークに追加';
	}
	with(a) {
		href = "http://www.google.com/bookmarks/mark?op=edit&bkmk=" + location.href + "&title=" + encodeURIComponent(document.title) + "&jump=ref";
		appendChild(btnimg);
	}
	obj1.appendChild(a);
}

//// GoogleAdsence追加
//var writeGoogleAdsence = function(idName) {
//	var obj1 = document.getElementById(idName);
//	var s1 = document.createElement('script');
//	with(s1) {
//		type = "text/javascript"
//		google_ad_client = "pub-6275292186973463";
//		google_ad_slot = "9437367493";
//		google_ad_width = 468;
//		google_ad_height = 60;
//    }
//	var s2 = document.createElement('script');
//	with(s2) {
//		type = "text/javascript"
//		src = "http://pagead2.googlesyndication.com/pagead/show_ads.js";
//    }
//	obj1.appendChild(s2);
//	obj1.appendChild(s1);
//}


