﻿///<reference path='Eexin.js'>
///<reference path='Kitty.js'>
function Page() { }
Page.SearchType = "";
Page.Photo = "";
Page.Tag = "";
Page.SearchKey = "";
Page.PageSize = 20;
Page.PostUserId = "";
Page.PostUserIdState = "";
Page.GetNextPage = function(Values, Container) {
    $(Container).append("<div class='LoadMsgGif' style=\"width:100%; text-align:center\"><img src=\"/Content/Images/LoadMsg.gif\" /></div>");
    $.post(
        "/Home/Search",
        Values,
        function(Msg) {
            if (Msg.length > 1) {
                $(Container).append(Msg);
                SmallBlog.DoBut_ShowOrHide(".ul_pl");    ////绑定按钮的显示与隐藏事件
                $(".MeShow_" + Eexin.UserId).show();
                $(".MeHide_" + Eexin.UserId).hide();
                Eexin.BindGetFace("a.GetFace_A");
                Eexin.OnClickShowBigPhoto("img.SmallBlogContentImg");
                if (Eexin.UserId == '') { BindShowLoginWin(); }
            } else {
                $(Container).append($(".NoSearchMsgTip").html());
            }
            $(".LoadMsgGif").remove();
        }
    );
}

    Page.GetNewMsg = function(T, Container) {
        $(Container).append("<div class='LoadMsgGif' style=\"width:100%; text-align:center\"><img src=\"/Content/Images/LoadMsg.gif\" /></div>");
        $.post("/Home/Search", { SearchType: T, MaxTime: $(Container).find(".LastTime:first").html() }, function(Re) {
            $(".LoadMsgGif").remove();
            TitleJs.ReSet();
            $("#NewMsgTip").animate({ height: "0px" }, 300);
            if (Re.length > 1) {
                $(Container).prepend(Re);
                SmallBlog.DoBut_ShowOrHide(".ul_pl");    ////绑定按钮的显示与隐藏事件
                $(".MeShow_" + Eexin.UserId).show();
                $(".MeHide_" + Eexin.UserId).hide();
                Eexin.BindGetFace("a.GetFace_A");
                Eexin.OnClickShowBigPhoto("img.SmallBlogContentImg");
            }
        });
    }