function formPost()
  {
  	var Com_Content=document.getElementById("Com_Content").value;
	var CodeYZ=document.getElementById("CodeYZ").value;
  	if(Com_Content=="")
	{
		alert("评论内容不能为空!");
		return false;
	}
	if(Com_Content.length>300)
	{
		alert("对不起，评论内容不能多于300字!");
		return false;
	}
	if(Com_Content.length<10)
	{
		alert("多写点内容嘛!");
		return false;
	} 
	if(CodeYZ=="")
	{
		alert("请填写注册码!");
		return false;
	}
	
  }

function commentCodeSpan()
{
	if($('Com_Content').value=="")
	{
		var url = '../../CommentInput.php';
		new Ajax.Request(url,{method:'get',onSuccess:showCommentUser,onFailure:errCode});
	}
}

function showCommentUser(originalRequest)
{
	$('userBoxDiv').innerHTML = originalRequest.responseText;
}

function errCode()
{
}
 
 

function checkNiming()
{
 	if( document.comForm.niming.checked)
	{
		 document.getElementById("userSpan").style.display="none";
	}else
	{
		 document.getElementById("userSpan").style.display="inline"; 
	}
}

