	//回复
	function comment(docName, docUrl, cmtId){
		JQ('#dialog').html(template_cmt_jmodel);
		JQ('#dialog #jqModel_docName').val(docName);
		JQ('#dialog #jqModel_docUrl').val(docUrl);
		JQ('#dialog').jqm({ trigger: false,overlay: 10}).jqDrag('.jqDrag');
		JQ('#dialog').jqmShow();
		if (cmtId > 0) {
			document.getElementById("jqModel_refComId").value = cmtId;
		}
	}
	function subStringByLength(s, d) {
	if(typeof(s)=='undefined'||s.length==0){
		return '';
	}
	if(s.length>d){
		return s.substr(0, d)+'...';
	}else{
		return s;
	}
}

	var template_cmt_jmodel = '<style type=\"text/css\">#replyDiv span,#replyDiv div,#replyDiv form,#replyDiv ul,#replyDiv li{margin:0px;padding:0px;font-size: 12px; font-family:\"宋体\";}#replyDiv {text-align:center; width:398px; height:300px; border:1px solid #000; background:#fff;}';
	template_cmt_jmodel += '.jqDrag{cursor:move;}';
	template_cmt_jmodel += '#replyDiv .title{ clear:both; height:25px; border-bottom:1px solid #999; background:#ededed;color:#333;}';
	template_cmt_jmodel += '#replyDiv .title .c{color:#bc2931;}';
	template_cmt_jmodel += '#replyDiv .title li{text-align:left; padding:6px 0 0 8px; list-style-type:none; line-height:160%;}';
	template_cmt_jmodel += '#replyDiv .replyForm{ padding:12px 0 0; clear:both;}';
	template_cmt_jmodel += '#replyDiv .replyForm .c{color:#bc2931;}	';
	template_cmt_jmodel += '#replyDiv #content { width:320px; height:155px;background:url(http://cmt.ifeng.com/share/template/images/xuan_97.jpg) no-repeat #fff center center ; border:1px #cdcdcd solid;}';
	template_cmt_jmodel += '#replyDiv .input {border:1px #cdcdcd solid;}</style>';
	template_cmt_jmodel += '<div id=\"replyDiv\">';
	template_cmt_jmodel += '<div class=\"title jqDrag\"><ul><li><span class=\"c\">评论：</span><span id=\"refContent\"></span></li></ul></div>';
	template_cmt_jmodel += '<div class=\"replyForm\">';
	template_cmt_jmodel += '<form id="jqModelForm" target=\"_blank\" action=\"http://cmt.ifeng.com/postcmts.do\" onsubmit=\"return commentSubmitJqModel(this);\" method=\"post\">';
	template_cmt_jmodel += '<div style=\"margin:auto;width:80%;text-align:left;padding:3px 0 8px 0;\">';
	template_cmt_jmodel += '昵称：<input class=\"input\" type=\"text\" name=\"userName\" id=\"userName2\" size=\"15\" value=\"凤凰网友\"><br />';
	template_cmt_jmodel += '来自：<input class=\"input\" id=\"userFrom\" name=\"userFrom\" type=\"text\" size=\"15\" /></div>';
	template_cmt_jmodel += '<input type=\"hidden\" name=\"chId\" id=\"jqModel_chId\" value=\"0\"/>';
	template_cmt_jmodel += '<input type=\"hidden\" name=\"docId\" id=\"jqModel_docId\" value=\"0\"/>';
	template_cmt_jmodel += '<input type=\"hidden\" name=\"docName\" id=\"jqModel_docName\" value=\"\"/>';
	template_cmt_jmodel += '<input type=\"hidden\" name=\"docUrl\" id=\"jqModel_docUrl\" value=\"\"/>';
	template_cmt_jmodel += '<input type=\"hidden\" name=\"cmtId\" id=\"jqModel_cmtId\" value=\"\"/>';
	template_cmt_jmodel += '<input type=\"hidden\" name=\"refComId\" id=\"jqModel_refComId\" value=\"\"/>';
	template_cmt_jmodel += '<input type=\"hidden\" name=\"fromReply\" value=\"true\"/>';
	template_cmt_jmodel += '<textarea id=\"content\" name=\"content\" cols=\"30\" rows=\"10\"></textarea><br>';
	template_cmt_jmodel += '<input type=\"checkbox\" name=\"ifAnony\" id=\"ifAnony\" /><label for=\"niming2\" >&nbsp;匿名</label>';
	template_cmt_jmodel += '<input value=\"提 交\" class=\"btn\" type=\"submit\">&nbsp;<input value=\"取 消\" class="jqmClose" type=\"button\"></form></div></div>';