// Bookmark
// ---------------------------------------------
url = 'http://www.xn--qckyd1ct91nes6c6fc.jp/';
name = '芸能人のダイエットブログ';
bmTitle = name + 'をお気に入りに登録';
function internetExplorer(){
	//ie向けのブックマーク登録
    window.external.addFavorite(url, name);
}
function fireFox(){
	//firefox向けのブックマーク登録
    window.sidebar.addPanel(name, url, "");
}
function bookmark(okini){//判定したブラウザ毎にリンク表示を切り替えて変更する
    if (navigator.userAgent.indexOf("Opera") > -1) {
        //Operaなら表示
        operaRel = 'rel="sidebar"';
        document.write('<a href="' + url + '" ' + operaRel + 'title="' + name + '">' + okini + '</a>');
    }
    else 
        if (navigator.userAgent.indexOf("Firefox") > -1) {
            //FireFoxなら表示
            document.write('<a href="javascript:fireFox()' + '" ' + 'title="' + bmTitle + '">' + okini + '</a>')
        }
        else {
            //該当無しなら表示（IE用）
            document.write('<a href="javascript:internetExplorer()' + '" ' + 'title="' + bmTitle + '">' + okini + '</a>')
        }
}


// Star of Average
// ---------------------------------------------
var ave=0;
var star=0;
var cnt=0;
var aveimg;

function average(){
	ave = star/cnt;
	ave = (ave * 10);
	ave = Math.round(ave);
	ave = (ave / 10);
	
	if(ave == 5){ aveimg = 50; }
	if(ave < 5){ aveimg = 45; }
	if(ave < 4.5){ aveimg = 40; }
	if(ave < 4){ aveimg = 35; }
	if(ave < 3.5){ aveimg = 30; }
	if(ave < 3){ aveimg = 25; }
	if(ave < 2.5){ aveimg = 20; }
	if(ave < 2){ aveimg = 15; }
	if(ave < 1.5){ aveimg = 10; }
	if(ave < 1){ aveimg = 5; }
	else{}
		
	ave = '<img src="http://www.xn--qckyd1ct91nes6c6fc.jp/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave").innerHTML = ave;
}


// Star of Average(Category)
// ---------------------------------------------

