/* ポップアップ */
function popWin(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*　プルダウン　*/
function pulldown(targ,selObj,restore){
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}
/*　続きを読む・隠す　*/

function showMore(moreID, moreURL){
	showID = ('show' + (moreID));
	hideID = ('hide' + (moreID));
	if( document.getElementById ) {
		if( document.getElementById(hideID).style.display ) {
			if( moreURL != 0 ) {
				document.getElementById(hideID).style.display = "block";
				document.getElementById(showID).style.display = "none";
			} else { document.getElementById(hideID).style.display = "none";
				document.getElementById(showID).style.display = "block";
			}
		} else {
			location.href = moreURL;
			return true;
		}
	} else {
		location.href = moreURL;
		return true;
	}
}

function setCookie (name, value, expires, path, domain, secure) {
	var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((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);
    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 OpenComments (c) {
    window.open(c,
                    'comments',
                    'width=430,height=400,scrollbars=yes,status=no');
}

function OpenTrackback (c) {
    window.open(c,
                    'trackback',
                    'width=480,height=480,scrollbars=yes,status=yes');
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

/*　ランダム　*/

top_rnd= new Array(
<!-- APPLE -->
'',
''
);
function top_rnd1(){
{
a=Math.floor(Math.random()*top_rnd.length);
result=top_rnd[a]
}
return result;
}
function topPR(){
document.write(top_rnd1())
}
