thunderLanguage["Thunder5SetUpInfo"] =unescape("%u6B64%u94FE%u63A5%u4E3A%u8FC5%u96F7%u4E13%u7528%u4E0B%u8F7D%u901A%u9053%uFF0C%u5FC5%u987B%u5B89%u88C5WEB%u8FC5%u96F7%u624D%u80FD%u8FDB%u884C%u4E0B%u8F7D%uFF0C%u5B89%u88C5%u540E%u8BF7%u91CD%u65B0%u8FDB%u5165%u6B64%u9875%u8FDB%u884C%u4E0B%u8F7D%u3002%u5F3A%u70C8%u5EFA%u8BAE%u60A8%u5B89%u88C5web%u8FC5%u96F7%uFF0C%u4F53%u9A8C%u6025%u901F%u4E0B%u8F7D%u7684%u4E50%u8DA3%uFF01%u70B9%u51FB%u786E%u5B9A%u5373%u523B%u5B89%u88C5web%u8FC5%u96F7");
thunderLanguage["AllSetUpInfo"] =unescape("%u6B64%u94FE%u63A5%u4E3A%u8FC5%u96F7%u4E13%u7528%u4E0B%u8F7D%u901A%u9053%uFF0C%u5FC5%u987B%u5B89%u88C5WEB%u8FC5%u96F7%u6216%u8FC5%u96F75%u624D%u80FD%u8FDB%u884C%u4E0B%u8F7D%uFF0C%u5B89%u88C5%u540E%u8BF7%u91CD%u65B0%u8FDB%u5165%u6B64%u9875%u8FDB%u884C%u4E0B%u8F7D%u3002%u5F3A%u70C8%u5EFA%u8BAE%u60A8%u5B89%u88C5web%u8FC5%u96F7%uFF0C%u4F53%u9A8C%u6025%u901F%u4E0B%u8F7D%u7684%u4E50%u8DA3%uFF01%u70B9%u51FB%u786E%u5B9A%u5373%u523B%u5B89%u88C5web%u8FC5%u96F7");
thunderLanguage["MethodUnSupported"] =unescape("%u4E0D%u652F%u6301%u6B64%u65B9%u6CD5%uFF0C%u8BF7%u5B89%u88C5%u6700%u65B0%u7684%u8FC5%u96F7%u5BA2%u6237%u7AEF");
thunderLanguage["FFDenied"] =unescape("%u6B64%u64CD%u4F5C%u88AB%u6D4F%u89C8%u5668%u62D2%u7EDD%uFF01%0A%u8BF7%u5728%u6D4F%u89C8%u5668%u5730%u5740%u680F%u8F93%u5165%u201Cabout%3Aconfig%u201D%u5E76%u56DE%u8F66%0A%u7136%u540E%u5C06%5Bsigned.applets.codebase_principal_support%5D%u8BBE%u7F6E%u4E3A%27true%27");
var Thunder = {
isIE:(navigator.userAgent.indexOf('MSIE')>0),
isOpenNew:null,
infoType:0,
thunderType:0,
mustUseSelected:null,
pId:"",
judgeThunder:function(sid){
var webcop = [];
sid=sid?sid:this.pId;
if(webcop[sid]==1){
return 3;
}
else
return false;
},
getInstance: function(th){
/*Get download style*/
if(this.isOpenNew==null)
try{this.isOpenNew=(thunder_isOpenNewWindow==10?true:false)}catch(e){}
if(this.mustUseSelected==null)
try{this.mustUseSelected=mustBeSelectedThunder;}catch(e){this.mustUseSelected=false;}
/*Get download client type*/
if(this.judgeThunder()){
this.thunderType=this.judgeThunder()
this.mustUseSelected=true;
}else{
if(!this.thunderType)
{
try{
switch(selectThunderType)
{
case "coThunder5":
this.thunderType=4;
break;
case "coWebThunder":
default:
this.thunderType=3;
}
}catch(e){this.thunderType=3;this.mustUseSelected=false;}
}else{
}
}
if(this.isIE){
var begi,endi;
if(this.thunderType==3) begi=0; else begi=1;
if(this.mustUseSelected) endi=begi; else endi=1-begi;
var strEx="i++";strJudge="i<=endi";
if(endi<begi){strEx="i--";strJudge="i>=endi";}
var opt = [Thunder.WebThunder,Thunder.Thunder5];
for(var i=begi;eval(strJudge);eval(strEx))
{
var tmpObj=opt[i].getInstance();
if(tmpObj!=null)
return tmpObj;
else
continue;
}
}else{
var oAtmp=Thunder.ffThunder.getInstance();
if(oAtmp){
var clientType=oAtmp.getClientType();
//No client has been seted up
if(clientType==0) return null;
if(this.mustUseSelected){
if((this.thunderType==4 && clientType==2)||(this.thunderType==3 && clientType==1))
oAtmp=null
}else{
}
}
return oAtmp;
}
return null;
},
companySetup:function(sCompany,sPid){
try {
sPid=sPid?sPid:this.pId;
vhref = "http://analytics.xunlei.com/PV?peerid=" + sPid + "&uri=" + sCompany + "&src=" + document.location.href + "&screensize=" +window.screen.width +"*" +window.screen.height;
image1 = new Image(1,1);
image1.src = vhref;
}catch(e){}
},
setParameter: function(cid, url, refer, stat){
cid=cid?cid:this.pId;
var inputs = ["thunder_cid", "thunder_down_url", "thunder_down_pageurl", "thunder_stat_pageurl"];
var input;
for (var i=0; i<inputs.length; i++){
if (isUndef(input = $(inputs[i]))){
input = document.createElement("input");
input.type = "hidden";
input.id = inputs[i];
document.body.appendChild(input);
}
input.value = arguments[i];
}
},
download: function( url, refer, name, stat,cid){
var client;
client=this.getInstance();
this.pId=this.pId?this.pId:(cid?cid:"");
cid=cid?cid:this.pId;
if(!client){
if(!this.isIE && (client==0)){}else{this.showSetUpInfo(cid);}
}else{
if (this.isIE)
{
client.download(cid, url, refer, name, stat);
}else{
switch(this.thunderType){
case 4:
client.download(cid, url, refer, name, stat,1);
break;
case 3: default:
client.download(cid, url, refer, name, stat,2);
}
}
}
return false;
},
openWindow:function(url,flag){
var s=flag?flag:false;
if(!this.isOpenNew)
{
var Info;
if(this.mustUseSelected)
{
if(this.thunderType==3)
Info=thunderLanguage["WebThunderSetUpInfo"];
else
Info=thunderLanguage["Thunder5SetUpInfo"];
}else{
Info=thunderLanguage["AllSetUpInfo"];
}
}
//Open a dialogbox which tell user to setup thunder client
if(Info) alert(Info);
if(this.infoType == 10 && !s)
top.location.href =url;
else
window.open(url,"WEBTHUNDER_SET_UP");
},
showSetUpInfo:function(pid){
var url;
pid=pid?pid:this.pId;
if(this.isOpenNew){
//Goto thunder download page
if(pid.substr(0,1)=="g")
url="http://my.xunlei.com/setup.htm?gid=g"+pid;
else
url="http://cop.my.xunlei.com/setup/index.html?pid="+ pid;
}else{
if(this.isIE)
{
if(this.mustUseSelected)
{
if(this.thunderType==3)
url=wtd_ChangFolder(pid);
else
url=wtd_ChangFolder(pid);
}else{
url=wtd_ChangFolder(pid);
}
}else{
if(this.mustUseSelected)
{
if(this.thunderType==3)
url=wtd_ChangFolder(pid);
else
url=wtd_ChangFolder(pid);
}else{
url=wtd_ChangFolder(pid);
Back to home |
File page
Subscribe |
Register |
Login
| N