function regist() {
 openWindow = window.open("","regist_check","width=400,height=200,resizable=yes,scrollbars=no,status=yes,left=32,top=135");
}

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




    if (document.comments_form) {
        if (document.comments_form.email != undefined &&
            (mtcmtmail = getCookie("mtcmtmail")))
            document.comments_form.email.value = mtcmtmail;
        if (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 (mtcmtauth || mtcmthome) {
            document.comments_form.bakecookie.checked = true;
        } else {
            document.comments_form.bakecookie.checked = false;
        }
    }
}

function writeTypeKeyGreeting(commenter_name, entry_id) {

}



//

function RunSWF() {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="540" height="160" id="main" align="middle">\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
    document.write('<param name="movie" value="http://www.koretame.com/images/topimg.swf" />\n');
    document.write('<param name="menu" value="false" />\n');
    document.write('<param name="quality" value="high" />\n');
    document.write('<param name="wmode" value="transparent" />\n');
    document.write('<embed src="http://www.koretame.com/images/topimg.swf" menu="false" quality="high" wmode="transparent" width="540" height="160" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
    document.write('</object>\n');
}

function oritatami(id){
	obj=(document.all)?document.all(id):((document.getElementById)?document.getElementById(id):null);
	if(obj)	obj.style.display=(obj.style.display=="none")?"block":"none";
}

var imagefile1 = new Array("http://www.koretame.com/images/button-drama.gif", "http://www.koretame.com/images/button-drama-over.gif");
var imagefile2 = new Array("http://www.koretame.com/images/button-movie.gif", "http://www.koretame.com/images/button-movie-over.gif");
var imagefile3 = new Array("http://www.koretame.com/images/button-goods.gif", "http://www.koretame.com/images/button-goods-over.gif");
var imagefile4 = new Array("http://www.koretame.com/images/button-music.gif", "http://www.koretame.com/images/button-music-over.gif");

var flag1 = 0;
var flag2 = 0;
var flag3 = 0;
var flag4 = 0;

var image1 = new Array(imagefile1.length);
for(count = 0; count < (imagefile1.length - 1); count++){
	image1[count] = new Image();
	image1[count].src = imagefile1[count];
}
var image2 = new Array(imagefile2.length);
for(count = 0; count < (imagefile2.length - 1); count++){
	image2[count] = new Image();
	image2[count].src = imagefile2[count];
}
var image3 = new Array(imagefile3.length);
for(count = 0; count < (imagefile3.length - 1); count++){
	image3[count] = new Image();
	image3[count].src = imagefile3[count];
}
var image4 = new Array(imagefile4.length);
for(count = 0; count < (imagefile4.length - 1); count++){
	image4[count] = new Image();
	image4[count].src = imagefile4[count];
}

function imagechange1(){
	if(flag1 == 0){flag1 = 1;}
	else{flag1 = 0;}
	window.document.images["img1"].src  = imagefile1[flag1];
}
function imagechange2(){
	if(flag2 == 0){flag2 = 1;}
	else{flag2 = 0;}
	window.document.images["img2"].src  = imagefile2[flag2];
}
function imagechange3(){
	if(flag3 == 0){flag3 = 1;}
	else{flag3 = 0;}
	window.document.images["img3"].src  = imagefile3[flag3];
}
function imagechange4(){
	if(flag4 == 0){flag4 = 1;}
	else{flag4 = 0;}
	window.document.images["img4"].src  = imagefile4[flag4];
}