// 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) {



 // comments are allowed but not required
    if (commenter_name) {
        hideDocumentElement('name-email');
    } else {
        showDocumentElement('name-email');
    }



    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) {

    if (commenter_name) {
        document.write('<p>サインインを受け付けました。 ' + commenter_name +
          'さん。コメントができます。'+
          '(<a href="http://fukuro-p.net/mt/mt-comments.cgi?__mode=handle_sign_in&amp;static=1&amp;logout=1&entry_id=' + entry_id + '">サイン・アウト</a>)</p>');
    } else {

        document.write('<p>TypeKey IDを使って '+
          '<a href="https://www.typekey.com/t/typekey/login?&amp;lang=ja&amp;t=2BgnBszx2nu3OlPQdZlB&amp;v=1.1&amp;_return=http://fukuro-p.net/mt/mt-comments.cgi%3f__mode=handle_sign_in%26key=TypeKey%26static=1%26entry_id=' + entry_id + '">サインイン</a> '+
          'してください。</p>');

    }

}


if ('fukuro-p.net' != 'fukuro-p.net') {
    document.write('<script src="http://fukuro-p.net/mt/mt-comments.cgi?__mode=cmtr_name_js"></script>');
} else {
    commenter_name = getCookie('commenter_name');
}


//画像切り替え処理(20090324山口追加)
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//トップアコーディオン(20110401追加)
var slideMenu=function(){
var sp,st,t,m,sa,l,w,sw,ot;
return{
build:function(sm,sw,mt,s,sl,h){
sp=s; st=sw; t=mt;
m=document.getElementById(sm);
sa=m.getElementsByTagName('li');
l=sa.length; w=m.offsetWidth; sw=w/l;
ot=Math.floor((w-st)/(l-1)); var i=0;
for(i;i<l;i++){s=sa[i]; s.style.width=sw+'px'; this.timer(s)}
if(sl!=null){m.timer=setInterval(function(){slideMenu.slide(sa[sl-1])},t)}
},
timer:function(s){s.onmouseover=function(){clearInterval(m.timer);m.timer=setInterval(function(){slideMenu.slide(s)},t)}},
slide:function(s){
var cw=parseInt(s.style.width,'10');
if(cw<st){
var owt=0; var i=0;
for(i;i<l;i++){
if(sa[i]!=s){
var o,ow; var oi=0; o=sa[i]; ow=parseInt(o.style.width,'10');
if(ow>ot){oi=Math.floor((ow-ot)/sp); oi=(oi>0)?oi:1; o.style.width=(ow-oi)+'px'}
owt=owt+(ow-oi)}}
s.style.width=(w-owt)+'px';
}else{clearInterval(m.timer)}
}
};
}();


//top_header(20110602)
function getObjectTagFlash(strFlashName, intWidth,intHeight,strConfigName,strBgcolor,intCache,intQty,strOption) {
	var strFlashVars;
	var strBgcolor;
	var strQty;
	var ret;
	strFlashVars = 'stage_width=' + intWidth + '&amp;stage_height=' + intHeight;
	strQty = 'low';
	strBackground = '';
	ret = '';
	if (typeof(strConfigName) == 'string') {
		strFlashVars += '&amp;xmldata=' + escape(strConfigName);
	};
	if (typeof(intCache) == 'number') {
		if (strFlashVars != '') {
			strFlashVars += '&amp;cache_xml=' + intCache;
		} else {
			strFlashVars = 'cache_xml=' + intCache;
		};
	};
	if (typeof(strOption) == 'string') {
		if (strFlashVars != '') {
			strFlashVars += '&amp;' + strOption;
		} else {
			strFlashVars += strOption;
		};
	};
	if (typeof(strBgcolor) == 'string') {
		strBackground = strBgcolor;
	};
	if (typeof(intQty) == 'number') {
		if (intQty) {
			strQty = 'high';
		};
	};
	ret += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	ret += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" '; 
	ret += 'width="'+intWidth+'" height="'+intHeight+'"> ';
	ret += '<param name=movie value="' + strFlashName + '"> ';
	if (strFlashVars != '') {
		ret += '<param name="flashvars" value="' + strFlashVars + '"> ';
	}
	if (strBackground != '') {
		ret += '<param name=bgcolor value="' + strBackground + '">';
	} else {
		ret += '<param name=wmode value="transparent">';
	};
	ret += '<param name=quality value=' + strQty + '> ';
	ret += '<param name=scale value="noscale"> ';
	ret += '<param name=salign value="TL"> ';
	ret += '<embed src="'+strFlashName+'" quality=' + strQty;
	ret += ' width="'+intWidth+'" height="'+intHeight+'" ';
	if (strBackground != '') {
		ret += ' bgcolor="' + strBackground + '" ';
	} else {
		ret += ' wmode="transparent" ';
	};
	if (strFlashVars != '') {
		ret += 'flashvars="' + strFlashVars + '" ';
	};
	ret += 'scale="noscale" ';
	ret += 'salign="TL" ';
	ret += 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed> ';
	ret += '<\/object> ';
	return ret;
};
function getPlugin(strImageName,intWidth,intHeight) {
	var ret;
		ret  = '<a href="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
		ret += '<img src="'+ strImageName + '" alt="Get Flash Player" border="0">';
		ret += '<\/a>';
	return ret;
}
function getPluginWH(strImageName,intWidth,intHeight) {
	var ret;
		ret = '<img src="'+ strImageName + '" width="' + intWidth + '" height="' + intHeight + '" alt="Get Flash Player" border="0">';
	return ret;
}
function getPluginW(strImageName,intWidth,intHeight) {
	var ret;
		ret = '<img src="'+ strImageName + '" width="' + intWidth + '" alt="Get Flash Player" border="0">';
	return ret;
}
function getPluginH(strImageName,intWidth,intHeight) {
	var ret;
		ret = '<img src="'+ strImageName + '" height="' + intHeight + '" alt="Get Flash Player" border="0">';
	return ret;
}
function getPluginText(strImageName,intWidth,intHeight) {
	var ret;
		ret  = '<img src="'+ strImageName + '" width="' + intWidth + '" height="' + intHeight + '" alt="Get Flash Player" border="0">';
		ret += '<table><tr><td bgcolor="#FFCC00"><p><font color="#333333"><a href="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">CLICK HERE<\/a> TO DOWNLOAD MACROMEDIA FLASH PLAYER NOW.<\/font><\/p><\/td><\/tr><\/table>';
	return ret;
}
function openFPE(strFlashName,strImageName,intWidth,intHeight,strConfigName,strBgcolor,intCache,intQty) {
	var nQ = 1;
	if (typeof(intQty) == 'number') {
		nQ = intQty;
	}
	if ( MM_FlashCanPlay ) {
		document.write(getObjectTagFlash(strFlashName, intWidth,intHeight,strConfigName,strBgcolor,intCache,nQ));
	} else{
		document.write(getPlugin(strImageName,intWidth,intHeight));
	}
};
function getObjectTagEasyFPE(strFlashName, strImageName, intWidth,intHeight,strBgcolor,intMax,intEtype,intEtime,intStime,strPrefix) {
	var strOption;
	strOption = "";
	if (typeof(intMax) == 'number') { strOption += "image_max=" + intMax };
	if (typeof(intEtype) == 'number') {strOption += "&amp;effect_type=" + intEtype };
	if (typeof(intEtime) == 'number') {strOption += "&amp;effect_time=" + intEtime };
	if (typeof(intStime) == 'number') {strOption += "&amp;stop_time=" + intStime };
	if (typeof(strPrefix) == 'string') {strOption += "&amp;prefix=" + escape(strPrefix) + "" };

	if ( MM_FlashCanPlay ) {
		return getObjectTagFlash(strFlashName, intWidth,intHeight,"none",strBgcolor,0,1,strOption);
	} else{
		return getPlugin(strImageName,intWidth,intHeight);
	}
};
function easyFPE(strFlashName, strImageName, intWidth,intHeight,strBgcolor,intMax,intEtype,intEtime,intStime,strPrefix) {
	document.write(getObjectTagEasyFPE(strFlashName,strImageName,intWidth,intHeight,strBgcolor,intMax,intEtype,intEtime,intStime,strPrefix));
};
function openFBE(strFlashName,strImageName,intWidth,intHeight,strConfigName,strBgcolor,intCache,intQty) {
	if ( MM_FlashCanPlay ) {
		document.write(getObjectTagFlash(strFlashName, intWidth,intHeight,strConfigName,strBgcolor,intCache,intQty));
	} else{
		document.write(getPlugin(strImageName,intWidth,intHeight));
	}
};
function getObjectTagEasyFBE(strFlashName, strImageName, intWidth, intHeight, strBgcolor, intOver_effect,intOver_time, intCol_max, intRow_max, strButton_normal, strButton_over, intPadding, intScope) {
	var strOption;
	strOption = "";
	if (typeof(intOver_effect) == 'number') { strOption += "over_effect=" + intOver_effect };
	if (typeof(intOver_time) == 'number') { strOption += "&over_time=" + intOver_time };
	if (typeof(intCol_max) == 'number') {strOption += "&col_max=" + intCol_max };
	if (typeof(intRow_max) == 'number') {strOption += "&row_max=" + intRow_max };
	if (typeof(intPadding) == 'number') {strOption += "&padding=" + intPadding };
	if (typeof(intScope) == 'number') {strOption += "&scope=" + intScope };
	if (typeof(strButton_normal) == 'string') {strOption += "&button_normal=" + escape(strButton_normal) + "" };
	if (typeof(strButton_over) == 'string') {strOption += "&button_over=" + escape(strButton_over) + "" };

	if ( MM_FlashCanPlay ) {
		return getObjectTagFlash(strFlashName, intWidth,intHeight,"none",strBgcolor,0,0,strOption);
	} else{
		return getPlugin(strImageName,intWidth,intHeight);
	}
};
function easyFBE(strFlashName, strImageName, intWidth,intHeight,strBgcolor,intOver_effect,intOver_time, intCol_max, intRow_max, strButton_normal, strButton_over, intPadding, intScope) {
	document.write(getObjectTagEasyFBE(strFlashName,strImageName,intWidth,intHeight,strBgcolor,intOver_effect,intOver_time, intCol_max, intRow_max, strButton_normal, strButton_over, intPadding, intScope));
};
function openFZE(strFlashName,strImageName,intWidth,intHeight,strConfigName,strBgcolor,intCache,intQty) {
	if ( MM_FlashCanPlay ) {
		document.write(getObjectTagFlash(strFlashName, intWidth,intHeight,strConfigName,strBgcolor,intCache,intQty));
	} else{
		document.write(getPlugin(strImageName,intWidth,intHeight));
	}
};
function getObjectTagEasyFZE(strFlashName, strImageName, intWidth,intHeight,strBgcolor,intZoom_effect,intZoom_time,strImage, strPreview,strNavi,intZoom_fade,intView_mode,intOpe_mode,intNavi_mode,intNavi_effect,intNavi_time,intZoom_mode) {
	var strOption;
	strOption = "";
	if (typeof(intZoom_effect) == 'number') { strOption += "zoom_effect=" + intZoom_effect };
	if (typeof(intZoom_time) == 'number') { strOption += "&zoom_time=" + intZoom_time };
	if (typeof(strImage) == 'string') {strOption += "&zoom_url=" + escape(strImage) + "" };
	if (typeof(strPreview) == 'string') {strOption += "&preview_url=" + escape(strPreview) + "" };
	if (typeof(strNavi) == 'string') {strOption += "&navi_url=" + escape(strNavi) + "" };
	if (typeof(intZoom_fade) == 'number') { strOption += "&zoom_fade=" + intZoom_fade };
	if (typeof(intView_mode) == 'number') {strOption += "&view_mode=" + intView_mode };
	if (typeof(intZoom_mode) == 'number') {strOption += "&zoom_mode=" + intZoom_mode };
	if (typeof(intOpe_mode) == 'number') {strOption += "&operation_mode=" + intOpe_mode };
	if (typeof(intNavi_mode) == 'number') {strOption += "&navi_mode=" + intNavi_mode };
	if (typeof(intNavi_effect) == 'number') { strOption += "&navi_effect=" + intNavi_effect };
	if (typeof(intNavi_time) == 'number') { strOption += "&navi_time=" + intNavi_time };

	if ( MM_FlashCanPlay ) {
		return getObjectTagFlash(strFlashName, intWidth,intHeight,"none",strBgcolor,0,0,strOption);
	} else{
		if (typeof(intView_mode) == 'number') {
			if (intView_mode == 1) {
				return getPluginW(strImageName,intWidth,intHeight);
			} else if (intView_mode == 2) {
				return getPluginH(strImageName,intWidth,intHeight);
			}
		}
		return getPluginWH(strImageName,intWidth,intHeight);
	}
};
function easyFZE(strFlashName, strImageName, intWidth,intHeight,strBgcolor,intZoom_effect,intZoom_time,strImage, strPreview,strNavi,intZoom_fade,intView_mode,intOpe_mode,intNavi_mode,intNavi_effect,intNavi_time,intZoom_mode) {
	document.write(getObjectTagEasyFZE(strFlashName,strImageName,intWidth,intHeight,strBgcolor,intZoom_effect,intZoom_time,strImage, strPreview,strNavi,intZoom_fade,intView_mode,intOpe_mode,intNavi_mode,intNavi_effect,intNavi_time,intZoom_mode));
};

<!--
var MM_contentVersion = 7;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
//-->

//お中元ページ(20110614追加)
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}


