//新添加-----------------------------------无敌分割线-------------------------------------------------------------
    $(document).ready(function()
   {
        //图片效果
        $("table img").hover(function(){
            $(this).fadeTo(400,0.5);
        },function(){
            $(this).fadeTo(200,1);
        })
        
        //搜索
        $(".websearch").find("img").click(function(){
//            if($(":selected").val()=="1")
//            {
//                window.location = "showarticles.aspx?key=" + $(".searchtxt:text").val();
//            }
//            else
//            {
//                var link="http://www.baidu.com/s?si=www.fzlsk.com&cl=3&ct=2097152&tn=baidulocal&word="+escape($(".searchtxt:text").val());
//               
//                
//                window.open(link); 
//            }
            window.location = "list.aspx?key=" + escape($("#stxt").val());
        })
        
//-------------------------------------------------无敌分割线---------------------------------------------------
		
		//切换
		//$("#ttimg").fadeIn(5000).slideUp(1000).slideDown(2000);
            //BBS            
            $("#ulbbs").find("li").eq(0).hover(function() {
                $(this).addClass("on");
                $("#divbbsjh").css("display", "block");
                $(this).next().removeClass("on");
                $("#divbbsrd").css("display", "none");

            }, function() {
            })
            $("#ulbbs").find("li").eq(1).hover(function() {
                $(this).addClass("on");
                $("#divbbsrd").css("display", "block");
                $(this).prev().removeClass("on");
                $("#divbbsjh").css("display", "none");
            }, function() {
            })
            //热门专业奖学金
            $("#rmzy_jxj").find("li").eq(0).hover(function() {
                $(this).addClass("on");
                $("#divrmzy").css("display", "block");
                $(this).next().removeClass("on");
                $("#divjxj").css("display", "none");

            }, function() {
            })
            $("#rmzy_jxj").find("li").eq(1).hover(function() {
                $(this).addClass("on");
                $("#divjxj").css("display", "block");
                $(this).prev().removeClass("on");
                $("#divrmzy").css("display", "none");
            }, function() {
            })
            
            //国家
            $("#ulgj").find("li").eq(0).mousemove(function() {
                $(this).addClass("on");
                $("#divmg").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divmg").nextAll().css("display", "none");
            })
            $("#ulgj").find("li").eq(1).mousemove(function() {
                $(this).addClass("on");
                $("#divyg").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divyg").nextAll().css("display", "none");
                $("#divmg").css("display", "none");
            })
            $("#ulgj").find("li").eq(2).mousemove(function() {
                $(this).addClass("on");
                $("#divjnd").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divjnd").nextAll().css("display", "none");
                $("#divmg").css("display", "none");
                $("#divyg").css("display", "none");
            })
            $("#ulgj").find("li").eq(3).mousemove(function() {
                $(this).addClass("on");
                $("#divadly").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divadly").nextAll().css("display", "none");
                $("#divjnd").css("display", "none");
                $("#divmg").css("display", "none");
                $("#divyg").css("display", "none");
            })
            $("#ulgj").find("li").eq(4).mousemove(function() {
                $(this).addClass("on");
                $("#divxxl").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divxxl").nextAll().css("display", "none");
                $("#divadly").css("display", "none");
                $("#divjnd").css("display", "none");
                $("#divmg").css("display", "none");
                $("#divyg").css("display", "none");
            })
            $("#ulgj").find("li").eq(5).mousemove(function() {
                $(this).addClass("on");
                $("#divxjp").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divxjp").nextAll().css("display", "none");
                $("#divxxl").css("display", "none");
                $("#divadly").css("display", "none");
                $("#divjnd").css("display", "none");
                $("#divmg").css("display", "none");
                $("#divyg").css("display", "none");
            })
            $("#ulgj").find("li").eq(6).mousemove(function() {
                $(this).addClass("on");
                $("#divqt").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divxjp").css("display", "none");
                $("#divxxl").css("display", "none");
                $("#divadly").css("display", "none");
                $("#divjnd").css("display", "none");
                $("#divmg").css("display", "none");
                $("#divyg").css("display", "none");
            })
            //留学
            


            $("#ullx").find("li").eq(0).mousemove(function() {
                $(this).addClass("on");
                $("#divgz").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divgz").nextAll().css("display", "none");

                $("#lxghtb").find("div").eq(0).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1092&type=g' target='_blank'>美国高中</a>");
                $("#lxghtb").find("div").eq(1).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1114&type=g' target='_blank'>英国高中</a>");
                $("#lxghtb").find("div").eq(2).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1231&type=g' target='_blank'>加拿大高中</a>");
                $("#lxghtb").find("div").eq(3).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1168&type=g' target='_blank'>澳洲高中</a>");
                $("#lxghtb").find("div").eq(4).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1189&type=g' target='_blank'>新西兰高中</a>");
                $("#lxghtb").find("div").eq(5).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1252&type=g' target='_blank'>新加坡高中</a>");
            })
            $("#ullx").find("li").eq(1).mousemove(function() {
                $(this).addClass("on");
                $("#divbk").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divbk").nextAll().css("display", "none");
                $("#divgz").css("display", "none");

                $("#lxghtb").find("div").eq(0).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1092&type=b' target='_blank'>美国本科</a>");
                $("#lxghtb").find("div").eq(1).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1114&type=b' target='_blank'>英国本科</a>");
                $("#lxghtb").find("div").eq(2).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1231&type=b' target='_blank'>加拿大本科</a>");
                $("#lxghtb").find("div").eq(3).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1168&type=b' target='_blank'>澳洲本科</a>");
                $("#lxghtb").find("div").eq(4).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1189&type=b' target='_blank'>新西兰本科</a>");
                $("#lxghtb").find("div").eq(5).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1252&type=b' target='_blank'>新加坡本科</a>");
                
            })
            $("#ullx").find("li").eq(2).mousemove(function() {
                $(this).addClass("on");
                $("#divyjs").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divyjs").nextAll().css("display", "none");
                $("#divgz").css("display", "none");
                $("#divbk").css("display", "none");

                $("#lxghtb").find("div").eq(0).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1092&type=y' target='_blank'>美国研究生</a>");
                $("#lxghtb").find("div").eq(1).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1114&type=y' target='_blank'>英国研究生</a>");
                $("#lxghtb").find("div").eq(2).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1231&type=y' target='_blank'>加拿大研究生</a>");
                $("#lxghtb").find("div").eq(3).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1168&type=y' target='_blank'>澳洲研究生</a>");
                $("#lxghtb").find("div").eq(4).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1189&type=y' target='_blank'>新西兰研究生</a>");
                $("#lxghtb").find("div").eq(5).html("<a style='color:#1b63b7;' href='lxgh.aspx?cid=1252&type=y' target='_blank'>新加坡研究生</a>");
            })
            $("#ullx").find("li").eq(3).mousemove(function() {
                $(this).addClass("on");
                $("#divdiy").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divyjs").css("display", "none");
                $("#divgz").css("display", "none");
                $("#divbk").css("display", "none");
            })
            //综合
            $("#ulzh").find("li").eq(0).mousemove(function() {
                $(this).addClass("on");
                $("#divcgks").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divcgks").nextAll().css("display", "none");
            })
            $("#ulzh").find("li").eq(4).mousemove(function() {
                $(this).addClass("on");
                $("#divqzjq").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divqzjq").nextAll().css("display", "none");
                $("#divcgks").css("display", "none");
            })
            $("#ulzh").find("li").eq(1).mousemove(function() {
                $(this).addClass("on");
                $("#divxqzb").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divxqzb").nextAll().css("display", "none");
                $("#divcgks").css("display", "none");
                $("#divqzjq").css("display", "none");
            })
            $("#ulzh").find("li").eq(2).mousemove(function() {
                $(this).addClass("on");
                $("#divymjy").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divymjy").nextAll().css("display", "none");
                $("#divcgks").css("display", "none");
                $("#divqzjq").css("display", "none");
                $("#divxqzb").css("display", "none");
            })
            $("#ulzh").find("li").eq(3).mousemove(function() {
                $(this).addClass("on");
                $("#divhwsh").css("display", "block");
                $(this).siblings().removeClass("on");
                $("#divymjy").css("display", "none");
                $("#divcgks").css("display", "none");
                $("#divqzjq").css("display", "none");
                $("#divxqzb").css("display", "none");
            })
    })
            
    function addfavorite()
    {
        var url = window.location.href;
        var title = window.location.title;
        try
        {
            window.external.addFavorite(url , title);
        }
        catch (e)
        {
            try
            {
                window.sidebar.addPanel(title , url , "");
            }
            catch (e)
            {
                alert("加入收藏失败，请使用Ctrl+D进行添加");
            }
        } 
    } 
	
//-------------------------------------------------无敌分割线---------------------------------------------------

	var lastScrollY = 0;
        function heartBeat() {
            var diffY;
            if (document.documentElement && document.documentElement.scrollTop)
                diffY = document.documentElement.scrollTop;
            else if (document.body)
                diffY = document.body.scrollTop
            else
            { /*Netscape stuff*/ }

            percent = .1 * (diffY - lastScrollY);
            if (percent > 0) percent = Math.ceil(percent);
            else percent = Math.floor(percent);
            document.getElementById("adleft").style.top = parseInt(document.getElementById("adleft").style.top) + percent + "px";
            document.getElementById("adright").style.top = parseInt(document.getElementById("adright").style.top) + percent + "px";
            lastScrollY = lastScrollY + percent;
        }

//        对联图片
/*        if (screen.width == 1024) {
            function adhide(names) { document.getElementById(names).style.display = 'none'; }
            function screencl(names) { if (screen.width <= 800) { adhide(names); } }
            zcode = "<div id='adleft' style='left:0px;position: absolute;z-index:1;top:200px;'></div>";
            ycode = "<div id='adright' style='right:0px;position: absolute;z-index:1;top:200px;'><div style='width:116px;height:333px;background:Scrollbar;border:#999 solid 1px;'><img width='116px' height='333px' src='images/qf5.jpg' /></div><div align='left' style='background:#fff;font-size:0px;'>　<img src='images/close.gif' title='关闭' onclick=adhide('adright') style='cursor:pointer'></div></div>";
            document.write(zcode);
            document.write(ycode);
            screencl('adleft');
            screencl('adright');
            window.setInterval("heartBeat()", 1);
        }
        else {
            function adhide(names) { document.getElementById(names).style.display = 'none'; }
            function screencl(names) { if (screen.width <= 800) { adhide(names); } }
            zcode = "<div id='adleft' style='left:0px;position: absolute;z-index:1;top:200px;'></div>";
            ycode = "<div id='adright' style='right:0px;position: absolute;z-index:1;top:200px;'><div style='width:116px;height:333px;background:Scrollbar;border:#999 solid 1px;'><img width='116px' height='333px' src='images/qf5.jpg' /></div><div align='left' style='background:#fff;font-size:0px;'>　<img src='images/close.gif' title='关闭' onclick=adhide('adright') style='cursor:pointer'></div></div>";
            document.write(zcode);
            document.write(ycode);
            screencl('adleft');
            screencl('adright');
            window.setInterval("heartBeat()", 1);
        }*/
        
        function isMatch(str1,str2) 
        {  
            var index = str1.indexOf(str2); 
            if(index==-1) return false; 
            return true; 
        }
        function ResumeError()
        { 
            return true; 
        } 
        window.onerror = ResumeError; 
        
        
        function $$(id)
        {
            return document.getElementById(id);
        }
		
        function showMenu (baseID, divID)
        {
            baseID = $$(baseID);
            divID  = $$(divID);

            if (showMenu.timer) clearTimeout(showMenu.timer);
	        hideCur();
            divID.style.display = 'block';
            showMenu.cur = divID;
            
            if (! divID.isCreate)
            {
            divID.isCreate = true;
            divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
			hideCur();
            divID.style.display = 'block';
            };

            function hide () {
                showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 1000);
            }

            divID.onmouseout = hide;
            baseID.onmouseout = hide;
            }
	        function hideCur () {
		        showMenu.cur && (showMenu.cur.style.display = 'none');
	        }
        }
