
//插入内容
function sayurl(mypath,utype,id_name)
{	if(id_name=='tface')
	{sotr_html=document.getElementById(id_name);}
	else
	{
		sotr_html=window.parent.document.getElementById(id_name);

		};	
	sotr_html.style.display = 'block';
	temp_html='<iframe width=100% height=100% scrolling=no frameborder=0 marginheight=0 marginwidth=0 src='+ mypath +'/main/sayurl.asp?utype='+ utype +'&id_name='+ id_name +'></iframe>';
	if(id_name=='tface')
	{
		temp_html=temp_html+'<img id=ico1 src='+ mypath +'/Main/img/ico1.gif width=13 height=7 />';
		sotr_html.innerHTML=temp_html;
		window.document.getElementById('ico1').className = 'ico'+utype;
	}
	else
	{
		sotr_html.innerHTML=temp_html;}	
}
//插入内容

//发表操作
function saysubmit(mypath,zb_id) {	
	tface.style.display='none';
	temp_html='<iframe width=0 height=0 scrolling=no frameborder=0 marginheight=0 marginwidth=0 src='+ mypath +'/main/say.asp?zb_id='+zb_id+'></iframe>';	
	document.getElementById('tface').innerHTML=temp_html;
	}
//发表操作

//计算可输入的字数

function chkcountallre() {
    if (document.getElementsByName("f").length==1) {
    }
	if (document.getElementsByName("whatisay").length==1) 
	{
		if (/msie/i.test(navigator.userAgent)) {$("sayword").onpropertychange = checkLength;} else {$("sayword").addEventListener("input", checkLength, false);}
	}
}

function checkLength() {

    var Myheight1 = whatisay.sayword.style.posHeight,
    Myheight2 = whatisay.sayword.scrollHeight;
  if (Myheight2 > 75) {
            whatisay.sayword.style.overflowY = "scroll"
        } else {
            whatisay.sayword.style.overflowY = "hidden"
        }


    var curLength = $("sayword").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);

}


//计算可输入的字数
