﻿function DisplayClientInfo()
{
	if (DownLoadData.length > 0)
	{
		var data = '';
		data = getDownHTML(DownLoadData[0]);
		document.getElementById('divPub1').innerHTML = data;
	}
}
function getDownHTML(item)
{
	var version = item[2];
	var size = item[1];
	var pdate = item[0];
	var html = "";
	html="<span class='title1'>"+version+"</span><br /><span class='title2'>"+size+"</span><br /><span class='title3'>"+pdate+"</span>";
	return html;
}
function DisplayClientDowload()
{
	if (DownLoadData.length > 0)
	{
		var downloader = DownLoadData[0][6];
		var bt = DownLoadData[0][3];
		var telecom = DownLoadData[0][4]
		var CNC = DownLoadData[0][5]
		var downloaderDIV = document.getElementById('clientDownloader');
		var btDIV = document.getElementById('clientDownloadBT');
		var telecomDIV = document.getElementById('clientDownloadTelecom');
		var CNCDIV = document.getElementById('clientDownloadCNC');
		if(downloader != ''&& downloaderDIV != null)
		    downloaderDIV.href = downloader;
        else
            downloaderDIV.style.display="none";
		if(bt != ''&& btDIV != null)
		    btDIV.href = bt;
        else
            btDIV.style.display = 'none';
		
		if(telecom != ''&& telecomDIV != null)
		    telecomDIV.href = telecom;
        else
            telecomDIV.style.display = 'none';
            
		if(CNC != ''&& CNCDIV != null)
		    CNCDIV.href = CNC;
        else
            CNCDIV.style.display = 'none';
	}
}
function GetPathHTML(num)
{
    var patchdata=DownLoadData[1];
    var count=patchdata.length;
    if(num>count)
        num=count;
    var html="";
    document.getElementById("spLast").innerHTML=patchdata[count-1][2];
    for(var i=1;i<=num;i++)
    {
        html+="<li>"+patchdata[count-i][2]+"</li>";
        html+="<li>"+patchdata[count-i][3]+"</li>";
        html+="<li>"+patchdata[count-i][1]+"</li>";
        var patchArray = patchdata[count - i][4].toString().split("|");
        var telecom = patchArray[0];
        html += "<li><a href='" + telecom + "' target='_blank'>本地下载</a></li>";
    }
    return html;
}
