function CookieCheck(){
	times = getCookie("arcadiasaga");
	if (times == "OK") {
		return true;
	} else {
		return false;
	}
}

function getCookie(key){//クッキーからの読み込み用関数
    tmp1 = " " + document.cookie + ";";
    xx1 = xx2 = 0;
    len = tmp1.length;
    while (xx1 < len) {
        xx2 = tmp1.indexOf(";", xx1);
        tmp2 = tmp1.substring(xx1 + 1, xx2);
        xx3 = tmp2.indexOf("=");
        if (tmp2.substring(0, xx3) == key) {
            return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
        }
        xx1 = xx2 + 1;
    }
    return("");
}

function setCookie(key,val){//クッキーへの書き込み用関数
    tmp = key+"="+escape(val)+";";
    tmp += "expires=Fri, 31-Dec-2030 23:59:59;";
    document.cookie = tmp;
}

function delCookie(key){//クッキーへの削除用関数
    tmp = key+"=NG;";
    tmp += "Tue, 1-Jan-1980 00:00:00;";
    document.cookie = tmp;
}

function into(){
if(document.arcadiasaga.flg.checked == true){
    setCookie("arcadiasaga","OK");
  }else{
    delCookie("arcadiasaga");
  }
}
