(function(){var c=this,f=c.JUI,e=c.$,b=1,d=JUI=c.JUI=c.$=function(g,h){if(g==c){return d.Window?new d.Window(g):c}if(d.Element){return d.Element(g,false)}return document.getElementById(g)};var a={initialize:function(l){l=l||{};var h=l.initialize;var g=l.legacy;var k=l.name||JUI.name;var j=h||g;var i=l.protect;var m=l.afterImplement||function(){};j.constructor=this.initialize;j.$family=k.toLowerCase();if(g&&h){j.prototype=g.prototype}j.prototype.constructor=j;j.prototype.$family=j.$family;var o=function(r,p,s,q){if(!i||q||!r.prototype[p]){r.prototype[p]=s}m.call(r,p,s);return r};j.alias=function(r,p,s){if(typeof r=="string"){if((r=this.prototype[r])){return o(this,p,r,s)}}for(var q in r){this.alias(q,r[q],p)}return this};j.genericize=function(q,p){if(typeof q=="string"){if((!p||!this[q])&&typeof this.prototype[q]=="function"){this[q]=function(){var s=Array.prototype.slice.call(arguments);return this.prototype[q].apply(s.shift(),s)}}return}for(var r=0;r<q.length;r++){this.genericize(q[r],p)}return this};j.implement=function(r,q,t){if(typeof r=="string"){return o(this,r,q,t)}for(var s in r){o(this,s,r[s],q)}return this}},genericize:function(g,h){g&&g.genericize(h)},implement:function(i,h){var g=i.length;while(g--){i[g].implement(h)}}};d.Native=a;(function(){var h={Array:Array,Boolean:Boolean,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String,JUI:d};for(var m in h){a.initialize({name:m,initialize:h[m],protect:true})}var l={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 k in l){for(var j=l[k].length;j--;){a.genericize(c[k],l[k])}}})();d.name="jui";d.version="1.0.0.0";d.expando="_JUI_"+new Date,d.type=function(g){if(g==undefined){return false}if(g.$family){return(g.$family=="number"&&!isFinite(g))?false:g.$family}if(g.nodeName){switch(g.nodeType){case 1:return"element";case 3:return(/\S/).test(g.nodeValue)?"textnode":"whitespace"}}else{if(typeof g.length=="number"){if(g.callee){return"arguments"}else{if(g.item){return"collection"}}}}return typeof g};d.empty=function(){};d.noConfilict=function(){c.$=e;return this};d.extend=function(k,i){if(!i){throw"Failed! Inherit from a null object"}var g=i.prototype,j=function(){};j.prototype=g;var h=new j();k.prototype=h;h.constructor=k;k.superclass=g;if(i!=Object&&g.constructor==Object.prototype.constructor){g.constructor=i}return k};d.now=function(){return +new Date};d.getUid=(c.ActiveXObject)?function(g){return(g[d.expando]||(g[d.expando]=[b++]))[0]}:function(g){return g[d.expando]||(g[d.expando]=b++)}})();(function(b){var a=(function(){var z={},p={},m={},f={"class":"className"},d=/^(?:(?:([-]?\d*)(n{1}))?([-+]?\d*)|(odd|even))$/,y=/((?:[_a-zA-Z][\w-]*)|\*)|(?:#([\w-]+))|(?:\.([\w-]+))|(?:\[([a-z]+\w*)+([~\|\^\$\*!]?=)?['"]?([^\]]*?)["']?\])|(?::([\-\w]+)(?:\(['"]?(.+?)["']?\))*)|(?:\s*((?:[>+~\s,])|$)\s*)/g;(function(){var E=document.createElement("div"),F=(new Date()).getTime();E.innerHTML='<a name="'+F+'" class="€ b"></a>';p.qsa=!!(E.querySelectorAll&&E.querySelectorAll(".€").length)})();function D(F){var E=b.getUid(F);return(z[E])?null:(z[E]=true)}function v(E){return true}function g(E){return E.replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&")}function q(E){return{combinator:E||" ",tag:"*",id:null,classes:[],attributes:[],pseudos:[]}}function x(H){if(m[H]){return m[H]}var G=[],K=[],E,F,J,I=sli=ci=ai=pi=0;E=q();y.lastIndex=0;while(F=y.exec(H)){if(F[1]){E.tag=F[1].toUpperCase()}else{if(F[2]){E.id=F[2]}else{if(F[3]){E.classes[ci++]=F[3]}else{if(F[4]){E.attributes[ai++]={key:F[4],op:F[5],value:F[6]}}else{if(F[7]){E.pseudos[pi++]={key:F[7],value:F[8]}}else{if(F[9]){K[I++]=E;if(F[9]==","){G[sli++]=K;K=[];I=0;J=null}else{J=F[9]}E=q(J);ci=ai=pi=0}else{break}}}}}}}K[I++]=E;G[sli++]=K;return m[H]=G}var A={" ":function(F,G,I,K){var H,L,J=0,E=I.length;H=G.getElementsByTagName(F);if(K){while(L=H[J++]){L.nodeType==1&&K(L)&&(I[E++]=L)}}else{while(L=H[J++]){L.nodeType==1&&(I[E++]=L)}}return I},">":function(F,G,I){var H,K,J=0,E=I.length;H=G.getElementsByTagName(F);while(K=H[J++]){K.parentNode==G&&(I[E++]=K)}return I},"+":function(F,G,H,I){var E=H.length;while(G=G.nextSibling){if(G.nodeType==1){G.tagName==F&&I(G)&&(H[E++]=G);break}}return H},"~":function(F,G,H,I){var E=H.length;while(G=G.nextSibling){if(G.nodeType==1){if(!I(G)){break}G.tagName==F&&(H[E++]=G)}}return H}};var k={" ":function(F,E){while(F=F.parentNode){if(F==E||(E==document&&F.documentElement)){return true}}return false},">":function(F,E){return F.parentNode==E},"+":function(F,E){while(F=F.previousSibling){if(F.nodeType!=1){continue}if(F==E){return true}else{if(F.tagName==F.tagName){return false}}}return false},"~":function(F,E){while(n=n.previousSibling){if(n==E){return true}}return false}};var j={"=":function(E){return E},"~=":function(E){return new RegExp("(?:^|\\s+)"+g(E)+"(?:\\s+|$)")},"!=":function(E){return E},"^=":function(E){return new RegExp("^"+g(E))},"$=":function(E){return new RegExp(g(E)+"$")},"*=":function(E){return new RegExp(g(E))},"|=":function(E){return new RegExp("^"+g(E)+"-?")}};var s={"=":function(E,F){return E==F},"~=":function(E,F){return F.test(E)},"!=":function(E,F){return E!=F},"^=":function(E,F){return F.test(E)},"$=":function(E,F){return F.test(E)},"*=":function(E,F){return F.test(E)},"|=":function(E,F){return F.test(E)}};var r={},t={};function u(H){if(r[H]){return r[H]}var F,G,E;F=H.match(d);switch(F[4]){case"even":G=2;E=0;break;case"odd":G=2;E=1;break;default:G=parseInt(F[1],10);G=isNaN(G)?(F[2]?1:0):G;E=parseInt(F[3],10);isNaN(E)&&(E=0);break}return(r[H]={a:G,b:E})}function i(F,J,L,M){var I,G,K,E,H=1;I=b.getUid(F);G=b.getUid(F.parentNode);E=t[G]||(t[G]={});if(!E[I]){while((F=F[L])){if(F.nodeType!=1||(M&&F.tagName!=M)){continue}K=E[b.getUid(F)];if(K){H=K+H;break}H++}E[I]=H}return J.a?E[I]%J.a==J.b:J.b==E[I]}function w(H,E){var G=H;while((G=G.previousSibling)){if(G.nodeType===1&&(!E||G.tagName==E)){return false}}var F=H;while((F=F.nextSibling)){if(F.nodeType===1&&(!E||F.tagName==E)){return false}}return true}var e={root:function(E){return E===E.ownerDocument.documentElement},"nth-child":function(F,E){return(E.a==1&&!E.b)?true:i(F,E,"previousSibling",false)},"nth-last-child":function(F,E){return(E.a==1&&!E.b)?true:i(F,E,"previousSibling",false)},"nth-of-type":function(F,E){return i(F,E,"previousSibling",F.tagName)},"nth-last-of-type":function(F,E){return i(F,E,"nextSibling",F.tagName)},"first-child":function(F){var E=F.parentNode.firstChild;while(E.nodeType!=1){E=E.nextSibling}return F===E},"last-child":function(E){while((E=E.nextSibling)){if(E.nodeType===1){return false}}return true},"first-of-type":function(G){var F=G.parentNode.firstChild,E=G.tagName;while(F.nodeType!=1||F.tagName!=E){F=F.nextSibling}return G===F},"last-of-type":function(F){var E=F.tagName;while((F=F.nextSibling)){if(F.nodeType==1&&F.tagName==E){return false}}return true},"only-child":function(E){return w(E)},"only-of-type":function(E){return w(E,E.tagName)},empty:function(E){return !E.firstChild},parent:function(E){return !!E.firstChild},enabled:function(){return node.disabled===false&&node.type!=="hidden"},disabled:function(){return node.disabled===true},checked:function(E){return E.checked===true},selected:function(E){E.parentNode.selectedIndex;return E.selected===true},visible:function(E){return E.offsetWidth>0||E.offsetHeight>0},hidden:function(E){return E.offsetWidth===0||E.offsetHeight===0},not:function(E,F){return !c(E,F)},contains:function(F,E){return E.test(F.innerText||F.textContent||"")},odd:function(E){return},even:function(E){return}};e.nth=e["nth-child"];e.index=e["nth-child"];var B={t:function(E){return x(E)},n:function(E){return new RegExp(g(E))},h:function(E){return u(E)}};var o={klass:function(E,F){var K,H=0,G=[],I=0,J;J=new RegExp("(?:^|\\s+)"+g(F)+"(?:\\s+|$)");while(K=E[H++]){J.test(K.className)&&(G[I++]=K)}return G},attribute:function(F,J){var G,H=0,I=[],E=0,L,M=f[J.key]||J.key,K=/^(?:src|href|action)$/.test(M)?2:0;if(J.op){L=j[J.op](J.value);while(G=F[H++]){s[J.op](G[M]||G.getAttribute(M,K),L)&&(I[E++]=G)}}else{while(G=F[H++]){((G[M]||G.getAttribute(M,K))!=null)&&(I[E++]=G)}}return I},pseudo:function(F,G){var E=G.value,J=G.key,L,I=0,H=[],K=0;E&&(E=B[J.charAt(2)](E));while(L=F[I++]){e[J](L,E)&&(H[K++]=L)}return H}};function C(I,K){var M=[],N,L=0,P,R=D,F=I.combinator,E=I.id,Q=I.tag,H=I.classes,J=I.attributes,O=I.pseudos;if(E){var G=document.getElementById(E);if(Q=="*"||G.tagName==Q){while(cxt=K[L++]){if(k[F](G,cxt)){M=[G];break}}}}else{if(Q){L=0;z={};if(K.length==1){R=false}while(cxt=K[L++]){M=A[F](Q,cxt,M,R)}}}if(H.length>(L=0)){while(P=H[L++]){M=o.klass(M,P)}}if(J.length>(L=0)){while(P=J[L++]){M=o.attribute(M,P)}}if(O.length>(L=0)){while(P=O[L++]){M=o.pseudo(M,P)}}return M}function l(G,H){var F=0,E;z={};t={};while(E=G[F++]){H=C(E,H)}return H}function h(E,J){var H=[],G=0,I,F=x(E);while(I=F[G++]){if(H.length>0){H=l(I,J).concat(H)}else{H=l(I,J)}}return H}function c(J,F){var H=0,I,G,K,E;F=F[0][0];if(F.id&&F.id!=J.id){return false}if(F.classes.length>(H=0)){while(I=F.classes[H++]){if(!(new RegExp("(?:^|\\s+)"+g(I)+"(?:\\s+|$)")).test(J.className)){return false}}}if(F.attributes.length>(H=0)){while(I=F.attributes[H++]){G=f[I.key];E=/^(?:src|href|action)$/.test(G)?2:0;G=J[G]||J.getAttribute(G,E);if(I.op){if(!s[I.op](G,j[I.op](I.value))){return false}}else{if(G==null){return false}}}}if(F.pseudos.length>(H=0)){while(I=F.pseudos[H++]){(K=I.value)&&(K=B[I.key.charAt(2)](K));if(!e[I.key](J,K)){return false}}}return true}return function(E,F){if(!E||typeof E!=="string"){return[]}F=F||document;if(F.nodeType!==1&&F.nodeType!==9){return[]}if(p.qsa){try{return F.querySelectorAll(E)}catch(G){return h(E,[F])}}else{return h(E,[F])}}})();b.Selector=a})(JUI);(function(e){var k={};(function(){var o=document.createElement("div"),q="_jui_"+(new Date()).getTime(),m;o.innerHTML='   <link/><table></table><a name="'+q+'" class="€ b" href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select>';k={opacity:(typeof o.style.opacity)!=="undefined"?true:false,innerText:(typeof o.innerText)!==undefined?true:false,leadingWhitespace:o.firstChild&&o.firstChild.nodeType==3,cssFloat:!(o.style.cssFloat===undefined),cloneEvent:false,tbody:false,htmlSerialize:false};if(o.getElementsByTagName){k.tbody=!!o.getElementsByTagName("tbody").length;k.htmlSerialize=!!o.getElementsByTagName("link").length}if(o.attachEvent&&o.fireEvent){o.attachEvent("onclick",function p(){k.cloneEvent=true;o.detachEvent("onclick",p)});o.cloneNode(true).fireEvent("onclick")}})();function i(m){return m.replace(/-\D/g,function(o){return o.charAt(1).toUpperCase()})}function d(m){return m.replace(/[A-Z]/g,function(o){return("-"+o.charAt(0).toLowerCase())})}var f={"class":"className","for":"htmlFor","float":k.cssFloat?"cssFloat":"styleFloat"},j={left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"},h={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};(function(){var A=["Top","Right","Bottom","Left"],r="margin",o="padding",z="border",t=A.length,w;while(w=A[--t]){var y=r+w,x=o+w,v=z+w;h[r][y]=j[y]="@px";h[o][x]=j[x]="@px";h[z][v]=j[v]="@px @ rgb(@, @, @)";var s=v+"Width",u=v+"Style",q=v+"Color";h[v]={};h.borderWidth[s]=h[v][s]=j[s]="@px";h.borderStyle[u]=h[v][u]=j[u]="@";h.borderColor[q]=h[v][q]=j[q]="rgb(@, @, @)"}})();var b={compact:true,nowrap:true,ismap:true,declare:true,noshade:true,checked:true,disabled:true,readonly:true,multiple:true,selected:true,noresize:true,defer:true};var c=function(m,u){if(u!==false){if(e.type(m)!=="string"){var o=[];for(var t in m){o.push(new c(t,m[t]))}return new a(o)}var s=l(document.createElement(m));if(u){if(u.style){s.css(u.style);delete u.style}if(u.html){s.html(u.html)}}s.attr(u);return s}if(e.type(m)!=="string"){return l(m)}var s,q,r=/^#([\w-]+)$/;if(r.test(m)||!e.Selector){return l(document.getElementById(m.replace("#","")))}else{q=e.Selector(m);return new a(q,false)}};var a=function(o){if(o&&o.$family!=="elements"){var m=0,s=[];while((s[m]=l(o[m++]))){}s.length--;var q=a.prototype;for(var r in q){s[r]=q[r]}o=s}return o};function l(m){if(m&&!m.$family&&!(/^object|embed$/i).test(m.tagName)){var o=c.prototype;for(var q in o){m[q]=o[q]}}return m}e.Native.initialize({name:"Element",initialize:c,protect:true,afterImplement:function(m,o){if(Array[m]){return}a.implement(m,function(){var p=[],t=true;for(var r=0,q=this.length;r<q;r++){var s=this[r][m].apply(this[r],arguments);p.push(s);if(t){t=(e.type(s)=="element")}}return(t)?new a(p,false):p})}});e.Native.initialize({name:"Elements",initialize:a,protect:true});function g(t){var u=/^<(\w+)\s*\/?>$/.exec(t);if(u){return document.createElement(u[1])}var v=[],q=[],m=document.createElement("div");t=t.replace(/(<(\w+)[^>]*?)\/>/g,function(y,z,x){return x.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?y:z+"></"+x+">"});var w=t.replace(/^\s+/,"").substring(0,10).toLowerCase();var p=!w.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!w.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||w.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!w.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!w.indexOf("<td")||!w.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!w.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!k.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];m.innerHTML=p[1]+t+p[2];while(p[0]--){m=m.lastChild}if(k.tbody){var o=/<tbody/i.test(t),s=!w.indexOf("<table")&&!o?m.firstChild&&m.firstChild.childNodes:p[1]=="<table>"&&!o?m.childNodes:[];for(var r=s.length-1;r>=0;--r){if((s[r].tagName=="TBODY")&&!s[r].childNodes.length){s[r].parentNode.removeChild(s[r])}}}if(!k.leadingWhitespace&&/^\s/.test(t)){m.insertBefore(document.createTextNode(t.match(/^\s*/)[0]),m.firstChild)}return m.firstChild}c.implement({hasClass:function(m){return(" "+this.className+" ").indexOf(" "+m+" ")>-1},addClass:function(m){if(!this.hasClass(m)){this.className=this.className===""?m:(this.className+" "+m)}return this},removeClass:function(m){this.className=this.className.replace(new RegExp("(^|\\s)"+m+"(?:\\s|$)","g"),"$1");return this},setStyle:function(r,s){if(r=="opacity"){s=parseFloat(s);if(k.opacity){this.style.opacity=s}else{this.style.filter=(this.style.filter||"").replace(/alpha\([^)]*\)/,"")+(s+""=="NaN"?"":"alpha(opacity="+s*100+")");this.zoom=1}if(s==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"}}else{if(this.style.visibility!="visible"){this.style.visibility="visible"}}return}r=f[r]||i(r);var q=e.type(s);if(q!="string"){s=(q!="array"&&q!="arguments")?[s]:s;var m=(j[r]||"@").split(" "),p=m.length,o;while(p--){o=s[p];if(!(o===0||o)){m[p]=""}else{m[p]=e.type(o)=="number"?m[p].replace("@",Math.round(o)):o}}s=m.join(" ")}else{if(s==""+Number(s)){s=Math.round(s)}}try{this.style[r]=s}catch(t){}return this},getStyle:function(q){if(q=="opacity"){if(k.opacity){return this.style.opacity}else{return this.style.filter&&this.style.filter.indexOf("opacity=")>=0?(parseFloat(this.style.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}}q=f[q]||i(q);var m=this.style[q];if(!(m===0||m)){m=[];for(var o in h){if(q!=o){continue}for(var p in h[o]){m.push(this.getStyle(p))}return m.join(" ")}if(this.currentStyle){return this.currentStyle[q]}var r=this.getDocument().defaultView.getComputedStyle(this,null);return(r)?r.getPropertyValue([d(q)]):null}return m},css:function(m,o){if(e.type(m)=="object"){for(var q in m){this.setStyle(q,m[q])}return this}if(o===undefined){return this.getStyle(m)}else{this.setStyle(m,o);return this}},getProperty:function(m){var o=f[m];var p=(o)?this[o]:this.getAttribute(m,2);return(b[m])?!!p:(o)?p:p||null},setProperty:function(m,p){var o=f[m];if(o&&b[m]){p=!!p}o?this[o]=p:this.setAttribute(m,""+p);return this},attr:function(m,p){if(e.type(m)=="object"){for(var o in m){this.setProperty(o,m[o])}return this}if(p===undefined){return this.getProperty(m)}else{this.setProperty(m,p);return this}},dimension:function(m){if(!(m===0||m)){return{width:this.offsetWidth,height:this.offsetHeight}}if(m.width!==undefined){this.css("width",m.width)}if(m.height!==undefined){this.css("height",m.height)}return this},position:function(r){if(r===undefined){if(this.parentNode===null||this.style.display=="none"){return false}if(this.getBoundingClientRect){box=this.getBoundingClientRect();var o=Math.max(document.documentElement.scrollTop,document.body.scrollTop);var p=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);return{x:box.left+p,y:box.top+o}}else{if(document.getBoxObjectFor){box=document.getBoxObjectFor(this);var m=(this.style.borderLeftWidth)?parseInt(this.style.borderLeftWidth):0;var q=(this.style.borderTopWidth)?parseInt(this.style.borderTopWidth):0;r=[box.x-m,box.y-q]}else{r=[this.offsetLeft,this.offsetTop];parent=this.offsetParent;if(parent!=this){while(parent){r[0]+=parent.offsetLeft;r[1]+=parent.offsetTop;parent=parent.offsetParent}}if(this.style.position=="absolute"){r[0]-=document.body.offsetLeft;r[1]-=document.body.offsetTop}}}if(this.parentNode){parent=this.parentNode}else{parent=null}while(parent&&parent.tagName!="BODY"&&parent.tagName!="HTML"){r[0]-=parent.scrollLeft;r[1]-=parent.scrollTop;if(parent.parentNode){parent=parent.parentNode}else{parent=null}}return{x:r[0],y:r[1]}}if(r.x!==undefined){this.css("left",r.x)}if(r.y!==undefined){this.css("top",r.y)}return this}});c.implement({getDocument:function(){return this.ownerDocument},getElement:function(m){var o=[];if(e.Selector){o=e.Selector(m,this)}else{o=this.getElementsByTagName(m)}return o[0]?new c(o[0],false):null},getElements:function(m){if(e.Selector){return new a(e.Selector(m,this),false)}else{return new a(this.getElementsByTagName(m),false)}}});c.implement({txt:function(m){if(m===undefined){return this[k.innerText?"innerText":"textContent"]}else{this.html(m.escapeHTML());return m}},html:function(m){if(m!==undefined){this.innerHTML=m}return this.innerHTML},clone:function(o){o=o!==false;if(k.cloneEvent){var m=this.outerHTML;if(!m){var p=this.ownerDocument.createElement("div");p.appendChild(this.cloneNode(o));m=p.innerHTML}return new c(g(m.replace(new RegExp(e.expando+'="(?:\d+|null)"',"g"),"").replace(/^\s*/,"")),false)}else{return new c(this.cloneNode(o),false)}},prepend:function(m){m=m.clone();if(this.firstChild){this.insertBefore(m,this.firstChild)}else{this.appendChild(m)}return m},append:function(m){m=m.clone();this.appendChild(m);return m},inject:function(m,o){if(o=="top"){return this.prependTo(m)}else{return this.appendTo(m)}},insert:function(m,o){if(o=="after"){return this.after(m)}else{return this.before(m)}},before:function(m){m=m.clone();this.parentNode.insertBefore(m,this);return m},after:function(m){m=m.clone();var o=this.parentNode;if(this.nextSibling){return o.insertBefore(m,this.nextSibling)}else{return o.appendChild(m)}},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this},empty:function(){var o=this.childNodes,m;for(var m=o.length;m>0;m--){o[m]&&e(o[m]).destroy()}return this},destroy:function(){this.empty();this.dispose();this.removeEvents();return null}});c.alias({dispose:"remove"});e.Element=c;e.Elements=a})(JUI);(function(c){var b={"8":"backspace","9":"tab","13":"enter","27":"esc","32":"space","38":"up","40":"down","37":"left","39":"right","46":"delete"};var a=function(d){if(d.$family==="event"){return d}var o=document,i=window,m=d.type;var j=d.target||d.srcElement;while(j&&j.nodeType==3){j=j.parentNode}if(/key/.test(m)){var e=d.which||d.keyCode;var p=b[e];if(m=="keydown"){var g=e-111;if(g>0&&g<13){p="f"+g}}p=p||String.fromCharCode(e).toLowerCase()}else{if(m.match(/(click|mouse|menu)/i)){o=(!o.compatMode||o.compatMode=="CSS1Compat")?o.documentElement:o.body;var l={x:d.pageX||d.clientX+o.scrollLeft,y:d.pageY||d.clientY+o.scrollTop};var f={x:(d.pageX)?d.pageX-i.pageXOffset:d.clientX,y:(d.pageY)?d.pageY-i.pageYOffset:d.clientY};if(m.match(/DOMMouseScroll|mousewheel/)){var k=(d.wheelDelta)?d.wheelDelta/120:-(d.detail||0)/3}var h=(d.which==3)||(d.button==2)}}return(function(r,q){for(var s in q){r[s]=q[s]}return r})(this,{event:d,type:m,page:l,client:f,rightClick:h,wheel:k,target:j,code:e,key:p,shift:d.shiftKey,control:d.ctrlKey,alt:d.altKey,meta:d.metaKey})};c.Native.initialize({name:"Event",initialize:a,protect:true});a.implement({stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this}});c.Event=a})(JUI);(function(b){var a=function(e){if(e&&!e.$family){var c=a.prototype;for(var d in c){e[d]=c[d]}}return e};b.Native.initialize({name:"Window",legacy:window.Window?window.Window:null,initialize:a,afterImplement:function(d,c){window[d]=a.prototype[d]=c}});a.implement({dimension:function(e){var d=0,c=0;if(typeof(window.innerWidth)=="number"){d=window.innerWidth;c=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){d=document.documentElement.clientWidth;c=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){d=document.body.clientWidth;c=document.body.clientHeight}}}if(!e){return{width:d,height:c}}if(e.width!==undefined&&e.height!==undefined){window.resizeTo(e.width,e.height)}else{if(e.width===undefined&&e.height!==undefined){window.resizeTo(d,e.height)}else{if(e.width!==undefined&&e.height===undefined){window.resizeTo(e.width,c)}}}return this},scrollPos:function(e){var d=0,c=0;if(typeof(window.pageYOffset)=="number"){c=window.pageYOffset;d=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){c=document.body.scrollTop;d=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){c=document.documentElement.scrollTop;d=document.documentElement.scrollLeft}}}if(!e){return{x:d,y:c}}return this}});new a(window);b.Window=a})(JUI);(function(c){var d=[],a={};c.Element&&d.push(c.Element);c.Window&&d.push(c.Window);function b(e,g){var f=e.length;while(f){if(e[f--]==g){return true}}return false}c.Native.implement(d,{cache:function(e,g){var f=c.getUid(this);if(e&&!a[f]){a[f]={}}if(g!==undefined){a[f][e]=g;return g}return e?a[f][e]:f},erase:function(e){var f=c.getUid(this);if(e){if(a[f]){delete a[f][e];e="";for(e in a[f]){break}(!e)&&this.erase()}}else{delete a[f]}return this}});c.Native.implement(d,{addEvent:function(i,h,k,j){var f=this.cache("events")||this.cache("events",{});k=k?k:this;f[i]=f[i]||{keys:[],values:[]};if(!j&&b(f[i].keys,h)){return this}var g=function(l){if(c.Event){l=new c.Event(l)}h.call(k,l)};if(i=="unload"){var e=g;g=function(){self.removeListener("unload",g);e()}}if(this.addEventListener){this.addEventListener(i,g,false)}else{this.attachEvent("on"+i,g)}f[i].keys.push(h);f[i].values.push(g);return this},removeEvent:function(k,j){var h=this.cache("events");if(!h||!h[k]){return this}if(!j){var g=0,e=h[k].keys;while(j=e[g++]){this.removeEvent(k,j)}delete h[k];k="";for(k in h){break}if(!k){this.erase()}else{this.cache("events",h)}return this}var m=-1,g=0,l;while(l=h[k].keys[g]){if(l==j){m=g;break}g++}if(m==-1){return this}h[k].keys.splice(m,1);j=h[k].values.splice(m,1)[0];if(this.removeEventListener){this.removeEventListener(k,j,false)}else{this.detachEvent("on"+k,j)}return this},addEvents:function(e){for(var f in e){this.addEvent(f,e[f])}return this},removeEvents:function(e){if(c.type(e)=="object"){for(var g in e){this.removeEvent(g,e[g])}return this}var f=this.cache("events");if(!f){return this}if(!e){for(var g in f){this.removeEvent(g)}this.erase("events")}else{this.removeEvent(e)}return this},fireEvent:function(j,h,f){var o=this.cache("events");if(!o||!o[j]){return this}var e=0,l=o[j],k,g,m=this;while(k=l[e++]){g=function(i){return function(){i.apply(m,h)}};setTimeout(g(k),f)}return this}})})(JUI);(function(a){a.browser={};(function(){a.browser={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var c=navigator.userAgent,b;if((/KHTML/).test(c)){a.browser.webkit=1}b=c.match(/AppleWebKit\/([^\s]*)/);if(b&&b[1]){a.browser.webkit=parseFloat(b[1]);if(/ Mobile\//.test(c)){a.browser.mobile="Apple"}else{b=c.match(/NokiaN[^\/]*/);if(b){a.browser.mobile=b[0]}}}if(!a.browser.webkit){b=c.match(/Opera[\s\/]([^\s]*)/);if(b&&b[1]){a.browser.opera=parseFloat(b[1]);b=c.match(/Opera Mini[^;]*/);if(b){a.browser.mobile=b[0]}}else{b=c.match(/MSIE\s([^;]*)/);if(b&&b[1]){a.browser.ie=parseFloat(b[1])}else{b=c.match(/Gecko\/([^\s]*)/);if(b){a.browser.gecko=1;b=c.match(/rv:([^\s\)]*)/);if(b&&b[1]){a.browser.gecko=parseFloat(b[1])}}}}}})()})(JUI);(function(b){var a=function(c){this.events=[];this.name=c};b.Native.initialize({name:"CustomEvent",initialize:a,protect:true});a.implement({fire:function(){var d=[];for(var e=0;e<arguments.length;e++){d.push(arguments[e])}for(var e=0,c=this.events.length;e<c;e++){var f=this.events[e];f[0].call(f[1],this.name,d)}},subscribe:function(d,c){this.events.push([d,c])},clear:function(){this.events=[]}});b.CustomEvent=a})(JUI);(function(d){function a(h,i){for(var g in i){h[g]=i[g]}return h}function c(i){var g=[];for(var h in i){g.push(encodeURIComponent(h)+"="+encodeURIComponent(i[h]))}return g.join("&")}function f(){var m,g=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],h=0,l;try{return new XMLHttpRequest()}catch(k){while(l=g[h++]){try{m=new ActiveXObject(l);return m}catch(j){}}}throw"can not initialize XMLHttpRequest"}function e(o){var k=o.getAllResponseHeaders(),h={},p=k.split("\n"),j=0,q;while(q=p[j++]){if(q.length==0){continue}var l=q.indexOf(":"),g=q.substring(0,l).replace(/^\s*|\s*$/,""),m=q.substring(l+1).replace(/^\s*|\s*$/,"");h[g]=m}return h}var b=function(h){var g={url:null,method:"GET",data:null,async:true,encoding:"utf-8",encode:true,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},timeout:120,cache:false,link:"ignore",type:"xhr",bind:null,onStateChange:d.empty,onTimeout:d.empty,onStart:d.empty,onEnd:d.empty,onSuccess:d.empty,onFailure:d.empty,onCancel:d.empty};h=h||{};if(h.headers){h.headers=a(g.headers,h.headers)}g=a(g,h);this.options=g;this.xhr=f();this.running=false;this.timeoutId=null;this.timeouted=false;return this};d.Native.initialize({name:"Ajax",initialize:b,protect:true});b.implement({setHeader:function(g,h){this.options.headers[g]=h;return this},setHeaders:function(g){this.options.headers=a(this.options.headers,g);return this},send:function(t){if(d.type(t)=="string"){t={url:t}}t=t||{};if(t.headers){t.headers=a(this.options.headers,t.headers)}this.options=a(this.options,t);if(arguments.length==2&&typeof arguments[1]=="string"){this.options.type=arguments[1]}var r=this.options;var m=r.data,i=r.url,g=r.method.toUpperCase(),s=false;if(!i||i==""){throw"url is empty"}this.running=true;s=i.indexOf("?")>-1;m=c(m);if(m!=""&&g=="GET"){i=i+(s?"&":(s=true,"?"))+m;m=null}if(!r.cache){i=i+(s?"&":"?")+new Date().getTime()}if(r.encode&&g=="POST"){var j=(r.encoding)?"; charset="+r.encoding:"";r.headers["Content-type"]="application/x-www-form-urlencoded"}this.xhr.open(g,i,r.async);var q=r.headers;for(var o in q){try{this.xhr.setRequestHeader(o,q[o])}catch(p){}}function l(){if(this.timeouted){r.onTimeout.call(r.bind,i)}if(this.xhr.readyState==4){try{clearTimeout(this.timeoutId)}catch(u){}this.status=this.xhr.status;try{if(r.type=="header"||r.type=="headers"){r.onSuccess.call(r.bind,e(this.xhr))}else{if(this.xhr.status==200){var h=this.xhr;switch(r.type){case"text":case"html":h=this.xhr.responseText;break;case"json":h=window["eval"]("("+this.xhr.responseText+")");break;case"xml":h=this.xhr.responseXML;break}r.onSuccess.call(r.bind,h)}else{r.onFailure.call(r.bind,this.xhr.status)}}}catch(u){r.onFailure.call(r.bind,-1)}r.onEnd.call(r.bind,i)}r.onStateChange(this.xhr,i)}var k=(function(h){return function(){l.call(h)}})(this);this.xhr.onreadystatechange=k;this.timeoutId=setTimeout((function(h){return function(){h.timeouted=true;h.xhr.abort();h.running=false;h.xhr.onreadystatechange=d.empty}})(this),r.timeout*1000);r.onStart.call(r.bind,i);this.xhr.send(m);if(!r.async){k()}return this},get:function(g){this.send(g,"xhr");return this},post:function(g){this.send(g,"xhr");return this},json:function(g){this.send(g,"json");return this},text:function(g){this.send(g,"text");return this},xml:function(g){this.send(g,"xml");return this},headers:function(g){this.send(g,"headers");return this},cancel:function(){if(!this.running){return this}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=d.empty;return this}});d.Ajax=b})(JUI);(function(e){var g={},a,c=1,b="jui_cb_";var f=function(h){a=h;return this};e.Native.initialize({name:"Loader",initialize:f,protect:true});function d(r){r=r||a||{};var h,j,p="js",q=e.empty,k,o,i;h=r.url;p=r.type;j=r.charset;q=r.callback;o=r.bind;k=r.param;i=r.cache;if(!h||h==""){return}try{if(k&&q){e.Loader[b+c]=function(){q.apply(o,arguments)};if(h.indexOf("?")>-1){h=h+"&cb=JUI.Loader."+b+c}else{h=h+"?cb=JUI.Loader."+b+c}if(!i){h=h+"&r="+Math.random()}c++}var l;if(p=="css"){l=document.createElement("link");l.rel="stylesheet";l.type="text/css";l.href=h}else{l=document.createElement("script");l.src=h;l.type="text/javascript"}j&&(l.charset=j);if(!k&&q){l.onload=function(){q.apply(o,[h,true])};l.onerror=function(){q.apply(o,[h,false])};l.onreadystatechange=function(){if(l.readyState=="loaded"){q.apply(o,[h,true])}}}g[h]=l;document.getElementsByTagName("head")[0].appendChild(l)}catch(m){q(h,false)}}f.implement({load:function(k){if(!k){k=[a]}else{if(e.type(k)!="array"){k=Array.prototype.slice.call(arguments,0)}}var h=0,j;while(j=k[h++]){d(j)}return this},chain:function(j){if(e.type(j)!="array"){j=Array.prototype.slice.call(arguments,0)}if(!j||j.length==0){return}var i=j.shift(),h=this;cb=function(k,m){m.callback(m.url);h.chain(k)};this.load({url:i.url,type:i.type,callback:cb(j,i)})},cancel:function(h){if(!g[h]){return}document.removeChild(g[h]);delete g[h]}});e.Loader=f})(JUI);(function($){var special={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function replaceChars(chr){return special[chr]||"\\u00"+Math.floor(chr.charCodeAt()/16).toString(16)+(chr.charCodeAt()%16).toString(16)}var JSON={decode:function(s){if($.type(s)!="string"||!s.length){return null}return eval("("+s+")")},encode:function(obj){var s=[];switch($.type(obj)){case"undefined":return"undefined";break;case"null":return"null";break;case"number":case"boolean":case"date":case"function":return obj.toString();break;case"string":return'"'+obj.replace(/[\x00-\x1f\\"]/g,replaceChars)+'"';break;case"array":for(var i=0,l=obj.length;i<l;i++){s.push($.JSON.encode(obj[i]))}return"["+s.join(",")+"]";break;case"error":case"object":for(var p in obj){s.push('"'+p.replace(/[\x00-\x1f\\"]/g,replaceChars)+'":'+$.JSON.encode(obj[p]))}return"{"+s.join(",")+"}";break;default:return"";break}}};$.JSON=JSON})(JUI);(function(d){var a={encode:false,decode:false,path:false,domain:false,duration:false,secure:false,document:document};function c(e){for(var f in e){a[f]=e[f]}}var b={write:function(g,h,f){c(f);if(a.encode){h=encodeURIComponent(h)}if(a.domain){h+="; domain="+a.domain}if(a.path){h+="; path="+a.path}if(a.duration){var e=new Date();e.setTime(e.getTime()+a.duration*24*3600000);h+="; expires="+e.toGMTString()}if(a.secure){h+="; secure"}a.document.cookie=g+"="+h;return this},read:function(f,e){c(e);var g=a.document.cookie.match("(?:^|;)\\s*"+f.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")+"=([^;]*)");if(a.decode){return(g)?decodeURIComponent(g[1]):null}else{return(g)?g[1]:null}},remove:function(f,e){c(e);a.duration=-1;b.write(f,"");return this}};d.Cookie=b})(JUI);(function(b){var a=function(h,d,f,j){if(h.length!=d.length){alert("JUI:TabView  参数 [tabs] [views] 包含的element.length不相等");return}this.ops={tabTriggerEvent:"mouseover"};this.mergeOptions(j);for(var g=0,c=h.length;g<c;g++){h[g].attr("jsvalue",g)}this.selectedTabIx=0;var e=this;h.addEvent(this.ops.tabTriggerEvent,function(k){var i=parseInt(this.attr("jsvalue"));f(h[e.selectedTabIx],this);d[e.selectedTabIx].css("display","none");e.selectedTabIx=i;d[e.selectedTabIx].css("display","block")})};b.Native.initialize({name:"TabView",initialize:a,protect:true});a.implement({mergeOptions:function(c){for(var d in c){this.ops[d]=c[d]}}});b.TabView=a})(JUI);(function(d){var c="pplive.com";if(document.domain.toLowerCase().indexOf("pptv.com")!=-1){c="pptv.com"}var e={login:"http://passport.pptv.com/weblogin.do?",addFavor:"http://bk.pptv.com/xihttp/ikan2/favor/json/post/?",favorCheck:"http://bk.pptv.com/xihttp/ikan2/favor/json/check/?",like:"http://bk.pptv.com/xihttp/ikan2/score/json/post/?",likeCheck:"http://bk.pptv.com/xihttp/ikan2/score/json/check/?"};var f=false,b=true;var a={onLogined:new d.CustomEvent("onLogined"),onlogouted:new d.CustomEvent("onlogouted"),userInfo:{Gender:"",PpNum:"",ExpNum:"",LevelName:"",NextLevelName:"",NextLevelExpNum:"",Area:"",Subscribe:"",UnreadNotes:"",HeadPic:"",Email:"",OnlineTime:"",UserName:""},tryReadUserInfo:function(){var l=d.Cookie.read("UDI");var j=d.Cookie.read("PPName");if(l==null||j==null){this.onlogouted.fire();return}var h=j.split("$");this.userInfo.UserName=decodeURIComponent(h[0]);var i=l.split("$");var g=0;for(var k in this.userInfo){if(k=="UserName"){break}this.userInfo[k]=decodeURIComponent(i[g]);g++}f=true;this.onLogined.fire(this.userInfo)},wirteUserInfo:function(i){var g={domain:c,path:"/",duration:7};for(var h in i){d.Cookie.write(h,i[h],g)}},logout:function(){var g={domain:c,path:"/"};d.Cookie.remove("PPKey",g);d.Cookie.remove("UDI",g);d.Cookie.remove("PPName",g);f=false;this.onlogouted.fire()},login:function(i,j){var g=this;var h=e.login+"username="+i+"&password="+j;new d.Loader({url:h,type:"js",callback:function(k,l){g.loginFnc(k,l)},param:true}).load()},loginFnc:function(g,h){if(g==0){alert(h);return}if(g==1){this.usernameel.value="";this.userpwdel.value="";this.hideLoginBox();this.wirteUserInfo(h)}this.tryReadUserInfo()},checkLogined:function(){return f},showLoginBox:function(h){if(b){b=false;this.boxel=d("#loginBox");this.btnpostel=this.boxel.getElement(".btnPost");this.usernameel=this.boxel.getElement(".userName");this.userpwdel=this.boxel.getElement(".userPwd");this.usernameel.value="";this.userpwdel.value="";d(document).addEvent("click",function(j){if(j.target.getAttribute("stopdocumentclick")==null){this.hideLoginBox()}},this);this.boxel.addEvent("click",function(j){if(j.target.tagName!="A"){j.stop()}});this.btnpostel.addEvent("click",function(j){this.checkLoginForm()},this);this.usernameel.addEvent("keydown",function(j){if(j.key=="enter"){this.checkLoginForm()}},this);this.userpwdel.addEvent("keydown",function(j){if(j.key=="enter"){this.checkLoginForm()}},this)}this.boxel.css({display:"block"});var g=0;var i=0;g=h.x;i=h.y;this.boxel.css({top:i,left:g});this.usernameel.focus()},hideLoginBox:function(){this.boxel.css("display","none")},checkLoginForm:function(){if(this.usernameel.value.length==0){this.usernameel.focus();return}if(this.userpwdel.value.length==0){this.userpwdel.focus();return}this.login(this.usernameel.value,this.userpwdel.value)},favor:function(j,i,k,g){var h=(j=="add"?e.addFavor:e.favorCheck)+"type="+i+"&id="+k;new d.Loader({url:h,type:"js",callback:function(l){g(l)},param:true}).load()},like:function(k,i,l,j,g){var h=(k=="add"?e.like:e.likeCheck)+"type="+i+"&id="+l+"&attitude="+j;new d.Loader({url:h,type:"js",callback:function(m){g(m)},param:true}).load()}};if(typeof d.IKan=="undefined"){d.IKan={}}d.IKan.User2=a})(JUI);(function(d){function h(j,i){for(var k in j){if(typeof i[k]!="undefined"){j[k]=i[k]}}}function a(k){var i=[];for(var j in k){i.push(j+"="+encodeURIComponent(k[j]))}return i.join("&")}var g={checkCodeImg:"http://bk.{0}/checkcode/",getList:"http://bk.{0}/xihttp/ikan2/comment/json/get/?",post:"http://bk.{0}/xihttp/ikan2/comment/json/post/?",up:"http://bk.{0}/xihttp/ikan2/comment/json/post/up/?",report:"http://bk.{0}/addreport/",userHome:"http://home.pptv.com/callerhome/"};var b=document.domain;var c="pplive.com";if(b!=""){c=b.indexOf("pptv.com")!=-1?"pptv.com":c}for(var f in g){g[f]=g[f].replace("{0}",c)}var e={isOneGetCheckCode:true,replyId:null,listCount:0,pageCount:0,onPost:new d.CustomEvent("onPost"),timeLine:0,episodeId:"",setUrls:function(i){g=i},rebind:function(i){this.cnf={type:null,id:null,num:20,ipage:1};h(this.cnf,i);this.getList()},init:function(k,l,j){this.cnf={type:null,id:null,num:20,ipage:1};h(this.cnf,l);this.ops={contentMaxLength:100,pageNumSplit:" | "};if(j){h(this.ops,j)}d.IKan.User2.onLogined.subscribe(this.onLogined,this);d.IKan.User2.onlogouted.subscribe(this.onlogouted,this);this.lsboxel=k.getElement("div.CommentList");this.count_els=k.getElements(".CommentCount");this.pageNumInfo_els=k.getElements(".PageNum .AllNum");this.pageList_els=k.getElements(".PageNum .PageList");this.btnRef_els=k.getElements(".btnRef");var i=k.getElement("div.inquote");this.lsItemQuoteTp=i.html();i.innerHTML="{Replies_HTML}";this.lsItemTp=this.lsboxel.html();this.lsboxel.html("");this.form_btnLogout_el=k.getElement("a.btnLogout");this.form_btnLogin_el=k.getElement("a.btnLogin");this.form_userName_el=k.getElement("a.userName");this.form_ckNotUser_el=k.getElement("input.ckNotUser");this.form_txtContent_el=k.getElement("textarea.txtContent");this.form_btnPost_el=k.getElement("input.btnPost");this.form_txtCheckCode_el=k.getElement("input.txtCheckCode");this.form_imgCheckCode_el=k.getElement("img.imgCheckCode");this.form_refCheckCode_el=k.getElement("a.refCheckCode");this.form_userName_el.css("display","none");this.form_btnLogout_el.css("display","none");this.form_ckNotUser_el.checked=true;this.form_ckNotUser_el.css("display","none");this.form_txtContent_el.value="";this.form_txtCheckCode_el.value="";this.bindEvent();this.getList()},onLogined:function(k,j){var i=j[0];this.form_ckNotUser_el.checked=false;this.form_userName_el.html(i.UserName);this.form_userName_el.css("display","");this.form_btnLogout_el.css("display","");this.form_ckNotUser_el.css("display","");this.form_btnLogin_el.css("display","none")},onlogouted:function(j,i){this.form_ckNotUser_el.checked=true;this.form_userName_el.css("display","none");this.form_btnLogout_el.css("display","none");this.form_ckNotUser_el.css("display","none");this.form_btnLogin_el.css("display","")},bindEvent:function(){this.form_refCheckCode_el.addEvent("click",function(i){this.refCheckCodeImg();this.form_txtCheckCode_el.focus();this.form_txtCheckCode_el.select();i.stop()},this);this.form_txtCheckCode_el.addEvent("focus",function(){if(this.isOneGetCheckCode){this.refCheckCodeImg()}},this);this.form_txtContent_el.addEvent("keydown",function(i){if(i.key=="enter"&&i.control){this.post();i.stop()}},this);this.form_txtCheckCode_el.addEvent("keydown",function(i){if(i.key=="enter"&&i.control){this.post();i.stop()}},this);this.form_btnPost_el.addEvent("click",function(i){this.post();i.stop()},this);this.form_btnLogin_el.addEvent("click",function(i){var j=this.position();d.IKan.User2.showLoginBox(j);i.stop()});this.form_btnLogout_el.addEvent("click",function(i){d.IKan.User2.logout()});this.btnRef_els.addEvent("click",function(i){this.getList();i.stop()},this)},post:function(){var i=this;var l=this.form_txtContent_el.value;var m=false;var k=l.match(/\[回复 \S* 的发言\]/g);if(k){l=l.replace(k,"");if(this.replyId!=null){m=true}}if(l.length==0){this.form_txtContent_el.focus();return}if(this.form_txtCheckCode_el.value.length==0){this.form_txtCheckCode_el.focus();return}var p={notbkuser:this.form_ckNotUser_el.checked?1:0,content:l.substring(0,this.ops.contentMaxLength),checkcode:this.form_txtCheckCode_el.value};this.onPost.fire();if(m){p.cid=this.replyId}else{p.timeline=this.timeLine;p.episodeid=this.episodeId}var j=g.post+a(this.cnf)+"&"+a(p);this.timeLine=0;this.episodeId="";new d.Loader({url:j,type:"js",callback:function(o){i.postFnc(o)},param:true}).load()},postFnc:function(i){if(i.Status==1){this.refCheckCodeImg();this.form_txtCheckCode_el.value="";this.form_txtContent_el.value="";this.replyId=null;this.cnf.ipage=1;this.getList()}else{alert(i.Msg)}},refCheckCodeImg:function(){this.isOneGetCheckCode=false;this.form_imgCheckCode_el.src=g.checkCodeImg+"?v="+Math.random()},getList:function(){this.lsboxel.html("评论加载中...");var i=this;var j=g.getList+a(this.cnf);new d.Loader({url:j,type:"js",callback:function(k){i.fillList(k)},param:true}).load()},fillList:function(m){if(m.Status==0){this.lsboxel.html("");return}if(this.count_els.length>0){this.count_els.html(m.Data.CommentCount)}this.listCount=m.Data.CommentCount;var l=[];for(var k=0,j=m.Data.Comments.length;k<j;k++){l.push(this.parseItem(m.Data.Comments[k]))}this.lsboxel.html(l.join(""));this.updatePagePanel()},updatePagePanel:function(){if(this.pageNumInfo_els.length>0){this.pageNumInfo_els.html("第"+((this.cnf.ipage-1)*this.cnf.num)+"-"+(this.cnf.ipage*this.cnf.num)+"条 共"+this.listCount+"条")}if(this.pageList_els.length==0){return}this.pageCount=Math.ceil(this.listCount/this.cnf.num);var j=[];var l=this.cnf.ipage;var o=1;var k=this.pageCount;o=l-3;k=l+3;if(o<1){o=1;k=this.pageCount>7?7:this.pageCount}if(k>this.pageCount){o=this.pageCount-6;k=this.pageCount}if(l!=1){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange(-1);return false;">上一页</a>')}if(l>4&&this.pageCount>7){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange(1);return false;">1</a>');j.push("...")}if(o<1){o=1}for(var m=o;m<=k;m++){if(l==m){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange('+m+');return false;" class="now" style="font-weight:bold;color:orange;">'+m+"</a>")}else{j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange('+m+');return false;">'+m+"</a>")}}if(l<this.pageCount-3&&this.pageCount>7){j.push("...");j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange('+this.pageCount+');return false;">'+this.pageCount+"</a>")}if(l!=this.pageCount&&this.pageCount!=0){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange(-2);return false;">下一页</a>')}this.pageList_els.html(j.join(this.ops.pageNumSplit))},pageChange:function(i){if(i==-1){this.cnf.ipage--}else{if(i==-2){this.cnf.ipage++}else{this.cnf.ipage=i}}this.getList()},parseItem:function(t){var o=[];if(t.Replies.length>0){for(var l=0,m=t.Replies.length;l<m;l++){o.push(this.parseItemQuote(t.Replies[l]))}t.quote_begin="";t.quote_end=""}else{t.quote_begin="<!--";t.quote_end="-->"}t.Replies_HTML=o.join("");var q=t.UserName;var k=t.UserFace;var r=this.checkLoginUser(q);if(typeof t.UserLink!="undefined"){t.UserName_HTML='<span><a href="'+t.UserLink+'" target="_blank">'+q+"</a></span>";t.UserFace_HTML='<a href="'+t.UserLink+'" target="_blank"><img src="'+k+'" width="40" height="40" /></a>'}else{t.UserName_HTML=q;t.UserFace_HTML='<img src="'+k+'" width="40" height="40" />'}var u=this.lsItemTp;for(var j in t){u=u.replace(new RegExp("\\{(\\w*)\\}","g"),function(){var i=arguments[1];if(typeof t[i]=="undefined"){return arguments[0]}return t[i]})}return u},parseItemQuote:function(k){var j=this.lsItemQuoteTp;var l=k.UserName;var i=k.UserFace;var o=this.checkLoginUser(l);if(o){k.UserName_HTML='<span><a href="'+g.userHome+l+'" target="_blank">'+l+"</a></span>";k.UserFace_HTML='<a href="'+g.userHome+l+'" target="_blank"><img src="'+i+'" width="20" height="20" /></a>'}else{k.UserName_HTML=l;k.UserFace_HTML='<img src="'+i+'" width="20" height="20" />'}for(var m in k){j=j.replace(new RegExp("\\{(\\w*)\\}","g"),function(){var p=arguments[1];if(typeof k[p]=="undefined"){return arguments[0]}return k[p]})}return j},checkLoginUser:function(i){return i.match(/\d*.\d.*/g)?false:true},ref:function(){this.getList()},reply:function(j,i){this.replyId=j;this.form_txtContent_el.value="xxx";this.form_txtContent_el.focus();this.form_txtContent_el.value="[回复 "+i+" 的发言]\n";this.form_txtContent_el.focus()},report:function(i){window.open(g.report+this.cnf.type+"/"+43180+"/"+i)},up:function(l,k){var i=this;var j=g.up+"type="+this.cnf.type+"&cid="+l;new d.Loader({url:j,type:"js",callback:function(m){if(m.Status==1){if(k!=null){k.html(parseInt(k.html())+1);k.css("color","red")}alert("支持成功!")}else{alert(m.Msg)}},param:true}).load()}};if(typeof d.IKan=="undefined"){d.IKan={}}d.IKan.Comment=e})(JUI);var PPLiveActiveX=function(e){var r=false,f=false,a=false;var g="100%",C="100%";var d=null,b="",v="";function k(){}var q=e.ready?e.ready:k;var l=e.boot?e.boot:k;var i=e.installing?e.installing:k;var x=e.notSupport?e.notSupport:k;var j=e.checkInterval?e.checkInterval:3000;var m=e.readyInterval?e.readyInterval:200;var u=e.checkVersion?e.checkVersion:k;var B=e.notInstall?e.notInstall:k;var z=function(){this.initSettings={};this.set=function(p,E){this.initSettings[p]=E;return this};this.setProperties=function(E){for(var F in E){this.set(F,E[F])}};this.get=function(E){var p=this.initSettings[E];p=p?p:"";return p}};var s=new z();s.setProperties({id:"PPLivePlayerActiveX",width:"1px",height:"1px",codebase:"http://dl.pplive.com/PluginSetup.cab"});var o=new z();o.setProperties({logourl:"http://static1.pplive.cn/ikan3/090512/player/playerbg.jpg",logoposition:"center",dbclicktofullscreen:true,showcontextmenu:true,showstateinfo:true,showchannelname:true,showplayerbuffer:true,showdownloadbuffer:true,showdownloadrate:true,showplaycontroller:true,showplayprogress:true,showloadingad:false,showadcountdown:false,adcfgurl:"",enableupdate:"true",enableupdatetip:"true",updateurl:"",url:"",forceversion:"2.3.6.0007",skinpath:"skins\\Default"});if(e!=null){var c=e.properties;for(var t in c){switch(t.toLowerCase()){case"id":s.set("id",c[t]);case"width":g=c[t];break;case"height":C=c[t];break;case"codebase":s.set("codebase",c[t]);break;default:t=t.toLowerCase();o.set(t,c[t]);break}}var A=e.params;for(var t in A){o.set(t.toLowerCase(),A[t])}}this.setAttribute=function(p,E){s.set(p.toLowerCase(),E);return this};this.setAttributes=function(E){for(var p in E){s.set(p.toLowerCase(),E[p])}return this};this.setParam=function(p,E){o.set(p.toLowerCase(),E);return this};this.setParams=function(F){for(var E in F){o.set(E.toLowerCase(),F[E])}return this};function D(){var F=['<object classid="CLSID:ef0d1a14-1033-41a2-a589-240c01edc078"'];for(var E in s.initSettings){F.push([" ",E,'="',s.get(E),'"'].join(""))}F.push(">");for(var G in o.initSettings){F.push(['<param name="',G,'" value="',o.get(G),'">'].join(""))}F.push("</object>");return F.join("")}this.write=function(p){if(typeof(p)=="string"){d=document.getElementById(p)}else{d=p}if(navigator.userAgent.search("MSIE")<=0){d.innerHTML="<p>对不起，目前PPLive网页插件（98KB）暂不支持Firefox、Opera等浏览器，请使用IE观看，谢谢^_^</p>";x();return}v=d.innerHTML;b=D();d.innerHTML=b;w();return this};this.getPlayer=function(){return _player};function w(){_player=document.getElementById(s.get("id"));if((_player||0).IsReady!=undefined){this.installed=true;while(d.children.length>1){var p=d.removeChild(d.children[0]);delete p}_player.style.width=g;_player.style.height=C;u(_player.version);h()}else{if(!f){d.innerHTML=v+b;f=true;B()}setTimeout(w,j)}}function h(){if(_player.IsReady){try{_player.onFrameInstall=null}catch(p){}q(_player)}else{if(_player.IsReady!=undefined&&!a){_player.onFrameInstall=y;a=true;l(_player);setTimeout(h,m)}else{setTimeout(h,m)}}}function y(p,E){try{i(p,E)}catch(F){}}return this};(function(b){window.DEBUG=1;window.log=function(i){if(window.console&&DEBUG){console.log(i)}};window.info=function(i){if(window.console&&DEBUG){console.info(i)}};window.warn=function(i){if(window.console&&DEBUG){console.warn(i)}};window.err=function(i){if(window.console&&DEBUG){console.error(i)}};var e={ie:b.browser.ie>0,ie6:b.browser.ie==6,ie7:b.browser.ie==7,ie8:b.browser.ie==8};for(var a in e){window[a]=e[a]}var j=["mouseover","mousedown","mouseup","click","dblclick","mouseout","mousemove","keypress","keyup","keydown"];var g={};var h=function(i){return function(k){return this.addEvent(i,k)}};for(var c=0;c<j.length;c++){var d=j[c];g[d]=h(d)}b.Element.implement(g);b.Window.implement(g);b.Element.implement({hover:function(i,k){return this.mouseover(i).mouseout(k)}});b.Element.implement({show:function(){return this.css("display",this.cache("__display__"))},hide:function(){this.cache("__display__",this.css("display"));return this.css("display","none")},appendTo:function(i){return i.append(this)}});b.Window.implement({width:function(i){if(i){this.dimension({width:i})}else{return this.dimension().width}},height:function(i){if(i){this.dimension({height:i})}else{return this.dimension().height}},scroll_left:function(i){if(i){this.scrollPos({x:i})}else{return this.scrollPos().x}},scroll_top:function(i){if(i){this.dimension({y:i})}else{return this.scrollPos().y}}});b.ele=b.Element;b.JSON.stringify=b.JSON.encode;b.JSON.parse=b.JSON.decode;b.Ajax.__ajax=new b.Ajax();b.Loader.__loader=new b.Loader();b.post=function(k,o,p,l){var i={url:k,method:"POST",data:o,onSuccess:p};var m=b.Ajax.__ajax;switch(l){case"json":m.json(i);break;default:m.text(i)}};var f=function(l){var i=[];for(var k in l){i.push(encodeURIComponent(k)+"="+encodeURIComponent(l[k]))}return i.join("&")};b.load=function(i,k,l){b.Loader.__loader.load({url:i+"?"+f(k),callback:l,param:true})};b.postJSON=function(i,k,l){b.__post(i,k,l,"json")};b.TabView.makeSimple=function(l,k){var i=new b.TabView(l,k,function(o,m){o.removeClass("now");m.addClass("now")},{tabTriggerEvent:"click"})};b.copy=function(k){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",k);alert("复制成功！")}else{if(navigator.userAgent.indexOf("Opera")!=-1){window.location=k;alert("复制成功！")}else{if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(p){alert("被浏览器拒绝！\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'")}var m=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!m){return}var l=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!l){return}l.addDataFlavor("text/unicode");var q=new Object();var i=new Object();var q=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);var r=k;q.data=r;l.setTransferData("text/unicode",q,r.length*2);var o=Components.interfaces.nsIClipboard;if(!m){return false}m.setData(l,null,o.kGlobalClipboard);alert("复制成功！")}}}}})(JUI);$.modal=function(e,j){e=e.cloneNode(true);if(!$.modal.self){$.modal.self=true;var d=document.body.offsetWidth;var a=document.body.offsetHeight;var g=$.modal._w=j.width;var b=$.modal._h=j.height;var c=document.createElement("div");document.body.appendChild(c);var f=document.createElement("div");document.body.appendChild(f);var i=document.createElement("div");f.appendChild(i);f.appendChild(e);e.style.display="block";c=$.modal._b=$(c).css({position:"absolute",zIndex:9995,cursor:"default",height:a+(ie?$(window).scroll_top():0),width:d+(ie?$(window).scroll_left():0),opacity:0.5,background:"#000",left:0,top:0});var f=$.modal._m=$(f).css({height:b,left:(d-g)/2+$(window).scroll_left(),position:"absolute",top:100+$(window).scroll_top(),width:g,zIndex:9997});var i=$(i).css({position:"absolute",width:30,height:30,background:"url(images/ico_close.gif)",left:g-30,top:0,cursor:"pointer",zIndex:20,display:(j.noClose?"none":"block")}).addClass("modal_close").attr("title","关闭");$(".modal_close").click(function(){$.modal.close()})}};$.modal.self=false;$.modal.reposition=function(){if($.modal.self){var a=document.body.offsetWidth;var b=document.body.offsetHeight;$.modal._m.css({top:100+$(window).scroll_top(),left:(a-$.modal._w)/2+$(window).scroll_left()});$.modal._b.css({height:b+(ie?$(window).scroll_top():0),width:a+(ie?$(window).scroll_left():0)})}};$.modal.close=function(){$.modal._m.remove();$.modal._b.remove();$.modal.self=false};$(window).addEvent("scroll",$.modal.reposition);$(window).addEvent("resize",$.modal.reposition);
