//********* メニュー関連 **********//
$(document).ready(function() {

  $('a.jt').cluetip({
    local: true,
    hideLocal: false,
    arrows: true, 
    dropShadow: true,
    sticky: true,
    mouseOutClose: true,
    closePosition: 'title',
    closeText: '閉じる'});
});

function exMenu(mName)
{
	if (!document.all) m = document.getElementById(mName).style ;
	if (document.all) m = document.all(mName).style ;
	if (m.display == 'none') m.display = "block" ;
		else m.display = "none" ;
}

/*
//* メニュー第一階層
function exMenu(mName)
{
	onceClose1();
	obj = document.all[mName].style;
	f   = obj.display;
	if (f == 'none') obj.display = "block"; else obj.display = "none";
}

//* メニュー第二階層
function exMenu2(mName)
{
	onceClose2();
	obj = document.all[mName].style;
	f   = obj.display;
	if (f == 'none') obj.display = "block"; else obj.display = "none";
}


//* 第一階層Close
function onceClose1()
{

	//*第一階層
//	obj = document.all["beads"].style;
//	obj.display = "none";
//	obj = document.all["code"].style;
//	obj.display = "none";
	obj = document.all["tosho"].style;
	obj.display = "none";
	obj = document.all["acs"].style;
	obj.display = "none";
	obj = document.all["other"].style;
	obj.display = "none";
}


//* 第二階層Close
function onceClose2()
{
	//*第二階層
	obj = document.all["beads"].style;
	obj.display = "none";
	obj = document.all["code"].style;
	obj.display = "none";
}
*/



//********* 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;
	}
}

