        var countyid = "";
        function drop_mouseover(pos,obj) {
            try { window.clearTimeout(timer); } catch (e) { }

            document.getElementById("headSlected").innerHTML = obj.innerHTML;
            document.getElementById("hdcountry").value = obj.id;
            document.getElementById("hfdcountryname").value = obj.innerHTML;
            countyid = obj.countyid;

        }
        function drop_mouseout(pos) {
            var posSel = document.getElementById(pos + "Sel").style.display;
            if (posSel == "block") {
                timer = setTimeout("drop_hide('" + pos + "')", 1000);
            }
          
        }
        function drop_hide(pos) {
            document.getElementById(pos + "Sel").style.display = "none";
        }
        function search_show(pos, searchType, href) {
            document.getElementById(pos + "SearchType").value = searchType;
            document.getElementById(pos + "Sel").style.display = "none";
            document.getElementById(pos + "Slected").innerHTML = href.innerHTML;
            document.getElementById("hdcountry").value = href.id;
            document.getElementById("hfdcountryname").value = href.innerHTML;
            countyid = href.countyid;
        }

        function overout(obj) {
            if (obj.innerHTML == "") {
                if (countyid != "0" && countyid != undefined)
                obj.innerHTML = "-选择区域-";
            }
        }

        function selectout() {

            var temp = document.getElementById("headSlected").innerHTML;
            if (temp == "-选择区域-") {
                document.getElementById("headSlected").innerHTML = "";
            }
        }

        function liout() {

            var temp = document.getElementById("headSlected").innerHTML;
            if (temp == "") {
                document.getElementById("headSlected").innerHTML = "-选择区域-";
            }
        }

        $(document).ready(function() {

            var temp = $("#hfdcountryname").val();
            if (temp != "" && temp != "undefined") {
                document.getElementById("headSlected").innerHTML = temp;
                document.getElementById("headSearchType").value = "weiyang";
                document.getElementById("headSel").style.display = "none";
            }
            
            //注册事件            $("#headSlected").click(function(){                $("#searchbox").find("input:eq(0)").animate({width: '280px'}, "slow",function(){                    if($("#gjss").length<1)                    {                        $(this).parent().append("<a id='gjss' style='padding-left: 10px; color:#003399;' href='SearchAll.aspx' target='_blank'>高级搜索</a>");                    }                });            });            $("#searchbox").find("select").focus(function(){                $("#searchbox").find("input:eq(0)").animate({width: '280px'}, "slow",function(){                    if($("#gjss").length<1)                    {                        $(this).parent().append("<a id='gjss' style='padding-left: 10px; color:#003399;' href='SearchAll.aspx' target='_blank'>高级搜索</a>");                    }                });            });            $("#searchbox").find("input:eq(0)").focus(function(){                $("#searchbox").find("input:eq(0)").animate({width: '280px'}, "slow",function(){                    if($("#gjss").length<1)                    {                        $(this).parent().append("<a id='gjss' style='padding-left: 10px; color:#003399;' href='SearchAll.aspx' target='_blank'>高级搜索</a>");                    }                });                                if($(this).val()=="请输入医院名称...")                {                    $(this).val("");                }                $("body").keydown(function(event){                   if(event.keyCode == 13)                   {                        var btn = $("#btnSearch");                        btn.focus();                          btn.click();                   }                });            }).blur(function(){                if($.trim($(this).val())=="")                {                    $(this).val("请输入医院名称...");                }                $("body").unbind("keydown");            });                
        });




