if(typeof Sina=="undefined"){Sina={}}Sina.pkg=function(ns){if(!ns||!ns.length){return null}var levels=ns.split(".");var nsobj=Sina;for(var i=(levels[0]=="Sina")?1:0;i<levels.length;++i){nsobj[levels[i]]=nsobj[levels[i]]||{};nsobj=nsobj[levels[i]]}return nsobj};function $E(oID){var node=typeof oID=="string"?document.getElementById(oID):oID;if(node!=null){return node}else{}return null}function $C(tagName){return document.createElement(tagName)}function $N(name){return document.getElementsByName(name)}function $G(){}function $G2(){}function v5SendLog(){}try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}(function(){var funcName="trace";var _traceList=[];var _startTime=new Date().valueOf();var _curTime=new Date().valueOf();var _runTime;var _trace=function(sText,oOption,sBgColor){oOption=oOption||{};if(typeof oOption=="string"){oOption={"color":oOption};if(typeof sBgColor!="undefined"&&typeof sBgColor=="string"){oOption.bgColor=sBgColor}}_traceList[_traceList.length]=[sText,oOption]};var _traceError=function(oError){_trace(oError,{"color":"#F00"})};_trace.error=_traceError;_trace.traceList=_traceList;_trace.toString=function(){return"Trace调试已关闭"};window[funcName]=_trace;window.traceError=_traceError})();Sina.pkg("Core");if(typeof Core=="undefined"){Core=Sina.Core}Sina.pkg("Core.Array");Core.Array.each=function(ar,insp){var r=[];for(var i=0;i<ar.length;i++){var x=insp(ar[i],i);if(x!==null){r.push(x)}}return r};function Jobs(){this._jobTable=[]}Jobs.prototype={_registedJobTable:{},initialize:function(){},_registJob:function(jobName,rel){this._registedJobTable[jobName]=rel},add:function(jobName){this._jobTable.push(jobName)},start:function(){var jobs=this._jobTable;var regJobs=this._registedJobTable;var i=0;var joblen=this._jobTable.length;var getTime=function(){return new Date().valueOf()};var interNum=window.setInterval(function(){if(i>=joblen){clearInterval(interNum);return}var jobName=jobs[i];var job=regJobs[jobName];i++;if(typeof job=="undefined"){trace("<b>Job["+jobName+"] is undefiend!!!</b>",{"color":"#900","bgColor":"#FFF;"});return}var _try=true;var _start=getTime();try{job.call()}catch(e){trace("<b>Job["+jobName+"] failed!!!</b>",{"color":"#900","bgColor":"#666;"});traceError(e);_try=false}finally{if(_try){var _end=getTime();trace("<b>Job["+jobName+"] done in "+(_end-_start)+"ms.</b>",{"color":"#0F0","bgColor":"#666;"})}}},10)},call:function(jobName,args){if(typeof this._registedJobTable[jobName]!="undefined"){this._registedJobTable[jobName].apply(this,args)}else{trace("<b>Job["+jobName+"] is undefined!!!</b>",{"color":"#900","bgColor":"#FFF;"})}}};$registJob=function(name,rel){Jobs.prototype._registJob(name,rel)};$callJob=function(name){var args=[];if(arguments.length>1){Core.Array.foreach(arguments,function(v,i){args[i]=v});args.shift()}Jobs.prototype.call(name,args)};if(typeof App=="undefined"){var App={}}Sina.pkg("Core.Events");Core.Events.addEvent=function(elm,func,evType,useCapture){var _el=$E(elm);if(_el==null){trace("addEvent 找不到对象："+elm);return}if(typeof useCapture=="undefined"){useCapture=false}if(typeof evType=="undefined"){evType="click"}if(_el.addEventListener){_el.addEventListener(evType,func,useCapture);return true}else{if(_el.attachEvent){var r=_el.attachEvent("on"+evType,func);return true}else{_el["on"+evType]=func}}};$registJob("shareSucessTimer",function(){var timeout=3;function updateTimer(){if(timeout==0){window.opener=null;window.close();return}timeout--;$E("timeout").innerHTML=timeout;setTimeout(updateTimer,1000)}setTimeout(updateTimer,1000)});function main(){var jobs=new Jobs();jobs.add("shareSucessTimer");jobs.start()};