function newshits(newsid,typename,dirname)
{var xmlhttp;
try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch (e){
try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch (e){ 
try{xmlhttp=new XMLHttpRequest();}
catch (e){
}
}
}
if (newsid=="")
{
msg="0";
var ch=document.getElementById("hits");
ch.innerHTML="<font color='#ff0000'>"+msg+"</font>"; 
return false;
}
//创建请求，并使用escape对email编码，以避免乱码
xmlhttp.open("get",dirname+"inc/hits.asp?Action="+escape(typename)+ "&id="+escape(newsid)+ "&t=" + new Date().getTime());
xmlhttp.onreadystatechange=function()
{if(4==xmlhttp.readyState)
{if(200==xmlhttp.status)
{msg=xmlhttp.responseText;}else{msg="0";}
var ch=document.getElementById("hits");
ch.innerHTML="<font color='#ff0000'>"+msg+"</font>"; 
}
}
xmlhttp.send(null); 
return false;
}

function AjaxComment(newsid,dirname)
{var xmlhttp;
try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch (e){
try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch (e){ 
try{xmlhttp=new XMLHttpRequest();}
catch (e){
}
}
}
if (newsid=="")
{
msg="";
return false;
}
//创建请求，并使用escape对email编码，以避免乱码
xmlhttp.open("get",dirname+"Comment/AjaxComment.asp?id="+escape(newsid)+ "&t=" + new Date().getTime());
xmlhttp.onreadystatechange=function()
{
if(4==xmlhttp.readyState)
{
	if(200==xmlhttp.status)
	{msg=xmlhttp.responseText;}
	else
	{msg="网络链接失败！";}
	var ch=document.getElementById("IcommentList");
	ch.innerHTML="<font color='#ff0000'>"+msg+"</font>"; 
}
else
{
	msg="<img src='"&dirname&"skin/default/loading.gif'>数据读取中，请稍后...";
	var ch=document.getElementById("IcommentList");
	ch.innerHTML=msg; 
}
}
xmlhttp.send(null); 
return false;
}

function T(n)
{
	document.getElementById("Acontent").style.fontSize=n+"px";
}

function CheckPl()
{
if(document.form2.plcontent.value=="")
{
alert("评论的内容不能为空！");
document.form2.plcontent.focus();
return false;
}
}