var http_request = false;String.prototype.trim = function(){  return this.replace(/(^[\s]*)|([\s]*$)/g, "");} 
function deleWarning(gid,blogid)
{
	_confirm_msg_show("确认删除该条的留言吗？", "deleTrue('" + gid + "','" + blogid + "')", "");
}
function picSizeFixer(){
  var doc=document.getElementById("thread").getElementsByTagName("IMG");
  var doc1=document.getElementById("thread").getElementsByTagName("img");
  for (i=0;i<doc.length;i++){
    if (doc[i].width>400){
      doc[i].width=400;
    }
  }
    for (i=0;i<doc1.length;i++){
    if (doc1[i].width>400){
      doc1[i].width=400;
    }
  }
}

function picSizeFixer1(){
  var doc=document.getElementById("show_hide_content02").getElementsByTagName("IMG");
  var doc1=document.getElementById("show_hide_content02").getElementsByTagName("img");
  for (i=0;i<doc.length;i++){
    if (doc[i].width>490){
      doc[i].width=490;
    }
  }
    for (i=0;i<doc1.length;i++){
    if (doc1[i].width>400){
      doc1[i].width=490;      var imgLink=doc[i].src;
      if (navigator.appName=="Microsoft Internet Explorer"){
        doc[i].setAttribute("alt","点击查看原图");
        doc[i].onclick=function(){window.open(this.src);}
        doc[i].onmouseover=function(){this.style.cursor="hand";}
        }
      else {
        doc[i].setAttribute("onclick",'window.open("'+imgLink+'","")');
        }
    }
  }
}

function deleTrue(gid,blogid)
{
	send_message('/ClientMessageServlet?messageid='+gid+'&blogid='+blogid+'&action=delete');
 	return true;
}
function getCookies(str){
  var tmp,reg=new RegExp("(^| )"+str+"=([^;]*)(;|$)","gi"); 
  if(tmp=reg.exec(document.cookie))return(unescape(tmp[2])); 
 return null;
 }
function cancel(gid)
{
	ob1 = document.getElementById("gb_id_" + gid);
	ob2 = document.getElementById("gb_in_" + gid);
	content = document.getElementById("gb_c_" + gid);
	content.value = ob1.innerText;
	content.blur();
	ob1.style.display = "";
	ob2.style.display = "none";
}
function gb_reply(gid)
{
	ob1 = document.getElementById("gb_id_" + gid);
	ob2 = document.getElementById("gb_in_" + gid);
	content = document.getElementById("gb_c_" + gid);
	ob1.style.display = "none";
	ob2.style.display = "";
	content.focus();
}
function getLength(str){
	var num = str.replace(/[^\x00-\xff]/g,"**").length;
	return num;
} 

function send(oid,gid,blogid)
{
content1 = document.getElementById("gb_c_" + gid);
if(oid==""){
send_message('/ClientMessageServlet?blogid='+blogid+'&action=update&content='+escape(content1.value)+'&parentid='+gid);
}else{
send_message('/ClientMessageServlet?blogid='+blogid+'&action=update&content='+escape(content1.value)+'&messageid='+oid+'&parentid='+gid);
}
return true;
}

function submitform(blogid){
var content=document.form1.content.value;
var rand=document.form1.rand.value;
var pri="0";

if(document.form1.isprivate.checked){
pri=document.form1.isprivate.value;
}
if(rand==""){
alert("验证码为空！");
document.form1.rand.focus();
return false
}
if(content.trim()==""){
alert("留言内容为空！");
document.form1.rand.focus();
return false
}else if(getLength(content)<1 || getLength(content)>900){
alert("留言内容太长，必须小于900个字符");
return false;
}
send_message('/ClientMessageServlet?action=add&blogid='+blogid+'&content='+escape(content)+'&isprivate='+pri+'&rand='+rand);
return true;
}



   function userCheck(currentpage,blogid){

     	send_message('/ClientMessageServlet?pageno='+currentpage+'&blogid='+blogid);
 		return true;
      } 

function send_url(url){
		//开始初始化XMLHttpRequest对象
		createHtmlRequest();
		http_request.onreadystatechange = processM;
		// 确定发送请求的方式和URL以及是否同步执行下段代码
		http_request.open("post", url, true);
		//http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		http_request.send(null);

}
function send_message(url){

		//开始初始化XMLHttpRequest对象
	      //开始初始化XMLHttpRequest对象
      if(window.XMLHttpRequest) { //Mozilla 浏览器
			http_request = new XMLHttpRequest();
			if (http_request.overrideMimeType) {//设置MiME类别
				http_request.overrideMimeType("text/xml");
			}
		}
		else if (window.ActiveXObject) { // IE浏览器
			try {
				http_request = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					http_request = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
		}
		if (!http_request) { // 异常，创建对象实例失败
			window.alert("不能创建XMLHttpRequest对象实例.");
			return false;
		}
     
		http_request.onreadystatechange = processM;
		// 确定发送请求的方式和URL以及是否同步执行下段代码

		http_request.open("get", url, true);
		//http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		http_request.send(null);

}

function ubbTag(target, markup){ 
	var txa=document.getElementsByName(target)[0]; 
	txa.value+=markup;         
}


   function createHtmlRequest(){
      //开始初始化XMLHttpRequest对象
      if(window.XMLHttpRequest) { //Mozilla 浏览器
			http_request = new XMLHttpRequest();
			if (http_request.overrideMimeType) {//设置MiME类别
				http_request.overrideMimeType("text/xml");
			}
		}
		else if (window.ActiveXObject) { // IE浏览器
			try {
				http_request = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					http_request = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
		}
		if (!http_request) { // 异常，创建对象实例失败
			window.alert("不能创建XMLHttpRequest对象实例.");
			return false;
		}
      
      
      }

 function send_request(url) {//初始化、指定处理函数、发送请求的函数
		//开始初始化XMLHttpRequest对象
		createHtmlRequest();
		http_request.onreadystatechange = processRequest;
		// 确定发送请求的方式和URL以及是否同步执行下段代码
		http_request.open("GET", url, true);
		http_request.send(null);
	}


function processM() {

    if (http_request.readyState == 4) { // 判断对象状态
            if (http_request.status == 200) { // 信息已经成功返回，开始处理信息
               processMe();
            }else{ //页面不正常
                alert("您所请求的页面有异常。");
            }

        }else{
        document.getElementById("thread").innerHTML="<div class=\"gbook\"><div class=\"title\">我的留言本</div><div align=\"center\">数据正在加载....</div></div>";
        }
    }
	// 处理返回信息的函数
    function processRequest() {
    if (http_request.readyState == 4) { // 判断对象状态
            if (http_request.status == 200) { // 信息已经成功返回，开始处理信息
               processMessage();
            }else{ //页面不正常
                alert("您所请求的页面有异常。");
            }
        }else{
        document.getElementById("thread").innerHTML="<div class=\"user.asp?userid=<%= UserID %>\"><div class=\"title\">我的留言本</div><div align=\"center\">数据正在加载....</div></div>";
        }
    }

  function processMe(){
      var xmlobj=http_request.responseXML;
	  var messageElement=xmlobj.getElementsByTagName("messages");
	  var randElement=xmlobj.getElementsByTagName("rands");
	  var blogCookie=getCookies("blogid");
	  //提示错误信息后，将待发表的留言恢复。
	  var rfeeling='1';  
	  var newmessage = '';
	  var isprivate = '0';	  

	  var startpage;var uppage;var nextpage;var endpage;var name="";
	  if(randElement.length=="1"){
	    var employee=randElement[0];
	    var message=employee.getElementsByTagName("rand")[0].firstChild.data;
	    var blogids=employee.getElementsByTagName("blogid")[0].firstChild.data;
	    newmessage = employee.getElementsByTagName("newmessage")[0].firstChild.data;
  	    rfeeling = employee.getElementsByTagName("rfeeling")[0].firstChild.data;
   	    isprivate = employee.getElementsByTagName("isprivate")[0].firstChild.data;
	    if("notlogon"==message){
	       alert("你还没登录，不能发留言");
//	       userCheck(1,blogids);
	       }
	     else if("notequle"==message){
	       alert("验证码错误！");
//	       userCheck(1,blogids);
	       }
	     else if("forbidden"==message){
	      alert("留言有禁词！");
//	      userCheck(1,blogids);
	     }
	     else if("forbiddenip"==message){
	      alert("没有权限");
//	      userCheck(1,blogids);
	     }
	  }
	  //else{//解析XML文件
	  var blogElement=xmlobj.getElementsByTagName("blogids");
	  var blogid=blogElement[0].getElementsByTagName("blogid")[0].firstChild.data;
	  var mdiv = document.getElementById("thread");
	  var feedbackStr="<div class=\"gbook\"><div class=\"title\">我的留言本</div>";
	  for(var i=0;i<messageElement.length;i++) { // 循环读取employees.xml的内容
	   var employee=messageElement[i];
	   name=employee.getAttribute("name");
	  var submessage=employee.getElementsByTagName("submessages");
	   var messageid=employee.getElementsByTagName("messageid")[0].firstChild.data;
	   var username=employee.getElementsByTagName("username")[0].firstChild.data;
	   var content=unescape(employee.getElementsByTagName("content")[0].firstChild.data);
	   var createtime=employee.getElementsByTagName("createtime")[0].firstChild.data;
	   var userid=employee.getElementsByTagName("userid")[0].firstChild.data;
	   var feeling=employee.getElementsByTagName("feeling")[0].firstChild.data;
	      feedbackStr+="<div class=\"item\">";
          feedbackStr+="<div class=\"user cursor_hand\" onClick=\"javascript:hide('show_hide_content";
          feedbackStr+=messageid+"');swap('show_hide_title";
          feedbackStr+=messageid+"','className','up','down');\" style=\"background-image:url()\">";//表情符号
          feedbackStr+="<div class=\"up\" id=show_hide_title"+messageid+">";
          feedbackStr+=username+"</div></div>";
          feedbackStr+="<div id=show_hide_content"+messageid+">";
          feedbackStr+="<div class=time>";
          if(blogCookie==blogid){
          feedbackStr+="<a href=\"javascript:;\" onclick=\"gb_reply("+messageid+");\" title=\"回复此留言\"><img src=\"http://blog.china.com/images/icon_reply.gif\" width=\"14\" height=\"15\" hspace=\"5\" border=\"0\" /></a>";
          feedbackStr+="<a href=\"javascript:;\" onclick=\"deleWarning("+messageid+","+blogid+")\" title=\"删除此留言\"><img src=\"http://blog.china.com/images/icon_delete.gif\" width=\"12\" height=\"14\" hspace=\"5\" border=\"0\" /></a>";
          }
          feedbackStr+="&nbsp;&nbsp;"
          feedbackStr+=createtime;
          feedbackStr+="</div>";
          feedbackStr+="<div class=txt>";
          feedbackStr+=content;
          if(submessage.length>0){
           for(var j=0;j<submessage.length;j++) {
          var subemp=submessage[j];
          var submessageid=subemp.getElementsByTagName("messageids")[0].firstChild.data;
          var subusername=subemp.getElementsByTagName("usernames")[0].firstChild.data;
          var subuserid=subemp.getElementsByTagName("userids")[0].firstChild.data;
          var subparentid=subemp.getElementsByTagName("parentids")[0].firstChild.data;
          var subcontent=subemp.getElementsByTagName("contents")[0].firstChild.data;
          var subcreatetime=subemp.getElementsByTagName("createtimes")[0].firstChild.data;
          feedbackStr+="<hr size=\"1\" noshade=\"noshade\" /><a href=\"javascript:;\">"+subusername+"</a>于"+subcreatetime+"回复：<br/>";
          feedbackStr+="<div class=\"gbookReplyWin\" id=\"gb_id_"+subparentid+"\" style=\"display:\">";
          feedbackStr+=subcontent;
          feedbackStr+="</div>";
		  feedbackStr+="<div class=\"gbookReplyWin\" style=\"display:none\" id=\"gb_in_"+subparentid+"\">";
          feedbackStr+="<textarea cols=\"40\" rows=\"4\" wrap=\"VIRTUAL\" maxlength=\"500\" id=\"gb_c_"+subparentid+"\">"+subcontent+"</textarea>";
	　     feedbackStr+="<a href=\"javascript:;\" onclick=\"send("+submessageid+","+subparentid+","+blogid+")\">回复</a> <a href=\"javascript:;\" onclick=\"cancel("+subparentid+")\">取消</a>";
          feedbackStr+="</div>";
             }
          }else{
          feedbackStr+="<div class=\"gbookReplyWin\" id=\"gb_id_"+messageid+"\" style=\"display:\"></div>";
		  feedbackStr+="<div class=\"gbookReplyWin\" style=\"display:none\" id=\"gb_in_"+messageid+"\">";
          feedbackStr+="<textarea cols=\"40\" rows=\"4\" wrap=\"VIRTUAL\" maxlength=\"500\" id=\"gb_c_"+messageid+"\"></textarea>";
	　     feedbackStr+="<a href=\"javascript:;\" onclick=\"send('',"+messageid+","+blogid+")\">回复</a> <a href=\"javascript:;\" onclick=\"cancel("+messageid+")\">取消</a>";
          feedbackStr+="</div>";
          }
          feedbackStr+="</div></div></div>";
       }
         var tmpary=new Array();
	     if(name!=""){
	      tmpary=name.split("_");
	     for(i=0;i<tmpary.length;i++){
	      startpage=tmpary[0];
	      uppage=tmpary[1];
	      nextpage=tmpary[2];
	      endpage=tmpary[3];
	     }
        feedbackStr+="<div id=pages>";
        feedbackStr+=startpage+"页/"+endpage+"页&nbsp;";
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck(1,"+blogid+");\">首页</a>&nbsp;";
        if(startpage!="1"){
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck("+uppage+","+blogid+");\">上一页&nbsp;</a>";
        }if(startpage!=endpage){
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck("+nextpage+","+blogid+");\">下一页&nbsp;</a>";
        }
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck("+endpage+","+blogid+");\">末页</a></div>";
       }
        feedbackStr+="<div class=post>";
        feedbackStr+="<form id=\"form1\" name=\"form1\" method=\"post\" action=\"#\">";
        feedbackStr+="<input name=\"blogid\" value=\""+blogid+"\" type=\"hidden\"/>";
        feedbackStr+="<input name=\"feeling\" value=1 type=\"hidden\"/>";
        feedbackStr+="<div class=\"title\">给我留言</div>";
        feedbackStr+="<table width=\"90%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";
        feedbackStr+="<tr><td width=\"50\">验证码：</td>";
        feedbackStr+="<td><input type=\"text\" name=\"rand\"/>";
        feedbackStr+="&nbsp;图案：<img src=\"/image.jsp\" width=\"51\" height=\"16\" align=\"absmiddle\" />&nbsp;&nbsp;";
        feedbackStr+="<input type=\"checkbox\" name=\"isprivate\" value=\"1\" id=\"checkbox\" style=\"border:none;\" ";
        if(isprivate == '1')
          {feedbackStr+="checked";}//恢复留言的话，也恢复留言的属性，悄悄话
        feedbackStr+=" />";        
        feedbackStr+="<label for=\"checkbox\">悄悄话方式</label></td>";
        feedbackStr+="</tr><tr><td>内&nbsp;&nbsp;容：</td><td><div><textarea name=\"content\">"+newmessage+"</textarea></div></td></tr>";
        feedbackStr+="<tr><td>表&nbsp;&nbsp;情：</td>"; //加入表情符号
        feedbackStr+="<td class=\"feelingReturn\">";        
        for(var i = 1; i <= 32; i++){
        	feedbackStr+="<div><img src=\"http://blog.china.com/images_feeling/"+i+".gif\" onclick=\"ubbTag('content', '[em"+i+"]')\"/></div>";
        }
        feedbackStr+="</td></tr>"; 
        feedbackStr+="<tr><td>&nbsp;</td><td>"; 
        feedbackStr+="<input name=\"Submit\" type=\"button\" class=\"submit\" value=\"发表留言\" onclick=\"return submitform('"+blogid+"');\"/>";
        feedbackStr+="</td></tr></table></form></div></div>";
        mdiv.innerHTML=feedbackStr;
        //}//解析XML文件
     }

   function processMessage(){
      var xmlobj=http_request.responseXML;
	  var messageElement=xmlobj.getElementsByTagName("messages");
	  var randElement=xmlobj.getElementsByTagName("rands");
	  var blogCookie=getCookies("blogid");
	  var startpage;var uppage;var nextpage;var endpage;var name="";
	  if(randElement.length=="1"){
	    var employee=randElement[0];
	    var message=employee.getElementsByTagName("rand")[0].firstChild.data;
	    var blogids=employee.getElementsByTagName("blogid")[0].firstChild.data;
	    if("notlogon"==message){
	       alert("你还没登录，不能发留言");
	       userCheck(1,blogids);
	       }
	     else if("notequle"==message){
	       alert("验证码错误！");
	       userCheck(1,blogids);
	       }
	     else if("forbidden"==message){
	      alert("留言有禁词！");
	      userCheck(1,blogids);
	     }
	     else if("forbiddenip"==message){
	      alert("没有权限");
	      userCheck(1,blogids);
	     }
	     
	  }else{
	  var blogElement=xmlobj.getElementsByTagName("blogids");
	  var blogid=blogElement[0].getElementsByTagName("blogid")[0].firstChild.data;
	  var mdiv = document.getElementById("thread");
	  var feedbackStr="<div class=\"gbook\"><div class=\"title\">我的留言本</div>";
	  for(var i=0;i<messageElement.length;i++) { // 循环读取employees.xml的内容
	   var employee=messageElement[i];
	   name=employee.getAttribute("name");
	  var submessage=employee.getElementsByTagName("submessages");
	   var messageid=employee.getElementsByTagName("messageid")[0].firstChild.data;
	   var username=employee.getElementsByTagName("username")[0].firstChild.data;
	   var content=unescape(employee.getElementsByTagName("content")[0].firstChild.data);
	   var createtime=employee.getElementsByTagName("createtime")[0].firstChild.data;
	   var userid=employee.getElementsByTagName("userid")[0].firstChild.data;
	      feedbackStr+="<div class=\"item\">";
          feedbackStr+="<div class=\"user cursor_hand\" onClick=javascript:hide('show_hide_content";
          feedbackStr+=messageid+"');swap('show_hide_title";
          feedbackStr+=messageid+"','className','up','down');>";
          feedbackStr+="<div class=\"up\" id=show_hide_title"+messageid+">";
          feedbackStr+=username+"</div></div>";
          feedbackStr+="<div id=show_hide_content"+messageid+">";
          feedbackStr+="<div class=time>";
          if(blogCookie==blogid){
          feedbackStr+="<a href=\"javascript:;\" onclick=\"gb_reply("+messageid+");\" title=\"回复此留言\"><img src=\"http://blog.china.com/images/icon_reply.gif\" width=\"14\" height=\"15\" hspace=\"5\" border=\"0\" /></a>";
          feedbackStr+="<a href=\"javascript:;\" onclick=\"deleWarning("+messageid+","+blogid+")\" title=\"删除此留言\"><img src=\"http://blog.china.com/images/icon_delete.gif\" width=\"12\" height=\"14\" hspace=\"5\" border=\"0\" /></a>";
          }
          feedbackStr+="&nbsp;&nbsp;"
          feedbackStr+=createtime;
          feedbackStr+="</div>";
          feedbackStr+="<div class=txt>";
          feedbackStr+=content;
          if(submessage.length>0){
           for(var j=0;j<submessage.length;j++) {
          var subemp=submessage[j];
          var submessageid=subemp.getElementsByTagName("messageids")[0].firstChild.data;
          var subusername=subemp.getElementsByTagName("usernames")[0].firstChild.data;
          var subuserid=subemp.getElementsByTagName("userids")[0].firstChild.data;
          var subparentid=subemp.getElementsByTagName("parentids")[0].firstChild.data;
          var subcontent=subemp.getElementsByTagName("contents")[0].firstChild.data;
          var subcreatetime=subemp.getElementsByTagName("createtimes")[0].firstChild.data;
          feedbackStr+="<hr size=\"1\" noshade=\"noshade\" /><a href=\"javascript:;\">"+subusername+"</a>于"+subcreatetime+"回复：<br/>";
          feedbackStr+="<div class=\"gbookReplyWin\" id=\"gb_id_"+subparentid+"\" style=\"display:\">";
          feedbackStr+=subcontent;
          feedbackStr+="</div>";
		  feedbackStr+="<div class=\"gbookReplyWin\" style=\"display:none\" id=\"gb_in_"+subparentid+"\">";
          feedbackStr+="<textarea cols=\"40\" rows=\"4\" wrap=\"VIRTUAL\" maxlength=\"500\" id=\"gb_c_"+subparentid+"\">"+subcontent+"</textarea>";
	　     feedbackStr+="<a href=\"javascript:;\" onclick=\"send("+submessageid+","+subparentid+","+blogid+")\">回复</a> <a href=\"javascript:;\" onclick=\"cancel("+subparentid+")\">取消</a>";
          feedbackStr+="</div>";
             }
          }else{
          feedbackStr+="<div class=\"gbookReplyWin\" id=\"gb_id_"+messageid+"\" style=\"display:\"></div>";
		  feedbackStr+="<div class=\"gbookReplyWin\" style=\"display:none\" id=\"gb_in_"+messageid+"\">";
          feedbackStr+="<textarea cols=\"40\" rows=\"4\" wrap=\"VIRTUAL\" maxlength=\"500\" id=\"gb_c_"+messageid+"\"></textarea>";
	　     feedbackStr+="<a href=\"javascript:;\" onclick=\"send('',"+messageid+","+blogid+")\">回复</a> <a href=\"javascript:;\" onclick=\"cancel("+messageid+")\">取消</a>";
          feedbackStr+="</div>";
          }
          feedbackStr+="</div></div></div>";
       }
         var tmpary=new Array();
	     if(name!=""){
	      tmpary=name.split("_");
	     for(i=0;i<tmpary.length;i++){
	      startpage=tmpary[0];
	      uppage=tmpary[1];
	      nextpage=tmpary[2];
	      endpage=tmpary[3];
	     }
        feedbackStr+="<div id=pages>";
        feedbackStr+=startpage+"页/"+endpage+"页&nbsp;";
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck(1,"+blogid+");\">首页</a>&nbsp;";
        if(startpage!="1"){
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck("+uppage+","+blogid+");\">上一页&nbsp;</a>";
        }if(startpage!=endpage){
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck("+nextpage+","+blogid+");\">下一页&nbsp;</a>";
        }
        feedbackStr+="<a href=\"javascript:;\" onclick=\"return userCheck("+endpage+","+blogid+");\">末页</a></div>";
       }
        feedbackStr+="<div class=post>";
        feedbackStr+="<form id=\"form1\" name=\"form1\" method=\"post\" action=\"#\">";
        feedbackStr+="<input name=\"blogid\" value=\""+blogid+"\" type=\"hidden\"/>";
        feedbackStr+="<div class=\"title\">给我留言</div>";
        feedbackStr+="<table width=\"90%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";
        feedbackStr+="<tr><td width=\"50\">验证码：</td>";
        feedbackStr+="<td><input type=\"text\" name=\"rand\"/>";
        feedbackStr+="&nbsp;图案：<img src=\"/image.jsp\" width=\"51\" height=\"16\" align=\"absmiddle\" />&nbsp;&nbsp;";
        feedbackStr+="<input type=\"checkbox\" name=\"isprivate\" value=\"1\" id=\"checkbox\" style=\"border:none;\" />";
        feedbackStr+="<label for=\"checkbox\">悄悄话方式</label></td>";
        feedbackStr+="</tr><tr><td>内　容：</td><td><textarea name=\"content\"></textarea></td>";
        feedbackStr+="</tr><tr><td>&nbsp;</td><td>";
        feedbackStr+="<input name=\"Submit\" type=\"button\" class=\"submit\" value=\"发表留言\" onclick=\"return submitform('"+blogid+"');\"/>";
        feedbackStr+="</td></tr></table></form></div></div>";
        mdiv.innerHTML=feedbackStr;
        }
     }