﻿function showCurrent(id, index) {

    $("#" + id + "_img").children().each(function(i) {
        $(this).css("display", i == index ? "block" : "none");
    }
    );

    $("#" + id + "_navi").children().each(function(i) {
        $(this).css("background-color", i == index ? "#A10025" : "#666666");
    }
    );
};



    
//        function getSearch(key) {
//            var sear = location.search;
//            var rst = "";
//            if (sear + "" != "") {
//                rst = sear;
//                rst = rst.substring(1, rst.length);
//                var gets = rst.split("&");
//                for (var i = 0; i < gets.length; i++) {
//                    var gets2 = gets[i].split("=");
//                    if (gets2[0] == key) {
//                        rst = gets2[1];
//                        break;
//                    }
//                }
//            }
//            return rst;
//        }
//        function sch() {
//            window.location.href = "/ArticleSearch.aspx?k=" + document.getElementById('search_field').value;
//        }
//        function schkey() {
//            if (event.keyCode == 13) {
//                event.returnValue = false;
//                event.cancel = true;
//                sch();
//            }
//        }
//        //$("#search_field").val(getSearch("k"));
        
 