<!--
// »ç¿ëÀÚÁ¤ÀÇ ½ÃÀÛ
var scroll_width = 210; // ´º½ºÃ¢ÀÇ Æø
var scroll_height = 36; // ´º½ºÃ¢ÀÇ ³ôÀÌ
var scroll_speed = 20; // ½ºÅ©·Ñ ½ºÇÇµå
var pause_time = 3000;  // ¸ØÃß´Â ½Ã°£
var scroll_distance = 18; // ÀÌµ¿°Å¸®
// »ç¿ëÀÚÁ¤ÀÇ ³¡
var scroll_position = 0;
var moved_distance = 0;
var scroll_client_height = 0;
var scroll_timer;
var scroll_mode = "pause";

function scroll_screen() {
    scroll_position--;
    moved_distance++;
    scroll_client_height = parseInt(document.all.newsCont.clientHeight);
    if (Math.abs(scroll_position)==scroll_client_height) {
        scroll_position = 0;
    }
    document.all.newsCont.style.top = scroll_position;
    document.all.newsContDmy.style.top = scroll_position + scroll_client_height;
    if (moved_distance==scroll_distance) {
        moved_distance = 0;
        scroll_mode = "pause";
        scroll_pause();
    } else {
        scroll_mode = "move";
        scroll_timer = setTimeout("scroll_screen()",scroll_speed);
    }
}
function scroll_start() {
    if (scroll_mode=="move") {
        scroll_screen();
    } else {
        scroll_pause();
    }
}
function scroll_stop() {
    clearTimeout(scroll_timer);
}
function scroll_pause() {
    clearTimeout(scroll_timer);
    scroll_timer = setTimeout("scroll_screen()",pause_time);
}
function scroll_init() {
    document.all.newsBody.style.width = scroll_width;
    document.all.newsBody.style.height = scroll_height;
    document.all.newsCont.style.top = scroll_position;
    document.all.newsCont.style.display = "block";
    scroll_client_height = parseInt(document.all.newsCont.clientHeight);
    document.all.newsContDmy.style.top = scroll_position + scroll_client_height;
    document.all.newsContDmy.innerHTML = document.all.newsCont.innerHTML;
    document.all.newsContDmy.style.display = "block";
    scroll_start();
}
function toggle_main_notice1(target) {
  if (target=="news") {
    document.getElementById('linkNews').style.display = "block";
    document.getElementById('linkNote').style.display = "none";
    document.getElementById('mainNews').src = "../image/right_news_n.gif";
    document.getElementById('mainNote').src = "../image/right_note_s.gif";
    document.getElementById('newsFrm').style.display = "block";
    document.getElementById('noteFrm').style.display = "none";
  } else{
    document.getElementById('linkNews').style.display = "none";
    document.getElementById('linkNote').style.display = "block";
    document.getElementById('mainNews').src = "../image/right_news_s.gif";
    document.getElementById('mainNote').src = "../image/right_note_n.gif";
    document.getElementById('newsFrm').style.display = "none";
    document.getElementById('noteFrm').style.display = "block";
  }
}

function toggle_main_notice(target) {
  if (target=="news") {
    document.all.linkNews.style.display = "block";
    document.all.linkNote.style.display = "none";
    document.all.mainNews.src = "../image/right_news_n.gif";
    document.all.mainNote.src = "../image/right_note_s.gif";
    document.all.newsFrm.style.display = "block";
    document.all.noteFrm.style.display = "none";
  } else{
    document.all.linkNews.style.display = "none";
    document.all.linkNote.style.display = "block";
    document.all.mainNews.src = "../image/right_news_s.gif";
    document.all.mainNote.src = "../image/right_note_n.gif";
    document.all.newsFrm.style.display = "none";
    document.all.noteFrm.style.display = "block";
  }
}

function touch_layer(obj_nm,obj_no) {
  var objSrc1 = document.getElementById(obj_nm+"_"+obj_no).style;
  var objSrc2 = document.getElementById(obj_nm+obj_no).style;
  if (objSrc1.display=="none") {
    objSrc1.display = "block";
	objSrc2.fontWeight = "bold";
  } else {
    objSrc1.display = "none";
    objSrc2.fontWeight = "";
  }
}

function close_layer(obj_nm) {
  var num= 0;
  while (true) {
    if (document.all[obj_nm+"_"+num]!=null) {
      document.all[obj_nm+"_"+num].style.display = "none";
    } else {
      break;
    }
    num++;
  }
}

function toggle_sub_layer(obj_nm,obj_no) {
  close_layer(obj_nm);
  document.all[obj_nm+"_"+obj_no].style.display = "block";
}

function toggle_cont(obj_nm,obj_no) {
  var num= 0;
  while (true) {
    if (document.all[obj_nm+num]!=null) {
      document.all[obj_nm+num].src = "../image/room/room_"+obj_nm+num+"_n.gif";
    } else {
      break;
    }
    num++;
  }
  document.all[obj_nm+obj_no].src = "../image/room/room_"+obj_nm+obj_no+"_s.gif";
  toggle_sub_layer(obj_nm,obj_no);
}


function showCal(obj_nm,obj_no){

//  close_layer('obj_nm');
  if (document.all[obj_nm+"_"+obj_no].style.display=="none") {
    document.all[obj_nm+"_"+obj_no].style.display = "block";
  } else {
    document.all[obj_nm+"_"+obj_no].style.display = "none";
  }
}

function ifrmResize(obj) {
    var Body;
    var H, Min;
//    Min = 169;
    Min = 196;
    Body = (obj.contentWindow.document.getElementsByTagName('BODY'))[0];
    H = parseInt(Body.scrollHeight);
    obj.style.height = (H<Min?Min:H) + 'px';

}

function sendDate_old(obj_no,dateVal,chk) {
  var error = "ok";
  var obj = eval("theForm.v_date"+obj_no);
  obj.value = dateVal;
  document.all["cal_"+obj_no].style.display = "none";
  if(theForm.v_date0.value=="" && theForm.v_date1.value!=""){
    alert("Åõ¼÷ÀÏÀ» ¼±ÅÃÇÏ¼¼¿ä."); error="ng";
  }
  if(theForm.v_date0.value!="" && theForm.v_date1.value!=""){
    var st = theForm.v_date0.value.split("-");
    var en = theForm.v_date1.value.split("-");
    var sd = new Date(st[0],st[1]-1,st[2].substr(0,2));
    var ed = new Date(en[0],en[1]-1,en[2].substr(0,2));
    chkdate = (ed.getTime()-sd.getTime())/(1000*24*60*60);
    if(chkdate>30){
      alert("30ÀÏ ÀÌ»ó °Ë»öÇÒ¼ö ¾ø½À´Ï´Ù.")
      theForm.v_date0.value = "";
      theForm.v_date1.value = "";
	  error="ng";
    } else if(chkdate < 1){
      alert("°Ë»ö±â°£À» Àß¸ø ¼±ÅÃ ÇÏ¼Ì½À´Ï´Ù.")
      theForm.v_date0.value = "";
      theForm.v_date1.value = "";
	  error="ng";
    }
    if(error=="ok" && chk=="on") {
      document.theForm.action = "roomcost.php";
      document.theForm.target = "_self";
      document.theForm.submit();
    }
  }
}

function sendDate(obj_no,dateVal,chk,tgt) {
  var error = "ok";
  var objForm;
  if(chk=="x") {
	objForm = comSerach.theForm;
  } else {
	objForm = theForm;
  }
  var obj = eval("objForm.v_date"+obj_no);
  obj.value = dateVal;
  document.all[tgt+"_"+obj_no].style.display = "none";

  if(objForm.v_date0.value=="" && objForm.v_date1.value!=""){
    alert("Åõ¼÷ÀÏÀ» ¼±ÅÃÇÏ¼¼¿ä."); error="ng";
  }
  if(objForm.v_date0.value!="" && objForm.v_date1.value!=""){
    var st = objForm.v_date0.value.split("-");
    var en = objForm.v_date1.value.split("-");
    var sd = new Date(st[0],st[1]-1,st[2].substr(0,2));
    var ed = new Date(en[0],en[1]-1,en[2].substr(0,2));
    chkdate = (ed.getTime()-sd.getTime())/(1000*24*60*60);
    if(chkdate>30){
      alert("30ÀÏ ÀÌ»ó °Ë»öÇÒ¼ö ¾ø½À´Ï´Ù.")
      objForm.v_date0.value = "";
      objForm.v_date1.value = "";
	  error="ng";
    } else if(chkdate < 1){
      alert("°Ë»ö±â°£À» Àß¸ø ¼±ÅÃ ÇÏ¼Ì½À´Ï´Ù.")
      objForm.v_date0.value = "";
      objForm.v_date1.value = "";
	  error="ng";
    }
    if(error=="ok" && chk=="c") {
      document.theForm.action = "roomcost.php";
      document.theForm.target = "_self";
      document.theForm.submit();
    }
  }

}

document.onkeydown = function() {
  if (event.keyCode == 122) event.keyCode = 505;
  if (event.keyCode == 505) return false;
}

function htlSearch(target) {
  var error="ok";
  if(theForm.v_area1.selectedIndex==0 &&
    theForm.v_rank.selectedIndex==0 &&
    theForm.v_date0.value=="" &&
    theForm.v_date1.value=="" &&
    lTrim(theForm.v_sWord.value)=="") {
    alert("°Ë»öÁ¶°ÇÀ» ÇÑ°¡ÁöÀÌ»ó ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok" && theForm.v_date0.value=="" && theForm.v_date1.value!="") {
    alert("Åõ¼÷ÀÏÀ» ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok" && theForm.v_date0.value!="" && theForm.v_date1.value=="") {
    alert("Åð½ÇÀÏÀ» ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
	return error;
}
function cdoSearch(target) {
  var error="ok";
  if(theForm.v_area1.selectedIndex==0 &&
    theForm.v_date0.value=="" &&
    theForm.v_date1.value=="" &&
    lTrim(theForm.v_sWord.value)=="") {
    alert("°Ë»öÁ¶°ÇÀ» ÇÑ°¡ÁöÀÌ»ó ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok" && theForm.v_date0.value=="" && theForm.v_date1.value!="") {
    alert("Åõ¼÷ÀÏÀ» ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok" && theForm.v_date0.value!="" && theForm.v_date1.value=="") {
    alert("Åð½ÇÀÏÀ» ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
	return error;
}

function rstSearch(target) {
	if(theForm.v_area1.selectedIndex==0 &&
		theForm.v_area2.selectedIndex==0 &&
		theForm.v_rank.selectedIndex==0 &&
		lTrim(theForm.v_sWord.value)=="") {
		alert("°Ë»öÁ¶°ÇÀ» ÇÑ°¡ÁöÀÌ»ó ¼±ÅÃÇÏ½Ê½Ã¿À");
		return "ng";
	} else {
		return "ok";
	}
}

function allSearch(tgt) {
  var error="ok";
	var gubun = theForm.v_gubun.value;
	if(gubun=="htl") {
		error = htlSearch();
	} else if(gubun=="cdo") {
		error = cdoSearch();
	} else if(gubun=="rst") {
		error = rstSearch();
	} else {
		alert(error);
	}
  if(error=="ok") {
    theForm.target = tgt==undefined? "_self":tgt;
		theForm.action = "../info/search.php";
    theForm.submit();
  } else {
		return false;
	}
}

function modSearch(target) {
  var error="ok";
  if(theForm.v_area1.selectedIndex==0 &&
    theForm.v_rank.selectedIndex==0 &&
    lTrim(theForm.v_sWord.value)=="") {
    alert("°Ë»öÁ¶°ÇÀ» ÇÑ°¡ÁöÀÌ»ó ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok") {
    theForm.submit();
  }
}

function conSearch(target) {
  var error="ok";
  if(theForm.v_area1.selectedIndex==0 &&
    theForm.v_sTheme.selectedIndex==0 &&
    lTrim(theForm.v_sWord.value)=="") {
    alert("°Ë»öÁ¶°ÇÀ» ÇÑ°¡ÁöÀÌ»ó ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok") {
    theForm.submit();
  }
}

function empSearch(target) {
  var error="ok";
  if(theForm.v_area1.selectedIndex==0 &&
    theForm.v_rank.selectedIndex==0 &&
    theForm.v_date0.value=="" &&
    theForm.v_date1.value=="" &&
    lTrim(theForm.v_sWord.value)=="") {
    alert("°Ë»öÁ¶°ÇÀ» ÇÑ°¡ÁöÀÌ»ó ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok" && theForm.v_date0.value=="" && theForm.v_date1.value!="") {
    alert("Åõ¼÷ÀÏÀ» ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok" && theForm.v_date0.value!="" && theForm.v_date1.value=="") {
    alert("Åð½ÇÀÏÀ» ¼±ÅÃÇÏ½Ê½Ã¿À");
    error="ng";
  }
  if(error=="ok") {
    theForm.submit();
  }
}

function EnterCheck(target) {
	if(event.keyCode ==13) {
		if(lTrim(theForm.v_sWord.value)=="") {
			alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		} else {
			theForm.target = target;
			theForm.submit();
		}
	}
}

function Search() {
	theForm.target = "_parent";
	theForm.action = "../info/search.php"
	theForm.submit();
}

function sortSearch(fld) {
  theForm.v_sField.value = fld;
  theForm.submit();
}

-->
