﻿// JScript 文件
function getThisTradeShowInFo_(str){
    if(str=='china'){
        $("show_1").className="show";
        $("show_2").className="noshow";
      }
    else if(str=='global'){
        $("show_1").className="noshow";
        $("show_2").className="show";
      }
     var _url = "/articles_system/jsdate/getChinaOrGlobalInfo.aspx";
     var pars = "type=" + RndNum(9) + "&title="+str+"&option=getInfo";
     var editAjax = new Ajax.Request(_url,{method: 'get', parameters: pars, onComplete:ShowThisInfo_});
}
function ShowThisInfo_(resaultobj){
    var xmls=resaultobj.responseXML; 
    var result=xmls.getElementsByTagName("type");
    if(result.length>0){
	    $("thisInfotitle_").innerHTML=result[0].getAttribute("title");
	    $("thisInfo_").innerHTML=result[0].childNodes[0].nodeValue;
      }
    else{
        $("thisInfotitle_").innerHTML="";
        $("thisInfo_").innerHTML="";
      }
}

function RndNum(n){// 随机函数
    var rnd="";
    for(var i=0;i<n;i++)
        rnd+=Math.floor(Math.random()*10);
    return rnd;
}