    var hideSetting=false;
    var City="";
    City=Ylmf.Cookie.get("city");
    var showMoreweather=false;
    var getBgimgstyle;
    var serachInputVal="";
    function AddFocus(node)
    {
        //alert(document.getElementById("Homepage"));
        if ( node.nodeType == 1 && node.tagName == "A" )
        {   
            if(!isNaN(node.SiteID))
            {
                node.attachEvent('onmouseover', "ShowTitle("+ node.SiteID +");");
            }
        }

        // 获得node的全部子节点
        var children = node.childNodes;
       //alert(children.length);
        for ( var i = 0; i < children.length; i++ )
        {
            // 在每个子节点上进行递归操作,以遍历HTML文档所有节点
            AddFocus( children[i] );
        }
    }
    
    $(window).on("load",function()
    {
        skinSelecter("layout-setting");
        skinSelecter("style-setting");
        skinSelecter("style-quick");
        skinSelecter("font-setting");
        skinSelecter("bg-setting");
         $(document.body).on("click",function(j)
         {
            var g=j.srcElement||j.target;
            var k=g.id;History.save(g);
            if(k=="delHistory")
            {
                History.clear()
            }
            if(k!=="smore")
            {
                $("search-more").hide()
            }
            if(k=="setting"||k=="setting2")
            {
                $("weather-box").hide();
                $("setting-box").toggle();
                getBgimgstyle==false?getBgimgstyle=false:getBgimgstyle=true;
                setbgIMG()
            }
            else
            {
                if(hideSetting==true||k=="setting-close")
                {
                    $("setting-box").hide()
                }
             }
             if(k=="setting-reset")
            {
                setStyle(0);
                Ylmf.Cookie.clear("layout");
                Ylmf.Cookie.clear("style");
                Ylmf.Cookie.clear("font");
                Ylmf.Cookie.clear("bg");
                window.location.reload()
            }
            if(k=="simple_w")
            {
                $("weather-box").toggle()
            }
            if(k=="weather-close")
            {
                $("weather-box").hide()
            }
            if(k=="change-city")
            {
                $("w_ctlink").hide();
                $("weather-setting").show()
            }
            if(k=="city-button")
            {
                $("w_ctlink").show();
                $("weather-setting").hide();
                Ylmf.Cookie.set("province",document.getElementById("w_pro").value);
                Ylmf.Cookie.set("city",document.getElementById("w_city").value);
                var f=document.getElementById("w_city");settingCity(f.options[f.selectedIndex].innerHTML,f.value)
            }
            if(k=="cancel_w")
            {
                $("weather-setting").hide();
                $("w_ctlink").show()
            }
            $("suggest").hide();
       if(k=="setHomepage")
       {
            Ylmf.setHomepage(g)
       }
   });
   $("setting-box").on("mouseover",function()
   {
        hideSetting=false
   });
   $("setting-box").on("mouseout",function()
   {
        hideSetting=true
    });
    Hover(Dom.get("setting"),function()
    {
        $("setting-box").show();
        getBgimgstyle==false?getBgimgstyle=false:getBgimgstyle=true;
        setbgIMG()
    },600);
    History.show();
    if(Ylmf.Browser.ie6)
    {
        document.execCommand("BackgroundImageCache",false,true);
        var c=Dom.get("coolsites").getElementsByTagName("li");
        for(var d=0,a=c.length;d<a;++d)
        {
            c[d].onmouseover=function()
            {
                this.tmpClass=this.className;this.className="iehover"
            };
            c[d].onmouseout=function()
            {
                this.className=this.tmpClass
            }
        }
    }
    if(Ylmf.Cookie.get("layout")=="2"&&Ylmf.screenWidth>=1680)
    {
        Dom.get("b1").innerHTML+='<iframe style="margin-left:5px;" src="http://www.xiazaiba.com/115.com/hot.htm" width="470" width="470" height="62" frameborder="0"></iframe>'
    }
    if(Ylmf.screenWidth<1440)
    {
        $("full").hide()
    }
    });
    function setbgIMG()
    {
        if(getBgimgstyle==true)
        {
            var d=document.getElementById("bg-setting").getElementsByTagName("a");
            for(var c=1,a=d.length;c<a;c++)
            {
                var b="static/images/bg/"+d[c].getAttribute("rel");d[c].style.background="url("+b+") -10px -15px repeat"
            }
            getBgimgstyle==false
        }
    }
    function skinSelecter(d)
    {
        var e=Dom.get(d).getElementsByTagName("a");
        var c=d.split("-")[0];
        for(var b=0,a=e.length;b<a;++b)
        {
            $(e[b]).on("click",function(j)
            {
                var g=j.srcElement||j.target;var f=g.getAttribute("rel");
                switch(c)
                {
                    case"layout":
                        Ylmf.Cookie.set("layout",f);
                        window.location.reload();
                        break;
                    case"style":
                        setStyle(f);
                        setFont("none");
                        break;
                    case"font":
                        setFont(f);
                        break;
                    case"bg":
                        setBg(f);
                        iscurBg(g);
                        break
                  }
           })
        }
    }
    function setStyle(d)
    {
        var a=["","grass/grass.css","orange/orange.css","purple/purple.css","blue/blue.css","pink/pink.css","green/green.css"];
        var d=Number(d);
        var b=Dom.get("skin");
        var c="css/";
        if(a[d]!=="")
        {
            c+=a[d];
            Ylmf.Ajax(c,function(){b.href=c})
        }
        else
        {
            b.href="";
            setFont("none")
        }
        Ylmf.Cookie.set("style",d)
    }
    function setLayout(b)
    {
        var a=["default","layout-medium","layout-full"];
        setStylesheet(a[b]);
        Ylmf.Cookie.set("layout",b)
    }
    function setFont(b)
    {
        var a=Dom.get("font");
        var c="static/css/font/";
        if(b!=="none")
        {
            c+=b;
            c+=".css";
            a.href=c;
            Ylmf.Cookie.set("font",b)
         }
         else
         {
            a.href="";
            Ylmf.Cookie.clear("font")
         }
     }
     function setBg(a)
     {
        var d=document.getElementsByTagName("style")[0];
        var c="";
        var b=a.split(".")[0];
        if(a!=="default")
        {
            c+="body { background:url(images/"+a+");}";
            c+="#bg-setting a.img"+b+"{border:1px solid red;border-bottom-width:2px;}"}
            else
            {
                c+="#bg-setting a.default{border:1px solid red;border-bottom-width:2px;}"
                }
                if(d.styleSheet)
                {
                    d.styleSheet.cssText=c
                }
                else
                {
                    d.innerHTML=c}Ylmf.Cookie.set("bg",a)
                }
                function getBgimg(b,a)
                {
                    if(a==Ylmf.Cookie.get("bg"))
                    {
                        b.style.border="1px solid red";
                        b.style.borderBottomWidth="2px"
                    }
                    else
                    {
                        b.style.border="1px solid #cccccc";
                        b.style.borderBottomWidth="2px"
                    }
                }
                function iscurBg(d)
                {
                    var c=document.getElementById("bg-setting").getElementsByTagName("a");
                    for(var b=0,a=c.length;b<a;++b)
                    {
                        c[b].style.border="1px solid #cccccc";
                        c[b].style.borderBottomWidth="2px"
                    }
                    d.style.border="1px solid red";
                    d.style.borderBottomWidth="2px"
                }
                function Hover(d,b,c)
                {
                    var a=c;
                    var e;$(d).on("mouseover",function()
                    {
                        e=window.setTimeout(b,a)
                    });
                    $(d).on("mouseout",function()
                    {
                        if(e!=undefined)
                        {
                            window.clearTimeout(e)
                        }
                    })
                }
                function tabMenu(a,g,k)
                {
                    var e=document.getElementById(a).getElementsByTagName("a");
                    var l=document.getElementById(a).getElementsByTagName("li");
                    var b=400;
                    var c,j;
                    if(a!=="search-menu-show")
                    {
                        j="click,mouseover"
                    }
                    else
                    {
                        j="click"
                    }
                    for(var d=0,f=e.length;d<f;d++)
                    {
                        $(e[d]).on(j,function(o)
                        {
                            var n=o.srcElement||o.target;
                            function m()
                            {
                                var q=n.getAttribute("rel");
                                var r=document.getElementById(q);
                                var s=function()
                                {
                                    for(var u=0,t=l.length;u<t;u++)
                                    {
                                        if(l[u].className)
                                        {
                                            l[u].className=""
                                        }
                                     }
                                 };
                                 s();
                                 n.parentNode.className="current";
                                 if(q=="more")
                                 {
                                    $("search-more").show();
                                    return
                                 }
                                 for(var p=0;contentBox=document.getElementById(g+p);p++)
                                 {
                                    $(contentBox).hide()
                                 }
                                 $(r).show();
                                 return k(r)
                             }
                             if(a!=="search-menu-show")
                             {
                                c=window.setTimeout(m,b)
                             }
                             else
                             {
                                m()
                             }
                          });
                          if(a!=="search-menu-show")
                          {
                                $(e[d]).on("mouseout",function(m)
                                {
                                    if(c!=undefined)
                                    {
                                        window.clearTimeout(c)
                                    }
                                })
                           }
                        }
                    }
                    function setStylesheet(d)
                    {
                        var a,b,c=[""];
                        for(a=0;(b=document.getElementsByTagName("link")[a]);a++)
                        {
                            if(b.getAttribute("rel").toLowerCase()=="alternate stylesheet"&&b.getAttribute("title"))
                            {
                                b.disabled=true;c.push(b);
                                if(b.getAttribute("title")==d)
                                {
                                    b.disabled=false
                                }
                            }
                        }
                    }
                    var countimg=document.createElement("img");
                    var History=
                    {
                        save:function(d)
                        {
                            try
                            {
                                if(d.tagName=="A"&&d.href.indexOf("http://")==0&&d.href.indexOf("http://"+location.host)!=0&&d.getAttribute("rel")!=="sugitem")
                                {
                                    var b=d.href;var a=d.innerHTML;
                                    if(a!="undefined")
                                    {
                                        countimg.src="http://stat.114la.com/index?u="+encodeURIComponent(b)+"&n="+encodeURIComponent(a)+"&q=0&i="+Math.random();
                                        h=a+"+"+b+"_114la_";
                                        h+=unescape(Ylmf.Cookie.get("history"));
                                        h=escape(h);
                                        Ylmf.Cookie.set("history",h);
                                        History.show()
                                     }
                                 }
                             }
                             catch(c)
                             {
                             }
                            return true
                        },show:function()
                        {
                            try
                            {
                                var d=Ylmf.Cookie.get("history");
                                d=unescape(d);
                                var b="";if(d!="null")
                                {
                                    history_arg=d.split("_114la_");
                                    i=0;
                                    linknum=0;
                                    len=history_arg.length;
                                    for(i=0;i<len;i++)
                                    {
                                        var a=history_arg[i].split("+");
                                        if(history_arg[i]!="null"&&b.indexOf(a[0])==-1&&linknum<44)
                                        {
                                            b+='<li><a href="'+a[1]+'" title="'+a[0]+'">'+a[0]+"</a></li>";
                                            linknum+=1
                                        }
                                    }
                                    Dom.get("history").innerHTML=b
                                }
                                else
                                {
                                    Dom.get("history").innerHTML='<li class="none">\u5bf9\u4e0d\u8d77\uff0c\u60a8\u6ca1\u6709\u4efb\u4f55\u6d4f\u89c8\u8bb0\u5f55</li>'
                                }
                            }
                            catch(c){}
                        },clear:function()
                        {
                            clean=confirm("\u786e\u5b9a\u8981\u6e05\u9664\u6240\u6709\u7684\u6d4f\u89c8\u8bb0\u5f55\uff1f");
                            if(clean)
                            {
                                Ylmf.Cookie.clear("history");
                                Dom.get("history").innerHTML='<li class="none">\u5bf9\u4e0d\u8d77\uff0c\u60a8\u6ca1\u6709\u4efb\u4f55\u6d4f\u89c8\u8bb0\u5f55</li>'
                            }
                        }
                    };
                    function searchlog(a){}
                    function logad(){};

