 function onclick_head() {
    var node;

    node = document.getElementById('type_list');

    if(node.style.display == "") {
       node.style.display = "none";
    } else {
       node.style.display = "";
    }
 }

 function onover_cel(obj,type_value) {
    var select_head;

    select_head = InputForm.select_head.value

    if(select_head != type_value) {
       obj.style.backgroundColor = "#ededed";
    }
 }

 function onout_cel(obj,type_value) {
    var select_head;

    select_head = InputForm.select_head.value

    if(select_head != type_value) {
       obj.style.backgroundColor = "#ffffff";
    }
 }

 function onclick_cel(obj,type_value) {
    var i, arrCode;

    arrCode = type_value //def_op_code.split(",");
    InputForm.select_head.value = type_value;

	document.getElementById('type_'+arrCode).style.backgroundColor = "#ffffff";
    document.getElementById('type_'+type_value).style.backgroundColor = "#ededed";
    document.getElementById('type_select').innerText = obj.innerText;
    document.getElementById('type_list').style.display = "none";
 }

///////////
 function SetHomepage(obj) {
    obj.style.behavior='url(#default#homepage)';
	obj.setHomePage('http://www.style.co.kr');
 }

 function ST_SearchIt() {
	var select_head, KW;

    select_head = InputForm.select_head.value
	KW = InputForm.KW.value
    if(KW == "") {
	   alert("검색어를 입력해 주세요.");
	   InputForm.KW.focus()
	   return;
	}

    SearchForm.CH.value = select_head
    SearchForm.KW.value = KW
	//SearchForm.srh_intext.value = ""
	SearchForm.srh_page.value = ""
    SearchForm.new_page.value = ""
	SearchForm.action = "sch_rst.asp"
    SearchForm.submit()
 }

 function ST_SearchIn(frm_obj) {
    var s_intext;

	s_intext = frm_obj.s_intext.value;
	if(s_intext == "") {
	   alert("재검색할 검색어를 입력해 주세요.");
       frm_obj.s_intext.focus();
	   return;
	}

	//SearchForm.srh_intext.value = s_intext;
	SearchForm.srh_page.value = ""
	SearchForm.new_page.value = ""
	SearchForm.submit();

	return false;
 }

 function ST_SearchMore(op_code) {
    SearchForm.MG.value = op_code;
	SearchForm.new_page.value = ""
	SearchForm.submit()
 }

 function ST_SearchKeyword(keyword) {
    InputForm.select_head.value = "";
	SearchForm.CH.value = "T";
	SearchForm.MG.value = "";
	document.getElementById('type_select').innerText = "통합검색";
	InputForm.KW.value = keyword;
	ST_SearchIt();
 }


 function ST_SearchMore_ORD(ord_code) {
    SearchForm.ORD.value = ord_code;
	SearchForm.srh_page.value = "1"
	SearchForm.new_page.value = ""
	SearchForm.submit()
 }

 function ST_SearchMore_CH(ch_code) {
    SearchForm.CH.value = ch_code;
	SearchForm.ORD.value = "0";
	SearchForm.MG.value = "";
	SearchForm.srh_page.value = "1"
	SearchForm.new_page.value = ""
	SearchForm.action = "sch_rst.asp"
	SearchForm.submit()
 }


 function ST_MovePage(page) {
    SearchForm.srh_page.value = page
	SearchForm.new_page.value = ""
	SearchForm.submit()
 }

 function ST_AutoEnter1() {
 	var keycode = event.keyCode; 
	
	if(keycode==13) {
	   ST_SearchIt()
	   event.returnValue = false;
	}
 }

 function ST_AutoEnter2(frm_obj) {
 	var keycode = event.keyCode; 
	
	if(keycode==13) {
	   ST_SearchIn(frm_obj)
	   event.returnValue = false;
	}
 }


/*
 E_MOUSEOUT = function(e,obj,eid,stat) {
   var t = e ? e.relatedTarget : event.toElement;
   while(t){
    if(t == obj) return;
    t = t.parentNode;
   }
   document.getElementById(eid).style.display = stat;
 }

 function ShowGlobalLink() {
    document.getElementById('global_link').style.display = "";
 }

 function HideGlobalLink() {
    document.getElementById('global_link').style.display = "none";
 }
 */

   function ST_SearchKeyword_FM(keyword, MG_Value) {
    InputForm.select_head.value = "";
	SearchForm.CH.value = "T";
	SearchForm.MG.value = "";
	document.getElementById('type_select').innerText = "통합검색";
	InputForm.KW.value = keyword;
	ST_SearchIt_MG(MG_Value);
 }

  function ST_SearchIt_MG(MG_Value) {
	var select_head, KW;

    select_head = InputForm.select_head.value
	KW = InputForm.KW.value
    if(KW == "") {
	   alert("검색어를 입력해 주세요.");
	   InputForm.KW.focus()
	   return;
	}

    SearchForm.CH.value = select_head
    SearchForm.KW.value = KW
	//SearchForm.srh_intext.value = ""
	SearchForm.srh_page.value = ""
	SearchForm.new_page.value = ""
	SearchForm.action = "/" + MG_Value + "/search/sch_rst.asp"
    SearchForm.submit()
 }

function ST_MovePage_New(page) {
    SearchForm.new_page.value = page
	SearchForm.submit()
 }

 function ST_AutoEnter3() {
 	var keycode = event.keyCode; 
	
	if(keycode==13) {
	   ST_SearchIt()
	   event.returnValue = false;
	}
 }

