// JavaScript Document

function  display_huifu(tie_id,pinglun_id,num,maxnum)
{
	 var  txt;
	 //---------事件onclick 引起页面自动滚动到最上面------
	 //---------改成-onMouseover正确---------------------
	 txt='<a href=# onMouseover=display_huifu_input('+tie_id+',';
	 txt=txt+pinglun_id+',';
	 txt=txt+num+','+maxnum;
	 txt=txt+');>';
	 txt=txt+'<font color=#0055aa size=-1>回复</font>';
	 txt=txt+'</a>';
	 document.getElementById("huifu"+num).innerHTML=txt;
}

function  display_huifu_input(tie_id,pinglun_id,num,maxv)
{
	
	var  abc;
	
	abc='<link rel=stylesheet href=css/button.css type=text/css>';
	abc=abc+'<table width=60% border=0 align=center cellpadding=0 cellspacing=0>';
    abc=abc+'<tr>';
    abc=abc+'<td height=53 valign=top>';
    abc=abc+'<form id=form2 name=form2 method=post action=huifu.php?tie_id='+tie_id;
	abc=abc+'&pinglun_id='+pinglun_id;
	abc=abc+'>';
    abc=abc+'<textarea name=huifu_area id=huifu_area cols=28 rows=4></textarea>';
	abc=abc+'<input type=submit name=huifu_button  ';
	abc=abc+'id=huifu_button value=回复 />';
    abc=abc+'</form>';
    abc=abc+'</td>';
    abc=abc+'</tr>';
    abc=abc+'</table>';
	
	
	for(var h=1;h<=maxv;h++)
	{
	    if  (h!=num)	
		{
			document.getElementById("huifu_input"+h).innerHTML='';
		}
	}
	document.getElementById("huifu_input"+num).innerHTML=abc;
	document.getElementById("huifu_input"+num).focus();
	
	
	
	
}

function goto(position) 
{ 
    if(position=="bottom") 
    { 
        document.documentElement.scrollTop=document.body.clientHeight; 
        document.body.scrollTop=document.body.clientHeight; 
    } 
    if(position=="top") 
    { 
        document.documentElement.scrollTop=0; 
        document.body.scrollTop=0; 
    } 
} 


function scroll_to(div)
{  
   $('html,body').animate(
   {  
      scrollTop: $(div).offset().top4
   },1000);  
} 




 