

$(document).ready(function(){

	// LINK (url)
	$("[class*=btn_link],button[type=button]").bind("click", function(e){

		if ($(this).attr("url")) {
			var v_url = $(this).attr("url");
			if ($(this).attr("target") == "_blank") {
				window.open(v_url);
			}
			else {
				window.location.href = v_url;
			}
		}
		else if ($(this).attr("js")) {
			var v_js = $(this).attr("js");
			eval(v_js);
		}
		else  {
			return;
		}
	});

	// ÅëÇÕ°Ë»ö
	$("#f_sch_tot input[name=sch_tot_k]").bind("keydown", function(e) {
		if (e.keyCode == 13) {
			var v_cate = $("#f_sch_tot input[name=sch_tot_c]").val();
			var v_sort = $("#f_sch_tot input[name=sch_sort_k]").val();
			submit_sch(v_cate, v_sort);
		}
		return;
	});
});

function submit_sch(cate,sort_k) {
	$("#f_sch_tot").attr("method","get");
	$("#f_sch_tot input[name=sch_tot_c]").val(cate);
	$("#f_sch_tot input[name=sch_sort_k]").val(sort_k);
	$("#f_sch_tot").attr("action","/search/search_main.php");
	$("#f_sch_tot").submit();
}

    function setPng24(obj)
    {
            obj.width = obj.height = 1;
            obj.className = obj.className.replace(/\bpng24\b/i,'');
            obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
            obj.src = '';
            return '';
    }

