function getCookie(key,  tmp1, tmp2, xx1, xx2, xx3) {
    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) {
    tmp = key + "=" + escape(val) + "; ";
    // tmp += "path=" + location.pathname + "; ";
//    tmp += "expires=Tue, 31-Dec-2030 23:59:59; ";
    document.cookie = tmp;
}

function sck(){
	count=0;
	posnum = getCookie("POS");
	if(posnum!=""){
		if(st==posnum){
			posnum=st;
			flg="true";
		}else{
			posnum=st;
			flg="false";
		}
	}else{
		posnum=st;
		flg="false";
	}

	setCookie("POS", posnum);


Event.observe(window, 'load', function(){
		var acc = new accordion("menuarea");
		acc.activate($$("#menuarea .accordion_toggle")[st]);
}, false);

}

function visibleSwitch(key) {
	if(key==0){
//		document.getElementById("menuarea").style.display= "none";
		document.getElementById("menuarea").style.visibility= "hidden";
	}else if(key==1){
//		document.getElementById("menuarea").style.display= "block";
		document.getElementById("menuarea").style.visibility= "visible";
	}
}


//ポップアップウインドウ
function PopWindow(URL,sizeW,sizeH,scYN){
	var win01 = window.open(URL,'p_window','toolbar=no,location=no,status=no,menubar=no, scrollbars='+scYN+',width='+sizeW+',height='+sizeH);
	win01.focus();
}