if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var a=arguments,b=null,d,e,c;for(d=0;d<a.length;d=d+1){c=(""+a[d]).split(".");b=YAHOO;for(e=(c[0]=="YAHOO")?1:0;e<c.length;e=e+1){b[c[e]]=b[c[e]]||{};b=b[c[e]]}}return b};YAHOO.log=function(b,a,c){var d=YAHOO.widget.Logger;if(d&&d.log){return d.log(b,a,c)}else{return false}};YAHOO.register=function(d,i,a){var e=YAHOO.env.modules,c,f,g,h,b;if(!e[d]){e[d]={versions:[],builds:[]}}c=e[d];f=a.version;g=a.build;h=YAHOO.env.listeners;c.name=d;c.version=f;c.build=g;c.versions.push(f);c.builds.push(g);c.mainClass=i;for(b=0;b<h.length;b=b+1){h[b](c)}if(i){i.VERSION=f;i.BUILD=g}else{YAHOO.log("mainClass is undefined for module "+d,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null};YAHOO.env.ua=function(){var b={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},c=navigator.userAgent,a;if((/KHTML/).test(c)){b.webkit=1}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){b.webkit=parseFloat(a[1]);if(/ Mobile\//.test(c)){b.mobile="Apple"}else{a=c.match(/NokiaN[^\/]*/);if(a){b.mobile=a[0]}}a=c.match(/AdobeAIR\/([^\s]*)/);if(a){b.air=a[0]}}if(!b.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){b.opera=parseFloat(a[1]);a=c.match(/Opera Mini[^;]*/);if(a){b.mobile=a[0]}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){b.ie=parseFloat(a[1])}else{a=c.match(/Gecko\/([^\s]*)/);if(a){b.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){b.gecko=parseFloat(a[1])}}}}}a=c.match(/Caja\/([^\s]*)/);if(a&&a[1]){b.caja=parseFloat(a[1])}return b}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var d=YAHOO_config.listener,a=YAHOO.env.listeners,b=true,c;if(d){for(c=0;c<a.length;c=c+1){if(a[c]==d){b=false;break}}if(b){a.push(d)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,b="[object Array]",e="[object Function]",a=Object.prototype,c=["toString","valueOf"],d={isArray:function(g){return a.toString.apply(g)===b},isBoolean:function(g){return typeof g==="boolean"},isFunction:function(g){return a.toString.apply(g)===e},isNull:function(g){return g===null},isNumber:function(g){return typeof g==="number"&&isFinite(g)},isObject:function(g){return(g&&(typeof g==="object"||f.isFunction(g)))||false},isString:function(g){return typeof g==="string"},isUndefined:function(g){return typeof g==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(i,j){var k,g,h;for(k=0;k<c.length;k=k+1){g=c[k];h=j[g];if(f.isFunction(h)&&h!=a[g]){i[g]=h}}}:function(){},extend:function(h,g,i){if(!g||!h){throw new Error("extend failed, please check that all dependencies are included.")}var j=function(){},k;j.prototype=g.prototype;h.prototype=new j();h.prototype.constructor=h;h.superclass=g.prototype;if(g.prototype.constructor==a.constructor){g.prototype.constructor=g}if(i){for(k in i){if(f.hasOwnProperty(i,k)){h.prototype[k]=i[k]}}f._IEEnumFix(h.prototype,i)}},augmentObject:function(h,i){if(!i||!h){throw new Error("Absorb failed, verify dependencies.")}var l=arguments,j,g,k=l[2];if(k&&k!==true){for(j=2;j<l.length;j=j+1){h[l[j]]=i[l[j]]}}else{for(g in i){if(k||!(g in h)){h[g]=i[g]}}f._IEEnumFix(h,i)}},augmentProto:function(g,h){if(!h||!g){throw new Error("Augment failed, verify dependencies.")}var j=[g.prototype,h.prototype],i;for(i=2;i<arguments.length;i=i+1){j.push(arguments[i])}f.augmentObject.apply(this,j)},dump:function(p,j){var m,k,h=[],g="{...}",o="f(){...}",i=", ",l=" => ";if(!f.isObject(p)){return p+""}else{if(p instanceof Date||("nodeType" in p&&"tagName" in p)){return p}else{if(f.isFunction(p)){return o}}}j=(f.isNumber(j))?j:3;if(f.isArray(p)){h.push("[");for(m=0,k=p.length;m<k;m=m+1){if(f.isObject(p[m])){h.push((j>0)?f.dump(p[m],j-1):g)}else{h.push(p[m])}h.push(i)}if(h.length>1){h.pop()}h.push("]")}else{h.push("{");for(m in p){if(f.hasOwnProperty(p,m)){h.push(m+l);if(f.isObject(p[m])){h.push((j>0)?f.dump(p[m],j-1):g)}else{h.push(p[m])}h.push(i)}}if(h.length>1){h.pop()}h.push("}")}return h.join("")},substitute:function(g,v,o){var r,s,t,k,j,h,l=[],u,q="dump",m=" ",w="{",i="}",p;for(;;){r=g.lastIndexOf(w);if(r<0){break}s=g.indexOf(i,r);if(r+1>=s){break}u=g.substring(r+1,s);k=u;h=null;t=k.indexOf(m);if(t>-1){h=k.substring(t+1);k=k.substring(0,t)}j=v[k];if(o){j=o(k,j,h)}if(f.isObject(j)){if(f.isArray(j)){j=f.dump(j,parseInt(h,10))}else{h=h||"";p=h.indexOf(q);if(p>-1){h=h.substring(4)}if(j.toString===a.toString||p>-1){j=f.dump(j,parseInt(h,10))}else{j=j.toString()}}}else{if(!f.isString(j)&&!f.isNumber(j)){j="~-"+l.length+"-~";l[l.length]=u}}g=g.substring(0,r)+j+g.substring(s+1)}for(r=l.length-1;r>=0;r=r-1){g=g.replace(new RegExp("~-"+r+"-~"),"{"+l[r]+"}","g")}return g},trim:function(h){try{return h.replace(/^\s+|\s+$/g,"")}catch(g){return h}},merge:function(){var g={},i=arguments,j=i.length,h;for(h=0;h<j;h=h+1){f.augmentObject(g,i[h],true)}return g},later:function(h,o,g,l,k){h=h||0;o=o||{};var m=g,i=l,j,p;if(f.isString(g)){m=o[g]}if(!m){throw new TypeError("method undefined")}if(!f.isArray(i)){i=[l]}j=function(){m.apply(o,i)};p=(k)?setInterval(j,h):setTimeout(j,h);return{interval:k,cancel:function(){if(this.interval){clearInterval(p)}else{clearTimeout(p)}}}},isValue:function(g){return(f.isObject(g)||f.isString(g)||f.isNumber(g)||f.isBoolean(g))}};f.hasOwnProperty=(a.hasOwnProperty)?function(h,g){return h&&h.hasOwnProperty(g)}:function(h,g){return !f.isUndefined(h[g])&&h.constructor.prototype[g]!==h[g]};d.augmentObject(f,d,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1796"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var ao=YAHOO.util,ai=YAHOO.lang,aE=YAHOO.env.ua,at=YAHOO.lang.trim,aN={},aJ={},ag=/^t(?:able|d|h)$/i,y=/color$/i,aj=window.document,z=aj.documentElement,aM="ownerDocument",aD="defaultView",av="documentElement",ax="compatMode",aP="offsetLeft",ae="offsetTop",aw="offsetParent",x="parentNode",aF="nodeType",aq="tagName",af="scrollLeft",aI="scrollTop",ad="getBoundingClientRect",au="getComputedStyle",aQ="currentStyle",ah="CSS1Compat",aO="BackCompat",aK="class",an="className",ak="",ar=" ",ay="(?:^|\\s)",aG="(?= |$)",Y="g",aB="position",aL="fixed",G="relative",aH="left",aC="top",az="medium",aA="borderLeftWidth",ac="borderTopWidth",ap=aE.opera,al=aE.webkit,am=aE.gecko,aa=aE.ie;ao.Dom={CUSTOM_ATTRIBUTES:(!z.hasAttribute)?{"for":"htmlFor","class":an}:{htmlFor:"for",className:aK},get:function(f){var e,d,c,a,b;if(f){if(f[aF]||f.item){return f}if(typeof f==="string"){e=f;f=aj.getElementById(f);if(f&&f.id===e){return f}else{if(f&&aj.all){f=null;d=aj.all[e];for(a=0,b=d.length;a<b;++a){if(d[a].id===e){return d[a]}}}}return f}if(f.DOM_EVENTS){f=f.get("element")}if("length" in f){c=[];for(a=0,b=f.length;a<b;++a){c[c.length]=ao.Dom.get(f[a])}return c}return f}return null},getComputedStyle:function(a,b){if(window[au]){return a[aM][aD][au](a,null)[b]}else{if(a[aQ]){return ao.Dom.IE_ComputedStyle.get(a,b)}}},getStyle:function(a,b){return ao.Dom.batch(a,ao.Dom._getStyle,b)},_getStyle:function(){if(window[au]){return function(b,d){d=(d==="float")?d="cssFloat":ao.Dom._toCamel(d);var a=b.style[d],c;if(!a){c=b[aM][aD][au](b,null);if(c){a=c[d]}}return a}}else{if(z[aQ]){return function(b,e){var a;switch(e){case"opacity":a=100;try{a=b.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{a=b.filters("alpha").opacity}catch(c){}}return a/100;case"float":e="styleFloat";default:e=ao.Dom._toCamel(e);a=b[aQ]?b[aQ][e]:null;return(b.style[e]||a)}}}}}(),setStyle:function(b,c,a){ao.Dom.batch(b,ao.Dom._setStyle,{prop:c,val:a})},_setStyle:function(){if(aa){return function(c,b){var a=ao.Dom._toCamel(b.prop),d=b.val;if(c){switch(a){case"opacity":if(ai.isString(c.style.filter)){c.style.filter="alpha(opacity="+d*100+")";if(!c[aQ]||!c[aQ].hasLayout){c.style.zoom=1}}break;case"float":a="styleFloat";default:c.style[a]=d}}else{}}}else{return function(c,b){var a=ao.Dom._toCamel(b.prop),d=b.val;if(c){if(a=="float"){a="cssFloat"}c.style[a]=d}else{}}}}(),getXY:function(a){return ao.Dom.batch(a,ao.Dom._getXY)},_canPosition:function(a){return(ao.Dom._getStyle(a,"display")!=="none"&&ao.Dom._inDoc(a))},_getXY:function(){if(aj[av][ad]){return function(j){var i,a,h,c,d,e,f,l,k,g=Math.floor,b=false;if(ao.Dom._canPosition(j)){h=j[ad]();c=j[aM];i=ao.Dom.getDocumentScrollLeft(c);a=ao.Dom.getDocumentScrollTop(c);b=[g(h[aH]),g(h[aC])];if(aa&&aE.ie<8){d=2;e=2;f=c[ax];l=ab(c[av],aA);k=ab(c[av],ac);if(aE.ie===6){if(f!==aO){d=0;e=0}}if((f==aO)){if(l!==az){d=parseInt(l,10)}if(k!==az){e=parseInt(k,10)}}b[0]-=d;b[1]-=e}if((a||i)){b[0]+=i;b[1]+=a}b[0]=g(b[0]);b[1]=g(b[1])}else{}return b}}else{return function(h){var a,g,f,d,c,e=false,b=h;if(ao.Dom._canPosition(h)){e=[h[aP],h[ae]];a=ao.Dom.getDocumentScrollLeft(h[aM]);g=ao.Dom.getDocumentScrollTop(h[aM]);c=((am||aE.webkit>519)?true:false);while((b=b[aw])){e[0]+=b[aP];e[1]+=b[ae];if(c){e=ao.Dom._calcBorders(b,e)}}if(ao.Dom._getStyle(h,aB)!==aL){b=h;while((b=b[x])&&b[aq]){f=b[aI];d=b[af];if(am&&(ao.Dom._getStyle(b,"overflow")!=="visible")){e=ao.Dom._calcBorders(b,e)}if(f||d){e[0]-=d;e[1]-=f}}e[0]+=a;e[1]+=g}else{if(ap){e[0]-=a;e[1]-=g}else{if(al||am){e[0]+=a;e[1]+=g}}}e[0]=Math.floor(e[0]);e[1]=Math.floor(e[1])}else{}return e}}}(),getX:function(a){var b=function(c){return ao.Dom.getXY(c)[0]};return ao.Dom.batch(a,b,ao.Dom,true)},getY:function(a){var b=function(c){return ao.Dom.getXY(c)[1]};return ao.Dom.batch(a,b,ao.Dom,true)},setXY:function(b,a,c){ao.Dom.batch(b,ao.Dom._setXY,{pos:a,noRetry:c})},_setXY:function(i,f){var e=ao.Dom._getStyle(i,aB),g=ao.Dom.setStyle,b=f.pos,a=f.noRetry,d=[parseInt(ao.Dom.getComputedStyle(i,aH),10),parseInt(ao.Dom.getComputedStyle(i,aC),10)],c,h;if(e=="static"){e=G;g(i,aB,e)}c=ao.Dom._getXY(i);if(!b||c===false){return false}if(isNaN(d[0])){d[0]=(e==G)?0:i[aP]}if(isNaN(d[1])){d[1]=(e==G)?0:i[ae]}if(b[0]!==null){g(i,aH,b[0]-c[0]+d[0]+"px")}if(b[1]!==null){g(i,aC,b[1]-c[1]+d[1]+"px")}if(!a){h=ao.Dom._getXY(i);if((b[0]!==null&&h[0]!=b[0])||(b[1]!==null&&h[1]!=b[1])){ao.Dom._setXY(i,{pos:b,noRetry:true})}}},setX:function(b,a){ao.Dom.setXY(b,[a,null])},setY:function(a,b){ao.Dom.setXY(a,[null,b])},getRegion:function(a){var b=function(c){var d=false;if(ao.Dom._canPosition(c)){d=ao.Region.getRegion(c)}else{}return d};return ao.Dom.batch(a,b,ao.Dom,true)},getClientWidth:function(){return ao.Dom.getViewportWidth()},getClientHeight:function(){return ao.Dom.getViewportHeight()},getElementsByClassName:function(f,b,e,c,j,d){f=ai.trim(f);b=b||"*";e=(e)?ao.Dom.get(e):null||aj;if(!e){return[]}var a=[],k=e.getElementsByTagName(b),h=ao.Dom.hasClass;for(var i=0,g=k.length;i<g;++i){if(h(k[i],f)){a[a.length]=k[i]}}if(c){ao.Dom.batch(a,c,j,d)}return a},hasClass:function(b,a){return ao.Dom.batch(b,ao.Dom._hasClass,a)},_hasClass:function(a,c){var b=false,d;if(a&&c){d=ao.Dom.getAttribute(a,an)||ak;if(c.exec){b=c.test(d)}else{b=c&&(ar+d+ar).indexOf(ar+c+ar)>-1}}else{}return b},addClass:function(b,a){return ao.Dom.batch(b,ao.Dom._addClass,a)},_addClass:function(a,c){var b=false,d;if(a&&c){d=ao.Dom.getAttribute(a,an)||ak;if(!ao.Dom._hasClass(a,c)){ao.Dom.setAttribute(a,an,at(d+ar+c));b=true}}else{}return b},removeClass:function(b,a){return ao.Dom.batch(b,ao.Dom._removeClass,a)},_removeClass:function(f,a){var e=false,d,c,b;if(f&&a){d=ao.Dom.getAttribute(f,an)||ak;ao.Dom.setAttribute(f,an,d.replace(ao.Dom._getClassRegex(a),ak));c=ao.Dom.getAttribute(f,an);if(d!==c){ao.Dom.setAttribute(f,an,at(c));e=true;if(ao.Dom.getAttribute(f,an)===""){b=(f.hasAttribute&&f.hasAttribute(aK))?aK:an;f.removeAttribute(b)}}}else{}return e},replaceClass:function(a,c,b){return ao.Dom.batch(a,ao.Dom._replaceClass,{from:c,to:b})},_replaceClass:function(g,a){var f,c,e,b=false,d;if(g&&a){c=a.from;e=a.to;if(!e){b=false}else{if(!c){b=ao.Dom._addClass(g,a.to)}else{if(c!==e){d=ao.Dom.getAttribute(g,an)||ak;f=(ar+d.replace(ao.Dom._getClassRegex(c),ar+e)).split(ao.Dom._getClassRegex(e));f.splice(1,0,ar+e);ao.Dom.setAttribute(g,an,at(f.join(ak)));b=true}}}}else{}return b},generateId:function(b,a){a=a||"yui-gen";var c=function(e){if(e&&e.id){return e.id}var d=a+YAHOO.env._id_counter++;if(e){if(e[aM].getElementById(d)){return ao.Dom.generateId(e,d+a)}e.id=d}return d};return ao.Dom.batch(b,c,ao.Dom,true)||c.apply(ao.Dom,arguments)},isAncestor:function(c,a){c=ao.Dom.get(c);a=ao.Dom.get(a);var b=false;if((c&&a)&&(c[aF]&&a[aF])){if(c.contains&&c!==a){b=c.contains(a)}else{if(c.compareDocumentPosition){b=!!(c.compareDocumentPosition(a)&16)}}}else{}return b},inDocument:function(a,b){return ao.Dom._inDoc(ao.Dom.get(a),b)},_inDoc:function(c,a){var b=false;if(c&&c[aq]){a=a||c[aM];b=ao.Dom.isAncestor(a[av],c)}else{}return b},getElementsBy:function(a,b,f,d,i,e,c){b=b||"*";f=(f)?ao.Dom.get(f):null||aj;if(!f){return[]}var j=[],k=f.getElementsByTagName(b);for(var h=0,g=k.length;h<g;++h){if(a(k[h])){if(c){j=k[h];break}else{j[j.length]=k[h]}}}if(d){ao.Dom.batch(j,d,i,e)}return j},getElementBy:function(a,b,c){return ao.Dom.getElementsBy(a,b,c,null,null,null,true)},batch:function(a,c,f,e){var g=[],d=(e)?f:window;a=(a&&(a[aq]||a.item))?a:ao.Dom.get(a);if(a&&c){if(a[aq]||a.length===undefined){return c.call(d,a,f)}for(var b=0;b<a.length;++b){g[g.length]=c.call(d,a[b],f)}}else{return false}return g},getDocumentHeight:function(){var b=(aj[ax]!=ah||al)?aj.body.scrollHeight:z.scrollHeight,a=Math.max(b,ao.Dom.getViewportHeight());return a},getDocumentWidth:function(){var b=(aj[ax]!=ah||al)?aj.body.scrollWidth:z.scrollWidth,a=Math.max(b,ao.Dom.getViewportWidth());return a},getViewportHeight:function(){var a=self.innerHeight,b=aj[ax];if((b||aa)&&!ap){a=(b==ah)?z.clientHeight:aj.body.clientHeight}return a},getViewportWidth:function(){var a=self.innerWidth,b=aj[ax];if(b||aa){a=(b==ah)?z.clientWidth:aj.body.clientWidth}return a},getAncestorBy:function(a,b){while((a=a[x])){if(ao.Dom._testElement(a,b)){return a}}return null},getAncestorByClassName:function(c,b){c=ao.Dom.get(c);if(!c){return null}var a=function(d){return ao.Dom.hasClass(d,b)};return ao.Dom.getAncestorBy(c,a)},getAncestorByTagName:function(c,b){c=ao.Dom.get(c);if(!c){return null}var a=function(d){return d[aq]&&d[aq].toUpperCase()==b.toUpperCase()};return ao.Dom.getAncestorBy(c,a)},getPreviousSiblingBy:function(a,b){while(a){a=a.previousSibling;if(ao.Dom._testElement(a,b)){return a}}return null},getPreviousSibling:function(a){a=ao.Dom.get(a);if(!a){return null}return ao.Dom.getPreviousSiblingBy(a)},getNextSiblingBy:function(a,b){while(a){a=a.nextSibling;if(ao.Dom._testElement(a,b)){return a}}return null},getNextSibling:function(a){a=ao.Dom.get(a);if(!a){return null}return ao.Dom.getNextSiblingBy(a)},getFirstChildBy:function(b,a){var c=(ao.Dom._testElement(b.firstChild,a))?b.firstChild:null;return c||ao.Dom.getNextSiblingBy(b.firstChild,a)},getFirstChild:function(a,b){a=ao.Dom.get(a);if(!a){return null}return ao.Dom.getFirstChildBy(a)},getLastChildBy:function(b,a){if(!b){return null}var c=(ao.Dom._testElement(b.lastChild,a))?b.lastChild:null;return c||ao.Dom.getPreviousSiblingBy(b.lastChild,a)},getLastChild:function(a){a=ao.Dom.get(a);return ao.Dom.getLastChildBy(a)},getChildrenBy:function(c,d){var a=ao.Dom.getFirstChildBy(c,d),b=a?[a]:[];ao.Dom.getNextSiblingBy(a,function(e){if(!d||d(e)){b[b.length]=e}return false});return b},getChildren:function(a){a=ao.Dom.get(a);if(!a){}return ao.Dom.getChildrenBy(a)},getDocumentScrollLeft:function(a){a=a||aj;return Math.max(a[av].scrollLeft,a.body.scrollLeft)},getDocumentScrollTop:function(a){a=a||aj;return Math.max(a[av].scrollTop,a.body.scrollTop)},insertBefore:function(b,a){b=ao.Dom.get(b);a=ao.Dom.get(a);if(!b||!a||!a[x]){return null}return a[x].insertBefore(b,a)},insertAfter:function(b,a){b=ao.Dom.get(b);a=ao.Dom.get(a);if(!b||!a||!a[x]){return null}if(a.nextSibling){return a[x].insertBefore(b,a.nextSibling)}else{return a[x].appendChild(b)}},getClientRegion:function(){var a=ao.Dom.getDocumentScrollTop(),c=ao.Dom.getDocumentScrollLeft(),d=ao.Dom.getViewportWidth()+c,b=ao.Dom.getViewportHeight()+a;return new ao.Region(a,d,b,c)},setAttribute:function(c,b,a){b=ao.Dom.CUSTOM_ATTRIBUTES[b]||b;c.setAttribute(b,a)},getAttribute:function(b,a){a=ao.Dom.CUSTOM_ATTRIBUTES[a]||a;return b.getAttribute(a)},_toCamel:function(c){var a=aN;function b(e,d){return d.toUpperCase()}return a[c]||(a[c]=c.indexOf("-")===-1?c:c.replace(/-([a-z])/gi,b))},_getClassRegex:function(b){var a;if(b!==undefined){if(b.exec){a=b}else{a=aJ[b];if(!a){b=b.replace(ao.Dom._patterns.CLASS_RE_TOKENS,"\\$1");a=aJ[b]=new RegExp(ay+b+aG,Y)}}}return a},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(a,b){return a&&a[aF]==1&&(!b||b(a))},_calcBorders:function(a,d){var c=parseInt(ao.Dom[au](a,ac),10)||0,b=parseInt(ao.Dom[au](a,aA),10)||0;if(am){if(ag.test(a[aq])){c=0;b=0}}d[0]+=b;d[1]+=c;return d}};var ab=ao.Dom[au];if(aE.opera){ao.Dom[au]=function(c,b){var a=ab(c,b);if(y.test(b)){a=ao.Dom.Color.toRGB(a)}return a}}if(aE.webkit){ao.Dom[au]=function(c,b){var a=ab(c,b);if(a==="rgba(0, 0, 0, 0)"){a="transparent"}return a}}})();YAHOO.util.Region=function(c,b,a,d){this.top=c;this.y=c;this[1]=c;this.right=b;this.bottom=a;this.left=d;this.x=d;this[0]=d;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(b){var d=Math.max(this.top,b.top),c=Math.min(this.right,b.right),a=Math.min(this.bottom,b.bottom),e=Math.max(this.left,b.left);if(a>=d&&c>=e){return new YAHOO.util.Region(d,c,a,e)}else{return null}};YAHOO.util.Region.prototype.union=function(b){var d=Math.min(this.top,b.top),c=Math.max(this.right,b.right),a=Math.max(this.bottom,b.bottom),e=Math.min(this.left,b.left);return new YAHOO.util.Region(d,c,a,e)};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(d){var b=YAHOO.util.Dom.getXY(d),e=b[1],c=b[0]+d.offsetWidth,a=b[1]+d.offsetHeight,f=b[0];return new YAHOO.util.Region(e,c,a,f)};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 w=YAHOO.util,x="clientTop",s="clientLeft",o="parentNode",m="right",a="hasLayout",p="px",c="opacity",l="auto",u="borderLeftWidth",r="borderTopWidth",h="borderRightWidth",b="borderBottomWidth",e="visible",g="transparent",j="height",t="width",q="style",d="currentStyle",f=/^width|height$/,i=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,k={get:function(B,z){var A="",y=B[d][z];if(z===c){A=w.Dom.getStyle(B,c)}else{if(!y||(y.indexOf&&y.indexOf(p)>-1)){A=y}else{if(w.Dom.IE_COMPUTED[z]){A=w.Dom.IE_COMPUTED[z](B,z)}else{if(i.test(y)){A=w.Dom.IE.ComputedStyle.getPixel(B,z)}else{A=y}}}}return A},getOffset:function(B,A){var y=B[d][A],F=A.charAt(0).toUpperCase()+A.substr(1),E="offset"+F,D="pixel"+F,z="",C;if(y==l){C=B[E];if(C===undefined){z=0}z=C;if(f.test(A)){B[q][A]=C;if(B[E]>C){z=C-(B[E]-C)}B[q][A]=l}}else{if(!B[q][D]&&!B[q][A]){B[q][A]=y}z=B[q][D]}return z+p},getBorderWidth:function(A,y){var z=null;if(!A[d][a]){A[q].zoom=1}switch(y){case r:z=A[x];break;case b:z=A.offsetHeight-A.clientHeight-A[x];break;case u:z=A[s];break;case h:z=A.offsetWidth-A.clientWidth-A[s];break}return z+p},getPixel:function(B,C){var z=null,y=B[d][m],A=B[d][C];B[q][m]=A;z=B[q].pixelRight;B[q][m]=y;return z+p},getMargin:function(z,A){var y;if(z[d][A]==l){y=0+p}else{y=w.Dom.IE.ComputedStyle.getPixel(z,A)}return y},getVisibility:function(z,A){var y;while((y=z[d])&&y[A]=="inherit"){z=z[o]}return(y)?y[A]:e},getColor:function(y,z){return w.Dom.Color.toRGB(y[d][z])||g},getBorderColor:function(A,B){var z=A[d],y=z[B]||z.color;return w.Dom.Color.toRGB(w.Dom.Color.toHex(y))}},v={};v.top=v.right=v.bottom=v.left=v[t]=v[j]=k.getOffset;v.color=k.getColor;v[r]=v[h]=v[b]=v[u]=k.getBorderWidth;v.marginTop=v.marginRight=v.marginBottom=v.marginLeft=k.getMargin;v.visibility=k.getVisibility;v.borderColor=v.borderTopColor=v.borderRightColor=v.borderBottomColor=v.borderLeftColor=k.getBorderColor;w.Dom.IE_COMPUTED=v;w.Dom.IE_ComputedStyle=k})();(function(){var c="toString",a=parseInt,d=RegExp,b=YAHOO.util;b.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(!b.Dom.Color.re_RGB.test(e)){e=b.Dom.Color.toHex(e)}if(b.Dom.Color.re_hex.exec(e)){e="rgb("+[a(d.$1,16),a(d.$2,16),a(d.$3,16)].join(", ")+")"}return e},toHex:function(e){e=b.Dom.Color.KEYWORDS[e]||e;if(b.Dom.Color.re_RGB.exec(e)){var f=(d.$1.length===1)?"0"+d.$1:Number(d.$1),g=(d.$2.length===1)?"0"+d.$2:Number(d.$2),h=(d.$3.length===1)?"0"+d.$3:Number(d.$3);e=[f[c](16),g[c](16),h[c](16)].join("")}if(e.length<6){e=e.replace(b.Dom.Color.re_hex3,"$1$1")}if(e!=="transparent"&&e.indexOf("#")<0){e="#"+e}return e.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1796"});YAHOO.util.CustomEvent=function(c,d,e,a){this.type=c;this.scope=d||window;this.silent=e;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var b="_YUICEOnSubscribe";if(c!==b){this.subscribeEvent=new YAHOO.util.CustomEvent(b,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(a,c,b){if(!a){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(a,c,b)}this.subscribers.push(new YAHOO.util.Subscriber(a,c,b))},unsubscribe:function(d,b){if(!d){return this.unsubscribeAll()}var c=false;for(var f=0,a=this.subscribers.length;f<a;++f){var e=this.subscribers[f];if(e&&e.contains(d,b)){this._delete(f);c=true}}return c},fire:function(){this.lastError=null;var g=[],m=this.subscribers.length;if(!m&&this.silent){return true}var i=[].slice.call(arguments,0),k=true,a,h=false;if(!this.silent){}var b=this.subscribers.slice(),d=YAHOO.util.Event.throwErrors;for(a=0;a<m;++a){var e=b[a];if(!e){h=true}else{if(!this.silent){}var f=e.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var c=null;if(i.length>0){c=i[0]}try{k=e.fn.call(f,c,e.obj)}catch(l){this.lastError=l;if(d){throw l}}}else{try{k=e.fn.call(f,this.type,i,e.obj)}catch(j){this.lastError=j;if(d){throw j}}}if(false===k){if(!this.silent){}break}}}return(k!==false)},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,c,b){this.fn=a;this.obj=YAHOO.lang.isUndefined(c)?null:c;this.overrideContext=b};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 i=false;var h=[];var g=[];var j=[];var l=[];var b=0;var k=[];var c=[];var d=0;var a={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var f=YAHOO.env.ua.ie?"focusin":"focus";var e=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var o=this;var m=function(){o._tryPreloadAttach()};this._interval=setInterval(m,this.POLL_INTERVAL)}},onAvailable:function(m,r,p,o,q){var t=(YAHOO.lang.isString(m))?[m]:m;for(var s=0;s<t.length;s=s+1){k.push({id:t[s],fn:r,obj:p,overrideContext:o,checkReady:q})}b=this.POLL_RETRYS;this.startInterval()},onContentReady:function(m,q,p,o){this.onAvailable(m,q,p,o,true)},onDOMReady:function(p,o,m){if(this.DOMReady){setTimeout(function(){var q=window;if(m){if(m===true){q=o}else{q=m}}p.call(q,"DOMReady",[],o)},0)}else{this.DOMReadyEvent.subscribe(p,o,m)}},_addListener:function(y,A,o,u,q,B){if(!o||!o.call){return false}if(this._isValidCollection(y)){var m=true;for(var t=0,r=y.length;t<r;++t){m=this.on(y[t],A,o,u,q)&&m}return m}else{if(YAHOO.lang.isString(y)){var v=this.getEl(y);if(v){y=v}else{this.onAvailable(y,function(){YAHOO.util.Event.on(y,A,o,u,q)});return true}}}if(!y){return false}if("unload"==A&&u!==this){g[g.length]=[y,A,o,u,q];return true}var z=y;if(q){if(q===true){z=u}else{z=q}}var x=function(D){return o.call(z,YAHOO.util.Event.getEvent(D,y),u)};var C=[y,A,o,x,z,u,q];var s=h.length;h[s]=C;if(this.useLegacyEvent(y,A)){var w=this.getLegacyIndex(y,A);if(w==-1||y!=j[w][0]){w=j.length;c[y.id+A]=w;j[w]=[y,A,y["on"+A]];l[w]=[];y["on"+A]=function(D){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(D),w)}}l[w].push(C)}else{try{this._simpleAdd(y,A,x,B)}catch(p){this.lastError=p;this.removeListener(y,A,o);return false}}return true},addListener:function(q,m,r,p,o){return this._addListener(q,m,r,p,o,false)},addFocusListener:function(p,q,o,m){return this._addListener(p,f,q,o,m,true)},removeFocusListener:function(m,o){return this.removeListener(m,f,o)},addBlurListener:function(p,q,o,m){return this._addListener(p,e,q,o,m,true)},removeBlurListener:function(m,o){return this.removeListener(m,e,o)},fireLegacyEvent:function(r,t){var p=true,w,m,o,v,q;m=l[t].slice();for(var u=0,s=m.length;u<s;++u){o=m[u];if(o&&o[this.WFN]){v=o[this.ADJ_SCOPE];q=o[this.WFN].call(v,r);p=(p&&q)}}w=j[t];if(w&&w[2]){w[2](r)}return p},getLegacyIndex:function(o,m){var p=this.generateId(o)+m;if(typeof c[p]=="undefined"){return -1}else{return c[p]}},useLegacyEvent:function(o,m){return(this.webkit&&this.webkit<419&&("click"==m||"dblclick"==m))},removeListener:function(x,y,p){var u,r,m;if(typeof x=="string"){x=this.getEl(x)}else{if(this._isValidCollection(x)){var o=true;for(u=x.length-1;u>-1;u--){o=(this.removeListener(x[u],y,p)&&o)}return o}}if(!p||!p.call){return this.purgeElement(x,false,y)}if("unload"==y){for(u=g.length-1;u>-1;u--){m=g[u];if(m&&m[0]==x&&m[1]==y&&m[2]==p){g.splice(u,1);return true}}return false}var t=null;var s=arguments[3];if("undefined"===typeof s){s=this._getCacheIndex(x,y,p)}if(s>=0){t=h[s]}if(!x||!t){return false}if(this.useLegacyEvent(x,y)){var v=this.getLegacyIndex(x,y);var w=l[v];if(w){for(u=0,r=w.length;u<r;++u){m=w[u];if(m&&m[this.EL]==x&&m[this.TYPE]==y&&m[this.FN]==p){w.splice(u,1);break}}}}else{try{this._simpleRemove(x,y,t[this.WFN],false)}catch(q){this.lastError=q;return false}}delete h[s][this.WFN];delete h[s][this.FN];h.splice(s,1);return true},getTarget:function(m,o){var p=m.target||m.srcElement;return this.resolveTextNode(p)},resolveTextNode:function(m){try{if(m&&3==m.nodeType){return m.parentNode}}catch(o){}return m},getPageX:function(m){var o=m.pageX;if(!o&&0!==o){o=m.clientX||0;if(this.isIE){o+=this._getScrollLeft()}}return o},getPageY:function(o){var m=o.pageY;if(!m&&0!==m){m=o.clientY||0;if(this.isIE){m+=this._getScrollTop()}}return m},getXY:function(m){return[this.getPageX(m),this.getPageY(m)]},getRelatedTarget:function(m){var o=m.relatedTarget;if(!o){if(m.type=="mouseout"){o=m.toElement}else{if(m.type=="mouseover"){o=m.fromElement}}}return this.resolveTextNode(o)},getTime:function(m){if(!m.time){var o=new Date().getTime();try{m.time=o}catch(p){this.lastError=p;return o}}return m.time},stopEvent:function(m){this.stopPropagation(m);this.preventDefault(m)},stopPropagation:function(m){if(m.stopPropagation){m.stopPropagation()}else{m.cancelBubble=true}},preventDefault:function(m){if(m.preventDefault){m.preventDefault()}else{m.returnValue=false}},getEvent:function(o,q){var p=o||window.event;if(!p){var m=this.getEvent.caller;while(m){p=m.arguments[0];if(p&&Event==p.constructor){break}m=m.caller}}return p},getCharCode:function(m){var o=m.keyCode||m.charCode||0;if(YAHOO.env.ua.webkit&&(o in a)){o=a[o]}return o},_getCacheIndex:function(o,m,p){for(var q=0,r=h.length;q<r;q=q+1){var s=h[q];if(s&&s[this.FN]==p&&s[this.EL]==o&&s[this.TYPE]==m){return q}}return -1},generateId:function(o){var m=o.id;if(!m){m="yuievtautoid-"+d;++d;o.id=m}return m},_isValidCollection:function(m){try{return(m&&typeof m!=="string"&&m.length&&!m.tagName&&!m.alert&&typeof m[0]!=="undefined")}catch(o){return false}},elCache:{},getEl:function(m){return(typeof m==="string")?document.getElementById(m):m},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(m){if(!i){i=true;var o=YAHOO.util.Event;o._ready();o._tryPreloadAttach()}},_ready:function(m){var o=YAHOO.util.Event;if(!o.DOMReady){o.DOMReady=true;o.DOMReadyEvent.fire();o._simpleRemove(document,"DOMContentLoaded",o._ready)}},_tryPreloadAttach:function(){if(k.length===0){b=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var o=!i;if(!o){o=(b>0&&k.length>0)}var p=[];var m=function(w,v){var x=w;if(v.overrideContext){if(v.overrideContext===true){x=v.obj}else{x=v.overrideContext}}v.fn.call(x,v.obj)};var t,u,q,r,s=[];for(t=0,u=k.length;t<u;t=t+1){q=k[t];if(q){r=this.getEl(q.id);if(r){if(q.checkReady){if(i||r.nextSibling||!o){s.push(q);k[t]=null}}else{m(r,q);k[t]=null}}else{p.push(q)}}}for(t=0,u=s.length;t<u;t=t+1){q=s[t];m(this.getEl(q.id),q)}b--;if(o){for(t=k.length-1;t>-1;t--){q=k[t];if(!q||!q.id){k.splice(t,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(q,p,m){var s=(YAHOO.lang.isString(q))?this.getEl(q):q;var o=this.getListeners(s,m),r,u;if(o){for(r=o.length-1;r>-1;r--){var t=o[r];this.removeListener(s,t.type,t.fn)}}if(p&&s&&s.childNodes){for(r=0,u=s.childNodes.length;r<u;++r){this.purgeElement(s.childNodes[r],p,m)}}},getListeners:function(u,w){var r=[],v;if(!w){v=[h,g]}else{if(w==="unload"){v=[g]}else{v=[h]}}var p=(YAHOO.lang.isString(u))?this.getEl(u):u;for(var s=0;s<v.length;s=s+1){var m=v[s];if(m){for(var q=0,o=m.length;q<o;++q){var t=m[q];if(t&&t[this.EL]===p&&(!w||w===t[this.TYPE])){r.push({type:t[this.TYPE],fn:t[this.FN],obj:t[this.OBJ],adjust:t[this.OVERRIDE],scope:t[this.ADJ_SCOPE],index:q})}}}}return(r.length)?r:null},_unload:function(o){var u=YAHOO.util.Event,r,s,t,p,q,m=g.slice(),v;for(r=0,p=g.length;r<p;++r){t=m[r];if(t){v=window;if(t[u.ADJ_SCOPE]){if(t[u.ADJ_SCOPE]===true){v=t[u.UNLOAD_OBJ]}else{v=t[u.ADJ_SCOPE]}}t[u.FN].call(v,u.getEvent(o,t[u.EL]),t[u.UNLOAD_OBJ]);m[r]=null}}t=null;v=null;g=null;if(h){for(s=h.length-1;s>-1;s--){t=h[s];if(t){u.removeListener(t[u.EL],t[u.TYPE],t[u.FN],s)}}t=null}j=null;u._simpleRemove(window,"unload",u._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var o=document.documentElement,m=document.body;if(o&&(o.scrollTop||o.scrollLeft)){return[o.scrollTop,o.scrollLeft]}else{if(m){return[m.scrollTop,m.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(o,m,p,q){o.addEventListener(m,p,(q))}}else{if(window.attachEvent){return function(o,m,p,q){o.attachEvent("on"+m,p)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(o,m,p,q){o.removeEventListener(m,p,(q))}}else{if(window.detachEvent){return function(o,m,p){o.detachEvent("on"+m,p)}}else{return function(){}}}}()}}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;if(a.isIE){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,e,b,c){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(e,b,c)}else{this.__yui_subscribers=this.__yui_subscribers||{};var f=this.__yui_subscribers;if(!f[a]){f[a]=[]}f[a].push({fn:e,obj:b,overrideContext:c})}},unsubscribe:function(f,d,b){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(f){var c=a[f];if(c){return c.unsubscribe(d,b)}}else{var g=true;for(var e in a){if(YAHOO.lang.hasOwnProperty(a,e)){g=g&&a[e].unsubscribe(d,b)}}return g}return false},unsubscribeAll:function(a){return this.unsubscribe(a)},createEvent:function(g,a){this.__yui_events=this.__yui_events||{};var d=a||{};var e=this.__yui_events;if(e[g]){}else{var f=d.scope||this;var i=(d.silent);var c=new YAHOO.util.CustomEvent(g,f,i,YAHOO.util.CustomEvent.FLAT);e[g]=c;if(d.onSubscribeCallback){c.subscribeEvent.subscribe(d.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var h=this.__yui_subscribers[g];if(h){for(var b=0;b<h.length;++b){c.subscribe(h[b].fn,h[b].obj,h[b].overrideContext)}}}return e[g]},fireEvent:function(d,e,a,f){this.__yui_events=this.__yui_events||{};var b=this.__yui_events[d];if(!b){return null}var g=[];for(var c=1;c<arguments.length;++c){g.push(arguments[c])}return b.fire.apply(b,g)},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true}}return false}};(function(){var a=YAHOO.util.Event,b=YAHOO.lang;YAHOO.util.KeyListener=function(i,d,h,g){if(!i){}else{if(!d){}else{if(!h){}}}if(!g){g=YAHOO.util.KeyListener.KEYDOWN}var f=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(b.isString(i)){i=document.getElementById(i)}if(b.isFunction(h)){f.subscribe(h)}else{f.subscribe(h.fn,h.scope,h.correctScope)}function e(m,o){if(!d.shift){d.shift=false}if(!d.alt){d.alt=false}if(!d.ctrl){d.ctrl=false}if(m.shiftKey==d.shift&&m.altKey==d.alt&&m.ctrlKey==d.ctrl){var l,p=d.keys,j;if(YAHOO.lang.isArray(p)){for(var k=0;k<p.length;k++){l=p[k];j=a.getCharCode(m);if(l==j){f.fire(j,m);break}}}else{j=a.getCharCode(m);if(p==j){f.fire(j,m)}}}}this.enable=function(){if(!this.enabled){a.on(i,g,e);this.enabledEvent.fire(d)}this.enabled=true};this.disable=function(){if(this.enabled){a.removeListener(i,g,e);this.disabledEvent.fire(d)}this.enabled=false};this.toString=function(){return"KeyListener ["+d.keys+"] "+i.tagName+(i.id?"["+i.id+"]":"")}};var c=YAHOO.util.KeyListener;c.KEYDOWN="keydown";c.KEYUP="keyup";c.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.7.0",build:"1796"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.7.0",build:"1796"});YAHOO.util.Get=function(){var m={},l=0,s=0,e=false,o=YAHOO.env.ua,t=YAHOO.lang;var j=function(y,u,z){var v=z||window,A=v.document,B=A.createElement(y);for(var x in u){if(u[x]&&YAHOO.lang.hasOwnProperty(u,x)){B.setAttribute(x,u[x])}}return B};var i=function(u,v,x){var w=x||"utf-8";return j("link",{id:"yui__dyn_"+(s++),type:"text/css",charset:w,rel:"stylesheet",href:u},v)};var q=function(u,v,x){var w=x||"utf-8";return j("script",{id:"yui__dyn_"+(s++),type:"text/javascript",charset:w,src:u},v)};var a=function(u,v){return{tId:u.tId,win:u.win,data:u.data,nodes:u.nodes,msg:v,purge:function(){d(this.tId)}}};var b=function(u,x){var v=m[x],w=(t.isString(u))?v.win.document.getElementById(u):u;if(!w){r(x,"target node not found: "+u)}return w};var r=function(x,w){var u=m[x];if(u.onFailure){var v=u.scope||u.win;u.onFailure.call(v,a(u,w))}};var c=function(x){var u=m[x];u.finished=true;if(u.aborted){var w="transaction "+x+" was aborted";r(x,w);return}if(u.onSuccess){var v=u.scope||u.win;u.onSuccess.call(v,a(u))}};var p=function(w){var u=m[w];if(u.onTimeout){var v=u.scope||u;u.onTimeout.call(v,a(u))}};var g=function(x,B){var v=m[x];if(v.timer){v.timer.cancel()}if(v.aborted){var z="transaction "+x+" was aborted";r(x,z);return}if(B){v.url.shift();if(v.varName){v.varName.shift()}}else{v.url=(t.isString(v.url))?[v.url]:v.url;if(v.varName){v.varName=(t.isString(v.varName))?[v.varName]:v.varName}}var E=v.win,D=E.document,C=D.getElementsByTagName("head")[0],y;if(v.url.length===0){if(v.type==="script"&&o.webkit&&o.webkit<420&&!v.finalpass&&!v.varName){var A=q(null,v.win,v.charset);A.innerHTML='YAHOO.util.Get._finalize("'+x+'");';v.nodes.push(A);C.appendChild(A)}else{c(x)}return}var u=v.url[0];if(!u){v.url.shift();return g(x)}if(v.timeout){v.timer=t.later(v.timeout,v,p,x)}if(v.type==="script"){y=q(u,E,v.charset)}else{y=i(u,E,v.charset)}f(v.type,y,x,u,E,v.url.length);v.nodes.push(y);if(v.insertBefore){var F=b(v.insertBefore,x);if(F){F.parentNode.insertBefore(y,F)}}else{C.appendChild(y)}if((o.webkit||o.gecko)&&v.type==="css"){g(x,u)}};var k=function(){if(e){return}e=true;for(var u in m){var v=m[u];if(v.autopurge&&v.finished){d(v.tId);delete m[u]}}e=false};var d=function(B){var y=m[B];if(y){var A=y.nodes,u=A.length,z=y.win.document,x=z.getElementsByTagName("head")[0];if(y.insertBefore){var w=b(y.insertBefore,B);if(w){x=w.parentNode}}for(var v=0;v<u;v=v+1){x.removeChild(A[v])}y.nodes=[]}};var h=function(v,u,w){var y="q"+(l++);w=w||{};if(l%YAHOO.util.Get.PURGE_THRESH===0){k()}m[y]=t.merge(w,{tId:y,type:v,url:u,finished:false,aborted:false,nodes:[]});var x=m[y];x.win=x.win||window;x.scope=x.scope||x.win;x.autopurge=("autopurge" in x)?x.autopurge:(v==="script")?true:false;t.later(0,x,g,y);return{tId:y}};var f=function(D,y,x,v,z,A,C){var B=C||g;if(o.ie){y.onreadystatechange=function(){var E=this.readyState;if("loaded"===E||"complete"===E){y.onreadystatechange=null;B(x,v)}}}else{if(o.webkit){if(D==="script"){if(o.webkit>=420){y.addEventListener("load",function(){B(x,v)})}else{var u=m[x];if(u.varName){var w=YAHOO.util.Get.POLL_FREQ;u.maxattempts=YAHOO.util.Get.TIMEOUT/w;u.attempts=0;u._cache=u.varName[0].split(".");u.timer=t.later(w,u,function(J){var G=this._cache,F=G.length,E=this.win,H;for(H=0;H<F;H=H+1){E=E[G[H]];if(!E){this.attempts++;if(this.attempts++>this.maxattempts){var I="Over retry limit, giving up";u.timer.cancel();r(x,I)}else{}return}}u.timer.cancel();B(x,v)},null,true)}else{t.later(YAHOO.util.Get.POLL_FREQ,null,B,[x,v])}}}}else{y.onload=function(){B(x,v)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(u){t.later(0,null,c,u)},abort:function(v){var w=(t.isString(v))?v:v.tId;var u=m[w];if(u){u.aborted=true}},script:function(u,v){return h("script",u,v)},css:function(u,v){return h("css",u,v)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1796"});(function(){var b=YAHOO.util;var a=function(d,c,e,f){if(!d){}this.init(d,c,e,f)};a.NAME="Anim";a.prototype={toString:function(){var c=this.getEl()||{};var d=c.id||c.tagName;return(this.constructor.NAME+": "+d)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(c,e,d){return this.method(this.currentFrame,e,d-e,this.totalFrames)},setAttribute:function(c,f,e){var d=this.getEl();if(this.patterns.noNegatives.test(c)){f=(f>0)?f:0}if("style" in d){b.Dom.setStyle(d,c,f+e)}else{if(c in d){d[c]=f}}},getAttribute:function(c){var e=this.getEl();var g=b.Dom.getStyle(e,c);if(g!=="auto"&&!this.patterns.offsetUnit.test(g)){return parseFloat(g)}var d=this.patterns.offsetAttribute.exec(c)||[];var h=!!(d[3]);var f=!!(d[2]);if("style" in e){if(f||(b.Dom.getStyle(e,"position")=="absolute"&&h)){g=e["offset"+d[0].charAt(0).toUpperCase()+d[0].substr(1)]}else{g=0}}else{if(c in e){g=e[c]}}return g},getDefaultUnit:function(c){if(this.patterns.defaultUnit.test(c)){return"px"}return""},setRuntimeAttribute:function(d){var j;var e;var f=this.attributes;this.runtimeAttributes[d]={};var h=function(i){return(typeof i!=="undefined")};if(!h(f[d]["to"])&&!h(f[d]["by"])){return false}j=(h(f[d]["from"]))?f[d]["from"]:this.getAttribute(d);if(h(f[d]["to"])){e=f[d]["to"]}else{if(h(f[d]["by"])){if(j.constructor==Array){e=[];for(var g=0,c=j.length;g<c;++g){e[g]=j[g]+f[d]["by"][g]*1}}else{e=j+f[d]["by"]*1}}}this.runtimeAttributes[d].start=j;this.runtimeAttributes[d].end=e;this.runtimeAttributes[d].unit=(h(f[d].unit))?f[d]["unit"]:this.getDefaultUnit(d);return true},init:function(e,j,i,c){var d=false;var f=null;var h=0;e=b.Dom.get(e);this.attributes=j||{};this.duration=!YAHOO.lang.isUndefined(i)?i:1;this.method=c||b.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=b.AnimMgr.fps;this.setEl=function(m){e=b.Dom.get(m)};this.getEl=function(){return e};this.isAnimated=function(){return d};this.getStartTime=function(){return f};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(b.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}b.AnimMgr.registerElement(this);return true};this.stop=function(m){if(!this.isAnimated()){return false}if(m){this.currentFrame=this.totalFrames;this._onTween.fire()}b.AnimMgr.stop(this)};var l=function(){this.onStart.fire();this.runtimeAttributes={};for(var m in this.attributes){this.setRuntimeAttribute(m)}d=true;h=0;f=new Date()};var k=function(){var p={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};p.toString=function(){return("duration: "+p.duration+", currentFrame: "+p.currentFrame)};this.onTween.fire(p);var o=this.runtimeAttributes;for(var m in o){this.setAttribute(m,this.doMethod(m,o[m].start,o[m].end),o[m].unit)}h+=1};var g=function(){var m=(new Date()-f)/1000;var o={duration:m,frames:h,fps:h/m};o.toString=function(){return("duration: "+o.duration+", frames: "+o.frames+", fps: "+o.fps)};d=false;h=0;this.onComplete.fire(o)};this._onStart=new b.CustomEvent("_start",this,true);this.onStart=new b.CustomEvent("start",this);this.onTween=new b.CustomEvent("tween",this);this._onTween=new b.CustomEvent("_tween",this,true);this.onComplete=new b.CustomEvent("complete",this);this._onComplete=new b.CustomEvent("_complete",this,true);this._onStart.subscribe(l);this._onTween.subscribe(k);this._onComplete.subscribe(g)}};b.Anim=a})();YAHOO.util.AnimMgr=new function(){var c=null;var b=[];var a=0;this.fps=1000;this.delay=1;this.registerElement=function(f){b[b.length]=f;a+=1;f._onStart.fire();this.start()};this.unRegister=function(g,f){f=f||e(g);if(!g.isAnimated()||f==-1){return false}g._onComplete.fire();b.splice(f,1);a-=1;if(a<=0){this.stop()}return true};this.start=function(){if(c===null){c=setInterval(this.run,this.delay)}};this.stop=function(h){if(!h){clearInterval(c);for(var g=0,f=b.length;g<f;++g){this.unRegister(b[0],0)}b=[];c=null;a=0}else{this.unRegister(h)}};this.run=function(){for(var h=0,f=b.length;h<f;++h){var g=b[h];if(!g||!g.isAnimated()){continue}if(g.currentFrame<g.totalFrames||g.totalFrames===null){g.currentFrame+=1;if(g.useSeconds){d(g)}g._onTween.fire()}else{YAHOO.util.AnimMgr.stop(g,h)}}};var e=function(h){for(var g=0,f=b.length;g<f;++g){if(b[g]==h){return g}}return -1};var d=function(g){var j=g.totalFrames;var i=g.currentFrame;var h=(g.currentFrame*g.duration*1000/g.totalFrames);var f=(new Date()-g.getStartTime());var k=0;if(f<g.duration*1000){k=Math.round((f/h-1)*g.currentFrame)}else{k=j-(i+1)}if(k>0&&isFinite(k)){if(g.currentFrame+k>=j){k=j-(i+1)}g.currentFrame+=k}}};YAHOO.util.Bezier=new function(){this.getPosition=function(e,d){var f=e.length;var c=[];for(var b=0;b<f;++b){c[b]=[e[b][0],e[b][1]]}for(var a=1;a<f;++a){for(b=0;b<f-a;++b){c[b][0]=(1-d)*c[b][0]+d*c[parseInt(b+1,10)][0];c[b][1]=(1-d)*c[b][1]+d*c[parseInt(b+1,10)][1]}}return[c[0][0],c[0][1]]}};(function(){var a=function(f,e,g,h){a.superclass.constructor.call(this,f,e,g,h)};a.NAME="ColorAnim";a.DEFAULT_BGCOLOR="#fff";var c=YAHOO.util;YAHOO.extend(a,c.Anim);var d=a.superclass;var b=a.prototype;b.patterns.color=/color$/i;b.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;b.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;b.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;b.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;b.parseColor=function(e){if(e.length==3){return e}var f=this.patterns.hex.exec(e);if(f&&f.length==4){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}f=this.patterns.rgb.exec(e);if(f&&f.length==4){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}f=this.patterns.hex3.exec(e);if(f&&f.length==4){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}return null};b.getAttribute=function(e){var g=this.getEl();if(this.patterns.color.test(e)){var i=YAHOO.util.Dom.getStyle(g,e);var h=this;if(this.patterns.transparent.test(i)){var f=YAHOO.util.Dom.getAncestorBy(g,function(j){return !h.patterns.transparent.test(i)});if(f){i=c.Dom.getStyle(f,e)}else{i=a.DEFAULT_BGCOLOR}}}else{i=d.getAttribute.call(this,e)}return i};b.doMethod=function(f,k,g){var j;if(this.patterns.color.test(f)){j=[];for(var h=0,e=k.length;h<e;++h){j[h]=d.doMethod.call(this,f,k[h],g[h])}j="rgb("+Math.floor(j[0])+","+Math.floor(j[1])+","+Math.floor(j[2])+")"}else{j=d.doMethod.call(this,f,k,g)}return j};b.setRuntimeAttribute=function(f){d.setRuntimeAttribute.call(this,f);if(this.patterns.color.test(f)){var h=this.attributes;var k=this.parseColor(this.runtimeAttributes[f].start);var g=this.parseColor(this.runtimeAttributes[f].end);if(typeof h[f]["to"]==="undefined"&&typeof h[f]["by"]!=="undefined"){g=this.parseColor(h[f].by);for(var j=0,e=k.length;j<e;++j){g[j]=k[j]+g[j]}}this.runtimeAttributes[f].start=k;this.runtimeAttributes[f].end=g}};c.ColorAnim=a})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
YAHOO.util.Easing={easeNone:function(e,a,g,f){return g*e/f+a},easeIn:function(e,a,g,f){return g*(e/=f)*e+a},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a},easeBoth:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a}return -g/2*((--e)*(e-2)-1)+a},easeInStrong:function(e,a,g,f){return g*(e/=f)*e*e*e+a},easeOutStrong:function(e,a,g,f){return -g*((e=e/f-1)*e*e*e-1)+a},easeBothStrong:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e*e+a}return -g/2*((e-=2)*e*e*e-2)+a},elasticIn:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j)==1){return e+k}if(!i){i=j*0.3}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}return -(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e},elasticOut:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j)==1){return e+k}if(!i){i=j*0.3}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}return f*Math.pow(2,-10*g)*Math.sin((g*j-h)*(2*Math.PI)/i)+k+e},elasticBoth:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j/2)==2){return e+k}if(!i){i=j*(0.3*1.5)}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}if(g<1){return -0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i)*0.5+k+e},backIn:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*(e/=g)*e*((f+1)*e-f)+a},backOut:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*((e=e/g-1)*e*((f+1)*e+f)+1)+a},backBoth:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}if((e/=g/2)<1){return h/2*(e*e*(((f*=(1.525))+1)*e-f))+a}return h/2*((e-=2)*e*(((f*=(1.525))+1)*e+f)+2)+a},bounceIn:function(e,a,g,f){return g-YAHOO.util.Easing.bounceOut(f-e,0,g,f)+a},bounceOut:function(e,a,g,f){if((e/=f)<(1/2.75)){return g*(7.5625*e*e)+a}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+a}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+a}}}return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+a},bounceBoth:function(e,a,g,f){if(e<f/2){return YAHOO.util.Easing.bounceIn(e*2,0,g,f)*0.5+a}return YAHOO.util.Easing.bounceOut(e*2-f,0,g,f)*0.5+g*0.5+a}};(function(){var a=function(h,g,i,j){if(h){a.superclass.constructor.call(this,h,g,i,j)}};a.NAME="Motion";var e=YAHOO.util;YAHOO.extend(a,e.ColorAnim);var f=a.superclass;var c=a.prototype;c.patterns.points=/^points$/i;c.setAttribute=function(g,i,h){if(this.patterns.points.test(g)){h=h||"px";f.setAttribute.call(this,"left",i[0],h);f.setAttribute.call(this,"top",i[1],h)}else{f.setAttribute.call(this,g,i,h)}};c.getAttribute=function(g){if(this.patterns.points.test(g)){var h=[f.getAttribute.call(this,"left"),f.getAttribute.call(this,"top")]}else{h=f.getAttribute.call(this,g)}return h};c.doMethod=function(g,k,h){var j=null;if(this.patterns.points.test(g)){var i=this.method(this.currentFrame,0,100,this.totalFrames)/100;j=e.Bezier.getPosition(this.runtimeAttributes[g],i)}else{j=f.doMethod.call(this,g,k,h)}return j};c.setRuntimeAttribute=function(r){if(this.patterns.points.test(r)){var h=this.getEl();var k=this.attributes;var g;var m=k.points["control"]||[];var j;var o,q;if(m.length>0&&!(m[0] instanceof Array)){m=[m]}else{var l=[];for(o=0,q=m.length;o<q;++o){l[o]=m[o]}m=l}if(e.Dom.getStyle(h,"position")=="static"){e.Dom.setStyle(h,"position","relative")}if(d(k.points["from"])){e.Dom.setXY(h,k.points["from"])}else{e.Dom.setXY(h,e.Dom.getXY(h))}g=this.getAttribute("points");if(d(k.points["to"])){j=b.call(this,k.points["to"],g);var p=e.Dom.getXY(this.getEl());for(o=0,q=m.length;o<q;++o){m[o]=b.call(this,m[o],g)}}else{if(d(k.points["by"])){j=[g[0]+k.points["by"][0],g[1]+k.points["by"][1]];for(o=0,q=m.length;o<q;++o){m[o]=[g[0]+m[o][0],g[1]+m[o][1]]}}}this.runtimeAttributes[r]=[g];if(m.length>0){this.runtimeAttributes[r]=this.runtimeAttributes[r].concat(m)}this.runtimeAttributes[r][this.runtimeAttributes[r].length]=j}else{f.setRuntimeAttribute.call(this,r)}};var b=function(g,i){var h=e.Dom.getXY(this.getEl());g=[g[0]-h[0]+i[0],g[1]-h[1]+i[1]];return g};var d=function(g){return(typeof g!=="undefined")};e.Motion=a})();(function(){var d=function(f,e,g,h){if(f){d.superclass.constructor.call(this,f,e,g,h)}};d.NAME="Scroll";var b=YAHOO.util;YAHOO.extend(d,b.ColorAnim);var c=d.superclass;var a=d.prototype;a.doMethod=function(e,h,f){var g=null;if(e=="scroll"){g=[this.method(this.currentFrame,h[0],f[0]-h[0],this.totalFrames),this.method(this.currentFrame,h[1],f[1]-h[1],this.totalFrames)]}else{g=c.doMethod.call(this,e,h,f)}return g};a.getAttribute=function(e){var g=null;var f=this.getEl();if(e=="scroll"){g=[f.scrollLeft,f.scrollTop]}else{g=c.getAttribute.call(this,e)}return g};a.setAttribute=function(e,h,g){var f=this.getEl();if(e=="scroll"){f.scrollLeft=h[0];f.scrollTop=h[1]}else{c.setAttribute.call(this,e,h,g)}};b.Scroll=d})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1796"});
/*
Taobao JavaScript Framework base on YUI.
T-Bra or TB-ra whatever you like name it...
version 1.0
*/
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,b){if(b==null){b=0}else{if(b<0){b=Math.max(0,this.length+b)}}for(var a=b;a<this.length;a++){if(this[a]===c){return a}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(c,b){if(b==null){b=this.length-1}else{if(b<0){b=Math.max(0,this.length+b)}}for(var a=b;a>=0;a--){if(this[a]===c){return a}}return -1}}if(!Array.prototype.forEach){Array.prototype.forEach=function(b){var a=this.length;if(typeof b!="function"){throw new TypeError()}var d=arguments[1];for(var c=0;c<a;c++){if(c in this){b.call(d,this[c],c,this)}}}}if(!Array.prototype.filter){Array.prototype.filter=function(b){var a=this.length;if(typeof b!="function"){throw new TypeError()}var e=[];var d=arguments[1];for(var c=0;c<a;c++){if(c in this){var f=this[c];if(b.call(d,f,c,this)){e.push(f)}}}return e}}if(!Array.prototype.map){Array.prototype.map=function(b){var a=this.length;if(typeof b!="function"){throw new TypeError()}var e=new Array(a);var d=arguments[1];for(var c=0;c<a;c++){if(c in this){e[c]=b.call(d,this[c],c,this)}}return e}}if(!Array.prototype.some){Array.prototype.some=function(b){var a=this.length;if(typeof b!="function"){throw new TypeError()}var d=arguments[1];for(var c=0;c<a;c++){if(c in this&&b.call(d,this[c],c,this)){return true}}return false}}if(!Array.prototype.every){Array.prototype.every=function(b){var a=this.length;if(typeof b!="function"){throw new TypeError()}var d=arguments[1];for(var c=0;c<a;c++){if(c in this&&!b.call(d,this[c],c,this)){return false}}return true}}Array.prototype.copy=function(){var a=this.length;var c=new Array(a);for(var b=0;b<a;b++){c[b]=this[b]}return c};Array.prototype.remove=function(a){var b=this.indexOf(a);return(b!=-1)?this.splice(b,1):false};(function(){["indexOf","lastIndexOf","forEach","filter","map","some","every","copy"].forEach(function(a){if(!Array[a]){Array[a]=function(b){return Array.prototype[a].apply(b,Array.prototype.slice.call(arguments,1))}}})})();if(!String.prototype.toQueryParams){String.prototype.toQueryParams=function(){var f={};var g=this.split("&");var d=/([^=]*)=(.*)/;for(var b=0;b<g.length;b++){var a=d.exec(g[b]);if(!a){continue}var c=decodeURIComponent(a[1]);var e=a[2]?decodeURIComponent(a[2]):undefined;if(f[c]!==undefined){if(f[c].constructor!=Array){f[c]=[f[c]]}if(e){f[c].push(e)}}else{f[c]=e}}return f}}if(!String.prototype.trim){String.prototype.trim=function(){var a=/^\s+|\s+$/g;return function(){return this.replace(a,"")}}()}if(!String.prototype.replaceAll){String.prototype.replaceAll=function(b,a){return this.replace(new RegExp(b,"gm"),a)}}Math.randomInt=function(a){return Math.floor(Math.random()*(a+1))};$D=YAHOO.util.Dom;$E=YAHOO.util.Event;$=$D.get;TB=YAHOO.namespace("TB");TB.namespace=function(){var a=Array.prototype.slice.call(arguments,0),b;for(b=0;b<a.length;++b){if(a[b].indexOf("TB")!=0){a[b]="TB."+a[b]}}return YAHOO.namespace.apply(null,a)};TB.namespace("env");TB.env={hostname:"taobao.com",debug:false,yuipath:"http://a.tbcdn.cn/yui/2.7.0/",lang:"zh-cn"};TB.namespace("locale");TB.locale={Messages:{},getMessage:function(a){return TB.locale.Messages[a]||a},setMessage:function(a,b){TB.locale.Messages[a]=b}};$M=TB.locale.getMessage;TB.trace=function(a){if(!TB.env.debug){return}if(window.console){window.console.debug(a)}else{alert(a)}};TB.init=function(){this.namespace("widget","dom","bom","util","form","anim");if(location.hostname.indexOf("taobao.com")==-1){TB.env.hostname=location.hostname;TB.env.debug=true}var a=document.getElementsByTagName("script");var c=/tbra(?:[\w\.\-]*?)\.js(?:$|\?(.*))/;var e;for(var b=0;b<a.length;++b){if(e=c.exec(a[b].src)){TB.env.path=a[b].src.substring(0,e.index);if(e[1]){var d=e[1].toQueryParams();for(n in d){if(n=="t"||n=="timestamp"){TB.env.timestamp=parseInt(d[n]);continue}TB.env[n]=d[n]}}}}YAHOO.util.Get.css(TB.env.path+"assets/tbra.css"+(TB.env.timestamp?"?t="+TB.env.timestamp+".css":""))};TB.init();TB.locale.Messages={loading:"\u52a0\u8f7d\u4e2d...",pleaseWait:"\u6b63\u5728\u5904\u7406\uff0c\u8bf7\u7a0d\u5019...",ajaxError:"\u5bf9\u4e0d\u8d77\uff0c\u53ef\u80fd\u56e0\u4e3a\u7f51\u7edc\u6545\u969c\u5bfc\u81f4\u7cfb\u7edf\u53d1\u751f\u5f02\u5e38\u9519\u8bef\uff01",prevPageText:"\u4e0a\u4e00\u9875",nextPageText:"\u4e0b\u4e00\u9875",year:"\u5e74",month:"\u6708",day:"\u5929",hour:"\u5c0f\u65f6",minute:"\u5206\u949f",second:"\u79d2",timeoutText:"\u65f6\u95f4\u5230"};(function(){var e=navigator.userAgent.toLowerCase();var b=e.indexOf("opera")!=-1,g=e.indexOf("safari")!=-1,a=!b&&!g&&e.indexOf("gecko")>-1,c=!b&&e.indexOf("msie")!=-1,f=!b&&e.indexOf("msie 6")!=-1,d=!b&&e.indexOf("msie 7")!=-1;TB.bom={isOpera:b,isSafari:g,isGecko:a,isIE:c,isIE6:f,isIE7:d,getCookie:function(h){var i=document.cookie.match("(?:^|;)\\s*"+h+"=([^;]*)");return i?unescape(i[1]):""},setCookie:function(j,l,h,k,m){l=escape(l);l+=(k)?"; domain="+k:"";l+=(m)?"; path="+m:"";if(h){var i=new Date();i.setTime(i.getTime()+(h*86400000));l+="; expires="+i.toGMTString()}document.cookie=j+"="+l},removeCookie:function(h){this.setCookie(h,"",-1)},pickDocumentDomain:function(){var k=arguments[1]||location.hostname;var j=k.split("."),h=j.length;var i=arguments[0]||(h<3?0:1);if(i>=h||h-i<2){i=h-2}return j.slice(i).join(".")},addBookmark:function(i,h){if(window.sidebar){window.sidebar.addPanel(i,h,"")}else{if(window.external){window.external.AddFavorite(h,i)}else{}}}}})();TB.util.Indicator=new function(){var e=YAHOO.util,a=e.Dom,c=e.Lang;var b={message:"loading",useShim:false,useIFrame:false,centerIndicator:true};var d=function(g,f){var i=document.createElement("div");i.className="tb-indic-shim";a.setStyle(i,"display","none");g.parentNode.insertBefore(i,g);if(f){var h=document.createElement("iframe");h.setAttribute("frameBorder",0);h.className="tb-indic-shim-iframe";g.parentNode.insertBefore(h,g)}return i};this.attach=function(i,g){i=a.get(i);g=c.merge(b,g||{});var f=document.createElement("div");f.className="tb-indic";a.setStyle(f,"display","none");a.setStyle(f,"position","static");f.innerHTML="<span>"+$M(g.message)+"</span>";if(g.useShim){var j=d(i,g.useIFrame);j.appendChild(f)}else{i.parentNode.insertBefore(f,i)}var h={};h.show=function(l){if(g.useShim){var k=a.getRegion(i);var o=f.parentNode;a.setStyle(o,"display","block");a.setXY(o,[k[0],k[1]]);a.setStyle(o,"width",(k.right-k.left)+"px");a.setStyle(o,"height",(k.bottom-k.top)+"px");if(g.useIFrame){var m=o.nextSibling;a.setStyle(m,"width",(k.right-k.left)+"px");a.setStyle(m,"height",(k.bottom-k.top)+"px");a.setStyle(m,"display","block")}a.setStyle(f,"display","block");a.setStyle(f,"position","absolute");if(g.centerIndicator){a.setStyle(f,"top","50%");a.setStyle(f,"left","50%");f.style.marginTop=-(f.offsetHeight/2)+"px";f.style.marginLeft=-(f.offsetWidth/2)+"px"}}else{a.setStyle(f,"display","");if(l){a.setStyle(f,"position","absolute");a.setXY(f,l)}}};h.hide=function(){if(g.useShim){var l=f.parentNode;a.setStyle(f,"display","none");a.setStyle(l,"display","none");if(g.useIFrame){a.setStyle(f.parentNode.nextSibling,"display","none")}try{if(g.useIFrame){l.parentNode.removeChild(l.nextSibling)}l.parentNode.removeChild(l)}catch(k){}}else{a.setStyle(f,"display","none");try{f.parentNode.removeChild(f)}catch(k){}}};return h}};(function(){var e=YAHOO.util,c=e.Dom,b=e.Event,d=e.Lang;var a=function(f){return f.replace(/<\/?[^>]+>/gi,"")};TB.widget.Slide=function(f,g){this.init(f,g)};TB.widget.Slide.defConfig={slidesClass:"Slides",triggersClass:"SlideTriggers",currentClass:"Current",eventType:"click",autoPlayTimeout:5,disableAutoPlay:false};TB.widget.Slide.prototype={init:function(f,g){this.container=c.get(f);this.config=d.merge(TB.widget.Slide.defConfig,g||{});try{this.slidesUL=c.getElementsByClassName(this.config.slidesClass,"ul",this.container)[0];if(!this.slidesUL){this.slidesUL=c.getFirstChild(this.container,function(i){return i.tagName.toLowerCase==="ul"})}this.slides=c.getChildren(this.slidesUL);if(this.slides.length==0){throw new Error()}}catch(h){throw new Error("can't find slides!")}this.delayTimeId=null;this.autoPlayTimeId=null;this.curSlide=-1;this.sliding=false;this.pause=false;this.onSlide=new e.CustomEvent("onSlide",this,false,e.CustomEvent.FLAT);if(d.isFunction(this.config.onSlide)){this.onSlide.subscribe(this.config.onSlide,this,true)}this.beforeSlide=new e.CustomEvent("beforeSlide",this,false,e.CustomEvent.FLAT);if(d.isFunction(this.config.beforeSlide)){this.beforeSlide.subscribe(this.config.beforeSlide,this,true)}c.addClass(this.container,"tb-slide");c.addClass(this.slidesUL,"tb-slide-list");c.setStyle(this.slidesUL,"height",(this.config.slideHeight||this.container.offsetHeight)+"px");this.initSlides();this.initTriggers();if(this.slides.length>0){this.play(1)}if(!this.config.disableAutoPlay){this.autoPlay()}if(d.isFunction(this.config.onInit)){this.config.onInit.call(this)}},initTriggers:function(){var h=document.createElement("ul");this.container.appendChild(h);for(var g=0;g<this.slides.length;g++){var f=document.createElement("li");f.innerHTML=g+1;h.appendChild(f)}c.addClass(h,this.config.triggersClass);this.triggersUL=h;if(this.config.eventType=="mouse"){b.on(this.triggersUL,"mouseover",this.mouseHandler,this,true);b.on(this.triggersUL,"mouseout",function(i){clearTimeout(this.delayTimeId);this.pause=false},this,true)}else{b.on(this.triggersUL,"click",this.clickHandler,this,true)}},initSlides:function(){b.on(this.slides,"mouseover",function(){this.pause=true},this,true);b.on(this.slides,"mouseout",function(){this.pause=false},this,true);c.setStyle(this.slides,"display","none")},clickHandler:function(h){var g=b.getTarget(h);var f=parseInt(a(g.innerHTML));while(g!=this.container){if(g.nodeName.toUpperCase()=="LI"){if(!this.sliding){this.play(f,true)}break}else{g=g.parentNode}}},mouseHandler:function(i){var h=b.getTarget(i);var f=parseInt(a(h.innerHTML));while(h!=this.container){if(h.nodeName.toUpperCase()=="LI"){var g=this;this.delayTimeId=setTimeout(function(){g.play(f,true);g.pause=true},(g.sliding?0.5:0.1)*1000);break}else{h=h.parentNode}}},play:function(i,g){i=i-1;if(i==this.curSlide){return}var f=this.curSlide>=0?this.curSlide:0;if(g&&this.autoPlayTimeId){clearInterval(this.autoPlayTimeId)}var h=this.triggersUL.getElementsByTagName("li");h[f].className="";h[i].className=this.config.currentClass;this.beforeSlide.fire(i);this.slide(i);this.curSlide=i;if(g&&!this.config.disableAutoPlay){this.autoPlay()}},slide:function(g){var f=this.curSlide>=0?this.curSlide:0;this.sliding=true;c.setStyle(this.slides[f],"display","none");c.setStyle(this.slides[g],"display","block");this.sliding=false;this.onSlide.fire(g)},autoPlay:function(){var f=this;var g=function(){if(!f.pause&&!f.sliding){var h=(f.curSlide+1)%f.slides.length+1;f.play(h,false)}};this.autoPlayTimeId=setInterval(g,this.config.autoPlayTimeout*1000)}};TB.widget.ScrollSlide=function(f,g){this.init(f,g)};YAHOO.extend(TB.widget.ScrollSlide,TB.widget.Slide,{initSlides:function(){TB.widget.ScrollSlide.superclass.initSlides.call(this);c.setStyle(this.slides,"display","")},slide:function(i){var f=this.curSlide>=0?this.curSlide:0;var g={scroll:{by:[0,this.slidesUL.offsetHeight*(i-f)]}};var h=new e.Scroll(this.slidesUL,g,0.5,e.Easing.easeOutStrong);h.onComplete.subscribe(function(){this.sliding=false;this.onSlide.fire(i)},this,true);h.animate();this.sliding=true}});TB.widget.FadeSlide=function(f,g){this.init(f,g)};YAHOO.extend(TB.widget.FadeSlide,TB.widget.Slide,{initSlides:function(){TB.widget.FadeSlide.superclass.initSlides.call(this);c.setStyle(this.slides,"position","absolute");c.setStyle(this.slides,"top",this.config.slideOffsetY||0);c.setStyle(this.slides,"left",this.config.slideOffsetX||0);c.setStyle(this.slides,"z-index",1)},slide:function(h){if(this.curSlide==-1){c.setStyle(this.slides[h],"display","block");this.onSlide.fire(h)}else{var f=this.slides[this.curSlide];c.setStyle(f,"display","block");c.setStyle(f,"z-index",10);var g=new e.Anim(f,{opacity:{to:0}},0.5,e.Easing.easeNone);g.onComplete.subscribe(function(){c.setStyle(f,"z-index",1);c.setStyle(f,"display","none");c.setStyle(f,"opacity",1);this.sliding=false;this.onSlide.fire(h)},this,true);c.setStyle(this.slides[h],"display","block");g.animate();this.sliding=true}}})})();TB.widget.SimpleSlide=new function(){this.decorate=function(a,b){if(!a){return}b=b||{};if(b.effect=="scroll"){if(YAHOO.env.ua.gecko){if(YAHOO.util.Dom.get(a).getElementsByTagName("iframe").length>0){return new TB.widget.Slide(a,b)}}return new TB.widget.ScrollSlide(a,b)}else{if(b.effect=="fade"){return new TB.widget.FadeSlide(a,b)}else{return new TB.widget.Slide(a,b)}}}};TB.widget.SimpleTab=new function(){var e=YAHOO.util,b=e.Dom,a=e.Event,d=e.Lang;var c={eventType:"click",currentClass:"Current",tabClass:"",tabPanelClass:"",autoSwitchToFirst:true,stopEvent:true,delay:0.1};this.decorate=function(f,i){f=b.get(f);i=d.merge(c,i||{});var m={},h,o,g,k,q;h=b.getFirstChild(f);g=h.getElementsByTagName("li");if(i.tabClass){k=b.getElementsByClassName(i.tabClass,"*",f)}else{k=Array.copy(h.getElementsByTagName("a"))}if(i.tabPanelClass){o=b.getElementsByClassName(i.tabPanelClass,"*",f)}else{o=b.getChildren(f).slice(1)}var r=new e.CustomEvent("onSwitch",null,false,e.CustomEvent.FLAT);if(i.onSwitch){r.subscribe(i.onSwitch)}var l=function(t){if(q){p()}var s=k.indexOf(this);m.switchTab(s);if(i.stopEvent){try{a.preventDefault(t)}catch(u){}}return !i.stopEvent};var j=function(s){var t=this;q=setTimeout(function(){l.call(t,s)},i.delay*1000);if(i.stopEvent){a.preventDefault(s)}return !i.stopEvent};var p=function(){clearTimeout(q)};if(i.eventType=="mouse"){a.on(k,"focus",l);a.on(k,"mouseover",i.delay?j:l);a.on(k,"mouseout",p)}a.on(k,"click",l);d.augmentObject(m,{switchTab:function(s){b.setStyle(o,"display","none");b.removeClass(g,i.currentClass);b.addClass(g[s],i.currentClass);b.setStyle(o[s],"display","block");r.fire(s)},subscribeOnSwitch:function(s){r.subscribe(s)}},true);m.onSwitch=m.subscribeOnSwitch;b.setStyle(o,"display","none");if(i.autoSwitchToFirst){m.switchTab(0)}return m}};TB.widget.SimplePopup=new function(){var b=YAHOO.util,d=b.Dom,j=b.Event,f=b.Lang;var h={position:"right",align:"top",autoFit:true,eventType:"mouse",delay:0.1,disableClick:true,width:200,height:200};var i=function(k){var l=j.getTarget(k);if(i._target==l){this.popup.style.display=="block"?this.hide():this.show()}else{this.show()}j.preventDefault(k);i._target=l};var a=function(l){clearTimeout(this._popupHideTimeId);var k=this;this._popupShowTimeId=setTimeout(function(){k.show()},this.config.delay*1000);if(this.config.disableClick&&!this.trigger.onclick){this.trigger.onclick=function(m){j.preventDefault(j.getEvent(m))}}};var g=function(k){clearTimeout(this._popupShowTimeId);var l=j.getRelatedTarget(k);if(this.popup!=l&&!d.isAncestor(this.popup,l)){this.delayHide()}j.preventDefault(k)};var e=function(m){var o=this.currentHandle?this.currentHandle:this;if(this._handles){for(var l=0,k=this._handles;l<k.length;++l){clearTimeout(k[l]._popupHideTimeId)}}else{clearTimeout(o._popupHideTimeId)}};var c=function(k){var l=this.currentHandle?this.currentHandle:this,m=j.getRelatedTarget(k);if(l.popup!=m&&!d.isAncestor(l.popup,m)){l.delayHide()}};this.decorate=function(m,k,o){if(f.isArray(m)||(f.isObject(m)&&m.length)){o.shareSinglePopup=true;var q={};q._handles=[];for(var p=0;p<m.length;p++){var r=this.decorate(m[p],k,o);r._beforeShow=function(){q.currentHandle=this;return true};q._handles[p]=r}if(o.eventType=="mouse"){j.on(k,"mouseover",e,q,true);j.on(k,"mouseout",c,q,true)}return q}m=d.get(m);k=d.get(k);if(!m||!k){return}o=f.merge(h,o||{});var t={};t._popupShowTimeId=null;t._popupHideTimeId=null;t._beforeShow=function(){return true};var l=new b.CustomEvent("onShow",t,false,b.CustomEvent.FLAT);if(o.onShow){l.subscribe(o.onShow)}var s=new b.CustomEvent("onHide",t,false,b.CustomEvent.FLAT);if(o.onHide){s.subscribe(o.onHide)}if(o.eventType=="mouse"){j.on(m,"mouseover",a,t,true);j.on(m,"mouseout",g,t,true);if(!o.shareSinglePopup){j.on(k,"mouseover",e,t,true);j.on(k,"mouseout",c,t,true)}}else{if(o.eventType=="click"){j.on(m,"click",i,t,true)}}f.augmentObject(t,{popup:k,trigger:m,config:o,show:function(){if(!this._beforeShow()){return}var C=d.getXY(this.trigger);if(f.isArray(this.config.offset)){C[0]+=parseInt(this.config.offset[0]);C[1]+=parseInt(this.config.offset[1])}var z=this.trigger.offsetWidth,v=this.trigger.offsetHeight,D=o.width,A=o.height,u=d.getViewportWidth(),B=d.getViewportHeight(),x=d.getDocumentScrollLeft(),F=d.getDocumentScrollTop(),w=C[0],E=C[1];if(o.position=="left"){w=C[0]-D;E=(o.align=="center")?(E-A/2+v/2):(o.align=="bottom")?(E+v-A):E}else{if(o.position=="right"){w=C[0]+z;E=(o.align=="center")?(E-A/2+v/2):(o.align=="bottom")?(E+v-A):E}else{if(o.position=="bottom"){E=E+v;w=(o.align=="center")?(w+z/2-D/2):(o.align=="right")?(w+z-D):w}else{if(o.position=="top"){E=E-A;w=(o.align=="center")?(w+z/2-D/2):(o.align=="right")?(w+z-D):w}}}}if(E<0){E=0}if(w<0){w=0}if(this.config.autoFit){if(E-F+A>B){E=B-A+F-2;if(E<0){E=0}}}this.popup.style.position="absolute";this.popup.style.top=E+"px";this.popup.style.left=w+"px";if(this.config.effect){if(this.config.effect=="fade"){d.setStyle(this.popup,"opacity",0);this.popup.style.display="block";var y=new b.Anim(this.popup,{opacity:{to:1}},0.4);y.animate()}}else{this.popup.style.display="block"}l.fire()},hide:function(){d.setStyle(this.popup,"display","none");s.fire()},delayHide:function(){var u=this;this._popupHideTimeId=setTimeout(function(){u.hide()},this.config.delay*1000)}},true);d.setStyle(k,"display","none");return t}};var TB=TB||{};(function(){var h=YAHOO.util,e=h.Dom,b=h.Event,f=YAHOO.lang;var d=document.getElementsByTagName("head")[0];var g=YAHOO.env.ua.ie,c=(g===6);var a={containerClassName:"suggest-container",containerWidth:"auto",keyElClassName:"suggest-key",resultElClassName:"suggest-result",resultFormat:"\u7ea6%result%\u6761\u7ed3\u679c",selectedItemClassName:"selected",bottomClassName:"suggest-bottom",showCloseBtn:false,closeBtnText:"\u5173\u95ed",closeBtnClassName:"suggest-close-btn",useShim:c,shimClassName:"suggest-shim",styleElId:"J_SuggestStyle",timerDelay:200,autoFocus:false,submitFormOnClickSelect:true};TB.Suggest=function(j,k,i){this.textInput=e.get(j);this.dataSource=k;this.JSONDataSource=f.isObject(k)?k:null;this.returnedData=null;this.config=f.merge(a,i||{});this.container=null;this.query="";this.queryParams="";this._timer=null;this._isRunning=false;this.dataScript=null;this._dataCache={};this._latestScriptTime="";this._scriptDataIsOut=false;this._onKeyboardSelecting=false;this.selectedItem=null;this._init()};TB.Suggest.prototype={_init:function(){this._initTextInput();this._initContainer();if(this.config.useShim){this._initShim()}this._initStyle();this.createEvent("beforeDataRequest");this.createEvent("onDataReturn");this.createEvent("beforeShow");this.createEvent("onItemSelect");this._initResizeEvent()},_initTextInput:function(){var i=this;this.textInput.setAttribute("autocomplete","off");b.on(this.textInput,"focus",function(){i.start()});b.on(this.textInput,"blur",function(){i.stop();i.hide()});if(this.config.autoFocus){this.textInput.focus()}var j=0;b.on(this.textInput,"keydown",function(k){var l=k.charCode||k.keyCode;switch(l){case 27:i.hide();i.textInput.value=i.query;break;case 13:i.textInput.blur();if(i._onKeyboardSelecting){if(i.textInput.value==i._getSelectedItemKey()){i.fireEvent("onItemSelect",i.textInput.value)}}i._submitForm();break;case 40:case 38:if(j++==0){if(i._isRunning){i.stop()}i._onKeyboardSelecting=true;i.selectItem(l==40)}else{if(j==3){j=0}}break}if(l!=40&&l!=38){if(!i._isRunning){i.start()}i._onKeyboardSelecting=false}});b.on(this.textInput,"keyup",function(){j=0})},_initContainer:function(){var i=document.createElement("div");i.className=this.config.containerClassName;i.style.position="absolute";i.style.visibility="hidden";this.container=i;this._setContainerRegion();this._initContainerEvent();document.body.insertBefore(i,document.body.firstChild)},_setContainerRegion:function(){var k=e.getRegion(this.textInput);var l=k.left,i=k.right-l-2;var j=document.documentMode;if(j===7&&(g===7||g===8)){l-=2}else{if(YAHOO.env.ua.gecko){l++}}this.container.style.left=l+"px";this.container.style.top=k.bottom+"px";if(this.config.containerWidth=="auto"){this.container.style.width=i+"px"}else{this.container.style.width=this.config.containerWidth}},_initContainerEvent:function(){var i=this;b.on(this.container,"mousemove",function(k){var l=b.getTarget(k);if(l.nodeName!="LI"){l=e.getAncestorByTagName(l,"li")}if(e.isAncestor(i.container,l)){if(l!=i.selectedItem){i._removeSelectedItem();i._setSelectedItem(l)}}});var j=null;this.container.onmousedown=function(k){k=k||window.event;j=k.target||k.srcElement;i.textInput.onbeforedeactivate=function(){window.event.returnValue=false;i.textInput.onbeforedeactivate=null};return false};b.on(this.container,"mouseup",function(k){if(!i._isInContainer(b.getXY(k))){return}var l=b.getTarget(k);if(l!=j){return}if(l.className==i.config.closeBtnClassName){i.hide();return}if(l.nodeName!="LI"){l=e.getAncestorByTagName(l,"li")}if(e.isAncestor(i.container,l)){i._updateInputFromSelectItem(l);i.fireEvent("onItemSelect",i.textInput.value);i.textInput.blur();i._submitForm()}})},_submitForm:function(){if(this.config.submitFormOnClickSelect){var j=this.textInput.form;if(!j){return}if(document.createEvent){var i=document.createEvent("MouseEvents");i.initEvent("submit",true,false);j.dispatchEvent(i)}else{if(document.createEventObject){j.fireEvent("onsubmit")}}j.submit()}},_isInContainer:function(j){var i=e.getRegion(this.container);return j[0]>=i.left&&j[0]<=i.right&&j[1]>=i.top&&j[1]<=i.bottom},_initShim:function(){var i=document.createElement("iframe");i.src="about:blank";i.className=this.config.shimClassName;i.style.position="absolute";i.style.visibility="hidden";i.style.border="none";this.container.shim=i;this._setShimRegion();document.body.insertBefore(i,document.body.firstChild)},_setShimRegion:function(){var i=this.container,j=i.shim;if(j){j.style.left=(parseInt(i.style.left)-2)+"px";j.style.top=i.style.top;j.style.width=(parseInt(i.style.width)+2)+"px"}},_initStyle:function(){var j=document.getElementById(this.config.styleElId);if(j){return}var i=".suggest-container{background:white;border:1px solid #91A8B4;z-index:100001}";i+=".suggest-shim{z-index:100000}";i+=".suggest-container li{color:#404040;padding:1px 0 2px;font-size:12px;line-height:18px;float:left;width:100%}";i+=".suggest-container li.selected{background-color:#D5E2FF;cursor:default}";i+=".suggest-key{float:left;text-align:left;padding-left:5px}";i+=".suggest-result{float:right;text-align:right;padding-right:5px;color:green}";i+=".suggest-container li.selected span{color:#240055;cursor:default}";i+=".suggest-container li.selected .suggest-result{color:green}";i+=".suggest-bottom{padding:0 5px 5px}";i+=".suggest-close-btn{float:right}";i+=".suggest-container li,.suggest-bottom{overflow:hidden;zoom:1;clear:both}";i+=".suggest-container{*margin-left:2px;_margin-left:-2px;_margin-top:-3px}";j=document.createElement("style");j.id=this.config.styleElId;j.type="text/css";d.appendChild(j);if(j.styleSheet){j.styleSheet.cssText=i}else{j.appendChild(document.createTextNode(i))}},_initResizeEvent:function(){var j=this,i;b.on(window,"resize",function(){if(i){clearTimeout(i)}i=setTimeout(function(){j._setContainerRegion();j._setShimRegion()},50)})},start:function(){TB.Suggest.focusInstance=this;var i=this;i._timer=setTimeout(function(){i.updateData();i._timer=setTimeout(arguments.callee,i.config.timerDelay)},i.config.timerDelay);this._isRunning=true},stop:function(){TB.Suggest.focusInstance=null;clearTimeout(this._timer);this._isRunning=false},show:function(){if(this.isVisible()){return}var i=this.container,k=i.shim;i.style.visibility="";if(k){if(!k.style.height){var j=e.getRegion(i);k.style.height=(j.bottom-j.top-2)+"px"}k.style.visibility=""}},hide:function(){if(!this.isVisible()){return}var i=this.container,j=i.shim;if(j){j.style.visibility="hidden"}i.style.visibility="hidden"},isVisible:function(){return this.container.style.visibility!="hidden"},updateData:function(){if(!this._needUpdate()){return}this._updateQueryValueFromInput();var i=this.query;if(!f.trim(i).length){this._fillContainer("");this.hide();return}if(typeof this._dataCache[i]!="undefined"){this.returnedData="using cache";this._fillContainer(this._dataCache[i]);this._displayContainer()}else{if(this.JSONDataSource){this.handleResponse(this.JSONDataSource[i])}else{this.requestData()}}},_needUpdate:function(){return this.textInput.value!=this.query},requestData:function(){if(!g){this.dataScript=null}if(!this.dataScript){var i=document.createElement("script");i.type="text/javascript";i.charset="utf-8";d.insertBefore(i,d.firstChild);this.dataScript=i;if(!g){var j=new Date().getTime();this._latestScriptTime=j;i.setAttribute("time",j);b.on(i,"load",function(){this._scriptDataIsOut=i.getAttribute("time")!=this._latestScriptTime},this,true)}}this.queryParams="q="+encodeURIComponent(this.query)+"&code=utf-8&callback=TB.Suggest.callback";this.fireEvent("beforeDataRequest",this.query);this.dataScript.src=this.dataSource+"?"+this.queryParams},handleResponse:function(q){if(this._scriptDataIsOut){return}this.returnedData=q;this.fireEvent("onDataReturn",q);this.returnedData=this.formatData(this.returnedData);var o="";var l=this.returnedData.length;if(l>0){var p=document.createElement("ol");for(var m=0;m<l;++m){var k=this.returnedData[m];var j=this.formatItem(k.key,k.result);j.setAttribute("key",k.key);p.appendChild(j)}o=p}this._fillContainer(o);if(l>0){this.appendBottom()}if(f.trim(this.container.innerHTML)){this.fireEvent("beforeShow",this.container)}this._dataCache[this.query]=this.container.innerHTML;this._displayContainer()},formatData:function(o){var k=[];if(!o){return k}if(f.isArray(o.result)){o=o.result}var j=o.length;if(!j){return k}var m;for(var l=0;l<j;++l){m=o[l];if(f.isString(m)){k[l]={key:m}}else{if(f.isArray(m)&&m.length==2){k[l]={key:m[0],result:m[1]}}else{k[l]=m}}}return k},formatItem:function(k,j){var i=document.createElement("li");var m=document.createElement("span");m.className=this.config.keyElClassName;m.appendChild(document.createTextNode(k));i.appendChild(m);if(typeof j!="undefined"){var l=this.config.resultFormat.replace("%result%",j);if(f.trim(l)){var o=document.createElement("span");o.className=this.config.resultElClassName;o.appendChild(document.createTextNode(l));i.appendChild(o)}}return i},appendBottom:function(){var i=document.createElement("div");i.className=this.config.bottomClassName;if(this.config.showCloseBtn){var j=document.createElement("a");j.href="javascript: void(0)";j.setAttribute("target","_self");j.className=this.config.closeBtnClassName;j.appendChild(document.createTextNode(this.config.closeBtnText));i.appendChild(j)}if(f.trim(i.innerHTML)){this.container.appendChild(i)}},_fillContainer:function(i){if(i.nodeType==1){this.container.innerHTML="";this.container.appendChild(i)}else{this.container.innerHTML=i}this.selectedItem=null},_displayContainer:function(){if(f.trim(this.container.innerHTML)){this.show()}else{this.hide()}},selectItem:function(k){var j=this.container.getElementsByTagName("li");if(j.length==0){return}if(!this.isVisible()){this.show()}var i;if(!this.selectedItem){i=j[k?0:j.length-1]}else{i=e[k?"getNextSibling":"getPreviousSibling"](this.selectedItem);if(!i){this.textInput.value=this.query}}this._removeSelectedItem();if(i){this._setSelectedItem(i);this._updateInputFromSelectItem()}},_removeSelectedItem:function(){e.removeClass(this.selectedItem,this.config.selectedItemClassName);this.selectedItem=null},_setSelectedItem:function(i){e.addClass((i),this.config.selectedItemClassName);this.selectedItem=(i)},_getSelectedItemKey:function(){if(!this.selectedItem){return""}return this.selectedItem.getAttribute("key")},_updateQueryValueFromInput:function(){this.query=this.textInput.value},_updateInputFromSelectItem:function(){this.textInput.value=this._getSelectedItemKey(this.selectedItem)}};f.augmentProto(TB.Suggest,h.EventProvider);TB.Suggest.focusInstance=null;TB.Suggest.callback=function(i){if(!TB.Suggest.focusInstance){return}setTimeout(function(){TB.Suggest.focusInstance.handleResponse(i)},0)}})();
