//½Ã¼³ÀÇ ±â¼ö ÇöÈ² ÆË¾÷ ½ÇÇà
function showFunList(funID) {
   var tUrl = '/common/fun_list.jsp?fun_id=' + funID;
   neoWin(tUrl, 'naver', 0, 0, 0, 0, 0, 0, 800, 400, '');
}

//Á¢¼öÇöÈ² ÆË¾÷ ½ÇÇà
function showStatus() {
   var memID = document.getElementById('cboFacility').value;
   if(memID == '') {
      alert('½Ã¼³À» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
      return false;
   }
   var tUrl = '/common/lec_status.jsp?id=' + memID;
   neoWin(tUrl, 'status_win', 1, 0, 0, 1, 0, 0, 800, 500, '');
}

//Á¢¼öÇöÈ² ÆË¾÷ ½ÇÇà2
function showStatus2(memID) {
   if(memID == '') {
      alert('½Ã¼³À» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
      return false;
   }
   var tUrl = '/common/lec_status.jsp?id=' + memID;
   neoWin(tUrl, 'status_win', 1, 0, 0, 1, 0, 0, 800, 500, '');
}

//½Ã¼³¹Ù·Î°¡±â ÆË¾÷ ½ÇÇà
function showMember() {
   var memID = document.getElementById('cboMember').value;
   if(memID == '') {
      alert('½Ã¼³À» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
      return false;
   }
   var tUrl = '/member/member_index.jsp?id=' + memID;
   neoWin(tUrl, 'naver', 0, 0, 0, 0, 0, 0, 800, 650, 'C');
}

//ºü¸¥¿¹¾à °­ÁÂ ½Ã¼³ º¯°æ½Ã ½ÇÇà
function changeQuickRsv(mode, memID, objName) {
   if(memID == '') {
      clearDiv(objName);
      return;
   }
   var tUrl = '/agent/load_qrsv.jsp?mode=' + mode + '&mem_id=' + memID;
   getAjaxOption(tUrl, objName);
}

//¿É¼Ç ÅÂ±×¿¡ ÇÊ¿äÇÑ Á¤º¸ ÀÐ±â(AJAX ¹æ½Ä)
function getAjaxOption(tUrl, objName) {
   var myRequest;
   if (window.XMLHttpRequest) {
      myRequest = new XMLHttpRequest();
   }else if (window.ActiveXObject) {
      myRequest = new ActiveXObject("Microsoft.XMLHTTP");
   }

   myRequest.open('GET', tUrl, true);
   myRequest.onreadystatechange = callback;
   myRequest.send(null);


   function callback() {
      if (myRequest.readyState==4) {
         if (myRequest.status == 200) {
            printCalData(myRequest.responseText)
         }
      }
   }

   function printCalData(rStr) {
      rStr = rStr.replace(/^\s+|\s+$/g, '');
      var rString = rStr.split('||');
      var i = 0;
      var j = 0;

      clearDiv(objName);

      while(i < rString.length - 1) {
         rPart1 = rString[i].split('@@');
         j = 0;
         while(j < rPart1.length - 1) {
            var objOpt = document.getElementById(objName);
            var newOption = document.createElement('option');
            newOption.text = rPart1[1];
            newOption.value = rPart1[0];
            newOption.title = rPart1[1];
            objOpt.options.add(newOption);
            j++;
         }
         i++;
      }
   }
}

//¿É¼Ç ÅÂ±× ÀüÃ¼ »èÁ¦
function clearDiv(objName) {
  var objOpt = document.getElementById(objName);
  var i = 0;
  var optLength = objOpt.options.length;
  while(optLength > 1) {
     objOpt.options[1] = null;
     optLength = objOpt.options.length;
  }
}

//¸ÞÀÎ È­¸é ºü¸¥ ¿¹¾à submit °ª Ã¼Å©
function checkQuickRsv(objName) {
   var obj = document.getElementById(objName);
   if(obj.value == '') {
      return false;
   }
   if(obj.value == 'T0000074') {
      document.getElementById('frmQRsvItem').action = '/resource/resource_view.jsp';
   }
   return true;
}

//¸¶¹ý»çÆË¾÷Ã¢
function lec_quick() {
   window.open("/common/lec_quick.jsp","width=800px,height=560px,top=100px,left=100px");
}
function sports_quick() {
   window.open("/common/sports_quick.jsp","width=800px,height=560px,top=100px,left=100px" );
}
function fac_quick() {
   window.open("/common/fac_quick.jsp","width=800px,height=560px,top=100px,left=100px");
}
function program_quick() {
   window.open("/common/program_quick.jsp","width=800px,height=560px,top=100px,left=100px");
}
function ticket_quick() {
   window.open("/common/ticket_quick.jsp","width=800px,height=560px,top=100px,left=100px");
}

function re_guide() {
neoWin("/guide/guide.jsp","",1,1,0,1,0,0,748,560,"C");
}

function mini_home(mid) {
   if(mid == '') {
      alert('½Ã¼³À» ¼±ÅÃÇØ ÁÖ¼¼¿ä');
      return;
   }
   neoWin("/mini/"+mid+".jsp?mem_id="+mid,"",1,1,0,1,0,0,800,600,"C");
}

function wiz_quick(hurl) {
   neoWin("/common/"+hurl+"_quick.jsp","",1,1,0,1,0,0,800,600,"C");
}

function reserv_quick() {
   neoWin("/common/reserv_quick.jsp","",1,1,0,1,0,0,800,600,"C");
}

function map_quick() {
   neoWin("/common/map_quick.jsp","",1,1,0,1,0,0,800,600,"C");
}