﻿// JScript 文件

function getArticles(columnID, top, params)
{
    var dom = new ActiveXObject("Microsoft.XMLDOM"), uri = "GetArticles.aspx?columnID=" + columnID + "&top=" + top;
    dom.async = false;
    if(params != null) uri += "&" + params;
    dom.load(uri);
    
    return dom;
}

function getVotes(top)
{
    var dom = new ActiveXObject("Microsoft.XMLDOM");
    dom.async = false;
    dom.load("/getVotes.aspx?top=" + top);
    
    return dom;
}

function getDepartments(type, top)
{
    var dom = new ActiveXObject("Microsoft.XMLDOM");
    dom.async = false;
    dom.load("GetDepartments.aspx?type=" + type + "&top=" + top);
    
    return dom;
}

function showArticles(dom, wordCount, color)
{
    var doc, str = "";
    if(color != null) color = " style='color:" + color + ";'"
    else color = "";
    doc = dom.selectNodes("root/article");
    str += "<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
    for(var i = 0; i < doc.length; i++)
    {
        var headline = "", subheadline = "", generatedTime = "", uri = "", shortHeadline, filename = "";
        if(doc[i].selectSingleNode("headline") != null) headline = shortHeadline = doc[i].selectSingleNode("headline").text;
        if(doc[i].selectSingleNode("subheadline") != null) subheadline = doc[i].selectSingleNode("subheadline").text;
        if(doc[i].selectSingleNode("generatedTime") != null) generatedTime = doc[i].selectSingleNode("generatedTime").text;
        if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
        if(doc[i].selectSingleNode("filename") != null) filename = doc[i].selectSingleNode("filename").text;
        if(doc[i].selectSingleNode("uri") != null && doc[i].selectSingleNode("uri").text != "") uri = doc[i].selectSingleNode("uri").text;
        
        if(shortHeadline.length > wordCount) shortHeadline = headline.substr(0, wordCount - 1) + "..";
        
        str += "<tr height='24'>"
            + "<td class='h12'>"
            + "· <a href='" + uri + "' target='_blank' title='" + headline.replace(new RegExp("'", "g"), "&acute;") + "' class='h12'" + color + ">" + shortHeadline + "<a>"
            + "</td>"
            + "<td class='h12' style='" + color + "'>"
            + "(" + generatedTime.substr(5, generatedTime.indexOf(" ") - 5) + ")"
            + "</td>"
            + "</tr>"
            ;
    }
    str += "</table>";
    
    return str;
}

function showVotes(dom, wordCount)
{
    var doc = dom.selectNodes("root/vote"), str = "";
    for(var i = 0; i < doc.length; i++)
    {
        var title = "", sTitle, id = "";
        if(doc[i].selectSingleNode("title") != null) title = sTitle = doc[i].selectSingleNode("title").text;
        if(doc[i].selectSingleNode("id") != null) id = doc[i].selectSingleNode("id").text;
        
        if(title.length > wordCount) sTitle = title.substr(0, wordCount - 1) + "..";
        
        str += "<div>· <a href='wsdc.shtml?id=" + id + "' target='_blank' title='" + title.replace(new RegExp("'", "g"), "&acute;") + "'>" + sTitle + "</a></div>";
    }
    
    return str;
}

function showArticles_pic(dom, wordCount, width, height)
{
    var doc = dom.selectNodes("root/article"), imgUrl, imgLink, imgText;
    if(doc.length == 1)
    {
        var filename = doc[0].selectSingleNode("images").text.split(",");
        imgUrl = doc[0].selectSingleNode("@uri").text;
        imgUrl = imgUrl.substr(0, imgUrl.lastIndexOf("/") + 1) + "Images/" + filename[0];
        imgLink = doc[0].selectSingleNode("@uri").text;
        if(doc[0].selectSingleNode("uri") != null && doc[0].selectSingleNode("uri").text != "") imgLink = doc[0].selectSingleNode("uri").text;
        imgText = doc[0].selectSingleNode("headline").text;
        if(imgText.length > wordCount) imgText = imgText.substr(0, wordCount - 1) + "..";
    }
    else if(doc.length > 1)
    {
        imgUrl = new Array(), imgLink = new Array(), imgText = new Array();
        for(var i = 0; i < doc.length; i++)
        {
            var filename = doc[i].selectSingleNode("images").text.split(",");
            imgUrl[i] = doc[i].selectSingleNode("@uri").text;
            imgUrl[i] = imgUrl[i].substr(0, imgUrl[i].lastIndexOf("/") + 1) + "Images/" + filename[0];
            imgLink[i] = doc[i].selectSingleNode("@uri").text;
            if(doc[i].selectSingleNode("uri") != null && doc[i].selectSingleNode("uri").text != "") imgLink[i] = doc[i].selectSingleNode("uri").text;
            imgText[i] = doc[i].selectSingleNode("headline").text;
            if(imgText[i].length > wordCount) imgText[i] = imgText[i].substr(0, wordCount - 1) + "..";
        }
    }
    else
    {
        imgUrl = "";
        imgLink = "";
        imgText = "";
    }
    
	var pics = "", links = "", texts = "";
	if(typeof(imgUrl) == "object")
	{
		for(var i = 0; i < imgUrl.length; i++)
		{
			pics += pics == "" ? imgUrl[i] : "|" + imgUrl[i];
			links += links == "" ? escape(imgLink[i]) : "|" + escape(imgLink[i]);
			texts += texts == "" ? imgText[i] : "|" + imgText[i];
		}
	}
	else
	{
		pics = imgUrl;
		links = escape(imgLink);
		texts = imgText;
	}
	
	var focus_width = width; //图片高度
	var focus_height = height - 20; //图片宽度
	var text_height = 20; //文字解释高度
	var swf_height = focus_height + text_height;

	var str = "";
	str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + focus_width + '" height="' + swf_height + '">'
		+ '<param name="allowScriptAccess" value="sameDomain">'
		+ '<param name="movie" value="images/pic_news.swf">'
		+ '<param name="quality" value="high">'
		+ '<param name="bgcolor" value="#F0F0F0">'
		+ '<param name="menu" value="false">'
		+ '<param name=wmode value="opaque">'
		+ '<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">'
		+ '<embed src="images/pic_news.swf" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="#F0F0F0" quality="high" width="' + focus_width + '" height="' + focus_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
		+ '</object>'
		;
	return str;
}

function showArticles_jjjs(dom, wordCount)
{
    var doc = dom.selectNodes("root/article"), str = "";
    for(var i = 0; i < doc.length; i++)
    {
        var headline = "", subheadline = "", generatedTime = "", uri = "", shortHeadline, filename = "";
        if(doc[i].selectSingleNode("headline") != null) headline = shortHeadline = doc[i].selectSingleNode("headline").text;
        if(doc[i].selectSingleNode("subheadline") != null) subheadline = doc[i].selectSingleNode("subheadline").text;
        if(doc[i].selectSingleNode("generatedTime") != null) generatedTime = doc[i].selectSingleNode("generatedTime").text;
        if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
        if(doc[i].selectSingleNode("filename") != null) filename = doc[i].selectSingleNode("filename").text;
        if(doc[i].selectSingleNode("uri") != null && doc[i].selectSingleNode("uri").text != "") uri = doc[i].selectSingleNode("uri").text;
        
        if(shortHeadline.length > wordCount) shortHeadline = headline.substr(0, wordCount - 1) + "..";
        if(subheadline.length > wordCount) subheadline = subheadline.substr(0, wordCount - 1) + "..";
        if(subheadline.length > 0) subheadline = "[" + subheadline + "]";
        if(i == 1) wordCount += 5;
        
        if(i == 0)
        {
            str += "<table width='94%'  border='0' align='center' cellpadding='0' cellspacing='0'>"
                + "<tr align='center'>"
                + "<td valign='bottom' class='b18'>"
                + "<a href='" + uri + "' target='_blank' title='" + headline.replace(new RegExp("'", "g"), "&acute;") + "' class='b18'>" + shortHeadline + "<a>"
                + "</td>"
                + "</tr>"
                + "<tr align='center'>"
                + "<td height='20' class='r12'>"
                + "<a href='" + uri + "' target='_blank' title='" + headline.replace(new RegExp("'", "g"), "&acute;") + "' class='r12'>" + subheadline + "<a>"
                + "</td>"
                + "</tr>"
                + "</table>"
                + "<table width='94%'  border='0' align='center' cellpadding='0' cellspacing='0'>"
                + "<tr>"
                + "<td background='images/gg_l_1204_12.jpg' bgcolor='#FFFFFF'><img src='images/gg_l_1204_12.jpg' width='3' height='1'></td>"
                + "</tr>"
                + "</table>"
                + "<table cellpadding='0' cellspacing='0'><tr><td height='8'></td></tr></table>"
                ;
        }
        else
        {
            if(i == 1) str += "<table width='100%'  border='0' cellpadding='0' cellspacing='4'>";
            str += "<tr>"
                + "<td>"
                + "· <a href='" + uri + "' target='_blank' title='" + headline.replace(new RegExp("'", "g"), "&acute;") + "' class='h14' style='font-size:14px;'>" + shortHeadline + "<a>"
                + "</td>"
                + "<td class='h14' style='font-size:14px;'>"
                + "(" + generatedTime.substr(5, generatedTime.indexOf(" ") - 5) + ")"
                + "</td>"
                + "</tr>"
                ;
            if(i + 1 == doc.length) str += "</table>";
        }
    }
    
    return str;
}

function selectColumn(objName, obj)
{
    document.all.zyxx.style.display = "none";
    document.all.gsgg.style.display = "none";
    //document.all.zwzt.style.display = "none";
    document.all.zyxx1.background = "images/gg_l_1204_05_1.jpg";
    document.all.gsgg1.background = "images/gg_l_1204_05_1.jpg";
    //document.all.zwzt1.background = "images/gg_l_1204_05_1.jpg";
    document.all(objName).style.display = "";
    obj.background = "images/gg_l_1204_04.jpg";
}

function showArticles_dw(dom, wordCount, repeat, className)
{
    if(className == null) className = "b12";
    var doc = dom.selectNodes("root/article"), str = "", width = parseInt(100 / repeat);
    str += "<table cellpadding='0', cellspacing='0' width='100%'>";
    for(var i = 0; i < doc.length;)
    {
        str += "<tr>";
        for(var j = 0; j < repeat; j++, i++)
        {
            var link = "";
            if(i < doc.length)
            {
                var headline = "", shortHeadline = "", subheadline = "", uri = "";
                
                if(doc[i].selectSingleNode("headline") != null) headline = shortHeadline = doc[i].selectSingleNode("headline").text;
                if(doc[i].selectSingleNode("subheadline") != null) subheadline = doc[i].selectSingleNode("subheadline").text;
                if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
                if(doc[i].selectSingleNode("uri") != null && doc[i].selectSingleNode("uri").text != "") uri = doc[i].selectSingleNode("uri").text;
                
                if(headline.length > wordCount) shortHeadline = headline.substr(0, wordCount - 1) + "..";
                
                link = "<a href='" + uri + "' target='_blank' title='" + headline.replace(new RegExp("'", "g"), "&acute;") + "' class='" + className + "'>" + shortHeadline + "</a>";
            }
            
            str += "<td width='" + width + "%'>" + link + "</td>";
        }
        str += "</tr>";
    }
    str += "</table>";
    
    return str;
}

function showArticles_gy(dom, wordCount, repeat)
{
    var doc = dom.selectNodes("root/article"), str = "", width = parseInt(100 / repeat);
    str += "<table cellpadding='0', cellspacing='0' width='100%'>";
    for(var i = 0; i < doc.length;)
    {
        str += "<tr align='center'>";
        for(var j = 0; j < repeat; j++, i++)
        {
            var link = "";
            if(i < doc.length)
            {
                var headline = "", shortHeadline = "", subheadline = "", uri = "";
                
                if(doc[i].selectSingleNode("headline") != null) headline = shortHeadline = doc[i].selectSingleNode("headline").text;
                if(doc[i].selectSingleNode("subheadline") != null) subheadline = doc[i].selectSingleNode("subheadline").text;
                if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
                if(doc[i].selectSingleNode("uri") != null && doc[i].selectSingleNode("uri").text != "") uri = doc[i].selectSingleNode("uri").text;
                
                if(headline.length > wordCount) shortHeadline = headline.substr(0, wordCount - 1) + "..";
                
                link = "<table cellpadding='0' cellspacing='0' width='73' height='24'><tr align='center'><td background='images/gg_l_44.jpg'><a href='" + uri + "' target='_blank' title='" + headline.replace(new RegExp("'", "g"), "&acute;") + "' class='b12'>" + shortHeadline + "</a></tr></td></table>";
            }
            
            str += "<td width='" + width + "%'>" + link + "</td>";
        }
        str += "</tr>";
        if(i > 0) str += "<tr style='height:6px;'><td></td></tr>";
    }
    str += "</table>";
    
    return str;
}

function selectMenu(number, obj)
{
    for(var i = 0; i < 11; i++)
    {
        document.all("menu" + i).background = "";
        document.all("menu" + i).style.color = "";
    }
    obj.style.color = "#FFFF00";
}


function chat(number, obj)
{
    for(var i = 1; i < 4; i++)
    {
        document.all("chat" + i).background = "images/gg_l_1204_40.jpg";
        document.all("chat_" + i).style.display = "none";
    }
    document.all("chat_" + number).style.display = "";
    obj.background = "images/gg_l_1204_38.jpg";
}

function ShowEmail(wordCount)
{
    var dome = new ActiveXObject("Microsoft.XMLDOM");
    dome.async = false;
    dome.load("GetEmail.aspx");
    var doc = dome.selectNodes("root/data"), str = "",headtitle="",ssid="",shortHeadline="";
   // alert(doc.length);
    for(var i=0;i< doc.length ;i++)
	{
	
		    if(doc[i].selectSingleNode("title") != null) headtitle = doc[i].selectSingleNode("title").text;
		    if(doc[i].selectSingleNode("id") != null) ssid= doc[i].selectSingleNode("id").text;
		    if(headtitle.length > 0) shortHeadline = headtitle.substr(0, wordCount - 1) + "..";
		    str +="· <a class='b12' href='email.aspx?id="+ssid+"' title='"+headtitle+"' target='_blank'>"+shortHeadline+"</a></br>";
		    
	}
    
    return str;
    
}

function exchangeShow1(objName, obj)    //政府文件与人事信息
{
    document.all("zfwj1").background = "images/gg_l_1204_28.jpg";
    document.all("zfwj1").style.color = '';
    document.all("zfwj2").style.display = 'none';
    document.all("zfwj3").style.display = 'none';
    
    document.all("rsxx1").background = "images/gg_l_1204_28.jpg";
    document.all("rsxx1").style.color = '';
    document.all("rsxx2").style.display = 'none';
    document.all("rsxx3").style.display = 'none';
    
    obj.background = "images/gg_l_1204_27.jpg";
    obj.style.color = "white";
    if(objName == "zfwj")
    {
        document.all("zfwj2").style.display = '';
        document.all("zfwj3").style.display = '';
    }
    else
    {
        document.all("rsxx2").style.display = '';
        document.all("rsxx3").style.display = '';
    }
}

function exchangeShow2(objName, obj)    //投资广元与广元旅游
{
    document.all("tzgy1").background = "images/gg_l_1204_28.jpg";
    document.all("tzgy1").style.color = '';
    document.all("tzgy2").style.display = 'none';
    document.all("tzgy3").style.display = 'none';
    
    document.all("gyly1").background = "images/gg_l_1204_28.jpg";
    document.all("gyly1").style.color = '';
    document.all("gyly2").style.display = 'none';
    document.all("gyly3").style.display = 'none';
    
    obj.background = "images/gg_l_1204_27.jpg";
    obj.style.color = "white";
    if(objName == "tzgy")
    {
        document.all("tzgy2").style.display = '';
        document.all("tzgy3").style.display = '';
    }
    else
    {
        document.all("gyly2").style.display = '';
        document.all("gyly3").style.display = '';
    }
}

function exchangeShow3(objName, obj)    //政务动态和政务专题
{
    document.all("zwdt1").background = "images/gg_l_1204_28.jpg";
    document.all("zwdt1").style.color = '';
    document.all("zwdt2").style.display = 'none';
    document.all("zwdt3").style.display = 'none';
    
    document.all("zwzt11").background = "images/gg_l_1204_28.jpg";
    document.all("zwzt11").style.color = '';
    document.all("zwzt22").style.display = 'none';
    document.all("zwzt33").style.display = 'none';
    
    obj.background = "images/gg_l_1204_27.jpg";
    obj.style.color = "white";
    if(objName == "zwdt")
    {
        document.all("zwdt2").style.display = '';
        document.all("zwdt3").style.display = '';
    }
    else
    {
        document.all("zwzt22").style.display = '';
        document.all("zwzt33").style.display = '';
    }
}

function showArticles_zwzt(dom, wordCount, objName) //政务专题和政务动态共用
{
    var doc = dom.selectNodes("root/article"), str = "";
    for(var i = 0; i < doc.length; i++)
    {
        var headline = "", sHeadline = "", uri = "", pic = "/images/gg_2j_s_13_2.jpg", releaseTime = "";
        if(doc[i].selectSingleNode("headline") != null) headline = sHeadline = doc[i].selectSingleNode("headline").text;
        if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
        if(doc[i].selectSingleNode("images") != null) pic = uri.substr(0, uri.lastIndexOf("/") + 1) + "Images/" + doc[i].selectSingleNode("images").text.split(",")[0];
        if(doc[i].selectSingleNode("releaseTime") != null) releaseTime = doc[i].selectSingleNode("releaseTime").text;
        if(doc[i].selectSingleNode("uri") != null && doc[i].selectSingleNode("uri").text != "") uri = doc[i].selectSingleNode("uri").text;
        
        if(headline.length > wordCount) sHeadline = headline.substr(0, wordCount) + "..";
        if(releaseTime.length > 0) releaseTime = releaseTime.substr(5, releaseTime.indexOf(" ") - 5);
        
        if(i == 0) str = "<table width='98%'  border='0' cellpadding='0' cellspacing='2'>";
        
        str += "<tr height='21'><td width='82%'>· <a href='" + uri + "' target='_blank' title='" + headline.replace(new RegExp("'", "g"), "&acute;") + "' class='h12'>" + sHeadline + "</a></td><td width='18%' class='h12'>(" + releaseTime + ")</td></tr>"
        
        if(i + 1 == doc.length) str += "</table>"
    }
    
    var zwztPic = "";
    dom = new ActiveXObject("Microsoft.XMLDOM");
    dom.async = false;
    dom.load("GetColumns.aspx?type=zwzt");
    doc = dom.selectNodes("root/column");
    for(var i = 0; i < doc.length && i < 3; i++)
    {
        var columnName = "", columnId = "", pic = "";
        if(doc[i].selectSingleNode("name") != null) columnName = doc[i].selectSingleNode("name").text;
        if(doc[i].selectSingleNode("id") != null) columnId = doc[i].selectSingleNode("id").text;
        if(doc[i].selectSingleNode("@dir") != null) pic = "/" + doc[i].selectSingleNode("@dir").text;
        if(doc[i].selectSingleNode("images") != null) pic += "Images/" + doc[i].selectSingleNode("images").text;
        
        if(i > 0) zwztPic += "<table cellpadding='0' cellspacing='0'><tr><td height='10'></td></tr></table>";
        zwztPic +=  "<a href='more.aspx?id=" + columnId + "' target='_blank' title='" + columnName.replace(new RegExp("'", "g"), "&acute;") + "'><img src='" + pic + "' width='120' height='50' border='0'/></a>";
        if(i == 2 || (i + 1) == doc.length)
        {
            document.all(objName).innerHTML = zwztPic;
        }
    }
    
    return str;
}

function showArticles_zyxx(top)
{
    var dom = new ActiveXObject("Microsoft.XMLDOM"), doc = "", str = "";
    dom.async = false;
    dom.load("GetColumns.aspx?type=zwzt");
    doc = dom.selectNodes("root/column");
    for(var i = 0; i < doc.length && i < top; i++)
    {
        var name = "", pic = "", uri = "", id = "";
        
        if(doc[i].selectSingleNode("name") != null) name = doc[i].selectSingleNode("name").text;
        if(doc[i].selectSingleNode("images") != null) pic = doc[i].selectSingleNode("images").text;
        if(doc[i].selectSingleNode("@dir") != null) uri = doc[i].selectSingleNode("@dir").text;
        if(doc[i].selectSingleNode("id") != null) id = doc[i].selectSingleNode("id").text;
        
        str += "<div><a href='/more.aspx?id=" + id + "' target='_blank' title='" + name.replace(new RegExp("'", "g"), "&acute;") + "'>"
            + "<img src='/" + uri + "Images/" + pic + "' width='210' height='110' border='0'>"
            + "</a></div>";
    }
    
    return str;
}

function showArticles_wzlj(dom, objName)
{
    var doc = dom.selectNodes("root/article");
    for(var i = 0; i < doc.length; i++)
    {
        var headline = "", uri = "";
        if(doc[i].selectSingleNode("headline") != null) headline = doc[i].selectSingleNode("headline").text;
        if(doc[i].selectSingleNode("uri") != null) uri = doc[i].selectSingleNode("uri").text;
        var opt = new Option(headline, uri);
        document.all(objName).options.add(opt);
    }
}

function showArticles_image(dom, objName)
{
    var doc = dom.selectNodes("root/article");
    for(var i = 0; i < doc.length; i++)
    {
        var headline = "", uri = "", pic = "";
        if(doc[i].selectSingleNode("headline") != null) headline = doc[i].selectSingleNode("headline").text;
        if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
        if(doc[i].selectSingleNode("images") != null) pic = doc[i].selectSingleNode("images").text.split(",")[0];
        if(pic != "")
        {
            document.all(objName).innerHTML = "<a href='" + uri + "' target='_blank'><img src='" + uri.substr(0, uri.lastIndexOf("/")) + "/Images/" + pic + "' width='121' height='58' border='0' alt='" + headline.replace(new RegExp("'", "g"), "&acute;") + "'/></a>";
        }
    }
}

function showArticles_zxft(dom)
{
    var doc = dom.selectNodes("root/article");
    for(var i = 0; i < doc.length; i++)
    {
        var headline = "", shortHeadline, time = "", star = "", detail = "", pic = "", uri = "", transfer = "";
        if(doc[i].selectSingleNode("headline") != null) headline = shortHeadline = doc[i].selectSingleNode("headline").text;
        if(doc[i].selectSingleNode("subheadline") != null) time = doc[i].selectSingleNode("subheadline").text;
        if(doc[i].selectSingleNode("keywords") != null) star = doc[i].selectSingleNode("keywords").text;
        if(doc[i].selectSingleNode("detail") != null) detail = doc[i].selectSingleNode("detail").text.replace(new RegExp("&lt;", "g"), "<").replace(new RegExp("&gt;", "g"), ">").replace(new RegExp("&amp;", "g"), "&");
        if(doc[i].selectSingleNode("images") != null) pic = doc[i].selectSingleNode("images").text.split(",")[0];
        if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
        if(doc[i].selectSingleNode("uri") != null) transfer = doc[i].selectSingleNode("uri").text;
        
        if(headline.length > 10) shortHeadline = headline.substr(0, 10) + "..";
        if(detail.length > 38) detail = detail.substr(0, 38) + "..";
        
        document.all.zxftHeadline.innerHTML = shortHeadline;
        document.all.zxftTime.innerHTML = time;
        document.all.zxftStar.innerHTML = star;
        document.all.zxftDetail.innerHTML = detail;
        document.all.zxftPic.innerHTML = "<img src='" + uri.substr(0, uri.lastIndexOf("/")) + "/Images/" + pic + "' width='77' height='69'>";
        if(transfer != "") document.all.zxftMedia.href = transfer;
        document.all.zxftWord.href = uri;
    }
}

function showArticles_ftyg(dom)
{
    var doc = dom.selectNodes("root/article");
    for(var i = 0; i < doc.length; i++)
    {
        var headline = "", shortHeadline, time = "", star = "", detail = "", pic = "", uri = "", transfer = "";
        if(doc[i].selectSingleNode("headline") != null) headline = shortHeadline = doc[i].selectSingleNode("headline").text;
        if(doc[i].selectSingleNode("subheadline") != null) time = doc[i].selectSingleNode("subheadline").text;
        if(doc[i].selectSingleNode("keywords") != null) star = doc[i].selectSingleNode("keywords").text;
        if(doc[i].selectSingleNode("detail") != null) detail = doc[i].selectSingleNode("detail").text.replace(new RegExp("&lt;", "g"), "<").replace(new RegExp("&gt;", "g"), ">").replace(new RegExp("&amp;", "g"), "&");
        if(doc[i].selectSingleNode("images") != null) pic = doc[i].selectSingleNode("images").text.split(",")[0];
        if(doc[i].selectSingleNode("@uri") != null) uri = doc[i].selectSingleNode("@uri").text;
        if(doc[i].selectSingleNode("uri") != null) transfer = doc[i].selectSingleNode("uri").text;
        
        if(headline.length > 10) shortHeadline = headline.substr(0, 10) + "..";
        if(detail.length > 70) detail = detail.substr(0, 70) + "..";
        
        document.all.ftygHeadline.innerHTML = "<a href='" + uri + "' target='_blank'>" + shortHeadline + "</a>";
        document.all.ftygTime.innerHTML = time;
        document.all.ftygStar.innerHTML = star;
        document.all.ftygDetail.innerHTML = detail;
    }
}

