if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.createElement||!document.getElementById){return }this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=true;this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1)}if(id){this.setAttribute("id",id)}if(w){this.setAttribute("width",w)}if(h){this.setAttribute("height",h)}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);if(c){this.addParam("bgcolor",c)}else{}var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a)}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f},getAttribute:function(_10){return this.attributes[_10]},addParam:function(_11,_12){this.params[_11]=_12},getParams:function(){return this.params},addVariable:function(_13,_14){this.variables[_13]=_14},getVariable:function(_15){return this.variables[_15]},getVariables:function(){return this.variables},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key])}return _16},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn")}_19='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';_19+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var _1a=this.getParams();for(var key in _1a){_19+=[key]+'="'+_1a[key]+'" '}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+='flashvars="'+_1c+'"'}_19+=' pluginspage="http://www.macromedia.com/go/getflashplayer"/>'}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX")}_19='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">';_19+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var _1d=this.getParams();for(var key in _1d){_19+='<param name="'+key+'" value="'+_1d[key]+'" />'}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+='<param name="flashvars" value="'+_1f+'" />'}_19+="</object>"}return _19},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){var _25=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var i=15;i>6;i--){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_25=new deconcept.PlayerVersion([i,0,0]);break}catch(e){}}}catch(e){}if(_23&&_25.major>_23.major){return _25}if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}catch(e){}}}return _25};deconcept.PlayerVersion=function(_29){this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;this.minor=parseInt(_29[1])||0;this.rev=parseInt(_29[2])||0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false}if(this.major>fv.major){return true}if(this.minor<fv.minor){return false}if(this.minor>fv.minor){return true}if(this.rev<fv.rev){return false}return true};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(q){var _2d=q.indexOf(_2b+"=");var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;if(q.length>1&&_2d>-1){return q.substring(q.indexOf("=",_2d)+1,_2e)}}return""}};if(Array.prototype.push==null){Array.prototype.push=function(_2f){this[this.length]=_2f;return this.length}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
var Native=function(k){k=k||{};var a=k.name,i=k.legacy,b=k.protect,c=k.implement,h=k.generics,f=k.initialize,g=k.afterImplement||function(){},d=f||i;h=h!==false;d.constructor=Native;d.$family={name:"native"};if(i&&f){d.prototype=i.prototype}d.prototype.constructor=d;if(a){var e=a.toLowerCase();d.prototype.$family={name:e};Native.typize(d,e)}var j=function(n,l,o,m){if(!b||m||!n.prototype[l]){n.prototype[l]=o}if(h){Native.genericize(n,l,b)}g.call(n,l,o);return n};d.alias=function(n,l,p){if(typeof n=="string"){var o=this.prototype[n];if((n=o)){return j(this,l,n,p)}}for(var m in n){this.alias(m,n[m],l)}return this};d.implement=function(m,l,o){if(typeof m=="string"){return j(this,m,l,o)}for(var n in m){j(this,n,m[n],l)}return this};if(c){d.implement(c)}return d};Native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=Array.prototype.slice.call(arguments);return b.prototype[c].apply(d.shift(),d)}}};Native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c)}};Native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b)}}};(function(){var a={Array:Array,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String};for(var h in a){new Native({name:h,initialize:a[h],protect:true})}var d={"boolean":Boolean,"native":Native,object:Object};for(var c in d){Native.typize(d[c],c)}var f={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]};for(var e in f){for(var b=f[e].length;b--;){Native.genericize(a[e],f[e][b],true)}}})();var Hash=new Native({name:"Hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getClean())}for(var b in a){this[b]=a[b]}return this}});Hash.implement({forEach:function(b,c){for(var a in this){if(this.hasOwnProperty(a)){b.call(c,this[a],a,this)}}},getClean:function(){var b={};for(var a in this){if(this.hasOwnProperty(a)){b[a]=this[a]}}return b},getLength:function(){var b=0;for(var a in this){if(this.hasOwnProperty(a)){b++}}return b}});Hash.alias("forEach","each");Array.implement({forEach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this)}}});Array.alias("forEach","each");function $A(b){if(b.item){var a=b.length,c=new Array(a);while(a--){c[a]=b[a]}return c}return Array.prototype.slice.call(b)}function $arguments(a){return function(){return arguments[a]}}function $chk(a){return !!(a||a===0)}function $clear(a){clearTimeout(a);clearInterval(a);return null}function $defined(a){return(a!=undefined)}function $each(c,b,d){var a=$type(c);((a=="arguments"||a=="collection"||a=="array")?Array:Hash).each(c,b,d)}function $empty(){}function $extend(c,a){for(var b in (a||{})){c[b]=a[b]}return c}function $H(a){return new Hash(a)}function $lambda(a){return($type(a)=="function")?a:function(){return a}}function $merge(){var a=Array.slice(arguments);a.unshift({});return $mixin.apply(null,a)}function $mixin(e){for(var d=1,a=arguments.length;d<a;d++){var b=arguments[d];if($type(b)!="object"){continue}for(var c in b){var g=b[c],f=e[c];e[c]=(f&&$type(g)=="object"&&$type(f)=="object")?$mixin(f,g):$unlink(g)}}return e}function $pick(){for(var b=0,a=arguments.length;b<a;b++){if(arguments[b]!=undefined){return arguments[b]}}return null}function $random(b,a){return Math.floor(Math.random()*(a-b+1)+b)}function $splat(b){var a=$type(b);return(a)?((a!="array"&&a!="arguments")?[b]:b):[]}var $time=Date.now||function(){return +new Date};function $try(){for(var b=0,a=arguments.length;b<a;b++){try{return arguments[b]()}catch(c){}}return null}function $type(a){if(a==undefined){return false}if(a.$family){return(a.$family.name=="number"&&!isFinite(a))?false:a.$family.name}if(a.nodeName){switch(a.nodeType){case 1:return"element";case 3:return(/\S/).test(a.nodeValue)?"textnode":"whitespace"}}else{if(typeof a.length=="number"){if(a.callee){return"arguments"}else{if(a.item){return"collection"}}}}return typeof a}function $unlink(c){var b;switch($type(c)){case"object":b={};for(var e in c){b[e]=$unlink(c[e])}break;case"hash":b=new Hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d])}break;default:return c}return b}function $(a){return(typeof a=="string")?document.getElementById(a):a}String.implement({substitute:function(a,b){return this.replace(b||(/\\?\{([^}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1)}return(a[c]!=undefined)?a[c]:""})},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:this.indexOf(a)>-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s+/g," ").trim()},between:function(c,b){var d=this.indexOf(c);if(d==-1){return""}d+=c.length;var a=this.indexOf(b,d);if(a==-1){return""}return this.substr(d,a-d)},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase())})},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase()})}});Array.implement({each:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this)}},every:function(c,d){for(var b=0,a=this.length;b<a;b++){if(!c.call(d,this[b],b,this)){return false}}return true},filter:function(d,e){var c=[];for(var b=0,a=this.length;b<a;b++){if(d.call(e,this[b],b,this)){c.push(this[b])}}return c},clean:function(){return this.filter($defined)},indexOf:function(c,d){var a=this.length;for(var b=(d<0)?Math.max(0,a+d):d||0;b<a;b++){if(this[b]===c){return b}}return -1},map:function(d,e){var c=[];for(var b=0,a=this.length;b<a;b++){c[b]=d.call(e,this[b],b,this)}return c},some:function(c,d){for(var b=0,a=this.length;b<a;b++){if(c.call(d,this[b],b,this)){return true}}return false},link:function(c){var a={};for(var e=0,b=this.length;e<b;e++){for(var d in c){if(c[d](this[e])){a[d]=this[e];delete c[d];break}}}return a},contains:function(a,b){return this.indexOf(a,b)!=-1},extend:function(c){for(var b=0,a=c.length;b<a;b++){this.push(c[b])}return this},include:function(a){if(!this.contains(a)){this.push(a)}return this},erase:function(b){for(var a=this.length;a--;a){if(this[a]===b){this.splice(a,1)}}return this},flatten:function(){var d=[];for(var b=0,a=this.length;b<a;b++){var c=$type(this[b]);if(!c){continue}d=d.concat((c=="array"||c=="collection"||c=="arguments")?Array.flatten(this[b]):this[b])}return d}});Function.implement({create:function(b){var a=this;b=b||{};return function(d){var c=b.arguments;c=(c!=undefined)?$splat(c):Array.slice(arguments,(b.event)?1:0);if(b.event){c=[d||window.event].extend(c)}var e=function(){return a.apply(b.bind||null,c)};if(b.delay){return setTimeout(e,b.delay)}if(b.periodical){return setInterval(e,b.periodical)}return e()}},bind:function(b,a){return this.create({bind:b,arguments:a})},bindWithEvent:function(b,a){return this.create({bind:b,event:true,arguments:a})},delay:function(b,c,a){return this.create({delay:b,bind:c,arguments:a})()},periodical:function(a,c,b){return this.create({periodical:a,bind:c,arguments:b})()}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){for(var a in this){if(this.hasOwnProperty(a)&&this[a]===b){return a}}return null},hasValue:function(a){return(Hash.keyOf(this,a)!==null)},extend:function(a){Hash.each(a||{},function(c,b){Hash.set(this,b,c)},this);return this},combine:function(a){Hash.each(a||{},function(c,b){Hash.include(this,b,c)},this);return this},erase:function(a){if(this.hasOwnProperty(a)){delete this[a]}return this},get:function(a){return(this.hasOwnProperty(a))?this[a]:null},set:function(a,b){if(!this[a]||this.hasOwnProperty(a)){this[a]=b}return this},empty:function(){Hash.each(this,function(b,a){delete this[a]},this);return this},include:function(a,b){if(this[a]==undefined){this[a]=b}return this},map:function(b,c){var a=new Hash;Hash.each(this,function(e,d){a.set(d,b.call(c,e,d,this))},this);return a},filter:function(b,c){var a=new Hash;Hash.each(this,function(e,d){if(b.call(c,e,d,this)){a.set(d,e)}},this);return a},every:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&!b.call(c,this[a],a)){return false}}return true},some:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&b.call(c,this[a],a)){return true}}return false},getKeys:function(){var a=[];Hash.each(this,function(c,b){a.push(b)});return a},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b)});return a},toQueryString:function(a){var b=[];Hash.each(this,function(f,e){if(a){e=a+"["+e+"]"}var d;switch($type(f)){case"object":d=Hash.toQueryString(f,e);break;case"array":var c={};f.each(function(h,g){c[g]=h});d=Hash.toQueryString(c,e);break;default:d=e+"="+encodeURIComponent(f)}if(f!=undefined){b.push(d)}});return b.join("&")}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});function using(b){b=b.split(/\s*\.\s*/g);var a=window,c;b.each(function(d){if(c){c+="."+d}else{c=d}if(!a[d]){a[d]={$name:c}}else{if(!a[d].$name){a[d].$name=c}}a=a[d]});return a}function include(b,e,a){a=Array.slice(arguments,2).flatten()||[];a.each(function(c){document.write('<script type="text/javascript" charset="'+e+'" src="'+b+c+'"><\/script>')})}function require(f,g,e){e=Array.slice(arguments,2).flatten()||[];var a=Array.filter(document.getElementsByTagName("script"),function(c){return c.getAttribute("src")}).map(function(c){return c.getAttribute("src")});e=e.filter(function(c,d){return !a.contains(f+c)});var b=document.getElementsByTagName("head")[0];e.each(function(c){(function(){var d=document.createElement("script");d.charset=g||"GBK";d.src=f+c;b.appendChild(d);d=null}).delay(10)})}(function(g){g.Engine={name:"unknown",version:0};g.Platform={name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase()};g.Features={xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector)};g.Plugins={};g.Engines={presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getElementsByClassName)?950:925))},trident:function(){return(!window.ActiveXObject)?false:((window.XMLHttpRequest)?((document.querySelectorAll)?6:5):4)},webkit:function(){return(navigator.taintEnabled)?false:((g.Features.xpath)?((g.Features.query)?525:420):419)},gecko:function(){return(!document.getBoxObjectFor&&window.mozInnerScreenX==null)?false:((document.getElementsByClassName)?19:18)}};g.Platform[g.Platform.name]=true;g.detect=function(){for(var m in this.Engines){var e=this.Engines[m]();if(e){this.Engine={name:m,version:e};this.Engine[m]=this.Engine[m+e]=true;break}}return{name:m,version:e}};g.detect();if(g.Engine.trident&&g.Engine.version<=4){$try(function(){document.execCommand("BackgroundImageCache",false,true)})}g.Request=function(){return $try(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})};g.Features.xhr=!!(g.Request());g.Features.range=document.implementation.hasFeature("Range","2.0");g.Plugins.Flash=(function(){var e=($try(function(){return navigator.plugins["Shockwave Flash"].description},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")})||"0 r0").match(/\d+/g);return{version:parseInt(e[0]||0+"."+e[1],10)||0,build:parseInt(e[2],10)||0}})();var a=navigator.userAgent,i=navigator.platform;g.isMaxthon=(function(){var m;try{m=window.external.tab_count;return typeof(m)!="undefined"}catch(n){return false}})();g.isTT=(function(){if(g.isMaxthon||a.indexOf("Tencent")==-1){return false}try{window.external.ShowBrowserUI("ku6");return true}catch(m){return false}})();var c=false;if(g.isTT){try{var l=window.external.getTTVerStr();if(l.indexOf("Tencent")>=0){c=l}}catch(h){}}g.getTTVer=function(){return c?c.replace("Tencent Traveler ",""):""};var k=false;if(g.isMaxthon){try{k=window.external.max_version}catch(h){}}g.getMaxVer=function(){return k?k:""};g.isMatterExplorer=g.isMaxthon||g.isTT;var j=g.getMaxVer().split("."),b=parseInt(j[0]+j[1]+j[2])||0,d=g.getTTVer().split(" ")[0].split("."),f=parseInt(d[0]+d[1])||0;if(b>254||f>44){g.swfWmodeTrouble=true}})(using("Ku6.Browser"));(function(b){var c=function(){Ku6.Browser.loaded=true};var a=(function(){var e=document;return Ku6.Browser.Engine.trident?function(f){if(Ku6.Browser.loaded){f()}else{var d=e.createElement("div");(function(){try{d.doScroll("left");e.body.appendChild(d);d.innerHTML="temp";e.body.removeChild(d);c();f()}catch(g){setTimeout(arguments.callee,50)}})()}}:Ku6.Browser.webkit?function(d){(function(){if(/loaded|complete/.test(e.readyState)){c();d()}else{setTimeout(arguments.callee,10)}})()}:function(d){if(Ku6.Browser.loaded){d()}else{e.addEventListener("DOMContentLoaded",c,false);e.addEventListener("DOMContentLoaded",d,false)}}})();b.add=function(g,f,e,h,d){if(g===window&&f.toLowerCase()=="domready"){a(e);return this}if(g.addEventListener){g.addEventListener(f,e,false)}else{g.attachEvent("on"+f,e)}return this};b.remove=function(f,e,d){if(f.removeEventListener){f.removeEventListener(e,d,false)}else{f.detachEvent("on"+e,d)}return this};b.stop=function(d){return this.stopPropagation(d).preventDefault(d)};b.stopPropagation=function(d){if(d.stopPropagation){d.stopPropagation()}else{d.cancelBubble=true}return this};b.preventDefault=function(d){if(d.preventDefault){d.preventDefault()}else{d.returnValue=false}return this};window.addEvent=function(e,d){b.add(window,e,d)};window.removeEvent=function(e,d){b.remove(window,e,d)}})(using("Ku6.Event"));(function(a){a.Events={addEvent:function(d,c,b){d=this.removeOn(d);if(!this.$events){this.$events={}}if(c!=$empty){this.$events[d]=this.$events[d]||[];if(window.Prototype&&Prototype.Version&&!this.$events[d].contains(c)){this.$events[d].push(c)}else{this.$events[d].include(c)}if(b){c.internal=true}}return this},addEvents:function(b){for(var c in b){this.addEvent(c,b[c])}return this},fireEvent:function(d,c,b){d=this.removeOn(d);if(!this.$events||!this.$events[d]){return this}this.$events[d].each(function(e){e.create({bind:this,delay:b,"arguments":c})()},this);return this},removeEvent:function(c,b){c=this.removeOn(c);if(!this.$events[c]){return this}if(!b.internal){this.$events[c].erase(b)}return this},removeEvents:function(d){if($type(d)=="object"){for(var e in d){this.removeEvent(e,d[e])}return this}if(d){d=this.removeOn(d)}for(var e in this.$events){if(d&&d!=e){continue}var c=this.$events[e];for(var b=c.length;b--;b){this.removeEvent(e,c[b])}}return this},removeOn:function(b){return b.replace(/^on([A-Z])/,function(c,d){return d.toLowerCase()})}}})(using("Ku6"));(function(b){var a=Ku6.Browser.Engine,d=document;d.head=d.getElementsByTagName("head")[0];d.html=d.getElementsByTagName("html")[0];if(a.trident){window.attachEvent("onunload",function(){window.detachEvent("onunload",arguments.callee);d.head=d.html=null})}b.getSize=function(){var e=c();return{x:e.clientWidth,y:e.clientHeight}};b.getScroll=function(){var f=window,e=c();return{x:f.pageXOffset||e.scrollLeft,y:f.pageYOffset||e.scrollTop}};b.getScrollSize=function(){var f=c(),e=this.getSize();return{x:Math.max(f.scrollWidth,e.x),y:Math.max(f.scrollHeight,e.y)}};b.getPosition=function(){return{x:0,y:0}};b.getCoordinates=function(){var e=this.getSize();return{top:0,left:0,bottom:e.y,right:e.x,height:e.y,width:e.x}};function c(){var e=document;return(!e.compatMode||e.compatMode=="CSS1Compat")?e.html:e.body}})(using("Ku6.Window"));(function(b){var a=using("Ku6.RunTime");b.hideOutline=function(c){if(Ku6.Browser.Engine.trident){c.hideFocus=true}else{c.style.outline="none"}};b.getLength=function(d,c){if(typeof d!="string"&&typeof d!="number"&&!d){return 0}d=""+d;return c?d.length:d.replace(/[^\x00-\xff]/gi,"..").length};b.cutString=function(h,d,c){var e=0,g=0;if(d>=b.getLength(h)){return h}var f="";while(e<d){f+=h.charAt(g);e+=b.getLength(h.charAt(g));g++}if(e>d){f=f.substr(0,f.length-1)}if(c){f+=c}return f};b.getPosition=function(d){var d=$(d),c=0,e=0;do{c+=d.offsetLeft||0;e+=d.offsetTop||0;d=d.offsetParent}while(d);return{x:c,y:e}};b.hasClass=function(d,c){return d.className.contains(c," ")};b.addClass=function(d,c){if(!this.hasClass(d,c)){d.className=(d.className+" "+c).clean()}return d};b.removeClass=function(d,c){d.className=d.className.replace(new RegExp("(^|\\s)"+c+"(?:\\s|$)"),"$1");return d};b.getTpl=function(d,e){var c=a.TPL_CACHES||(a.TPL_CACHES={});if(c[d]){return c[d]}else{var f=e||document.body.innerHTML;return c[d]=f.between("<!--"+d,d+"-->")}};b.importJs=function(c,d){var e=document.createElement("script");e.type="text/javascript";e.src=c;document.getElementsByTagName("head")[0].appendChild(e);if(d===true){return e}};b.importCss=function(d,e){if(d){var c=document.createElement("link");c.rel="stylesheet";c.media="screen";c.type="text/css";c.href=d;document.getElementsByTagName("head")[0].appendChild(c);if(e===true){return c}}};b.getDocument=function(c){return(c===window||c===document)?document:c.ownerDocument};b.getComputedStyle=function(c,e){if(c.currentStyle){return c.currentStyle[e.camelCase()]}var d=b.getDocument(c).defaultView.getComputedStyle(c,null);return(d)?d.getPropertyValue([e.hyphenate()]):null}})(using("Ku6.Utils"));(function(a){a.write=function(d,e,c){e=encodeURIComponent(e);c=$extend({path:false,domain:false,duration:false,secure:false,document:document},c);if(c.domain){e+="; domain="+c.domain}if(c.path){e+="; path="+c.path}if(c.duration){var b=new Date();b.setTime(b.getTime()+c.duration*24*60*60*1000);e+="; expires="+b.toGMTString()}if(c.secure){e+="; secure"}c.document.cookie=d+"="+e};a.read=function(c,b){b=$extend({path:false,domain:false,duration:false,secure:false,document:document},b);var d=b.document.cookie.match("(?:^|;)\\s*"+c.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")+"=([^;]*)");return(d)?decodeURIComponent(d[1]):null};a.dispose=function(c,b){this.write(c,"",$extend($extend({},b),{duration:-1}))}})(using("Ku6.Cookie"));(function(c){var e="http://",a=".ku6.com",d={img:e+"img"+a,podcast:e+"v"+a,www:e+"www"+a,blog:e+"blog"+a,passport:e+"passport"+a,space:e+"zone"+a,so:e+"so"+a,group:e+"group"+a};for(var b in d){c[b]=d[b];c["_"+b]=d[b].replace(/^http(s?):\/\//i,"")}c.domain=".ku6.com"})(using("Ku6.Urls"));(function(a){a.doLogin=Ku6.Urls.passport+"/login_doLogin.htm";a.doLogout=Ku6.Urls.passport+"/login_doLogout.htm";a.doRegister=Ku6.Urls.passport+"/register_doRegister.htm"})(using("Ku6.Library.Action"));(function(b){var a=Ku6.Urls;b.getVideoUrl=function(c){return c?a.podcast+"/show/"+c+".html":null};b.getHDVideoUrl=function(c){return c?a.hd+"/show/"+c+".html":null};b.getPlaylistUrl=function(d,c){return d?a.podcast+"/special/"+(c?"show":"index")+"_"+d+(c?"/"+c:"")+".html":null};b.getPodcastUrl=function(d,c){d=parseInt(d);if(c){return a.podcast+"/"+c.replace(/^\//g,"")}else{if(d==d&&d>9999){return a.podcast+"/u/"+d}}return null};b.getSpaceUrl=function(d,c){d=parseInt(d);if(c&&c.length>0){return"http://"+c+"."+a._space}else{if(d==d&&d>9999){return a.space+"/u/"+d}}return null}})(using("Ku6.Utils"));
String.implement({escHtml:function(a){return(a===true?this.replace(/<br\s*\/?>/gi,"\n"):this).replace(/[&'"<>\/\\\-\x00-\x09\x0b-\x0c\x1f\x80-\xff]/g,function(b){return"&#"+b.charCodeAt(0)+";"}).replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>").replace(/\r/g,"<br/>").replace(/ /g,"&nbsp;")},escHtmlEp:function(){return this.replace(/[&'"<>\/\\\-\x00-\x1f\x80-\xff]/g,function(a){return"&#"+a.charCodeAt(0)+";"})}});(function(c){var a=Ku6.Utils,d=Ku6.Event,b=using("App.RunTime");c.switchTab=function(f,m,h,k,e){e=e||"current";if(f){a.hideOutline(f)}for(var g=0;g<m;g++){if($(k+"_t"+g)){$(k+"_t"+g).className=(g==h?e:"")}var l=Ku6.Urls.www+"/"+k+"/"+g+"/index.shtml";if(g==h&&$(k+"_i"+g)&&$(k+"_i"+g).src!=l){$(k+"_i"+g).src=l}if($(k+"_c"+g)){$(k+"_c"+g).style.display=(g==h?"":"none")}}};c.defaultKey="\u8bf7\u8f93\u5165\u67e5\u8be2\u5185\u5bb9";c.doFocus=function(e){if(e.value==this.defaultKey){e.value="";e.style.color="black"}};c.doBlur=function(e){if(e.value==""||e.value==this.defaultKey){e.value=this.defaultKey;e.style.color="#bbb"}else{e.style.color="black"}};c.setSearch=function(g){var e=document.getElementsByName(g);for(var f=0,g=e.length;f<g;f++){this.doBlur(e[f])}};c.doSearch=function(l,f){if(l){try{var h=l.elements.inp,j=l.elements.searchType,g=h?h.value.replace(/[&\/\?]/g," "):"";if(g==""){alert("请输入查询内容 ^_^");if(h){h.focus()}}else{var k=Ku6.Urls.so+"/",i={video:k+"v/q",user:k+"u/q",playlist:k+"p/q",movie:k+"m/q",zk:"http://z.ku6.com/search.htm?t=question&q="}[j?j.value||"video":"video"];if(i){l.action=i+encodeURIComponent(g);if(f===true){l.submit()}else{return true}}}}catch(m){return false}}return false};c.showSearchType=function(h){if(h){d.preventDefault(h)}var f=$("selOption");if(f){var g=f.style.display;f.style.display={none:"block",block:"none"}[g]}return false};c.changeSearchType=function(h,e){var j=$("searchType"),g=$("selOption"),f=$("typeSelected"),i=$("inp");if(j){j.value=h}if(g){g.style.display="none"}if(f&&e){f.innerHTML=e.innerHTML}if(i){i.focus()}};c.searchMouseOver=function(i,h){var g=i.target||i.srcElement,f=g?g.tagName.toLowerCase():"";if(h===true||(f&&f=="a")){if(i){d.stopPropagation(i)}$clear(this.timer);delete this.timer}};c.searchMouseOut=function(i,h){var g=i.target||i.srcElement,f=g?g.tagName.toLowerCase():"";if(h===true||(f&&f=="a")){if(i){d.stopPropagation(i)}if($("selOption")&&$("selOption").style.display!="none"){this.timer=this.searchTypeHide.delay(c.SEARCH_HIDE_DELAY||500)}}};c.searchTypeHide=function(){$("selOption").style.display="none"};using("Ku6").toString=c.toString=function(){return"Author : \u5f71\u4e4b\u8ff7\u60d1\nQQ : 9537905\nMSN : zfkun@msn.com\nVersion : 090422"}})(using("App"));(function(i){var d=Ku6.Urls,b=Ku6.Library.Action,n=Ku6.Event,h=Ku6.Utils;$extend(i,$unlink(Ku6.Events));i.overTime=30*1000;i.referKey="www";var k={name:"account",pass:"password",expire:"expire"};var o=["\u9a8c\u8bc1\u5904\u7406\u4e2d,\u8bf7\u7a0d\u7b49...","\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a","\u7528\u6237\u540d\u4e0d\u80fd\u542b\u6709\u4e2d\u6587\u5b57\u7b26(\u8001\u7528\u6237\u9664\u5916)","\u7528\u6237\u540d\u957f\u5ea64-16\u4f4d(1\u4e2d\u6587\u53602\u4f4d)","\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","\u5bc6\u7801\u4e0d\u80fd\u542b\u6709\u4e2d\u6587\u5b57\u7b26","\u5bc6\u7801\u957f\u5ea64-16\u4f4d","\u7528\u6237\u540d\u4e0d\u5b58\u5728","\u5bc6\u7801\u9519\u8bef","\u53d1\u751f\u672a\u77e5\u9519\u8bef,\u8bf7\u91cd\u8bd5!"];var e=d.img+"/common/defcover/{gender}_{size}.gif";function c(p){return["boy","girl","both"][p]||"both"}function m(r,q){var p=(r||"").split(";");return{big:p[0]||e.substitute({gender:c(q),size:"big"}),small:p[1]||p[0]||e.substitute({gender:c(q),size:"small"}),middle:p[2]||p[1]||p[0]||e.substitute({gender:c(q),size:"small"})}}function j(){var t=Ku6.Cookie.read("systemPPCLoginUser");if(!t){return null}var s=t.split("_--_");if(s.length!=5||isNaN(s[0])||parseInt(s[0])<=999){return null}var q=Ku6.Cookie.read("systemPPCLoginUserNickName"),p=Ku6.Cookie.read("systemPPCLoginUserHeadFace"),r=m(p);return{uid:s[0],url:s[1],username:s[2],email:s[3],service:s[4],nick:q?unescape(q.replace(/\\/ig,"%")):null,icon:p,bigIcon:r.big,middleIcon:r.middle,smallIcon:r.small}}function l(){if(i.form){var p=i.form.elements;if(p[k.name]){p[k.name].value=""}if(p[k.pass]){p[k.pass].value=""}if(p[k.expire]){p[k.expire].defaultChecked=true;p[k.expire].setAttribute("checked","checked")}}}function a(p){if(i.form){var q=i.form.elements;if(q[p]){q[p].focus()}}}function g(p){alert(o[p])}function f(p,q){if(p==""){g(1);a(k.name);return false}if(q==""){g(4);a(k.pass);return false}if(q.length<4||q.length>16){g(6);a(k.pass);return false}if((/[^\x00-\xff]/).test(q)){g(5);a(k.pass);return false}return true}i.login=function(v,r){if(v){n.preventDefault(v)}if(i.logining){alert("正在登录请稍后...")}else{if(!i.form&&r){i.form=r}if(i.form){var w=i.getRefer(),u=i.form.elements,q=u[k.name]?u[k.name].value:"",x=u[k.pass]?u[k.pass].value:"",s=u[k.expire]?u[k.expire].checked:false;if(f(q,x)){var t="loginName="+q;t+="&password="+encodeURIComponent(x);t+="&callBackMethod="+i.$name+".onLogin";if(s){t+="&expire="+1209600}if(w&&w!=""){t+="&refer="+w}var p=b.doLogin;p+=(p.indexOf("?")<0?"?":"&")+t+"&"+(new Date()).getTime();i.logining=true;i.loginTimer=function(){$clear(i.loginTimer);delete i.loginTimer;if(i.logining){i.logining=false;alert("登录超时,请刷新页面重试!")}}.delay(i.getOverTime());h.importJs(p)}}}};i.logout=function(s){if(s){n.preventDefault(s)}if(i.logouting){alert("正在退出请稍后...")}else{var r=i.getRefer();var q="redirect=0&callBackMethod="+i.$name+".onLogout";if(r&&r!=""){q+="&refer="+r}var p=b.doLogout;p+=(p.indexOf("?")<0?"?":"&")+q+"&"+(new Date()).getTime();i.logouting=true;i.logoutTimer=function(){$clear(i.logoutTimer);delete i.logoutTimer;if(i.logouting){i.logouting=false;alert("退出超时,请刷新页面重试!")}}.delay(i.getOverTime());h.importJs(p)}};i.onLogin=function(p,q){i.logining=false;$clear(i.loginTimer);delete i.loginTimer;if(p&&(parseInt(p.status)==227||parseInt(p.status)==229)){i.update();l();var r=i.getRedirect();if(r){window.location.href=r}i.fireEvent("login")}else{alert(p?p.msgText:"\u670d\u52a1\u5668\u5fd9");i.fireEvent("error",["login",p])}};i.onLogout=function(p,q){i.logouting=false;$clear(i.logoutTimer);delete i.logoutTimer;i.update();var r=i.getRedirect();if(r!=null&&r!=""){window.location.href=r}i.fireEvent("logout")};i.update=function(){var p=j();if(i.panel){if(p){i.panel.innerHTML=h.getTpl("TPL.LG.INFO").substitute({nick:p.nick,ico:p.smallIcon})}else{i.panel.innerHTML=h.getTpl("TPL.LG.BOX")||""}delete i.form}i.fireEvent("update",[p]);return i};i.setRedirect=function(p){this.redirectUrl=p;return this};i.getRedirect=function(){return this.redirectUrl};i.setRefer=function(p){this.referKey=p;return this};i.getRefer=function(){return this.referKey};i.setOverTime=function(p){i.overTime=p;return this};i.getOverTime=function(p){return i.overTime};i.init=function(p){i.panel=$(p);i.fireEvent("init");i.update();delete i.init}})(using("App.Logon"));
(function(c){var b=Ku6.Utils,d=Ku6.Event,a=Ku6.Cookie;c.max=30;c.url=Ku6.Urls.podcast+"/video.htm?t=getVideosByIds&cb="+c.$name+".build&ids=";c.key="QuickList";c.hash="qlist";c.addClass="plus";c.playClass="arrow";c.counter="qlCounter";c.list="listContainer";c.syncWait=500;c.loadDelay=3000;c.init=function(h){var f=(h||document).links,k;this.retrieve();var j=","+this.value.join(",")+",";for(var g=0,e=f.length;g<e;g++){k=f[g];if(b.hasClass(k,this.addClass)&&k.hash.length>1){k.className=(j.indexOf(","+k.hash.substr(1)+",")>-1)?this.playClass:this.addClass}}this.count()};c.count=function(){var f=$(this.counter);if(f){var e=this.value.length;f.innerHTML=e?("("+e+")"):"";f.style.display=e?"":"none"}};c.observe=function(){var e=this.value.join("");this.retrieve();if(e!=this.value.join("")){this.init();$clear(this.updater);this.updater=this.fetch.delay(this.loadDelay,this);if($type(this.onSync)=="function"){this.onSync()}}};c.toggle=function(g){if(g){d.preventDefault(g);var h=g.target||g.srcElement;if(h.hash.length>1){var f=h.hash.substr(1);if(this.contains(f)){this.play(f)}else{h.className=this.playClass;this.add(f,true)}}}};c.del=function(h,g){this.remove(g);if(h){d.preventDefault(h);var f=(h.target||h.srcElement).parentNode;if(f){f.parentNode.removeChild(f)}}};c.dels=function(f){if(f){d.preventDefault(f)}$splat(this.waitDel).each(function(g){this.remove(g);var e=$("v_"+g);if(e){e.parentNode.removeChild(e)}},this)};c.delAll=function(g){if(g){d.preventDefault(g)}this.clear();var f=$(this.list);if(f){f.innerHTML=""}};c.clear=function(){this.value=[];this.store("",-1)};c.contains=function(e,f){this.retrieve(f);return this.value.contains(e)};c.add=function(e,f){this.retrieve(f);if(this.value.length<this.max){if(!this.contains(e)){this.value.push(e);this.store(this.value.join(","))}}else{alert("抱歉，点播单添加失败：\t\t\n您的当前点播单中的视频数目已经达到上限("+this.max+")\n您可以移除某些视频后再添加。")}};c.remove=function(e,f){this.retrieve(f);if(this.contains(e)){this.value.erase(e);this.store(this.value.join(","))}};c.store=function(e,f){a.write(this.key,e,{duration:(f||366),domain:"ku6.com",path:"/"});this.count()};c.retrieve=function(e){if(!e||!this.value){this.value=a.read(this.key);this.value=(this.value?this.value.split(","):[])}return this.value};c.removed=function(){return true};c.render=function(e){this.init(e);this.fetch();this.observer=this.observe.periodical(this.syncWait,this)};c.delSelect=function(e,f){if(!this.waitDel){this.waitDel=[]}this.waitDel[f?"include":"erase"](e)};c.formatTime=function(g){var i=g%3600,e=Math.floor(g/3600),h=i?Math.floor(i/60):0,f=i-h*60;return(e?(e+":"):"")+(e&&h<10?"0":"")+h+":"+(f<10?"0":"")+f};c.build=function(j){this.data=j;if(j&&j.status==1){var h=[];if(!this.waitDel){this.waitDel=[]}for(var g=0,k=j.data.count;g<k;g++){var f=j.data.list[g],e=f?f.vid:this.value[g];if(f){h.push('<li id="v_'+e+'"><span class="time">'+this.formatTime(f.videoTime)+'</span><a href="#" title="从点播单中清除" class="delete" onclick="QuickList.del(event, \''+e+'\')"></a><span><a href="'+b.getVideoUrl(e)+'#qlist"><img src="http://'+(f.picPath||"").replace("http://","")+'" /></a></span><input type="checkbox" onclick="QuickList.delSelect(\''+e+"', this.checked)\" "+(this.waitDel.contains(e)?'checked="checked"':"")+'/> <a href="'+b.getVideoUrl(e)+"#"+this.hash+'">'+f.title+"</a></li>")}else{h.push('<li><span class="time">00:00</span><a href="#" title="从点播单中清除" class="delete" onclick="QuickList.del(event, \''+e+'\')"></a><span><a href="#" onclick="return false;"><img src="http://img.ku6.com/common/defcover/default_mv.gif" /></a></span><input type="checkbox" onclick="QuickList.delSelect(\''+e+"', this.checked)\" "+(this.waitDel.contains(e)?'checked="checked"':"")+"/> 视频不存在或已删除</li>")}}$(this.list).innerHTML=h.join("")}if(this.script&&this.script.parentNode){this.script.parentNode.removeChild(this.script);delete this.script}};c.fetch=function(){if(!this.value.length){this.build({data:{count:0,list:[]},status:1});return}var e=document.createElement("script");e.type="text/javascript";e.src=this.url+this.value.join(",")+"&"+(new Date()).getTime();document.getElementsByTagName("head")[0].appendChild(e);this.script=e};c.save=function(){};c.playAll=function(f){if(f){d.preventDefault(f)}this.retrieve();if(this.value[0]){this.play(0)}};c.play=function(e){window.top.location.href=b.getVideoUrl($type(e)=="string"?e:this.value[e])+"#"+this.hash}})(using("QuickList"));
(function(a){a.AutoCompleteTip=function(){this.initialize.apply(this,arguments)};a.AutoCompleteTip.UID=1;a.AutoCompleteTip.prototype={initialize:function(b){b=b||{};if(!b.name||window[b.name]){return window[b.name]}this.name=b.name;this.uid=a.AutoCompleteTip.UID++;this.options={minWidth:b.minWidth||280,size:b.size||10,fetchDelay:b.fetchDelay||500,autoFetch:!!b.autoFetch,autoHide:!!b.autoHide,hideDelay:b.hideDelay||0,action:b.action||null,input:b.input||null,onclick:b.onclick||null,zIndex:b.zIndex||300,boxCls:b.boxCls||"acBox",resultsCls:b.resultsCls||"acRs",resultCls:b.resultCls||"acR",resultFocusCls:b.resultFocusCls||"focus",keyCls:b.keyCls||"acRK",statCls:b.statCls||"acRC",closeCls:b.closeCls||"acC",prefix:b.prefix||"_ac_",statSuffix:b.statSuffix||" videos",closeLang:b.closeLang||" close",styleFix:!!b.styleFix};this.bound={};this.resultPrefix=this.options.prefix+this.uid+"r";if(this.options.input){this.inputEl=$(this.options.input)}this.bindEvents();return this},build:function(){if(!this.builded){var b=Ku6.Utils,d=Ku6.Event,c=this.options;d.add(window,"unload",this.destory.bind(this));this.el=document.createElement("div");document.body.appendChild(this.el);this.el.style.display="none";this.el.style.zIndex=c.zIndex;this.el.className=c.boxCls;this.el.style.width=Math.max(this.inputEl.offsetWidth,c.minWidth)+"px";this.el.innerHTML='<iframe style="position:absolute;top:0;left:0;height:100%;width:100%;z-index:-1;" frameborder="0"></iframe><ul class="'+c.resultsCls+'"></ul>';this.bound.elMouseOver=function(){if(this.inputEl){this.inputEl.focus()}if(this.autoHideTimer!=null){$clear(this.autoHideTimer)}}.bind(this);d.add(this.el,"mouseover",this.bound.elMouseOver);this.resultsEl=this.el.getElementsByTagName("ul")[0];if(this.resultsEl){this.bound.resultsMouseOver=function(h){h=h||event;var g=h.srcElement||h.target,f=g.tagName.toLowerCase();if(f=="ul"){return}if(f!="li"){g=g.parentNode}this.changeFocus(g)}.bind(this);d.add(this.resultsEl,"mouseover",this.bound.resultsMouseOver);this.bound.resultsMouseDown=function(h){h=h||event;if(h){d.stop(h)}var g=h.srcElement||h.target,f=g.tagName.toLowerCase();if(f=="ul"){return}if(f=="span"&&b.hasClass(g,c.closeCls)){this.hide();return}if(f!="li"){g=g.parentNode}if(b.hasClass(g,c.resultCls)){this.changeFocus(g).fillKey(g.getElementsByTagName("span")[1].innerHTML).hide();if(typeof c.onclick=="function"){c.onclick()}}}.bind(this);d.add(this.resultsEl,"mousedown",this.bound.resultsMouseDown)}this.builded=true;if(c.autoFetch===true){this.fetchDelayHD=(function(){this.fetch()}).delay(c.fetchDelay,this)}}return this},destory:function(){var c=Ku6.Event,b=this.bound;$clear(this.fetchDelayHD);$clear(this.autoHideTimer);if(this.inputEl){c.remove(this.inputEl,"keyup",b.inputKeyUp);c.remove(this.inputEl,"blur",b.inputBlur);delete b.inputKeyUp;delete b.inputBlur;this.inputEl=null}if(this.fetchEl){this.fetchEl.parentNode.removeChild(this.fetchEl);this.fetchEl=null}if(this.resultsEl){c.remove(this.resultsEl,"mouseover",b.resultsMouseOver);c.remove(this.resultsEl,"mousedown",b.resultsMouseDown);delete b.resultsMouseOver;delete b.resultsMouseDown;this.resultsEl=null}if(this.el){c.remove(this.el,"mouseover",b.elMouseOver);delete b.elMouseOver;this.el.parentNode.removeChild(this.el);this.el=null}},bindEvents:function(){var c=Ku6.Event,b=this.options;if(this.inputEl){this.inputEl.setAttribute("autocomplete","off");this.bound.inputKeyUp=function(f){var d=f.keyCode;if(d==38){this.scrollUp()}else{if(d==40){this.scrollDown()}else{if(this.inputEl.value.length==0){this.hide()}else{if(this.inputEl.value==this.lastSearch){this.show()}else{$clear(this.fetchDelayHD);this.fetchDelayHD=this.fetch.delay(b.fetchDelay,this)}}}}}.bindWithEvent(this);c.add(this.inputEl,"keyup",this.bound.inputKeyUp);c.add(this.inputEl,"focus",function(d){if(this.inputEl.value.length==0){this.hide()}else{this.show()}}.bindWithEvent(this));if(b.autoHide){this.bound.inputBlur=function(d){if(b.autoHide){if(b.hideDelay){this.autoHideTimer=this.hide.delay(b.hideDelay,this)}else{this.hide()}}}.bindWithEvent(this);c.add(this.inputEl,"blur",this.bound.inputBlur)}}return this},show:function(){if(!this.builded){this.build()}else{$clear(this.autoHideTimer);if(!this.showing){this.showing=true;if(this.inputEl){var d=Ku6.Utils,c=this.inputEl,e=d.getPosition(c),b=c.offsetHeight;if(this.options.styleFix){b=b-d.getComputedStyle(c,"marginTop").replace("px","")-d.getComputedStyle(c,"marginBottom").replace("px","")-d.getComputedStyle(c,"paddingTop").replace("px","")-d.getComputedStyle(c,"paddingBottom").replace("px","")}this.moveTo({left:e.x,top:e.y+b})}if(this.el){this.el.style.display=""}}}return this},hide:function(){if(this.showing){this.showing=false;if(this.el){this.el.style.display="none"}}return this},moveTo:function(b){if(this.el&&b){if(b.left){this.el.style.left=b.left+"px"}if(b.top){this.el.style.top=b.top+"px"}}return this},scrollUp:function(){return this.scroll(true)},scrollDown:function(){return this.scroll(false)},changeFocus:function(b){if(b&&b.className==this.options.resultCls){var c=this.resultPrefix;var d=document.getElementById(c+this.focusIndex);if(d){d.className=this.options.resultCls}b.className=this.options.resultCls+" "+this.options.resultFocusCls;this.focusIndex=parseInt(b.id.replace(c,""))}return this},scroll:function(d){if(!this.builded){this.build()}if(this.resultsEl){var b=this.resultsEl.getElementsByTagName("li");if(b.length>0){this.show();if(this.focusIndex>=0){b[this.focusIndex].className=this.options.resultCls}if(d){var c=this.focusIndex>=0?(this.focusIndex-1):(b.length-2)}else{var c=(this.focusIndex+2)>=b.length?-1:(this.focusIndex+1)}if(c>=0){b[c].className=this.options.resultCls+" "+this.options.resultFocusCls}this.focusIndex=c;this.fillKey(c>=0?b[c].getElementsByTagName("span")[1].innerHTML:this.lastSearch)}b=null}return this},fillKey:function(b){if(this.inputEl){this.inputEl.focus();this.inputEl.value=b;this.inputEl.select()}return this},fetch:function(){if(!this.inputEl||this.inputEl.value.length==0||this.inputEl.value==this.lastSearch){return}var b=this.inputEl.value;if(this.fetchEl){this.fetchEl.parentNode.removeChild(this.fetchEl);this.fetchEl=null}this.fetchEl=document.createElement("script");this.fetchEl.setAttribute("language","javascript");this.fetchEl.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(this.fetchEl);this.lastTime=(new Date()).getTime();var c=this.options.action;if(c){c+=c.indexOf("?")>=0?"&":"?";c+="key="+encodeURIComponent(b)+"&n="+this.name+".response&cp="+this.lastTime;this.fetchEl.src=c;this.onFetch(b)}},onFetch:function(b){this.lastSearch=b},response:function(b,c){if(typeof b=="object"&&this.lastTime==c&&(this.inputEl.value!="")){this.render(b)}},onEmpty:function(){this.hide().cleanResult()},cleanResult:function(){this.focusIndex=-1;if(this.resultsEl){this.resultsEl.innerHTML=""}},render:function(d){if(!this.builded){this.build()}if(!d||d.length==0){this.onEmpty()}else{if(this.resultsEl){var c=[];var e=this.options;for(var b=0,f=d.length;b<f;b++){c.push('<li id="'+this.resultPrefix+b+'" class="'+e.resultCls+'">');c.push('<span class="'+e.statCls+'">'+d[b].c+e.statSuffix+"</span>");c.push('<span class="'+e.keyCls+'">'+d[b].k+"</span>");c.push("</li>")}c.push('<li style="padding:0 3px;"><span class="'+e.closeCls+'">'+e.closeLang+"</span><span>&nbsp;</span></li>");this.resultsEl.innerHTML=c.join("");c=null;e=null;this.focusIndex=-1;this.show()}}}}})(using("Ku6.Plugin"));
(function(c){var e=Ku6.Event,a=Ku6.Events,f=Ku6.Browser;function b(h,g){var i=$(h);if(i&&i.style){i.style.display=(g===false?"none":"")}}function d(g){if(!g.runing){g.runing=true;g.stop();if(!g.FN){g.FN=function(){if(g.paused){return}var j=g.options,m=j.count;if(m<=0){g.stop();return}var h=g.index,l=(h<(m-1)?h+1:0),k=j.prefix;g.index=l;b(k+h,false);b(k+l)}}g.timer=g.FN.periodical(g.options.time)}}c.TimeSwitcher=function(g){this.options={prefix:"tt_",count:0,index:0,time:5000};this.initialize.call(this,g)};c.TimeSwitcher.prototype={initialize:function(g){$extend(this.options,g);var h=this.options;this.index=h.index||0;if(h.auto){this.start()}},start:function(){if(this.runing){return this}var h=this.options,g=this;if(h.count>1){if(!this.attached&&e){e.add(window,"unload",function(){e.remove(window,"unload",arguments.callee);g.stop(true)});this.attached=true}if(h.lazy&&!f.loaded){e.add(window,"domready",d.bind(this,[this]))}else{d(this)}}return this},pause:function(){this.paused=true},contine:function(){this.paused=false},stop:function(g){$clear(this.timer);this.timer=null;if(g){this.runing=false}}}})(using("Ku6.Plugin"));
