// Bookmark
// ---------------------------------------------
url = 'http://www.11foods.com/';
name = '調理師・管理栄養士の家庭料理レシピ　家庭料理向上.com';
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.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave").innerHTML = ave;
}


// Star of Average(Category)
// ---------------------------------------------
var ave000049=0;
var star000049=0;
var cnt000049=0;
var aveimg;

function average000049(){
	var ave;
	ave = star000049/cnt000049;
	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{}
	
	ave000049 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000049").innerHTML = ave000049;
}
var ave000038=0;
var star000038=0;
var cnt000038=0;
var aveimg;

function average000038(){
	var ave;
	ave = star000038/cnt000038;
	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{}
	
	ave000038 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000038").innerHTML = ave000038;
}
var ave000020=0;
var star000020=0;
var cnt000020=0;
var aveimg;

function average000020(){
	var ave;
	ave = star000020/cnt000020;
	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{}
	
	ave000020 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000020").innerHTML = ave000020;
}
var ave000019=0;
var star000019=0;
var cnt000019=0;
var aveimg;

function average000019(){
	var ave;
	ave = star000019/cnt000019;
	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{}
	
	ave000019 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000019").innerHTML = ave000019;
}
var ave000015=0;
var star000015=0;
var cnt000015=0;
var aveimg;

function average000015(){
	var ave;
	ave = star000015/cnt000015;
	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{}
	
	ave000015 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000015").innerHTML = ave000015;
}
var ave000016=0;
var star000016=0;
var cnt000016=0;
var aveimg;

function average000016(){
	var ave;
	ave = star000016/cnt000016;
	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{}
	
	ave000016 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000016").innerHTML = ave000016;
}
var ave000014=0;
var star000014=0;
var cnt000014=0;
var aveimg;

function average000014(){
	var ave;
	ave = star000014/cnt000014;
	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{}
	
	ave000014 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000014").innerHTML = ave000014;
}
var ave000008=0;
var star000008=0;
var cnt000008=0;
var aveimg;

function average000008(){
	var ave;
	ave = star000008/cnt000008;
	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{}
	
	ave000008 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000008").innerHTML = ave000008;
}
var ave000005=0;
var star000005=0;
var cnt000005=0;
var aveimg;

function average000005(){
	var ave;
	ave = star000005/cnt000005;
	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{}
	
	ave000005 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000005").innerHTML = ave000005;
}
var ave000004=0;
var star000004=0;
var cnt000004=0;
var aveimg;

function average000004(){
	var ave;
	ave = star000004/cnt000004;
	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{}
	
	ave000004 = '<img src="http://www.11foods.com/image/star' + aveimg + '.gif" alt="星' + ave + 'つ" title="星' + ave + 'つ" border="0" />(' + ave + ')';
	document.getElementById("star-ave000004").innerHTML = ave000004;
}


// Bookmark
// ---------------------------------------------

url = 'http://www.11foods.com/';
name = '調理師・管理栄養士の家庭料理レシピ　家庭料理向上.com';
function bookMark() {
	window.external.addFavorite(url,name);
}



// Table col3
// ---------------------------------------------


function col3(tableId){
	var oTable = document.getElementById(tableId);
	var workTable = oTable.cloneNode(1);
	var cellArr = workTable.getElementsByTagName('td');
	for(var i=oTable.tBodies[0].childNodes.length-1;i>=0;i--)
	oTable.tBodies[0].removeChild(oTable.tBodies[0].childNodes[i]);
	
	var c=0;
	var line = 0;
	while(cellArr[c]){
		var TR = oTable.tBodies[0].insertRow(line++);
		for(var i=0;i<3;i++,c++){
		if(cellArr[c]) TR.appendChild(cellArr[c].cloneNode(1));
		else TR.insertCell(i);
		}
	}
}




// Entry more
// ---------------------------------------------

function eMore(){
	var kensaku = document.getElementById("entry-more");
	jouken = new RegExp("href=\"(.*?)\"");
	kekka = kensaku.innerHTML.match(jouken);
	document.write("<a "+kekka[0]+">");
	document.write("<img border='0' alt='この商品の詳細・購入' src='http://www.11foods.com/image/purchase.png' /></a>");
}




// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + (expires ? "; expires=" + expires : "") +
        (path ? "; path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "secure" : "");
    document.cookie = curCookie;
}

function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
    if (getCookie(name))
        document.cookie = name + "=" + ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function fixDate (date) {
    var base = new Date(0);
    var skew = base.getTime();
    if (skew > 0)
        date.setTime(date.getTime() - skew);
}

function rememberMe (f) {
    var now = new Date();
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    now = now.toGMTString();
    if (f.author != undefined)
       setCookie('mtcmtauth', f.author.value, now, '/', '', '');
    if (f.email != undefined)
       setCookie('mtcmtmail', f.email.value, now, '/', '', '');
    if (f.url != undefined)
       setCookie('mtcmthome', f.url.value, now, '/', '', '');
}

function forgetMe (f) {
    deleteCookie('mtcmtmail', '/', '');
    deleteCookie('mtcmthome', '/', '');
    deleteCookie('mtcmtauth', '/', '');
    f.email.value = '';
    f.author.value = '';
    f.url.value = '';
}

function hideDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'none';
}

function showDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'block';
}

var commenter_name;

function individualArchivesOnLoad(commenter_name) {

    hideDocumentElement('trackbacks-info');



    if (document.comments_form) {
        if (!commenter_name && (document.comments_form.email != undefined) &&
            (mtcmtmail = getCookie("mtcmtmail")))
            document.comments_form.email.value = mtcmtmail;
        if (!commenter_name && (document.comments_form.author != undefined) &&
            (mtcmtauth = getCookie("mtcmtauth")))
            document.comments_form.author.value = mtcmtauth;
        if (document.comments_form.url != undefined && 
            (mtcmthome = getCookie("mtcmthome")))
            document.comments_form.url.value = mtcmthome;
        if (document.comments_form["bakecookie"]) {
            if (mtcmtauth || mtcmthome) {
                document.comments_form.bakecookie.checked = true;
            } else {
                document.comments_form.bakecookie.checked = false;
            }
        }
    }
}

function writeTypeKeyGreeting(commenter_name, entry_id) {

}


