//********* メニュー関連 **********//
$(document).ready(function() {
    $('#mainmenu').treeview({
      unique: false,
      persist: "cookie"
      });
});
//********* WindowOpen関連 **********//
function openWin(URL) {
   var w = window;
   if ((w == window) || w.closed) {
      w = open(URL, "Newwindow", "width=540,height=520,left=0,top=0,menubar=no,scrollbars");
      w.focus()
 }
   return(false);
}


function openWin2(URL) {
   var w2 = window;
   if ((w2 == window) || w2.closed) {
      w2 = open(URL, "Newwindow", "width=540,height=400,left=0,top=0,menubar=no,scrollbars");
      w2.focus()
 }
   return(false);
}

function openWin3(URL) {
   var w3 = window;
   if ((w3 == window) || w3.closed) {
      w3 = open(URL, "Newwindow", "width=620,height=520,left=0,top=0,menubar=no,scrollbars");
      w3.focus()
 }
   return(false);
}


//********* radioボタン関連 **********//
function radioChange() {
   if (document.kaiin1.chkENQT[0].checked == true) {
      document.kaiin1.ANSR1.disabled = false;
      document.kaiin1.ANSR1.style.backgroundColor = '#FFFFFF';
      document.kaiin1.ANSR2.disabled = true;
      document.kaiin1.ANSR2.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR3.disabled = true;
      document.kaiin1.ANSR3.style.backgroundColor = '#CCCCCC';
 } else if (document.kaiin1.chkENQT[1].checked == true) {
      document.kaiin1.ANSR1.disabled = true;
      document.kaiin1.ANSR1.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR2.disabled = false;
      document.kaiin1.ANSR2.style.backgroundColor = '#FFFFFF';
      document.kaiin1.ANSR3.disabled = true;
      document.kaiin1.ANSR3.style.backgroundColor = '#CCCCCC';
 } else if (document.kaiin1.chkENQT[2].checked == true) {
      document.kaiin1.ANSR1.disabled = true;
      document.kaiin1.ANSR1.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR2.disabled = true;
      document.kaiin1.ANSR2.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR3.disabled = false;
      document.kaiin1.ANSR3.style.backgroundColor = '#FFFFFF';
 } else if (document.kaiin1.chkENQT[3].checked == true) {
      document.kaiin1.ANSR1.disabled = true;
      document.kaiin1.ANSR1.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR2.disabled = true;
      document.kaiin1.ANSR2.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR3.disabled = true;
      document.kaiin1.ANSR3.style.backgroundColor = '#CCCCCC';
 } else if (document.kaiin1.chkENQT[4].checked == true) {
      document.kaiin1.ANSR1.disabled = true;
      document.kaiin1.ANSR1.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR2.disabled = true;
      document.kaiin1.ANSR2.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR3.disabled = true;
      document.kaiin1.ANSR3.style.backgroundColor = '#CCCCCC';
 } else if (document.kaiin1.chkENQT[5].checked == true) {
      document.kaiin1.ANSR1.disabled = true;
      document.kaiin1.ANSR1.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR2.disabled = true;
      document.kaiin1.ANSR2.style.backgroundColor = '#CCCCCC';
      document.kaiin1.ANSR3.disabled = true;
      document.kaiin1.ANSR3.style.backgroundColor = '#CCCCCC';
 } else {
      document.kaiin1.ANSR1.disabled = false;
      document.kaiin1.ANSR1.style.backgroundColor = '#FFFFFF';
      document.kaiin1.ANSR2.disabled = false;
      document.kaiin1.ANSR2.style.backgroundColor = '#FFFFFF';
      document.kaiin1.ANSR3.disabled = false;
      document.kaiin1.ANSR3.style.backgroundColor = '#FFFFFF';
 }
}

//********* クイックオーダー用 Focus制御 **********//

function nextFocus(nextObj) {
	
	if(event.keyCode == 13) {
		nextObj.focus();
		window.event.returnValue = false;
	}
}

