/********************************************************************
*					dedicateddown.js
*				------------------------
*		开始时间：2008.9.18
*		作 者：江敬城
*		Email：min43@163.com
*		编 号：dedicateddown.js，v1.0.0，2008.9.19 9:56，江敬城
*		说 明：专用下载链接处理(for 迅雷联盟, 快车等)
*
********************************************************************/
var oDedicatedDown={author:"JJC",version:"1.0.0",description:"\u4e13\u7528\u4e0b\u8f7d\u94fe\u63a5\u5904\u7406(for \u8fc5\u96f7\u8054\u76df, \u5feb\u8f66\u7b49)",browser:{},downItems:[],dedicatedSofts:{"thunder":{name:"thunder",title:"\u8fc5\u96f7",thunder_pid:"46199",required:[{type:"js",src:"http://pstatic.xunlei.com/js/webThunderDetect.js"},{type:"js",src:"http://pstatic.xunlei.com/js/base64.js"}]},"flashget":{name:"flashget",title:"\u5feb\u8f66"}},init:function(){if(!window.__DedicatedDown__)window.__DedicatedDown__=this},addDownItem:function($){if($.url.replace(/^\s*|\s*$/g,"").length==0)return false;$.dedicatedSoft=$.dedicatedSoft||"thunder";this.downItems.push($)},setAllDownUrl:function(){for(var $=0;$<this.downItems.length;$++)this.setDownUrl(this.downItems[$])},setDownUrl:function($){__DedicatedDown__.render($)},render:function($){if(typeof $.showid=="string"){if(document.getElementById($.showid))__DedicatedDown__.bindElem(document.getElementById($.showid),$)}else if(typeof $.showid=="object")if($.showid.constructor==Array){for(var _=0;_<$.showid.length;_++)if(document.getElementById($.showid[_]))__DedicatedDown__.bindElem(document.getElementById($.showid[_]),$)}else __DedicatedDown__.bindElem($.showid,$)},bindElem:function($,_){switch(_.dedicatedSoft){case"thunder":$.thunderHref=ThunderEncode(_.url);$.thunderPid=_.thunder_pid||__DedicatedDown__.dedicatedSofts.thunder.thunder_pid;$.thunderResTitle=_.title||"";$.onclick=__DedicatedDown__.callFunction(OnDownloadClick_Simple,[$,2,4]);$.oncontextmenu=__DedicatedDown__.callFunction(ThunderNetwork_SetHref,[$]);break;case"flashget":break}},callFunction:function(_,$){return function(){_.apply(this,$);return false}},console:{log:function(){if(window.console)window.console.log(arguments);else{var $="";for(var _=0;_<arguments.length;_++)$+=arguments[_].toString()+"\\n";alert($)}},debug:function(){__DedicatedDown__.console.log(arguments)}}};function setAllDownUrl(){if(oDedicatedDown){oDedicatedDown.init();oDedicatedDown.setAllDownUrl()}}