function search_gb(){
  var sendForm = document.getElementById("sendForm");
	sendForm.appendChild(document.getElementById("sendFields"));
	document.getElementById("currentPage").value = 1;
	document.getElementById("pagelistSize").value = 6;
	sendForm.action = "/2500_info/htlinfo.do?mc=KO2505000000&pageNum=5&subNum=1";
	sendForm.hotel_type.value = "";
	sendForm.divisn_gb_nm.value = sendForm.divisn_gb.options[sendForm.divisn_gb.options.selectedIndex].text;
	sendForm.submit();

}
 
function htl_view(cntnt_sn){
  var sendForm = document.getElementById("sendForm");
	sendForm.appendChild(document.getElementById("sendFields"));
	sendForm.action = "/2500_info/htl_view.do?cntnt_sn="+cntnt_sn+"&mc=KO2505000000&pageNum=5&subNum=1";
	sendForm.submit();
}

function hotel_type_search(hotel_type){
  var sendForm = document.getElementById("sendForm");
	sendForm.appendChild(document.getElementById("sendFields"));
	document.getElementById("currentPage").value = 1;
	document.getElementById("pagelistSize").value = 6;
	sendForm.hotel_type.value = hotel_type;
	sendForm.action = "/2500_info/htlinfo.do?mc=KO2505000000&pageNum=5&subNum=1";
	sendForm.divisn_gb_nm.value = sendForm.divisn_gb.options[sendForm.divisn_gb.options.selectedIndex].text;
	sendForm.submit();
}


function exec_search(currentPage){
	var sendForm = document.getElementById("sendForm");
	sendForm.appendChild(document.getElementById("sendFields"));
	document.getElementById("currentPage").value = currentPage;
	document.getElementById("pagelistSize").value = 6;
	sendForm.divisn_gb_nm.value = sendForm.divisn_gb.options[sendForm.divisn_gb.options.selectedIndex].text;
	sendForm.action = "/2500_info/htlinfo.do?mc=KO2505000000&pageNum=5&subNum=1";	
	sendForm.submit();
}

function orderBy_search(orderBy){
  var sendForm = document.getElementById("sendForm");
	sendForm.appendChild(document.getElementById("sendFields"));
	document.getElementById("currentPage").value = 1;
	document.getElementById("pagelistSize").value = 6;
	sendForm.orderBy.value = orderBy;
	sendForm.action = "/2500_info/htlinfo.do?mc=KO2505000000&pageNum=5&subNum=1";
	sendForm.divisn_gb_nm.value = sendForm.divisn_gb.options[sendForm.divisn_gb.options.selectedIndex].text;

	sendForm.submit();

}
function htlrsrv_list(cntnt_sn){
  var sendForm = document.getElementById("sendForm");
	sendForm.appendChild(document.getElementById("sendFields"));
	sendForm.action = "/2500_info/htlrsrv_agree.do?cntnt_sn="+cntnt_sn+"&mc=KO2505000000&pageNum=5&subNum=1";
	sendForm.submit();
}
function pub_list(){
  var sendForm = document.getElementById("sendForm");
	sendForm.appendChild(document.getElementById("sendFields"));
	sendForm.action = "/2500_info/pubinfo.do?mc=KO2520000000&pageNum=5&subNum=4";
	sendForm.submit();
}

function setDivisn_nm(){
	var sendForm = document.getElementById("sendForm");
	sendForm.divisn_gb_nm.value = sendForm.divisn_gb.options[sendForm.divisn_gb.options.selectedIndex].text;
	return;

}
function viewData(divisn_gb_nm){
	var sendForm = document.getElementById("sendForm");
	divisn_00 = new Array("관광지선택");
	divisn_00Value = new Array("");
	divisn_01 = new Array("지역선택","대천동","동대동","죽정동","화산동","명천동","내항동","남곡동");
	divisn_01Value = new Array("","대천동","동대동","죽정동","화산동","명천동","내항동","남곡동");
	divisn_02 = new Array("해수욕장선택","대천해수욕장","무창포해수욕장","원산도해수욕장","호도해수욕장","용두해수욕장","삽시도해수욕장","장고도해수욕장","오봉산해수욕장");
	divisn_02Value = new Array("","신흑동","웅천읍","원산도","호도","남포면","삽시도","장고도","원산도");
	divisn_03 = new Array("섬선택","월도","허육도","추도","효자도","육도","소도","원산도","외연도","고대도","삽시도","장고도","녹도","호도");
	divisn_03Value = new Array("","월도","허육도","추도","효자도","육도","소도","원산도","외연도","고대도","삽시도","장고도","녹도","호도");
	divisn_04 = new Array("산/계곡선택","성주산","오서산","아미산","옥마산");
	divisn_04Value = new Array("","성주면","청소면","미산면","성주면");
	divisn_05 = new Array("지역선택","남포면","미산면","성주면","오천면","웅천읍","주교면","주산면","주포면","천북면","청라면","청소면");
	divisn_05Value = new Array("","남포면","미산면","성주면","오천면","웅천읍","주교면","주산면","주포면","천북면","청라면","청소면");
	
	sendForm.divisn_gb.options.length = 0;
	if(sendForm.divisn.options[sendForm.divisn.options.selectedIndex].value == ""){
	  for(var i=0; i < divisn_00.length; i++){
	  	sendForm.divisn_gb.options[i] = new Option(divisn_00[i],divisn_00Value[i]);
	  }
	}
	if(sendForm.divisn.options[sendForm.divisn.options.selectedIndex].value == "DIVISN010000"){
	  for(var i=0; i < divisn_01.length; i++){
	  	sendForm.divisn_gb.options[i] = new Option(divisn_01[i],divisn_01Value[i]);
	  	if(sendForm.divisn_gb.options[i].text == divisn_gb_nm) sendForm.divisn_gb.options.selectedIndex = i;
	  }
	}
    else if(sendForm.divisn.options[sendForm.divisn.options.selectedIndex].value == "DIVISN020000"){
	  for(var i=0; i < divisn_02.length; i++){
	  	sendForm.divisn_gb.options[i] = new Option(divisn_02[i],divisn_02Value[i]);
	  	if(sendForm.divisn_gb.options[i].text == divisn_gb_nm) sendForm.divisn_gb.options.selectedIndex = i;
	  }
	}
	else if(sendForm.divisn.options[sendForm.divisn.options.selectedIndex].value == "DIVISN030000"){
	  for(var i=0; i < divisn_03.length; i++){
	  	sendForm.divisn_gb.options[i] = new Option(divisn_03[i],divisn_03Value[i]);
	  	if(sendForm.divisn_gb.options[i].text == divisn_gb_nm) sendForm.divisn_gb.options.selectedIndex = i;
	  }
	}
	else if(sendForm.divisn.options[sendForm.divisn.options.selectedIndex].value == "DIVISN040000"){
	  for(var i=0; i < divisn_04.length; i++){
	  	sendForm.divisn_gb.options[i] = new Option(divisn_04[i],divisn_04Value[i]);
	  	if(sendForm.divisn_gb.options[i].text == divisn_gb_nm) sendForm.divisn_gb.options.selectedIndex = i;
	  	//value가 아닌 text로 할것
	  }
	}
	else if(sendForm.divisn.options[sendForm.divisn.options.selectedIndex].value == "DIVISN050000"){
	  for(var i=0; i < divisn_05.length; i++){
	  	sendForm.divisn_gb.options[i] = new Option(divisn_05[i],divisn_05Value[i]);
	  	if(sendForm.divisn_gb.options[i].text == divisn_gb_nm) sendForm.divisn_gb.options.selectedIndex = i;
	  }
	} 
      
}



