Namespace.register("U.F.A"); //好友辅助函数命名空间
//------------------------------------------------------------------------好友面板上独立的一下通用函数
//群 好友 最近联系人的切换
U.F.A.MAGC = function (UDXD) {
    var i, _TF, _UTF = ["UF_UP_FriendBoard", "UF_UP_GroupBoard", "UF_UP_ChatRecord"];
    for (i = 0; i < _UTF.length; i++) { if (_UTF[i] == UDXD) { _TF = "block"; } else { _TF = "none"; } $("#" + _UTF[i])[0].style.display = _TF; }
}

//好友聊天框
U.F.A.ISFriend = function () {
    if (!U.U.L.LARG()) {
        var _UDOD = $("#UF_UP_UserBoard")[0], _TF = ["150px", "block"];
        (_UDOD.style.display == "block") && (_TF[0] = "-2000px", _TF[1] = "none");
        $(_UDOD).animate({ "top": _TF[0], "display": _TF[1] }, 100);
    }
    return _UDOD;
}

//调整好友框
U.F.A.IframeAutoHight = function (UDOD) {
    var i, _UDTD, _UDSD, _UDFD, _UDGD, _UE = U.M.GetElementInfo(UDOD), _UDAD = U.M.GTCN(UDOD.childNodes);
    if (_UE["CW"] > 0) {
        //中间编辑区域和查看区域
        for (i = 0; i < _UDAD.length; i++) {
            if (_UDAD[i].id.indexOf("UF_FW_Content") > -1 && _UDAD[i].id.length > 14 && _UDAD[i].style.display != "none") {
                _UDTD = $("div#UF_FW_Context", _UDAD[i])[0]; _UDSD = $("div#UF_FW_C", _UDTD)[0];
                if (_UDSD.offsetWidth > 0) { UDOD.style.minWidth = "730px"; } else { UDOD.style.minWidth = "430px"; };
                if (_UE["CH"] > 0) {
                    _UDFD = $("div", _UDTD); _UDSD.style.height = (_UE["CH"] - 119) + "px"; _UE = U.M.GetElementInfo(UDOD); //大小变化
                    _UDFD[2].style.height = (_UE["CH"] - 231) + "px"; _UDFD[0].style.width = _UE["CW"] - _UDSD.offsetWidth + "px";
                }
                //发送框和头部
                _UDGD = $("div#SendMessageImg", UDOD)[0]; _UDGD.parentNode.style.width = _UE["CW"] - 22 + "px"; _UDGD.style.marginLeft = _UE["CW"] - 60 + "px";
                $("div#UF_FW_user", UDOD)[0].style.width = _UE["CW"] - 92 + "px";
            }
        }
    }
}

//群窗口拖动后iframe调整
U.F.A.GIframeAutoHight = function (UDOD) {
    var _UE = U.M.GetElementInfo(UDOD), _UDTD = $("div#UF_GW_CE", UDOD)[0], _UDSD = $("div#UF_GW_C", UDOD)[0], _UDGD = $("div#GainFormation", UDOD)[0], _UDHD = $("div#UF_GW_user", UDOD)[0], _UDID = $("div#UF_GW_Context", UDOD)[0], _UDJD = $("div#SendMessageImg", UDOD)[0];
    //头部内容
    _UDHD.style.width = _UE["CW"] - 92 + "px";
    //中间
    _UDID.style.width = _UE["CW"] - _UDSD.offsetWidth + "px";
    _UDGD.style.height = _UDSD.style.height = _UE["CH"] - 122 + "px";
    _UDTD.style.width = _UE["CW"] - _UDSD.offsetWidth - _UDGD.offsetWidth + "px";
    $("div", _UDTD)[0].style.height = _UE["CH"] - 240 + "px";
    //发送框
    _UDJD.parentNode.style.width = _UE["CW"] - 22 + "px";
    _UDJD.style.marginLeft = _UE["CW"] - 60 + "px";
}