//插入内容
function sayurl(mypath, utype)
 {
    var utype,
    mypath;
    if (tface.style.display != 'block')
    {
        tface.style.display = 'block';
        faceiframe.location.href = mypath + '/t/sayurl.asp?utype=' + utype,
        document.all.faceiframe.width = '403'
    }
    else
    {
        tface.style.display = 'none'
    }

}
//插入内容

//计算可输入的字数

function chkcountallre() {
    if (window.parent.document.f == true) {
        f.wd.focus();
    } else if (window.parent.document.mydate == true) {
        mydate.mymemo.focus();
    }
    if (/msie/i.test(navigator.userAgent)) {
        $("mymemo").onpropertychange = checkLength;

    } else {
        $("mymemo").addEventListener("input", checkLength, false);

    }

}

function checkLength() {

    var Myheight1 = mydate.mymemo.style.posHeight,
    Myheight2 = mydate.mymemo.scrollHeight;

    //QQ即时对话
    if (Myheight1 == 90) {
        if (Myheight2 > 90) {
            mydate.mymemo.style.overflowY = "scroll"
        } else {
            mydate.mymemo.style.overflowY = "hidden"
        }
        window.parent.document.getElementById('stat_left').innerHTML = stat_left.innerHTML;
    }
    //点评和转播
    else if (Myheight1 == 70) {
        if (Myheight2 > 70) {
            mydate.mymemo.style.overflowY = "scroll"
        } else {
            mydate.mymemo.style.overflowY = "hidden"
        }
    }
    else if (Myheight1 < Myheight2) {
        if (Myheight2 < 49) {
            mydate.mymemo.style.posHeight = Myheight2
        }
        else {
            mydate.mymemo.style.posHeight = 49;
            mydate.mymemo.style.overflowY = "scroll"
        }
    }


    var curLength = $("mymemo").value.length;
    var countleft = 140 - curLength;
    if (curLength > 140) {
        $("stat_how").innerHTML = "超出";
        $("stat_left").innerHTML = '<font color=#e56c0a>' + countleft + '</font>';

    }
    else
    {
        $("stat_how").innerHTML = "还能输入";
        $("stat_left").innerHTML = countleft;

    }



}

function $(id) {
    return document.getElementById(id);

}


//计算可输入的字数
