// JavaScript Document

function  cal_char_num_gentie(str)
      {
              var charnum;
			  var str;
			  if (document.form1.gentie.value.length>1 )
			   {
				   charnum=140-document.form1.gentie.value.length+'';
				   str =display_info2(charnum);
				   document.getElementById("gentie_tip").innerHTML=str;
			   }
		   
       
        }
		

function display_info2(info)
{
	
	   
	            var   dis1;
				
		        dis1='<table width=98% border=0 cellspacing=0 cellpadding=0>';
                dis1=dis1+'  <tr>';
                dis1=dis1+' <td width=100% height=20><font color=#0055aa>'+info+'</font></td>';
                
                dis1=dis1+' </tr>';
                dis1=dis1+' </table>';
				
				return  dis1;
	
}


function  check_gentie_str(last_id)
      {
               
			   var url;
			   
			   if (document.form1.gentie.value.length==0)
			   {
				   alert("[软件提示]：请输入评论 ");
				   //document.form1.gentie.focus();
				   return false;
			   }
			   else  if (document.form1.gentie.value.length>140)
			   {
				   alert("[软件提示]：评论内容不超过140个字符 ");
				   //document.form1.gentie.focus();
				   return false;
			   }
               else  
               {
                   //alert("^-^ OK");
				   url='gentie.php?last_id='+last_id;
				   document.form1.action=url;
				   document.form1.submit();
               }
       
        }
		
		
