

var addtbl="<form id=addfm ><b>请输入您的解释&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b><a href=javascript:fdadd_close()>[关闭]</a><br>词条：<input name=fgid type=text  size=1 readonly id=fgid value=0><span id=fdtext ></span><br><textarea name=newdata id=newdata></textarea><br><center><input type=button value='确定' onclick='uploadinfo()'></center></form>";
document.write("<div id=addtbl></div>");


function dicadd(n,s)
{
 $("addtbl").innerHTML= addtbl;
   
 $("addtbl").style.display="block";

$("fgid").value=n;
$("fdtext").innerHTML=s;
}

function fdadd_close()
{

 //$("addfm").reset();
 $("addtbl").style.display="none";
}

function uploadinfo()
{
//-------------------------


 var req=  "fgid=" +$("fgid").value  +  "&newdata="  +   $('newdata').value;

// alert(req);


try 
	{    
		tmpuse_xmlhttp = new ActiveXObject("Msxml2.xmlhttp");   
	} 
	catch (e)
	{   
		try 
		{     
			tmpuse_xmlhttp = new ActiveXObject("Microsoft.xmlhttp");    
		}

		catch (e) 
		{     
			tmpuse_xmlhttp = false;    
		} 
	}  

	if (!tmpuse_xmlhttp && typeof tmpuse_xmlhttpRequest!='undefined') 
	{       
		try 
		{           
			tmpuse_xmlhttp = new tmpuse_xmlhttpRequest();       
		}
	 	catch (e) 
		{           
			tmpuse_xmlhttp=false;       
		}   
	} 
   if (!tmpuse_xmlhttp && window.createRequest) 
   {     
     	try 
		{           
			tmpuse_xmlhttp = window.createRequest();       
		} 
	 	catch (e) 
		{           
			tmpuse_xmlhttp=false;       
		}  
	}   


 tmpuse_xmlhttp.open("POST", "dddicadd.php",true);
tmpuse_xmlhttp.onreadystatechange=function() 
	{	
		if (tmpuse_xmlhttp.readyState==4) 
		{
			$("addtbl").innerHTML= tmpuse_xmlhttp.responseText;
		}
	}
tmpuse_xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
tmpuse_xmlhttp.send(req);

//----------------------------

}
