			var x;				
			function cx()
			{
				if(window.ActiveXObject)
				{
					x=new ActiveXObject("Microsoft.XMLHTTP");
				}
				else if(window.XMLHttpRequest)
				{
					x=new XMLHttpRequest();
					x.overrideMimeType("text/xml");
				}
				else if(Msxml2.ActiveXObject)
				{
					x=new ActiveXObject("Msxml2.XMLHTTP");
				}
			}
			
			function AddCommit(id)
			{							
				var content=document.getElementById("textarea").value;
				var userName=document.getElementById("txtName").value;
				var email=document.getElementById("txtEmail").value;
				if(id==0)
				{
					alert("对不起！非法访问被拒绝。");
				}
				else if(content==""||content=="请输入评论内容！")
				{
					alert("对不起！请输入评论内容。");
				}
				else if(email=="")
				{
					alert("对不起！请输入您的email。");
				}
				else
				{
					DoStart(id,content,userName,email);	
				}		
			}

			function DoStart(id,content,userName,email)
			{
			    if (x == null)
			    {
			        cx();
			    }
				pollServer(id,content,userName,email);				
			}
			
			function startCallback()
			{
				if(x.readyState==4)
				{
					if(x.status==200)
					{
						var result=new String(x.responseText);
						if(result.length>0)
						{
							alert(result);
							document.getElementById("textarea").value="";
							document.getElementById("txtName").value="";
							document.getElementById("txtEmail").value="";
						}
					}
				}
			}
			
			function pollServer(id,content,userName,email)
			{
				var url="/refurbish/addcomment.aspx?timeSpan="+new Date().getTime();
				var sendContent="id="+id+"&content="+escape(content)+"&userName="+escape(userName)+"&email="+email;
				x.open("post",url,true);
				x.onreadystatechange=startCallback;
				x.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
				x.send(sendContent);
			}
			
			function setPrint()
			{
				WB.ExecWB(8,1);
			}
			function previewPrint()
			{
				WB.ExecWB(7,1);
			}
			function fontZoom(size)
			{
				document.getElementById("content").style.fontSize=size+"px";
			}

			function Insert()
			{
			    document.getElementById("insert").innerHTML = "<div align=center id=\"first\"><iframe marginWidth=0 marginHeight=0 src=\"/iframe/first.htm\" frameBorder=no width=356 scrolling=no height=300></iframe></div><div id=\"second\"><iframe marginWidth=0 marginHeight=0 src=\"/iframe/second.htm\" frameBorder=0 width=360 scrolling=no height=50></iframe></div>";
			}