if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType"in j&&"tagName"in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return!f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});YAHOO.util.Get=function(){var m={},k=0,r=0,l=false,n=YAHOO.env.ua,s=YAHOO.lang,q,d,e,i=function(x,t,y){var u=y||window,z=u.document,A=z.createElement(x),v;for(v in t){if(t.hasOwnProperty(v)){A.setAttribute(v,t[v]);}}return A;},h=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/css",rel:"stylesheet",href:u};if(t){s.augmentObject(w,t);}return i("link",w,v);},p=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/javascript",src:u};if(t){s.augmentObject(w,t);}return i("script",w,v);},a=function(t,u){return{tId:t.tId,win:t.win,data:t.data,nodes:t.nodes,msg:u,purge:function(){d(this.tId);}};},b=function(t,w){var u=m[w],v=(s.isString(t))?u.win.document.getElementById(t):t;if(!v){q(w,"target node not found: "+t);}return v;},c=function(w){YAHOO.log("Finishing transaction "+w);var u=m[w],v,t;u.finished=true;if(u.aborted){v="transaction "+w+" was aborted";q(w,v);return;}if(u.onSuccess){t=u.scope||u.win;u.onSuccess.call(t,a(u));}},o=function(v){YAHOO.log("Timeout "+v,"info","get");var u=m[v],t;if(u.onTimeout){t=u.scope||u;u.onTimeout.call(t,a(u));}},f=function(v,A){YAHOO.log("_next: "+v+", loaded: "+A,"info","Get");var u=m[v],D=u.win,C=D.document,B=C.getElementsByTagName("head")[0],x,y,t,E,z;if(u.timer){u.timer.cancel();}if(u.aborted){y="transaction "+v+" was aborted";q(v,y);return;}if(A){u.url.shift();if(u.varName){u.varName.shift();}}else{u.url=(s.isString(u.url))?[u.url]:u.url;if(u.varName){u.varName=(s.isString(u.varName))?[u.varName]:u.varName;}}if(u.url.length===0){if(u.type==="script"&&n.webkit&&n.webkit<420&&!u.finalpass&&!u.varName){z=p(null,u.win,u.attributes);z.innerHTML='YAHOO.util.Get._finalize("'+v+'");';u.nodes.push(z);B.appendChild(z);}else{c(v);}return;}t=u.url[0];if(!t){u.url.shift();YAHOO.log("skipping empty url");return f(v);}YAHOO.log("attempting to load "+t,"info","Get");if(u.timeout){u.timer=s.later(u.timeout,u,o,v);}if(u.type==="script"){x=p(t,D,u.attributes);}else{x=h(t,D,u.attributes);}e(u.type,x,v,t,D,u.url.length);u.nodes.push(x);if(u.insertBefore){E=b(u.insertBefore,v);if(E){E.parentNode.insertBefore(x,E);}}else{B.appendChild(x);}YAHOO.log("Appending node: "+t,"info","Get");if((n.webkit||n.gecko)&&u.type==="css"){f(v,t);}},j=function(){if(l){return;}l=true;var t,u;for(t in m){if(m.hasOwnProperty(t)){u=m[t];if(u.autopurge&&u.finished){d(u.tId);delete m[t];}}}l=false;},g=function(u,t,v){var x="q"+(k++),w;v=v||{};if(k%YAHOO.util.Get.PURGE_THRESH===0){j();}m[x]=s.merge(v,{tId:x,type:u,url:t,finished:false,aborted:false,nodes:[]});w=m[x];w.win=w.win||window;w.scope=w.scope||w.win;w.autopurge=("autopurge"in w)?w.autopurge:(u==="script")?true:false;w.attributes=w.attributes||{};w.attributes.charset=v.charset||w.attributes.charset||"utf-8";s.later(0,w,f,x);return{tId:x};};e=function(H,z,x,u,D,E,G){var F=G||f,B,t,I,v,J,A,C,y;if(n.ie){z.onreadystatechange=function(){B=this.readyState;if("loaded"===B||"complete"===B){YAHOO.log(x+" onload "+u,"info","Get");z.onreadystatechange=null;F(x,u);}};}else{if(n.webkit){if(H==="script"){if(n.webkit>=420){z.addEventListener("load",function(){YAHOO.log(x+" DOM2 onload "+u,"info","Get");F(x,u);});}else{t=m[x];if(t.varName){v=YAHOO.util.Get.POLL_FREQ;YAHOO.log("Polling for "+t.varName[0]);t.maxattempts=YAHOO.util.Get.TIMEOUT/v;t.attempts=0;t._cache=t.varName[0].split(".");t.timer=s.later(v,t,function(w){I=this._cache;A=I.length;J=this.win;for(C=0;C<A;C=C+1){J=J[I[C]];if(!J){this.attempts++;if(this.attempts++>this.maxattempts){y="Over retry limit, giving up";t.timer.cancel();q(x,y);}else{YAHOO.log(I[C]+" failed, retrying");}return;}}YAHOO.log("Safari poll complete");t.timer.cancel();F(x,u);},null,true);}else{s.later(YAHOO.util.Get.POLL_FREQ,null,F,[x,u]);}}}}else{z.onload=function(){YAHOO.log(x+" onload "+u,"info","Get");F(x,u);};}}};q=function(w,v){YAHOO.log("get failure: "+v,"warn","Get");var u=m[w],t;if(u.onFailure){t=u.scope||u.win;u.onFailure.call(t,a(u,v));}};d=function(z){if(m[z]){var t=m[z],u=t.nodes,x=u.length,C=t.win.document,A=C.getElementsByTagName("head")[0],v,y,w,B;if(t.insertBefore){v=b(t.insertBefore,z);if(v){A=v.parentNode;}}for(y=0;y<x;y=y+1){w=u[y];if(w.clearAttributes){w.clearAttributes();}else{for(B in w){if(w.hasOwnProperty(B)){delete w[B];}}}A.removeChild(w);}t.nodes=[];}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(t){YAHOO.log(t+" finalized ","info","Get");s.later(0,null,c,t);},abort:function(u){var v=(s.isString(u))?u:u.tId,t=m[v];if(t){YAHOO.log("Aborting "+v,"info","Get");t.aborted=true;}},script:function(t,u){return g("script",t,u);},css:function(t,u){return g("css",t,u);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.9.0",build:"2800"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after",VERSION="2.9.0";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":VERSION+"/build/","base":"http://yui.yahooapis.com/"+VERSION+"/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemath"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return-1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}if(YUI.ArrayUtil.indexOf(m.requires,smod)==-1){m.requires.push(smod);}}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m;}}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]];}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false});}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false;}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true;}return false;};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i);}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target;}else{css+=target;}this._combining.push(s[i]);}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true;}this.loadNext(o.data);},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}else{this.loadNext();}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){var self=this,success=function(o){var idx=o.argument[0],name=o.argument[2];self._scriptText[idx]=o.responseText;if(self.onProgress){self.onProgress.call(self.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:self.data});}self._loadCount++;if(self._loadCount>=self._stopCount){var v=self.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+self._scriptText.join("\n")+b);self._pushEvents(ref);if(ref){self.onSuccess.call(self.scope,{reference:ref,data:self.data});}else{self._onFailure.call(self.varName+" reference failure");}}},failure=function(o){self.onFailure.call(self.scope,{msg:"XHR failure",xhrResponse:o,data:self.data});};self._config(o);if(!self.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}self._sandbox=true;if(!type||type!=="js"){self._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};self.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:self.base,filter:self.filter,require:"connection",insertBefore:self.insertBefore,charset:self.charset,onSuccess:function(){self.sandbox(null,"js");},scope:self},"js");return;}self._scriptText=[];self._loadCount=0;self._stopCount=self.sorted.length;self._xhr=[];self.calculate();var s=self.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=self.moduleInfo[s[i]];if(!m){self._onFailure("undefined module "+m);for(var j=0;j<self._xhr.length;j=j+1){self._xhr[j].abort();}return;}if(m.type!=="js"){self._loadCount++;continue;}url=m.fullpath;url=(url)?self._filter(url):self._url(m.path);var xhrData={success:success,failure:failure,scope:self,argument:[i,url,s[i]]};self._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}var self=this,donext=function(o){self.loadNext(o.data);},successfn,s=this.sorted,len=s.length,i,fn,m,url;if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue;}if(s[i]===this._loading){return;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return;}if(!this.loadType||this.loadType===m.type){successfn=donext;this._loading=s[i];fn=(m.type==="css")?util.Get.css:util.Get.script;url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){successfn=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:successfn,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str;},_url:function(path){return this._filter((this.base||"")+path);}};})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length"in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute"in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return-1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yuiloader-dom-event",YAHOO,{version:"2.9.0",build:"2800"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_isFormSubmit:false,_default_headers:{},_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(a){this._msxml_progid.unshift(a);},setDefaultPostHeader:function(a){if(typeof a=="string"){this._default_post_header=a;this._use_default_post_header=true;}else{if(typeof a=="boolean"){this._use_default_post_header=a;}}},setDefaultXhrHeader:function(a){if(typeof a=="string"){this._default_xhr_header=a;}else{this._use_default_xhr_header=a;}},setPollingInterval:function(a){if(typeof a=="number"&&isFinite(a)){this._polling_interval=a;}},createXhrObject:function(g){var d,a,b;try{a=new XMLHttpRequest();d={conn:a,tId:g,xhr:true};}catch(c){for(b=0;b<this._msxml_progid.length;++b){try{a=new ActiveXObject(this._msxml_progid[b]);d={conn:a,tId:g,xhr:true};break;}catch(f){}}}finally{return d;}},getConnectionObject:function(a){var c,d=this._transaction_id;try{if(!a){c=this.createXhrObject(d);}else{c={tId:d};if(a==="xdr"){c.conn=this._transport;c.xdr=true;}else{if(a==="upload"){c.upload=true;}}}if(c){this._transaction_id++;}}catch(b){}return c;},asyncRequest:function(h,d,g,a){var b=g&&g.argument?g.argument:null,e=this,f,c;if(this._isFileUpload){c="upload";}else{if(g&&g.xdr){c="xdr";}}f=this.getConnectionObject(c);if(!f){return null;}else{if(g&&g.customevents){this.initCustomEvents(f,g);}if(this._isFormSubmit){if(this._isFileUpload){window.setTimeout(function(){e.uploadFile(f,g,d,a);},10);return f;}if(h.toUpperCase()=="GET"){if(this._sFormData.length!==0){d+=((d.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(h.toUpperCase()=="POST"){a=a?this._sFormData+"&"+a:this._sFormData;}}}if(h.toUpperCase()=="GET"&&(g&&g.cache===false)){d+=((d.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if((h.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(f.xdr){this.xdr(f,h,d,g,a);return f;}f.conn.open(h,d,true);if(this._has_default_headers||this._has_http_headers){this.setHeader(f);}this.handleReadyState(f,g);f.conn.send(a||"");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(f,b);if(f.startEvent){f.startEvent.fire(f,b);}return f;}},initCustomEvents:function(a,c){var b;for(b in c.customevents){if(this._customEvents[b][0]){a[this._customEvents[b][0]]=new YAHOO.util.CustomEvent(this._customEvents[b][1],(c.scope)?c.scope:null);a[this._customEvents[b][0]].subscribe(c.customevents[b]);}}},handleReadyState:function(c,d){var b=this,a=(d&&d.argument)?d.argument:null;if(d&&d.timeout){this._timeOut[c.tId]=window.setTimeout(function(){b.abort(c,d,true);},d.timeout);}this._poll[c.tId]=window.setInterval(function(){if(c.conn&&c.conn.readyState===4){window.clearInterval(b._poll[c.tId]);delete b._poll[c.tId];if(d&&d.timeout){window.clearTimeout(b._timeOut[c.tId]);delete b._timeOut[c.tId];}b.completeEvent.fire(c,a);if(c.completeEvent){c.completeEvent.fire(c,a);}b.handleTransactionResponse(c,d);}},this._polling_interval);},handleTransactionResponse:function(b,j,d){var f,a,h=(j&&j.argument)?j.argument:null,c=(b.r&&b.r.statusText==="xdr:success")?true:false,i=(b.r&&b.r.statusText==="xdr:failure")?true:false,k=d;try{if((b.conn.status!==undefined&&b.conn.status!==0)||c){f=b.conn.status;}else{if(i&&!k){f=0;}else{f=13030;}}}catch(g){f=13030;}if((f>=200&&f<300)||f===1223||c){a=b.xdr?b.r:this.createResponseObject(b,h);if(j&&j.success){if(!j.scope){j.success(a);}else{j.success.apply(j.scope,[a]);}}this.successEvent.fire(a);if(b.successEvent){b.successEvent.fire(a);}}else{switch(f){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:a=this.createExceptionObject(b.tId,h,(d?d:false));if(j&&j.failure){if(!j.scope){j.failure(a);}else{j.failure.apply(j.scope,[a]);}}break;default:a=(b.xdr)?b.response:this.createResponseObject(b,h);if(j&&j.failure){if(!j.scope){j.failure(a);}else{j.failure.apply(j.scope,[a]);}}}this.failureEvent.fire(a);if(b.failureEvent){b.failureEvent.fire(a);}}this.releaseObject(b);a=null;},createResponseObject:function(a,h){var d={},k={},f,c,g,b;try{c=a.conn.getAllResponseHeaders();g=c.split("\n");for(f=0;f<g.length;f++){b=g[f].indexOf(":");if(b!=-1){k[g[f].substring(0,b)]=YAHOO.lang.trim(g[f].substring(b+2));}}}catch(j){}d.tId=a.tId;d.status=(a.conn.status==1223)?204:a.conn.status;d.statusText=(a.conn.status==1223)?"No Content":a.conn.statusText;d.getResponseHeader=k;d.getAllResponseHeaders=c;d.responseText=a.conn.responseText;d.responseXML=a.conn.responseXML;if(h){d.argument=h;}return d;},createExceptionObject:function(h,d,a){var f=0,g="communication failure",c=-1,b="transaction aborted",e={};e.tId=h;if(a){e.status=c;e.statusText=b;}else{e.status=f;e.statusText=g;}if(d){e.argument=d;}return e;},initHeader:function(a,d,c){var b=(c)?this._default_headers:this._http_headers;b[a]=d;if(c){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(a){var b;if(this._has_default_headers){for(b in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,b)){a.conn.setRequestHeader(b,this._default_headers[b]);}}}if(this._has_http_headers){for(b in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,b)){a.conn.setRequestHeader(b,this._http_headers[b]);}}this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){this._default_headers={};this._has_default_headers=false;},abort:function(e,g,a){var d,b=(g&&g.argument)?g.argument:null;e=e||{};if(e.conn){if(e.xhr){if(this.isCallInProgress(e)){e.conn.abort();window.clearInterval(this._poll[e.tId]);delete this._poll[e.tId];if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId];}d=true;}}else{if(e.xdr){e.conn.abort(e.tId);d=true;}}}else{if(e.upload){var c="yuiIO"+e.tId;var f=document.getElementById(c);if(f){YAHOO.util.Event.removeListener(f,"load");document.body.removeChild(f);if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId];}d=true;}}else{d=false;}}if(d===true){this.abortEvent.fire(e,b);if(e.abortEvent){e.abortEvent.fire(e,b);}this.handleTransactionResponse(e,g,true);}return d;},isCallInProgress:function(a){a=a||{};if(a.xhr&&a.conn){return a.conn.readyState!==4&&a.conn.readyState!==0;}else{if(a.xdr&&a.conn){return a.conn.isCallInProgress(a.tId);}else{if(a.upload===true){return document.getElementById("yuiIO"+a.tId)?true:false;}else{return false;}}}},releaseObject:function(a){if(a&&a.conn){a.conn=null;a=null;}}};(function(){var g=YAHOO.util.Connect,h={};function d(i){var j='<object id="YUIConnectionSwf" type="application/x-shockwave-flash" data="'+i+'" width="0" height="0">'+'<param name="movie" value="'+i+'">'+'<param name="allowScriptAccess" value="always">'+"</object>",k=document.createElement("div");document.body.appendChild(k);k.innerHTML=j;}function b(l,i,j,n,k){h[parseInt(l.tId)]={"o":l,"c":n};if(k){n.method=i;n.data=k;}l.conn.send(j,n,l.tId);}function e(i){d(i);g._transport=document.getElementById("YUIConnectionSwf");}function c(){g.xdrReadyEvent.fire();}function a(j,i){if(j){g.startEvent.fire(j,i.argument);if(j.startEvent){j.startEvent.fire(j,i.argument);}}}function f(j){var k=h[j.tId].o,i=h[j.tId].c;if(j.statusText==="xdr:start"){a(k,i);return;}j.responseText=decodeURI(j.responseText);k.r=j;if(i.argument){k.r.argument=i.argument;}this.handleTransactionResponse(k,i,j.statusText==="xdr:abort"?true:false);delete h[j.tId];}g.xdr=b;g.swf=d;g.transport=e;g.xdrReadyEvent=new YAHOO.util.CustomEvent("xdrReady");g.xdrReady=c;g.handleXdrResponse=f;})();(function(){var e=YAHOO.util.Connect,g=YAHOO.util.Event,a=document.documentMode?document.documentMode:false;e._isFileUpload=false;e._formNode=null;e._sFormData=null;e._submitElementValue=null;e.uploadEvent=new YAHOO.util.CustomEvent("upload");e._hasSubmitListener=function(){if(g){g.addListener(document,"click",function(k){var j=g.getTarget(k),i=j.nodeName.toLowerCase();if((i==="input"||i==="button")&&(j.type&&j.type.toLowerCase()=="submit")){e._submitElementValue=encodeURIComponent(j.name)+"="+encodeURIComponent(j.value);}});return true;}return false;}();function h(w,r,m){var v,l,u,s,z,t=false,p=[],y=0,o,q,n,x,k;this.resetFormState();if(typeof w=="string"){v=(document.getElementById(w)||document.forms[w]);}else{if(typeof w=="object"){v=w;}else{return;}}if(r){this.createFrame(m?m:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=v;return;}for(o=0,q=v.elements.length;o<q;++o){l=v.elements[o];z=l.disabled;u=l.name;if(!z&&u){u=encodeURIComponent(u)+"=";s=encodeURIComponent(l.value);switch(l.type){case"select-one":if(l.selectedIndex>-1){k=l.options[l.selectedIndex];p[y++]=u+encodeURIComponent((k.attributes.value&&k.attributes.value.specified)?k.value:k.text);}break;case"select-multiple":if(l.selectedIndex>-1){for(n=l.selectedIndex,x=l.options.length;n<x;++n){k=l.options[n];if(k.selected){p[y++]=u+encodeURIComponent((k.attributes.value&&k.attributes.value.specified)?k.value:k.text);}}}break;case"radio":case"checkbox":if(l.checked){p[y++]=u+s;}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(t===false){if(this._hasSubmitListener&&this._submitElementValue){p[y++]=this._submitElementValue;}t=true;}break;default:p[y++]=u+s;}}}this._isFormSubmit=true;this._sFormData=p.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData;}function d(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";}function c(i){var j="yuiIO"+this._transaction_id,l=(a===9)?true:false,k;if(YAHOO.env.ua.ie&&!l){k=document.createElement('<iframe id="'+j+'" name="'+j+'" />');if(typeof i=="boolean"){k.src="javascript:false";}}else{k=document.createElement("iframe");k.id=j;k.name=j;}k.style.position="absolute";k.style.top="-1000px";k.style.left="-1000px";document.body.appendChild(k);}function f(j){var m=[],k=j.split("&"),l,n;for(l=0;l<k.length;l++){n=k[l].indexOf("=");if(n!=-1){m[l]=document.createElement("input");m[l].type="hidden";m[l].name=decodeURIComponent(k[l].substring(0,n));m[l].value=decodeURIComponent(k[l].substring(n+1));this._formNode.appendChild(m[l]);}}return m;}function b(m,y,n,l){var t="yuiIO"+m.tId,u="multipart/form-data",w=document.getElementById(t),p=(a>=8)?true:false,z=this,v=(y&&y.argument)?y.argument:null,x,s,k,r,j,q;j={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",n);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",t);if(YAHOO.env.ua.ie&&!p){this._formNode.setAttribute("encoding",u);}else{this._formNode.setAttribute("enctype",u);}if(l){x=this.appendPostData(l);}this._formNode.submit();this.startEvent.fire(m,v);if(m.startEvent){m.startEvent.fire(m,v);}if(y&&y.timeout){this._timeOut[m.tId]=window.setTimeout(function(){z.abort(m,y,true);},y.timeout);}if(x&&x.length>0){for(s=0;s<x.length;s++){this._formNode.removeChild(x[s]);}}for(k in j){if(YAHOO.lang.hasOwnProperty(j,k)){if(j[k]){this._formNode.setAttribute(k,j[k]);}else{this._formNode.removeAttribute(k);}}}this.resetFormState();q=function(){var i,A,B;if(y&&y.timeout){window.clearTimeout(z._timeOut[m.tId]);delete z._timeOut[m.tId];}z.completeEvent.fire(m,v);if(m.completeEvent){m.completeEvent.fire(m,v);}r={tId:m.tId,argument:v};try{i=w.contentWindow.document.getElementsByTagName("body")[0];A=w.contentWindow.document.getElementsByTagName("pre")[0];if(i){if(A){B=A.textContent?A.textContent:A.innerText;}else{B=i.textContent?i.textContent:i.innerText;}}r.responseText=B;r.responseXML=w.contentWindow.document.XMLDocument?w.contentWindow.document.XMLDocument:w.contentWindow.document;}catch(o){}if(y&&y.upload){if(!y.scope){y.upload(r);}else{y.upload.apply(y.scope,[r]);}}z.uploadEvent.fire(r);if(m.uploadEvent){m.uploadEvent.fire(r);}g.removeListener(w,"load",q);setTimeout(function(){document.body.removeChild(w);z.releaseObject(m);},100);};g.addListener(w,"load",q);}e.setForm=h;e.resetFormState=d;e.createFrame=c;e.appendPostData=f;e.uploadFile=b;})();YAHOO.register("connection",YAHOO.util.Connect,{version:"2.9.0",build:"2800"});if(window.console===undefined){window.console={};var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}}var BBURL=(typeof(BBURL)=="undefined"?"":BBURL);var SESSIONURL=(typeof(SESSIONURL)=="undefined"?"":SESSIONURL);var SECURITYTOKEN=(typeof(SECURITYTOKEN)=="undefined"?"":SECURITYTOKEN);var vbphrase=(typeof(vbphrase)=="undefined"?new Array():vbphrase);var vB_Editor=new Array();var ignorequotechars=false;var pagenavcounter=0;var is_regexp=(window.RegExp)?true:false;var AJAX_Compatible=false;var viewport_info=null;var vB_Default_Timeout=15000;var userAgent=navigator.userAgent.toLowerCase();var is_opera=(YAHOO.env.ua.opera>0);var is_saf=(YAHOO.env.ua.webkit>0);var is_webtv=(userAgent.indexOf("webtv")!=-1);var is_ie=((YAHOO.env.ua.ie>0)&&(!is_opera)&&(!is_saf)&&(!is_webtv));var is_ie4=(YAHOO.env.ua.ie==4);var is_ie7=(YAHOO.env.ua.ie>=7);var is_ie6=(YAHOO.env.ua.ie==6);var is_ps3=(userAgent.indexOf("playstation 3")!=-1);var is_moz=(YAHOO.env.ua.gecko>0);var is_kon=(userAgent.indexOf("konqueror")!=-1);var is_ns=((userAgent.indexOf("compatible")==-1)&&(userAgent.indexOf("mozilla")!=-1)&&(!is_opera)&&(!is_webtv)&&(!is_saf));var is_ns4=((is_ns)&&(parseInt(navigator.appVersion)==4));var is_mac=(userAgent.indexOf("mac")!=-1);var pointer_cursor=(is_ie?"hand":"pointer");String.prototype.vBlength=function(){return(is_ie&&this.indexOf("\n")!=-1)?this.replace(/\r?\n/g,"_").length:this.length};if("1234".substr(-2,2)=="12"){String.prototype.substr_orig=String.prototype.substr;String.prototype.substr=function(B,A){if(typeof(A)=="undefined"){return this.substr_orig((B<0?this.length+B:B))}else{return this.substr_orig((B<0?this.length+B:B),A)}}}if(typeof Array.prototype.shift==="undefined"){Array.prototype.shift=function(){for(var C=0,A=this[0],B=this.length-1;C<B;C++){this[C]=this[C+1]}this.length--;return A}}function fetch_object(A){if(document.getElementById){return document.getElementById(A)}else{if(document.all){return document.all[A]}else{if(document.layers){return document.layers[A]}else{return null}}}}function fetch_tags(B,A){if(B==null){return new Array()}else{if(typeof B.getElementsByTagName!="undefined"){return B.getElementsByTagName(A)}else{if(B.all&&B.all.tags){return B.all.tags(A)}else{return new Array()}}}}function crc32(D){var B="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";var C=-1;var A=0,F=0;for(var E=0;E<D.length;E++){F=(C^D.charCodeAt(E))&255;A="0x"+B.substr(F*9,8);C=(C>>>8)^A}return C^(-1)}function fetch_tag_count(B,A){return fetch_tags(B,A).length}function do_an_e(A){if(!A||is_ie){window.event.returnValue=false;window.event.cancelBubble=true;return window.event}else{A.stopPropagation();A.preventDefault();return A}}function e_by_gum(A){if(!A||is_ie){window.event.cancelBubble=true;return window.event}else{if(A.target.type=="submit"){A.target.form.submit()}A.stopPropagation();return A}}function validatemessage(B,D,A){if(D.length<1){alert(vbphrase.must_enter_subject);return false}else{var C=PHP.trim(stripcode(B,false,ignorequotechars));if(C.length<A){alert(construct_phrase(vbphrase.message_too_short,A));return false}else{if(typeof(document.forms.vbform)!="undefined"&&typeof(document.forms.vbform.imagestamp)!="undefined"){document.forms.vbform.imagestamp.failed=false;if(document.forms.vbform.imagestamp.value.length!=6){alert(vbphrase.complete_image_verification);document.forms.vbform.imagestamp.failed=true;document.forms.vbform.imagestamp.focus();return false}else{return true}}else{return true}}}}function stripcode(F,G,B){if(!is_regexp){return F}if(B){var C=new Date().getTime();while((startindex=PHP.stripos(F,"[quote"))!==false){if(new Date().getTime()-C>2000){break}if((stopindex=PHP.stripos(F,"[/quote]"))!==false){fragment=F.substr(startindex,stopindex-startindex+8);F=F.replace(fragment,"")}else{break}F=PHP.trim(F)}}if(G){F=F.replace(/<img[^>]+src="([^"]+)"[^>]*>/gi,"$1");var H=new RegExp("<(\\w+)[^>]*>","gi");var E=new RegExp("<\\/\\w+>","gi");F=F.replace(H,"");F=F.replace(E,"");var D=new RegExp("(&nbsp;)","gi");F=F.replace(D," ")}else{var A=new RegExp("\\[(\\w+)(=[^\\]]*)?\\]","gi");var I=new RegExp("\\[\\/(\\w+)\\]","gi");F=F.replace(A,"");F=F.replace(I,"")}return F}function truncate_to_word(D,A){var C,B;C=D.split("");if(C.length>A){for(B=C.length-1;B>-1;--B){if(B>A){C.length=B}else{if(" "===C[B]){C.length=B;break}}}C.push("...")}return C.join("")}function vB_PHP_Emulator(){}vB_PHP_Emulator.prototype.stripos=function(A,B,C){if(typeof C=="undefined"){C=0}index=A.toLowerCase().indexOf(B.toLowerCase(),C);return(index==-1?false:index)};vB_PHP_Emulator.prototype.ltrim=function(A){return A.replace(/^\s+/g,"")};vB_PHP_Emulator.prototype.rtrim=function(A){return A.replace(/(\s+)$/g,"")};vB_PHP_Emulator.prototype.trim=function(A){return this.ltrim(this.rtrim(A))};vB_PHP_Emulator.prototype.preg_quote=function(A){return A.replace(/(\+|\{|\}|\(|\)|\[|\]|\||\/|\?|\^|\$|\\|\.|\=|\!|\<|\>|\:|\*)/g,"\\$1")};vB_PHP_Emulator.prototype.match_all=function(C,E){var A=C.match(RegExp(E,"gim"));if(A){var F=new Array();var B=new RegExp(E,"im");for(var D=0;D<A.length;D++){F[F.length]=A[D].match(B)}return F}else{return false}};vB_PHP_Emulator.prototype.unhtmlspecialchars=function(F,E){var D=new Array(/&lt;/g,/&gt;/g,/&quot;/g,/&amp;/g);var C=new Array("<",">",'"',"&");for(var B in D){if(YAHOO.lang.hasOwnProperty(D,B)){F=F.replace(D[B],C[B])}}if(E){if(is_ie){F=F.replace(/\n/g,"<#br#>")}var A=document.createElement("textarea");A.innerHTML=F;F=A.value;if(null!=A.parentNode){A.parentNode.removeChild(A)}if(is_ie){F=F.replace(/<#br#>/g,"\n")}return F}return F};vB_PHP_Emulator.prototype.unescape_cdata=function(C){var B=/<\=\!\=\[\=C\=D\=A\=T\=A\=\[/g;var A=/\]\=\]\=>/g;return C.replace(B,"<![CDATA[").replace(A,"]]>")};vB_PHP_Emulator.prototype.htmlspecialchars=function(D){var C=new Array((is_mac&&is_ie?new RegExp("&","g"):new RegExp("&(?!#[0-9]+;)","g")),new RegExp("<","g"),new RegExp(">","g"),new RegExp('"',"g"));var B=new Array("&amp;","&lt;","&gt;","&quot;");for(var A=0;A<C.length;A++){D=D.replace(C[A],B[A])}return D};vB_PHP_Emulator.prototype.in_array=function(D,C,B){var E=new String(D);var A;if(B){E=E.toLowerCase();for(A in C){if(YAHOO.lang.hasOwnProperty(C,A)){if(C[A].toLowerCase()==E){return A}}}}else{for(A in C){if(YAHOO.lang.hasOwnProperty(C,A)){if(C[A]==E){return A}}}}return-1};vB_PHP_Emulator.prototype.str_pad=function(C,A,B){C=new String(C);B=new String(B);if(C.length<A){padtext=new String(B);while(padtext.length<(A-C.length)){padtext+=B}C=padtext.substr(0,(A-C.length))+C}return C};vB_PHP_Emulator.prototype.urlencode=function(D){D=escape(D.toString()).replace(/\+/g,"%2B");var B=D.match(/(%([0-9A-F]{2}))/gi);if(B){for(var C=0;C<B.length;C++){var A=B[C].substring(1,3);if(parseInt(A,16)>=128){D=D.replace(B[C],"%u00"+A)}}}D=D.replace("%25","%u0025");return D};vB_PHP_Emulator.prototype.ucfirst=function(D,A){if(typeof A!="undefined"){var B=D.indexOf(A);if(B>0){D=D.substr(0,B)}}D=D.split(" ");for(var C=0;C<D.length;C++){D[C]=D[C].substr(0,1).toUpperCase()+D[C].substr(1)}return D.join(" ")};function vB_AJAX_Handler(A){this.async=A?true:false;this.conn=null}vB_AJAX_Handler.prototype.init=function(){return AJAX_Compatible};vB_AJAX_Handler.is_compatible=function(){return AJAX_Compatible};vB_AJAX_Handler.prototype.onreadystatechange=function(A){this.callback=A};vB_AJAX_Handler.prototype.fetch_data=function(A){console.warn('vB_AJAX_Handler.prototype.fetch_data() is deprecated.\nUse responseXML.getElementsByTagName("x")[i].firstChild.nodeValue instead.');if(A&&A.firstChild&&A.firstChild.nodeValue){return PHP.unescape_cdata(A.firstChild.nodeValue)}else{return""}};vB_AJAX_Handler.prototype.send=function(A,B){this.conn=YAHOO.util.Connect.asyncRequest("POST",A,{success:this.callback},B+"&securitytoken="+SECURITYTOKEN+"&s="+fetch_sessionhash());this.handler=this.conn.conn};function is_ajax_compatible(){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax==2){return false}else{if(is_ie&&!is_ie4){return true}else{if(window.XMLHttpRequest){try{var A=new XMLHttpRequest();return A.setRequestHeader?true:false}catch(B){return false}}else{return false}}}}AJAX_Compatible=is_ajax_compatible();console.info("This browser is%s AJAX compatible",AJAX_Compatible?"":" NOT");function vBulletin_AJAX_Error_Handler(A){console.warn("AJAX Error: Status = %s: %s",A.status,A.statusText)}function vB_Hidden_Form(A){this.action=A;this.variables=new Array()}vB_Hidden_Form.prototype.add_variable=function(A,B){this.variables[this.variables.length]=new Array(A,B);console.log("vB_Hidden_Form :: add_variable(%s)",A)};vB_Hidden_Form.prototype.add_variables_from_object=function(F){if(!F){return}console.info("vB_Hidden_Form :: add_variables_from_object(%s)",F.id);var B=fetch_tags(F,"input");var E;for(E=0;E<B.length;E++){if(B[E].disabled){continue}switch(B[E].type){case"checkbox":case"radio":if(B[E].checked){this.add_variable(B[E].name,B[E].value)}break;case"text":case"hidden":case"password":this.add_variable(B[E].name,B[E].value);break;default:continue}}var A=fetch_tags(F,"textarea");for(E=0;E<A.length;E++){if(A[E].disabled){continue}this.add_variable(A[E].name,A[E].value)}var D=fetch_tags(F,"select");for(E=0;E<D.length;E++){if(D[E].disabled){continue}if(D[E].multiple){for(var C=0;C<D[E].options.length;C++){if(D[E].options[C].selected){this.add_variable(D[E].name,D[E].options[C].value)}}}else{if(D[E].selectedIndex>-1){this.add_variable(D[E].name,D[E].options[D[E].selectedIndex].value)}}}};vB_Hidden_Form.prototype.fetch_variable=function(A){for(var B=0;B<this.variables.length;B++){if(this.variables[B][0]==A){return this.variables[B][1]}}return null};vB_Hidden_Form.prototype.submit_form=function(){this.form=document.createElement("form");this.form.method="post";this.form.action=this.action;for(var A=0;A<this.variables.length;A++){var B=document.createElement("input");B.type="hidden";B.name=this.variables[A][0];B.value=this.variables[A][1];this.form.appendChild(B)}console.info("vB_Hidden_Form :: submit_form() -> %s",this.action);document.body.appendChild(this.form).submit()};vB_Hidden_Form.prototype.build_query_string=function(){var B="";for(var A=0;A<this.variables.length;A++){B+=this.variables[A][0]+"="+PHP.urlencode(this.variables[A][1])+"&"}console.info("vB_Hidden_Form :: Query String = %s",B);return B};vB_Hidden_Form.prototype.add_input=vB_Hidden_Form.prototype.add_variable;vB_Hidden_Form.prototype.add_inputs_from_object=vB_Hidden_Form.prototype.add_variables_from_object;function vB_Select_Overlay_Handler(A){this.browser_affected=(is_ie&&YAHOO.env.ua.ie<7);if(this.browser_affected){this.overlay=YAHOO.util.Dom.get(A);this.hidden_selects=new Array();console.log("Initializing <select> overlay handler for '%s'.",this.overlay.id)}}vB_Select_Overlay_Handler.prototype.hide=function(){if(this.browser_affected){var C=YAHOO.util.Dom.getRegion(this.overlay);var B=document.getElementsByTagName("select");for(var A=0;A<B.length;A++){if(region_intersects(B[A],C)){if(YAHOO.util.Dom.isAncestor(this.overlay,B[A])){continue}else{YAHOO.util.Dom.setStyle(B[A],"visibility","hidden");this.hidden_selects.push(YAHOO.util.Dom.generateId(B[A]))}}}}};vB_Select_Overlay_Handler.prototype.show=function(){if(this.browser_affected){var A;while(A=this.hidden_selects.pop()){YAHOO.util.Dom.setStyle(A,"visibility","visible")}}};function openWindow(C,D,B,A){if(!C.match(/^https?:\/\//)){C=getBaseUrl()+C}return window.open(C,(typeof A=="undefined"?"vBPopup":A),"statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes"+(typeof D!="undefined"?(",width="+D):"")+(typeof B!="undefined"?(",height="+B):""))}function getBaseUrl(){try{var A=document.getElementsByTagName("base");if(A.length==0){return""}A=A[A.length-1].href;if(!A){return""}return A.match(/.*[\/\\]/)}catch(B){return""}}function js_open_help(B,C,A){return openWindow("help.php?s="+SESSIONHASH+"&do=answer&page="+B+"&pageaction="+C+"&option="+A,600,450,"helpwindow")}function attachments(A){return openWindow("misc.php?"+SESSIONURL+"do=showattachments&t="+A,480,300)}function who(A){return openWindow("misc.php?"+SESSIONURL+"do=whoposted&t="+A,600,300)}function imwindow(D,B,C,A){return openWindow("sendmessage.php?"+SESSIONURL+"do=im&type="+D+"&u="+B,C,A)}function SendMSNMessage(A){if(!is_ie){alert(vbphrase.msn_functions_only_work_in_ie)}else{try{MsgrObj.InstantMessage(A)}catch(B){alert(vbphrase.msn_functions_only_work_in_ie)}}return false}function AddMSNContact(A){if(!is_ie){alert(vbphrase.msn_functions_only_work_in_ie)}else{try{MsgrObj.AddContact(0,A)}catch(B){alert(vbphrase.msn_functions_only_work_in_ie)}}return false}function detect_caps_lock(D){D=(D?D:window.event);var A=(D.which?D.which:(D.keyCode?D.keyCode:(D.charCode?D.charCode:0)));var C=(D.shiftKey||(D.modifiers&&(D.modifiers&4)));var B=(D.ctrlKey||(D.modifiers&&(D.modifiers&2)));return(A>=65&&A<=90&&!C&&!B)||(A>=97&&A<=122&&C)}function log_out(B){var A=document.getElementsByTagName("html")[0];A.style.filter="progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";if(confirm(B)){return true}else{A.style.filter="";return false}}function set_cookie(B,C,A){console.log("Set Cookie :: %s = '%s'",B,C);document.cookie=B+"="+escape(C)+"; path=/"+(typeof A!="undefined"?"; expires="+A.toGMTString():"")}function set_subcookie(B,J,I,D,H,A){H=(typeof(H)=="undefined"?":":H);A=(typeof(A)=="undefined"?"#":A);var C=fetch_cookie(B);if(C!=null&&C!=""){C=C.split(H);if(C.length>0){var G="";for(var F=0;F<C.length;F++){var E=C[F].split(A);if(E[0]!=J){G+=(G!=""?H:"");G+=E[0]+A+E[1]}}}G+=(G!=""?H:"");G+=J+A+I}else{var G=J+A+I}console.log("Set Sub Cookie :: %s : '%s:%s'",B,J,I);set_cookie(B,G,D)}function fetch_subcookie(D,G,B,A){B=(typeof(B)=="undefined"?":":B);valuesep=(typeof(valuesep)=="undefined"?"#":valuesep);var F=fetch_cookie(D);if(F!=null&&F!=""){F=F.split(B);if(F.length>0){for(var E=0;E<F.length;E++){var C=F[E].split(valuesep);if(C[0]==G){return C[1]}}}}return null}function delete_cookie(A){console.log("Delete Cookie :: %s",A);document.cookie=A+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"}function fetch_cookie(A){cookie_name=A+"=";cookie_length=document.cookie.length;cookie_begin=0;while(cookie_begin<cookie_length){value_begin=cookie_begin+cookie_name.length;if(document.cookie.substring(cookie_begin,value_begin)==cookie_name){var C=document.cookie.indexOf(";",value_begin);if(C==-1){C=cookie_length}var B=unescape(document.cookie.substring(value_begin,C));console.log("Fetch Cookie :: %s = '%s'",A,B);return B}cookie_begin=document.cookie.indexOf(" ",cookie_begin)+1;if(cookie_begin==0){break}}console.log("Fetch Cookie :: %s (null)",A);return null}function js_toggle_all(D,E,C,A,G){for(var B=0;B<D.elements.length;B++){var F=D.elements[B];if(F.type==E&&PHP.in_array(F.name,A,false)==-1){switch(E){case"radio":if(F.value==C){F.checked=G}break;case"select-one":F.selectedIndex=G;break;default:F.checked=G;break}}}}function js_select_all(A){exclude=new Array();exclude[0]="selectall";js_toggle_all(A,"select-one","",exclude,A.selectall.selectedIndex)}function js_check_all(A){exclude=new Array();exclude[0]="keepattachments";exclude[1]="allbox";exclude[2]="removeall";js_toggle_all(A,"checkbox","",exclude,A.allbox.checked)}function js_check_all_option(B,A){exclude=new Array();exclude[0]="useusergroup";js_toggle_all(B,"radio",A,exclude,true)}function checkall(A){js_check_all(A)}function checkall_option(B,A){js_check_all_option(B,A)}function resize_textarea(E,D){var B=fetch_object(D);var C=parseInt(B.offsetWidth)+(E<0?-100:100);var A=parseInt(B.offsetHeight)+(E<0?-100:100);if(C>0){B.style.width=parseInt(B.offsetWidth)+(E<0?-100:100)+"px"}if(A>0){B.style.height=parseInt(B.offsetHeight)+(E<0?-100:100)+"px"}return false}function region_intersects(B,A){B=typeof(B.left)=="undefined"?YAHOO.util.Dom.getRegion(B):B;A=typeof(A.left)=="undefined"?YAHOO.util.Dom.getRegion(A):A;return(B.left>A.right||B.right<A.left||B.top>A.bottom||B.bottom<A.top)?false:true}function fetch_viewport_info(A){if(viewport_info==null||A){viewport_info={x:YAHOO.util.Dom.getDocumentScrollLeft(),y:YAHOO.util.Dom.getDocumentScrollTop(),w:YAHOO.util.Dom.getViewportWidth(),h:YAHOO.util.Dom.getViewportHeight()};console.info("Viewport Info: Size = %dx%d, Position = %d,%d",viewport_info.w,viewport_info.h,viewport_info.x,viewport_info.y)}return viewport_info}function clear_viewport_info(){viewport_info=null}function center_element(C,D,A,E){viewport_info=fetch_viewport_info(D);var B=viewport_info.h/2+viewport_info.y-C.clientHeight/2;if(E&&B>E){B=E}YAHOO.util.Dom.setXY(C,[viewport_info.w/2+viewport_info.x-C.clientWidth/2,B]);if(document.documentElement.dir=="rtl"){if(A){YAHOO.util.Dom.setStyle(C,"right",0)}else{YAHOO.util.Dom.setStyle(C,"right",YAHOO.util.Dom.getStyle(C,"left"))}YAHOO.util.Dom.setStyle(C,"left",null)}}function fetch_all_stylesheets(D){var G=new Array(),B=0,A=null,E=0,F=0;for(B=0;B<document.styleSheets.length;B++){A=document.styleSheets[B];G.push(A);try{if(A.cssRules){for(E=0;E<A.cssRules.length;E++){if(A.cssRules[E].styleSheet){G.push(A.cssRules[E].styleSheet)}}}else{if(A.imports){for(F=0;F<A.imports.length;F++){G.push(A.imports[F])}}}}catch(C){G.pop();continue}}return G}function highlight_login_box(){var E=fetch_object("navbar_username");var A="inlinemod";var B,C=1600,D=200;if(E){E.focus();E.select();for(B=0;B<C;B+=2*D){window.setTimeout(function(){YAHOO.util.Dom.addClass(E,A)},B);window.setTimeout(function(){YAHOO.util.Dom.removeClass(E,A)},B+D)}}return false}function toggle_collapse(A,B){return false}function vBpagenav(){}vBpagenav.prototype.controlobj_onclick=function(C){this._onclick(C);var A=fetch_tags(this.menu.menuobj,"input");for(var B=0;B<A.length;B++){if(A[B].type=="text"){A[B].focus();break}}};vBpagenav.prototype.form_gotopage=function(A){if((pagenum=parseInt(fetch_object("pagenav_itxt").value,10))>0){window.location=vBmenu.menus[vBmenu.activemenu].addr+"&page="+pagenum}return false};vBpagenav.prototype.ibtn_onclick=function(A){return this.form.gotopage()};vBpagenav.prototype.itxt_onkeypress=function(A){return((A?A:window.event).keyCode==13?this.form.gotopage():true)};function vbmenu_register(B,A,C){if(typeof(vBmenu)=="object"){return vBmenu.register(B,A)}else{return false}}function string_to_node(B){var A=document.createElement("div");A.innerHTML=B;var C=A.firstChild;while(C&&C.nodeType!=1){C=C.nextSibling}if(!C){return A.firstChild.cloneNode(true)}else{return C.cloneNode(true)}}function set_unselectable(B){B=YAHOO.util.Dom.get(B);if(!is_ie4&&typeof B.tagName!="undefined"){if(B.hasChildNodes()){for(var A=0;A<B.childNodes.length;A++){set_unselectable(B.childNodes[A])}}B.unselectable="on"}}function fetch_sessionhash(){return(SESSIONURL==""?"":SESSIONURL.substr(2,32))}function previousSibling(A){do{p=A.previousSibling}while(p&&p.nodeType!=1);return p}function nextSibling(A){do{p=A.nextSibling}while(p&&p.nodeType!=1);return p}function construct_phrase(){if(!arguments||arguments.length<1||!is_regexp){return false}var A=arguments;var D=A[0];var C;for(var B=1;B<A.length;B++){C=new RegExp("%"+B+"\\$s","gi");D=D.replace(C,A[B])}return D}function switch_id(C,E){var F=C.options[C.selectedIndex].value;if(F==""){return}var B=new String(window.location);var A=new String("");B=B.split("#");if(B[1]){A="#"+B[1]}B=B[0];if(B.indexOf(E+"id=")!=-1&&is_regexp){var D=new RegExp(E+"id=-?\\d+&?");B=B.replace(D,"")}if(B.indexOf("?")==-1){B+="?"}else{lastchar=B.substr(B.length-1);if(lastchar!="&"&&lastchar!="?"){B+="&"}}window.location=B+E+"id="+F+A}function child_img_alt_2_title(A){var C=A.getElementsByTagName("img");for(var B=0;B<C.length;B++){img_alt_2_title(C[B])}}function img_alt_2_title(A){if(!A.title&&A.alt!=""){A.title=A.alt}}function do_securitytoken_replacement(B){if(B==""){return}for(var A=0;A<document.forms.length;A++){if(document.forms[A].elements.securitytoken&&document.forms[A].elements.securitytoken.value==SECURITYTOKEN){document.forms[A].elements.securitytoken.value=B}}SECURITYTOKEN=B;console.log("Securitytoken updated")}function handle_securitytoken_response(A){console.log("Processing securitytoken update");if(A.responseXML&&A.responseXML.getElementsByTagName("securitytoken").length){var B=A.responseXML.getElementsByTagName("securitytoken")[0].firstChild.nodeValue;do_securitytoken_replacement(B);securitytoken_errors=0}else{handle_securitytoken_error(A)}}function handle_securitytoken_error(A){console.log("Securitytoken Error");if(++securitytoken_errors==3){do_securitytoken_replacement("guest")}}var securitytoken_timeout=window.setTimeout("replace_securitytoken()",3600000);var securitytoken_errors=0;function fetch_ajax_url(B){if(typeof(AJAXBASEURL)=="undefined"){console.log("AJAXBASEURL is not defined");return B}else{if(!B.match(/^https?:\/\//)){var C=new RegExp("^../","gi");if(B.match(C)){return AJAXBASEURL+B.replace(C,"")}else{return AJAXBASEURL+B}}else{if(BBURL){PATHS.bburl=BBURL}for(var A in PATHS){var C=new RegExp("^"+PHP.preg_quote(PATHS[A])+"/","gi");if(PATHS[A]!=""&&B.match(C)){return AJAXBASEURL+B.replace(C,"")}}return B}}}function replace_securitytoken(){window.clearTimeout(securitytoken_timeout);if(AJAX_Compatible&&SECURITYTOKEN!=""&&SECURITYTOKEN!="guest"){securitytoken_timeout=window.setTimeout("replace_securitytoken()",3600000);YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php"),{success:handle_securitytoken_response,failure:handle_securitytoken_error,timeout:vB_Default_Timeout},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=securitytoken")}}function Comment_Init(B){if(typeof B.id=="undefined"){return}var C=B.id;if(isNaN(C)){var A=null;if(A=C.match(/(\d+)/)){C=A[0]}}if(typeof inlineMod_comment!="undefined"){im_init(B,inlineMod_comment)}if(typeof vB_QuickEditor_Factory!="undefined"){if(typeof vB_QuickEditor_Factory.controls[C]=="undefined"){vB_QuickEditor_Factory.controls[C]=new vB_QuickEditor(C,vB_QuickEditor_Factory)}else{vB_QuickEditor_Factory.controls[C].init()}}if(typeof vB_QuickLoader_Factory!="undefined"){vB_QuickLoader_Factory.controls[C]=new vB_QuickLoader(C,vB_QuickLoader_Factory)}child_img_alt_2_title(B);if(typeof YAHOO.vBulletin.vBRestrain!="undefined"){YAHOO.vBulletin.vBRestrain.addcontainer(B);YAHOO.vBulletin.vBRestrain.resize(B)}}function vBulletin_init(){if(is_webtv){return false}child_img_alt_2_title(document);if(typeof vBmenu=="object"){if(typeof(YAHOO)!="undefined"){YAHOO.util.Event.on(document,"click",vbmenu_hide);YAHOO.util.Event.on(window,"resize",vbmenu_hide)}else{if(window.attachEvent&&!is_saf){document.attachEvent("onclick",vbmenu_hide);window.attachEvent("onresize",vbmenu_hide)}else{if(document.addEventListener&&!is_saf){document.addEventListener("click",vbmenu_hide,false);window.addEventListener("resize",vbmenu_hide,false)}else{window.onclick=vbmenu_hide;window.onresize=vbmenu_hide}}}var B=fetch_tags(document,"td");for(var D=0;D<B.length;D++){if(B[D].hasChildNodes()&&B[D].firstChild.name&&B[D].firstChild.name.indexOf("PageNav")!=-1){var C=B[D].title;B[D].title="";B[D].innerHTML="";B[D].id="pagenav."+D;var A=vBmenu.register(B[D].id);A.addr=C;if(is_saf){A.controlobj._onclick=A.controlobj.onclick;A.controlobj.onclick=vBpagenav.prototype.controlobj_onclick}}}if(typeof C!="undefined"){fetch_object("pagenav_form").gotopage=vBpagenav.prototype.form_gotopage;fetch_object("pagenav_ibtn").onclick=vBpagenav.prototype.ibtn_onclick;fetch_object("pagenav_itxt").onkeypress=vBpagenav.prototype.itxt_onkeypress}vBmenu.activate(true)}vBulletin.init();return true}function vBulletin_Framework(){this.elements=new Array();this.ajaxurls=new Array();this.events=new Array();this.time=new Date();this.add_event("systemInit")}vBulletin_Framework.prototype.init=function(){console.info("Firing System Init");this.events.systemInit.fire()};vBulletin_Framework.prototype.extend=function(C,A){function B(){}B.prototype=A.prototype;C.prototype=new B();C.prototype.constructor=C;C.baseConstructor=A;C.superClass=A.prototype};vBulletin_Framework.prototype.register_control=function(B,E){var C=new Array();for(var D=1;D<arguments.length;D++){C.push(arguments[D])}if(!this.elements[B]){console.info('Creating array vBulletin.elements["%s"]',B);this.elements[B]=new Array()}var A=this.elements[B].push(C);console.log('vBulletin.elements["%s"][%d] = %s',B,A-1,C.join(", "))};vBulletin_Framework.prototype.register_ajax_urls=function(B,C,D){B=B.split("?");B[1]=SESSIONURL+"securitytoken="+SECURITYTOKEN+"&ajax=1&"+B[1].replace(/\{(\d+)(:\w+)?\}/gi,"%$1$s");C=C.split("?");C[1]=SESSIONURL+"securitytoken="+SECURITYTOKEN+"&ajax=1&"+C[1].replace(/\{(\d+)(:\w+)?\}/gi,"%$1$s");console.log("Register AJAX URLs for %s",D);for(var A=0;A<D.length;A++){this.ajaxurls[D[A]]=new Array(B,C)}};vBulletin_Framework.prototype.add_event=function(A){this.events[A]=new YAHOO.util.CustomEvent(A)};vBulletin_Framework.prototype.console=function(){if(window.console||console.firebug){var args=new Array();for(var i=0;i<arguments.length;i++){args[args.length]=arguments[i]}try{eval("console.log('"+args.join("','")+"');")}catch(e){}}};var PHP=new vB_PHP_Emulator();var vBulletin=new vBulletin_Framework();vBulletin.events.systemInit.subscribe(function(){YAHOO.util.Event.on(window,"resize",clear_viewport_info);YAHOO.util.Event.on(window,"scroll",clear_viewport_info)});function handle_dismiss_notice_error(C){if(C.argument){var B=YAHOO.util.Dom.get("dismiss_notice_hidden");B.value=C.argument;var A=YAHOO.util.Dom.get("notices");A.submit()}}function handle_dismiss_notice_ajax(G){if(G.responseXML&&G.responseXML.getElementsByTagName("dismissed").length){var D=G.responseXML.getElementsByTagName("dismissed")[0].firstChild.nodeValue;var B=YAHOO.util.Dom.get("navbar_notice_"+D);if(B!=null){YAHOO.util.Dom.setStyle(B,"display","none");var F=YAHOO.util.Dom.get("notices");var A=F.getElementsByTagName("li");var E=0;if(A.length){for(var C=0;C<A.length;C++){if(YAHOO.util.Dom.getStyle(A[C],"display")!="none"){E++}}if(E==0){YAHOO.util.Dom.setStyle("notices","display","none")}}}}else{handle_dismiss_notice_error(G)}}function dismiss_notice(B){if(AJAX_Compatible){var A=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php?do=dismissnotice"),{success:handle_dismiss_notice_ajax,failure:handle_dismiss_notice_error,timeout:vB_Default_Timeout,argument:B},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=dismissnotice&noticeid="+PHP.urlencode(B));return false}return true}function page_jump(A){window.location=A.options[A.selectedIndex].value}function loadVbCss(C,E){if(!window.LESS_THAN_IE7){var D=fetch_object("e_vb_meta_bburl");if(D){var B=(!E&&(C.indexOf(D.content)==-1))?(D.content+"/"+C):C;var A=document.createElement("link");A.setAttribute("rel","stylesheet");A.setAttribute("href",B);A.setAttribute("media","screen");A.setAttribute("type","text/css");A.setAttribute("charset","utf-8");var F=document.getElementsByTagName("head");F=F[0]?F[0]:null;if(F){F.appendChild(A)}}}}YAHOO.namespace("vBulletin");YAHOO.vBulletin.vB_XHTML_Ready=false;var vB_XHTML_Ready=new YAHOO.util.CustomEvent();YAHOO.util.Event.onDOMReady(function(){console.log("Fire vB_XHTML_Ready");vB_XHTML_Ready.fire();YAHOO.vBulletin.vB_XHTML_Ready=true});vB_XHTML_Ready.subscribe(init_breadcrumb);function init_breadcrumb(D){var C=YAHOO.util.Dom.get("breadcrumb");var B=C.getElementsByTagName("li");for(var A=0;A<B.length;A++){}}function register_inlinemod(D,F,C,B,E,A){YAHOO.namespace("vBulletin.imodcollection."+B);YAHOO.vBulletin.imodcollection[B]=new InlineModCollection(B,B+"_imodsel",A);YAHOO.vBulletin.imodcollection[B].add_controls(YAHOO.util.Dom.getElementsByClassName(C,F,D),E)}function register_inlinemod_checkboxes(E,H,D,A,C,G,B){var F=new InlineModCollection(C,null,B);F.add_controls(YAHOO.util.Dom.getElementsByClassName(D,H,E),G);F.add_checkboxes(A)}YAHOO.namespace("vBulletin.imodcollections");function InlineModCollection(B,A,C){this.type=B;this.collection=new Array();if(typeof C=="undefined"){C="vbulletin_inline"}this.cookiename=C+this.type;this.selecteditems=this.fetch_ids();this.set_display_count(this.selecteditems.length);this.init_selector(A);YAHOO.vBulletin.imodcollections[B]=this}InlineModCollection.get=function(A){return YAHOO.vBulletin.imodcollections[A]};InlineModCollection.prototype.add_controls=function(D,E){if(typeof E=="undefined"){E=this.type+"_"}for(var B=0;B<D.length;B++){var A=D[B];var C=A.id.substr(E.length);this.add_control(new InlineModControl(A,C,this))}};InlineModCollection.prototype.add_checkboxes=function(B){var A=YAHOO.util.Dom.getElementsByClassName(this.type+"_checkall","input",B);for(var D=0;D<A.length;D++){var C=A[D];if(C.type=="checkbox"){YAHOO.util.Event.on(C,"click",this.set_from_checkbox,this,true)}}};InlineModCollection.prototype.add_control=function(A){if(PHP.in_array(A.itemid,this.selecteditems)!=-1){A.checkbox.checked=true;A.set_inlinemod_highlight()}this.collection.push(A)};InlineModCollection.prototype.init_selector=function(A){var D=YAHOO.util.Dom.get(A);if(D!=null){var B=D.getElementsByTagName("a");for(var C=0;C<B.length;C++){if(B[C].id&&B[C].id.substr(0,D.id.length)==D.id){YAHOO.util.Event.on(B[C],"click",this.set_all_selections,this,true)}}}};InlineModCollection.prototype.set_from_checkbox=function(C){var B=YAHOO.util.Event.getTarget(C);for(var A=0;A<this.collection.length;A++){this.collection[A].set_selection_from_checkbox(B)}this.update_collection_state()};InlineModCollection.prototype.set_all_selections=function(D){var B=YAHOO.util.Event.getTarget(D);if("a"!=B.tagName.toLowerCase()){B=YAHOO.util.Dom.getAncestorByTagName(B,"A")}console.log("Do:%s, ID:%s",B.innerHTML,B.id);var C=B.id.split(":");for(var A=0;A<this.collection.length;A++){this.collection[A].set_selection(C)}this.update_collection_state();YAHOO.util.Event.stopEvent(D);YAHOO.vBulletin.vBPopupMenu.close_all()};InlineModCollection.prototype.update_collection_state=function(){var B=new Array();for(var A=0;A<this.collection.length;A++){B.push(this.collection[A].itemid)}if(B.length){this.selecteditems=this.remove_items(this.selecteditems,B)}for(var A=0;A<this.collection.length;A++){if(this.collection[A].checkbox.checked){this.selecteditems.push(this.collection[A].itemid)}}this.set_cookie(this.selecteditems);this.set_display_count(this.selecteditems.length)};InlineModCollection.prototype.update_state=function(B,A){this.selecteditems=this.remove_items(this.selecteditems,new Array(B));if(A){this.selecteditems.push(B)}this.set_cookie(this.selecteditems);this.set_display_count(this.selecteditems.length)};InlineModCollection.prototype.remove_items=function(D,C){var B=new Array();for(var A=0;A<D.length;A++){if(D[A]!=""&&PHP.in_array(D[A],C)==-1){B.push(D[A])}}return B};InlineModCollection.prototype.set_cookie=function(B){var A=new Date();A.setTime(A.getTime()+3600000);set_cookie(this.cookiename,B.join("-"),A)};InlineModCollection.prototype.fetch_ids=function(){var A=fetch_cookie(this.cookiename);if(A!=null&&A!=""){A=A.split("-");if(A.length>0){return A}}return new Array()};InlineModCollection.prototype.set_display_count=function(A){var B=YAHOO.util.Dom.get(this.type+"_inlinemod_count");if(B){B.innerHTML=A}};function InlineModControl(A,B,D){var C=D.type+"_imod_checkbox_"+B;this.container=YAHOO.util.Dom.get(A);this.checkbox=YAHOO.util.Dom.get(C);this.itemid=B;this.collection=D;if(this.checkbox){YAHOO.util.Event.on(this.checkbox,"click",this.set_inlinemod_state,this,true)}else{console.warn("No inlinemod selection checkbox found for "+C)}}InlineModControl.prototype.init_collection=function(A){if(typeof YAHOO.vBulletin.imodcollection=="undefined"){YAHOO.vBulletin.imodcollection=new InlineModCollection(A)}return YAHOO.vBulletin.imodcollection};InlineModControl.prototype.set_selection_from_checkbox=function(A){if(A.value!="all"){if(A.value!=this.checkbox.value){return}}this.checkbox.checked=A.checked;this.set_inlinemod_highlight()};InlineModControl.prototype.set_selection=function(A){switch(A[1]){case"invert":this.checkbox.checked=!this.checkbox.checked;break;case"none":this.checkbox.checked=false;break;case"class":this.checkbox.checked=YAHOO.util.Dom.hasClass(this.container,A[2]);break;case"flag":if(typeof A[2]!=undefined&&!isNaN(A[2])){this.checkbox.checked=this.checkbox.value&A[2]}else{this.checkbox.checked=true}break;default:case"all":this.checkbox.checked=true;break}this.set_inlinemod_highlight()};InlineModControl.prototype.set_inlinemod_state=function(){this.collection.update_state(this.itemid,this.checkbox.checked);this.set_inlinemod_highlight()};InlineModControl.prototype.set_inlinemod_highlight=function(){var A=(this.checkbox.checked?"addClass":"removeClass");YAHOO.util.Dom[A](this.container,"imod_highlight");console.log("Set Inlinemod State for %s - %s",this.itemid,A)};vB_XHTML_Ready.subscribe(init_searchboxes);function init_searchboxes(){var B=YAHOO.util.Dom.getElementsByClassName("searchbox","input");for(var A=0;A<B.length;A++){new YAHOO.vBulletin.SearchBox(B[A])}}YAHOO.vBulletin.LoadScript=function(B,C){var A=document.createElement("script");YAHOO.util.Dom.setAttribute(A,"type","text/javascript");if(typeof(C)!="undefined"){if(A.readyState){A.onreadystatechange=function(){if(A.readyState=="loaded"||A.readyState=="complete"){A.onreadystatechange=null;C()}}}else{A.onload=function(){C()}}}YAHOO.util.Dom.setAttribute(A,"src",B+"?"+Math.floor(Math.random()*100000));document.getElementsByTagName("head")[0].appendChild(A)};YAHOO.vBulletin.LoadCss=function(A){var B=document.createElement("link");YAHOO.util.Dom.setAttribute(B,"type","text/css");YAHOO.util.Dom.setAttribute(B,"rel","stylesheet");YAHOO.util.Dom.setAttribute(B,"href",A);document.getElementsByTagName("head")[0].appendChild(B)};YAHOO.vBulletin.SearchBox=function(A){this.element=A;this.default_value=this.element.value;YAHOO.util.Event.on(this.element,"focus",this.focus_handler,this,true);YAHOO.util.Event.on(this.element,"blur",this.blur_handler,this,true)};YAHOO.vBulletin.SearchBox.prototype.focus_handler=function(A){if(this.element.value==this.default_value){this.element.value=""}this.element.select()};YAHOO.vBulletin.SearchBox.prototype.blur_handler=function(A){if(this.element.value==""){this.element.value=this.default_value}};vB_XHTML_Ready.subscribe(init_popupmenus);function init_popupmenus(A){YAHOO.vBulletin.vBPopupMenu=new PopupFactory(A)}function PopupFactory(A){this.menu_open=false;this.timeout=null;this.menuclose_timeout=null;this.popups=new Object();this.instrument(A);YAHOO.util.Event.on(document,"click",this.close_all,this,true)}PopupFactory.prototype.instrument=function(C){var B=YAHOO.util.Dom.getElementsByClassName("popupmenu",undefined,C);for(var A=0;A<B.length;A++){if(!YAHOO.util.Dom.hasClass(B[A],"popupcustom")){this.register(B[A])}}};PopupFactory.prototype.register=function(A){var B=YAHOO.util.Dom.generateId(A);this.popups[B]=new PopupMenu(A,this)};PopupFactory.prototype.register_menuobj=function(A){var B=YAHOO.util.Dom.generateId(A.container);this.popups[B]=A};PopupFactory.prototype.close_all=function(B){if(this.menu_open){for(var A in this.popups){this.popups[A].close_menu()}this.menu_open=false}};function PopupMenu(A,B){this.init(A,B)}PopupMenu.prototype.init=function(A,B){this.container=A;this.factory=B;this.display=false;this.menu=null;this.activate_menu();this.control=null;this.activate_control();this.locator=null;this.form=null;this.popup_form_elements=new Array();this.textdirection=document.documentElement.dir=="rtl"?"right":"left"};PopupMenu.prototype.activate_menu=function(){var A=YAHOO.util.Dom.getElementsByClassName("popupbody","*",this.container);if(A.length){this.menu=A[0];YAHOO.util.Dom.generateId(this.menu);if(YAHOO.util.Dom.hasClass(this.container,"hovermenu")){YAHOO.util.Event.on(this.menu,"mouseover",this.cancel_menutimer,this,true);YAHOO.util.Event.on(this.menu,"mouseout",this.start_menutimer,this,true)}}else{}YAHOO.util.Dom.removeClass(A[0],"popuphover");YAHOO.util.Event.on(A[0],"click",this.cancel_close,this,true)};PopupMenu.prototype.activate_control=function(){var A=YAHOO.util.Dom.getElementsByClassName("popupctrl","",this.container);if(A.length){this.control=A[0];YAHOO.util.Dom.generateId(this.control);if(!YAHOO.util.Dom.hasClass(this.container,"noclick")){YAHOO.util.Event.on(this.control,"click",this.toggle_menu,this,true)}if(YAHOO.util.Dom.hasClass(this.container,"hovermenu")){YAHOO.util.Event.on(this.control,"mouseover",this.open_hovermenu,this,true);YAHOO.util.Event.on(this.control,"mouseout",this.start_menutimer,this,true)}else{if(!YAHOO.util.Dom.hasClass(this.container,"nomouseover")){YAHOO.util.Event.on(this.control,"mouseover",this.mouseover,this,true);YAHOO.util.Event.on(this.control,"mouseout",this.mouseout,this,true)}}}};PopupMenu.prototype.cancel_close=function(A){YAHOO.util.Event.stopPropagation(A)};PopupMenu.prototype.mouseover=function(A){if(this.factory.menu_open){this.open_menu(A)}};PopupMenu.prototype.mouseout=function(A){if(this.factory.timeout!=null){this.factory.timeout.cancel()}};PopupMenu.prototype.open_hovermenu=function(A){this.cancel_menutimer(A);this.open_menu(A)};PopupMenu.prototype.start_menutimer=function(A){this.factory.menuclose_timeout=YAHOO.lang.later(300,this,"close_menu",[{e:A}])};PopupMenu.prototype.cancel_menutimer=function(A){if(this.factory.menuclose_timeout!=null){this.factory.menuclose_timeout.cancel()}};PopupMenu.prototype.toggle_menu=function(A){if(this.display){this.close_menu()}else{this.open_menu(A)}YAHOO.util.Event.stopEvent(A)};PopupMenu.prototype.load_menu=function(B){var C={};for(var A in B){C[A]=B[A]}YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("load-popup.php?id="+this.container.id),{success:this.handle_menu_load,failure:null,timeout:null,scope:this,argument:{e:C}},"id="+this.container.id)};PopupMenu.prototype.handle_menu_load=function(A){alert("Load menu!")};PopupMenu.prototype.open_menu=function(B){if(YAHOO.lang.isNull(this.menu)){this.load_menu(B);return}if(this.factory.timeout!=null){this.factory.timeout.cancel()}this.factory.close_all();if(typeof(B)=="object"){var A=YAHOO.util.Event.getTarget(B)}else{var A=YAHOO.util.Dom.get(B)}if(A!=null){A=(YAHOO.util.Dom.hasClass(A,"popupctrl")?A:YAHOO.util.Dom.getAncestorByClassName(A,"popupctrl"))}this.set_display(true,A);this.factory.menu_open=true};PopupMenu.prototype.close_menu=function(){this.set_display(false);this.factory.menu_open=false};PopupMenu.prototype.set_display=function(C,A){if(YAHOO.lang.isNull(this.menu)){return}var B=(typeof(A)!="undefined"&&YAHOO.util.Dom.hasClass(A.parentNode,"editormenu"));this.display=C;if(C){if(this.check_menu(this.menu)){YAHOO.util.Dom.setStyle(this.menu,"display","block");this.set_offset(this.menu,A);this.set_control_style()}}else{YAHOO.util.Dom.setStyle(this.menu,"display","none");this.set_control_style()}};PopupMenu.prototype.check_menu=function(C){if(!YAHOO.util.Dom.hasClass(C,"noempty")){return true}var A=this.menu.getElementsByTagName("li");if(A.length){for(var B=0;B<A.length;B++){if(!YAHOO.util.Dom.hasClass(A[B],"noempty")){return true}}}return false};PopupMenu.prototype.register_popup_form=function(A){var B=this.contains_form_elements(A);if(B){this.form=B.form}};PopupMenu.prototype.contains_form_elements=function(A){var B=null;B=A.getElementsByTagName("input");if(B.length){return B[0]}else{B=A.getElementsByTagName("textarea");if(B.length){return B[0]}else{B=A.getElementsByTagName("select");if(B.length){return B[0]}}}return false};PopupMenu.prototype.handle_popup_form_submit=function(D){YAHOO.util.Event.stopEvent(D);var C=YAHOO.util.Event.getTarget(D);for(var B=0;B<C.elements.length;B++){var A=C.elements[B];if(A.name){switch(A.tagName){case"textarea":case"select":this.replicate_form_value(A);break;case"input":default:switch(A.type){case"hidden":case"text":case"password":this.replicate_form_value(A);break;case"checkbox":case"radio":if(A.checked){this.replicate_form_value(A)}break}}}}this.form.submit()};PopupMenu.prototype.replicate_form_value=function(B){if(!this.form.elements[B.name]){var A=document.createElement("input");A.name=B.name;A.type="hidden";A.value=B.value;this.form.appendChild(A)}else{this.form.elements[B.name].value=B.value}};PopupMenu.prototype.handle_popup_form_reset=function(A){YAHOO.util.Event.getTarget(A).reset();this.form.reset()};PopupMenu.prototype.set_offset=function(H,E){if(!E){return}var C=YAHOO.util.Dom.getX(E);var A=YAHOO.util.Dom.getY(E);var D=E.offsetWidth;var G=E.offsetHeight;if(this.textdirection=="left"){YAHOO.util.Dom.setX(H,C)}else{YAHOO.util.Dom.setX(H,C+D-(H.offsetWidth));YAHOO.util.Dom.setStyle(H,"right","auto")}YAHOO.util.Dom.setY(H,A+G);var B=YAHOO.util.Dom.getClientRegion();var F=YAHOO.util.Dom.getRegion(H);if(F.right>B.right){YAHOO.util.Dom.setX(H,B.right-(H.offsetWidth+2));F=YAHOO.util.Dom.getRegion(H)}if(F.left<B.left){YAHOO.util.Dom.setX(H,B.left);F=YAHOO.util.Dom.getRegion(H)}if(F.bottom>B.bottom){YAHOO.util.Dom.setY(H,A-H.offsetHeight);F=YAHOO.util.Dom.getRegion(H)}if(F.top<B.top){YAHOO.util.Dom.setY(H,B.top)}};PopupMenu.prototype.set_control_style=function(){var A=(this.display?"addClass":"removeClass");YAHOO.util.Dom[A](this.control,"active")};vB_XHTML_Ready.subscribe(init_collapsers);function init_collapsers(){new vBCollapseFactory()}function vBCollapseFactory(A){var B=YAHOO.util.Dom.getElementsByClassName("collapse","a",A);for(var C=0;C<B.length;C++){new vBCollapse(B[C],this)}apply_collapses()}function vBCollapse(B,A){this.init(B,A)}vBCollapse.prototype.init=function(B,A){this.link=B;this.factory=A;this.targetid=null;this.target=null;this.image=null;var D=this.link.id.match(/^collapse_(.*)$/);this.targetid=D[1];this.target=YAHOO.util.Dom.get(this.targetid);var C=this.link.getElementsByTagName("img");this.image=C[0];if(this.target){this.target.vBCollapseInstance=this;YAHOO.util.Event.on(this.link,"click",this.toggle_collapse,this,true)}else{if(this.targetid.substr(0,5)=="c_cat"){YAHOO.util.Dom.setStyle(this.link,"display","none")}else{console.error("Unable to enable collapse button: #collapse_"+this.targetid+". Element to collapse is missing: #"+this.targetid)}}};vBCollapse.prototype.collapse=function(){YAHOO.util.Dom.setStyle(this.target,"display","none");this.save_collapsed(true);if(this.image&&!this.image.src.match(/_collapsed.png$/)){var A=new RegExp("\\.png$");this.image.src=this.image.src.replace(A,"_collapsed.png")}};vBCollapse.prototype.expand=function(){YAHOO.util.Dom.setStyle(this.target,"display","");this.save_collapsed(false);if(this.image){var A=new RegExp("_collapsed\\.png$");this.image.src=this.image.src.replace(A,".png")}};vBCollapse.prototype.toggle_collapse=function(A){YAHOO.util.Event.stopEvent(A);if(!is_regexp){return false}if(YAHOO.util.Dom.getStyle(this.target,"display")=="none"){this.expand()}else{this.collapse()}return false};vBCollapse.prototype.save_collapsed=function(D){var C=fetch_cookie("vbulletin_collapse");var B=new Array();if(C!=null){C=C.split("\n");for(var A in C){if(YAHOO.lang.hasOwnProperty(C,A)&&C[A]!=this.targetid&&C[A]!=""){B[B.length]=C[A]}}}if(D){B[B.length]=this.targetid}expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));set_cookie("vbulletin_collapse",B.join("\n"),expires)};function apply_collapses(){var B=fetch_cookie("vbulletin_collapse");if(B!=null){B=B.split("\n");for(var C in B){var A=YAHOO.util.Dom.get(B[C]);if(A){A.vBCollapseInstance.collapse()}}}}function PostBit_Init(A,C){console.log("PostBit Init: %d",C);YAHOO.vBulletin.vBPopupMenu.instrument(A);if(typeof vB_QuickEditor!="undefined"){vB_AJAX_QuickEdit_Init(A)}if(typeof vB_QuickReply!="undefined"){qr_init_buttons(A)}if(typeof YAHOO.vBulletin.imodcollection!="undefined"&&typeof YAHOO.vBulletin.imodcollection.post!="undefined"){var B=YAHOO.vBulletin.imodcollection.post;B.add_control(new InlineModControl(A,C,B))}if(typeof mq_init!="undefined"){mq_init(A)}if(typeof init_reputation_popupmenus!="undefined"){init_reputation_popupmenus(A)}if(typeof vB_Lightbox!="undefined"){init_postbit_lightbox(A,false,true)}child_img_alt_2_title(A);if(typeof YAHOO.vBulletin.vBRestrain!="undefined"){YAHOO.vBulletin.vBRestrain.addcontainer(A);YAHOO.vBulletin.vBRestrain.resize(A)}}YAHOO.util.Event.onDOMReady(init_restrain);function init_restrain(){YAHOO.vBulletin.vBRestrain=new vBRestrain()}function vBRestrain(){this.containers={};this.length=0;var B=YAHOO.util.Dom.getElementsByClassName("postcontainer","div");for(var A=0;A<B.length;A++){this.addcontainer(B[A]);this.length++}var B=YAHOO.util.Dom.getElementsByClassName("postcontainer","li");for(var A=0;A<B.length;A++){this.addcontainer(B[A]);this.length++}var B=YAHOO.util.Dom.getElementsByClassName("postcontainer","p");for(var A=0;A<B.length;A++){this.addcontainer(B[A]);this.length++}var B=YAHOO.util.Dom.getElementsByClassName("postcontainer","blockquote");for(var A=0;A<B.length;A++){this.addcontainer(B[A]);this.length++}if(this.length>0){this.resizeall();YAHOO.util.Event.on(window,"resize",this.resizeall,this,true)}}vBRestrain.prototype.addcontainer=function(A){if(YAHOO.util.Dom.hasClass(A,"postcontainer")||YAHOO.util.Dom.hasClass(A,"bbcode_container")){if(!A.id){YAHOO.util.Dom.generateId(A)}var C=A.id;this.containers[C]={};this.containers[C].object=A;this.containers[C].objects={};this.additem(A,"object");this.additem(A,"iframe")}else{var B=YAHOO.util.Dom.getAncestorByClassName(A,"postcontainer");if(B){this.addcontainer(B)}}};vBRestrain.prototype.additem=function(B,A){var G=B.id;var F=YAHOO.util.Dom.getElementsByClassName("restrain",A,B);for(var E=0;E<F.length;E++){if(YAHOO.util.Dom.hasClass(B,"postcontainer")){var D=YAHOO.util.Dom.getAncestorByClassName(F[E],"bbcode_container");if(D){this.addcontainer(D);continue}}if(!F[E].id){YAHOO.util.Dom.generateId(F[E])}var C=F[E].id;this.containers[G].objects[C]=F[E]}};vBRestrain.prototype.resize=function(E){if(E.id&&this.containers[E.id]){var B=this.containers[E.id];var F=document.getElementsByTagName("html")[0].getAttribute("dir").toLowerCase();if(!B.object){return}B.paddingLeft=parseFloat(YAHOO.util.Dom.getStyle(B.object,"paddingLeft"));B.paddingRight=parseFloat(YAHOO.util.Dom.getStyle(B.object,"paddingRight"));B.borderLeftWidth=parseFloat(YAHOO.util.Dom.getStyle(B.object,"borderLeftWidth"));B.borderRightWidth=parseFloat(YAHOO.util.Dom.getStyle(B.object,"borderRightWidth"));var D=YAHOO.util.Dom.getRegion(B.object);B.width=D.width-(isNaN(B.paddingLeft)?0:B.paddingLeft)-(isNaN(B.paddingRight)?0:B.paddingRight)-(isNaN(B.borderLeftWidth)?0:B.borderLeftWidth)-(isNaN(B.borderRightWidth)?0:B.borderRightWidth);if(F=="ltr"){if(isNaN(B.paddingRight)||B.paddingRight<5){B.paddingRight=5}B.right=D.right-(isNaN(B.paddingRight)?0:B.paddingRight)-(isNaN(B.borderRightWidth)?0:B.borderRightWidth)}else{if(isNaN(B.paddingLeft)||B.paddingLeft<5){B.paddingLeft=5}B.left=D.left+(isNaN(B.paddingLeft)?0:B.paddingLeft)+(isNaN(B.borderLeftWidth)?0:B.borderLeftWidth)}if(B.width<=0){return}for(var H in B.objects){if(!B.objects[H]){continue}var C=B.objects[H];var D=YAHOO.util.Dom.getRegion(C);if(D.width==0){D.width=parseInt(YAHOO.util.Dom.getStyle(C,"width"),10);D.height=parseInt(YAHOO.util.Dom.getStyle(C,"height"),10);if(D.width==0){return}if(F=="ltr"){D.right+=D.width}else{D.left-=D.width}}if(!C.origwidth){C.origwidth=D.width;C.origheight=D.height;C.aspect=D.width/D.height}if(F=="ltr"){if(D.right>B.right){var A=D.width-(D.right-B.right)-10;if(A<=0){return}YAHOO.util.Dom.setStyle(C,"width",A+"px");YAHOO.util.Dom.setStyle(C,"height",Math.round(A/C.aspect)+"px")}else{if(D.width<C.origwidth){var G=(B.right-D.right)-10;if(D.width+G>=C.origwidth){YAHOO.util.Dom.setStyle(C,"width",C.origwidth+"px");YAHOO.util.Dom.setStyle(C,"height",C.origheight+"px")}else{var A=D.width+G;if(A<=0){return}YAHOO.util.Dom.setStyle(C,"width",A+"px");YAHOO.util.Dom.setStyle(C,"height",Math.round(A/C.aspect)+"px")}}}}else{if(D.left<B.left){var A=D.width-(B.left-D.left)-10;if(A<=0){return}YAHOO.util.Dom.setStyle(C,"width",A+"px");YAHOO.util.Dom.setStyle(C,"height",Math.round(A/C.aspect)+"px")}else{if(D.width<C.origwidth){var G=(D.left-B.left)-10;if(D.width+G>=C.origwidth){YAHOO.util.Dom.setStyle(C,"width",C.origwidth+"px");YAHOO.util.Dom.setStyle(C,"height",C.origheight+"px")}else{var A=D.width+G;if(A<=0){return}YAHOO.util.Dom.setStyle(C,"width",A+"px");YAHOO.util.Dom.setStyle(C,"height",Math.round(A/C.aspect)+"px")}}}}}}};vBRestrain.prototype.resizeall=function(B){for(var A in this.containers){this.resize(this.containers[A].object)}};var hexcase=0;var b64pad="";var chrsz=8;function hex_md5(A){return binl2hex(core_md5(str2binl(A),A.length*chrsz))}function b64_md5(A){return binl2b64(core_md5(str2binl(A),A.length*chrsz))}function str_md5(A){return binl2str(core_md5(str2binl(A),A.length*chrsz))}function hex_hmac_md5(A,B){return binl2hex(core_hmac_md5(A,B))}function b64_hmac_md5(A,B){return binl2b64(core_hmac_md5(A,B))}function str_hmac_md5(A,B){return binl2str(core_hmac_md5(A,B))}function core_md5(K,F){K[F>>5]|=128<<((F)%32);K[(((F+64)>>>9)<<4)+14]=F;var J=1732584193;var I=-271733879;var H=-1732584194;var G=271733878;for(var C=0;C<K.length;C+=16){var E=J;var D=I;var B=H;var A=G;J=md5_ff(J,I,H,G,K[C+0],7,-680876936);G=md5_ff(G,J,I,H,K[C+1],12,-389564586);H=md5_ff(H,G,J,I,K[C+2],17,606105819);I=md5_ff(I,H,G,J,K[C+3],22,-1044525330);J=md5_ff(J,I,H,G,K[C+4],7,-176418897);G=md5_ff(G,J,I,H,K[C+5],12,1200080426);H=md5_ff(H,G,J,I,K[C+6],17,-1473231341);I=md5_ff(I,H,G,J,K[C+7],22,-45705983);J=md5_ff(J,I,H,G,K[C+8],7,1770035416);G=md5_ff(G,J,I,H,K[C+9],12,-1958414417);H=md5_ff(H,G,J,I,K[C+10],17,-42063);I=md5_ff(I,H,G,J,K[C+11],22,-1990404162);J=md5_ff(J,I,H,G,K[C+12],7,1804603682);G=md5_ff(G,J,I,H,K[C+13],12,-40341101);H=md5_ff(H,G,J,I,K[C+14],17,-1502002290);I=md5_ff(I,H,G,J,K[C+15],22,1236535329);J=md5_gg(J,I,H,G,K[C+1],5,-165796510);G=md5_gg(G,J,I,H,K[C+6],9,-1069501632);H=md5_gg(H,G,J,I,K[C+11],14,643717713);I=md5_gg(I,H,G,J,K[C+0],20,-373897302);J=md5_gg(J,I,H,G,K[C+5],5,-701558691);G=md5_gg(G,J,I,H,K[C+10],9,38016083);H=md5_gg(H,G,J,I,K[C+15],14,-660478335);I=md5_gg(I,H,G,J,K[C+4],20,-405537848);J=md5_gg(J,I,H,G,K[C+9],5,568446438);G=md5_gg(G,J,I,H,K[C+14],9,-1019803690);H=md5_gg(H,G,J,I,K[C+3],14,-187363961);I=md5_gg(I,H,G,J,K[C+8],20,1163531501);J=md5_gg(J,I,H,G,K[C+13],5,-1444681467);G=md5_gg(G,J,I,H,K[C+2],9,-51403784);H=md5_gg(H,G,J,I,K[C+7],14,1735328473);I=md5_gg(I,H,G,J,K[C+12],20,-1926607734);J=md5_hh(J,I,H,G,K[C+5],4,-378558);G=md5_hh(G,J,I,H,K[C+8],11,-2022574463);H=md5_hh(H,G,J,I,K[C+11],16,1839030562);I=md5_hh(I,H,G,J,K[C+14],23,-35309556);J=md5_hh(J,I,H,G,K[C+1],4,-1530992060);G=md5_hh(G,J,I,H,K[C+4],11,1272893353);H=md5_hh(H,G,J,I,K[C+7],16,-155497632);I=md5_hh(I,H,G,J,K[C+10],23,-1094730640);J=md5_hh(J,I,H,G,K[C+13],4,681279174);G=md5_hh(G,J,I,H,K[C+0],11,-358537222);H=md5_hh(H,G,J,I,K[C+3],16,-722521979);I=md5_hh(I,H,G,J,K[C+6],23,76029189);J=md5_hh(J,I,H,G,K[C+9],4,-640364487);G=md5_hh(G,J,I,H,K[C+12],11,-421815835);H=md5_hh(H,G,J,I,K[C+15],16,530742520);I=md5_hh(I,H,G,J,K[C+2],23,-995338651);J=md5_ii(J,I,H,G,K[C+0],6,-198630844);G=md5_ii(G,J,I,H,K[C+7],10,1126891415);H=md5_ii(H,G,J,I,K[C+14],15,-1416354905);I=md5_ii(I,H,G,J,K[C+5],21,-57434055);J=md5_ii(J,I,H,G,K[C+12],6,1700485571);G=md5_ii(G,J,I,H,K[C+3],10,-1894986606);H=md5_ii(H,G,J,I,K[C+10],15,-1051523);I=md5_ii(I,H,G,J,K[C+1],21,-2054922799);J=md5_ii(J,I,H,G,K[C+8],6,1873313359);G=md5_ii(G,J,I,H,K[C+15],10,-30611744);H=md5_ii(H,G,J,I,K[C+6],15,-1560198380);I=md5_ii(I,H,G,J,K[C+13],21,1309151649);J=md5_ii(J,I,H,G,K[C+4],6,-145523070);G=md5_ii(G,J,I,H,K[C+11],10,-1120210379);H=md5_ii(H,G,J,I,K[C+2],15,718787259);I=md5_ii(I,H,G,J,K[C+9],21,-343485551);J=safe_add(J,E);I=safe_add(I,D);H=safe_add(H,B);G=safe_add(G,A)}return Array(J,I,H,G)}function md5_cmn(F,C,B,A,E,D){return safe_add(bit_rol(safe_add(safe_add(C,F),safe_add(A,D)),E),B)}function md5_ff(C,B,G,F,A,E,D){return md5_cmn((B&G)|((~B)&F),C,B,A,E,D)}function md5_gg(C,B,G,F,A,E,D){return md5_cmn((B&F)|(G&(~F)),C,B,A,E,D)}function md5_hh(C,B,G,F,A,E,D){return md5_cmn(B^G^F,C,B,A,E,D)}function md5_ii(C,B,G,F,A,E,D){return md5_cmn(G^(B|(~F)),C,B,A,E,D)}function core_hmac_md5(C,F){var E=str2binl(C);if(E.length>16){E=core_md5(E,C.length*chrsz)}var A=Array(16),D=Array(16);for(var B=0;B<16;B++){A[B]=E[B]^909522486;D[B]=E[B]^1549556828}var G=core_md5(A.concat(str2binl(F)),512+F.length*chrsz);return core_md5(D.concat(G),512+128)}function safe_add(A,D){var C=(A&65535)+(D&65535);var B=(A>>16)+(D>>16)+(C>>16);return(B<<16)|(C&65535)}function bit_rol(A,B){return(A<<B)|(A>>>(32-B))}function str2binl(D){var C=new Array();var A=(1<<chrsz)-1;for(var B=0;B<D.length*chrsz;B+=chrsz){C[B>>5]|=(D.charCodeAt(B/chrsz)&A)<<(B%32)}return C}function binl2str(C){var D="";var A=(1<<chrsz)-1;for(var B=0;B<C.length*32;B+=chrsz){D+=String.fromCharCode((C[B>>5]>>>(B%32))&A)}return D}function binl2hex(C){var B=hexcase?"0123456789ABCDEF":"0123456789abcdef";var D="";for(var A=0;A<C.length*4;A++){D+=B.charAt((C[A>>2]>>((A%4)*8+4))&15)+B.charAt((C[A>>2]>>((A%4)*8))&15)}return D}function binl2b64(D){var C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var F="";for(var B=0;B<D.length*4;B+=3){var E=(((D[B>>2]>>8*(B%4))&255)<<16)|(((D[B+1>>2]>>8*((B+1)%4))&255)<<8)|((D[B+2>>2]>>8*((B+2)%4))&255);for(var A=0;A<4;A++){if(B*8+A*6>D.length*32){F+=b64pad}else{F+=C.charAt((E>>6*(3-A))&63)}}}return F}function str_to_ent(D){var A="";var C;for(C=0;C<D.length;C++){var E=D.charCodeAt(C);var B="";if(E>255){while(E>=1){B="0123456789".charAt(E%10)+B;E=E/10}if(B==""){B="0"}B="#"+B;B="&"+B;B=B+";";A+=B}else{A+=D.charAt(C)}}return A}function trim(A){while(A.substring(0,1)==" "){A=A.substring(1,A.length)}while(A.substring(A.length-1,A.length)==" "){A=A.substring(0,A.length-1)}return A}function md5hash(B,A,E,C){if(navigator.userAgent.indexOf("Mozilla/")==0&&parseInt(navigator.appVersion)>=4){var D=hex_md5(str_to_ent(trim(B.value)));A.value=D;if(E){D=hex_md5(trim(B.value));E.value=D}if(!C){B.value=""}}return true};vBulletin.events.systemInit.subscribe(function(){if(vBulletin.elements.vB_Lightbox_Container){for(var B=0;B<vBulletin.elements.vB_Lightbox_Container.length;B++){var A=vBulletin.elements.vB_Lightbox_Container[B];init_postbit_lightbox(A[0],A[1])}vBulletin.elements.vB_Lightbox_Container=null}});var Lightboxes=new Array();var Lightbox_overlay=null;var Lightbox_overlay_select_handler=null;var Lightbox_event_default=null;var Lightbox_current=null;var Lightbox_map={};function vB_Lightbox(B,C,D,A){this.minborder=100;this.mindimension=50;this.event_click=1;this.event_hover=2;this.click_triggered=false;this.events_enabled=false;this.element=B;this.timeout=null;this.imageloader=null;this.status=0;this.active=false;this.ajax_req=null;this.cursor=null;this.link=null;this.date=null;this.time=null;this.name=null;this.html=null;this.loader_link=null;this.loader_height=null;this.loader_width=null;this.lightbox=null;this.closebtn=null;this.img=null;this.uniqueid=C;this.containerid=D;if(A&this.event_hover){YAHOO.util.Event.on(this.element,"mouseover",this.countdown,this,true);YAHOO.util.Event.on(this.element,"mouseout",this.halt,this,true)}if(A&this.event_click){YAHOO.util.Event.on(this.element,"click",this.image_click,this,true)}}vB_Lightbox.prototype.set_status=function(A,B){console.log("vB_Lightbox :: Set status = %d (%s)",A,B);this.status=A};vB_Lightbox.prototype.check_status=function(A){if(this.status>=A){return true}else{console.warn("Checked status for %d, found %d",A,this.status);return false}};vB_Lightbox.prototype.countdown=function(A){if(!this.active){this.set_status(1,"countdown");this.cursor=YAHOO.util.Dom.getStyle(this.element,"cursor");this.element.style.cursor="wait";this.click_triggered=false;this.timeout=setTimeout("Lightboxes['"+this.uniqueid+"'].load_lightbox();",1500)}};vB_Lightbox.prototype.halt=function(A){if(this.status<2){this.set_status(0,"halt")}clearTimeout(this.timeout);this.element.style.cursor=this.cursor};vB_Lightbox.prototype.image_click=function(A){if(A.ctrlKey||A.shiftKey){return true}this.click_triggered=true;this.load_lightbox(A)};vB_Lightbox.prototype.load_lightbox=function(E){if(this.check_status(0)&&!YAHOO.util.Connect.isCallInProgress(this.ajax_req)){this.set_status(2,"load_lightbox 1");if(Lightbox_current&&Lightbox_current.loader_link){Lightbox_current.img.src=Lightbox_current.loader_link;Lightbox_current.img.width=Lightbox_current.loader_width;Lightbox_current.img.height=Lightbox_current.loader_height;center_element(Lightbox_current.lightbox)}if(E){YAHOO.util.Event.stopEvent(E)}if(this.timeout){clearTimeout(this.timeout);this.element.style.cursor=this.cursor}if(this.html==null){var A=this.element.getAttribute("href");var B=A.substr(A.indexOf("?")+1)+"&securitytoken="+SECURITYTOKEN+"&ajax=1&uniqueid="+this.uniqueid;if(Lightbox_map[this.containerid][this.uniqueid+1]==null){B=B+"&last=1"}if(Lightbox_map[this.containerid][this.uniqueid-1]==null){B=B+"&first=1"}B=B+"&total="+Lightbox_map[this.containerid].size();B=B+"&current="+(Lightbox_map[this.containerid].find(this.uniqueid)+1);this.show_overlay();try{this.ajax_req=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url(A),{success:this.handle_ajax_response,failure:this.handle_ajax_error,scope:this,timeout:vB_Default_Timeout},B)}catch(E){var D=A.substr(0,A.indexOf("?"));var C;if(C=D.match(/\/([^/]*attachment\.php)$/)){this.ajax_req=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url(C[1]),{success:this.handle_ajax_response,failure:this.handle_ajax_error,scope:this,timeout:vB_Default_Timeout},B)}else{if(this.click_triggered){window.location=A}}}}else{this.set_status(3,"load_lightbox 2");this.show_lightbox()}}};vB_Lightbox.prototype.handle_ajax_error=function(A){vBulletin_AJAX_Error_Handler(A);if(this.click_triggered){window.location=this.element.getAttribute("href")}};vB_Lightbox.prototype.handle_ajax_response=function(C){if(!this.check_status(2)){return}if(C.responseXML){var E=C.responseXML.getElementsByTagName("error");if(E.length){this.set_status(0,"handle_ajax_response - error");if(E[0].firstChild.nodeValue=="notimage"){console.warn("Attempted to load non-image (.%s) into lightbox. Aborted.",C.responseXML.getElementsByTagName("extension")[0].firstChild.nodeValue)}else{alert(E[0].firstChild.nodeValue.replace(/<(\/|[a-z]+)[^>]+>/g,""))}return false}var B=C.responseXML.getElementsByTagName("link");if(B.length){this.set_status(3,"handle_ajax_response - success");this.show_overlay();this.link=B[0].firstChild.nodeValue;this.imageloader=new Image();YAHOO.util.Event.on(this.imageloader,"load",this.show_lightbox,this,true);var D=new Array("date","time","name","html");for(var A=0;A<D.length;A++){this[D[A]]=C.responseXML.getElementsByTagName(D[A])[0].firstChild.nodeValue}this.lightbox=document.body.appendChild(string_to_node(this.html));this.closebtn=YAHOO.util.Dom.get("lightboxbutton"+this.uniqueid);YAHOO.util.Event.on(this.closebtn,"click",this.hide_lightbox,this,true);this.prevbtn=YAHOO.util.Dom.get("lightboxprevbutton"+this.uniqueid);YAHOO.util.Event.on(this.prevbtn,"click",this.prev_lightbox,this,true);this.nextbtn=YAHOO.util.Dom.get("lightboxnextbutton"+this.uniqueid);YAHOO.util.Event.on(this.nextbtn,"click",this.next_lightbox,this,true);YAHOO.util.Event.on(YAHOO.util.Dom.get("lightboxlink"+this.uniqueid),"click",this.hide_lightbox,this,true);this.img=YAHOO.util.Dom.get("lightboximg"+this.uniqueid);this.loader_link=this.img.src;this.loader_width=this.img.width;this.loader_height=this.img.height;this.imageloader.src=this.link;this.show_lightbox()}else{if(this.click_triggered){window.location=imagelink}}}else{if(this.click_triggered){window.location=imagelink}}};vB_Lightbox.prototype.show_overlay=function(){if(this.check_status(2)){var C=fetch_viewport_info();if(Lightbox_overlay==null){Lightbox_overlay=document.createElement("div");Lightbox_overlay.id="Lightbox_overlay";var A={display:"none",position:"absolute",top:"0px",backgroundColor:"#000000",opacity:0.85,zIndex:1000};if(document.documentElement.dir=="rtl"){A.right="0px"}else{A.left="0px"}for(var B in A){if(YAHOO.lang.hasOwnProperty(A,B)){YAHOO.util.Dom.setStyle(Lightbox_overlay,B,A[B])}}Lightbox_overlay=document.body.appendChild(Lightbox_overlay);Lightbox_overlay_select_handler=new vB_Select_Overlay_Handler(Lightbox_overlay)}YAHOO.util.Dom.setStyle(Lightbox_overlay,"display","");YAHOO.util.Dom.setStyle(Lightbox_overlay,"width",C.w+"px");YAHOO.util.Dom.setStyle(Lightbox_overlay,"height",C.h+"px");YAHOO.util.Dom.setXY(Lightbox_overlay,[C.x,C.y]);Lightbox_overlay_select_handler.hide()}};vB_Lightbox.prototype.show_lightbox=function(){if(this.check_status(3)){if(Lightbox_current){Lightbox_current.hide_lightbox(false,this,true)}this.show_overlay();if(!this.imageloader.complete&&this.imageloader.readyState!="complete"){YAHOO.util.Event.removeListener(this.imageloader,"load",this.show_lightbox);YAHOO.util.Event.on(this.imageloader,"load",this.show_lightbox,this,true)}else{this.img.src=this.link;this.resize_image();YAHOO.util.Dom.setStyle(this.closebtn,"display","")}YAHOO.util.Dom.setStyle(this.lightbox,"display","inline-block");YAHOO.util.Dom.setStyle(this.lightbox,"zIndex",5000);if(Lightbox_map[this.containerid].size()==1){YAHOO.util.Dom.setStyle(this.prevbtn,"visibility","hidden");YAHOO.util.Dom.setStyle(this.nextbtn,"visibility","hidden")}Lightbox_current=this;this.center_lightbox();this.active=true;this.enable_events()}};vB_Lightbox.prototype.hide_lightbox=function(B,C,A){if(B&&B.type=="keydown"&&B.keyCode!=27){return}this.set_status(0,"hide_lightbox");this.disable_events();this.active=false;YAHOO.util.Dom.setStyle(this.lightbox,"left",0);YAHOO.util.Dom.setStyle(this.lightbox,"display","none");if(!A){YAHOO.util.Dom.setStyle(Lightbox_overlay,"display","none")}Lightbox_overlay_select_handler.show();Lightbox_current=null};vB_Lightbox.prototype.next_lightbox=function(B){var A=null;if(Lightbox_map[this.containerid][this.uniqueid+1]!=null){A=Lightboxes[this.uniqueid+1]}else{A=Lightboxes[Lightbox_map[this.containerid].first()]}A.load_lightbox()};vB_Lightbox.prototype.prev_lightbox=function(B){var A=null;if(Lightbox_map[this.containerid][this.uniqueid-1]!=null){A=Lightboxes[this.uniqueid-1]}else{A=Lightboxes[Lightbox_map[this.containerid].last()]}A.load_lightbox()};vB_Lightbox.prototype.center_lightbox=function(){center_element(this.lightbox,true)};vB_Lightbox.prototype.handle_viewport_change=function(){this.resize_image();this.center_lightbox();this.show_overlay()};vB_Lightbox.prototype.handle_viewport_change_ie=function(){setTimeout("Lightboxes['"+this.uniqueid+"'].handle_viewport_change();",100)};vB_Lightbox.prototype.resize_image=function(){var C=fetch_viewport_info();var A=this.imageloader.width;var B=this.imageloader.height;if(A>C.w-this.minborder){A=C.w-this.minborder;A=(A<this.mindimension?this.mindimension:A);B=Math.ceil(this.imageloader.height*(A/this.imageloader.width))}if(B>C.h-this.minborder){B=C.h-this.minborder;B=(B<this.mindimension?this.mindimension:B);A=Math.ceil(this.imageloader.width*(B/this.imageloader.height))}this.img.setAttribute("width",A);this.img.setAttribute("height",B);this.img.setAttribute("title",this.name+"; \n"+this.imageloader.width+" x "+this.imageloader.height+" (@"+Math.ceil(A/this.imageloader.width*100)+"%)");if(A<this.imageloader.width||B<this.imageloader.height){console.info("vB_Lightbox :: Image original size: %dx%d, resizing to %dx%d",this.imageloader.width,this.imageloader.height,A,B)}};vB_Lightbox.prototype.enable_events=function(){if(!this.events_enabled){YAHOO.util.Event.on(window,"resize",(is_ie?this.handle_viewport_change_ie:this.handle_viewport_change),this,true);YAHOO.util.Event.on(window,"scroll",this.hide_lightbox,this,true);YAHOO.util.Event.on(window,"keydown",this.hide_lightbox,this,true);YAHOO.util.Event.on(Lightbox_overlay,"click",this.hide_lightbox,this,true);this.events_enabled=true}};vB_Lightbox.prototype.disable_events=function(){if(this.events_enabled){YAHOO.util.Event.removeListener(window,"resize",(is_ie?this.handle_viewport_change_ie:this.handle_viewport_change));YAHOO.util.Event.removeListener(window,"scroll",this.hide_lightbox);YAHOO.util.Event.removeListener(window,"keydown",this.hide_lightbox);YAHOO.util.Event.removeListener(Lightbox_overlay,"click",this.hide_lightbox);this.events_enabled=false}};vB_Lightbox_Container=function(){};vB_Lightbox_Container.prototype.size=function(){var B=0;for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){B++}}return B};vB_Lightbox_Container.prototype.first=function(){for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){return A}}};vB_Lightbox_Container.prototype.last=function(){var B;for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){B=A}}return B};vB_Lightbox_Container.prototype.find=function(C){var B=0;for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){if(A==C){return B}B++}}return-1};function is_lightbox_element(A){return(typeof(A.getAttribute("rel"))=="string"&&A.getAttribute("rel").match(/Lightbox[_]?(\d*)?/))}function init_postbit_lightbox(D,C,G){var A=userAgent.match(/applewebkit\/([0-9]+)/);if(A&&A[1]<522){return}if(Lightbox_event_default===null){Lightbox_event_default=C}if(typeof(C)=="undefined"||C===false){C=(Lightbox_event_default?Lightbox_event_default:1+2)}var E=YAHOO.util.Dom.getElementsBy(is_lightbox_element,"a",D);for(var B=0;B<E.length;B++){var F=Lightboxes.length;var H=E[B].getAttribute("rel").match(/Lightbox[_]?(\d*)?/).pop();H=(H?H:0);Lightboxes[F]=new vB_Lightbox(E[B],F,H,C);if(!Lightbox_map[H]||G){Lightbox_map[H]=new vB_Lightbox_Container();G=false}Lightbox_map[H][F]=F}};function load_html(E,A,D,C,B){if(AJAX_Compatible){vB_HtmlLoader=new vB_AJAX_HtmlLoader(E,A,D,C,B);vB_HtmlLoader.load()}return false}var vB_HtmlLoader=false;function vB_AJAX_HtmlLoader(E,A,D,C,B){this.getrequest=A;this.container=fetch_object(E);this.postrequest=D;this.progresselement=fetch_object(C);this.triggerevent=B}vB_AJAX_HtmlLoader.prototype.load=function(){if(this.progresselement){this.progresselement.style.display=""}if(this.container){YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url(this.getrequest),{success:this.display,failure:this.handle_ajax_error,timeout:vB_Default_Timeout,scope:this},this.postrequest+"&sessionurl="+SESSIONURL+"&securitytoken="+SECURITYTOKEN+"&ajax=1")}return false};vB_AJAX_HtmlLoader.prototype.handle_ajax_error=function(A){if(this.progresselement){this.progresselement.style.display="none"}vBulletin_AJAX_Error_Handler(A)};vB_AJAX_HtmlLoader.prototype.display=function(C){if(this.progresselement){this.progresselement.style.display="none"}if(C.responseXML){var B=C.responseXML.getElementsByTagName("html");var A=C.responseXML.getElementsByTagName("error");if(B.length&&B[0].hasChildNodes()){this.container.innerHTML=B[0].firstChild.nodeValue}}if(this.triggerevent){this.triggerevent()}};var vB_ReadMarker={forum_statusicon_prefix:"forum_statusicon_",thread_statusicon_prefix:"thread_statusicon_",thread_gotonew_prefix:"thread_gotonew_",thread_title_prefix:"thread_title_"};function vB_AJAX_ReadMarker(A){this.forumid=A}vB_AJAX_ReadMarker.prototype.mark_read=function(){YAHOO.util.Connect.asyncRequest("POST","ajax.php?do=markread&f="+this.forumid,{success:this.handle_ajax_request,failure:this.handle_ajax_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=markread&forumid="+this.forumid)};vB_AJAX_ReadMarker.prototype.handle_ajax_error=function(A){vBulletin_AJAX_Error_Handler(A)};vB_AJAX_ReadMarker.prototype.handle_ajax_request=function(D){var E=YAHOO.util.Dom.getElementsByClassName("threadbit","li","threadlist");for(var A=0;A<E.length;A++){YAHOO.util.Dom.removeClass(E[A],"new");var C=YAHOO.util.Dom.getElementsByClassName("threadtitle_unread","a",E[A]);C=C[0];if(C){YAHOO.util.Dom.removeClass(C,"threadtitle_unread");var F=YAHOO.util.Dom.getElementsByClassName("gotonewpost","img",E[A]);if(F&&F[0]){var B=YAHOO.util.Dom.getAncestorByTagName(F[0],"a");if(B){YAHOO.util.Dom.setStyle(B,"display","none")}}}}if(window.YAHOO&&YAHOO.vBulletin&&YAHOO.vBulletin.vBPopupMenu){YAHOO.vBulletin.vBPopupMenu.close_all()}};function mark_forum_read(A){if(AJAX_Compatible){vB_ReadMarker[A]=new vB_AJAX_ReadMarker(A);vB_ReadMarker[A].mark_read()}else{window.location="forumdisplay.php?"+SESSIONURL+"do=markread&forumid="+A}return false};var vB_ThreadTitle_Editor=null;if(AJAX_Compatible&&(typeof vb_disable_ajax=="undefined"||vb_disable_ajax<2)){vB_XHTML_Ready.subscribe(function(){vB_AJAX_Threadlist_Init("threadlist")})}function vB_AJAX_Threadlist_Init(C){if(!YAHOO.util.Dom.get(C)||!AJAX_Compatible||(typeof(vb_disable_ajax)!="undefined"&&vb_disable_ajax>=2)){return}var D=YAHOO.util.Dom.getElementsByClassName("threadbit","li",C);for(var B=0;B<D.length;B++){if(D[B].id.match(/^thread_/)){YAHOO.util.Event.on(D[B],"dblclick",vB_AJAX_ThreadList_Events.prototype.threadtitle_doubleclick);var A=YAHOO.util.Dom.getElementsByClassName("threadstatus","a",D[B]);if(A.length>0){A[0].style.cursor=pointer_cursor;YAHOO.util.Event.on(A[0],"dblclick",vB_AJAX_ThreadList_Events.prototype.threadicon_doubleclick)}}}}function vB_AJAX_OpenClose(A){this.statuslink=A;this.threadbit=false;if(!this.threadbit){this.threadbit=YAHOO.util.Dom.getAncestorByClassName(this.statuslink,"threadbit");this.threadid=this.threadbit.id.substr(this.threadbit.id.lastIndexOf("_")+1)}this.closed=YAHOO.util.Dom.hasClass(this.threadbit,"lock");this.toggle=function(){YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php?do=updatethreadopen&t="+this.threadid),{success:this.handle_ajax_response,failure:vBulletin_AJAX_Error_Handler,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=updatethreadopen&t="+this.threadid+"&open="+this.closed)};this.handle_ajax_response=function(C){if(C.responseXML){var B=C.responseXML.getElementsByTagName("status")[0].firstChild.nodeValue;if("closed"==B){YAHOO.util.Dom.addClass(this.threadbit,"lock");this.closed=true}else{if("open"==B){YAHOO.util.Dom.removeClass(this.threadbit,"lock");this.closed=false}}}};this.toggle()}function vB_AJAX_TitleEdit(A){this.obj=A;this.threadid=this.obj.id.substr(this.obj.id.lastIndexOf("_")+1);this.linkobj=fetch_object("thread_title_"+this.threadid);this.container=this.linkobj.parentNode;this.editobj=null;this.xml_sender=null;this.origtitle="";this.editstate=false;this.progress_image=new Image();this.progress_image.src=IMGDIR_MISC+"/11x11progress.gif";this.edit=function(){if(this.editstate==false){this.inputobj=document.createElement("input");this.inputobj.type="text";this.inputobj.size=50;this.inputobj.maxLength=((typeof(titlemaxchars)=="number"&&titlemaxchars>0)?titlemaxchars:85);this.inputobj.style.width=Math.max(this.linkobj.offsetWidth,250)+"px";this.inputobj.className="textbox";this.inputobj.value=PHP.unhtmlspecialchars(this.linkobj.innerHTML);this.inputobj.title=this.inputobj.value;this.inputobj.onblur=vB_AJAX_ThreadList_Events.prototype.titleinput_onblur;this.inputobj.onkeypress=vB_AJAX_ThreadList_Events.prototype.titleinput_onkeypress;this.editobj=this.container.insertBefore(this.inputobj,this.linkobj);this.editobj.select();this.origtitle=this.linkobj.innerHTML;this.linkobj.style.display="none";this.editstate=true}};this.restore=function(){if(this.editstate==true){if(this.editobj.value!=this.origtitle){this.container.appendChild(this.progress_image);this.save(this.editobj.value)}else{this.linkobj.innerHTML=this.editobj.value}this.container.removeChild(this.editobj);this.linkobj.style.display="";this.editstate=false;this.obj=null}};this.save=function(B){YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php?do=updatethreadtitle&t="+this.threadid),{success:this.handle_ajax_response,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=updatethreadtitle&t="+this.threadid+"&title="+PHP.urlencode(B))};this.handle_ajax_response=function(B){if(B.responseXML){this.linkobj.innerHTML=B.responseXML.getElementsByTagName("linkhtml")[0].firstChild.nodeValue;this.linkobj.href=B.responseXML.getElementsByTagName("linkhref")[0].firstChild.nodeValue}this.container.removeChild(this.progress_image);vB_ThreadTitle_Editor.obj=null};this.edit()}function vB_AJAX_ThreadList_Events(){}vB_AJAX_ThreadList_Events.prototype.threadtitle_doubleclick=function(A){if(vB_ThreadTitle_Editor&&vB_ThreadTitle_Editor.obj==this){return false}else{try{vB_ThreadTitle_Editor.restore()}catch(A){}vB_ThreadTitle_Editor=new vB_AJAX_TitleEdit(this)}};vB_AJAX_ThreadList_Events.prototype.threadicon_doubleclick=function(A){YAHOO.util.Event.stopPropagation(A);openclose=new vB_AJAX_OpenClose(this)};vB_AJAX_ThreadList_Events.prototype.titleinput_onblur=function(A){vB_ThreadTitle_Editor.restore()};vB_AJAX_ThreadList_Events.prototype.titleinput_onkeypress=function(A){A=A?A:window.event;switch(A.keyCode){case 13:vB_ThreadTitle_Editor.inputobj.blur();return false;case 27:vB_ThreadTitle_Editor.inputobj.value=vB_ThreadTitle_Editor.origtitle;vB_ThreadTitle_Editor.inputobj.blur();return true}};vB_XHTML_Ready.subscribe(init_ThreadBits);function init_ThreadBits(){var B=YAHOO.util.Dom.getElementsByClassName("threadbit","li","threadlist");for(var A=0;A<B.length;A++){new ThreadBit(B[A])}}function ThreadBit(A){this.threadbit=YAHOO.util.Dom.get(A);this.handle_description()}ThreadBit.prototype.handle_description=function(){var A=YAHOO.util.Dom.getElementsByClassName("threaddesc","p",this.threadbit);if(A&&A[0]&&A[0].firstChild){this.description=A[0].firstChild.nodeValue;YAHOO.util.Dom.getElementsByClassName("threadinfo","div",this.threadbit)[0].title=this.description}};function vB_Text_Editor(C,B){this.autosave_text="";this.autosave_title="";this.initialized=false;this.editorid=C;this.config=B;this.config.baseHref=getBaseUrl();this.initial_text_crc32=null;this.initial_title_crc32=null;this.lastautosave_text_crc32=null;this.lastautosave_title_crc32=null;this.autosave_ajax_req=null;this.editor=null;this.vBevents={editorready:new YAHOO.util.CustomEvent("editorready",this)};this.editorready=false;this.autosave_enabled=(this.config.vbulletin.contenttypeid!=""&&this.config.vbulletin.contenttypeid!=null&&this.config.vbulletin.userid!=0&&this.config.vbulletin.postautosave!=0);this.textarea=YAHOO.util.Dom.get(C+"_editor");this.textarea_backup=YAHOO.util.Dom.get(C+"_editor_backup");this.textarea.value=this.unescape_text(this.textarea.value);this.isSafari=CKEDITOR.env.webkit&&navigator.userAgent.toLowerCase().indexOf(" chrome/")==-1;this.disablewysiwyg=false;if(this.config._removePlugins){CKEDITOR.config.removePlugins=this.config._removePlugins}if(this.config._extraPlugins){CKEDITOR.config.extraPlugins=this.config._extraPlugins}var A=true;if(!CKEDITOR.vBulletin){CKEDITOR.vBulletin={};if(CKEDITOR.env.mobile&&!CKEDITOR.env.isCompatible){CKEDITOR.env.isCompatible=true;CKEDITOR.vBulletin.mobileSource=true}var D={failure:vBulletin_AJAX_Error_Handler,timeout:vB_Default_Timeout,success:this.load_language,scope:this};YAHOO.util.Connect.asyncRequest("GET",fetch_ajax_url("ckeditor.php?l="+this.config.language+"&t="+this.config.vbulletin.lastphraseupdate),D);A=false}if(CKEDITOR.vBulletin.mobileSource&&this.config.editorMode>0){this.config.startupMode="enhancedsource";this.disablewysiwyg=true}if(A){this.init()}}vB_Text_Editor.prototype.autosavetimer=function(D){if(!this.autosave_enabled){return}var A=1000*this.config.vbulletin.postautosave;var B=typeof(D)!="undefined"?D:A;var C=this;this.autoupdatetimer=setTimeout(function(){C.autosave()},B)};vB_Text_Editor.prototype.fade_autosave=function(A){if(!A){A=1}A-=0.05;if(A>0){YAHOO.util.Dom.setStyle(this.editor.editorid+"_autosaved","opacity",A);var B=this;setTimeout(function(){B.fade_autosave(A)},150)}else{this.hide_autosave_notice()}};vB_Text_Editor.prototype.hide_autosave_notice=function(){if(this.autosave_enabled){YAHOO.util.Dom.addClass(this.editorid+"_autosaved","hidden");YAHOO.util.Dom.setStyle(this.editorid+"_autosaved","opacity",1)}};vB_Text_Editor.prototype.autosave_notice=function(){YAHOO.util.Dom.removeClass(this.editor.editorid+"_autosaved","hidden");var A=this;setTimeout(function(){A.fade_autosave()},30)};vB_Text_Editor.prototype.autosave=function(){if(!this.autosave_enabled){return}if(!this.initialized){this.autosavetimer();return}var C=false;if(this.config.autoloadtitleid&&YAHOO.util.Dom.get(this.config.autoloadtitleid)){var H=YAHOO.util.Dom.get(this.config.autoloadtitleid).value;var E=crc32(H);if(this.lastautosave_title_crc32!=E){C=true}this.lastautosave_title_crc32=E}else{var H=""}var D=PHP.trim(this.getRawData());var B=crc32(D);var C=(C||this.lastautosave_text_crc32!=B);this.lastautosave_text_crc32=B;var I=YAHOO.util.Connect.isCallInProgress(this.autosave_ajax_req);if(D&&C&&!I){if(this.editor.document){var K=this.editor.dataProcessor.getAutoSaveData()}else{var K=this.editor.getData()}var J={failure:vBulletin_AJAX_Error_Handler,timeout:vB_Default_Timeout,success:this.autosave_notice,scope:this};var G=vBulletin.attachinfo&&vBulletin.attachinfo.posthash?vBulletin.attachinfo.posthash:"";var A=vBulletin.attachinfo&&vBulletin.attachinfo.poststarttime?vBulletin.attachinfo.poststarttime:"";var F=SESSIONURL+"do=autosave&securitytoken="+SECURITYTOKEN+"&posthash="+PHP.urlencode(G)+"&poststarttime="+parseInt(A,10)+"&ajax=1&&pagetext="+PHP.urlencode(K)+"&title="+PHP.urlencode(H)+"&contenttypeid="+PHP.urlencode(this.config.vbulletin.contenttypeid)+"&contentid="+parseInt(this.config.vbulletin.contentid,10)+"&wysiwyg="+this.is_wysiwyg_mode()+"&parsetype="+PHP.htmlspecialchars(this.editor.config.parsetype)+"&parentcontentid="+parseInt(this.config.vbulletin.parentcontentid);this.autosave_ajax_req=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php?do=autosave"),J,F)}if(I){this.autosavetimer(10000)}else{this.autosavetimer()}};vB_Text_Editor.prototype.is_wysiwyg_mode=function(){return(this.editor.mode=="wysiwyg"?1:0)};vB_Text_Editor.prototype.load_language=function(F){if(F.responseXML){CKEDITOR.vbphrase={};var C=F.responseXML.getElementsByTagName("phrase");if(C.length){for(var B=0;B<C.length;B++){var D=C[B].getAttribute("name");if(C[B].firstChild){var A=C[B].firstChild.nodeValue;var G=CKEDITOR.vbphrase;var E=D.split(".");for(var H=0;H<E.length;H++){if(H==(E.length-1)){G[E[H]]=A}else{if(typeof(G[E[H]])!="object"){G[E[H]]={}}G=G[E[H]]}}}}}CKEDITOR.vbphrase.dir=document.documentElement.dir;this.init()}};vB_Text_Editor.prototype.editor_ready=function(B){if(this.config.nobbcode){this.editor.getCommand("removeFormat").disable();this.hide_button("removeFormat");this.editor.getCommand("enhancedsource").disable();this.hide_button("enhancedsource")}if(this.disablewysiwyg){this.editor.getCommand("enhancedsource").disable()}if(!this.get_button("bold")){this.editor.addCommand("bold",{exec:function(){return}})}if(!this.get_button("italic")){this.editor.addCommand("italic",{exec:function(){return}})}if(!this.get_button("underline")){this.editor.addCommand("underline",{exec:function(){return}})}if(this.wysiwyg_mode==2&&CKEDITOR.env.gecko){var A=this;setTimeout(function(){A.force_caret_ff()},500);this.editor.document.on("mouseover",this.force_caret_ff,this);this.editor.document.on("click",this.force_caret_ff,this)}if(this.config.autofocus){this.check_focus()}YAHOO.util.Dom.addClass(this.editorid,this.config.bodyClass);this.set_autoload_crc32();this.editor.on("dataReady",this.setupEventHandling,this)};vB_Text_Editor.prototype.setupEventHandling=function(A){if(this.editor.mode=="wysiwyg"){if(!CKEDITOR.env.webkit){YAHOO.util.Event.on(this.editor.document.$,"mousedown",this.mousedown,this,true);YAHOO.util.Event.on(this.editor.document.$,"contextmenu",this.contextmenu,this,true)}YAHOO.util.Event.on(this.editor.document.$,"dblclick",this.img_dblclick,this,true);YAHOO.util.Event.on(this.editor.document.$,"dragend",this.img_dragend,this,true);if(this.isSafari){YAHOO.util.Event.on(this.editor.document.$,"mousedown",this.img_mousedown,this,true)}}};vB_Text_Editor.prototype.img_mousedown=function(B){var A=YAHOO.util.Event.getTarget(B);if(YAHOO.util.Dom.hasClass(A,"previewthumb")){B.preventDefault()}};vB_Text_Editor.prototype.mousedown=function(B){var A=YAHOO.util.Event.getTarget(B);if(A.tagName&&A.tagName.toLowerCase()=="html"&&this.which_button(B)==3){this.set_body_height()}};vB_Text_Editor.prototype.which_button=function(A){return A.which?A.which:(A.button==1?1:(A.button==2?3:(A.button==4?2:1)))};vB_Text_Editor.prototype.contextmenu=function(B){var A=YAHOO.util.Event.getTarget(B);if(A.tagName&&A.tagName.toLowerCase()=="body"&&this.which_button(B)==3){this.set_body_height("auto")}};vB_Text_Editor.prototype.pasteFromWordResize=function(){this.editor.on("dialogShow",function(C){if(C.data.getName()=="paste"){var A=C.data.getSize();var B=YAHOO.util.Dom.getElementsByClassName("cke_pasteframe","iframe",C.data.getElement().$);if(B.length){YAHOO.util.Dom.setStyle(B[0],"width","100%");YAHOO.util.Dom.setStyle(B[0],"height",A.height-115-95+"px")}}});if(!CKEDITOR.vbdialog_resize){CKEDITOR.dialog.on("resize",function(C){if(C.data.dialog.getName()=="paste"){var B=YAHOO.util.Dom.getElementsByClassName("cke_pasteframe","iframe",C.data.dialog.getElement().$);if(B.length){YAHOO.util.Dom.setStyle(B[0],"height",C.data.height-115+"px")}}if(C.data.dialog.getName()=="pastetext"){var A=YAHOO.util.Dom.getElementsByClassName("cke_dialog_ui_input_textarea","textarea",C.data.dialog.$);if(A.length){YAHOO.util.Dom.setStyle(A[0],"width",C.data.width+"px");YAHOO.util.Dom.setStyle(A[0],"height",C.data.height+"px")}}});CKEDITOR.vbdialog_resize=true}};vB_Text_Editor.prototype.set_body_height=function(B){var H=this.editor.window.$.frameElement.contentWindow.document.body;if(B){YAHOO.util.Dom.setStyle(H,"height",B)}else{var A=parseInt(YAHOO.util.Dom.getStyle(H,"margin-top"),10);var E=parseInt(YAHOO.util.Dom.getStyle(H,"margin-bottom"),10);var D=parseInt(YAHOO.util.Dom.getStyle(H,"padding-top"),10);var G=parseInt(YAHOO.util.Dom.getStyle(H,"padding-bottom"),10);var C=this.editor.window.$.frameElement.offsetHeight;var F=H.offsetHeight-A-E-D-G;if(F<C){YAHOO.util.Dom.setStyle(H,"height",(C-A-E-D-G)+"px")}}};vB_Text_Editor.prototype.img_dblclick=function(B){if(typeof(B.button)!="undefined"&&B.button!=0){return}this.check_focus();var A=YAHOO.util.Event.getTarget(B);if(YAHOO.util.Dom.hasClass(A,"previewthumb")){this.editor.current_attachmentid=A.getAttribute("attachmentid");this.editor.execCommand("openAttachmentConfig")}};vB_Text_Editor.prototype.img_dragend=function(B){var A=YAHOO.util.Dom.getElementsByClassName("previewthumb","img",this.editor.document.$);var C=false;for(i=0;i<A.length;i++){if(C=PHP.stripos(A[i].src,"attachment.php")){A[i].src=A[i].src.substr(C)}}};vB_Text_Editor.prototype.set_autoload_crc32=function(){this.initial_text_crc32=crc32(PHP.trim(this.getRawData()));this.lastautosave_text_crc32=this.initial_text_crc32;if(this.config.autoloadtitleid&&YAHOO.util.Dom.get(this.config.autoloadtitleid)){this.initial_title_crc32=crc32(PHP.trim(YAHOO.util.Dom.get(this.config.autoloadtitleid).value));this.lastautosave_title_crc32=this.initial_title_crc32}};vB_Text_Editor.prototype.force_caret_ff=function(A){if(A){A.removeListener()}this.editor.document.getBody().setAttribute("contentEditable",true);if(this.config.autofocus){this.check_focus()}};vB_Text_Editor.prototype.init=function(){if(this.textarea_backup.value){this.textarea.value=this.textarea_backup.value;this.textarea_backup.value=""}this.editor=CKEDITOR.replace(this.editorid+"_editor",this.config);if(!this.editor){if(this.config.autofocus){this.check_focus()}this.editorready=true;return}this.editor.lang=CKEDITOR.vbphrase;this.editor.on("instanceReady",this.editor_ready,this);if(this.config.nobbcode){this.editor.config.startupMode="enhancedsource"}YAHOO.util.Dom.setStyle(this.textarea,"visibility","hidden");YAHOO.util.Dom.setStyle(this.textarea,"width","0px");YAHOO.util.Dom.setStyle(this.textarea,"min-width","0px");this.editor.hitServer=true;var B=this.editor;this.editor.on("paste",function(D){var E=D.data;if(E.text||E.html){B.hitServer=false}},null,null,999);this.editor.on("afterPaste",function(D){if(!B.hitServer){B.hitServer=true}},null,null,1001);this.editor.editorid=this.editorid;if(this.config.vbulletin.attachinfo){vBulletin.attachinfo=this.config.vbulletin.attachinfo}if(this.editor!=null&&(typeof(require_click)=="undefined"||!require_click||this.editorid!="vB_Editor_QR")){this.initialize()}this.wysiwyg_mode=this.config.editorMode;this.init_footer_text();this.setup_unload();this.autosavetimer();this.vBevents.editorready.fire();this.editorready=true;var A=this.editorid;var C=this.config.moresmilies;CKEDITOR.on("dialogDefinition",function(F){var G=F.data.name;var H=F.data.definition;var E=F.data.definition.dialog;if(G=="smiley"&&C){var D=(function(){var I=function(K,J){J=J||{};return CKEDITOR.tools.extend({id:"more",type:"button",label:CKEDITOR.vbphrase.vbulletin.more,"class":"cke_dialog_ui_button_ok",onClick:function(L){var M=L.data.dialog;M.hide();vB_Editor[A].open_smilie_window();return false}},J,true)};I.type="button";I.override=function(J){return CKEDITOR.tools.extend(function(K){return I(K,J)},{type:"button"},true)};return I})();H.buttons=[D,CKEDITOR.dialog.cancelButton]}})};vB_Text_Editor.prototype.hide_autosave_button=function(){if(this.autosave_enabled){YAHOO.util.Dom.setStyle(this.editorid+"_restore_autosave","display","none")}};vB_Text_Editor.prototype.restore_autosave_text=function(){this.hide_autosave_button();this.write_editor_contents(this.autosave_text);if(this.config.autoloadtitleid&&this.autosave_title){YAHOO.util.Dom.get(this.config.autoloadtitleid).value=this.autosave_title}this.editor.focus()};vB_Text_Editor.prototype.init_footer_text=function(E){var C="";var A='<div class="as_ind_container"><div class="hidden" id="'+this.editor.editorid+'_autosaved">%1</div></div>';re=new RegExp("%1","gi");if(this.config.autoload){this.autosave_text=this.unescape_text(this.config.autoload);this.autosave_title=this.unescape_text(this.config.autoloadtitle);C='<div class="cke_bottom_restore_autosave" id="'+this.editor.editorid+'_restore_autosave"><span class="cke_toolgroup"><span class="cke_button"><a class="restoretext" role="button">%1</a></span></span></div>';YAHOO.util.Event.on(this.editor.editorid+"_restore_autosave","click",this.restore_autosave_text,this,true)}if(this.editor.getThemeSpace&&this.editor.getThemeSpace("bottom")){A=A.replace(re,this.editor.lang.autosave.autosaved);C=C.replace(re,this.editor.lang.autosave.restoreAutosaveContent);var B=this.editor.getThemeSpace("bottom");B.$.innerHTML=B.$.innerHTML+A+C}else{var D=this;this.editor.on("themeSpace",function(F){if(F.data.space=="bottom"){A=A.replace(re,D.editor.lang.autosave.autosaved);C=C.replace(re,D.editor.lang.autosave.restoreAutosaveContent);F.data.html+=A+C}})}};vB_Text_Editor.prototype.uninitialize=function(){this.initialized=false};vB_Text_Editor.prototype.initialize=function(){this.initialized=true};vB_Text_Editor.prototype.getRawData=function(){if(this.editor){if(this.editor.document){var A=this.editor.document.getBody().getHtml();if(CKEDITOR.env.gecko){A=A.replace(/<br>(?=\s*(:?$|<\/body>))/,"")}return A}else{return this.editor.textarea.$.value}}else{return this.textarea.value}};vB_Text_Editor.prototype.exit_prompt=function(C){var F=false;for(x in vB_Editor){var A=PHP.trim(vB_Editor[x].getRawData());var E=crc32(A);var B=null;if(this.config.autoloadtitleid&&YAHOO.util.Dom.get(this.config.autoloadtitleid)){B=crc32(PHP.trim(YAHOO.util.Dom.get(this.config.autoloadtitleid).value))}if(vB_Editor[x].lastautosave_text_crc32){var D=(vB_Editor[x].lastautosave_text_crc32!=E)}else{if(vB_Editor[x].lastautosave_title_crc32){var D=(vB_Editor[x].lastautosave_title_crc32!=B)}else{var D=(vB_Editor[x].initial_text_crc32!=E)}}if(vB_Editor[x].initialized&&D){F=true}}if(F){if(C){C.returnValue=this.editor.lang.vbulletin.changes_will_be_lost}return this.editor.lang.vbulletin.changes_will_be_lost}};vB_Text_Editor.prototype.setup_unload=function(){var A=true;var C=YAHOO.util.Event.getListeners(window);if(C&&C.length){for(var B=0;B<C.length;B++){if(C[B].type=="beforeunload"&&C[B].fn==this.exit_prompt){A=false}}}if(A){YAHOO.util.Event.addListener(window,"beforeunload",this.exit_prompt,this,true)}};vB_Text_Editor.prototype.unescape_text=function(C){var B=C.match(/&#([0-9]+);/g);if(B){for(var A=0;typeof B[A]!="undefined";A++){if(submatch=B[A].match(/^&#([0-9]+);$/)){C=C.replace(submatch[0],String.fromCharCode(submatch[1]))}}}return C};vB_Text_Editor.prototype.check_focus=function(){if(this.editor){if(this.editor.focus){this.editor.focus()}}else{this.textarea.focus()}};vB_Text_Editor.prototype.destroy=function(){this.uninitialize();this.autosave_enabled=false;YAHOO.util.Connect.abort(this.autosave_ajax_req);if(this.editor){this.editor.focusManager.forceBlur();CKEDITOR.remove(this.editor)}};vB_Text_Editor.prototype.get_editor_contents=function(){if(this.editor){return this.editor.getData()}else{return this.textarea.value}};vB_Text_Editor.prototype.html_entity_decode=function(C){if(this.wysiwyg_mode==2||!C){return C}var D=document.createElement("div");YAHOO.util.Dom.setStyle(D,"display","none");C=C.replace(/</g,"&lt;").replace(/>/g,"&gt;");D.innerHTML='<textarea id="vb_entity_decoder">'+C+"</textarea>";var A=document.body.appendChild(D);var B=YAHOO.util.Dom.get("vb_entity_decoder").value;A.parentNode.removeChild(A);return B};vB_Text_Editor.prototype.write_editor_contents=function(C,B){var A=this;if(!B){C=PHP.trim(C)}C=this.html_entity_decode(C);if(this.editor){this.editor.setData(C,this.reset_autosave)}else{this.textarea.value=C}};vB_Text_Editor.prototype.reset_autosave=function(){vB_Editor[this.editorid].set_autoload_crc32()};vB_Text_Editor.prototype.enable_editor=function(B,A){this.initialize();this.write_editor_contents(B,A)};vB_Text_Editor.prototype.disable_editor=function(A){this.uninitialize()};vB_Text_Editor.prototype.prepare_submit=function(D,A){this.hide_autosave_notice();var B=this.getRawData();this.textarea_backup.value=this.get_editor_contents();var C=validatemessage(stripcode(B,true),D,A);if(C){this.textarea.value=B;this.uninitialize();return C}else{this.check_focus();return false}};vB_Text_Editor.prototype.open_smilie_window=function(B,A){if(typeof(B)=="undefined"){B=440}if(typeof(A)=="undefined"){A=480}smilie_window=openWindow(fetch_ajax_url("misc.php?"+SESSIONURL+"do=getsmilies&editorid="+this.editorid,B,A,"smilie_window"));window.onunload=vB_Text_Editor.prototype.smiliewindow_onunload};vB_Text_Editor.prototype.insert_smilie=function(B,A){A.editor.insertHtml(YAHOO.util.Dom.getAttribute(this,"alt"))};vB_Text_Editor.prototype.init_smilies=function(C){if(C!=null){var B=fetch_tags(C,"img");for(var A=0;A<B.length;A++){if(B[A].id&&B[A].id.indexOf("_smilie_")!=false){B[A].style.cursor=pointer_cursor;B[A].unselectable="on";YAHOO.util.Event.addListener(B[A],"click",this.insert_smilie,this,false)}}}};vB_Text_Editor.prototype.smiliewindow_onunload=function(A){if(typeof smilie_window!="undefined"&&!smilie_window.closed){smilie_window.close()}};vB_Text_Editor.prototype.get_button=function(F,C){if(!C){C="button"}for(var B=0;B<this.editor.toolbox.toolbars.length;B++){var E=this.editor.toolbox.toolbars[B];for(var A=0;A<E.items.length;A++){var D=E.items[A];if((C=="button"&&D.button&&D.button.command==F)||(C=="combo"&&D.combo&&D.combo.command==F)){return D}}}};vB_Text_Editor.prototype.hide_button=function(B,G){if(!G){G="button"}var E=this.get_button(B,G);if(E){if(G=="button"){if(YAHOO.util.Dom.getStyle(E.id,"display")=="none"){return}var C=YAHOO.util.Dom.getAncestorByClassName(E.id,"cke_toolgroup");if(C){if(YAHOO.util.Dom.getStyle(C,"display")=="none"){return}var F=YAHOO.util.Dom.getElementsByClassName("cke_button","span",C);var D=0;for(var H=0;H<F.length;H++){var I=F[H].getElementsByTagName("a");if(I.length){if(I[0].id==E.id){continue}if(YAHOO.util.Dom.getStyle(I[0].id,"display")!="none"){D++}}}if(D==0){YAHOO.util.Dom.setStyle(C,"display","none")}YAHOO.util.Dom.setStyle(E.id,"display","none")}}else{var A=YAHOO.util.Dom.getAncestorByClassName(E.id,"cke_rcombo");if(A){YAHOO.util.Dom.setStyle(A,"display","none")}}}};vB_Text_Editor.prototype.remove_attachment=function(C){if(this.is_wysiwyg_mode()){var A=YAHOO.util.Dom.getElementsByClassName("previewthumb","img",this.editor.document.$);var D=A.length;for(var B=0;B<D;B++){if(C==YAHOO.util.Dom.getAttribute(A[B],"attachmentid")){A[B].parentNode.removeChild(A[B])}}}};var tag_add_comp;vB_XHTML_Ready.subscribe(function(){if(fetch_object("tag_edit_link")){YAHOO.util.Event.on(fetch_object("tag_edit_link"),"click",tag_edit_click)}});function tag_edit_click(A){YAHOO.util.Event.stopEvent(A);if(!this.tag_editor){this.tag_editor=new vB_AJAX_TagThread("tag_list_cell",this.id)}this.tag_editor.fetch_form()}function vB_AJAX_TagThread(B,C){this.edit_form="tag_edit_form";this.edit_cancel="tag_edit_cancel";this.form_progress="tag_form_progress";this.submit_progress="tag_edit_progress";this.form_visible=false;this.do_ajax_submit=true;this.tag_container=B;var A=fetch_object(C).href.match(/(\?|&)t=([0-9]+)/);if(A&&A[2]){this.contentid=A[2];this.contenttype="thread"}else{var A=fetch_object(C).href.match(/(\?|&)contentid=([0-9]+)/);this.contentid=A[2];var A=fetch_object(C).href.match(/(\?|&)contenttype=([a-zA-Z0-9]+)/);this.contenttype=A[2]}}vB_AJAX_TagThread.prototype.fetch_form=function(){if(!this.form_visible){YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("threadtag.php?contenttype="+this.contenttype+"&contentid="+this.contentid),{success:this.handle_ajax_form,failure:this.handle_ajax_form_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&contenttype="+this.contenttype+"&contentid="+this.contentid+"&ajax=1");if(fetch_object(this.form_progress)){fetch_object(this.form_progress).style.display=""}}};vB_AJAX_TagThread.prototype.handle_ajax_form=function(C){if(C.responseXML&&!this.form_visible){var B=C.responseXML.getElementsByTagName("error");if(B.length){alert(B[0].firstChild.nodeValue)}else{if(C.responseXML.getElementsByTagName("html")[0]){var A=fetch_object(this.tag_container);A.origInnerHTML=A.innerHTML;A.innerHTML=C.responseXML.getElementsByTagName("html")[0].firstChild.nodeValue;YAHOO.util.Event.on(this.edit_form,"submit",this.submit_tag_edit,this,true);YAHOO.util.Event.on(this.edit_cancel,"click",this.cancel_tag_edit,this,true);if(fetch_object("tagpopup_body")&&fetch_object("tagpopup_ctrl")){vbmenu_register("tag_add_wrapper",true);tag_add_comp=new vB_AJAX_TagSuggest("tag_add_comp","tagpopup_ctrl","tagpopup");tag_add_comp.allow_multiple=true;var D=C.responseXML.getElementsByTagName("delimiters")[0];if(D&&D.firstChild){tag_add_comp.set_delimiters(D.firstChild.nodeValue)}fetch_object("tagpopup_ctrl").focus();fetch_object("tagpopup_ctrl").focus()}this.form_visible=true}}}if(fetch_object(this.form_progress)){fetch_object(this.form_progress).style.display="none"}};vB_AJAX_TagThread.prototype.handle_ajax_form_error=function(A){vBulletin_AJAX_Error_Handler(A);window.location="threadtag.php?"+SESSIONURL+"&contenttype="+this.contenttype+"&contentid="+this.contentid};vB_AJAX_TagThread.prototype.submit_tag_edit=function(B){if(this.do_ajax_submit){YAHOO.util.Event.stopEvent(B);var A=new vB_Hidden_Form(null);A.add_variables_from_object(fetch_object(this.edit_form));YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("threadtag.php?do=managetags&contenttype="+this.contenttype+"&contentid="+this.contentid),{success:this.handle_ajax_submit,failure:this.handle_ajax_submit_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=managetags&ajax=1&"+A.build_query_string());if(fetch_object(this.submit_progress)){fetch_object(this.submit_progress).style.display=""}}};vB_AJAX_TagThread.prototype.handle_ajax_submit=function(C){if(C.responseXML){var A=C.responseXML.getElementsByTagName("error");if(A.length){alert(A[0].firstChild.nodeValue);this.cancel_tag_edit()}else{var D=C.responseXML.getElementsByTagName("taghtml");if(D.length&&D[0].firstChild&&D[0].firstChild.nodeValue!==""){YAHOO.util.Dom.get(this.tag_container).innerHTML=D[0].firstChild.nodeValue}var B=C.responseXML.getElementsByTagName("warning");if(B.length&&B[0].firstChild){alert(B[0].firstChild.nodeValue)}this.form_visible=false}}if(fetch_object(this.submit_progress)){fetch_object(this.submit_progress).style.display="none"}};vB_AJAX_TagThread.prototype.handle_ajax_submit_error=function(A){vBulletin_AJAX_Error_Handler(A);this.do_ajax_submit=false;fetch_object(this.edit_form).submit()};vB_AJAX_TagThread.prototype.cancel_tag_edit=function(){if(tag_add_comp){tag_add_comp.menu_hide()}var A=fetch_object(this.tag_container);if(A.origInnerHTML){A.innerHTML=A.origInnerHTML;A.origInnerHTML=""}if(fetch_object(this.form_progress)){fetch_object(this.form_progress).style.display="none"}this.form_visible=false};var webkit_version=userAgent.match(/applewebkit\/([0-9]+)/);var use_suggest=AJAX_Compatible&&!(is_saf&&!(webkit_version[1]>=412));function vB_AJAX_Suggest(B,A,C){this.xmltag="item"}if(use_suggest){vB_AJAX_Suggest.prototype.base_init=function(B,A,C){this.menuobj=YAHOO.util.Dom.get(C+"_body");if(!this.menuobj){this.menuobj=YAHOO.util.Dom.get(C+"_menu")}if(!this.menuobj){this.menuobj=document.createElement("div");this.menuobj.id=C+"_body";YAHOO.util.Dom.addClass(this.menuobj,"popupbody");YAHOO.util.Dom.get(C).appendChild(this.menuobj)}this.textobj=YAHOO.util.Dom.get(A);this.textobj.setAttribute("autocomplete","off");this.textobj.onfocus=function(D){this.obj.active=true};this.textobj.onblur=function(D){this.obj.active=false};this.textobj.obj=this;this.set_primary_delimiter(",");this.varname=B;this.menukey=C;this.fragment="";this.doneitems="";this.selected=0;this.menuopen=false;this.timeout=null;this.items=new Array();this.active=false;this.ajax_req=null;this.allow_multiple=false;this.min_chars=3;this.textobj.onkeyup=function(D){return this.obj.key_event_handler(D)};this.textobj.onkeypress=function(D){D=D?D:window.event;if(D.keyCode==13){return(this.obj.menuopen?false:true)}}};vB_AJAX_Suggest.prototype.set_primary_delimiter=function(A){this.delim=A;this.delimiters=new Array(this.delim)};vB_AJAX_Suggest.prototype.set_delimiters=function(C){this.delimiters=new Array(this.delim);if(C){var A,B;if(A=PHP.match_all(C,"{([^}]*)}")){for(B=0;B<A.length;B++){if(A[B][1]!==""){this.delimiters.push(A[B][1])}C=C.replace(A[B][0],"")}}A=C.split(" ");for(B=0;B<A.length;B++){if(A[B]!==""){this.delimiters.push(A[B])}}}};vB_AJAX_Suggest.prototype.get_text=function(){if(this.allow_multiple){var B=-1,C;for(var A=0;A<this.delimiters.length;A++){if(this.textobj.value.lastIndexOf(this.delimiters[A])>B){B=this.textobj.value.lastIndexOf(this.delimiters[A]);C=this.delimiters[A].length}}if(B==-1){this.doneitems=new String("");this.fragment=new String(this.textobj.value)}else{this.doneitems=new String(this.textobj.value.substring(0,B+C));this.fragment=new String(this.textobj.value.substring(B+C))}}else{this.fragment=new String(this.textobj.value)}this.fragment=PHP.trim(this.fragment)};vB_AJAX_Suggest.prototype.set_text=function(B){if(this.allow_multiple){var A=(this.doneitems.substr(this.doneitems.length-1)==" "?"":" ");this.textobj.value=PHP.ltrim(this.doneitems+A+PHP.unhtmlspecialchars(this.items[B],true)+this.delim+" ")}else{this.textobj.value=PHP.unhtmlspecialchars(this.items[B],true)}this.textobj.focus();this.menu_hide();return false};vB_AJAX_Suggest.prototype.move_row_selection=function(A){var B=parseInt(this.selected,10)+parseInt(A,10);if(B<0){B=this.items.length-1}else{if(B>=this.items.length){B=0}}this.set_row_selection(B);return false};vB_AJAX_Suggest.prototype.set_row_selection=function(B){var A=fetch_tags(this.menuobj,"li");if(A.length){A[this.selected].className="vbmenu_option";this.selected=B;A[this.selected].className="vbmenu_hilite"}};vB_AJAX_Suggest.prototype.key_event_handler=function(A){A=A?A:window.event;this.active=true;if(this.menuopen){switch(A.keyCode){case 38:this.move_row_selection(-1);return false;case 40:this.move_row_selection(1);return false;case 27:this.menu_hide();return false;case 13:this.set_text(this.selected);return false}}this.get_text();if(this.fragment.length>=this.min_chars){clearTimeout(this.timeout);this.timeout=setTimeout(this.varname+".item_search();",500)}else{this.menu_hide()}};vB_AJAX_Suggest.prototype.item_search=function(){if(this.active){this.items=new Array();if(YAHOO.util.Connect.isCallInProgress(this.ajax_req)){YAHOO.util.Connect.abort(this.ajax_req)}this.ajax_req=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url(this.get_search_url()),{success:this.handle_ajax_response,failure:vBulletin_AJAX_Error_Handler,timeout:vB_Default_Timeout,scope:this},this.get_search_post())}};vB_AJAX_Suggest.prototype.get_search_url=function(){};vB_AJAX_Suggest.prototype.get_search_post=function(){};vB_AJAX_Suggest.prototype.handle_ajax_response=function(D){if(D.responseXML){var C=this.textobj;do{if(C.style.display=="none"){this.menu_hide();return}}while((C=C.parentNode)!=null&&C.style);var A=D.responseXML.getElementsByTagName(this.xmltag);if(A.length){for(var B=0;B<A.length;B++){this.items[B]=A[B].firstChild.nodeValue}}if(this.items.length){this.menu_build();this.menu_show()}else{this.menu_hide()}}};vB_AJAX_Suggest.prototype.menu_build=function(){if(!YAHOO.vBulletin.vBPopupMenu.popups[this.menukey]){var D=new PopupMenu(YAHOO.util.Dom.get(this.menukey),YAHOO.vBulletin.vBPopupMenu);YAHOO.vBulletin.vBPopupMenu.register_menuobj(D)}else{if(!(YAHOO.env.ua.ie>0&&YAHOO.env.ua.ie<8)){var D=YAHOO.vBulletin.vBPopupMenu.popups[this.menukey];D.init(YAHOO.util.Dom.get(this.menukey),YAHOO.vBulletin.vBPopupMenu)}}this.menu_empty();var E=new RegExp("^("+PHP.preg_quote(this.fragment)+")","i");var C=document.createElement("ul");for(var B in this.items){if(YAHOO.lang.hasOwnProperty(this.items,B)){var A=document.createElement("li");A.className=(B==this.selected?"vbmenu_hilite":"vbmenu_option");A.title="nohilite";A.innerHTML='<a href="#" onclick="return '+this.varname+".set_text("+B+')">'+this.items[B].replace(E,"<strong>$1</strong>")+"</a>";A.onmouseover=this.get_item_mouseover_handler(B);C.appendChild(A)}}this.menuobj.appendChild(C)};vB_AJAX_Suggest.prototype.get_item_mouseover_handler=function(A){var B=this;return function(){return B.set_row_selection(A)}};vB_AJAX_Suggest.prototype.menu_empty=function(){this.selected=0;while(this.menuobj.firstChild){this.menuobj.removeChild(this.menuobj.firstChild)}};vB_AJAX_Suggest.prototype.menu_show=function(){if(this.active){YAHOO.vBulletin.vBPopupMenu.popups[this.menukey].menu=this.menuobj;YAHOO.vBulletin.vBPopupMenu.popups[this.menukey].open_menu(this.textobj.id);this.menuopen=true}};vB_AJAX_Suggest.prototype.menu_hide=function(){YAHOO.vBulletin.vBPopupMenu.close_all();this.menuopen=false}}else{vB_AJAX_Suggest.prototype.set_delimiters=function(A){}}function vB_AJAX_TagSuggest(B,A,C){if(use_suggest){this.base_init(B,A,C)}}vB_AJAX_TagSuggest.prototype=new vB_AJAX_Suggest();if(use_suggest){vB_AJAX_TagSuggest.prototype.get_search_url=function(){return"ajax.php?do=tagsearch"};vB_AJAX_TagSuggest.prototype.get_search_post=function(){return"securitytoken="+SECURITYTOKEN+"&do=tagsearch&fragment="+PHP.urlencode(this.fragment)};vB_AJAX_TagSuggest.prototype.xmltag="tag"}function vB_AJAX_NameSuggest(B,A,C){if(use_suggest){this.base_init(B,A,C);this.set_primary_delimiter(";")}}vB_AJAX_NameSuggest.prototype=new vB_AJAX_Suggest();if(use_suggest){vB_AJAX_NameSuggest.prototype.get_search_url=function(){return"ajax.php?do=usersearch"};vB_AJAX_NameSuggest.prototype.get_search_post=function(){return SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=usersearch&fragment="+PHP.urlencode(this.fragment)};vB_AJAX_NameSuggest.prototype.xmltag="user"}function vB_AJAX_SocialGroupSuggest(B,A,C){if(use_suggest){this.base_init(B,A,C)}}vB_AJAX_SocialGroupSuggest.prototype=new vB_AJAX_Suggest();if(use_suggest){vB_AJAX_SocialGroupSuggest.prototype.get_search_url=function(){return"ajax.php?do=socialgroupsearch"};vB_AJAX_SocialGroupSuggest.prototype.get_search_post=function(){return SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=socialgroupsearch&fragment="+PHP.urlencode(this.fragment)};vB_AJAX_SocialGroupSuggest.prototype.xmltag="socialgroup"};function display_post(A){if(AJAX_Compatible){vB_PostLoader[A]=new vB_AJAX_PostLoader(A);vB_PostLoader[A].init()}else{pc_obj=fetch_object("postcount"+this.postid);openWindow("showthread.php?"+(SESSIONURL?"s="+SESSIONURL:"")+(pc_obj!=null?"&postcount="+PHP.urlencode(pc_obj.name):"")+"&p="+A+"#post"+A)}return false}var vB_PostLoader=new Array();function vB_AJAX_PostLoader(A){this.postid=A;this.post=YAHOO.util.Dom.get("post_"+this.postid)}vB_AJAX_PostLoader.prototype.init=function(){if(this.post){postid=this.postid;pc_obj=fetch_object("postcount"+this.postid);YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("showpost.php?p="+this.postid),{success:this.display,failure:this.handle_ajax_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&ajax=1&postid="+this.postid+(pc_obj!=null?"&postcount="+PHP.urlencode(pc_obj.name):""))}};vB_AJAX_PostLoader.prototype.handle_ajax_error=function(A){vBulletin_AJAX_Error_Handler(A)};vB_AJAX_PostLoader.prototype.display=function(B){if(B.responseXML){var C=B.responseXML.getElementsByTagName("postbit");if(C.length){var A=string_to_node(C[0].firstChild.nodeValue);this.post.parentNode.replaceChild(A,this.post);PostBit_Init(A,this.postid)}else{openWindow("showthread.php?"+(SESSIONURL?"s="+SESSIONURL:"")+(pc_obj!=null?"&postcount="+PHP.urlencode(pc_obj.name):"")+"&p="+this.postid+"#post"+this.postid)}}};function vB_AJAX_ThreadRate_Init(E,F){var D=YAHOO.util.Dom.get(E);if(AJAX_Compatible&&(typeof vb_disable_ajax=="undefined"||vb_disable_ajax<2)&&D){var A=new vB_AJAX_ThreadRate(D,F);for(var C=0;C<D.elements.length;C++){if(D.elements[C].type=="submit"){var G=D.elements[C];var B=document.createElement("input");B.type="button";B.className=G.className;B.value=G.value;YAHOO.util.Event.addListener(B,"click",A.form_click,undefined,A);G.parentNode.insertBefore(B,G);G.parentNode.removeChild(G)}}}}function vB_AJAX_ThreadRate(A,B){this.formobj=A;this.threadid=B;this.output_element_id="threadrating_current"}vB_AJAX_ThreadRate.prototype.handle_ajax_response=function(H){if(H.responseXML){YAHOO.vBulletin.vBPopupMenu.close_all();var C=H.responseXML.getElementsByTagName("error");if(C.length){alert(C[0].firstChild.nodeValue)}else{var A=this.get_child_value(H.responseXML,"vote_threshold_met");if(A){var E=this.get_child_value(H.responseXML,"rating");var G=YAHOO.util.Dom.getElementsByClassName("rating",undefined,this.output_element_id);console.log(G);for(var D=0;D<G.length;D++){for(var B=1;B<=5;B++){YAHOO.util.Dom.removeClass(G[D],"r"+B)}YAHOO.util.Dom.addClass(G[D],"r"+E)}YAHOO.util.Dom.removeClass(this.output_element_id,"hidden")}var F=H.responseXML.getElementsByTagName("message");if(F.length){alert(F[0].firstChild.nodeValue)}}}};vB_AJAX_ThreadRate.prototype.get_child_value=function(B,A){var C=B.getElementsByTagName(A);if(C.length&&C[0].firstChild){return C[0].firstChild.nodeValue}return""};vB_AJAX_ThreadRate.prototype.rate=function(){var A=new vB_Hidden_Form("threadrate.php");A.add_variable("ajax",1);A.add_variables_from_object(this.formobj);if(A.fetch_variable("vote")!=null){YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("threadrate.php?t="+this.threadid+"&vote="+PHP.urlencode(A.fetch_variable("vote"))),{success:this.handle_ajax_response,failure:this.handle_ajax_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&"+A.build_query_string())}};vB_AJAX_ThreadRate.prototype.handle_ajax_error=function(A){vBulletin_AJAX_Error_Handler(A);this.formobj.submit()};vB_AJAX_ThreadRate.prototype.form_click=function(){this.rate();return false};vB_XHTML_Ready.subscribe(init_posticons);function init_posticons(){var C=YAHOO.util.Dom.get("posticons");var A=YAHOO.util.Dom.get("posticon_preview");var B=new Array();if(C&&A){containers=YAHOO.util.Dom.get("posticons").getElementsByTagName("li");for(i=0;i<containers.length;i++){B[i]=new PostIconPreview(containers[i],A);if(B[i].control.checked){B[i].choose()}}}}function PostIconPreview(B,A){this.posticon_preview=A;this.control=B.getElementsByTagName("input")[0];this.icon=B.getElementsByTagName("img")[0];YAHOO.util.Event.on(this.control,"click",this.choose,this,true)}PostIconPreview.prototype.choose=function(A){this.clear_preview();this.set_preview()};PostIconPreview.prototype.clear_preview=function(A){this.posticon_preview.src="images/clear.gif"};PostIconPreview.prototype.set_preview=function(A){if(this.control.value!=0){this.posticon_preview.src="images/icons/icon"+this.control.value+".gif"}};vB_XHTML_Ready.subscribe(function(A){return handle_dep(document.body)});var DepCtrls=new Object();function handle_dep(B){var A=YAHOO.util.Dom.getElementsByClassName("dep_ctrl","input",B);var D=null;for(var C=0;C<A.length;C++){D=new DepCtrl(A[C]);if(!D.fail){console.log("Dep Ctrl: %s",A[C].id);DepCtrls[A[C].id]=D}}}function DepCtrl(C){this.ctrl=YAHOO.util.Dom.get(C);if(!this.ctrl){console.log("Dep Ctrl (ctrl) FAIL: %s",C.id);this.fail=true;return false}this.deps=YAHOO.util.Dom.get(C.id+"_deps");if(!this.deps){console.log("Dep Ctrl (deps_x) FAIL: %s",C.id);this.fail=true;return false}this.set_disabled_state(this.deps,true);if(this.ctrl.type=="checkbox"){console.log("Checkbox %s",this.ctrl.id);this.add_click_event(this.ctrl)}else{if(this.ctrl.type=="radio"){console.log("Radio %s (%s)",this.ctrl.id,this.ctrl.name);var A=document.getElementsByName(this.ctrl.name);for(var B=0;B<A.length;B++){this.add_click_event(A[B])}}}}DepCtrl.prototype.add_click_event=function(A){YAHOO.util.Event.on(A,"click",this.check_state,this,true)};DepCtrl.prototype.check_state=function(A){this.set_disabled_state(this.deps,true);this.set_focus()};DepCtrl.prototype.set_disabled_state=function(B,C){if(B.tagName&&(B.tagName!="DD"||C)){B.disabled=!this.ctrl.checked||this.ctrl.disabled;if(B.tagName=="INPUT"&&YAHOO.util.Dom.hasClass(B,"dep_ctrl")&&DepCtrls[B.id]){DepCtrls[B.id].set_disabled_state(DepCtrls[B.id].deps,true)}if(B.hasChildNodes()){for(var A=0;A<B.childNodes.length;A++){this.set_disabled_state(B.childNodes[A])}}}};DepCtrl.prototype.is_form_element=function(A){switch(A.tagName){case"INPUT":case"SELECT":case"TEXTAREA":return true;default:return false}};DepCtrl.prototype.set_focus=function(B){var A=YAHOO.util.Dom.getElementsBy(this.is_form_element,"*",this.deps);try{try{A[0].focus()}catch(B){A[0].focus()}}catch(B){}};function vB_AJAX_QuickEdit_Init(C){if(AJAX_Compatible){if(typeof C=="string"){C=fetch_object(C)}var B=fetch_tags(C,"a");for(var A=0;A<B.length;A++){if(B[A].name&&B[A].name.indexOf("vB::QuickEdit::")!=-1){B[A].onclick=vB_AJAX_QuickEditor_Events.prototype.editbutton_click}}}}function vB_AJAX_QuickEditor(){this.return_node=null;this.editimgsrc=null;this.postid=null;this.messageobj=null;this.container=null;this.originalhtml=null;this.editstate=false;this.editorcounter=0;this.ajax_req=null;this.show_advanced=true;vBulletin.attachinfo={posthash:"",poststarttime:""}}vB_AJAX_QuickEditor.prototype.ready=function(){if(this.editstate||YAHOO.util.Connect.isCallInProgress(this.ajax_req)){return false}else{return true}};vB_AJAX_QuickEditor.prototype.edit=function(A){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax>0){return true}var C=A.substr(A.lastIndexOf("::")+2);if(YAHOO.util.Connect.isCallInProgress(this.ajax_req)){return false}else{if(!this.ready()){if(this.postid==C){this.full_edit();return false}this.abort()}}this.editorcounter++;this.editorid="vB_Editor_QE_"+this.editorcounter;this.postid=C;this.messageobj=fetch_object("post_message_"+this.postid);this.originalhtml=this.messageobj.innerHTML;this.unchanged=null;this.unchanged_reason=null;var B=YAHOO.util.Dom.get("return_node");if(B){this.return_node=parseInt(B.value,10)}this.fetch_editor();this.editstate=true;return false};vB_AJAX_QuickEditor.prototype.fetch_editor=function(){if(YAHOO.util.Dom.get("progress_"+this.postid)){this.editimgsrc=YAHOO.util.Dom.get("editimg_"+this.postid).getAttribute("src");YAHOO.util.Dom.get("editimg_"+this.postid).setAttribute("src",YAHOO.util.Dom.get("progress_"+this.postid).getAttribute("src"))}document.body.style.cursor="wait";YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php?do=quickedit&p="+this.postid),{success:this.display_editor,failure:this.error_opening_editor,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=quickedit&p="+this.postid+"&editorid="+PHP.urlencode(this.editorid)+(this.return_node?"&return_node="+this.return_node:""))};vB_AJAX_QuickEditor.prototype.error_opening_editor=function(A){vBulletin_AJAX_Error_Handler(A);window.location="editpost.php?"+SESSIONURL+"do=editpost&postid="+this.postid};vB_AJAX_QuickEditor.prototype.handle_save_error=function(A){vBulletin_AJAX_Error_Handler(A);this.show_advanced=false;this.full_edit()};vB_AJAX_QuickEditor.prototype.display_editor=function(ajax){if(ajax.responseXML){if(YAHOO.util.Dom.get("progress_"+vB_QuickEditor.postid)){YAHOO.util.Dom.get("editimg_"+this.postid).setAttribute("src",vB_QuickEditor.editimgsrc)}document.body.style.cursor="auto";if(fetch_tag_count(ajax.responseXML,"disabled")){window.location="editpost.php?"+SESSIONURL+"do=editpost&postid="+this.postid}else{if(fetch_tag_count(ajax.responseXML,"error")){}else{if(ajax.responseXML.getElementsByTagName("contenttypeid").length>0){vBulletin.attachinfo={contenttypeid:ajax.responseXML.getElementsByTagName("contenttypeid")[0].firstChild.nodeValue,userid:ajax.responseXML.getElementsByTagName("userid")[0].firstChild.nodeValue,attachlimit:ajax.responseXML.getElementsByTagName("attachlimit")[0].firstChild.nodeValue,max_file_size:ajax.responseXML.getElementsByTagName("max_file_size")[0].firstChild.nodeValue,auth_type:ajax.responseXML.getElementsByTagName("auth_type")[0].firstChild.nodeValue,asset_enable:ajax.responseXML.getElementsByTagName("asset_enable")[0].firstChild.nodeValue,posthash:ajax.responseXML.getElementsByTagName("posthash")[0].firstChild.nodeValue,poststarttime:ajax.responseXML.getElementsByTagName("poststarttime")[0].firstChild.nodeValue};var values=ajax.responseXML.getElementsByTagName("values");if(values.length>0&&values[0].childNodes.length){vBulletin.attachinfo.values="";for(var i=0;i<values[0].childNodes.length;i++){if(values[0].childNodes[i].nodeName!="#text"&&typeof(values[0].childNodes[i].childNodes[0])!="undefined"){if(vBulletin.attachinfo.values.length>0){vBulletin.attachinfo.values="&"}vBulletin.attachinfo.values+="values["+values[0].childNodes[i].nodeName+"]="+values[0].childNodes[i].childNodes[0].nodeValue}}}var phrases=ajax.responseXML.getElementsByTagName("phrases");if(phrases.length>0&&phrases[0].childNodes.length){for(var i=0;i<phrases[0].childNodes.length;i++){if(phrases[0].childNodes[i].nodeName!="#text"&&typeof(phrases[0].childNodes[i].childNodes[0])!="undefined"){vbphrase[phrases[0].childNodes[i].nodeName]=phrases[0].childNodes[i].childNodes[0].nodeValue}}}}var editor=fetch_tags(ajax.responseXML,"editor")[0];if(typeof editor=="undefined"){window.location="editpost.php?"+SESSIONURL+"do=editpost&postid="+this.postid;return false}var reason=editor.getAttribute("reason");this.messageobj.innerHTML=editor.firstChild.nodeValue;if(fetch_object(this.editorid+"_edit_reason")){this.unchanged_reason=PHP.unhtmlspecialchars(reason);fetch_object(this.editorid+"_edit_reason").value=this.unchanged_reason;fetch_object(this.editorid+"_edit_reason").onkeypress=vB_AJAX_QuickEditor_Events.prototype.reason_key_trap}if(typeof JSON=="object"&&typeof JSON.parse=="function"){var ckeconfig=JSON.parse(fetch_tags(ajax.responseXML,"ckeconfig")[0].firstChild.nodeValue)}else{var ckeconfig=eval("("+fetch_tags(ajax.responseXML,"ckeconfig")[0].firstChild.nodeValue+")")}if(vBulletin.attachinfo){CKEDITOR.config.content=vBulletin.attachinfo}vB_Editor[this.editorid]=new vB_Text_Editor(this.editorid,ckeconfig);if(vB_Editor[this.editorid].editorready){this.display_editor_final("editorready",null,this)}else{vB_Editor[this.editorid].vBevents.editorready.subscribe(this.display_editor_final,this)}}}handle_dep(this.editorid)}};vB_AJAX_QuickEditor.prototype.display_editor_final=function(C,A,D){if(YAHOO.util.Dom.get(D.editorid)&&YAHOO.util.Dom.get(D.editorid).scrollIntoView){}vB_Editor[D.editorid].check_focus();D.unchanged=vB_Editor[D.editorid].get_editor_contents();YAHOO.util.Event.on(D.editorid+"_save","click",D.save,D,true);YAHOO.util.Event.on(D.editorid+"_abort","click",D.abort,D,true);YAHOO.util.Event.on(D.editorid+"_adv","click",D.full_edit,D,true);YAHOO.util.Event.on("quick_edit_errors_hide","click",D.hide_errors,D,true);YAHOO.util.Event.on("quick_edit_errors_cancel","click",D.abort,D,true);var B=YAHOO.util.Dom.get(D.editorid+"_delete");if(B&&!this.return_node){YAHOO.util.Event.on(D.editorid+"_delete","click",D.show_delete,D,true)}init_popupmenus(YAHOO.util.Dom.get(D.editorid))};vB_AJAX_QuickEditor.prototype.restore=function(C,A){this.hide_errors(true);if(this.editorid&&vB_Editor[this.editorid]){vB_Editor[this.editorid].destroy()}if(A=="tableobj"){var B=YAHOO.util.Dom.get("post_"+this.postid);B.parentNode.replaceChild(string_to_node(C),B);if(typeof(pd)=="object"&&typeof(pd[this.postid])!="undefined"){pd[this.postid]=C}}else{this.messageobj.innerHTML=C}this.editstate=false};vB_AJAX_QuickEditor.prototype.abort=function(A){if(A){YAHOO.util.Event.stopEvent(A)}if(YAHOO.util.Dom.get("progress_"+vB_QuickEditor.postid)&&vB_QuickEditor.editimgsrc){YAHOO.util.Dom.get("editimg_"+vB_QuickEditor.postid).setAttribute("src",vB_QuickEditor.editimgsrc)}document.body.style.cursor="auto";vB_QuickEditor.restore(vB_QuickEditor.originalhtml,"messageobj");PostBit_Init(fetch_object("post_"+vB_QuickEditor.postid),vB_QuickEditor.postid)};vB_AJAX_QuickEditor.prototype.full_edit=function(B){if(vB_Editor[vB_QuickEditor.editorid]){var A=new vB_Hidden_Form((PATHS.forum?PATHS.forum+"/":"")+"editpost.php?do=updatepost&postid="+vB_QuickEditor.postid);A.add_variable("do","updatepost");A.add_variable("s",fetch_sessionhash());A.add_variable("securitytoken",SECURITYTOKEN);if(vB_QuickEditor.show_advanced){A.add_variable("advanced",1)}else{A.add_variable("quickeditnoajax",1)}A.add_variable("postid",vB_QuickEditor.postid);A.add_variable("message",vB_Editor[vB_QuickEditor.editorid].get_editor_contents());A.add_variable("reason",fetch_object(vB_QuickEditor.editorid+"_edit_reason").value);A.add_variable("posthash",vBulletin.attachinfo.posthash);A.add_variable("poststarttime",vBulletin.attachinfo.poststarttime);A.add_variable("wysiwyg",vB_Editor[vB_QuickEditor.editorid].is_wysiwyg_mode());if(vB_QuickEditor.return_node){A.add_variable("return_node",vB_QuickEditor.return_node)}vB_Editor[vB_QuickEditor.editorid].uninitialize();A.submit_form()}};vB_AJAX_QuickEditor.prototype.save=function(B){var D=vB_Editor[vB_QuickEditor.editorid].get_editor_contents();var A=vB_Editor[vB_QuickEditor.editorid];if(D==vB_QuickEditor.unchanged&&A==vB_QuickEditor.unchanged_reason){vB_QuickEditor.abort(B)}else{vB_Editor[this.editorid].uninitialize();fetch_object(vB_QuickEditor.editorid+"_posting_msg").style.display="";document.body.style.cursor="wait";var C=YAHOO.util.Dom.get("postcount"+vB_QuickEditor.postid);this.ajax_req=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("editpost.php?do=updatepost&postid="+this.postid),{success:vB_QuickEditor.update,failure:vB_QuickEditor.handle_save_error,timeout:vB_Default_Timeout,scope:vB_QuickEditor},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=updatepost&ajax=1&postid="+vB_QuickEditor.postid+"&posthash="+vBulletin.attachinfo.posthash+"&poststarttime="+vBulletin.attachinfo.poststarttime+"&message="+PHP.urlencode(D)+"&reason="+PHP.urlencode(fetch_object(vB_QuickEditor.editorid+"_edit_reason").value)+"&relpath="+PHP.urlencode(RELPATH)+(C!=null?"&postcount="+PHP.urlencode(C.name):"")+(vB_QuickEditor.return_node!=null?"&return_node="+vB_QuickEditor.return_node:"")+((typeof(pd)=="object"&&typeof(pd[vB_QuickEditor.postid])!="undefined")?"&displaymode=1":""));vB_QuickEditor.pending=true}};vB_AJAX_QuickEditor.prototype.show_delete=function(){vB_QuickEditor.deletedialog=fetch_object("quickedit_delete");if(vB_QuickEditor.deletedialog&&vB_QuickEditor.deletedialog.style.display!=""){vB_QuickEditor.deletedialog.style.display="";vB_QuickEditor.deletebutton=fetch_object("quickedit_dodelete");vB_QuickEditor.deletebutton.onclick=vB_QuickEditor.delete_post;if(fetch_object("del_reason")){fetch_object("del_reason").onkeypress=vB_AJAX_QuickEditor_Events.prototype.delete_items_key_trap}}};vB_AJAX_QuickEditor.prototype.delete_post=function(){var A=fetch_object("rb_del_leave");if(A&&A.checked){vB_QuickEditor.abort();return}var B=new vB_Hidden_Form("editpost.php");B.add_variable("do","deletepost");B.add_variable("s",fetch_sessionhash());B.add_variable("securitytoken",SECURITYTOKEN);B.add_variable("postid",vB_QuickEditor.postid);B.add_variables_from_object(vB_QuickEditor.deletedialog);if(vB_QuickEditor.return_node){B.add_variable("return_node",vB_QuickEditor.return_node)}vB_Editor[vB_QuickEditor.editorid].uninitialize();B.submit_form()};vB_AJAX_QuickEditor.prototype.update=function(C){if(C.responseXML){vB_QuickEditor.pending=false;document.body.style.cursor="auto";fetch_object(vB_QuickEditor.editorid+"_posting_msg").style.display="none";if(fetch_tag_count(C.responseXML,"error")){var D=fetch_tags(C.responseXML,"error");var A="<ol>";for(var B=0;B<D.length;B++){A+="<li>"+D[B].firstChild.nodeValue+"</li>"}A+="</ol>";vB_QuickEditor.show_errors(A)}else{vB_QuickEditor.restore(C.responseXML.getElementsByTagName("postbit")[0].firstChild.nodeValue,"tableobj");PostBit_Init(fetch_object("post_"+vB_QuickEditor.postid),vB_QuickEditor.postid)}}return false};vB_AJAX_QuickEditor.prototype.show_errors=function(A){set_unselectable("quick_edit_errors_hide");YAHOO.util.Dom.get("ajax_post_errors_message").innerHTML=A;var B=YAHOO.util.Dom.get("ajax_post_errors");var C=(is_saf?"body":"documentElement");B.style.left=(is_ie?document.documentElement.clientWidth:self.innerWidth)/2-200+document[C].scrollLeft+"px";B.style.top=(is_ie?document.documentElement.clientHeight:self.innerHeight)/2-150+document[C].scrollTop+"px";YAHOO.util.Dom.removeClass(B,"hidden")};vB_AJAX_QuickEditor.prototype.hide_errors=function(A){this.errors=false;YAHOO.util.Dom.addClass("ajax_post_errors","hidden");if(A!=true){vB_Editor[this.editorid].check_focus()}};function vB_AJAX_QuickEditor_Events(){}vB_AJAX_QuickEditor_Events.prototype.editbutton_click=function(A){return vB_QuickEditor.edit(this.name)};vB_AJAX_QuickEditor_Events.prototype.delete_button_handler=function(A){if(this.id=="rb_del_leave"&&this.checked){vB_QuickEditor.deletebutton.disabled=true}else{vB_QuickEditor.deletebutton.disabled=false}};vB_AJAX_QuickEditor_Events.prototype.reason_key_trap=function(A){A=A?A:window.event;switch(A.keyCode){case 9:fetch_object(vB_QuickEditor.editorid+"_save").focus();return false;break;case 13:vB_QuickEditor.save();return false;break;default:return true}};vB_AJAX_QuickEditor_Events.prototype.delete_items_key_trap=function(A){A=A?A:window.event;if(A.keyCode==13){if(vB_QuickEditor.deletebutton.disabled==false){vB_QuickEditor.delete_post()}return false}return true};var vB_QuickEditor=new vB_AJAX_QuickEditor();vBulletin.events.systemInit.subscribe(function(){if(AJAX_Compatible){vB_QuickEditor_Watcher=new vB_QuickEditor_Watcher()}});function vB_QuickEditor_Watcher(){this.editorcounter=0;this.controls=new Object();this.open_objectid=null;this.vars=new Object();this.init()}vB_QuickEditor_Watcher.prototype.init=function(){if(vBulletin.elements.vB_QuickEdit){for(var C=0;C<vBulletin.elements.vB_QuickEdit.length;C++){var G=vBulletin.elements.vB_QuickEdit[C].splice(0,1)[0];var B=vBulletin.elements.vB_QuickEdit[C].splice(0,1)[0];var A=vBulletin.elements.vB_QuickEdit[C];var D=window["vB_QuickEditor_"+B+"_Vars"];if(typeof(D)=="undefined"){console.log("Function Not Found: vB_QuickEditor_"+B+"_Vars");continue}var F=null;if(typeof(this.vars[B])=="undefined"){var E=new D(A);this.vars[B]=E;F=this.vars[B]}else{if(this.vars[B].peritemsettings==true){F=new D(A)}else{F=this.vars[B]}}var H=YAHOO.util.Dom.get(this.vars[B].containertype+"edit_"+G);if(H){this.controls[B+"_"+G]=this.fetch_editor_class(G,B,F,B+"_"+G);this.controls[B+"_"+G].init()}else{console.log(F.containertype+"_edit_"+G+" not found")}}vBulletin.elements.vB_QuickEdit=null}};vB_QuickEditor_Watcher.prototype.fetch_editor_class=function(F,A,E,C){var B=window["vB_QuickEditor_"+A];if(typeof(B)=="undefined"){var D=new vB_QuickEditor_Generic(F,this,E,C)}else{var D=new B(F,this,E,C)}return D};vB_QuickEditor_Watcher.prototype.close_all=function(){if(this.open_objectid){this.controls[this.open_objectid].abort()}};vB_QuickEditor_Watcher.prototype.hide_errors=function(){if(this.open_objectid){this.controls[this.open_objectid].hide_errors()}};function vB_QuickEditor_Generic(D,A,C,B){this.objectid=D;this.watcher=A;this.vars=C;this.controlid=B;this.originalhtml=null;this.ajax_req=null;this.show_advanced=true;this.messageobj=null;this.node=null;this.progress_indicator=null;this.editbutton=null}vB_QuickEditor_Generic.prototype.init=function(){this.originalhtml=null;this.ajax_req=null;this.show_advanced=true;this.messageobj=YAHOO.util.Dom.get(this.vars.messagetype+this.objectid);this.node=YAHOO.util.Dom.get(this.vars.containertype+this.objectid);this.progress_indicator=YAHOO.util.Dom.get(this.vars.containertype+"progress_"+this.objectid);var A=YAHOO.util.Dom.get(this.vars.containertype+"edit_"+this.objectid);this.editbutton=A;YAHOO.util.Event.on(this.editbutton,"click",this.edit,this,true)};vB_QuickEditor_Generic.prototype.remove_clickhandler=function(){YAHOO.util.Event.purgeElement(this.editbutton)};vB_QuickEditor_Generic.prototype.ready=function(){if(this.watcher.open_objectid!=null||YAHOO.util.Connect.isCallInProgress(this.ajax_req)){return false}else{return true}};vB_QuickEditor_Generic.prototype.edit=function(B){if(this.watcher.open_objectid!=null){var A=this.watcher.open_objectid.toString();var C=A.indexOf("_")}else{var A="";var C=0}if(typeof(vb_disable_ajax)!="undefined"&&vb_disable_ajax>0){return true}if(B){YAHOO.util.Event.stopEvent(B)}if(YAHOO.util.Connect.isCallInProgress(this.ajax_req)){return false}else{if(!this.ready()){if(this.objectid==A.substr(C+1,A.length)){this.full_edit();return false}this.watcher.close_all()}}this.watcher.open_objectid=this.controlid;this.watcher.editorcounter++;this.editorid="vB_Editor_QE_"+this.vars.containertype+this.watcher.editorcounter;this.originalhtml=this.messageobj.innerHTML;this.unchanged=null;this.unchanged_reason=null;this.fetch_editor();return false};vB_QuickEditor_Generic.prototype.fetch_editor=function(){if(this.progress_indicator){YAHOO.util.Dom.removeClass(this.progress_indicator,"hidden")}document.body.style.cursor="wait";YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url(this.vars.ajaxtarget+"?do="+this.vars.ajaxaction+"&"+this.vars.objecttype+"="+this.objectid),{success:this.display_editor,failure:this.error_opening_editor,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do="+this.vars.ajaxaction+"&"+this.vars.objecttype+"="+this.objectid+"&editorid="+PHP.urlencode(this.editorid))};vB_QuickEditor_Generic.prototype.handle_save_error=function(A){vBulletin_AJAX_Error_Handler(A);window.location=this.fail_url()};vB_QuickEditor_Generic.prototype.fail_url=function(){return this.vars.target+"?"+SESSIONURL+"do="+this.getaction+"&"+this.vars.objecttype+"="+this.objectid};vB_QuickEditor_Generic.prototype.handle_save_error=function(A){vBulletin_AJAX_Error_Handler(A);this.show_advanced=false;this.full_edit()};vB_QuickEditor_Generic.prototype.display_editor=function(ajax){if(ajax.responseXML){if(this.progress_indicator){YAHOO.util.Dom.addClass(this.progress_indicator,"hidden")}document.body.style.cursor="auto";if(fetch_tag_count(ajax.responseXML,"disabled")){window.location=this.fail_url()}else{if(fetch_tag_count(ajax.responseXML,"error")){}else{var editor=fetch_tags(ajax.responseXML,"editor")[0];var reason=editor.getAttribute("reason");this.messageobj.innerHTML=editor.firstChild.nodeValue;var editreason=YAHOO.util.Dom.get(this.editorid+"_edit_reason");if(editreason){this.unchanged_reason=PHP.unhtmlspecialchars(reason);editreason.value=this.unchanged_reason;editreason.onkeypress=vB_QuickEditor_Delete_Events.prototype.reason_key_trap}if(typeof JSON=="object"&&typeof JSON.parse=="function"){var ckeconfig=JSON.parse(fetch_tags(ajax.responseXML,"ckeconfig")[0].firstChild.nodeValue)}else{var ckeconfig=eval("("+fetch_tags(ajax.responseXML,"ckeconfig")[0].firstChild.nodeValue+")")}vB_Editor[this.editorid]=new vB_Text_Editor(this.editorid,ckeconfig);if(vB_Editor[this.editorid].editorready){this.display_editor_final("editorready",null,this)}else{vB_Editor[this.editorid].vBevents.editorready.subscribe(this.display_editor_final,this)}}}}};vB_QuickEditor_Generic.prototype.display_editor_final=function(C,A,D){vB_Editor[this.editorid].check_focus();D.unchanged=vB_Editor[D.editorid].get_editor_contents();YAHOO.util.Event.on(D.editorid+"_save","click",D.save,D,true);YAHOO.util.Event.on(D.editorid+"_abort","click",D.abort,D,true);YAHOO.util.Event.on(D.editorid+"_adv","click",D.full_edit,D,true);YAHOO.util.Event.on("quick_edit_errors_hide","click",D.hide_errors,D,true);YAHOO.util.Event.on("quick_edit_errors_cancel","click",D.abort,D,true);var B=YAHOO.util.Dom.get(D.editorid+"_delete");if(B){YAHOO.util.Event.on(D.editorid+"_delete","click",D.show_delete,D,true)}init_popupmenus(YAHOO.util.Dom.get(D.editorid))};vB_QuickEditor_Generic.prototype.restore=function(B,A){this.hide_errors(true);if(this.editorid&&vB_Editor[this.editorid]){vB_Editor[this.editorid].destroy()}if(A=="node"){var C=string_to_node(B);this.node.parentNode.replaceChild(C,this.node)}else{this.messageobj.innerHTML=B}this.watcher.open_objectid=null};vB_QuickEditor_Generic.prototype.abort=function(A){if(A){YAHOO.util.Event.stopEvent(A)}if(this.progress_indicator){YAHOO.util.Dom.addClass(this.progress_indicator,"hidden")}document.body.style.cursor="auto";this.restore(this.originalhtml,"messageobj")};vB_QuickEditor_Generic.prototype.full_edit=function(B){if(vB_Editor[this.editorid]){if(B){YAHOO.util.Event.stopEvent(B)}vB_Editor[this.editorid].uninitialize();var A=new vB_Hidden_Form(this.vars.target+"?do="+this.vars.postaction+"&"+this.vars.objecttype+"="+this.objectid);A.add_variable("do",this.vars.postaction);A.add_variable("s",fetch_sessionhash());A.add_variable("securitytoken",SECURITYTOKEN);if(this.show_advanced){A.add_variable("advanced",1)}A.add_variable(this.vars.objecttype,this.objectid);A.add_variable("message",vB_Editor[this.editorid].get_editor_contents());A.add_variable("reason",YAHOO.util.Dom.get(this.editorid+"_edit_reason").value);A.add_variable("wysiwyg",vB_Editor[this.editorid].is_wysiwyg_mode());A.submit_form()}};vB_QuickEditor_Generic.prototype.save=function(B){YAHOO.util.Event.stopEvent(B);vB_Editor[this.editorid].uninitialize();var C=vB_Editor[this.editorid].get_editor_contents();var A=YAHOO.util.Dom.get(this.editorid+"_edit_reason");if(C==this.unchanged&&A&&A.value==this.unchanged_reason){this.abort(B)}else{YAHOO.util.Dom.get(this.editorid+"_posting_msg").style.display="";document.body.style.cursor="wait";this.ajax_req=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url(this.vars.target+"?do="+this.vars.postaction+"&"+this.vars.objecttype+"="+this.objectid),{success:this.update,faulure:this.handle_save_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do="+this.vars.postaction+"&ajax=1&"+this.vars.objecttype+"="+this.objectid+"&message="+PHP.urlencode(C)+"&reason="+PHP.urlencode(YAHOO.util.Dom.get(this.editorid+"_edit_reason").value)+"&relpath="+PHP.urlencode(RELPATH)+"&parseurl=1");this.pending=true}};vB_QuickEditor_Generic.prototype.show_delete=function(){this.deletedialog=YAHOO.util.Dom.get("quickedit_delete");if(this.deleteddialog&&this.deleteddialog.style.display!=""){this.deletedialog.style.display="";this.deletebutton=YAHOO.util.Dom.get("quickedit_dodelete");YAHOO.util.Event.on(this.deletebutton,"click",this.delete_post,this,true);var B=YAHOO.util.Dom.get("del_reason");if(B){B.onkeypress=vB_QuickEditor_Delete_Events.prototype.delete_items_key_trap}if(!is_opera&&!is_saf){this.deletebutton.disabled=true;this.deleteoptions=new Array();this.deleteoptions.leave=YAHOO.util.Dom.get("rb_del_leave");this.deleteoptions.soft=YAHOO.util.Dom.get("rb_del_soft");this.deleteoptions.hard=YAHOO.util.Dom.get("rb_del_hard");for(var A in this.deleteoptions){if(YAHOO.lang.hasOwnProperty(this.deleteoptions,A)&&this.deleteoptions[A]){this.deleteoptions[A].onclick=this.deleteoptions[A].onchange=vB_QuickEditor_Delete_Events.prototype.delete_button_handler;this.deleteoptions[A].onkeypress=vB_QuickEditor_Delete_Events.prototype.delete_items_key_trap}}}}};vB_QuickEditor_Generic.prototype.delete_post=function(){var A=YAHOO.util.Dom.get("rb_del_leave");if(A&&A.checked){this.abort();return}var B=new vB_Hidden_Forum(this.vars.target);B.add_variable("do",this.vars.deleteaction);B.add_variable("s",fetch_sessionhash());B.add_variable("securitytoken",SECURITYTOKEN);B.add_variabl(this.vars.objecttype,this.objectid);B.add_variables_from_object(this.deletedialog);vB_Editor[this.editorid].uninitialize();B.submit_form()};vB_QuickEditor_Generic.prototype.update=function(D){if(D.responseXML){this.pending=false;document.body.style.cursor="auto";YAHOO.util.Dom.get(this.editorid+"_posting_msg").style.display="none";if(fetch_tag_count(D.responseXML,"error")){var E=fetch_tags(D.responseXML,"error");var A="<ol>";for(var B=0;B<E.length;B++){A+="<li>"+E[B].firstChild.nodeValue+"</li>"}A+="</ol>";this.show_errors(A)}else{var C=D.responseXML.getElementsByTagName("message");this.restore(C[0].firstChild.nodeValue,"node");this.remove_clickhandler();this.init()}}return false};vB_QuickEditor_Generic.prototype.show_errors=function(A){YAHOO.util.Dom.get("ajax_post_errors_message").innerHTML=A;var B=YAHOO.util.Dom.get("ajax_post_errors");B.style.width="400px";B.style.zIndex=500;var C=(is_saf?"body":"documentElement");B.style.left=(is_ie?document.documentElement.clientWidth:self.innerWidth)/2-200+document[C].scrollLeft+"px";B.style.top=(is_ie?document.documentElement.clientHeight:self.innerHeight)/2-150+document[C].scrollTop+"px";YAHOO.util.Dom.removeClass(B,"hidden")};vB_QuickEditor_Generic.prototype.hide_errors=function(A){this.errors=false;var B=YAHOO.util.Dom.get("ajax_post_errors");if(B){YAHOO.util.Dom.addClass(B,"hidden")}if(A!=true){vB_Editor[this.editorid].check_focus()}};function vB_QuickEditor_Delete_Events(){}vB_QuickEditor_Delete_Events.prototype.delete_button_handler=function(C){var B=vB_QuickEditor_Watcher.open_objectid;var A=vB_QuickEditor_Watcher.controls[B];if(this.id=="rb_del_leave"&&this.checked){A.deletebutton.disabled=true}else{A.deletebutton.disabled=false}};vB_QuickEditor_Delete_Events.prototype.reason_key_trap=function(C){var B=vB_QuickEditor_Watcher.open_objectid;var A=vB_QuickEditor_Watcher.controls[B];C=C?C:window.event;switch(C.keyCode){case 9:YAHOO.util.Dom.get(A.editorid+"_save").focus();return false;break;case 13:A.save();return false;break;default:return true}};vB_QuickEditor_Delete_Events.prototype.delete_items_key_trap=function(C){var B=vB_QuickEditor_Watcher.open_objectid;var A=vB_QuickEditor_Watcher.controls[B];C=C?C:window.event;if(C.keyCode==13){if(open_obj.deletebutton.disabled==false){open_obj.delete_post()}return false}return true};function vB_QuickEditor_VisitorMessage_Vars(A){this.init()}vB_QuickEditor_VisitorMessage_Vars.prototype.init=function(){this.target="visitormessage.php";this.postaction="message";this.objecttype="vmid";this.getaction="message";this.ajaxtarget="visitormessage.php";this.ajaxaction="quickedit";this.deleteaction="deletevm";this.messagetype="vmessage_message_";this.containertype="vmessage_";this.responsecontainer="commentbits"};var qr_repost=false;var qr_errors_shown=false;var qr_active=false;var qr_ajax=null;var qr_postid=null;var qr_withquote=null;var qr_imgsrc="";var clickedelm=false;var qr_require_click=false;var QR_EditorID="vB_Editor_QR";if(typeof(vB_XHTML_Ready)!="undefined"){vB_XHTML_Ready.subscribe(qr_init)}function qr_init(){if(typeof(vBulletin.attachinfo)=="undefined"){vBulletin.attachinfo={posthash:"",poststarttime:""}}if(fetch_object("quick_reply")){qr_disable_controls();qr_init_buttons(fetch_object("posts"))}}function qr_init_buttons(D){var C=fetch_tags(D,"a");for(var B=0;B<C.length;B++){if(C[B].id&&(C[B].id.substr(0,3)=="qr_"||C[B].id.substr(0,5)=="qrwq_")){YAHOO.util.Event.on(C[B],"click",qr_newreply_activate,this)}}var A=["newreplylink_top","newreplylink_bottom"];YAHOO.util.Event.on(A,"click",qr_replytothread_activate,this);YAHOO.util.Event.on(A,"dblclick",function(E){window.location=this.href},this)}function qr_disable_controls(){if(require_click){fetch_object("qr_postid").value=0;vB_Editor[QR_EditorID].disable_editor(vbphrase.click_quick_reply_icon);var A=fetch_object("cb_signature");if(A!=null){A.disabled=true}active=false;qr_active=false}else{qr_active=true}YAHOO.util.Dom.setStyle("qr_cancelbutton","display","")}function qr_activate(D,B){var C=fetch_object("collapseobj_quickreply");if(C&&C.style.display=="none"){toggle_collapse("quickreply")}fetch_object("qr_postid").value=D;if(fetch_object("qr_specifiedpost")){fetch_object("qr_specifiedpost").value=1}var A=fetch_object("cb_signature");if(A){A.disabled=false;A.checked=true}B=(B?B:"");vB_Editor[QR_EditorID].enable_editor(B,true);if(!is_ie&&vB_Editor[QR_EditorID].is_wysiwyg_mode()==1){fetch_object("qr_scroll").scrollIntoView(false)}vB_Editor[QR_EditorID].check_focus();qr_active=true;return false}function qr_replytothread_activate(C){var A=this.href;if(qr_postid==last_post_id&&qr_withquote==true){window.location=A;return true}YAHOO.util.Event.preventDefault(C);qr_postid=last_post_id;qr_withquote=true;YAHOO.util.Dom.setStyle("progress_newreplylink_top","display","");YAHOO.util.Dom.setStyle("progress_newreplylink_bottom","display","");document.body.style.cursor="wait";var B=YAHOO.util.Dom.get("qr_threadid").value;qr_ajax=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php"),{success:qr_replytothread_handle_activate,failure:function(D){window.location=A},timeout:vB_Default_Timeout},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=getquotes&t="+B)}function qr_replytothread_handle_activate(B){qr_reset();qr_disable_controls();qr_hide_errors();var C="";if(B){var A=B.responseXML.getElementsByTagName("quotes");if(A.length&&A[0].firstChild){var C=A[0].firstChild.nodeValue}}if(YAHOO.util.Dom.hasClass("qr_defaultcontainer","qr_require_click")){vB_Editor[QR_EditorID].initialize();YAHOO.util.Dom.removeClass("qr_defaultcontainer","qr_require_click");if(CKEDITOR.env.ie){vB_Editor[QR_EditorID].editor.fire("resize")}qr_require_click=true}qr_activate(last_post_id,C);fetch_object("progress_newreplylink_top").style.display="none";fetch_object("progress_newreplylink_bottom").style.display="none";document.body.style.cursor="auto"}function qr_newreply_activate(C){var B=false;if(this.id.substr(0,3)=="qr_"){var D=this.id.substr(3)}else{if(this.id.substr(0,5)=="qrwq_"){var D=this.id.substr(5);B=true}else{return true}}if(qr_postid==D&&qr_withquote==B){return true}YAHOO.util.Event.stopEvent(C);qr_postid=D;qr_withquote=B;if(YAHOO.util.Dom.get("progress_"+D)){var A=(B?"quoteimg_":"replyimg_")+D;qr_imgsrc=YAHOO.util.Dom.get(A).getAttribute("src");YAHOO.util.Dom.get(A).setAttribute("src",YAHOO.util.Dom.get("progress_"+D).getAttribute("src"))}document.body.style.cursor="wait";if(B){qr_ajax=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php?do=getquotes&p="+D),{success:qr_handle_activate,failure:vBulletin_AJAX_Error_Handler,timeout:vB_Default_Timeout},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=getquotes&p="+D)}else{qr_handle_activate(false)}}function qr_handle_activate(G){var B=qr_postid;qr_reset();qr_disable_controls();qr_hide_errors();qr_postid=B;var F="";if(G){var E=G.responseXML.getElementsByTagName("quotes");if(E){var F=E[0].firstChild.nodeValue}}var I=document.createElement("li");I.id="qr_"+B;var H=YAHOO.util.Dom.get("post_"+B);var D=H.parentNode.insertBefore(I,H.nextSibling);var C=fetch_object("quick_reply");D.appendChild(C);if(CKEDITOR.env.ie){vB_Editor[QR_EditorID].editor.fire("resize")}qr_activate(B,F);if(YAHOO.util.Dom.get("progress_"+B)){var A=(qr_withquote?"quoteimg_":"replyimg_")+B;YAHOO.util.Dom.get(A).setAttribute("src",qr_imgsrc)}document.body.style.cursor="auto"}function qr_reset(){var B=YAHOO.util.Dom.get("quick_reply");var A=YAHOO.util.Dom.get("qr_defaultcontainer");if(B.parentNode!=A){var C=B.parentNode;A.appendChild(B);C.parentNode.removeChild(C)}qr_postid=null;YAHOO.util.Dom.get("qr_postid").value=last_post_id;if(!require_click){vB_Editor[QR_EditorID].enable_editor("")}else{vB_Editor[QR_EditorID].uninitialize()}if(qr_require_click&&!YAHOO.util.Dom.hasClass("qr_defaultcontainer","qr_require_click")){YAHOO.util.Dom.addClass("qr_defaultcontainer","qr_require_click")}return false}function qr_prepare_submit(E,A){if(qr_repost==true){return true}if(!allow_ajax_qr||!AJAX_Compatible){E.posthash.value=vBulletin.attachinfo.posthash;E.poststarttime.value=vBulletin.attachinfo.poststarttime;return qr_check_data(E,A)}else{if(qr_check_data(E,A)){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax>0){return true}if(is_ie&&userAgent.indexOf("msie 5.")!=-1){if(PHP.urlencode(E.message.value).indexOf("%u")!=-1){return true}}var H=fetch_object("cb_openclose");var B=fetch_object("cb_stickunstick");if((H&&H.checked)||(B&&B.checked)){return true}if(YAHOO.util.Connect.isCallInProgress(qr_ajax)){return false}E.posthash.value=vBulletin.attachinfo.posthash;E.poststarttime.value=vBulletin.attachinfo.poststarttime;if(clickedelm==E.preview.value){return true}else{var F="ajax=1";if(typeof ajax_last_post!="undefined"){F+="&ajax_lastpost="+PHP.urlencode(ajax_last_post)}for(var D=0;D<E.elements.length;D++){var G=E.elements[D];if(G.name&&!G.disabled){switch(G.type){case"text":case"textarea":case"hidden":F+="&"+G.name+"="+PHP.urlencode(G.value);break;case"checkbox":case"radio":F+=G.checked?"&"+G.name+"="+PHP.urlencode(G.value):"";break;case"select-one":F+="&"+G.name+"="+PHP.urlencode(G.options[G.selectedIndex].value);break;case"select-multiple":for(var C=0;C<G.options.length;C++){F+=(G.options[C].selected?"&"+G.name+"="+PHP.urlencode(G.options[C].value):"")}break}}}YAHOO.util.Dom.removeClass("qr_posting_msg","hidden");document.body.style.cursor="wait";qr_ajax_post(E.action,F);return false}}else{return false}}}function qr_resubmit(){qr_repost=true;var B=document.createElement("input");B.type="hidden";B.name="ajaxqrfailed";B.value="1";var A=YAHOO.util.Dom.get("quick_reply");if(!A){A=YAHOO.util.Dom.get("qrform")}A.appendChild(B);A.submit()}function qr_check_data(B,A){switch(fetch_object("qr_postid").value){case"0":fetch_object("qr_postid").value=last_post_id;case"who cares":if(typeof B.quickreply!="undefined"){B.quickreply.checked=false}break}if(clickedelm==B.preview.value){A=0}return vB_Editor[QR_EditorID].prepare_submit(0,A)}function qr_ajax_post(B,A){if(YAHOO.util.Connect.isCallInProgress(qr_ajax)){YAHOO.util.Connect.abort(qr_ajax)}qr_repost=false;qr_ajax=YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url(B),{success:qr_do_ajax_post,failure:qr_handle_error,timeout:vB_Default_Timeout},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&"+A)}function qr_handle_error(A){vBulletin_AJAX_Error_Handler(A);vB_Editor[QR_EditorID].initialize();YAHOO.util.Dom.addClass("qr_posting_msg","hidden");document.body.style.cursor="default";qr_resubmit()}function qr_do_ajax_post(F){if(F.responseXML){vB_Editor[QR_EditorID].initialize();document.body.style.cursor="auto";YAHOO.util.Dom.addClass("qr_posting_msg","hidden");var D;if(fetch_tag_count(F.responseXML,"postbit")){qr_reset();vB_Editor[QR_EditorID].hide_autosave_button();ajax_last_post=F.responseXML.getElementsByTagName("time")[0].firstChild.nodeValue;qr_disable_controls();qr_hide_errors();var C=F.responseXML.getElementsByTagName("postbit");for(D=0;D<C.length;D++){var I=document.createElement("div");I.innerHTML=C[D].firstChild.nodeValue;var A=I.getElementsByTagName("li")[0];var H=YAHOO.util.Dom.get("posts");if(A){var B=H.appendChild(A);PostBit_Init(B,C[D].getAttribute("postid"));A.scrollIntoView(false)}}if(typeof mq_unhighlight_all=="function"){mq_unhighlight_all()}if(fetch_object("qr_submit")){fetch_object("qr_submit").blur()}}else{var G=F.responseXML.getElementsByTagName("error");if(G.length){var E="<ol>";for(D=0;D<G.length;D++){E+="<li>"+G[D].firstChild.nodeValue+"</li>"}E+="</ol>";qr_show_errors(E);return false}qr_resubmit()}}else{qr_resubmit()}}function qr_show_errors(A){qr_errors_shown=true;fetch_object("qr_error_td").innerHTML=A;YAHOO.util.Dom.removeClass("qr_error_tbody","hidden");vB_Editor[QR_EditorID].check_focus();return false}function qr_hide_errors(){if(qr_errors_shown){qr_errors_shown=true;YAHOO.util.Dom.addClass("qr_error_tbody","hidden");return false}}var vB_QuickReply=true;function vB_Attachment(A,E){var F=YAHOO.util.Dom.getElementsByClassName("uploadlaunchlink");if(F.length){for(var C=0;C<F.length;C++){YAHOO.util.Event.on(F[C],"click",this.attachmanage,this,true)}}var D=YAHOO.util.Dom.getElementsByClassName("uploadlaunchbutton");if(D.length){for(var C=0;C<D.length;C++){YAHOO.util.Event.on(D[C],"click",this.attachmanage,this,true);YAHOO.util.Dom.setStyle(D[C],"display","")}}var B=YAHOO.util.Dom.getElementsByClassName("uploadlaunchfallback");if(B.length){for(var C=0;C<B.length;C++){YAHOO.util.Dom.setStyle(B[C],"display","none")}}this.assetobj=null;this.content=E;if(typeof CKEDITOR!="undefined"){CKEDITOR.config.content=E}this.attachments=new Array();this.menu_contents=new Array();this.windows=new Array();this.editor=null;this.listobjid=A;if(this.content.editorid==""){for(editorid in vB_Editor){if(YAHOO.lang.hasOwnProperty(vB_Editor,editorid)){this.editor=vB_Editor[editorid];break}}}else{this.editor=(this.content.editorid?vB_Editor[this.content.editorid]:null)}}vB_Attachment.prototype.attachmanage=function(A){if(typeof(A)!="undefined"){YAHOO.util.Event.stopEvent(A)}if(AJAX_Compatible&&this.content.enhanced==1){this.open_window(fetch_ajax_url("newattachment.php?"+SESSIONURL+"do=assetmanager&"+PHP.unhtmlspecialchars(this.content.values)+"&contenttypeid="+this.content.contenttypeid+"&poststarttime="+this.content.poststarttime+"&posthash="+this.content.posthash+"&insertinline="+this.content.insertinline,725,520,this.content.contenttypeid+"_"+this.content.posthash))}else{this.open_window(fetch_ajax_url("newattachment.php?"+SESSIONURL+PHP.unhtmlspecialchars(this.content.values)+"&contenttypeid="+this.content.contenttypeid+"&poststarttime="+this.content.poststarttime+"&posthash="+this.content.posthash,480,480,this.content.posthash))}};vB_Attachment.prototype.add=function(E,D,B,C,A){this.attachments[E]=new Array();this.attachments[E]={html:D,filename:B,filesize:C,imgpath:A};this.update_list()};vB_Attachment.prototype.remove=function(A){if(typeof this.attachments[A]!="undefined"){this.attachments[A]=null;this.update_list()}};vB_Attachment.prototype.has_attachments=function(){for(var A in this.attachments){if(YAHOO.lang.hasOwnProperty(this.attachments,A)&&this.attachments[A]!=null){return true}}return false};vB_Attachment.prototype.reset=function(){this.attachments=new Array();this.update_list()};vB_Attachment.prototype.build_list=function(B,G){var C=YAHOO.util.Dom.get(B);if(C){var A=C.getElementsByTagName("li");if(A[G]!=null){while(A[G].nextSibling){C.removeChild(A[G].nextSibling)}}var E=0;for(var F in this.attachments){if(!YAHOO.lang.hasOwnProperty(this.attachments,F)){continue}var D=string_to_node(this.attachments[F]["html"]);D.attachmentid=F;C.appendChild(D);E++}if(E){YAHOO.util.Dom.removeClass("uploaddisplay","hidden");YAHOO.util.Dom.removeClass(C,"hidden")}else{YAHOO.util.Dom.addClass("uploaddisplay","hidden");YAHOO.util.Dom.addClass(C,"hidden")}}};vB_Attachment.prototype.update_list=function(){this.build_list(this.listobjid,1);this.build_list(this.listobjid+"_list2",0)};vB_Attachment.prototype.open_window=function(B,C,A,D){if(typeof(this.windows[D])!="undefined"&&this.windows[D].closed==false){this.windows[D].focus()}else{this.windows[D]=openWindow(B,C,A,"Attach"+D)}return this.windows[D]};vB_XHTML_Ready.subscribe(function(){mq_init("posts")});function mq_init(D){var C=mq_get_selected();var A=YAHOO.util.Dom.getElementsByClassName("multiquote","a",D);for(var B=0;B<A.length;B++){A[B].onclick=function(F){return mq_click(this.id.substr(3))};var E=A[B].id.substr(3);set_mq_highlight(E,(PHP.in_array(E,C)>-1))}}function mq_get_selected(){var A=fetch_cookie("vbulletin_multiquote");if(A!=null&&A!=""){A=A.split(",")}else{A=new Array()}return A}function mq_click(F){var D=mq_get_selected();var B=new Array();var E=false;for(C in D){if(!YAHOO.lang.hasOwnProperty(D,C)){continue}if(D[C]==F){E=true}else{if(D[C]){B.push(D[C])}}}set_mq_highlight(F,!E);if(!E){B.push(F);if(typeof mqlimit!="undefined"&&mqlimit>0){for(var C=0;C<(B.length-mqlimit);C++){var A=B.shift();set_mq_highlight(A,false)}}}set_cookie("vbulletin_multiquote",B.join(","));return false}function set_mq_highlight(C,B){var A=(is_ie6?"gif":"png");if(B){YAHOO.util.Dom.addClass("mq_"+C,"highlight");YAHOO.util.Dom.get("mq_image_"+C).src=IMGDIR_BUTTON+"/multiquote-selected_40b."+A}else{YAHOO.util.Dom.removeClass("mq_"+C,"highlight");YAHOO.util.Dom.get("mq_image_"+C).src=IMGDIR_BUTTON+"/multiquote_40b."+A}}function mq_unhighlight_all(){var B=fetch_tags(fetch_object("posts"),"img");for(var A=0;A<B.length;A++){if(B[A].id&&B[A].id.substr(0,9)=="mq_image_"){set_mq_highlight(B[A].id.substr(9),false)}}};var vB_ReadMarker={forum_statusicon_prefix:"forum_statusicon_",thread_statusicon_prefix:"thread_statusicon_",thread_gotonew_prefix:"thread_gotonew_",thread_title_prefix:"thread_title_"};function vB_AJAX_ReadMarker(A){this.forumid=A}vB_AJAX_ReadMarker.prototype.mark_read=function(){YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("ajax.php?do=markread&f="+this.forumid),{success:this.handle_ajax_request,failure:this.handle_ajax_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=markread&forumid="+this.forumid)};vB_AJAX_ReadMarker.prototype.handle_ajax_error=function(A){vBulletin_AJAX_Error_Handler(A)};vB_AJAX_ReadMarker.prototype.handle_ajax_request=function(C){var B=fetch_tags(C.responseXML,"forum");for(var A=0;A<B.length;A++){var D=B[A].firstChild.nodeValue;this.update_forum_status(D);var E=fetch_object("threadbits_forum_"+D);if(E){this.handle_threadbits(E)}}};vB_AJAX_ReadMarker.prototype.update_forum_status=function(B){var A=fetch_object(vB_ReadMarker.forum_statusicon_prefix+B);if(A){A.style.cursor="default";A.title=A.otitle;A.src=this.fetch_old_src(A.src,"forum")}};vB_AJAX_ReadMarker.prototype.handle_threadbits=function(C){var A=fetch_tags(C,"a");for(var B=0;B<A.length;B++){if(A[B].id&&A[B].id.substr(0,vB_ReadMarker.thread_gotonew_prefix.length)==vB_ReadMarker.thread_gotonew_prefix){this.update_thread_status(A[B].id.substr(vB_ReadMarker.thread_gotonew_prefix.length))}}};vB_AJAX_ReadMarker.prototype.update_thread_status=function(D){var C=fetch_object(vB_ReadMarker.thread_statusicon_prefix+D);if(C){C.src=this.fetch_old_src(C.src,"thread")}var B=fetch_object(vB_ReadMarker.thread_gotonew_prefix+D);if(B){B.parentNode.removeChild(B)}var A=fetch_object(vB_ReadMarker.thread_title_prefix+D);if(A){A.style.fontWeight="normal"}};vB_AJAX_ReadMarker.prototype.fetch_old_src=function(B,A){var C=B.replace(/_(new)([-_])(.+)$/i,(A=="thread"?"$2$3":"_old$2$3"));return C};function mark_forum_read(A){if(AJAX_Compatible){vB_ReadMarker[A]=new vB_AJAX_ReadMarker(A);vB_ReadMarker[A].mark_read()}else{window.location="forumdisplay.php?"+SESSIONURL+"do=markread&forumid="+A+"&markreadhash="+SECURITYTOKEN}return false}function init_forum_readmarker_icon(A){mark_forum_read(this.id.substr(vB_ReadMarker.forum_statusicon_prefix.length))}function init_forum_readmarker_system(){var A=fetch_tags(document,"img");for(var B=0;B<A.length;B++){if(A[B].id&&A[B].id.substr(0,vB_ReadMarker.forum_statusicon_prefix.length)==vB_ReadMarker.forum_statusicon_prefix){if(A[B].src.search(/\/([^\/]+)(new)(_lock)?-48\.([a-z0-9]+)$/i)!=-1){img_alt_2_title(A[B]);A[B].otitle=A[B].title;A[B].title=vbphrase.doubleclick_forum_markread;A[B].style.cursor=pointer_cursor;A[B].ondblclick=init_forum_readmarker_icon}}}}function vB_AJAX_ForumReadMarker(){}vB_AJAX_ForumReadMarker.prototype.mark_threads_read=function(){var D=YAHOO.util.Dom.getElementsByClassName("new","li","threadlist");for(var A=0;A<D.length;A++){YAHOO.util.Dom.removeClass(D[A],"new");var C=YAHOO.util.Dom.getElementsByClassName("threadtitle_unread","a",D[A]);C=C[0];if(C){YAHOO.util.Dom.removeClass(C,"threadtitle_unread");var E=YAHOO.util.Dom.getElementsByClassName("gotonewpost","img",D[A]);if(E&&E[0]){var B=YAHOO.util.Dom.getAncestorByTagName(E[0],"a");if(B){YAHOO.util.Dom.setStyle(B,"display","none")}}}}if(window.YAHOO&&YAHOO.vBulletin&&YAHOO.vBulletin.vBPopupMenu){YAHOO.vBulletin.vBPopupMenu.close_all()}};function mark_forum_and_threads_read(A){if(AJAX_Compatible){vB_ReadMarker[A]=new vB_AJAX_ReadMarker(A);vB_ReadMarker[A].mark_read();vB_ReadMarker[A]=new vB_AJAX_ForumReadMarker();vB_ReadMarker[A].mark_threads_read()}else{window.location="forumdisplay.php?"+SESSIONURL+"do=markread&forumid="+A+"&markreadhash="+SECURITYTOKEN}return false};vB_XHTML_Ready.subscribe(init_sidebar);function init_sidebar(){new vBSidebar()}function vBSidebar(){this.init()}vBSidebar.prototype.init=function(){this.sidebar_button=YAHOO.util.Dom.get("sidebar_button");this.sidebar_container=YAHOO.util.Dom.get("sidebar_container");this.sidebar=YAHOO.util.Dom.get("sidebar");this.content_container=YAHOO.util.Dom.get("content_container");this.content=YAHOO.util.Dom.get("content");YAHOO.util.Event.on(this.sidebar_button,"click",this.toggle_collapse,this,true);var A=fetch_cookie("vbulletin_sidebar_collapse");if(A=="1"){this.collapse(false)}};vBSidebar.prototype.toggle_collapse=function(A){YAHOO.util.Event.stopEvent(A);if(YAHOO.util.Dom.getStyle(this.sidebar,"display")=="none"){this.expand()}else{this.collapse(true)}return false};vBSidebar.prototype.collapse=function(A){var B=this.sidebar_button;if(A){var C=new YAHOO.util.Anim(this.sidebar,{opacity:{from:1,to:0}},0.3);C.onComplete.subscribe(function(G,D,E){YAHOO.util.Dom.setStyle(E.sidebar,"display","none");YAHOO.util.Dom.setStyle(E.sidebar_container,"width","0");var F;if(sidebar_align=="right"){F=new YAHOO.util.Anim(E.content_container,{marginRight:{to:0}},0.3);F.animate();F=new YAHOO.util.Anim(E.content,{marginRight:{to:0}},0.3);F.onComplete.subscribe(function(){YAHOO.util.Dom.setAttribute(B,"src",IMGDIR_MISC+"/tab-expanded.png")});F.animate()}else{F=new YAHOO.util.Anim(E.content_container,{marginLeft:{to:0}},0.3);F.animate();F=new YAHOO.util.Anim(E.content,{marginLeft:{to:0}},0.3);F.onComplete.subscribe(function(){YAHOO.util.Dom.setAttribute(B,"src",IMGDIR_MISC+"/tab-expanded-left.png")});F.animate()}},this);C.animate()}else{YAHOO.util.Dom.setStyle(this.sidebar,"display","none");YAHOO.util.Dom.setStyle(this.sidebar_container,"width","0");if(sidebar_align=="right"){YAHOO.util.Dom.setAttribute(B,"src",IMGDIR_MISC+"/tab-expanded.png");YAHOO.util.Dom.setStyle(this.content_container,"marginRight","0");YAHOO.util.Dom.setStyle(this.content,"marginRight","0")}else{YAHOO.util.Dom.setAttribute(B,"src",IMGDIR_MISC+"/tab-expanded-left.png");YAHOO.util.Dom.setStyle(this.content_container,"marginLeft","0");YAHOO.util.Dom.setStyle(this.content,"marginLeft","0")}}this.save_collapsed("1")};vBSidebar.prototype.expand=function(){var B;var A=this.sidebar_button;if(sidebar_align=="right"){B=new YAHOO.util.Anim(this.content_container,{marginRight:{to:(0-content_container_margin)}},0.3);B.animate();B=new YAHOO.util.Anim(this.content,{marginRight:{to:content_container_margin}},0.3);B.onComplete.subscribe(function(F,C,D){YAHOO.util.Dom.setStyle(D.sidebar,"display","");YAHOO.util.Dom.setStyle(D.sidebar_container,"width",sidebar_width+"px");var E=new YAHOO.util.Anim(D.sidebar,{opacity:{from:0,to:1}},0.3);E.onComplete.subscribe(function(){YAHOO.util.Dom.setAttribute(A,"src",IMGDIR_MISC+"/tab-collapsed.png")});E.animate()},this);B.animate()}else{B=new YAHOO.util.Anim(this.content_container,{marginLeft:{to:(0-content_container_margin)}},0.3);B.animate();B=new YAHOO.util.Anim(this.content,{marginLeft:{to:content_container_margin}},0.3);B.onComplete.subscribe(function(F,C,D){YAHOO.util.Dom.setStyle(D.sidebar,"display","");YAHOO.util.Dom.setStyle(D.sidebar_container,"width",sidebar_width+"px");var E=new YAHOO.util.Anim(D.sidebar,{opacity:{from:0,to:1}},0.3);E.onComplete.subscribe(function(){YAHOO.util.Dom.setAttribute(A,"src",IMGDIR_MISC+"/tab-collapsed-left.png")});E.animate()},this);B.animate()}this.save_collapsed("0")};vBSidebar.prototype.save_collapsed=function(A){expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));set_cookie("vbulletin_sidebar_collapse",A,expires)};function vB_Inline_Mod(A,E,F,C,B,D){this.varname=A;this.type=E.toLowerCase();this.formobj=fetch_object(F);this.go_phrase=C;if(typeof B!="undefined"){this.cookieprefix=B}else{this.cookieprefix="vbulletin_inline"}if(this.type=="thread"){this.list="tlist_"}else{if(this.type=="post"){this.list="plist_"}else{this.list=this.type+"list_"}}if(typeof D!="undefined"){this.highlighttype=D}else{this.highlighttype=this.type}this.cookie_ids=null;this.cookie_array=new Array();this.init=function(H){var G;for(G=0;G<H.length;G++){if(this.is_in_list(H[G])){H[G].inlineModID=this.varname;H[G].onclick=inlinemod_checkbox_onclick}}this.cookie_array=new Array();if(this.fetch_ids()){for(G in this.cookie_ids){if(YAHOO.lang.hasOwnProperty(this.cookie_ids,G)&&this.cookie_ids[G]!=""){if(checkbox=fetch_object(this.list+this.cookie_ids[G])){checkbox.checked=true;if(typeof(this["highlight_"+this.highlighttype])!="undefined"){this["highlight_"+this.highlighttype](checkbox)}}this.cookie_array[this.cookie_array.length]=this.cookie_ids[G]}}}this.set_output_counters()};this.fetch_ids=function(){this.cookie_ids=fetch_cookie(this.cookieprefix+this.type);if(this.cookie_ids!=null&&this.cookie_ids!=""){this.cookie_ids=this.cookie_ids.split("-");if(this.cookie_ids.length>0){return true}}return false};this.toggle=function(G){if(typeof(this["highlight_"+this.highlighttype])!="undefined"){this["highlight_"+this.highlighttype](G)}this.save(G.id.substring(this.list.length),G.checked)};this.save=function(I,H){this.cookie_array=new Array();if(this.fetch_ids()){for(var G in this.cookie_ids){if(YAHOO.lang.hasOwnProperty(this.cookie_ids,G)&&this.cookie_ids[G]!=I&&this.cookie_ids[G]!=""){this.cookie_array[this.cookie_array.length]=this.cookie_ids[G]}}}if(H){this.cookie_array[this.cookie_array.length]=I}this.set_output_counters();this.set_cookie();return true};this.set_cookie=function(){expires=new Date();expires.setTime(expires.getTime()+3600000);set_cookie(this.cookieprefix+this.type,this.cookie_array.join("-"),expires)};this.check_all=function(J,G,H){if(typeof J=="undefined"){J=this.formobj.allbox.checked}this.cookie_array=new Array();if(this.fetch_ids()){for(I in this.cookie_ids){if(YAHOO.lang.hasOwnProperty(this.cookie_ids,I)&&!fetch_object(this.list+this.cookie_ids[I])){this.cookie_array[this.cookie_array.length]=this.cookie_ids[I]}}}counter=0;for(var I=0;I<this.formobj.elements.length;I++){if(this.is_in_list(this.formobj.elements[I])){var K=this.formobj.elements[I];if(typeof G!="undefined"){if(isNaN(G)){if(K.value==G){K.checked=J}}else{if(K.value&G){K.checked=J}else{K.checked=!J}}}else{if(J=="invert"){K.checked=!K.checked}else{K.checked=J}}if(typeof(this["highlight_"+this.highlighttype])!="undefined"){this["highlight_"+this.highlighttype](K)}if(K.checked){this.cookie_array[this.cookie_array.length]=K.id.substring(this.list.length)}}}this.set_output_counters();this.set_cookie();return true};this.is_in_list=function(G){return(G.type=="checkbox"&&G.id.indexOf(this.list)==0&&(G.disabled==false||G.disabled=="undefined"))};this.set_output_counters=function(){var G;if(this.type=="thread"||this.type=="post"){G="inlinego"}else{G=this.type+"_inlinego"}var H;if(H=fetch_object(G)){H.value=construct_phrase(this.go_phrase,this.cookie_array.length)}};this.toggle_highlight=function(G,I,H){if(G.tagName){if(H||YAHOO.util.Dom.hasClass(G,"alt1")||YAHOO.util.Dom.hasClass(G,"alt2")||YAHOO.util.Dom.hasClass(G,"inlinemod")){if(I.checked){YAHOO.util.Dom.addClass(G,"inlinemod")}else{YAHOO.util.Dom.removeClass(G,"inlinemod")}}}};this.highlight_thread=function(J){var G=J;while(G.tagName!="TR"){if(G.parentNode.tagName=="HTML"){break}else{G=G.parentNode}}if(G.tagName=="TR"){var I=G.childNodes;for(var H=0;H<I.length;H++){this.toggle_highlight(I[H],J)}}};this.highlight_post=function(I){if(table=fetch_object(this.type+I.id.substr(this.list.length))){var H=fetch_tags(table,"td");for(var G=0;G<H.length;G++){this.toggle_highlight(H[G],I)}}};this.highlight_message=function(K){var J=0;var H=K.id.substr(this.list.length);var G=YAHOO.util.Dom.get(this.type+H);if(G){this.toggle_highlight(G,K,true);var I=YAHOO.util.Dom.getElementsByClassName("alt2","div",G);if(I.length){this.toggle_highlight(I[0],K)}}};this.highlight_div=function(I){var J;if(J=fetch_object(this.type+I.id.substr(this.list.length))){console.log("Highlight %s",this.type+I.id.substr(this.list.length));this.toggle_highlight(J,I);var H=fetch_tags(J,"div");for(var G=0;G<H.length;G++){this.toggle_highlight(H[G],I)}}};this.init(this.formobj.elements)}function inlinemod_checkbox_onclick(e){var inlineModObj=eval(this.inlineModID);inlineModObj.toggle(this)}function im_init(C,B){var A=fetch_tags(C,"input");if(typeof B=="object"&&typeof B.init=="function"){B.init(A)}else{inlineMod.init(A)}};vBulletin.events.systemInit.subscribe(function(){if(AJAX_Compatible){vB_AJAX_TagEditor_Factory=new vB_AJAX_TagEditor_Factory()}});function vB_AJAX_TagEditor_Factory(){this.controls=new Array();this.init()}vB_AJAX_TagEditor_Factory.prototype.init=function(){if(vBulletin.elements.vB_AJAX_TagEditor){for(var C=0;C<vBulletin.elements.vB_AJAX_TagEditor.length;C++){var B=vBulletin.elements.vB_AJAX_TagEditor[C][0];var F=vBulletin.elements.vB_AJAX_TagEditor[C][1];var E=vBulletin.elements.vB_AJAX_TagEditor[C][2];var A=vBulletin.elements.vB_AJAX_TagEditor[C][3];if(typeof(E)=="undefined"){E=""}if(typeof(A)=="undefined"){A={}}var D=YAHOO.util.Dom.get(E+"tag_"+F);if(D){this.controls[F]=new vB_AJAX_TagEditor(B,F,E,A,this)}}vBulletin.elements.vB_AJAX_TagEditor=null}};vB_AJAX_TagEditor_Factory.prototype.redirect=function(A,B){window.location="threadtag.php?do=manage"+SESSIONURL+"contenttype="+A+"&contentid="+B};function vB_AJAX_TagEditor(C,E,D,B,A){this.divobj=null;this.vbmenu=null;this.do_ajax_submit=true;this.divname=D+"tagmenu_"+E+"_menu";this.vbmenuname=D+"tagmenu_"+E;this.tag_container=D+"tagcontainer_"+E;this.tag_list=D+"taglist_"+E;this.edit_submit="tageditsubmit_"+E;this.edit_cancel="tageditcancel_"+E;this.edit_input="tageditinput_"+E;this.submit_progress="tageditprogress_"+E;this.extraparams=B;this.init(C,E,D,A)}vB_AJAX_TagEditor.prototype.init=function(C,E,D,B){if(C){this.contenttype=C}if(E){this.objectid=E}if(B){this.factory=B}var A=YAHOO.util.Dom.get(D+"tag_"+E);YAHOO.util.Event.on(A,"click",this.load,this,true)};vB_AJAX_TagEditor.prototype.load=function(A){if(A){YAHOO.util.Event.stopEvent(A)}if(vBmenu.activemenu==this.vbmenuname){this.vbmenu.hide()}else{YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("threadtag.php?popup=1&contenttype="+this.contenttype+"&contentid="+this.objectid),{success:this.display,failure:this.handle_ajax_error,timeout:vB_Default_Timeout,scope:this},SESSIONURL+"securitytoken="+SECURITYTOKEN+"&do=manage&contenttype="+this.contenttype+"&contentid="+this.objectid)}return false};vB_AJAX_TagEditor.prototype.handle_ajax_error=function(A){vBulletin_AJAX_Error_Handler(A)};vB_AJAX_TagEditor.prototype.handle_ajax_submit_error=function(A){vBulletin_AJAX_Error_Handler(A);this.do_ajax_submit=false};vB_AJAX_TagEditor.prototype.display=function(B){if(B.responseXML){var A=B.responseXML.getElementsByTagName("error");if(A.length){alert(A[0].firstChild.nodeValue)}else{if(!this.divobj){this.divobj=document.createElement("div");this.divobj.id=this.divname;this.divobj.style.display="none";this.divobj.style.width="300px";this.divobj.style.background="#ffffff";this.divobj.style.border="1px solid #000000";this.divobj.style.padding="10px";document.body.appendChild(this.divobj);this.vbmenu=vbmenu_register(this.vbmenuname,true);YAHOO.util.Dom.get(this.vbmenu.controlkey).onmouseover="";YAHOO.util.Dom.get(this.vbmenu.controlkey).onclick=""}this.divobj.innerHTML=B.responseXML.getElementsByTagName("tagpopup")[0].firstChild.nodeValue;YAHOO.util.Event.on(this.edit_submit,"click",this.submit_tag_edit,this,true);YAHOO.util.Event.on(this.edit_cancel,"click",this.cancel_tag_edit,this,true);YAHOO.util.Event.on(this.divobj,"keydown",this.tagmenu_keypress);if(YAHOO.util.Dom.get("tag_add_wrapper_menu")&&YAHOO.util.Dom.get(this.edit_input)){tag_add_comp=new vB_AJAX_TagSuggest("tag_add_comp",this.edit_input,"tag_add_wrapper");tag_add_comp.allow_multiple=true;var C=B.responseXML.getElementsByTagName("delimiters")[0];if(C&&C.firstChild){tag_add_comp.set_delimiters(C.firstChild.nodeValue)}}this.vbmenu.show(YAHOO.util.Dom.get(this.vbmenuname));YAHOO.util.Dom.get(this.edit_input).focus();YAHOO.util.Dom.get(this.edit_input).focus()}}};vB_AJAX_TagEditor.prototype.tagmenu_keypress=function(A){switch(A.keyCode){case 13:vB_AJAX_TagEditor_Factory.controls[this.id.split(/_/)[1]].submit_tag_edit();if(A){YAHOO.util.Event.stopEvent(A)}return false;default:return true}};vB_AJAX_TagEditor.prototype.submit_tag_edit=function(B){if(this.do_ajax_submit){if(B){YAHOO.util.Event.stopEvent(B)}var A=new vB_Hidden_Form("threadtag.php");A.add_variables_from_object(YAHOO.util.Dom.get(this.divobj));for(key in this.extraparams){A.add_variable(key,this.extraparams[key])}YAHOO.util.Connect.asyncRequest("POST",fetch_ajax_url("threadtag.php?contenttype="+this.contenttype+"&contentid="+this.objectid),{success:this.handle_ajax_submit,failure:this.handle_ajax_submit_error,timeout:vB_Default_Timeout,scope:this},A.build_query_string());if(YAHOO.util.Dom.get(this.submit_progress)){YAHOO.util.Dom.get(this.submit_progress).style.display=""}}};vB_AJAX_TagEditor.prototype.cancel_tag_edit=function(A){this.vbmenu.hide()};vB_AJAX_TagEditor.prototype.handle_ajax_submit=function(C){if(C.responseXML){var A=C.responseXML.getElementsByTagName("error");if(A.length){alert(A[0].firstChild.nodeValue)}else{var D=C.responseXML.getElementsByTagName("taghtml");if(D.length&&D[0].firstChild&&D[0].firstChild.nodeValue!==""){YAHOO.util.Dom.get(this.tag_list).innerHTML=D[0].firstChild.nodeValue;YAHOO.util.Dom.get(this.tag_container).style.display=""}else{YAHOO.util.Dom.get(this.tag_container).style.display="none"}var B=C.responseXML.getElementsByTagName("warning");if(B.length&&B[0].firstChild){alert(B[0].firstChild.nodeValue)}this.vbmenu.hide()}}else{this.vbmenu.hide()}if(YAHOO.util.Dom.get(this.submit_progress)){YAHOO.util.Dom.get(this.submit_progress).style.display="none"}};
