function ppcCountStateChanged() 
{ 
    if (searchPPCCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblPPCDownloadCount").innerHTML = "<b>" + searchPPCCountXmlHttp.responseText + "</b>";
    }
}

function spCountStateChanged() 
{ 
    if (searchSPCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblSPDownloadCount").innerHTML = "<b>" + searchSPCountXmlHttp.responseText + "</b>";
    }
}

function chardictCountStateChanged() 
{ 
    if (searchCharDictCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblCharDictDownloadCount").innerHTML = "<b>" + searchCharDictCountXmlHttp.responseText + "</b>";
    }
}

function worddictCountStateChanged() 
{ 
    if (searchWordDictCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblWordDictDownloadCount").innerHTML = "<b>" + searchWordDictCountXmlHttp.responseText + "</b>";
    }
}

function pinyindictCountStateChanged() 
{ 
    if (searchPinYinDictCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblPinYinDictDownloadCount").innerHTML = "<b>" + searchPinYinDictCountXmlHttp.responseText + "</b>";
    }
}

function soccerdictCountStateChanged() 
{ 
    if (searchSoccerDictCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblSoccerDictDownloadCount").innerHTML = "<b>" + searchSoccerDictCountXmlHttp.responseText + "</b>";
    }
}

function pthworddictCountStateChanged() 
{ 
    if (searchPTHWordDictCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblPTHWordDictDownloadCount").innerHTML = "<b>" + searchPTHWordDictCountXmlHttp.responseText + "</b>";
    }
}

function totalSearchCountStateChanged() 
{ 
    if (totalSearchCountXmlHttp.readyState == 4)
    {
        document.getElementById("lblTotalSearchCount").innerHTML = "<b>" + totalSearchCountXmlHttp.responseText + "</b>";
    }
}

function totalRecordStateChanged() 
{ 
    if (totalRecordXmlHttp.readyState == 4)
    {
        document.getElementById("lblTotalRecord").innerHTML = "<b>" + totalRecordXmlHttp.responseText + "</b>";
    }
}

function chardictRecordStateChanged() 
{ 
    if (searchCharDictRecordXmlHttp.readyState == 4)
    {
        document.getElementById("lblCharDictDownloadCount").innerHTML = "<b>" + searchCharDictRecordXmlHttp.responseText + "</b>";
    }
}

function worddictRecordStateChanged() 
{ 
    if (searchWordDictRecordXmlHttp.readyState == 4)
    {
        document.getElementById("lblWordDictDownloadCount").innerHTML = "<b>" + searchWordDictRecordXmlHttp.responseText + "</b>";
    }
}

function phrasedictRecordStateChanged() 
{ 
    if (searchPhraseDictRecordXmlHttp.readyState == 4)
    {
        document.getElementById("lblPhraseDictDownloadCount").innerHTML = "<b>" + searchPhraseDictRecordXmlHttp.responseText + "</b>";
    }
}

function pinyindictRecordStateChanged() 
{ 
    if (searchPinYinDictRecordXmlHttp.readyState == 4)
    {
        document.getElementById("lblPinYinDictDownloadCount").innerHTML = "<b>" + searchPinYinDictRecordXmlHttp.responseText + "</b>";
    }
}

function pthworddictRecordStateChanged() 
{ 
    if (searchPTHWordDictRecordXmlHttp.readyState == 4)
    {
        document.getElementById("lblPTHWordDictDownloadCount").innerHTML = "<b>" + searchPTHWordDictRecordXmlHttp.responseText + "</b>";
    }
}

function soccerdictRecordStateChanged() 
{ 
    if (searchSoccerDictRecordXmlHttp.readyState == 4)
    {
        document.getElementById("lblSoccerDictDownloadCount").innerHTML = "<b>" + searchSoccerDictRecordXmlHttp.responseText + "</b>";
    }
}

function ShowPTHDictDownloadCount()
{
	searchPPCCountXmlHttp = GetXmlHttpObject();
	searchSPCountXmlHttp = GetXmlHttpObject();
	
	var url = "agent/statagent.php";
    var postContent = "fileCode=pthdict_ppc";
    searchPPCCountXmlHttp.onreadystatechange = ppcCountStateChanged;
    searchPPCCountXmlHttp.open("POST", url, true);
	searchPPCCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchPPCCountXmlHttp.send(postContent);
	
	postContent = "fileCode=pthdict_sp";
	searchSPCountXmlHttp.onreadystatechange = spCountStateChanged;
    searchSPCountXmlHttp.open("POST", url, true);
	searchSPCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchSPCountXmlHttp.send(postContent);
}

function ShowDictDownloadCount()
{
	searchCharDictCountXmlHttp = GetXmlHttpObject();
	searchWordDictCountXmlHttp = GetXmlHttpObject();
	searchPinYinDictCountXmlHttp = GetXmlHttpObject();
	searchSoccerDictCountXmlHttp = GetXmlHttpObject();
	searchPTHWordDictCountXmlHttp = GetXmlHttpObject();
	
	var url = "agent/statagent.php";
    var postContent = "fileCode=chardict";
    searchCharDictCountXmlHttp.onreadystatechange = chardictCountStateChanged;
    searchCharDictCountXmlHttp.open("POST", url, true);
	searchCharDictCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchCharDictCountXmlHttp.send(postContent);
	
	postContent = "fileCode=worddict";
	searchWordDictCountXmlHttp.onreadystatechange = worddictCountStateChanged;
    searchWordDictCountXmlHttp.open("POST", url, true);
	searchWordDictCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchWordDictCountXmlHttp.send(postContent);
	
	postContent = "fileCode=pinyindict";
	searchPinYinDictCountXmlHttp.onreadystatechange = pinyindictCountStateChanged;
    searchPinYinDictCountXmlHttp.open("POST", url, true);
	searchPinYinDictCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchPinYinDictCountXmlHttp.send(postContent);
	
	postContent = "fileCode=soccerdict";
	searchSoccerDictCountXmlHttp.onreadystatechange = soccerdictCountStateChanged;
    searchSoccerDictCountXmlHttp.open("POST", url, true);
	searchSoccerDictCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchSoccerDictCountXmlHttp.send(postContent);
	
	postContent = "fileCode=pthworddict";
	searchPTHWordDictCountXmlHttp.onreadystatechange = pthworddictCountStateChanged;
    searchPTHWordDictCountXmlHttp.open("POST", url, true);
	searchPTHWordDictCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchPTHWordDictCountXmlHttp.send(postContent);
}

function ShowAllRecordNumber()
{
	//ShowCharDictRecord();
	//ShowWordDictRecord();
	//ShowPhraseDictRecord();
	//ShowPinYinDictRecord();
	//ShowPTHWordDictRecord();
	//ShowSoccerDictRecord();
	//ShowTotalRecord();
}

function ShowTotalSearchCount()
{
	totalSearchCountXmlHttp = GetXmlHttpObject();
	
	var url = "agent/statagent.php";
    var postContent = "totalSearch=true";
    totalSearchCountXmlHttp.onreadystatechange = totalSearchCountStateChanged;
    totalSearchCountXmlHttp.open("POST", url, true);
	totalSearchCountXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	totalSearchCountXmlHttp.send(postContent);
}

function ShowTotalRecord()
{
	totalRecordXmlHttp = GetXmlHttpObject();
	
	var url = "agent/statagent.php";
    var postContent = "totalRecord=true";
    totalRecordXmlHttp.onreadystatechange = totalRecordStateChanged;
    totalRecordXmlHttp.open("POST", url, true);
	totalRecordXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	totalRecordXmlHttp.send(postContent);
}

function ShowCharDictRecord()
{
	searchCharDictRecordXmlHttp = GetXmlHttpObject();

	var url = "agent/statagent.php";
	var postContent = "dictname=chardict";
	searchCharDictRecordXmlHttp.onreadystatechange = chardictRecordStateChanged;
	searchCharDictRecordXmlHttp.open("POST", url, true);
	searchCharDictRecordXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchCharDictRecordXmlHttp.send(postContent);
}

function ShowWordDictRecord()
{
	searchWordDictRecordXmlHttp = GetXmlHttpObject();

	var url = "agent/statagent.php";
	var postContent = "dictname=worddict";
	searchWordDictRecordXmlHttp.onreadystatechange = worddictRecordStateChanged;
	searchWordDictRecordXmlHttp.open("POST", url, true);
	searchWordDictRecordXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchWordDictRecordXmlHttp.send(postContent);
}

function ShowPhraseDictRecord()
{
	searchPhraseDictRecordXmlHttp = GetXmlHttpObject();

	var url = "agent/statagent.php";
	var postContent = "dictname=phrasedict";
	searchPhraseDictRecordXmlHttp.onreadystatechange = phrasedictRecordStateChanged;
	searchPhraseDictRecordXmlHttp.open("POST", url, true);
	searchPhraseDictRecordXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchPhraseDictRecordXmlHttp.send(postContent);
}

function ShowPinYinDictRecord()
{
	searchPinYinDictRecordXmlHttp = GetXmlHttpObject();

	var url = "agent/statagent.php";
	var postContent = "dictname=charinpinyin";
	searchPinYinDictRecordXmlHttp.onreadystatechange = pinyindictRecordStateChanged;
	searchPinYinDictRecordXmlHttp.open("POST", url, true);
	searchPinYinDictRecordXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchPinYinDictRecordXmlHttp.send(postContent);
}

function ShowPTHWordDictRecord()
{
	searchPTHWordDictRecordXmlHttp = GetXmlHttpObject();

	var url = "agent/statagent.php";
	var postContent = "dictname=pthworddict";
	searchPTHWordDictRecordXmlHttp.onreadystatechange = pthworddictRecordStateChanged;
	searchPTHWordDictRecordXmlHttp.open("POST", url, true);
	searchPTHWordDictRecordXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchPTHWordDictRecordXmlHttp.send(postContent);
}

function ShowSoccerDictRecord()
{
	searchSoccerDictRecordXmlHttp = GetXmlHttpObject();

	var url = "agent/statagent.php";
	var postContent = "dictname=soccerdict";
	searchSoccerDictRecordXmlHttp.onreadystatechange = soccerdictRecordStateChanged;
	searchSoccerDictRecordXmlHttp.open("POST", url, true);
	searchSoccerDictRecordXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	searchSoccerDictRecordXmlHttp.send(postContent);
}