var getElements = function(className) {
	var exp = '//*[contains(concat(" ",@class," "), " ' + className + ' ")]';
	var r = document.evaluate(exp, document, null, 7, null);
	var items = [];
	for (var i = 0; i < r.snapshotLength; i++) {
		items.push(r.snapshotItem(i));
	}
	return items;
};
setupRadius = function(className, side, options) {
	var items = getElements(className);
  if (is_firefox()) {
    options['backgroundImage'] = null;
  }
	for (var i = 0; i < items.length; i++) {
	  $(items[i]).makeRounded(side, options);
	}
}
window.console = window.console || {log: function(){}};

function open_compare_table(id) {
    var w = window.open('/pcompare/detail.php?pid=' + id, '126153624926105', 'width=990,height=650,scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes');
}

function outputSmbLinks(entry_permalink, title, className) {
	var url = 'http://' + document.location.hostname + entry_permalink;
	var status = title + ' - Linksラボ ' + url;
	document.write('<div id="sbm" class="' + className + '">');
	document.write('<a href="http://twitter.com/home?status=' + encodeURIComponent(status) + '" target="_blank" rel="nofollow"><img src="/images/sbm/twitter.png" alt="このエントリをつぶやく"  width="24" height="24" /></a>');
	document.write('<a href="http://b.hatena.ne.jp/append?' + url + '" title="この記事をはてなブックマークへ追加する"><img src="/images/sbm/hatena.gif" alt="この記事をはてなブックマークへ追加する" title="この記事をはてなブックマークへ追加する" width="16" height="12" /></a>');
	document.write('<a href="javascript:location.href=\'http://del.icio.us/post?url=' + encodeURIComponent(url) + '&amp;title=' + encodeURIComponent(title) + '\';" title="この記事をdel.icio.usへ追加する"><img src="/images/sbm/delicious.gif" alt="この記事をdel.cio.usへ追加する" title="この記事をdel.icio.usへ追加する" width="16" height="16" /></a>');
	document.write('<a href="javascript:location.href=\'http://clip.livedoor.com/clip/add?link=' + encodeURIComponent(url) + '&amp;title=' + encodeURIComponent(title) + '\';" title="この記事をlivedoor clipへ追加する"><img src="/images/sbm/livedoor.gif" alt="この記事をlivedoor clipへ追加する" title="この記事をlivedoor clipへ追加する" width="16" height="16" /></a>');
	document.write('<a href="javascript:location.href=\'http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=' + encodeURIComponent(url) + '&amp;title=' + encodeURIComponent(title) + '\';" title="この記事をGoogleブックマークへ追加する"><img src="/images/sbm/google.gif" alt="この記事をGoogleブックマークへ追加する" title="この記事をGoogleブックマークへ追加する" width="16" height="16" /></a>');
	document.write('<a href="javascript:location.href=\'http://bookmarks.yahoo.co.jp/action/bookmark?t=' + encodeURIComponent(title) + '&amp;u=' + encodeURIComponent(url) + '\';" title="この記事をYahoo!ブックマークへ追加する"><img src="/images/sbm/yahoo.gif" alt="この記事をYahoo!ブックマークへ追加する" title="この記事をYahoo!ブックマークへ追加する" width="16" height="16" /></a>');
	document.write('</div>');
}
function is_ie6() {
    return navigator.userAgent.indexOf("MSIE") > -1 && (typeof document.body.style.maxHeight) == "undefined"; // not IE6
}
function is_firefox() {
    return navigator.userAgent.toLowerCase().indexOf("firefox") != -1;
}
