if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var s=arguments,K=null,T,b,h;for(T=0;T<s.length;T=T+1){h=s[T].split(".");K=YAHOO;for(b=(h[0]=="YAHOO")?1:0;b<h.length;b=b+1){K[h[b]]=K[h[b]]||{};K=K[h[b]];}}return K;};YAHOO.log=function(h,s,T){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(h,s,T);}else{return false;}};YAHOO.register=function(s,t,K){var J=YAHOO.env.modules;if(!J[s]){J[s]={versions:[],builds:[]};}var T=J[s],a=K.version,o=K.build,z=YAHOO.env.listeners;T.name=s;T.version=a;T.build=o;T.versions.push(a);T.builds.push(o);T.mainClass=t;for(var h=0;h<z.length;h=h+1){z[h](T);}if(t){t.VERSION=a;t.BUILD=o;}else{YAHOO.log("mainClass is undefined for module "+s,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(s){return YAHOO.env.modules[s]||null;};YAHOO.env.ua=function(){var T={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var b=navigator.userAgent,s;if((/KHTML/).test(b)){T.webkit=1;}s=b.match(/AppleWebKit\/([^\s]*)/);if(s&&s[1]){T.webkit=parseFloat(s[1]);if(/ Mobile\//.test(b)){T.mobile="Apple";}else{s=b.match(/NokiaN[^\/]*/);if(s){T.mobile=s[0];}}s=b.match(/AdobeAIR\/([^\s]*)/);if(s){T.air=s[0];}}if(!T.webkit){s=b.match(/Opera[\s\/]([^\s]*)/);if(s&&s[1]){T.opera=parseFloat(s[1]);s=b.match(/Opera Mini[^;]*/);if(s){T.mobile=s[0];}}else{s=b.match(/MSIE\s([^;]*)/);if(s&&s[1]){T.ie=parseFloat(s[1]);}else{s=b.match(/Gecko\/([^\s]*)/);if(s){T.gecko=1;s=b.match(/rv:([^\s\)]*)/);if(s&&s[1]){T.gecko=parseFloat(s[1]);}}}}}return T;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,s=YAHOO.env.listeners,h=true,T;if(b){for(T=0;T<s.length;T=T+1){if(s[T]==b){h=false;break;}}if(h){s.push(b);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(b){if(b){var s=YAHOO.lang;return s.isNumber(b.length)&&s.isFunction(b.splice);}return false;},isBoolean:function(s){return typeof s==="boolean";},isFunction:function(s){return typeof s==="function";},isNull:function(s){return s===null;},isNumber:function(s){return typeof s==="number"&&isFinite(s);},isObject:function(s){return (s&&(typeof s==="object"||YAHOO.lang.isFunction(s)))||false;},isString:function(s){return typeof s==="string";},isUndefined:function(s){return typeof s==="undefined";},hasOwnProperty:function(s,b){if(Object.prototype.hasOwnProperty){return s.hasOwnProperty(b);}return !YAHOO.lang.isUndefined(s[b])&&s.constructor.prototype[b]!==s[b];},_IEEnumFix:function(h,T){if(YAHOO.env.ua.ie){var t=["toString","valueOf"],b;for(b=0;b<t.length;b=b+1){var z=t[b],K=T[z];if(YAHOO.lang.isFunction(K)&&K!=Object.prototype[z]){h[z]=K;}}}},extend:function(h,K,T){if(!K||!h){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}var b=function(){};b.prototype=K.prototype;h.prototype=new b();h.prototype.constructor=h;h.superclass=K.prototype;if(K.prototype.constructor==Object.prototype.constructor){K.prototype.constructor=K;}if(T){for(var s in T){h.prototype[s]=T[s];}YAHOO.lang._IEEnumFix(h.prototype,T);}},augmentObject:function(t,K){if(!K||!t){throw new Error("Absorb failed, verify dependencies.");}var b=arguments,h,z,T=b[2];if(T&&T!==true){for(h=2;h<b.length;h=h+1){t[b[h]]=K[b[h]];}}else{for(z in K){if(T||!t[z]){t[z]=K[z];}}YAHOO.lang._IEEnumFix(t,K);}},augmentProto:function(K,h){if(!h||!K){throw new Error("Augment failed, verify dependencies.");}var b=[K.prototype,h.prototype];for(var T=2;T<arguments.length;T=T+1){b.push(arguments[T]);}YAHOO.lang.augmentObject.apply(this,b);},dump:function(b,a){var h=YAHOO.lang,K,z,C=[],e="{...}",T="f(){...}",J=", ",t=" => ";if(!h.isObject(b)){return b+"";}else{if(b instanceof Date||("nodeType" in b&&"tagName" in b)){return b;}else{if(h.isFunction(b)){return T;}}}a=(h.isNumber(a))?a:3;if(h.isArray(b)){C.push("[");for(K=0,z=b.length;K<z;K=K+1){if(h.isObject(b[K])){C.push((a>0)?h.dump(b[K],a-1):e);}else{C.push(b[K]);}C.push(J);}if(C.length>1){C.pop();}C.push("]");}else{C.push("{");for(K in b){if(h.hasOwnProperty(b,K)){C.push(K+t);if(h.isObject(b[K])){C.push((a>0)?h.dump(b[K],a-1):e);}else{C.push(b[K]);}C.push(J);}}if(C.length>1){C.pop();}C.push("}");}return C.join("");},substitute:function(S,T,e){var a,z,t,O,M,q,K=YAHOO.lang,B=[],h,J="dump",F=" ",b="{",y="}";for(;;){a=S.lastIndexOf(b);if(a<0){break;}z=S.indexOf(y,a);if(a+1>=z){break;}h=S.substring(a+1,z);O=h;q=null;t=O.indexOf(F);if(t>-1){q=O.substring(t+1);O=O.substring(0,t);}M=T[O];if(e){M=e(O,M,q);}if(K.isObject(M)){if(K.isArray(M)){M=K.dump(M,parseInt(q,10));}else{q=q||"";var C=q.indexOf(J);if(C>-1){q=q.substring(4);}if(M.toString===Object.prototype.toString||C>-1){M=K.dump(M,parseInt(q,10));}else{M=M.toString();}}}else{if(!K.isString(M)&&!K.isNumber(M)){M="~-"+B.length+"-~";B[B.length]=h;}}S=S.substring(0,a)+M+S.substring(z+1);}for(a=B.length-1;a>=0;a=a-1){S=S.replace(new RegExp("~-"+a+"-~"),"{"+B[a]+"}","g");}return S;},trim:function(b){try{return b.replace(/^\s+|\s+$/g,"");}catch(T){return b;}},merge:function(){var h={},b=arguments;for(var T=0,s=b.length;T<s;T=T+1){YAHOO.lang.augmentObject(h,b[T],true);}return h;},later:function(a,b,J,h,K){a=a||0;b=b||{};var T=J,z=h,t,s;if(YAHOO.lang.isString(J)){T=b[J];}if(!T){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(z)){z=[h];}t=function(){T.apply(b,z);};s=(K)?setInterval(t,a):setTimeout(t,a);return {interval:K,cancel:function(){if(this.interval){clearInterval(s);}else{clearTimeout(s);}}};},isValue:function(b){var s=YAHOO.lang;return (s.isObject(b)||s.isString(b)||s.isNumber(b)||s.isBoolean(b));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.5.1",build:"984"});YAHOO.util.CustomEvent=function(k,C,U,V){this.type=k;this.scope=C||window;this.silent=U;this.signature=V||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var x="_YUICEOnSubscribe";if(k!==x){this.subscribeEvent=new YAHOO.util.CustomEvent(x,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(C,U,V){if(!C){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(C,U,V);}this.subscribers.push(new YAHOO.util.Subscriber(C,U,V));},unsubscribe:function(k,L){if(!k){return this.unsubscribeAll();}var x=false;for(var C=0,V=this.subscribers.length;C<V;++C){var U=this.subscribers[C];if(U&&U.contains(k,L)){this._delete(C);x=true;}}return x;},fire:function(){var k=this.subscribers.length;if(!k&&this.silent){return true;}var a=[].slice.call(arguments,0),L=true,U,W=false;if(!this.silent){}var C=this.subscribers.slice();for(U=0;U<k;++U){var d=C[U];if(!d){W=true;}else{if(!this.silent){}var N=d.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var V=null;if(a.length>0){V=a[0];}try{L=d.fn.call(N,V,d.obj);}catch(x){this.lastError=x;}}else{try{L=d.fn.call(N,this.type,a,d.obj);}catch(p){this.lastError=p;}}if(false===L){if(!this.silent){}return false;}}}return true;},unsubscribeAll:function(){for(var V=this.subscribers.length-1;V>-1;V--){this._delete(V);}this.subscribers=[];return V;},_delete:function(V){var C=this.subscribers[V];if(C){delete C.fn;delete C.obj;}this.subscribers.splice(V,1);},toString:function(){return "CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(C,U,V){this.fn=C;this.obj=YAHOO.lang.isUndefined(U)?null:U;this.override=V;};YAHOO.util.Subscriber.prototype.getScope=function(V){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return V;};YAHOO.util.Subscriber.prototype.contains=function(V,C){if(C){return (this.fn==V&&this.obj==C);}else{return (this.fn==V);}};YAHOO.util.Subscriber.prototype.toString=function(){return "Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var a=false;var W=[];var N=[];var p=[];var x=[];var U=0;var L=[];var C=[];var V=0;var k={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};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,startInterval:function(){if(!this._interval){var d=this;var I=function(){d._tryPreloadAttach();};this._interval=setInterval(I,this.POLL_INTERVAL);}},onAvailable:function(b,D,B,J,w){var d=(YAHOO.lang.isString(b))?[b]:b;for(var I=0;I<d.length;I=I+1){L.push({id:d[I],fn:D,obj:B,override:J,checkReady:w});}U=this.POLL_RETRYS;this.startInterval();},onContentReady:function(D,d,w,I){this.onAvailable(D,d,w,I,true);},onDOMReady:function(d,D,I){if(this.DOMReady){setTimeout(function(){var w=window;if(I){if(I===true){w=D;}else{w=I;}}d.call(w,"DOMReady",[],D);},0);}else{this.DOMReadyEvent.subscribe(d,D,I);}},addListener:function(D,d,E,B,I){if(!E||!E.call){return false;}if(this._isValidCollection(D)){var y=true;for(var t=0,A=D.length;t<A;++t){y=this.on(D[t],d,E,B,I)&&y;}return y;}else{if(YAHOO.lang.isString(D)){var b=this.getEl(D);if(b){D=b;}else{this.onAvailable(D,function(){YAHOO.util.Event.on(D,d,E,B,I);});return true;}}}if(!D){return false;}if("unload"==d&&B!==this){N[N.length]=[D,d,E,B,I];return true;}var Y=D;if(I){if(I===true){Y=B;}else{Y=I;}}var w=function(X){return E.call(Y,YAHOO.util.Event.getEvent(X,D),B);};var F=[D,d,E,w,Y,B,I];var q=W.length;W[q]=F;if(this.useLegacyEvent(D,d)){var J=this.getLegacyIndex(D,d);if(J==-1||D!=p[J][0]){J=p.length;C[D.id+d]=J;p[J]=[D,d,D["on"+d]];x[J]=[];D["on"+d]=function(X){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(X),J);};}x[J].push(F);}else{try{this._simpleAdd(D,d,w,false);}catch(g){this.lastError=g;this.removeListener(D,d,E);return false;}}return true;},fireLegacyEvent:function(J,D){var B=true,d,q,t,A,b;q=x[D].slice();for(var I=0,w=q.length;I<w;++I){t=q[I];if(t&&t[this.WFN]){A=t[this.ADJ_SCOPE];b=t[this.WFN].call(A,J);B=(B&&b);}}d=p[D];if(d&&d[2]){d[2](J);}return B;},getLegacyIndex:function(I,D){var d=this.generateId(I)+D;if(typeof C[d]=="undefined"){return -1;}else{return C[d];}},useLegacyEvent:function(I,D){if(this.webkit&&("click"==D||"dblclick"==D)){var d=parseInt(this.webkit,10);if(!isNaN(d)&&d<418){return true;}}return false;},removeListener:function(I,d,A){var J,t,E;if(typeof I=="string"){I=this.getEl(I);}else{if(this._isValidCollection(I)){var g=true;for(J=I.length-1;J>-1;J--){g=(this.removeListener(I[J],d,A)&&g);}return g;}}if(!A||!A.call){return this.purgeElement(I,false,d);}if("unload"==d){for(J=N.length-1;J>-1;J--){E=N[J];if(E&&E[0]==I&&E[1]==d&&E[2]==A){N.splice(J,1);return true;}}return false;}var b=null;var B=arguments[3];if("undefined"===typeof B){B=this._getCacheIndex(I,d,A);}if(B>=0){b=W[B];}if(!I||!b){return false;}if(this.useLegacyEvent(I,d)){var w=this.getLegacyIndex(I,d);var D=x[w];if(D){for(J=0,t=D.length;J<t;++J){E=D[J];if(E&&E[this.EL]==I&&E[this.TYPE]==d&&E[this.FN]==A){D.splice(J,1);break;}}}}else{try{this._simpleRemove(I,d,b[this.WFN],false);}catch(q){this.lastError=q;return false;}}delete W[B][this.WFN];delete W[B][this.FN];W.splice(B,1);return true;},getTarget:function(D,I){var d=D.target||D.srcElement;return this.resolveTextNode(d);},resolveTextNode:function(I){try{if(I&&3==I.nodeType){return I.parentNode;}}catch(d){}return I;},getPageX:function(I){var d=I.pageX;if(!d&&0!==d){d=I.clientX||0;if(this.isIE){d+=this._getScrollLeft();}}return d;},getPageY:function(d){var I=d.pageY;if(!I&&0!==I){I=d.clientY||0;if(this.isIE){I+=this._getScrollTop();}}return I;},getXY:function(d){return [this.getPageX(d),this.getPageY(d)];},getRelatedTarget:function(I){var d=I.relatedTarget;if(!d){if(I.type=="mouseout"){d=I.toElement;}else{if(I.type=="mouseover"){d=I.fromElement;}}}return this.resolveTextNode(d);},getTime:function(D){if(!D.time){var I=new Date().getTime();try{D.time=I;}catch(d){this.lastError=d;return I;}}return D.time;},stopEvent:function(d){this.stopPropagation(d);this.preventDefault(d);},stopPropagation:function(d){if(d.stopPropagation){d.stopPropagation();}else{d.cancelBubble=true;}},preventDefault:function(d){if(d.preventDefault){d.preventDefault();}else{d.returnValue=false;}},getEvent:function(D,d){var I=D||window.event;if(!I){var w=this.getEvent.caller;while(w){I=w.arguments[0];if(I&&Event==I.constructor){break;}w=w.caller;}}return I;},getCharCode:function(I){var d=I.keyCode||I.charCode||0;if(YAHOO.env.ua.webkit&&(d in k)){d=k[d];}return d;},_getCacheIndex:function(J,b,w){for(var D=0,I=W.length;D<I;D=D+1){var d=W[D];if(d&&d[this.FN]==w&&d[this.EL]==J&&d[this.TYPE]==b){return D;}}return -1;},generateId:function(d){var I=d.id;if(!I){I="yuievtautoid-"+V;++V;d.id=I;}return I;},_isValidCollection:function(I){try{return (I&&typeof I!=="string"&&I.length&&!I.tagName&&!I.alert&&typeof I[0]!=="undefined");}catch(d){return false;}},elCache:{},getEl:function(d){return (typeof d==="string")?document.getElementById(d):d;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(I){if(!a){a=true;var d=YAHOO.util.Event;d._ready();d._tryPreloadAttach();}},_ready:function(I){var d=YAHOO.util.Event;if(!d.DOMReady){d.DOMReady=true;d.DOMReadyEvent.fire();d._simpleRemove(document,"DOMContentLoaded",d._ready);}},_tryPreloadAttach:function(){if(L.length===0){U=0;clearInterval(this._interval);this._interval=null;return ;}if(this.locked){return ;}if(this.isIE){if(!this.DOMReady){this.startInterval();return ;}}this.locked=true;var B=!a;if(!B){B=(U>0&&L.length>0);}var b=[];var t=function(A,g){var q=A;if(g.override){if(g.override===true){q=g.obj;}else{q=g.override;}}g.fn.call(q,g.obj);};var I,d,J,w,D=[];for(I=0,d=L.length;I<d;I=I+1){J=L[I];if(J){w=this.getEl(J.id);if(w){if(J.checkReady){if(a||w.nextSibling||!B){D.push(J);L[I]=null;}}else{t(w,J);L[I]=null;}}else{b.push(J);}}}for(I=0,d=D.length;I<d;I=I+1){J=D[I];t(this.getEl(J.id),J);}U--;if(B){for(I=L.length-1;I>-1;I--){J=L[I];if(!J||!J.id){L.splice(I,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(J,b,t){var D=(YAHOO.lang.isString(J))?this.getEl(J):J;var B=this.getListeners(D,t),w,d;if(B){for(w=B.length-1;w>-1;w--){var I=B[w];this.removeListener(D,I.type,I.fn);}}if(b&&D&&D.childNodes){for(w=0,d=D.childNodes.length;w<d;++w){this.purgeElement(D.childNodes[w],b,t);}}},getListeners:function(D,d){var b=[],I;if(!d){I=[W,N];}else{if(d==="unload"){I=[N];}else{I=[W];}}var t=(YAHOO.lang.isString(D))?this.getEl(D):D;for(var J=0;J<I.length;J=J+1){var A=I[J];if(A){for(var B=0,q=A.length;B<q;++B){var w=A[B];if(w&&w[this.EL]===t&&(!d||d===w[this.TYPE])){b.push({type:w[this.TYPE],fn:w[this.FN],obj:w[this.OBJ],adjust:w[this.OVERRIDE],scope:w[this.ADJ_SCOPE],index:B});}}}}return (b.length)?b:null;},_unload:function(B){var d=YAHOO.util.Event,w,D,I,b,J,t=N.slice();for(w=0,b=N.length;w<b;++w){I=t[w];if(I){var q=window;if(I[d.ADJ_SCOPE]){if(I[d.ADJ_SCOPE]===true){q=I[d.UNLOAD_OBJ];}else{q=I[d.ADJ_SCOPE];}}I[d.FN].call(q,d.getEvent(B,I[d.EL]),I[d.UNLOAD_OBJ]);t[w]=null;I=null;q=null;}}N=null;if(W){for(D=W.length-1;D>-1;D--){I=W[D];if(I){d.removeListener(I[d.EL],I[d.TYPE],I[d.FN],D);}}I=null;}p=null;d._simpleRemove(window,"unload",d._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var d=document.documentElement,I=document.body;if(d&&(d.scrollTop||d.scrollLeft)){return [d.scrollTop,d.scrollLeft];}else{if(I){return [I.scrollTop,I.scrollLeft];}else{return [0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(D,w,I,d){D.addEventListener(w,I,(d));};}else{if(window.attachEvent){return function(D,w,I,d){D.attachEvent("on"+w,I);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(D,w,I,d){D.removeEventListener(w,I,(d));};}else{if(window.detachEvent){return function(I,D,d){I.detachEvent("on"+D,d);};}else{return function(){};}}}()};}();(function(){var V=YAHOO.util.Event;V.on=V.addListener;if(V.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var C=document.createElement("p");V._dri=setInterval(function(){try{C.doScroll("left");clearInterval(V._dri);V._dri=null;V._ready();C=null;}catch(U){}},V.POLL_INTERVAL);}else{if(V.webkit&&V.webkit<525){V._dri=setInterval(function(){var U=document.readyState;if("loaded"==U||"complete"==U){clearInterval(V._dri);V._dri=null;V._ready();}},V.POLL_INTERVAL);}else{V._simpleAdd(document,"DOMContentLoaded",V._ready);}}V._simpleAdd(window,"load",V._load);V._simpleAdd(window,"unload",V._unload);V._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(V,U,L,x){this.__yui_events=this.__yui_events||{};var k=this.__yui_events[V];if(k){k.subscribe(U,L,x);}else{this.__yui_subscribers=this.__yui_subscribers||{};var C=this.__yui_subscribers;if(!C[V]){C[V]=[];}C[V].push({fn:U,obj:L,override:x});}},unsubscribe:function(U,x,p){this.__yui_events=this.__yui_events||{};var V=this.__yui_events;if(U){var L=V[U];if(L){return L.unsubscribe(x,p);}}else{var C=true;for(var k in V){if(YAHOO.lang.hasOwnProperty(V,k)){C=C&&V[k].unsubscribe(x,p);}}return C;}return false;},unsubscribeAll:function(V){return this.unsubscribe(V);},createEvent:function(p,k){this.__yui_events=this.__yui_events||{};var V=k||{};var W=this.__yui_events;if(W[p]){}else{var a=V.scope||this;var x=(V.silent);var C=new YAHOO.util.CustomEvent(p,a,x,YAHOO.util.CustomEvent.FLAT);W[p]=C;if(V.onSubscribeCallback){C.subscribeEvent.subscribe(V.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var L=this.__yui_subscribers[p];if(L){for(var U=0;U<L.length;++U){C.subscribe(L[U].fn,L[U].obj,L[U].override);}}}return W[p];},fireEvent:function(x,k,V,U){this.__yui_events=this.__yui_events||{};var p=this.__yui_events[x];if(!p){return null;}var C=[];for(var L=1;L<arguments.length;++L){C.push(arguments[L]);}return p.fire.apply(p,C);},hasEvent:function(V){if(this.__yui_events){if(this.__yui_events[V]){return true;}}return false;}};YAHOO.util.KeyListener=function(V,L,C,U){if(!V){}else{if(!L){}else{if(!C){}}}if(!U){U=YAHOO.util.KeyListener.KEYDOWN;}var k=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof V=="string"){V=document.getElementById(V);}if(typeof C=="function"){k.subscribe(C);}else{k.subscribe(C.fn,C.scope,C.correctScope);}function x(N,W){if(!L.shift){L.shift=false;}if(!L.alt){L.alt=false;}if(!L.ctrl){L.ctrl=false;}if(N.shiftKey==L.shift&&N.altKey==L.alt&&N.ctrlKey==L.ctrl){var p;if(L.keys instanceof Array){for(var a=0;a<L.keys.length;a++){p=L.keys[a];if(p==N.charCode){k.fire(N.charCode,N);break;}else{if(p==N.keyCode){k.fire(N.keyCode,N);break;}}}}else{p=L.keys;if(p==N.charCode){k.fire(N.charCode,N);}else{if(p==N.keyCode){k.fire(N.keyCode,N);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(V,U,x);this.enabledEvent.fire(L);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(V,U,x);this.disabledEvent.fire(L);}this.enabled=false;};this.toString=function(){return "KeyListener ["+L.keys+"] "+V.tagName+(V.id?"["+V.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.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.5.1",build:"984"});(function(){var h=YAHOO.util,j,J,k={},r={},q=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.env.ua.opera,B=YAHOO.env.ua.webkit,D=YAHOO.env.ua.gecko,R=YAHOO.env.ua.ie;var c={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var P=function(p){if(!c.HYPHEN.test(p)){return p;}if(k[p]){return k[p];}var N=p;while(c.HYPHEN.exec(N)){N=N.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}k[p]=N;return N;};var Z=function(N){var p=r[N];if(!p){p=new RegExp("(?:^|\\s+)"+N+"(?:\\s+|$)");r[N]=p;}return p;};if(q.defaultView&&q.defaultView.getComputedStyle){j=function(p,l){var u=null;if(l=="float"){l="cssFloat";}var N=p.ownerDocument.defaultView.getComputedStyle(p,"");if(N){u=N[P(l)];}return p.style[l]||u;};}else{if(q.documentElement.currentStyle&&R){j=function(p,u){switch(P(u)){case "opacity":var v=100;try{v=p.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(l){try{v=p.filters("alpha").opacity;}catch(l){}}return v/100;case "float":u="styleFloat";default:var N=p.currentStyle?p.currentStyle[u]:null;return (p.style[u]||N);}};}else{j=function(p,N){return p.style[N];};}}if(R){J=function(p,N,u){switch(N){case "opacity":if(YAHOO.lang.isString(p.style.filter)){p.style.filter="alpha(opacity="+u*100+")";if(!p.currentStyle||!p.currentStyle.hasLayout){p.style.zoom=1;}}break;case "float":N="styleFloat";default:p.style[N]=u;}};}else{J=function(p,N,u){if(N=="float"){N="cssFloat";}p.style[N]=u;};}var X=function(p,N){return p&&p.nodeType==1&&(!N||N(p));};YAHOO.util.Dom={get:function(u){if(u&&(u.nodeType||u.item)){return u;}if(YAHOO.lang.isString(u)||!u){return q.getElementById(u);}if(u.length!==undefined){var l=[];for(var N=0,p=u.length;N<p;++N){l[l.length]=h.Dom.get(u[N]);}return l;}return u;},getStyle:function(p,u){u=P(u);var N=function(l){return j(l,u);};return h.Dom.batch(p,N,h.Dom,true);},setStyle:function(p,u,l){u=P(u);var N=function(v){J(v,u,l);};h.Dom.batch(p,N,h.Dom,true);},getXY:function(p){var N=function(u){if((u.parentNode===null||u.offsetParent===null||this.getStyle(u,"display")=="none")&&u!=u.ownerDocument.body){return false;}return m(u);};return h.Dom.batch(p,N,h.Dom,true);},getX:function(p){var N=function(u){return h.Dom.getXY(u)[0];};return h.Dom.batch(p,N,h.Dom,true);},getY:function(p){var N=function(u){return h.Dom.getXY(u)[1];};return h.Dom.batch(p,N,h.Dom,true);},setXY:function(p,l,u){var N=function(s){var f=this.getStyle(s,"position");if(f=="static"){this.setStyle(s,"position","relative");f="relative";}var W=this.getXY(s);if(W===false){return false;}var o=[parseInt(this.getStyle(s,"left"),10),parseInt(this.getStyle(s,"top"),10)];if(isNaN(o[0])){o[0]=(f=="relative")?0:s.offsetLeft;}if(isNaN(o[1])){o[1]=(f=="relative")?0:s.offsetTop;}if(l[0]!==null){s.style.left=l[0]-W[0]+o[0]+"px";}if(l[1]!==null){s.style.top=l[1]-W[1]+o[1]+"px";}if(!u){var v=this.getXY(s);if((l[0]!==null&&v[0]!=l[0])||(l[1]!==null&&v[1]!=l[1])){this.setXY(s,l,true);}}};h.Dom.batch(p,N,h.Dom,true);},setX:function(N,p){h.Dom.setXY(N,[p,null]);},setY:function(p,N){h.Dom.setXY(p,[null,N]);},getRegion:function(p){var N=function(u){if((u.parentNode===null||u.offsetParent===null||this.getStyle(u,"display")=="none")&&u!=u.ownerDocument.body){return false;}var l=h.Region.getRegion(u);return l;};return h.Dom.batch(p,N,h.Dom,true);},getClientWidth:function(){return h.Dom.getViewportWidth();},getClientHeight:function(){return h.Dom.getViewportHeight();},getElementsByClassName:function(v,W,f,s){W=W||"*";f=(f)?h.Dom.get(f):null||q;if(!f){return [];}var N=[],p=f.getElementsByTagName(W),o=Z(v);for(var u=0,l=p.length;u<l;++u){if(o.test(p[u].className)){N[N.length]=p[u];if(s){s.call(p[u],p[u]);}}}return N;},hasClass:function(u,N){var p=Z(N);var l=function(v){return p.test(v.className);};return h.Dom.batch(u,l,h.Dom,true);},addClass:function(N,p){var u=function(l){if(this.hasClass(l,p)){return false;}l.className=YAHOO.lang.trim([l.className,p].join(" "));return true;};return h.Dom.batch(N,u,h.Dom,true);},removeClass:function(u,N){var p=Z(N);var l=function(v){if(!N||!this.hasClass(v,N)){return false;}var f=v.className;v.className=f.replace(p," ");if(this.hasClass(v,N)){this.removeClass(v,N);}v.className=YAHOO.lang.trim(v.className);return true;};return h.Dom.batch(u,l,h.Dom,true);},replaceClass:function(l,N,p){if(!p||N===p){return false;}var u=Z(N);var v=function(f){if(!this.hasClass(f,N)){this.addClass(f,p);return true;}f.className=f.className.replace(u," "+p+" ");if(this.hasClass(f,N)){this.replaceClass(f,N,p);}f.className=YAHOO.lang.trim(f.className);return true;};return h.Dom.batch(l,v,h.Dom,true);},generateId:function(p,u){u=u||"yui-gen";var N=function(l){if(l&&l.id){return l.id;}var v=u+YAHOO.env._id_counter++;if(l){l.id=v;}return v;};return h.Dom.batch(p,N,h.Dom,true)||N.apply(h.Dom,arguments);},isAncestor:function(p,N){p=h.Dom.get(p);N=h.Dom.get(N);if(!p||!N){return false;}if(p.contains&&N.nodeType&&!B){return p.contains(N);}else{if(p.compareDocumentPosition&&N.nodeType){return !!(p.compareDocumentPosition(N)&16);}else{if(N.nodeType){return !!this.getAncestorBy(N,function(u){return u==p;});}}}return false;},inDocument:function(p){return this.isAncestor(q.documentElement,p);},getElementsBy:function(o,N,u,v){N=N||"*";u=(u)?h.Dom.get(u):null||q;if(!u){return [];}var l=[],s=u.getElementsByTagName(N);for(var f=0,p=s.length;f<p;++f){if(o(s[f])){l[l.length]=s[f];if(v){v(s[f]);}}}return l;},batch:function(v,W,s,u){v=(v&&(v.tagName||v.item))?v:h.Dom.get(v);if(!v||!W){return false;}var l=(u)?s:window;if(v.tagName||v.length===undefined){return W.call(l,v,s);}var f=[];for(var N=0,p=v.length;N<p;++N){f[f.length]=W.call(l,v[N],s);}return f;},getDocumentHeight:function(){var N=(q.compatMode!="CSS1Compat")?q.body.scrollHeight:q.documentElement.scrollHeight;var p=Math.max(N,h.Dom.getViewportHeight());return p;},getDocumentWidth:function(){var N=(q.compatMode!="CSS1Compat")?q.body.scrollWidth:q.documentElement.scrollWidth;var p=Math.max(N,h.Dom.getViewportWidth());return p;},getViewportHeight:function(){var p=self.innerHeight;var N=q.compatMode;if((N||R)&&!e){p=(N=="CSS1Compat")?q.documentElement.clientHeight:q.body.clientHeight;}return p;},getViewportWidth:function(){var p=self.innerWidth;var N=q.compatMode;if(N||R){p=(N=="CSS1Compat")?q.documentElement.clientWidth:q.body.clientWidth;}return p;},getAncestorBy:function(p,N){while(p=p.parentNode){if(X(p,N)){return p;}}return null;},getAncestorByClassName:function(N,p){N=h.Dom.get(N);if(!N){return null;}var u=function(l){return h.Dom.hasClass(l,p);};return h.Dom.getAncestorBy(N,u);},getAncestorByTagName:function(N,p){N=h.Dom.get(N);if(!N){return null;}var u=function(l){return l.tagName&&l.tagName.toUpperCase()==p.toUpperCase();};return h.Dom.getAncestorBy(N,u);},getPreviousSiblingBy:function(p,N){while(p){p=p.previousSibling;if(X(p,N)){return p;}}return null;},getPreviousSibling:function(p){p=h.Dom.get(p);if(!p){return null;}return h.Dom.getPreviousSiblingBy(p);},getNextSiblingBy:function(p,N){while(p){p=p.nextSibling;if(X(p,N)){return p;}}return null;},getNextSibling:function(p){p=h.Dom.get(p);if(!p){return null;}return h.Dom.getNextSiblingBy(p);},getFirstChildBy:function(p,u){var N=(X(p.firstChild,u))?p.firstChild:null;return N||h.Dom.getNextSiblingBy(p.firstChild,u);},getFirstChild:function(p,N){p=h.Dom.get(p);if(!p){return null;}return h.Dom.getFirstChildBy(p);},getLastChildBy:function(p,u){if(!p){return null;}var N=(X(p.lastChild,u))?p.lastChild:null;return N||h.Dom.getPreviousSiblingBy(p.lastChild,u);},getLastChild:function(p){p=h.Dom.get(p);return h.Dom.getLastChildBy(p);},getChildrenBy:function(N,l){var u=h.Dom.getFirstChildBy(N,l);var p=u?[u]:[];h.Dom.getNextSiblingBy(u,function(v){if(!l||l(v)){p[p.length]=v;}return false;});return p;},getChildren:function(p){p=h.Dom.get(p);if(!p){}return h.Dom.getChildrenBy(p);},getDocumentScrollLeft:function(p){p=p||q;return Math.max(p.documentElement.scrollLeft,p.body.scrollLeft);},getDocumentScrollTop:function(p){p=p||q;return Math.max(p.documentElement.scrollTop,p.body.scrollTop);},insertBefore:function(N,p){N=h.Dom.get(N);p=h.Dom.get(p);if(!N||!p||!p.parentNode){return null;}return p.parentNode.insertBefore(N,p);},insertAfter:function(N,p){N=h.Dom.get(N);p=h.Dom.get(p);if(!N||!p||!p.parentNode){return null;}if(p.nextSibling){return p.parentNode.insertBefore(N,p.nextSibling);}else{return p.parentNode.appendChild(N);}},getClientRegion:function(){var u=h.Dom.getDocumentScrollTop(),N=h.Dom.getDocumentScrollLeft(),v=h.Dom.getViewportWidth()+N,p=h.Dom.getViewportHeight()+u;return new h.Region(u,v,p,N);}};var m=function(){if(q.documentElement.getBoundingClientRect){return function(N){var u=N.getBoundingClientRect();var p=N.ownerDocument;return [u.left+h.Dom.getDocumentScrollLeft(p),u.top+h.Dom.getDocumentScrollTop(p)];};}else{return function(u){var l=[u.offsetLeft,u.offsetTop];var N=u.offsetParent;var p=(B&&h.Dom.getStyle(u,"position")=="absolute"&&u.offsetParent==u.ownerDocument.body);if(N!=u){while(N){l[0]+=N.offsetLeft;l[1]+=N.offsetTop;if(!p&&B&&h.Dom.getStyle(N,"position")=="absolute"){p=true;}N=N.offsetParent;}}if(p){l[0]-=u.ownerDocument.body.offsetLeft;l[1]-=u.ownerDocument.body.offsetTop;}N=u.parentNode;while(N.tagName&&!c.ROOT_TAG.test(N.tagName)){if(N.scrollTop||N.scrollLeft){if(!c.OP_SCROLL.test(h.Dom.getStyle(N,"display"))){if(!e||h.Dom.getStyle(N,"overflow")!=="visible"){l[0]-=N.scrollLeft;l[1]-=N.scrollTop;}}}N=N.parentNode;}return l;};}}();})();YAHOO.util.Region=function(e,X,D,h){this.top=e;this[1]=e;this.right=X;this.bottom=D;this.left=h;this[0]=h;};YAHOO.util.Region.prototype.contains=function(D){return (D.left>=this.left&&D.right<=this.right&&D.top>=this.top&&D.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return ((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(c){var e=Math.max(this.top,c.top);var X=Math.min(this.right,c.right);var D=Math.min(this.bottom,c.bottom);var h=Math.max(this.left,c.left);if(D>=e&&X>=h){return new YAHOO.util.Region(e,X,D,h);}else{return null;}};YAHOO.util.Region.prototype.union=function(c){var e=Math.min(this.top,c.top);var X=Math.max(this.right,c.right);var D=Math.max(this.bottom,c.bottom);var h=Math.min(this.left,c.left);return new YAHOO.util.Region(e,X,D,h);};YAHOO.util.Region.prototype.toString=function(){return ("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(X){var R=YAHOO.util.Dom.getXY(X);var e=R[1];var c=R[0]+X.offsetWidth;var D=R[1]+X.offsetHeight;var h=R[0];return new YAHOO.util.Region(e,c,D,h);};YAHOO.util.Point=function(D,h){if(YAHOO.lang.isArray(D)){h=D[1];D=D[0];}this.x=this.right=this.left=this[0]=D;this.y=this.top=this.bottom=this[1]=h;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.1",build:"984"});/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
/**
 * The drag and drop utility provides a framework for building drag and drop
 * applications.  In addition to enabling drag and drop for specific elements,
 * the drag and drop elements are tracked by the manager class, and the
 * interactions between the various elements are tracked during the drag and
 * the implementing code is notified about these important moments.
 * @module dragdrop
 * @title Drag and Drop
 * @requires yahoo,dom,event
 * @namespace YAHOO.util
 */

// Only load the library once.  Rewriting the manager class would orphan 
// existing drag and drop instances.
if (!YAHOO.util.DragDropMgr) {

/**
 * DragDropMgr is a singleton that tracks the element interaction for 
 * all DragDrop items in the window.  Generally, you will not call 
 * this class directly, but it does have helper methods that could 
 * be useful in your DragDrop implementations.
 * @class DragDropMgr
 * @static
 */
YAHOO.util.DragDropMgr = function() {

    var Event = YAHOO.util.Event;

    return {
        /**
         * Two dimensional Array of registered DragDrop objects.  The first 
         * dimension is the DragDrop item group, the second the DragDrop 
         * object.
         * @property ids
         * @type {string: string}
         * @private
         * @static
         */
        ids: {},

        /**
         * Array of element ids defined as drag handles.  Used to determine 
         * if the element that generated the mousedown event is actually the 
         * handle and not the html element itself.
         * @property handleIds
         * @type {string: string}
         * @private
         * @static
         */
        handleIds: {},

        /**
         * the DragDrop object that is currently being dragged
         * @property dragCurrent
         * @type DragDrop
         * @private
         * @static
         **/
        dragCurrent: null,

        /**
         * the DragDrop object(s) that are being hovered over
         * @property dragOvers
         * @type Array
         * @private
         * @static
         */
        dragOvers: {},

        /**
         * the X distance between the cursor and the object being dragged
         * @property deltaX
         * @type int
         * @private
         * @static
         */
        deltaX: 0,

        /**
         * the Y distance between the cursor and the object being dragged
         * @property deltaY
         * @type int
         * @private
         * @static
         */
        deltaY: 0,

        /**
         * Flag to determine if we should prevent the default behavior of the
         * events we define. By default this is true, but this can be set to 
         * false if you need the default behavior (not recommended)
         * @property preventDefault
         * @type boolean
         * @static
         */
        preventDefault: true,

        /**
         * Flag to determine if we should stop the propagation of the events 
         * we generate. This is true by default but you may want to set it to
         * false if the html element contains other features that require the
         * mouse click.
         * @property stopPropagation
         * @type boolean
         * @static
         */
        stopPropagation: true,

        /**
         * Internal flag that is set to true when drag and drop has been
         * initialized
         * @property initialized
         * @private
         * @static
         */
        initialized: false,

        /**
         * All drag and drop can be disabled.
         * @property locked
         * @private
         * @static
         */
        locked: false,

        /**
         * Provides additional information about the the current set of
         * interactions.  Can be accessed from the event handlers. It
         * contains the following properties:
         *
         *       out:       onDragOut interactions
         *       enter:     onDragEnter interactions
         *       over:      onDragOver interactions
         *       drop:      onDragDrop interactions
         *       point:     The location of the cursor
         *       draggedRegion: The location of dragged element at the time
         *                      of the interaction
         *       sourceRegion: The location of the source elemtn at the time
         *                     of the interaction
         *       validDrop: boolean
         * @property interactionInfo
         * @type object
         * @static
         */
        interactionInfo: null,

        /**
         * Called the first time an element is registered.
         * @method init
         * @private
         * @static
         */
        init: function() {
            this.initialized = true;
        },

        /**
         * In point mode, drag and drop interaction is defined by the 
         * location of the cursor during the drag/drop
         * @property POINT
         * @type int
         * @static
         * @final
         */
        POINT: 0,

        /**
         * In intersect mode, drag and drop interaction is defined by the 
         * cursor position or the amount of overlap of two or more drag and 
         * drop objects.
         * @property INTERSECT
         * @type int
         * @static
         * @final
         */
        INTERSECT: 1,

        /**
         * In intersect mode, drag and drop interaction is defined only by the 
         * overlap of two or more drag and drop objects.
         * @property STRICT_INTERSECT
         * @type int
         * @static
         * @final
         */
        STRICT_INTERSECT: 2,

        /**
         * The current drag and drop mode.  Default: POINT
         * @property mode
         * @type int
         * @static
         */
        mode: 0,

        /**
         * Runs method on all drag and drop objects
         * @method _execOnAll
         * @private
         * @static
         */
        _execOnAll: function(sMethod, args) {
            for (var i in this.ids) {
                for (var j in this.ids[i]) {
                    var oDD = this.ids[i][j];
                    if (! this.isTypeOfDD(oDD)) {
                        continue;
                    }
                    oDD[sMethod].apply(oDD, args);
                }
            }
        },

        /**
         * Drag and drop initialization.  Sets up the global event handlers
         * @method _onLoad
         * @private
         * @static
         */
        _onLoad: function() {

            this.init();


            Event.on(document, "mouseup",   this.handleMouseUp, this, true);
            Event.on(document, "mousemove", this.handleMouseMove, this, true);
            Event.on(window,   "unload",    this._onUnload, this, true);
            Event.on(window,   "resize",    this._onResize, this, true);
            // Event.on(window,   "mouseout",    this._test);

        },

        /**
         * Reset constraints on all drag and drop objs
         * @method _onResize
         * @private
         * @static
         */
        _onResize: function(e) {
            this._execOnAll("resetConstraints", []);
        },

        /**
         * Lock all drag and drop functionality
         * @method lock
         * @static
         */
        lock: function() { this.locked = true; },

        /**
         * Unlock all drag and drop functionality
         * @method unlock
         * @static
         */
        unlock: function() { this.locked = false; },

        /**
         * Is drag and drop locked?
         * @method isLocked
         * @return {boolean} True if drag and drop is locked, false otherwise.
         * @static
         */
        isLocked: function() { return this.locked; },

        /**
         * Location cache that is set for all drag drop objects when a drag is
         * initiated, cleared when the drag is finished.
         * @property locationCache
         * @private
         * @static
         */
        locationCache: {},

        /**
         * Set useCache to false if you want to force object the lookup of each
         * drag and drop linked element constantly during a drag.
         * @property useCache
         * @type boolean
         * @static
         */
        useCache: true,

        /**
         * The number of pixels that the mouse needs to move after the 
         * mousedown before the drag is initiated.  Default=3;
         * @property clickPixelThresh
         * @type int
         * @static
         */
        clickPixelThresh: 3,

        /**
         * The number of milliseconds after the mousedown event to initiate the
         * drag if we don't get a mouseup event. Default=1000
         * @property clickTimeThresh
         * @type int
         * @static
         */
        clickTimeThresh: 1000,

        /**
         * Flag that indicates that either the drag pixel threshold or the 
         * mousdown time threshold has been met
         * @property dragThreshMet
         * @type boolean
         * @private
         * @static
         */
        dragThreshMet: false,

        /**
         * Timeout used for the click time threshold
         * @property clickTimeout
         * @type Object
         * @private
         * @static
         */
        clickTimeout: null,

        /**
         * The X position of the mousedown event stored for later use when a 
         * drag threshold is met.
         * @property startX
         * @type int
         * @private
         * @static
         */
        startX: 0,

        /**
         * The Y position of the mousedown event stored for later use when a 
         * drag threshold is met.
         * @property startY
         * @type int
         * @private
         * @static
         */
        startY: 0,

        /**
         * Flag to determine if the drag event was fired from the click timeout and
         * not the mouse move threshold.
         * @property fromTimeout
         * @type boolean
         * @private
         * @static
         */
        fromTimeout: false,

        /**
         * Each DragDrop instance must be registered with the DragDropMgr.  
         * This is executed in DragDrop.init()
         * @method regDragDrop
         * @param {DragDrop} oDD the DragDrop object to register
         * @param {String} sGroup the name of the group this element belongs to
         * @static
         */
        regDragDrop: function(oDD, sGroup) {
            if (!this.initialized) { this.init(); }
            
            if (!this.ids[sGroup]) {
                this.ids[sGroup] = {};
            }
            this.ids[sGroup][oDD.id] = oDD;
        },

        /**
         * Removes the supplied dd instance from the supplied group. Executed
         * by DragDrop.removeFromGroup, so don't call this function directly.
         * @method removeDDFromGroup
         * @private
         * @static
         */
        removeDDFromGroup: function(oDD, sGroup) {
            if (!this.ids[sGroup]) {
                this.ids[sGroup] = {};
            }

            var obj = this.ids[sGroup];
            if (obj && obj[oDD.id]) {
                delete obj[oDD.id];
            }
        },

        /**
         * Unregisters a drag and drop item.  This is executed in 
         * DragDrop.unreg, use that method instead of calling this directly.
         * @method _remove
         * @private
         * @static
         */
        _remove: function(oDD) {
            for (var g in oDD.groups) {
                if (g && this.ids[g][oDD.id]) {
                    delete this.ids[g][oDD.id];
                }
            }
            delete this.handleIds[oDD.id];
        },

        /**
         * Each DragDrop handle element must be registered.  This is done
         * automatically when executing DragDrop.setHandleElId()
         * @method regHandle
         * @param {String} sDDId the DragDrop id this element is a handle for
         * @param {String} sHandleId the id of the element that is the drag 
         * handle
         * @static
         */
        regHandle: function(sDDId, sHandleId) {
            if (!this.handleIds[sDDId]) {
                this.handleIds[sDDId] = {};
            }
            this.handleIds[sDDId][sHandleId] = sHandleId;
        },

        /**
         * Utility function to determine if a given element has been 
         * registered as a drag drop item.
         * @method isDragDrop
         * @param {String} id the element id to check
         * @return {boolean} true if this element is a DragDrop item, 
         * false otherwise
         * @static
         */
        isDragDrop: function(id) {
            return ( this.getDDById(id) ) ? true : false;
        },

        /**
         * Returns the drag and drop instances that are in all groups the
         * passed in instance belongs to.
         * @method getRelated
         * @param {DragDrop} p_oDD the obj to get related data for
         * @param {boolean} bTargetsOnly if true, only return targetable objs
         * @return {DragDrop[]} the related instances
         * @static
         */
        getRelated: function(p_oDD, bTargetsOnly) {
            var oDDs = [];
            for (var i in p_oDD.groups) {
                for (var j in this.ids[i]) {
                    var dd = this.ids[i][j];
                    if (! this.isTypeOfDD(dd)) {
                        continue;
                    }
                    if (!bTargetsOnly || dd.isTarget) {
                        oDDs[oDDs.length] = dd;
                    }
                }
            }

            return oDDs;
        },

        /**
         * Returns true if the specified dd target is a legal target for 
         * the specifice drag obj
         * @method isLegalTarget
         * @param {DragDrop} the drag obj
         * @param {DragDrop} the target
         * @return {boolean} true if the target is a legal target for the 
         * dd obj
         * @static
         */
        isLegalTarget: function (oDD, oTargetDD) {
            var targets = this.getRelated(oDD, true);
            for (var i=0, len=targets.length;i<len;++i) {
                if (targets[i].id == oTargetDD.id) {
                    return true;
                }
            }

            return false;
        },

        /**
         * My goal is to be able to transparently determine if an object is
         * typeof DragDrop, and the exact subclass of DragDrop.  typeof 
         * returns "object", oDD.constructor.toString() always returns
         * "DragDrop" and not the name of the subclass.  So for now it just
         * evaluates a well-known variable in DragDrop.
         * @method isTypeOfDD
         * @param {Object} the object to evaluate
         * @return {boolean} true if typeof oDD = DragDrop
         * @static
         */
        isTypeOfDD: function (oDD) {
            return (oDD && oDD.__ygDragDrop);
        },

        /**
         * Utility function to determine if a given element has been 
         * registered as a drag drop handle for the given Drag Drop object.
         * @method isHandle
         * @param {String} id the element id to check
         * @return {boolean} true if this element is a DragDrop handle, false 
         * otherwise
         * @static
         */
        isHandle: function(sDDId, sHandleId) {
            return ( this.handleIds[sDDId] && 
                            this.handleIds[sDDId][sHandleId] );
        },

        /**
         * Returns the DragDrop instance for a given id
         * @method getDDById
         * @param {String} id the id of the DragDrop object
         * @return {DragDrop} the drag drop object, null if it is not found
         * @static
         */
        getDDById: function(id) {
            for (var i in this.ids) {
                if (this.ids[i][id]) {
                    return this.ids[i][id];
                }
            }
            return null;
        },

        /**
         * Fired after a registered DragDrop object gets the mousedown event.
         * Sets up the events required to track the object being dragged
         * @method handleMouseDown
         * @param {Event} e the event
         * @param oDD the DragDrop object being dragged
         * @private
         * @static
         */
        handleMouseDown: function(e, oDD) {

            this.currentTarget = YAHOO.util.Event.getTarget(e);

            this.dragCurrent = oDD;

            var el = oDD.getEl();

            // track start position
            this.startX = YAHOO.util.Event.getPageX(e);
            this.startY = YAHOO.util.Event.getPageY(e);

            this.deltaX = this.startX - el.offsetLeft;
            this.deltaY = this.startY - el.offsetTop;

            this.dragThreshMet = false;

            this.clickTimeout = setTimeout( 
                    function() { 
                        var DDM = YAHOO.util.DDM;
                        DDM.startDrag(DDM.startX, DDM.startY);
                        DDM.fromTimeout = true;
                    }, 
                    this.clickTimeThresh );
        },

        /**
         * Fired when either the drag pixel threshol or the mousedown hold 
         * time threshold has been met.
         * @method startDrag
         * @param x {int} the X position of the original mousedown
         * @param y {int} the Y position of the original mousedown
         * @static
         */
        startDrag: function(x, y) {
            clearTimeout(this.clickTimeout);
            var dc = this.dragCurrent;
            if (dc && dc.events.b4StartDrag) {
                dc.b4StartDrag(x, y);
                dc.fireEvent('b4StartDragEvent', { x: x, y: y });
            }
            if (dc && dc.events.startDrag) {
                dc.startDrag(x, y);
                dc.fireEvent('startDragEvent', { x: x, y: y });
            }
            this.dragThreshMet = true;
        },

        /**
         * Internal function to handle the mouseup event.  Will be invoked 
         * from the context of the document.
         * @method handleMouseUp
         * @param {Event} e the event
         * @private
         * @static
         */
        handleMouseUp: function(e) {
            if (this.dragCurrent) {
                clearTimeout(this.clickTimeout);

                if (this.dragThreshMet) {
                    if (this.fromTimeout) {
                        this.handleMouseMove(e);
                    }
                    this.fromTimeout = false;
                    this.fireEvents(e, true);
                } else {
                }

                this.stopDrag(e);

                this.stopEvent(e);
            }
        },

        /**
         * Utility to stop event propagation and event default, if these 
         * features are turned on.
         * @method stopEvent
         * @param {Event} e the event as returned by this.getEvent()
         * @static
         */
        stopEvent: function(e) {
            if (this.stopPropagation) {
                YAHOO.util.Event.stopPropagation(e);
            }

            if (this.preventDefault) {
                YAHOO.util.Event.preventDefault(e);
            }
        },

        /** 
         * Ends the current drag, cleans up the state, and fires the endDrag
         * and mouseUp events.  Called internally when a mouseup is detected
         * during the drag.  Can be fired manually during the drag by passing
         * either another event (such as the mousemove event received in onDrag)
         * or a fake event with pageX and pageY defined (so that endDrag and
         * onMouseUp have usable position data.).  Alternatively, pass true
         * for the silent parameter so that the endDrag and onMouseUp events
         * are skipped (so no event data is needed.)
         *
         * @method stopDrag
         * @param {Event} e the mouseup event, another event (or a fake event) 
         *                  with pageX and pageY defined, or nothing if the 
         *                  silent parameter is true
         * @param {boolean} silent skips the enddrag and mouseup events if true
         * @static
         */
        stopDrag: function(e, silent) {
            var dc = this.dragCurrent;
            // Fire the drag end event for the item that was dragged
            if (dc && !silent) {
                if (this.dragThreshMet) {
                    if (dc.events.b4EndDrag) {
                        dc.b4EndDrag(e);
                        dc.fireEvent('b4EndDragEvent', { e: e });
                    }
                    if (dc.events.endDrag) {
                        dc.endDrag(e);
                        dc.fireEvent('endDragEvent', { e: e });
                    }
                }
                if (dc.events.mouseUp) {
                    dc.onMouseUp(e);
                    dc.fireEvent('mouseUpEvent', { e: e });
                }
            }

            this.dragCurrent = null;
            this.dragOvers = {};
        },

        /** 
         * Internal function to handle the mousemove event.  Will be invoked 
         * from the context of the html element.
         *
         * @TODO figure out what we can do about mouse events lost when the 
         * user drags objects beyond the window boundary.  Currently we can 
         * detect this in internet explorer by verifying that the mouse is 
         * down during the mousemove event.  Firefox doesn't give us the 
         * button state on the mousemove event.
         * @method handleMouseMove
         * @param {Event} e the event
         * @private
         * @static
         */
        handleMouseMove: function(e) {
            
            var dc = this.dragCurrent;
            if (dc) {

                // var button = e.which || e.button;

                // check for IE mouseup outside of page boundary
                if (YAHOO.util.Event.isIE && YAHOO.util.Event.isIE < 9 && !e.button) {
                    this.stopEvent(e);
                    return this.handleMouseUp(e);
                } else {
                    if (e.clientX < 0 || e.clientY < 0) {
                        //This will stop the element from leaving the viewport in FF, Opera & Safari
                        //Not turned on yet
                        //this.stopEvent(e);
                        //return false;
                    }
                }

                if (!this.dragThreshMet) {
                    var diffX = Math.abs(this.startX - YAHOO.util.Event.getPageX(e));
                    var diffY = Math.abs(this.startY - YAHOO.util.Event.getPageY(e));
                    if (diffX > this.clickPixelThresh || 
                                diffY > this.clickPixelThresh) {
                        this.startDrag(this.startX, this.startY);
                    }
                }

                if (this.dragThreshMet) {
                    if (dc && dc.events.b4Drag) {
                        dc.b4Drag(e);
                        dc.fireEvent('b4DragEvent', { e: e});
                    }
                    if (dc && dc.events.drag) {
                        dc.onDrag(e);
                        dc.fireEvent('dragEvent', { e: e});
                    }
                    if (dc) {
                        this.fireEvents(e, false);
                    }
                }

                this.stopEvent(e);
            }
        },
        
        /**
         * Iterates over all of the DragDrop elements to find ones we are 
         * hovering over or dropping on
         * @method fireEvents
         * @param {Event} e the event
         * @param {boolean} isDrop is this a drop op or a mouseover op?
         * @private
         * @static
         */
        fireEvents: function(e, isDrop) {
            var dc = this.dragCurrent;

            // If the user did the mouse up outside of the window, we could 
            // get here even though we have ended the drag.
            // If the config option dragOnly is true, bail out and don't fire the events
            if (!dc || dc.isLocked() || dc.dragOnly) {
                return;
            }

            var x = YAHOO.util.Event.getPageX(e),
                y = YAHOO.util.Event.getPageY(e),
                pt = new YAHOO.util.Point(x,y),
                pos = dc.getTargetCoord(pt.x, pt.y),
                el = dc.getDragEl(),
                events = ['out', 'over', 'drop', 'enter'],
                curRegion = new YAHOO.util.Region( pos.y, 
                                               pos.x + el.offsetWidth,
                                               pos.y + el.offsetHeight, 
                                               pos.x ),
            
                oldOvers = [], // cache the previous dragOver array
                inGroupsObj  = {},
                inGroups  = [],
                data = {
                    outEvts: [],
                    overEvts: [],
                    dropEvts: [],
                    enterEvts: []
                };


            // Check to see if the object(s) we were hovering over is no longer 
            // being hovered over so we can fire the onDragOut event
            for (var i in this.dragOvers) {

                var ddo = this.dragOvers[i];

                if (! this.isTypeOfDD(ddo)) {
                    continue;
                }
                if (! this.isOverTarget(pt, ddo, this.mode, curRegion)) {
                    data.outEvts.push( ddo );
                }

                oldOvers[i] = true;
                delete this.dragOvers[i];
            }

            for (var sGroup in dc.groups) {
                
                if ("string" != typeof sGroup) {
                    continue;
                }

                for (i in this.ids[sGroup]) {
                    var oDD = this.ids[sGroup][i];
                    if (! this.isTypeOfDD(oDD)) {
                        continue;
                    }

                    if (oDD.isTarget && !oDD.isLocked() && oDD != dc) {
                        if (this.isOverTarget(pt, oDD, this.mode, curRegion)) {
                            inGroupsObj[sGroup] = true;
                            // look for drop interactions
                            if (isDrop) {
                                data.dropEvts.push( oDD );
                            // look for drag enter and drag over interactions
                            } else {

                                // initial drag over: dragEnter fires
                                if (!oldOvers[oDD.id]) {
                                    data.enterEvts.push( oDD );
                                // subsequent drag overs: dragOver fires
                                } else {
                                    data.overEvts.push( oDD );
                                }

                                this.dragOvers[oDD.id] = oDD;
                            }
                        }
                    }
                }
            }

            this.interactionInfo = {
                out:       data.outEvts,
                enter:     data.enterEvts,
                over:      data.overEvts,
                drop:      data.dropEvts,
                point:     pt,
                draggedRegion:    curRegion,
                sourceRegion: this.locationCache[dc.id],
                validDrop: isDrop
            };

            
            for (var inG in inGroupsObj) {
                inGroups.push(inG);
            }

            // notify about a drop that did not find a target
            if (isDrop && !data.dropEvts.length) {
                this.interactionInfo.validDrop = false;
                if (dc.events.invalidDrop) {
                    dc.onInvalidDrop(e);
                    dc.fireEvent('invalidDropEvent', { e: e });
                }
            }

            for (i = 0; i < events.length; i++) {
                var tmp = null;
                if (data[events[i] + 'Evts']) {
                    tmp = data[events[i] + 'Evts'];
                }
                if (tmp && tmp.length) {
                    var type = events[i].charAt(0).toUpperCase() + events[i].substr(1),
                        ev = 'onDrag' + type,
                        b4 = 'b4Drag' + type,
                        cev = 'drag' + type + 'Event',
                        check = 'drag' + type;
                    
                    if (this.mode) {
                        if (dc.events[b4]) {
                            dc[b4](e, tmp, inGroups);
                            dc.fireEvent(b4 + 'Event', { event: e, info: tmp, group: inGroups });
                        }
                        if (dc.events[check]) {
                            dc[ev](e, tmp, inGroups);
                            dc.fireEvent(cev, { event: e, info: tmp, group: inGroups });
                        }
                    } else {
                        for (var b = 0, len = tmp.length; b < len; ++b) {
                            if (dc.events[b4]) {
                                dc[b4](e, tmp[b].id, inGroups[0]);
                                dc.fireEvent(b4 + 'Event', { event: e, info: tmp[b].id, group: inGroups[0] });
                            }
                            if (dc.events[check]) {
                                dc[ev](e, tmp[b].id, inGroups[0]);
                                dc.fireEvent(cev, { event: e, info: tmp[b].id, group: inGroups[0] });
                            }
                        }
                    }
                }
            }
        },

        /**
         * Helper function for getting the best match from the list of drag 
         * and drop objects returned by the drag and drop events when we are 
         * in INTERSECT mode.  It returns either the first object that the 
         * cursor is over, or the object that has the greatest overlap with 
         * the dragged element.
         * @method getBestMatch
         * @param  {DragDrop[]} dds The array of drag and drop objects 
         * targeted
         * @return {DragDrop}       The best single match
         * @static
         */
        getBestMatch: function(dds) {
            var winner = null;

            var len = dds.length;

            if (len == 1) {
                winner = dds[0];
            } else {
                // Loop through the targeted items
                for (var i=0; i<len; ++i) {
                    var dd = dds[i];
                    // If the cursor is over the object, it wins.  If the 
                    // cursor is over multiple matches, the first one we come
                    // to wins.
                    if (this.mode == this.INTERSECT && dd.cursorIsOver) {
                        winner = dd;
                        break;
                    // Otherwise the object with the most overlap wins
                    } else {
                        if (!winner || !winner.overlap || (dd.overlap &&
                            winner.overlap.getArea() < dd.overlap.getArea())) {
                            winner = dd;
                        }
                    }
                }
            }

            return winner;
        },

        /**
         * Refreshes the cache of the top-left and bottom-right points of the 
         * drag and drop objects in the specified group(s).  This is in the
         * format that is stored in the drag and drop instance, so typical 
         * usage is:
         * <code>
         * YAHOO.util.DragDropMgr.refreshCache(ddinstance.groups);
         * </code>
         * Alternatively:
         * <code>
         * YAHOO.util.DragDropMgr.refreshCache({group1:true, group2:true});
         * </code>
         * @TODO this really should be an indexed array.  Alternatively this
         * method could accept both.
         * @method refreshCache
         * @param {Object} groups an associative array of groups to refresh
         * @static
         */
        refreshCache: function(groups) {

            // refresh everything if group array is not provided
            var g = groups || this.ids;

            for (var sGroup in g) {
                if ("string" != typeof sGroup) {
                    continue;
                }
                for (var i in this.ids[sGroup]) {
                    var oDD = this.ids[sGroup][i];

                    if (this.isTypeOfDD(oDD)) {
                        var loc = this.getLocation(oDD);
                        if (loc) {
                            this.locationCache[oDD.id] = loc;
                        } else {
                            delete this.locationCache[oDD.id];
                        }
                    }
                }
            }
        },

        /**
         * This checks to make sure an element exists and is in the DOM.  The
         * main purpose is to handle cases where innerHTML is used to remove
         * drag and drop objects from the DOM.  IE provides an 'unspecified
         * error' when trying to access the offsetParent of such an element
         * @method verifyEl
         * @param {HTMLElement} el the element to check
         * @return {boolean} true if the element looks usable
         * @static
         */
        verifyEl: function(el) {
            try {
                if (el) {
                    var parent = el.offsetParent;
                    if (parent) {
                        return true;
                    }
                }
            } catch(e) {
            }

            return false;
        },
        
        /**
         * Returns a Region object containing the drag and drop element's position
         * and size, including the padding configured for it
         * @method getLocation
         * @param {DragDrop} oDD the drag and drop object to get the 
         *                       location for
         * @return {YAHOO.util.Region} a Region object representing the total area
         *                             the element occupies, including any padding
         *                             the instance is configured for.
         * @static
         */
        getLocation: function(oDD) {
            if (! this.isTypeOfDD(oDD)) {
                return null;
            }

            var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l;

            try {
                pos= YAHOO.util.Dom.getXY(el);
            } catch (e) { }

            if (!pos) {
                return null;
            }

            x1 = pos[0];
            x2 = x1 + el.offsetWidth;
            y1 = pos[1];
            y2 = y1 + el.offsetHeight;

            t = y1 - oDD.padding[0];
            r = x2 + oDD.padding[1];
            b = y2 + oDD.padding[2];
            l = x1 - oDD.padding[3];

            return new YAHOO.util.Region( t, r, b, l );
        },

        /**
         * Checks the cursor location to see if it over the target
         * @method isOverTarget
         * @param {YAHOO.util.Point} pt The point to evaluate
         * @param {DragDrop} oTarget the DragDrop object we are inspecting
         * @param {boolean} intersect true if we are in intersect mode
         * @param {YAHOO.util.Region} pre-cached location of the dragged element
         * @return {boolean} true if the mouse is over the target
         * @private
         * @static
         */
        isOverTarget: function(pt, oTarget, intersect, curRegion) {
            // use cache if available
            var loc = this.locationCache[oTarget.id];
            if (!loc || !this.useCache) {
                loc = this.getLocation(oTarget);
                this.locationCache[oTarget.id] = loc;

            }

            if (!loc) {
                return false;
            }

            oTarget.cursorIsOver = loc.contains( pt );

            // DragDrop is using this as a sanity check for the initial mousedown
            // in this case we are done.  In POINT mode, if the drag obj has no
            // contraints, we are done. Otherwise we need to evaluate the 
            // region the target as occupies to determine if the dragged element
            // overlaps with it.
            
            var dc = this.dragCurrent;
            if (!dc || (!intersect && !dc.constrainX && !dc.constrainY)) {

                //if (oTarget.cursorIsOver) {
                //}
                return oTarget.cursorIsOver;
            }

            oTarget.overlap = null;

            // Get the current location of the drag element, this is the
            // location of the mouse event less the delta that represents
            // where the original mousedown happened on the element.  We
            // need to consider constraints and ticks as well.

            if (!curRegion) {
                var pos = dc.getTargetCoord(pt.x, pt.y);
                var el = dc.getDragEl();
                curRegion = new YAHOO.util.Region( pos.y, 
                                                   pos.x + el.offsetWidth,
                                                   pos.y + el.offsetHeight, 
                                                   pos.x );
            }

            var overlap = curRegion.intersect(loc);

            if (overlap) {
                oTarget.overlap = overlap;
                return (intersect) ? true : oTarget.cursorIsOver;
            } else {
                return false;
            }
        },

        /**
         * unload event handler
         * @method _onUnload
         * @private
         * @static
         */
        _onUnload: function(e, me) {
            this.unregAll();
        },

        /**
         * Cleans up the drag and drop events and objects.
         * @method unregAll
         * @private
         * @static
         */
        unregAll: function() {

            if (this.dragCurrent) {
                this.stopDrag();
                this.dragCurrent = null;
            }

            this._execOnAll("unreg", []);

            //for (var i in this.elementCache) {
                //delete this.elementCache[i];
            //}
            //this.elementCache = {};

            this.ids = {};
        },

        /**
         * A cache of DOM elements
         * @property elementCache
         * @private
         * @static
         * @deprecated elements are not cached now
         */
        elementCache: {},
        
        /**
         * Get the wrapper for the DOM element specified
         * @method getElWrapper
         * @param {String} id the id of the element to get
         * @return {YAHOO.util.DDM.ElementWrapper} the wrapped element
         * @private
         * @deprecated This wrapper isn't that useful
         * @static
         */
        getElWrapper: function(id) {
            var oWrapper = this.elementCache[id];
            if (!oWrapper || !oWrapper.el) {
                oWrapper = this.elementCache[id] = 
                    new this.ElementWrapper(YAHOO.util.Dom.get(id));
            }
            return oWrapper;
        },

        /**
         * Returns the actual DOM element
         * @method getElement
         * @param {String} id the id of the elment to get
         * @return {Object} The element
         * @deprecated use YAHOO.util.Dom.get instead
         * @static
         */
        getElement: function(id) {
            return YAHOO.util.Dom.get(id);
        },
        
        /**
         * Returns the style property for the DOM element (i.e., 
         * document.getElById(id).style)
         * @method getCss
         * @param {String} id the id of the elment to get
         * @return {Object} The style property of the element
         * @deprecated use YAHOO.util.Dom instead
         * @static
         */
        getCss: function(id) {
            var el = YAHOO.util.Dom.get(id);
            return (el) ? el.style : null;
        },

        /**
         * Inner class for cached elements
         * @class DragDropMgr.ElementWrapper
         * @for DragDropMgr
         * @private
         * @deprecated
         */
        ElementWrapper: function(el) {
                /**
                 * The element
                 * @property el
                 */
                this.el = el || null;
                /**
                 * The element id
                 * @property id
                 */
                this.id = this.el && el.id;
                /**
                 * A reference to the style property
                 * @property css
                 */
                this.css = this.el && el.style;
            },

        /**
         * Returns the X position of an html element
         * @method getPosX
         * @param el the element for which to get the position
         * @return {int} the X coordinate
         * @for DragDropMgr
         * @deprecated use YAHOO.util.Dom.getX instead
         * @static
         */
        getPosX: function(el) {
            return YAHOO.util.Dom.getX(el);
        },

        /**
         * Returns the Y position of an html element
         * @method getPosY
         * @param el the element for which to get the position
         * @return {int} the Y coordinate
         * @deprecated use YAHOO.util.Dom.getY instead
         * @static
         */
        getPosY: function(el) {
            return YAHOO.util.Dom.getY(el); 
        },

        /**
         * Swap two nodes.  In IE, we use the native method, for others we 
         * emulate the IE behavior
         * @method swapNode
         * @param n1 the first node to swap
         * @param n2 the other node to swap
         * @static
         */
        swapNode: function(n1, n2) {
            if (n1.swapNode) {
                n1.swapNode(n2);
            } else {
                var p = n2.parentNode;
                var s = n2.nextSibling;

                if (s == n1) {
                    p.insertBefore(n1, n2);
                } else if (n2 == n1.nextSibling) {
                    p.insertBefore(n2, n1);
                } else {
                    n1.parentNode.replaceChild(n2, n1);
                    p.insertBefore(n1, s);
                }
            }
        },

        /**
         * Returns the current scroll position
         * @method getScroll
         * @private
         * @static
         */
        getScroll: function () {
            var t, l, dde=document.documentElement, db=document.body;
            if (dde && (dde.scrollTop || dde.scrollLeft)) {
                t = dde.scrollTop;
                l = dde.scrollLeft;
            } else if (db) {
                t = db.scrollTop;
                l = db.scrollLeft;
            } else {
            }
            return { top: t, left: l };
        },

        /**
         * Returns the specified element style property
         * @method getStyle
         * @param {HTMLElement} el          the element
         * @param {string}      styleProp   the style property
         * @return {string} The value of the style property
         * @deprecated use YAHOO.util.Dom.getStyle
         * @static
         */
        getStyle: function(el, styleProp) {
            return YAHOO.util.Dom.getStyle(el, styleProp);
        },

        /**
         * Gets the scrollTop
         * @method getScrollTop
         * @return {int} the document's scrollTop
         * @static
         */
        getScrollTop: function () { return this.getScroll().top; },

        /**
         * Gets the scrollLeft
         * @method getScrollLeft
         * @return {int} the document's scrollTop
         * @static
         */
        getScrollLeft: function () { return this.getScroll().left; },

        /**
         * Sets the x/y position of an element to the location of the
         * target element.
         * @method moveToEl
         * @param {HTMLElement} moveEl      The element to move
         * @param {HTMLElement} targetEl    The position reference element
         * @static
         */
        moveToEl: function (moveEl, targetEl) {
            var aCoord = YAHOO.util.Dom.getXY(targetEl);
            YAHOO.util.Dom.setXY(moveEl, aCoord);
        },

        /**
         * Gets the client height
         * @method getClientHeight
         * @return {int} client height in px
         * @deprecated use YAHOO.util.Dom.getViewportHeight instead
         * @static
         */
        getClientHeight: function() {
            return YAHOO.util.Dom.getViewportHeight();
        },

        /**
         * Gets the client width
         * @method getClientWidth
         * @return {int} client width in px
         * @deprecated use YAHOO.util.Dom.getViewportWidth instead
         * @static
         */
        getClientWidth: function() {
            return YAHOO.util.Dom.getViewportWidth();
        },

        /**
         * Numeric array sort function
         * @method numericSort
         * @static
         */
        numericSort: function(a, b) { return (a - b); },

        /**
         * Internal counter
         * @property _timeoutCount
         * @private
         * @static
         */
        _timeoutCount: 0,

        /**
         * Trying to make the load order less important.  Without this we get
         * an error if this file is loaded before the Event Utility.
         * @method _addListeners
         * @private
         * @static
         */
        _addListeners: function() {
            var DDM = YAHOO.util.DDM;
            if ( YAHOO.util.Event && document ) {
                DDM._onLoad();
            } else {
                if (DDM._timeoutCount > 2000) {
                } else {
                    setTimeout(DDM._addListeners, 10);
                    if (document && document.body) {
                        DDM._timeoutCount += 1;
                    }
                }
            }
        },

        /**
         * Recursively searches the immediate parent and all child nodes for 
         * the handle element in order to determine wheter or not it was 
         * clicked.
         * @method handleWasClicked
         * @param node the html element to inspect
         * @static
         */
        handleWasClicked: function(node, id) {
            if (this.isHandle(id, node.id)) {
                return true;
            } else {
                // check to see if this is a text node child of the one we want
                var p = node.parentNode;

                while (p) {
                    if (this.isHandle(id, p.id)) {
                        return true;
                    } else {
                        p = p.parentNode;
                    }
                }
            }

            return false;
        }

    };

}();

// shorter alias, save a few bytes
YAHOO.util.DDM = YAHOO.util.DragDropMgr;
YAHOO.util.DDM._addListeners();

}

(function() {

var Event=YAHOO.util.Event; 
var Dom=YAHOO.util.Dom;

/**
 * Defines the interface and base operation of items that that can be 
 * dragged or can be drop targets.  It was designed to be extended, overriding
 * the event handlers for startDrag, onDrag, onDragOver, onDragOut.
 * Up to three html elements can be associated with a DragDrop instance:
 * <ul>
 * <li>linked element: the element that is passed into the constructor.
 * This is the element which defines the boundaries for interaction with 
 * other DragDrop objects.</li>
 * <li>handle element(s): The drag operation only occurs if the element that 
 * was clicked matches a handle element.  By default this is the linked 
 * element, but there are times that you will want only a portion of the 
 * linked element to initiate the drag operation, and the setHandleElId() 
 * method provides a way to define this.</li>
 * <li>drag element: this represents an the element that would be moved along
 * with the cursor during a drag operation.  By default, this is the linked
 * element itself as in {@link YAHOO.util.DD}.  setDragElId() lets you define
 * a separate element that would be moved, as in {@link YAHOO.util.DDProxy}
 * </li>
 * </ul>
 * This class should not be instantiated until the onload event to ensure that
 * the associated elements are available.
 * The following would define a DragDrop obj that would interact with any 
 * other DragDrop obj in the "group1" group:
 * <pre>
 *  dd = new YAHOO.util.DragDrop("div1", "group1");
 * </pre>
 * Since none of the event handlers have been implemented, nothing would 
 * actually happen if you were to run the code above.  Normally you would 
 * override this class or one of the default implementations, but you can 
 * also override the methods you want on an instance of the class...
 * <pre>
 *  dd.onDragDrop = function(e, id) {
 *  &nbsp;&nbsp;alert("dd was dropped on " + id);
 *  }
 * </pre>
 * @namespace YAHOO.util
 * @class DragDrop
 * @constructor
 * @param {String} id of the element that is linked to this instance
 * @param {String} sGroup the group of related DragDrop objects
 * @param {object} config an object containing configurable attributes
 *                Valid properties for DragDrop: 
 *                    padding, isTarget, maintainOffset, primaryButtonOnly,
 */
YAHOO.util.DragDrop = function(id, sGroup, config) {
    if (id) {
        this.init(id, sGroup, config); 
    }
};

YAHOO.util.DragDrop.prototype = {
    /**
     * An Object Literal containing the events that we will be using: mouseDown, b4MouseDown, mouseUp, b4StartDrag, startDrag, b4EndDrag, endDrag, mouseUp, drag, b4Drag, invalidDrop, b4DragOut, dragOut, dragEnter, b4DragOver, dragOver, b4DragDrop, dragDrop
     * By setting any of these to false, then event will not be fired.
     * @property events
     * @type object
     */
    events: null,
    /**
    * @method on
    * @description Shortcut for EventProvider.subscribe, see <a href="YAHOO.util.EventProvider.html#subscribe">YAHOO.util.EventProvider.subscribe</a>
    */
    on: function() {
        this.subscribe.apply(this, arguments);
    },
    /**
     * The id of the element associated with this object.  This is what we 
     * refer to as the "linked element" because the size and position of 
     * this element is used to determine when the drag and drop objects have 
     * interacted.
     * @property id
     * @type String
     */
    id: null,

    /**
     * Configuration attributes passed into the constructor
     * @property config
     * @type object
     */
    config: null,

    /**
     * The id of the element that will be dragged.  By default this is same 
     * as the linked element , but could be changed to another element. Ex: 
     * YAHOO.util.DDProxy
     * @property dragElId
     * @type String
     * @private
     */
    dragElId: null, 

    /**
     * the id of the element that initiates the drag operation.  By default 
     * this is the linked element, but could be changed to be a child of this
     * element.  This lets us do things like only starting the drag when the 
     * header element within the linked html element is clicked.
     * @property handleElId
     * @type String
     * @private
     */
    handleElId: null, 

    /**
     * An associative array of HTML tags that will be ignored if clicked.
     * @property invalidHandleTypes
     * @type {string: string}
     */
    invalidHandleTypes: null, 

    /**
     * An associative array of ids for elements that will be ignored if clicked
     * @property invalidHandleIds
     * @type {string: string}
     */
    invalidHandleIds: null, 

    /**
     * An indexted array of css class names for elements that will be ignored
     * if clicked.
     * @property invalidHandleClasses
     * @type string[]
     */
    invalidHandleClasses: null, 

    /**
     * The linked element's absolute X position at the time the drag was 
     * started
     * @property startPageX
     * @type int
     * @private
     */
    startPageX: 0,

    /**
     * The linked element's absolute X position at the time the drag was 
     * started
     * @property startPageY
     * @type int
     * @private
     */
    startPageY: 0,

    /**
     * The group defines a logical collection of DragDrop objects that are 
     * related.  Instances only get events when interacting with other 
     * DragDrop object in the same group.  This lets us define multiple 
     * groups using a single DragDrop subclass if we want.
     * @property groups
     * @type {string: string}
     */
    groups: null,

    /**
     * Individual drag/drop instances can be locked.  This will prevent 
     * onmousedown start drag.
     * @property locked
     * @type boolean
     * @private
     */
    locked: false,

    /**
     * Lock this instance
     * @method lock
     */
    lock: function() { this.locked = true; },

    /**
     * Unlock this instace
     * @method unlock
     */
    unlock: function() { this.locked = false; },

    /**
     * By default, all instances can be a drop target.  This can be disabled by
     * setting isTarget to false.
     * @property isTarget
     * @type boolean
     */
    isTarget: true,

    /**
     * The padding configured for this drag and drop object for calculating
     * the drop zone intersection with this object.
     * @property padding
     * @type int[]
     */
    padding: null,
    /**
     * If this flag is true, do not fire drop events. The element is a drag only element (for movement not dropping)
     * @property dragOnly
     * @type Boolean
     */
    dragOnly: false,

    /**
     * Cached reference to the linked element
     * @property _domRef
     * @private
     */
    _domRef: null,

    /**
     * Internal typeof flag
     * @property __ygDragDrop
     * @private
     */
    __ygDragDrop: true,

    /**
     * Set to true when horizontal contraints are applied
     * @property constrainX
     * @type boolean
     * @private
     */
    constrainX: false,

    /**
     * Set to true when vertical contraints are applied
     * @property constrainY
     * @type boolean
     * @private
     */
    constrainY: false,

    /**
     * The left constraint
     * @property minX
     * @type int
     * @private
     */
    minX: 0,

    /**
     * The right constraint
     * @property maxX
     * @type int
     * @private
     */
    maxX: 0,

    /**
     * The up constraint 
     * @property minY
     * @type int
     * @type int
     * @private
     */
    minY: 0,

    /**
     * The down constraint 
     * @property maxY
     * @type int
     * @private
     */
    maxY: 0,

    /**
     * The difference between the click position and the source element's location
     * @property deltaX
     * @type int
     * @private
     */
    deltaX: 0,

    /**
     * The difference between the click position and the source element's location
     * @property deltaY
     * @type int
     * @private
     */
    deltaY: 0,

    /**
     * Maintain offsets when we resetconstraints.  Set to true when you want
     * the position of the element relative to its parent to stay the same
     * when the page changes
     *
     * @property maintainOffset
     * @type boolean
     */
    maintainOffset: false,

    /**
     * Array of pixel locations the element will snap to if we specified a 
     * horizontal graduation/interval.  This array is generated automatically
     * when you define a tick interval.
     * @property xTicks
     * @type int[]
     */
    xTicks: null,

    /**
     * Array of pixel locations the element will snap to if we specified a 
     * vertical graduation/interval.  This array is generated automatically 
     * when you define a tick interval.
     * @property yTicks
     * @type int[]
     */
    yTicks: null,

    /**
     * By default the drag and drop instance will only respond to the primary
     * button click (left button for a right-handed mouse).  Set to true to
     * allow drag and drop to start with any mouse click that is propogated
     * by the browser
     * @property primaryButtonOnly
     * @type boolean
     */
    primaryButtonOnly: true,

    /**
     * The availabe property is false until the linked dom element is accessible.
     * @property available
     * @type boolean
     */
    available: false,

    /**
     * By default, drags can only be initiated if the mousedown occurs in the
     * region the linked element is.  This is done in part to work around a
     * bug in some browsers that mis-report the mousedown if the previous
     * mouseup happened outside of the window.  This property is set to true
     * if outer handles are defined.
     *
     * @property hasOuterHandles
     * @type boolean
     * @default false
     */
    hasOuterHandles: false,

    /**
     * Property that is assigned to a drag and drop object when testing to
     * see if it is being targeted by another dd object.  This property
     * can be used in intersect mode to help determine the focus of
     * the mouse interaction.  DDM.getBestMatch uses this property first to
     * determine the closest match in INTERSECT mode when multiple targets
     * are part of the same interaction.
     * @property cursorIsOver
     * @type boolean
     */
    cursorIsOver: false,

    /**
     * Property that is assigned to a drag and drop object when testing to
     * see if it is being targeted by another dd object.  This is a region
     * that represents the area the draggable element overlaps this target.
     * DDM.getBestMatch uses this property to compare the size of the overlap
     * to that of other targets in order to determine the closest match in
     * INTERSECT mode when multiple targets are part of the same interaction.
     * @property overlap 
     * @type YAHOO.util.Region
     */
    overlap: null,

    /**
     * Code that executes immediately before the startDrag event
     * @method b4StartDrag
     * @private
     */
    b4StartDrag: function(x, y) { },

    /**
     * Abstract method called after a drag/drop object is clicked
     * and the drag or mousedown time thresholds have beeen met.
     * @method startDrag
     * @param {int} X click location
     * @param {int} Y click location
     */
    startDrag: function(x, y) { /* override this */ },

    /**
     * Code that executes immediately before the onDrag event
     * @method b4Drag
     * @private
     */
    b4Drag: function(e) { },

    /**
     * Abstract method called during the onMouseMove event while dragging an 
     * object.
     * @method onDrag
     * @param {Event} e the mousemove event
     */
    onDrag: function(e) { /* override this */ },

    /**
     * Abstract method called when this element fist begins hovering over 
     * another DragDrop obj
     * @method onDragEnter
     * @param {Event} e the mousemove event
     * @param {String|DragDrop[]} id In POINT mode, the element
     * id this is hovering over.  In INTERSECT mode, an array of one or more 
     * dragdrop items being hovered over.
     */
    onDragEnter: function(e, id) { /* override this */ },

    /**
     * Code that executes immediately before the onDragOver event
     * @method b4DragOver
     * @private
     */
    b4DragOver: function(e) { },

    /**
     * Abstract method called when this element is hovering over another 
     * DragDrop obj
     * @method onDragOver
     * @param {Event} e the mousemove event
     * @param {String|DragDrop[]} id In POINT mode, the element
     * id this is hovering over.  In INTERSECT mode, an array of dd items 
     * being hovered over.
     */
    onDragOver: function(e, id) { /* override this */ },

    /**
     * Code that executes immediately before the onDragOut event
     * @method b4DragOut
     * @private
     */
    b4DragOut: function(e) { },

    /**
     * Abstract method called when we are no longer hovering over an element
     * @method onDragOut
     * @param {Event} e the mousemove event
     * @param {String|DragDrop[]} id In POINT mode, the element
     * id this was hovering over.  In INTERSECT mode, an array of dd items 
     * that the mouse is no longer over.
     */
    onDragOut: function(e, id) { /* override this */ },

    /**
     * Code that executes immediately before the onDragDrop event
     * @method b4DragDrop
     * @private
     */
    b4DragDrop: function(e) { },

    /**
     * Abstract method called when this item is dropped on another DragDrop 
     * obj
     * @method onDragDrop
     * @param {Event} e the mouseup event
     * @param {String|DragDrop[]} id In POINT mode, the element
     * id this was dropped on.  In INTERSECT mode, an array of dd items this 
     * was dropped on.
     */
    onDragDrop: function(e, id) { /* override this */ },

    /**
     * Abstract method called when this item is dropped on an area with no
     * drop target
     * @method onInvalidDrop
     * @param {Event} e the mouseup event
     */
    onInvalidDrop: function(e) { /* override this */ },

    /**
     * Code that executes immediately before the endDrag event
     * @method b4EndDrag
     * @private
     */
    b4EndDrag: function(e) { },

    /**
     * Fired when we are done dragging the object
     * @method endDrag
     * @param {Event} e the mouseup event
     */
    endDrag: function(e) { /* override this */ },

    /**
     * Code executed immediately before the onMouseDown event
     * @method b4MouseDown
     * @param {Event} e the mousedown event
     * @private
     */
    b4MouseDown: function(e) {  },

    /**
     * Event handler that fires when a drag/drop obj gets a mousedown
     * @method onMouseDown
     * @param {Event} e the mousedown event
     */
    onMouseDown: function(e) { /* override this */ },

    /**
     * Event handler that fires when a drag/drop obj gets a mouseup
     * @method onMouseUp
     * @param {Event} e the mouseup event
     */
    onMouseUp: function(e) { /* override this */ },
   
    /**
     * Override the onAvailable method to do what is needed after the initial
     * position was determined.
     * @method onAvailable
     */
    onAvailable: function () { 
    },

    /**
     * Returns a reference to the linked element
     * @method getEl
     * @return {HTMLElement} the html element 
     */
    getEl: function() { 
        if (!this._domRef) {
            this._domRef = Dom.get(this.id); 
        }

        return this._domRef;
    },

    /**
     * Returns a reference to the actual element to drag.  By default this is
     * the same as the html element, but it can be assigned to another 
     * element. An example of this can be found in YAHOO.util.DDProxy
     * @method getDragEl
     * @return {HTMLElement} the html element 
     */
    getDragEl: function() {
        return Dom.get(this.dragElId);
    },

    /**
     * Sets up the DragDrop object.  Must be called in the constructor of any
     * YAHOO.util.DragDrop subclass
     * @method init
     * @param id the id of the linked element
     * @param {String} sGroup the group of related items
     * @param {object} config configuration attributes
     */
    init: function(id, sGroup, config) {
        this.initTarget(id, sGroup, config);
        Event.on(this._domRef || this.id, "mousedown", 
                        this.handleMouseDown, this, true);

        // Event.on(this.id, "selectstart", Event.preventDefault);
        for (var i in this.events) {
            this.createEvent(i + 'Event');
        }
        
    },

    /**
     * Initializes Targeting functionality only... the object does not
     * get a mousedown handler.
     * @method initTarget
     * @param id the id of the linked element
     * @param {String} sGroup the group of related items
     * @param {object} config configuration attributes
     */
    initTarget: function(id, sGroup, config) {

        // configuration attributes 
        this.config = config || {};

        this.events = {};

        // create a local reference to the drag and drop manager
        this.DDM = YAHOO.util.DDM;

        // initialize the groups object
        this.groups = {};

        // assume that we have an element reference instead of an id if the
        // parameter is not a string
        if (typeof id !== "string") {
            this._domRef = id;
            id = Dom.generateId(id);
        }

        // set the id
        this.id = id;

        // add to an interaction group
        this.addToGroup((sGroup) ? sGroup : "default");

        // We don't want to register this as the handle with the manager
        // so we just set the id rather than calling the setter.
        this.handleElId = id;

        Event.onAvailable(id, this.handleOnAvailable, this, true);


        // the linked element is the element that gets dragged by default
        this.setDragElId(id); 

        // by default, clicked anchors will not start drag operations. 
        // @TODO what else should be here?  Probably form fields.
        this.invalidHandleTypes = { A: "A" };
        this.invalidHandleIds = {};
        this.invalidHandleClasses = [];

        this.applyConfig();
    },

    /**
     * Applies the configuration parameters that were passed into the constructor.
     * This is supposed to happen at each level through the inheritance chain.  So
     * a DDProxy implentation will execute apply config on DDProxy, DD, and 
     * DragDrop in order to get all of the parameters that are available in
     * each object.
     * @method applyConfig
     */
    applyConfig: function() {
        this.events = {
            mouseDown: true,
            b4MouseDown: true,
            mouseUp: true,
            b4StartDrag: true,
            startDrag: true,
            b4EndDrag: true,
            endDrag: true,
            drag: true,
            b4Drag: true,
            invalidDrop: true,
            b4DragOut: true,
            dragOut: true,
            dragEnter: true,
            b4DragOver: true,
            dragOver: true,
            b4DragDrop: true,
            dragDrop: true
        };
        
        if (this.config.events) {
            for (var i in this.config.events) {
                if (this.config.events[i] === false) {
                    this.events[i] = false;
                }
            }
        }


        // configurable properties: 
        //    padding, isTarget, maintainOffset, primaryButtonOnly
        this.padding           = this.config.padding || [0, 0, 0, 0];
        this.isTarget          = (this.config.isTarget !== false);
        this.maintainOffset    = (this.config.maintainOffset);
        this.primaryButtonOnly = (this.config.primaryButtonOnly !== false);
        this.dragOnly = ((this.config.dragOnly === true) ? true : false);
    },

    /**
     * Executed when the linked element is available
     * @method handleOnAvailable
     * @private
     */
    handleOnAvailable: function() {
        this.available = true;
        this.resetConstraints();
        this.onAvailable();
    },

     /**
     * Configures the padding for the target zone in px.  Effectively expands
     * (or reduces) the virtual object size for targeting calculations.  
     * Supports css-style shorthand; if only one parameter is passed, all sides
     * will have that padding, and if only two are passed, the top and bottom
     * will have the first param, the left and right the second.
     * @method setPadding
     * @param {int} iTop    Top pad
     * @param {int} iRight  Right pad
     * @param {int} iBot    Bot pad
     * @param {int} iLeft   Left pad
     */
    setPadding: function(iTop, iRight, iBot, iLeft) {
        // this.padding = [iLeft, iRight, iTop, iBot];
        if (!iRight && 0 !== iRight) {
            this.padding = [iTop, iTop, iTop, iTop];
        } else if (!iBot && 0 !== iBot) {
            this.padding = [iTop, iRight, iTop, iRight];
        } else {
            this.padding = [iTop, iRight, iBot, iLeft];
        }
    },

    /**
     * Stores the initial placement of the linked element.
     * @method setInitialPosition
     * @param {int} diffX   the X offset, default 0
     * @param {int} diffY   the Y offset, default 0
     * @private
     */
    setInitPosition: function(diffX, diffY) {
        var el = this.getEl();

        if (!this.DDM.verifyEl(el)) {
            if (el && el.style && (el.style.display == 'none')) {
            } else {
            }
            return;
        }

        var dx = diffX || 0;
        var dy = diffY || 0;

        var p = Dom.getXY( el );

        this.initPageX = p[0] - dx;
        this.initPageY = p[1] - dy;

        this.lastPageX = p[0];
        this.lastPageY = p[1];



        this.setStartPosition(p);
    },

    /**
     * Sets the start position of the element.  This is set when the obj
     * is initialized, the reset when a drag is started.
     * @method setStartPosition
     * @param pos current position (from previous lookup)
     * @private
     */
    setStartPosition: function(pos) {
        var p = pos || Dom.getXY(this.getEl());

        this.deltaSetXY = null;

        this.startPageX = p[0];
        this.startPageY = p[1];
    },

    /**
     * Add this instance to a group of related drag/drop objects.  All 
     * instances belong to at least one group, and can belong to as many 
     * groups as needed.
     * @method addToGroup
     * @param sGroup {string} the name of the group
     */
    addToGroup: function(sGroup) {
        this.groups[sGroup] = true;
        this.DDM.regDragDrop(this, sGroup);
    },

    /**
     * Remove's this instance from the supplied interaction group
     * @method removeFromGroup
     * @param {string}  sGroup  The group to drop
     */
    removeFromGroup: function(sGroup) {
        if (this.groups[sGroup]) {
            delete this.groups[sGroup];
        }

        this.DDM.removeDDFromGroup(this, sGroup);
    },

    /**
     * Allows you to specify that an element other than the linked element 
     * will be moved with the cursor during a drag
     * @method setDragElId
     * @param id {string} the id of the element that will be used to initiate the drag
     */
    setDragElId: function(id) {
        this.dragElId = id;
    },

    /**
     * Allows you to specify a child of the linked element that should be 
     * used to initiate the drag operation.  An example of this would be if 
     * you have a content div with text and links.  Clicking anywhere in the 
     * content area would normally start the drag operation.  Use this method
     * to specify that an element inside of the content div is the element 
     * that starts the drag operation.
     * @method setHandleElId
     * @param id {string} the id of the element that will be used to 
     * initiate the drag.
     */
    setHandleElId: function(id) {
        if (typeof id !== "string") {
            id = Dom.generateId(id);
        }
        this.handleElId = id;
        this.DDM.regHandle(this.id, id);
    },

    /**
     * Allows you to set an element outside of the linked element as a drag 
     * handle
     * @method setOuterHandleElId
     * @param id the id of the element that will be used to initiate the drag
     */
    setOuterHandleElId: function(id) {
        if (typeof id !== "string") {
            id = Dom.generateId(id);
        }
        Event.on(id, "mousedown", 
                this.handleMouseDown, this, true);
        this.setHandleElId(id);

        this.hasOuterHandles = true;
    },

    /**
     * Remove all drag and drop hooks for this element
     * @method unreg
     */
    unreg: function() {
        Event.removeListener(this.id, "mousedown", 
                this.handleMouseDown);
        this._domRef = null;
        this.DDM._remove(this);
    },

    /**
     * Returns true if this instance is locked, or the drag drop mgr is locked
     * (meaning that all drag/drop is disabled on the page.)
     * @method isLocked
     * @return {boolean} true if this obj or all drag/drop is locked, else 
     * false
     */
    isLocked: function() {
        return (this.DDM.isLocked() || this.locked);
    },

    /**
     * Fired when this object is clicked
     * @method handleMouseDown
     * @param {Event} e 
     * @param {YAHOO.util.DragDrop} oDD the clicked dd object (this dd obj)
     * @private
     */
    handleMouseDown: function(e, oDD) {

        var button = e.which || e.button;

        if (this.primaryButtonOnly && button > 1) {
            return;
        }

        if (this.isLocked()) {
            return;
        }



        // firing the mousedown events prior to calculating positions
        var b4Return = this.b4MouseDown(e);
        if (this.events.b4MouseDown) {
            b4Return = this.fireEvent('b4MouseDownEvent', e);
        }
        var mDownReturn = this.onMouseDown(e);
        if (this.events.mouseDown) {
            mDownReturn = this.fireEvent('mouseDownEvent', e);
        }

        if ((b4Return === false) || (mDownReturn === false)) {
            return;
        }

        this.DDM.refreshCache(this.groups);
        // var self = this;
        // setTimeout( function() { self.DDM.refreshCache(self.groups); }, 0);

        // Only process the event if we really clicked within the linked 
        // element.  The reason we make this check is that in the case that 
        // another element was moved between the clicked element and the 
        // cursor in the time between the mousedown and mouseup events. When 
        // this happens, the element gets the next mousedown event 
        // regardless of where on the screen it happened.  
        var pt = new YAHOO.util.Point(Event.getPageX(e), Event.getPageY(e));
        if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) )  {
        } else {
            if (this.clickValidator(e)) {


                // set the initial element position
                this.setStartPosition();

                // start tracking mousemove distance and mousedown time to
                // determine when to start the actual drag
                this.DDM.handleMouseDown(e, this);

                // this mousedown is mine
                this.DDM.stopEvent(e);
            } else {


            }
        }
    },

    /**
     * @method clickValidator
     * @description Method validates that the clicked element
     * was indeed the handle or a valid child of the handle
     * @param {Event} e 
     */
    clickValidator: function(e) {
        var target = YAHOO.util.Event.getTarget(e);
        return ( this.isValidHandleChild(target) &&
                    (this.id == this.handleElId || 
                        this.DDM.handleWasClicked(target, this.id)) );
    },

    /**
     * Finds the location the element should be placed if we want to move
     * it to where the mouse location less the click offset would place us.
     * @method getTargetCoord
     * @param {int} iPageX the X coordinate of the click
     * @param {int} iPageY the Y coordinate of the click
     * @return an object that contains the coordinates (Object.x and Object.y)
     * @private
     */
    getTargetCoord: function(iPageX, iPageY) {


        var x = iPageX - this.deltaX;
        var y = iPageY - this.deltaY;

        if (this.constrainX) {
            if (x < this.minX) { x = this.minX; }
            if (x > this.maxX) { x = this.maxX; }
        }

        if (this.constrainY) {
            if (y < this.minY) { y = this.minY; }
            if (y > this.maxY) { y = this.maxY; }
        }

        x = this.getTick(x, this.xTicks);
        y = this.getTick(y, this.yTicks);


        return {x:x, y:y};
    },

    /**
     * Allows you to specify a tag name that should not start a drag operation
     * when clicked.  This is designed to facilitate embedding links within a
     * drag handle that do something other than start the drag.
     * @method addInvalidHandleType
     * @param {string} tagName the type of element to exclude
     */
    addInvalidHandleType: function(tagName) {
        var type = tagName.toUpperCase();
        this.invalidHandleTypes[type] = type;
    },

    /**
     * Lets you to specify an element id for a child of a drag handle
     * that should not initiate a drag
     * @method addInvalidHandleId
     * @param {string} id the element id of the element you wish to ignore
     */
    addInvalidHandleId: function(id) {
        if (typeof id !== "string") {
            id = Dom.generateId(id);
        }
        this.invalidHandleIds[id] = id;
    },


    /**
     * Lets you specify a css class of elements that will not initiate a drag
     * @method addInvalidHandleClass
     * @param {string} cssClass the class of the elements you wish to ignore
     */
    addInvalidHandleClass: function(cssClass) {
        this.invalidHandleClasses.push(cssClass);
    },

    /**
     * Unsets an excluded tag name set by addInvalidHandleType
     * @method removeInvalidHandleType
     * @param {string} tagName the type of element to unexclude
     */
    removeInvalidHandleType: function(tagName) {
        var type = tagName.toUpperCase();
        // this.invalidHandleTypes[type] = null;
        delete this.invalidHandleTypes[type];
    },
    
    /**
     * Unsets an invalid handle id
     * @method removeInvalidHandleId
     * @param {string} id the id of the element to re-enable
     */
    removeInvalidHandleId: function(id) {
        if (typeof id !== "string") {
            id = Dom.generateId(id);
        }
        delete this.invalidHandleIds[id];
    },

    /**
     * Unsets an invalid css class
     * @method removeInvalidHandleClass
     * @param {string} cssClass the class of the element(s) you wish to 
     * re-enable
     */
    removeInvalidHandleClass: function(cssClass) {
        for (var i=0, len=this.invalidHandleClasses.length; i<len; ++i) {
            if (this.invalidHandleClasses[i] == cssClass) {
                delete this.invalidHandleClasses[i];
            }
        }
    },

    /**
     * Checks the tag exclusion list to see if this click should be ignored
     * @method isValidHandleChild
     * @param {HTMLElement} node the HTMLElement to evaluate
     * @return {boolean} true if this is a valid tag type, false if not
     */
    isValidHandleChild: function(node) {

        var valid = true;
        // var n = (node.nodeName == "#text") ? node.parentNode : node;
        var nodeName;
        try {
            nodeName = node.nodeName.toUpperCase();
        } catch(e) {
            nodeName = node.nodeName;
        }
        valid = valid && !this.invalidHandleTypes[nodeName];
        valid = valid && !this.invalidHandleIds[node.id];

        for (var i=0, len=this.invalidHandleClasses.length; valid && i<len; ++i) {
            valid = !Dom.hasClass(node, this.invalidHandleClasses[i]);
        }


        return valid;

    },

    /**
     * Create the array of horizontal tick marks if an interval was specified
     * in setXConstraint().
     * @method setXTicks
     * @private
     */
    setXTicks: function(iStartX, iTickSize) {
        this.xTicks = [];
        this.xTickSize = iTickSize;
        
        var tickMap = {};

        for (var i = this.initPageX; i >= this.minX; i = i - iTickSize) {
            if (!tickMap[i]) {
                this.xTicks[this.xTicks.length] = i;
                tickMap[i] = true;
            }
        }

        for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) {
            if (!tickMap[i]) {
                this.xTicks[this.xTicks.length] = i;
                tickMap[i] = true;
            }
        }

        this.xTicks.sort(this.DDM.numericSort) ;
    },

    /**
     * Create the array of vertical tick marks if an interval was specified in 
     * setYConstraint().
     * @method setYTicks
     * @private
     */
    setYTicks: function(iStartY, iTickSize) {
        this.yTicks = [];
        this.yTickSize = iTickSize;

        var tickMap = {};

        for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) {
            if (!tickMap[i]) {
                this.yTicks[this.yTicks.length] = i;
                tickMap[i] = true;
            }
        }

        for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) {
            if (!tickMap[i]) {
                this.yTicks[this.yTicks.length] = i;
                tickMap[i] = true;
            }
        }

        this.yTicks.sort(this.DDM.numericSort) ;
    },

    /**
     * By default, the element can be dragged any place on the screen.  Use 
     * this method to limit the horizontal travel of the element.  Pass in 
     * 0,0 for the parameters if you want to lock the drag to the y axis.
     * @method setXConstraint
     * @param {int} iLeft the number of pixels the element can move to the left
     * @param {int} iRight the number of pixels the element can move to the 
     * right
     * @param {int} iTickSize optional parameter for specifying that the 
     * element
     * should move iTickSize pixels at a time.
     */
    setXConstraint: function(iLeft, iRight, iTickSize) {
        this.leftConstraint = parseInt(iLeft, 10);
        this.rightConstraint = parseInt(iRight, 10);

        this.minX = this.initPageX - this.leftConstraint;
        this.maxX = this.initPageX + this.rightConstraint;
        if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); }

        this.constrainX = true;
    },

    /**
     * Clears any constraints applied to this instance.  Also clears ticks
     * since they can't exist independent of a constraint at this time.
     * @method clearConstraints
     */
    clearConstraints: function() {
        this.constrainX = false;
        this.constrainY = false;
        this.clearTicks();
    },

    /**
     * Clears any tick interval defined for this instance
     * @method clearTicks
     */
    clearTicks: function() {
        this.xTicks = null;
        this.yTicks = null;
        this.xTickSize = 0;
        this.yTickSize = 0;
    },

    /**
     * By default, the element can be dragged any place on the screen.  Set 
     * this to limit the vertical travel of the element.  Pass in 0,0 for the
     * parameters if you want to lock the drag to the x axis.
     * @method setYConstraint
     * @param {int} iUp the number of pixels the element can move up
     * @param {int} iDown the number of pixels the element can move down
     * @param {int} iTickSize optional parameter for specifying that the 
     * element should move iTickSize pixels at a time.
     */
    setYConstraint: function(iUp, iDown, iTickSize) {
        this.topConstraint = parseInt(iUp, 10);
        this.bottomConstraint = parseInt(iDown, 10);

        this.minY = this.initPageY - this.topConstraint;
        this.maxY = this.initPageY + this.bottomConstraint;
        if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); }

        this.constrainY = true;
        
    },

    /**
     * resetConstraints must be called if you manually reposition a dd element.
     * @method resetConstraints
     */
    resetConstraints: function() {


        // Maintain offsets if necessary
        if (this.initPageX || this.initPageX === 0) {
            // figure out how much this thing has moved
            var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
            var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;

            this.setInitPosition(dx, dy);

        // This is the first time we have detected the element's position
        } else {
            this.setInitPosition();
        }

        if (this.constrainX) {
            this.setXConstraint( this.leftConstraint, 
                                 this.rightConstraint, 
                                 this.xTickSize        );
        }

        if (this.constrainY) {
            this.setYConstraint( this.topConstraint, 
                                 this.bottomConstraint, 
                                 this.yTickSize         );
        }
    },

    /**
     * Normally the drag element is moved pixel by pixel, but we can specify 
     * that it move a number of pixels at a time.  This method resolves the 
     * location when we have it set up like this.
     * @method getTick
     * @param {int} val where we want to place the object
     * @param {int[]} tickArray sorted array of valid points
     * @return {int} the closest tick
     * @private
     */
    getTick: function(val, tickArray) {

        if (!tickArray) {
            // If tick interval is not defined, it is effectively 1 pixel, 
            // so we return the value passed to us.
            return val; 
        } else if (tickArray[0] >= val) {
            // The value is lower than the first tick, so we return the first
            // tick.
            return tickArray[0];
        } else {
            for (var i=0, len=tickArray.length; i<len; ++i) {
                var next = i + 1;
                if (tickArray[next] && tickArray[next] >= val) {
                    var diff1 = val - tickArray[i];
                    var diff2 = tickArray[next] - val;
                    return (diff2 > diff1) ? tickArray[i] : tickArray[next];
                }
            }

            // The value is larger than the last tick, so we return the last
            // tick.
            return tickArray[tickArray.length - 1];
        }
    },

    /**
     * toString method
     * @method toString
     * @return {string} string representation of the dd obj
     */
    toString: function() {
        return ("DragDrop " + this.id);
    }

};
YAHOO.augment(YAHOO.util.DragDrop, YAHOO.util.EventProvider);

/**
* @event mouseDownEvent
* @description Provides access to the mousedown event. The mousedown does not always result in a drag operation.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4MouseDownEvent
* @description Provides access to the mousedown event, before the mouseDownEvent gets fired. Returning false will cancel the drag.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event mouseUpEvent
* @description Fired from inside DragDropMgr when the drag operation is finished.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4StartDragEvent
* @description Fires before the startDragEvent, returning false will cancel the startDrag Event.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event startDragEvent
* @description Occurs after a mouse down and the drag threshold has been met. The drag threshold default is either 3 pixels of mouse movement or 1 full second of holding the mousedown. 
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4EndDragEvent
* @description Fires before the endDragEvent. Returning false will cancel.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event endDragEvent
* @description Fires on the mouseup event after a drag has been initiated (startDrag fired).
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event dragEvent
* @description Occurs every mousemove event while dragging.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragEvent
* @description Fires before the dragEvent.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event invalidDropEvent
* @description Fires when the dragged objects is dropped in a location that contains no drop targets.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragOutEvent
* @description Fires before the dragOutEvent
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragOutEvent
* @description Fires when a dragged object is no longer over an object that had the onDragEnter fire. 
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragEnterEvent
* @description Occurs when the dragged object first interacts with another targettable drag and drop object.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragOverEvent
* @description Fires before the dragOverEvent.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragOverEvent
* @description Fires every mousemove event while over a drag and drop object.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragDropEvent 
* @description Fires before the dragDropEvent
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragDropEvent
* @description Fires when the dragged objects is dropped on another.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
})();
/**
 * A DragDrop implementation where the linked element follows the 
 * mouse cursor during a drag.
 * @class DD
 * @extends YAHOO.util.DragDrop
 * @constructor
 * @param {String} id the id of the linked element 
 * @param {String} sGroup the group of related DragDrop items
 * @param {object} config an object containing configurable attributes
 *                Valid properties for DD: 
 *                    scroll
 */
YAHOO.util.DD = function(id, sGroup, config) {
    if (id) {
        this.init(id, sGroup, config);
    }
};

YAHOO.extend(YAHOO.util.DD, YAHOO.util.DragDrop, {

    /**
     * When set to true, the utility automatically tries to scroll the browser
     * window wehn a drag and drop element is dragged near the viewport boundary.
     * Defaults to true.
     * @property scroll
     * @type boolean
     */
    scroll: true, 

    /**
     * Sets the pointer offset to the distance between the linked element's top 
     * left corner and the location the element was clicked
     * @method autoOffset
     * @param {int} iPageX the X coordinate of the click
     * @param {int} iPageY the Y coordinate of the click
     */
    autoOffset: function(iPageX, iPageY) {
        var x = iPageX - this.startPageX;
        var y = iPageY - this.startPageY;
        this.setDelta(x, y);
    },

    /** 
     * Sets the pointer offset.  You can call this directly to force the 
     * offset to be in a particular location (e.g., pass in 0,0 to set it 
     * to the center of the object, as done in YAHOO.widget.Slider)
     * @method setDelta
     * @param {int} iDeltaX the distance from the left
     * @param {int} iDeltaY the distance from the top
     */
    setDelta: function(iDeltaX, iDeltaY) {
        this.deltaX = iDeltaX;
        this.deltaY = iDeltaY;
    },

    /**
     * Sets the drag element to the location of the mousedown or click event, 
     * maintaining the cursor location relative to the location on the element 
     * that was clicked.  Override this if you want to place the element in a 
     * location other than where the cursor is.
     * @method setDragElPos
     * @param {int} iPageX the X coordinate of the mousedown or drag event
     * @param {int} iPageY the Y coordinate of the mousedown or drag event
     */
    setDragElPos: function(iPageX, iPageY) {
        // the first time we do this, we are going to check to make sure
        // the element has css positioning

        var el = this.getDragEl();
        this.alignElWithMouse(el, iPageX, iPageY);
    },

    /**
     * Sets the element to the location of the mousedown or click event, 
     * maintaining the cursor location relative to the location on the element 
     * that was clicked.  Override this if you want to place the element in a 
     * location other than where the cursor is.
     * @method alignElWithMouse
     * @param {HTMLElement} el the element to move
     * @param {int} iPageX the X coordinate of the mousedown or drag event
     * @param {int} iPageY the Y coordinate of the mousedown or drag event
     */
    alignElWithMouse: function(el, iPageX, iPageY) {
        var oCoord = this.getTargetCoord(iPageX, iPageY);

        if (!this.deltaSetXY) {
            var aCoord = [oCoord.x, oCoord.y];
            YAHOO.util.Dom.setXY(el, aCoord);
            var newLeft = parseInt( YAHOO.util.Dom.getStyle(el, "left"), 10 );
            var newTop  = parseInt( YAHOO.util.Dom.getStyle(el, "top" ), 10 );

            this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ];
        } else {
            YAHOO.util.Dom.setStyle(el, "left", (oCoord.x + this.deltaSetXY[0]) + "px");
            YAHOO.util.Dom.setStyle(el, "top",  (oCoord.y + this.deltaSetXY[1]) + "px");
        }
        
        this.cachePosition(oCoord.x, oCoord.y);
        var self = this;
        setTimeout(function() {
            self.autoScroll.call(self, oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
        }, 0);
    },

    /**
     * Saves the most recent position so that we can reset the constraints and
     * tick marks on-demand.  We need to know this so that we can calculate the
     * number of pixels the element is offset from its original position.
     * @method cachePosition
     * @param iPageX the current x position (optional, this just makes it so we
     * don't have to look it up again)
     * @param iPageY the current y position (optional, this just makes it so we
     * don't have to look it up again)
     */
    cachePosition: function(iPageX, iPageY) {
        if (iPageX) {
            this.lastPageX = iPageX;
            this.lastPageY = iPageY;
        } else {
            var aCoord = YAHOO.util.Dom.getXY(this.getEl());
            this.lastPageX = aCoord[0];
            this.lastPageY = aCoord[1];
        }
    },

    /**
     * Auto-scroll the window if the dragged object has been moved beyond the 
     * visible window boundary.
     * @method autoScroll
     * @param {int} x the drag element's x position
     * @param {int} y the drag element's y position
     * @param {int} h the height of the drag element
     * @param {int} w the width of the drag element
     * @private
     */
    autoScroll: function(x, y, h, w) {

        if (this.scroll) {
            // The client height
            var clientH = this.DDM.getClientHeight();

            // The client width
            var clientW = this.DDM.getClientWidth();

            // The amt scrolled down
            var st = this.DDM.getScrollTop();

            // The amt scrolled right
            var sl = this.DDM.getScrollLeft();

            // Location of the bottom of the element
            var bot = h + y;

            // Location of the right of the element
            var right = w + x;

            // The distance from the cursor to the bottom of the visible area, 
            // adjusted so that we don't scroll if the cursor is beyond the
            // element drag constraints
            var toBot = (clientH + st - y - this.deltaY);

            // The distance from the cursor to the right of the visible area
            var toRight = (clientW + sl - x - this.deltaX);


            // How close to the edge the cursor must be before we scroll
            // var thresh = (document.all) ? 100 : 40;
            var thresh = 40;

            // How many pixels to scroll per autoscroll op.  This helps to reduce 
            // clunky scrolling. IE is more sensitive about this ... it needs this 
            // value to be higher.
            var scrAmt = (document.all) ? 80 : 30;

            // Scroll down if we are near the bottom of the visible page and the 
            // obj extends below the crease
            if ( bot > clientH && toBot < thresh ) { 
                window.scrollTo(sl, st + scrAmt); 
            }

            // Scroll up if the window is scrolled down and the top of the object
            // goes above the top border
            if ( y < st && st > 0 && y - st < thresh ) { 
                window.scrollTo(sl, st - scrAmt); 
            }

            // Scroll right if the obj is beyond the right border and the cursor is
            // near the border.
            if ( right > clientW && toRight < thresh ) { 
                window.scrollTo(sl + scrAmt, st); 
            }

            // Scroll left if the window has been scrolled to the right and the obj
            // extends past the left border
            if ( x < sl && sl > 0 && x - sl < thresh ) { 
                window.scrollTo(sl - scrAmt, st);
            }
        }
    },

    /*
     * Sets up config options specific to this class. Overrides
     * YAHOO.util.DragDrop, but all versions of this method through the 
     * inheritance chain are called
     */
    applyConfig: function() {
        YAHOO.util.DD.superclass.applyConfig.call(this);
        this.scroll = (this.config.scroll !== false);
    },

    /*
     * Event that fires prior to the onMouseDown event.  Overrides 
     * YAHOO.util.DragDrop.
     */
    b4MouseDown: function(e) {
        this.setStartPosition();
        // this.resetConstraints();
        this.autoOffset(YAHOO.util.Event.getPageX(e), 
                            YAHOO.util.Event.getPageY(e));
    },

    /*
     * Event that fires prior to the onDrag event.  Overrides 
     * YAHOO.util.DragDrop.
     */
    b4Drag: function(e) {
        this.setDragElPos(YAHOO.util.Event.getPageX(e), 
                            YAHOO.util.Event.getPageY(e));
    },

    toString: function() {
        return ("DD " + this.id);
    }

    //////////////////////////////////////////////////////////////////////////
    // Debugging ygDragDrop events that can be overridden
    //////////////////////////////////////////////////////////////////////////
    /*
    startDrag: function(x, y) {
    },

    onDrag: function(e) {
    },

    onDragEnter: function(e, id) {
    },

    onDragOver: function(e, id) {
    },

    onDragOut: function(e, id) {
    },

    onDragDrop: function(e, id) {
    },

    endDrag: function(e) {
    }

    */

/**
* @event mouseDownEvent
* @description Provides access to the mousedown event. The mousedown does not always result in a drag operation.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4MouseDownEvent
* @description Provides access to the mousedown event, before the mouseDownEvent gets fired. Returning false will cancel the drag.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event mouseUpEvent
* @description Fired from inside DragDropMgr when the drag operation is finished.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4StartDragEvent
* @description Fires before the startDragEvent, returning false will cancel the startDrag Event.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event startDragEvent
* @description Occurs after a mouse down and the drag threshold has been met. The drag threshold default is either 3 pixels of mouse movement or 1 full second of holding the mousedown. 
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4EndDragEvent
* @description Fires before the endDragEvent. Returning false will cancel.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event endDragEvent
* @description Fires on the mouseup event after a drag has been initiated (startDrag fired).
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event dragEvent
* @description Occurs every mousemove event while dragging.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragEvent
* @description Fires before the dragEvent.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event invalidDropEvent
* @description Fires when the dragged objects is dropped in a location that contains no drop targets.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragOutEvent
* @description Fires before the dragOutEvent
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragOutEvent
* @description Fires when a dragged object is no longer over an object that had the onDragEnter fire. 
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragEnterEvent
* @description Occurs when the dragged object first interacts with another targettable drag and drop object.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragOverEvent
* @description Fires before the dragOverEvent.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragOverEvent
* @description Fires every mousemove event while over a drag and drop object.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragDropEvent 
* @description Fires before the dragDropEvent
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragDropEvent
* @description Fires when the dragged objects is dropped on another.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
});
/**
 * A DragDrop implementation that inserts an empty, bordered div into
 * the document that follows the cursor during drag operations.  At the time of
 * the click, the frame div is resized to the dimensions of the linked html
 * element, and moved to the exact location of the linked element.
 *
 * References to the "frame" element refer to the single proxy element that
 * was created to be dragged in place of all DDProxy elements on the
 * page.
 *
 * @class DDProxy
 * @extends YAHOO.util.DD
 * @constructor
 * @param {String} id the id of the linked html element
 * @param {String} sGroup the group of related DragDrop objects
 * @param {object} config an object containing configurable attributes
 *                Valid properties for DDProxy in addition to those in DragDrop: 
 *                   resizeFrame, centerFrame, dragElId
 */
YAHOO.util.DDProxy = function(id, sGroup, config) {
    if (id) {
        this.init(id, sGroup, config);
        this.initFrame(); 
    }
};

/**
 * The default drag frame div id
 * @property YAHOO.util.DDProxy.dragElId
 * @type String
 * @static
 */
YAHOO.util.DDProxy.dragElId = "ygddfdiv";

YAHOO.extend(YAHOO.util.DDProxy, YAHOO.util.DD, {

    /**
     * By default we resize the drag frame to be the same size as the element
     * we want to drag (this is to get the frame effect).  We can turn it off
     * if we want a different behavior.
     * @property resizeFrame
     * @type boolean
     */
    resizeFrame: true,

    /**
     * By default the frame is positioned exactly where the drag element is, so
     * we use the cursor offset provided by YAHOO.util.DD.  Another option that works only if
     * you do not have constraints on the obj is to have the drag frame centered
     * around the cursor.  Set centerFrame to true for this effect.
     * @property centerFrame
     * @type boolean
     */
    centerFrame: false,

    /**
     * Creates the proxy element if it does not yet exist
     * @method createFrame
     */
    createFrame: function() {
        var self=this, body=document.body;

        if (!body || !body.firstChild) {
            setTimeout( function() { self.createFrame(); }, 50 );
            return;
        }

        var div=this.getDragEl(), Dom=YAHOO.util.Dom;

        if (!div) {
            div    = document.createElement("div");
            div.id = this.dragElId;
            var s  = div.style;

            s.position   = "absolute";
            s.visibility = "hidden";
            s.cursor     = "move";
            s.border     = "2px solid #aaa";
            s.zIndex     = 999;
            s.height     = "25px";
            s.width      = "25px";

            var _data = document.createElement('div');
            Dom.setStyle(_data, 'height', '100%');
            Dom.setStyle(_data, 'width', '100%');
            /**
            * If the proxy element has no background-color, then it is considered to the "transparent" by Internet Explorer.
            * Since it is "transparent" then the events pass through it to the iframe below.
            * So creating a "fake" div inside the proxy element and giving it a background-color, then setting it to an
            * opacity of 0, it appears to not be there, however IE still thinks that it is so the events never pass through.
            */
            Dom.setStyle(_data, 'background-color', '#ccc');
            Dom.setStyle(_data, 'opacity', '0');
            div.appendChild(_data);

            /**
            * It seems that IE will fire the mouseup event if you pass a proxy element over a select box
            * Placing the IFRAME element inside seems to stop this issue
            */
            if (YAHOO.env.ua.ie) {
                //Only needed for Internet Explorer
                var ifr = document.createElement('iframe');
                ifr.setAttribute('src', 'about:blank');
                ifr.setAttribute('scrolling', 'no');
                ifr.setAttribute('frameborder', '0');
                div.insertBefore(ifr, div.firstChild);
                Dom.setStyle(ifr, 'height', '100%');
                Dom.setStyle(ifr, 'width', '100%');
                Dom.setStyle(ifr, 'position', 'absolute');
                Dom.setStyle(ifr, 'top', '0');
                Dom.setStyle(ifr, 'left', '0');
                Dom.setStyle(ifr, 'opacity', '0');
                Dom.setStyle(ifr, 'zIndex', '-1');
                Dom.setStyle(ifr.nextSibling, 'zIndex', '2');
            }

            // appendChild can blow up IE if invoked prior to the window load event
            // while rendering a table.  It is possible there are other scenarios 
            // that would cause this to happen as well.
            body.insertBefore(div, body.firstChild);
        }
    },

    /**
     * Initialization for the drag frame element.  Must be called in the
     * constructor of all subclasses
     * @method initFrame
     */
    initFrame: function() {
        this.createFrame();
    },

    applyConfig: function() {
        YAHOO.util.DDProxy.superclass.applyConfig.call(this);

        this.resizeFrame = (this.config.resizeFrame !== false);
        this.centerFrame = (this.config.centerFrame);
        this.setDragElId(this.config.dragElId || YAHOO.util.DDProxy.dragElId);
    },

    /**
     * Resizes the drag frame to the dimensions of the clicked object, positions 
     * it over the object, and finally displays it
     * @method showFrame
     * @param {int} iPageX X click position
     * @param {int} iPageY Y click position
     * @private
     */
    showFrame: function(iPageX, iPageY) {
        var el = this.getEl();
        var dragEl = this.getDragEl();
        var s = dragEl.style;

        this._resizeProxy();

        if (this.centerFrame) {
            this.setDelta( Math.round(parseInt(s.width,  10)/2), 
                           Math.round(parseInt(s.height, 10)/2) );
        }

        this.setDragElPos(iPageX, iPageY);

        YAHOO.util.Dom.setStyle(dragEl, "visibility", "visible"); 
    },

    /**
     * The proxy is automatically resized to the dimensions of the linked
     * element when a drag is initiated, unless resizeFrame is set to false
     * @method _resizeProxy
     * @private
     */
    _resizeProxy: function() {
        if (this.resizeFrame) {
            var DOM    = YAHOO.util.Dom;
            var el     = this.getEl();
            var dragEl = this.getDragEl();

            var bt = parseInt( DOM.getStyle(dragEl, "borderTopWidth"    ), 10);
            var br = parseInt( DOM.getStyle(dragEl, "borderRightWidth"  ), 10);
            var bb = parseInt( DOM.getStyle(dragEl, "borderBottomWidth" ), 10);
            var bl = parseInt( DOM.getStyle(dragEl, "borderLeftWidth"   ), 10);

            if (isNaN(bt)) { bt = 0; }
            if (isNaN(br)) { br = 0; }
            if (isNaN(bb)) { bb = 0; }
            if (isNaN(bl)) { bl = 0; }


            var newWidth  = Math.max(0, el.offsetWidth  - br - bl);                                                                                           
            var newHeight = Math.max(0, el.offsetHeight - bt - bb);


            DOM.setStyle( dragEl, "width",  newWidth  + "px" );
            DOM.setStyle( dragEl, "height", newHeight + "px" );
        }
    },

    // overrides YAHOO.util.DragDrop
    b4MouseDown: function(e) {
        this.setStartPosition();
        var x = YAHOO.util.Event.getPageX(e);
        var y = YAHOO.util.Event.getPageY(e);
        this.autoOffset(x, y);

        // This causes the autoscroll code to kick off, which means autoscroll can
        // happen prior to the check for a valid drag handle.
        // this.setDragElPos(x, y);
    },

    // overrides YAHOO.util.DragDrop
    b4StartDrag: function(x, y) {
        // show the drag frame
        this.showFrame(x, y);
    },

    // overrides YAHOO.util.DragDrop
    b4EndDrag: function(e) {
        YAHOO.util.Dom.setStyle(this.getDragEl(), "visibility", "hidden"); 
    },

    // overrides YAHOO.util.DragDrop
    // By default we try to move the element to the last location of the frame.  
    // This is so that the default behavior mirrors that of YAHOO.util.DD.  
    endDrag: function(e) {
        var DOM = YAHOO.util.Dom;
        var lel = this.getEl();
        var del = this.getDragEl();

        // Show the drag frame briefly so we can get its position
        // del.style.visibility = "";
        DOM.setStyle(del, "visibility", ""); 

        // Hide the linked element before the move to get around a Safari 
        // rendering bug.
        //lel.style.visibility = "hidden";
        DOM.setStyle(lel, "visibility", "hidden"); 
        YAHOO.util.DDM.moveToEl(lel, del);
        //del.style.visibility = "hidden";
        DOM.setStyle(del, "visibility", "hidden"); 
        //lel.style.visibility = "";
        DOM.setStyle(lel, "visibility", ""); 
    },

    toString: function() {
        return ("DDProxy " + this.id);
    }
/**
* @event mouseDownEvent
* @description Provides access to the mousedown event. The mousedown does not always result in a drag operation.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4MouseDownEvent
* @description Provides access to the mousedown event, before the mouseDownEvent gets fired. Returning false will cancel the drag.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event mouseUpEvent
* @description Fired from inside DragDropMgr when the drag operation is finished.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4StartDragEvent
* @description Fires before the startDragEvent, returning false will cancel the startDrag Event.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event startDragEvent
* @description Occurs after a mouse down and the drag threshold has been met. The drag threshold default is either 3 pixels of mouse movement or 1 full second of holding the mousedown. 
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event b4EndDragEvent
* @description Fires before the endDragEvent. Returning false will cancel.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event endDragEvent
* @description Fires on the mouseup event after a drag has been initiated (startDrag fired).
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

/**
* @event dragEvent
* @description Occurs every mousemove event while dragging.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragEvent
* @description Fires before the dragEvent.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event invalidDropEvent
* @description Fires when the dragged objects is dropped in a location that contains no drop targets.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragOutEvent
* @description Fires before the dragOutEvent
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragOutEvent
* @description Fires when a dragged object is no longer over an object that had the onDragEnter fire. 
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragEnterEvent
* @description Occurs when the dragged object first interacts with another targettable drag and drop object.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragOverEvent
* @description Fires before the dragOverEvent.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragOverEvent
* @description Fires every mousemove event while over a drag and drop object.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event b4DragDropEvent 
* @description Fires before the dragDropEvent
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/
/**
* @event dragDropEvent
* @description Fires when the dragged objects is dropped on another.
* @type YAHOO.util.CustomEvent See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
*/

});
/**
 * A DragDrop implementation that does not move, but can be a drop 
 * target.  You would get the same result by simply omitting implementation 
 * for the event callbacks, but this way we reduce the processing cost of the 
 * event listener and the callbacks.
 * @class DDTarget
 * @extends YAHOO.util.DragDrop 
 * @constructor
 * @param {String} id the id of the element that is a drop target
 * @param {String} sGroup the group of related DragDrop objects
 * @param {object} config an object containing configurable attributes
 *                 Valid properties for DDTarget in addition to those in 
 *                 DragDrop: 
 *                    none
 */
YAHOO.util.DDTarget = function(id, sGroup, config) {
    if (id) {
        this.initTarget(id, sGroup, config);
    }
};

// YAHOO.util.DDTarget.prototype = new YAHOO.util.DragDrop();
YAHOO.extend(YAHOO.util.DDTarget, YAHOO.util.DragDrop, {
    toString: function() {
        return ("DDTarget " + this.id);
    }
});
YAHOO.register("dragdrop", YAHOO.util.DragDropMgr, {version: "2.5.1", build: "984"});
(function(){var A=YAHOO.util;var a=function(n,K,P,N){if(!n){}this.init(n,K,P,N);};a.NAME="Anim";a.prototype={toString:function(){var K=this.getEl()||{};var n=K.id||K.tagName;return (this.constructor.NAME+": "+n);},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(K,P,n){return this.method(this.currentFrame,P,n-P,this.totalFrames);},setAttribute:function(K,P,n){if(this.patterns.noNegatives.test(K)){P=(P>0)?P:0;}A.Dom.setStyle(this.getEl(),K,P+n);},getAttribute:function(K){var P=this.getEl();var p=A.Dom.getStyle(P,K);if(p!=="auto"&&!this.patterns.offsetUnit.test(p)){return parseFloat(p);}var n=this.patterns.offsetAttribute.exec(K)||[];var G=!!(n[3]);var N=!!(n[2]);if(N||(A.Dom.getStyle(P,"position")=="absolute"&&G)){p=P["offset"+n[0].charAt(0).toUpperCase()+n[0].substr(1)];}else{p=0;}return p;},getDefaultUnit:function(K){if(this.patterns.defaultUnit.test(K)){return "px";}return "";},setRuntimeAttribute:function(n){var h;var P;var N=this.attributes;this.runtimeAttributes[n]={};var G=function(O){return (typeof O!=="undefined");};if(!G(N[n]["to"])&&!G(N[n]["by"])){return false;}h=(G(N[n]["from"]))?N[n]["from"]:this.getAttribute(n);if(G(N[n]["to"])){P=N[n]["to"];}else{if(G(N[n]["by"])){if(h.constructor==Array){P=[];for(var p=0,K=h.length;p<K;++p){P[p]=h[p]+N[n]["by"][p]*1;}}else{P=h+N[n]["by"]*1;}}}this.runtimeAttributes[n].start=h;this.runtimeAttributes[n].end=P;this.runtimeAttributes[n].unit=(G(N[n].unit))?N[n]["unit"]:this.getDefaultUnit(n);return true;},init:function(P,O,h,K){var n=false;var N=null;var G=0;P=A.Dom.get(P);this.attributes=O||{};this.duration=!YAHOO.lang.isUndefined(h)?h:1;this.method=K||A.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=A.AnimMgr.fps;this.setEl=function(R){P=A.Dom.get(R);};this.getEl=function(){return P;};this.isAnimated=function(){return n;};this.getStartTime=function(){return N;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(A.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}A.AnimMgr.registerElement(this);return true;};this.stop=function(R){if(!this.isAnimated()){return false;}if(R){this.currentFrame=this.totalFrames;this._onTween.fire();}A.AnimMgr.stop(this);};var l=function(){this.onStart.fire();this.runtimeAttributes={};for(var R in this.attributes){this.setRuntimeAttribute(R);}n=true;G=0;N=new Date();};var v=function(){var c={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};c.toString=function(){return ("duration: "+c.duration+", currentFrame: "+c.currentFrame);};this.onTween.fire(c);var j=this.runtimeAttributes;for(var R in j){this.setAttribute(R,this.doMethod(R,j[R].start,j[R].end),j[R].unit);}G+=1;};var p=function(){var R=(new Date()-N)/1000;var j={duration:R,frames:G,fps:G/R};j.toString=function(){return ("duration: "+j.duration+", frames: "+j.frames+", fps: "+j.fps);};n=false;G=0;this.onComplete.fire(j);};this._onStart=new A.CustomEvent("_start",this,true);this.onStart=new A.CustomEvent("start",this);this.onTween=new A.CustomEvent("tween",this);this._onTween=new A.CustomEvent("_tween",this,true);this.onComplete=new A.CustomEvent("complete",this);this._onComplete=new A.CustomEvent("_complete",this,true);this._onStart.subscribe(l);this._onTween.subscribe(v);this._onComplete.subscribe(p);}};A.Anim=a;})();YAHOO.util.AnimMgr=new function(){var K=null;var A=[];var a=0;this.fps=1000;this.delay=1;this.registerElement=function(N){A[A.length]=N;a+=1;N._onStart.fire();this.start();};this.unRegister=function(p,N){N=N||P(p);if(!p.isAnimated()||N==-1){return false;}p._onComplete.fire();A.splice(N,1);a-=1;if(a<=0){this.stop();}return true;};this.start=function(){if(K===null){K=setInterval(this.run,this.delay);}};this.stop=function(G){if(!G){clearInterval(K);for(var p=0,N=A.length;p<N;++p){this.unRegister(A[0],0);}A=[];K=null;a=0;}else{this.unRegister(G);}};this.run=function(){for(var G=0,N=A.length;G<N;++G){var p=A[G];if(!p||!p.isAnimated()){continue;}if(p.currentFrame<p.totalFrames||p.totalFrames===null){p.currentFrame+=1;if(p.useSeconds){n(p);}p._onTween.fire();}else{YAHOO.util.AnimMgr.stop(p,G);}}};var P=function(G){for(var p=0,N=A.length;p<N;++p){if(A[p]==G){return p;}}return -1;};var n=function(p){var O=p.totalFrames;var h=p.currentFrame;var G=(p.currentFrame*p.duration*1000/p.totalFrames);var N=(new Date()-p.getStartTime());var v=0;if(N<p.duration*1000){v=Math.round((N/G-1)*p.currentFrame);}else{v=O-(h+1);}if(v>0&&isFinite(v)){if(p.currentFrame+v>=O){v=O-(h+1);}p.currentFrame+=v;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(N,P){var p=N.length;var K=[];for(var A=0;A<p;++A){K[A]=[N[A][0],N[A][1]];}for(var a=1;a<p;++a){for(A=0;A<p-a;++A){K[A][0]=(1-P)*K[A][0]+P*K[parseInt(A+1,10)][0];K[A][1]=(1-P)*K[A][1]+P*K[parseInt(A+1,10)][1];}}return [K[0][0],K[0][1]];};};(function(){var a=function(N,P,p,G){a.superclass.constructor.call(this,N,P,p,G);};a.NAME="ColorAnim";var K=YAHOO.util;YAHOO.extend(a,K.Anim);var n=a.superclass;var A=a.prototype;A.patterns.color=/color$/i;A.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;A.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;A.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;A.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;A.parseColor=function(P){if(P.length==3){return P;}var N=this.patterns.hex.exec(P);if(N&&N.length==4){return [parseInt(N[1],16),parseInt(N[2],16),parseInt(N[3],16)];}N=this.patterns.rgb.exec(P);if(N&&N.length==4){return [parseInt(N[1],10),parseInt(N[2],10),parseInt(N[3],10)];}N=this.patterns.hex3.exec(P);if(N&&N.length==4){return [parseInt(N[1]+N[1],16),parseInt(N[2]+N[2],16),parseInt(N[3]+N[3],16)];}return null;};A.getAttribute=function(P){var p=this.getEl();if(this.patterns.color.test(P)){var G=YAHOO.util.Dom.getStyle(p,P);if(this.patterns.transparent.test(G)){var N=p.parentNode;G=K.Dom.getStyle(N,P);while(N&&this.patterns.transparent.test(G)){N=N.parentNode;G=K.Dom.getStyle(N,P);if(N.tagName.toUpperCase()=="HTML"){G="#fff";}}}}else{G=n.getAttribute.call(this,P);}return G;};A.doMethod=function(N,O,p){var h;if(this.patterns.color.test(N)){h=[];for(var G=0,P=O.length;G<P;++G){h[G]=n.doMethod.call(this,N,O[G],p[G]);}h="rgb("+Math.floor(h[0])+","+Math.floor(h[1])+","+Math.floor(h[2])+")";}else{h=n.doMethod.call(this,N,O,p);}return h;};A.setRuntimeAttribute=function(N){n.setRuntimeAttribute.call(this,N);if(this.patterns.color.test(N)){var G=this.attributes;var O=this.parseColor(this.runtimeAttributes[N].start);var p=this.parseColor(this.runtimeAttributes[N].end);if(typeof G[N]["to"]==="undefined"&&typeof G[N]["by"]!=="undefined"){p=this.parseColor(G[N].by);for(var h=0,P=O.length;h<P;++h){p[h]=O[h]+p[h];}}this.runtimeAttributes[N].start=O;this.runtimeAttributes[N].end=p;}};K.ColorAnim=a;})();YAHOO.util.Easing={easeNone:function(A,a,n,K){return n*A/K+a;},easeIn:function(A,a,n,K){return n*(A/=K)*A+a;},easeOut:function(A,a,n,K){return -n*(A/=K)*(A-2)+a;},easeBoth:function(A,a,n,K){if((A/=K/2)<1){return n/2*A*A+a;}return -n/2*((--A)*(A-2)-1)+a;},easeInStrong:function(A,a,n,K){return n*(A/=K)*A*A*A+a;},easeOutStrong:function(A,a,n,K){return -n*((A=A/K-1)*A*A*A-1)+a;},easeBothStrong:function(A,a,n,K){if((A/=K/2)<1){return n/2*A*A*A*A+a;}return -n/2*((A-=2)*A*A*A-2)+a;},elasticIn:function(n,A,h,G,K,N){if(n==0){return A;}if((n/=G)==1){return A+h;}if(!N){N=G*0.3;}if(!K||K<Math.abs(h)){K=h;var P=N/4;}else{var P=N/(2*Math.PI)*Math.asin(h/K);}return -(K*Math.pow(2,10*(n-=1))*Math.sin((n*G-P)*(2*Math.PI)/N))+A;},elasticOut:function(n,A,h,G,K,N){if(n==0){return A;}if((n/=G)==1){return A+h;}if(!N){N=G*0.3;}if(!K||K<Math.abs(h)){K=h;var P=N/4;}else{var P=N/(2*Math.PI)*Math.asin(h/K);}return K*Math.pow(2,-10*n)*Math.sin((n*G-P)*(2*Math.PI)/N)+h+A;},elasticBoth:function(n,A,h,G,K,N){if(n==0){return A;}if((n/=G/2)==2){return A+h;}if(!N){N=G*(0.3*1.5);}if(!K||K<Math.abs(h)){K=h;var P=N/4;}else{var P=N/(2*Math.PI)*Math.asin(h/K);}if(n<1){return -0.5*(K*Math.pow(2,10*(n-=1))*Math.sin((n*G-P)*(2*Math.PI)/N))+A;}return K*Math.pow(2,-10*(n-=1))*Math.sin((n*G-P)*(2*Math.PI)/N)*0.5+h+A;},backIn:function(A,a,P,n,K){if(typeof K=="undefined"){K=1.70158;}return P*(A/=n)*A*((K+1)*A-K)+a;},backOut:function(A,a,P,n,K){if(typeof K=="undefined"){K=1.70158;}return P*((A=A/n-1)*A*((K+1)*A+K)+1)+a;},backBoth:function(A,a,P,n,K){if(typeof K=="undefined"){K=1.70158;}if((A/=n/2)<1){return P/2*(A*A*(((K*=(1.525))+1)*A-K))+a;}return P/2*((A-=2)*A*(((K*=(1.525))+1)*A+K)+2)+a;},bounceIn:function(A,a,n,K){return n-YAHOO.util.Easing.bounceOut(K-A,0,n,K)+a;},bounceOut:function(A,a,n,K){if((A/=K)<(1/2.75)){return n*(7.5625*A*A)+a;}else{if(A<(2/2.75)){return n*(7.5625*(A-=(1.5/2.75))*A+0.75)+a;}else{if(A<(2.5/2.75)){return n*(7.5625*(A-=(2.25/2.75))*A+0.9375)+a;}}}return n*(7.5625*(A-=(2.625/2.75))*A+0.984375)+a;},bounceBoth:function(A,a,n,K){if(A<K/2){return YAHOO.util.Easing.bounceIn(A*2,0,n,K)*0.5+a;}return YAHOO.util.Easing.bounceOut(A*2-K,0,n,K)*0.5+n*0.5+a;}};(function(){var a=function(G,p,h,O){if(G){a.superclass.constructor.call(this,G,p,h,O);}};a.NAME="Motion";var P=YAHOO.util;YAHOO.extend(a,P.ColorAnim);var N=a.superclass;var K=a.prototype;K.patterns.points=/^points$/i;K.setAttribute=function(p,h,G){if(this.patterns.points.test(p)){G=G||"px";N.setAttribute.call(this,"left",h[0],G);N.setAttribute.call(this,"top",h[1],G);}else{N.setAttribute.call(this,p,h,G);}};K.getAttribute=function(p){if(this.patterns.points.test(p)){var G=[N.getAttribute.call(this,"left"),N.getAttribute.call(this,"top")];}else{G=N.getAttribute.call(this,p);}return G;};K.doMethod=function(p,v,G){var O=null;if(this.patterns.points.test(p)){var h=this.method(this.currentFrame,0,100,this.totalFrames)/100;O=P.Bezier.getPosition(this.runtimeAttributes[p],h);}else{O=N.doMethod.call(this,p,v,G);}return O;};K.setRuntimeAttribute=function(C){if(this.patterns.points.test(C)){var G=this.getEl();var O=this.attributes;var p;var l=O["points"]["control"]||[];var h;var R,c;if(l.length>0&&!(l[0] instanceof Array)){l=[l];}else{var v=[];for(R=0,c=l.length;R<c;++R){v[R]=l[R];}l=v;}if(P.Dom.getStyle(G,"position")=="static"){P.Dom.setStyle(G,"position","relative");}if(n(O["points"]["from"])){P.Dom.setXY(G,O["points"]["from"]);}else{P.Dom.setXY(G,P.Dom.getXY(G));}p=this.getAttribute("points");if(n(O["points"]["to"])){h=A.call(this,O["points"]["to"],p);var j=P.Dom.getXY(this.getEl());for(R=0,c=l.length;R<c;++R){l[R]=A.call(this,l[R],p);}}else{if(n(O["points"]["by"])){h=[p[0]+O["points"]["by"][0],p[1]+O["points"]["by"][1]];for(R=0,c=l.length;R<c;++R){l[R]=[p[0]+l[R][0],p[1]+l[R][1]];}}}this.runtimeAttributes[C]=[p];if(l.length>0){this.runtimeAttributes[C]=this.runtimeAttributes[C].concat(l);}this.runtimeAttributes[C][this.runtimeAttributes[C].length]=h;}else{N.setRuntimeAttribute.call(this,C);}};var A=function(p,h){var G=P.Dom.getXY(this.getEl());p=[p[0]-G[0]+h[0],p[1]-G[1]+h[1]];return p;};var n=function(p){return (typeof p!=="undefined");};P.Motion=a;})();(function(){var n=function(N,P,p,G){if(N){n.superclass.constructor.call(this,N,P,p,G);}};n.NAME="Scroll";var A=YAHOO.util;YAHOO.extend(n,A.ColorAnim);var K=n.superclass;var a=n.prototype;a.doMethod=function(P,G,N){var p=null;if(P=="scroll"){p=[this.method(this.currentFrame,G[0],N[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],N[1]-G[1],this.totalFrames)];}else{p=K.doMethod.call(this,P,G,N);}return p;};a.getAttribute=function(P){var p=null;var N=this.getEl();if(P=="scroll"){p=[N.scrollLeft,N.scrollTop];}else{p=K.getAttribute.call(this,P);}return p;};a.setAttribute=function(P,G,p){var N=this.getEl();if(P=="scroll"){N.scrollLeft=G[0];N.scrollTop=G[1];}else{K.setAttribute.call(this,P,G,p);}};A.Scroll=n;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.1",build:"984"});yui=window.yui||{};yui.CustomEvent=function(P,U){this.type=P;this.scope=U||window;this.subscribers=[];if(yui["Event"]){yui.Event.regCE(this);}};yui.CustomEvent.prototype.subscribe=function(P,U){this.subscribers.push(new yui.Subscriber(P,U));};yui.CustomEvent.prototype.unsubscribe=function(o,P){for(var U=0;U<this.subscribers.length;++U){var G=this.subscribers[U];if(G&&G.contains(o,P)){this._delete(U);}}};yui.CustomEvent.prototype.fire=function(){for(var U=0;U<this.subscribers.length;++U){var P=this.subscribers[U];if(P){P.fn.call(this.scope,this.type,arguments,P.obj);}}};yui.CustomEvent.prototype.unsubscribeAll=function(){for(var U=0;U<this.subscribers.length;++U){this._delete(U);}};yui.CustomEvent.prototype._delete=function(U){var P=this.subscribers[U];if(P){delete P.fn;delete P.obj;}delete this.subscribers[U];};yui.Subscriber=function(P,U){this.fn=P;this.obj=U||null;};yui.Subscriber.prototype.contains=function(U,P){return (this.fn==U&&this.obj==P);};yui=window.yui||{};yui.Event=new function(){var U=this;this.loadComplete=false;this.listeners=[];this.delayedListeners=[];this.unloadListeners=[];this.customEvents=[];this.legacyEvents=[];this.legacyHandlers=[];this.EL=0;this.TYPE=1;this.FN=2;this.WFN=3;this.SCOPE=3;this.isSafari=(navigator.userAgent.match(/safari/gi));this.isIE=(!this.isSafari&&navigator.userAgent.match(/msie/gi));this.addListener=function(G,Z,C,Q){if(this._isValidCollection(G)){for(var l=0;l<G.length;++l){this.on(G[l],Z,C,Q);}return ;}else{if(typeof G=="string"){if(this.loadComplete){G=this.getEl(G);}else{this.delayedListeners[this.delayedListeners.length]=[G,Z,C,Q];return ;}}}if(!G){return ;}if("unload"==Z&&Q!==this){this.unloadListeners[this.unloadListeners.length]=[G,Z,C,Q];return ;}var j=function(J){return C.call(G,U.getEvent(J),Q);};var a=[G,Z,C,j];var o=this.listeners.length;this.listeners[o]=a;if(this.useLegacyEvent(G,Z)){var P=this.getLegacyIndex(G,Z);if(P==-1){P=this.legacyEvents.length;this.legacyEvents[P]=[G,Z,G["on"+Z]];this.legacyHandlers[P]=[];G["on"+Z]=function(J){U.fireLegacyEvent(U.getEvent(J),P);};}this.legacyHandlers[P].push(o);}else{if(G.addEventListener){G.addEventListener(Z,j,false);}else{if(G.attachEvent){G.attachEvent("on"+Z,j);}}}};this.on=this.addListener;this.fireLegacyEvent=function(Z,P){var j=true;var Q=U.legacyEvents[0];var o=U.legacyHandlers[P];for(i=0;i<o.length;++i){var l=o[i];if(l){var G=U.listeners[l][U.WFN].call(Q,Z);j=(j&&G);}}return j;};this.getLegacyIndex=function(o,j){for(var G=0;G<this.legacyEvents.length;++G){var P=this.legacyEvents[G];if(P&&P[0]==o&&P[1]==j){return G;}}return -1;};this.useLegacyEvent=function(P,G){return ((!P.addEventListener&&!P.attachEvent)||(G=="click"&&this.isSafari));};this.removeListener=function(Z,Q,j){if(typeof Z=="string"){Z=this.getEl(Z);}else{if(this._isValidCollection(Z)){for(var o=0;o<Z.length;++o){this.removeListener(Z[o],Q,j);}return ;}}var G=null;var P=this._getCacheIndex(Z,Q,j);if(P>=0){G=this.listeners[P];}if(!Z||!G){return false;}if(Z.removeEventListener){Z.removeEventListener(Q,G[this.WFN],false);}else{if(Z.detachEvent){Z.detachEvent("on"+Q,G[this.WFN]);}}delete this.listeners[P][this.WFN];delete this.listeners[P][this.FN];delete this.listeners[P];return true;};this.getTarget=function(o,P){var G=o.target||o.srcElement;if(P&&G&&"#text"==G.nodeName){return G.parentNode;}else{return G;}};this.getPageX=function(G){var P=G.pageX;if(!P&&0!==P){P=G.clientX||0;if(this.isIE){P+=this._getScrollLeft();}}return P;};this.getPageY=function(P){var G=P.pageY;if(!G&&0!==G){G=P.clientY||0;if(this.isIE){G+=this._getScrollTop();}}return G;};this.getRelatedTarget=function(G){var P=G.relatedTarget;if(!P){if(G.type=="mouseout"){P=G.toElement;}else{if(G.type=="mouseover"){P=G.fromElement;}}}return P;};this.getTime=function(G){if(!G.time){var P=new Date().getTime();try{G.time=P;}catch(o){return P;}}return G.time;};this.stopEvent=function(P){this.stopPropagation(P);this.preventDefault(P);};this.stopPropagation=function(P){if(P.stopPropagation){P.stopPropagation();}else{P.cancelBubble=true;}};this.preventDefault=function(P){if(P.preventDefault){P.preventDefault();}else{P.returnValue=false;}};this.getEvent=function(G){var P=G||window.event;if(!P){var o=this.getEvent.caller;while(o){P=o.arguments[0];if(P&&Event==P.constructor){break;}o=o.caller;}}return P;};this.getCharCode=function(P){return P.charCode||(P.type=="keypress")?P.keyCode:0;};this._getCacheIndex=function(j,Q,o){for(var G=0;G<this.listeners.length;++G){var P=this.listeners[G];if(P&&P[this.FN]==o&&P[this.EL]==j&&P[this.TYPE]==Q){return G;}}return -1;};this._isValidCollection=function(P){return (P&&P.length&&typeof P!="string"&&!P.alert&&!P.name&&!P.id&&typeof P[0]!="undefined");};this.elCache={};this.getEl=function(P){return document.getElementById(P);};this.clearCache=function(){for(i in this.elCache){delete this.elCache[i];}};this.regCE=function(P){this.customEvents.push(P);};this._load=function(P){U.loadComplete=true;};this._tryPreloadAttach=function(){var o=!this.loadComplete;for(var P=0;P<this.delayedListeners.length;++P){var j=this.delayedListeners[P];if(j){var G=this.getEl(j[this.EL]);if(G){this.on(G,j[this.TYPE],j[this.FN],j[this.SCOPE]);delete this.delayedListeners[P];}}}if(o){setTimeout("yui.Event._tryPreloadAttach()",50);}};this._unload=function(j,o){for(var G=0;G<o.unloadListeners.length;++G){var P=o.unloadListeners[G];if(P){P[o.FN](o.getEvent(j),P[o.SCOPE]);}}if(o.listeners&&o.listeners.length>0){for(G=0;G<o.listeners.length;++G){P=o.listeners[G];if(P){o.removeListener(P[o.EL],P[o.TYPE],P[o.FN]);}}o.clearCache();}for(G=0;G<o.customEvents.length;++G){o.customEvents[G].unsubscribeAll();delete o.customEvents[G];}for(G=0;G<o.legacyEvents.length;++G){delete o.legacyEvents[G][0];delete o.legacyEvents[G];}};this._getScrollLeft=function(){return this._getScroll()[1];};this._getScrollTop=function(){return this._getScroll()[0];};this._getScroll=function(){var P=document.documentElement;db=document.body;if(P&&P.scrollTop){return [P.scrollTop,P.scrollLeft];}else{if(db){return [db.scrollTop,db.scrollLeft];}else{return [0,0];}}};};if(document&&document.body){yui.Event._load();}else{yui.Event.on(window,"load",yui.Event._load,yui.Event);}yui.Event.on(window,"unload",yui.Event._unload,yui.Event);yui.Event._tryPreloadAttach();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,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(P){var K=YAHOO.util.Event.getTarget(P);if(K.nodeName.toLowerCase()=="input"&&(K.type&&K.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(K.name)+"="+encodeURIComponent(K.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),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(K){this._msxml_progid.unshift(K);},setDefaultPostHeader:function(K){if(typeof K=="string"){this._default_post_header=K;}else{if(typeof K=="boolean"){this._use_default_post_header=K;}}},setDefaultXhrHeader:function(K){if(typeof K=="string"){this._default_xhr_header=K;}else{this._use_default_xhr_header=K;}},setPollingInterval:function(K){if(typeof K=="number"&&isFinite(K)){this._polling_interval=K;}},createXhrObject:function(X){var g,K;try{K=new XMLHttpRequest();g={conn:K,tId:X};}catch(N){for(var P=0;P<this._msxml_progid.length;++P){try{K=new ActiveXObject(this._msxml_progid[P]);g={conn:K,tId:X};break;}catch(N){}}}finally{return g;}},getConnectionObject:function(K){var N;var g=this._transaction_id;try{if(!K){N=this.createXhrObject(g);}else{N={};N.tId=g;N.isUpload=true;}if(N){this._transaction_id++;}}catch(P){}finally{return N;}},asyncRequest:function(z,N,X,K){var g=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var P=(X&&X.argument)?X.argument:null;if(!g){return null;}else{if(X&&X.customevents){this.initCustomEvents(g,X);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(g,X,N,K);return g;}if(z.toUpperCase()=="GET"){if(this._sFormData.length!==0){N+=((N.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(z.toUpperCase()=="POST"){K=K?this._sFormData+"&"+K:this._sFormData;}}}if(z.toUpperCase()=="GET"&&(X&&X.cache===false)){N+=((N.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}g.conn.open(z,N,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if((z.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(g);}this.handleReadyState(g,X);g.conn.send(K||"");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(g,P);if(g.startEvent){g.startEvent.fire(g,P);}return g;}},initCustomEvents:function(K,N){for(var P in N.customevents){if(this._customEvents[P][0]){K[this._customEvents[P][0]]=new YAHOO.util.CustomEvent(this._customEvents[P][1],(N.scope)?N.scope:null);K[this._customEvents[P][0]].subscribe(N.customevents[P]);}}},handleReadyState:function(N,g){var P=this;var K=(g&&g.argument)?g.argument:null;if(g&&g.timeout){this._timeOut[N.tId]=window.setTimeout(function(){P.abort(N,g,true);},g.timeout);}this._poll[N.tId]=window.setInterval(function(){if(N.conn&&N.conn.readyState===4){window.clearInterval(P._poll[N.tId]);delete P._poll[N.tId];if(g&&g.timeout){window.clearTimeout(P._timeOut[N.tId]);delete P._timeOut[N.tId];}P.completeEvent.fire(N,K);if(N.completeEvent){N.completeEvent.fire(N,K);}P.handleTransactionResponse(N,g);}},this._polling_interval);},handleTransactionResponse:function(z,y,K){var g,N;var P=(y&&y.argument)?y.argument:null;try{if(z.conn.status!==undefined&&z.conn.status!==0){g=z.conn.status;}else{g=13030;}}catch(X){g=13030;}if(g>=200&&g<300||g===1223){N=this.createResponseObject(z,P);if(y&&y.success){if(!y.scope){y.success(N);}else{y.success.apply(y.scope,[N]);}}this.successEvent.fire(N);if(z.successEvent){z.successEvent.fire(N);}}else{switch(g){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:N=this.createExceptionObject(z.tId,P,(K?K:false));if(y&&y.failure){if(!y.scope){y.failure(N);}else{y.failure.apply(y.scope,[N]);}}break;default:N=this.createResponseObject(z,P);if(y&&y.failure){if(!y.scope){y.failure(N);}else{y.failure.apply(y.scope,[N]);}}}this.failureEvent.fire(N);if(z.failureEvent){z.failureEvent.fire(N);}}this.releaseObject(z);N=null;},createResponseObject:function(K,y){var g={};var r={};try{var N=K.conn.getAllResponseHeaders();var z=N.split("\n");for(var X=0;X<z.length;X++){var P=z[X].indexOf(":");if(P!=-1){r[z[X].substring(0,P)]=z[X].substring(P+2);}}}catch(s){}g.tId=K.tId;g.status=(K.conn.status==1223)?204:K.conn.status;g.statusText=(K.conn.status==1223)?"No Content":K.conn.statusText;g.getResponseHeader=r;g.getAllResponseHeaders=N;g.responseText=K.conn.responseText;g.responseXML=K.conn.responseXML;if(y){g.argument=y;}return g;},createExceptionObject:function(e,g,K){var z=0;var y="communication failure";var N=-1;var P="transaction aborted";var X={};X.tId=e;if(K){X.status=N;X.statusText=P;}else{X.status=z;X.statusText=y;}if(g){X.argument=g;}return X;},initHeader:function(K,g,N){var P=(N)?this._default_headers:this._http_headers;P[K]=g;if(N){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(K){if(this._has_default_headers){for(var P in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,P)){K.conn.setRequestHeader(P,this._default_headers[P]);}}}if(this._has_http_headers){for(var P in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,P)){K.conn.setRequestHeader(P,this._http_headers[P]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(W,X,P){this.resetFormState();var r;if(typeof W=="string"){r=(document.getElementById(W)||document.forms[W]);}else{if(typeof W=="object"){r=W;}else{return ;}}if(X){var z=this.createFrame((window.location.href.toLowerCase().indexOf("https")===0||P)?true:false);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=r;return ;}var K,s,y,b;var e=false;for(var g=0;g<r.elements.length;g++){K=r.elements[g];b=K.disabled;s=K.name;y=K.value;if(!b&&s){switch(K.type){case "select-one":case "select-multiple":for(var N=0;N<K.options.length;N++){if(K.options[N].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(s)+"="+encodeURIComponent(K.options[N].attributes["value"].specified?K.options[N].value:K.options[N].text)+"&";}else{this._sFormData+=encodeURIComponent(s)+"="+encodeURIComponent(K.options[N].hasAttribute("value")?K.options[N].value:K.options[N].text)+"&";}}}break;case "radio":case "checkbox":if(K.checked){this._sFormData+=encodeURIComponent(s)+"="+encodeURIComponent(y)+"&";}break;case "file":case undefined:case "reset":case "button":break;case "submit":if(e===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(s)+"="+encodeURIComponent(y)+"&";}e=true;}break;default:this._sFormData+=encodeURIComponent(s)+"="+encodeURIComponent(y)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this.initHeader("Content-Type",this._default_form_header);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(K){var P="yuiIO"+this._transaction_id;var N;if(window.ActiveXObject){N=document.createElement("<iframe id=\""+P+"\" name=\""+P+"\" />");if(typeof K=="boolean"){N.src="javascript:false";}}else{N=document.createElement("iframe");N.id=P;N.name=P;}N.style.position="absolute";N.style.top="-1000px";N.style.left="-1000px";document.body.appendChild(N);},appendPostData:function(K){var g=[];var P=K.split("&");for(var N=0;N<P.length;N++){var X=P[N].indexOf("=");if(X!=-1){g[N]=document.createElement("input");g[N].type="hidden";g[N].name=P[N].substring(0,X);g[N].value=P[N].substring(X+1);this._formNode.appendChild(g[N]);}}return g;},uploadFile:function(g,M,X,N){var Z=this;var e="yuiIO"+g.tId;var s="multipart/form-data";var W=document.getElementById(e);var r=(M&&M.argument)?M.argument:null;var P={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",X);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",e);if(this._formNode.encoding){this._formNode.setAttribute("encoding",s);}else{this._formNode.setAttribute("enctype",s);}if(N){var b=this.appendPostData(N);}this._formNode.submit();this.startEvent.fire(g,r);if(g.startEvent){g.startEvent.fire(g,r);}if(M&&M.timeout){this._timeOut[g.tId]=window.setTimeout(function(){Z.abort(g,M,true);},M.timeout);}if(b&&b.length>0){for(var y=0;y<b.length;y++){this._formNode.removeChild(b[y]);}}for(var K in P){if(YAHOO.lang.hasOwnProperty(P,K)){if(P[K]){this._formNode.setAttribute(K,P[K]);}else{this._formNode.removeAttribute(K);}}}this.resetFormState();var z=function(){if(M&&M.timeout){window.clearTimeout(Z._timeOut[g.tId]);delete Z._timeOut[g.tId];}Z.completeEvent.fire(g,r);if(g.completeEvent){g.completeEvent.fire(g,r);}var u={};u.tId=g.tId;u.argument=M.argument;try{u.responseText=W.contentWindow.document.body?W.contentWindow.document.body.innerHTML:W.contentWindow.document.documentElement.textContent;u.responseXML=W.contentWindow.document.XMLDocument?W.contentWindow.document.XMLDocument:W.contentWindow.document;}catch(J){}if(M&&M.upload){if(!M.scope){M.upload(u);}else{M.upload.apply(M.scope,[u]);}}Z.uploadEvent.fire(u);if(g.uploadEvent){g.uploadEvent.fire(u);}YAHOO.util.Event.removeListener(W,"load",z);setTimeout(function(){document.body.removeChild(W);Z.releaseObject(g);},100);};YAHOO.util.Event.addListener(W,"load",z);},abort:function(X,y,K){var g;var P=(y&&y.argument)?y.argument:null;if(X&&X.conn){if(this.isCallInProgress(X)){X.conn.abort();window.clearInterval(this._poll[X.tId]);delete this._poll[X.tId];if(K){window.clearTimeout(this._timeOut[X.tId]);delete this._timeOut[X.tId];}g=true;}}else{if(X&&X.isUpload===true){var N="yuiIO"+X.tId;var z=document.getElementById(N);if(z){YAHOO.util.Event.removeListener(z,"load");document.body.removeChild(z);if(K){window.clearTimeout(this._timeOut[X.tId]);delete this._timeOut[X.tId];}g=true;}}else{g=false;}}if(g===true){this.abortEvent.fire(X,P);if(X.abortEvent){X.abortEvent.fire(X,P);}this.handleTransactionResponse(X,y,true);}return g;},isCallInProgress:function(P){if(P&&P.conn){return P.conn.readyState!==4&&P.conn.readyState!==0;}else{if(P&&P.isUpload===true){var K="yuiIO"+P.tId;return document.getElementById(K)?true:false;}else{return false;}}},releaseObject:function(K){if(K&&K.conn){K.conn=null;K=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.5.1",build:"984"});YAHOO.util.Get=function(){var W={},g=0,y=0,Q=false,i=YAHOO.env.ua,D=YAHOO.lang;var J=function(C,x,M){var a=M||window,m=a.document,N=m.createElement(C);for(var l in x){if(x[l]&&YAHOO.lang.hasOwnProperty(x,l)){N.setAttribute(l,x[l]);}}return N;};var c=function(x,w,l){var a=l||"utf-8";return J("link",{"id":"yui__dyn_"+(y++),"type":"text/css","charset":a,"rel":"stylesheet","href":x},w);};var A=function(x,w,l){var a=l||"utf-8";return J("script",{"id":"yui__dyn_"+(y++),"type":"text/javascript","charset":a,"src":x},w);};var u=function(x,w){return {tId:x.tId,win:x.win,data:x.data,nodes:x.nodes,msg:w,purge:function(){P(this.tId);}};};var B=function(x,l){var w=W[l],a=(D.isString(x))?w.win.document.getElementById(x):x;if(!a){r(l,"target node not found: "+x);}return a;};var r=function(l,a){var x=W[l];if(x.onFailure){var w=x.scope||x.win;x.onFailure.call(w,u(x,a));}};var R=function(l){var x=W[l];x.finished=true;if(x.aborted){var a="transaction "+l+" was aborted";r(l,a);return ;}if(x.onSuccess){var w=x.scope||x.win;x.onSuccess.call(w,u(x));}};var T=function(l,N){var a=W[l];if(a.aborted){var M="transaction "+l+" was aborted";r(l,M);return ;}if(N){a.url.shift();if(a.varName){a.varName.shift();}}else{a.url=(D.isString(a.url))?[a.url]:a.url;if(a.varName){a.varName=(D.isString(a.varName))?[a.varName]:a.varName;}}var E=a.win,o=E.document,e=o.getElementsByTagName("head")[0],C;if(a.url.length===0){if(a.type==="script"&&i.webkit&&i.webkit<420&&!a.finalpass&&!a.varName){var m=A(null,a.win,a.charset);m.innerHTML="YAHOO.util.Get._finalize(\""+l+"\");";a.nodes.push(m);e.appendChild(m);}else{R(l);}return ;}var x=a.url[0];if(a.type==="script"){C=A(x,E,a.charset);}else{C=c(x,E,a.charset);}G(a.type,C,l,x,E,a.url.length);a.nodes.push(C);if(a.insertBefore){var O=B(a.insertBefore,l);if(O){O.parentNode.insertBefore(C,O);}}else{e.appendChild(C);}if((i.webkit||i.gecko)&&a.type==="css"){T(l,x);}};var H=function(){if(Q){return ;}Q=true;for(var x in W){var w=W[x];if(w.autopurge&&w.finished){P(w.tId);delete W[x];}}Q=false;};var P=function(e){var M=W[e];if(M){var N=M.nodes,x=N.length,m=M.win.document,C=m.getElementsByTagName("head")[0];if(M.insertBefore){var a=B(M.insertBefore,e);if(a){C=a.parentNode;}}for(var w=0;w<x;w=w+1){C.removeChild(N[w]);}}M.nodes=[];};var j=function(w,x,a){var C="q"+(g++);a=a||{};if(g%YAHOO.util.Get.PURGE_THRESH===0){H();}W[C]=D.merge(a,{tId:C,type:w,url:x,finished:false,nodes:[]});var l=W[C];l.win=l.win||window;l.scope=l.scope||l.win;l.autopurge=("autopurge" in l)?l.autopurge:(w==="script")?true:false;D.later(0,l,T,C);return {tId:C};};var G=function(o,C,l,w,M,m,e){var N=e||T;if(i.ie){C.onreadystatechange=function(){var E=this.readyState;if("loaded"===E||"complete"===E){N(l,w);}};}else{if(i.webkit){if(o==="script"){if(i.webkit>=420){C.addEventListener("load",function(){N(l,w);});}else{var x=W[l];if(x.varName){var a=YAHOO.util.Get.POLL_FREQ;x.maxattempts=YAHOO.util.Get.TIMEOUT/a;x.attempts=0;x._cache=x.varName[0].split(".");x.timer=D.later(a,x,function(p){var z=this._cache,O=z.length,E=this.win,L;for(L=0;L<O;L=L+1){E=E[z[L]];if(!E){this.attempts++;if(this.attempts++>this.maxattempts){var k="Over retry limit, giving up";x.timer.cancel();r(l,k);}else{}return ;}}x.timer.cancel();N(l,w);},null,true);}else{D.later(YAHOO.util.Get.POLL_FREQ,null,N,[l,w]);}}}}else{C.onload=function(){N(l,w);};}}};return {POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(x){D.later(0,null,R,x);},abort:function(w){var a=(D.isString(w))?w:w.tId;var x=W[a];if(x){x.aborted=true;}},script:function(x,w){return j("script",x,w);},css:function(x,w){return j("css",x,w);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.5.1",build:"984"});var Y=YAHOO;Y.U=Y.util;Y.D=Y.util.Dom;Y.E=Y.util.Event;var snag=1;F._eb={eb_go_go_go:function(){this._eb_listeners=[];F._ebA.push(this)},eb_broadcast:function(){var e=false;if(e){var f=arguments.shift()}else{var d=[];for(var b=0;b<arguments.length;b++){d[b]=arguments[b]}var f=d.shift()}var c=F.array_copy(this._eb_listeners);var a=c.length;for(var b=0;b<a;++b){if(c[b][f]){c[b][f].apply(c[b],d)}else{}}},eb_add:function(a){this.eb_remove(a);this._eb_listeners.push(a);return(true)},eb_remove:function(c){var b=this._eb_listeners;var a=b.length;while(a--){if(b[a]==c){b.splice(a,1);return(true)}}return(false)},eb_remove_all:function(){this._eb_listeners=[]}};F.decorate(F,F._eb).eb_go_go_go();F.toggleClass=function(c,b){var a=_ge(c);if(Y.U.Dom.hasClass(a,b)){Y.U.Dom.removeClass(a,b)}else{Y.U.Dom.addClass(a,b)}return false};F.prepare_for_insertion=function(a){if(!a.parentNode){return a}if(F.is_ie){return a}return a.parentNode.removeChild(a)};F.get_local_X=function(a){if(a.style.left){return _pi(a.style.left)}return a.offsetLeft};F.get_local_Y=function(a){if(a.style.top){return _pi(a.style.top)}return a.offsetTop};F._paginator={paginator_go_go_go:function(){F.decorate(this,F._eb).eb_go_go_go();this.paginator_hide();this.pages=0;this.page=0;this.side_slots=2;this.middle_slots=7;this.pagesA=[];this.total_slots=(this.side_slots*2)+this.middle_slots;var a='<nobr><a id="paginator_link_prev" href="" class="Prev" onclick="_ge(\''+this.id+'\').paginator_go_prev(); this.blur(); return false;">&lt; Prev</a><a id="paginator_link_1" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_2" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><span id="paginator_break_1" class="break">...</span><a id="paginator_link_3" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_4" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_5" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_6" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_7" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_8" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_9" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><span id="paginator_break_2" class="break">...</span><a id="paginator_link_10" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_11" href="" onclick="_ge(\''+this.id+'\').paginator_go_page(this.page); this.blur(); return false;"></a><a id="paginator_link_next" href="" class="Next" onclick="_ge(\''+this.id+"').paginator_go_next(); this.blur(); return false;\">Next &gt;</a></nobr>";this.innerHTML=a;this.paginator_get_going()},paginator_place:function(){},paginator_get_going:function(f,g){if(f==undefined||g==undefined){return}if(g<2){this.paginator_hide();return}this.pages=g;this.page=f;writeDebug("paginator_get_going pages:"+this.pages+" page:"+this.page);this.pagesA=[];var d=(this.total_slots-1)/2;var e=this.page-(d);e=Math.max(1,e);var c=e+this.total_slots-1;if(c>this.pages){e=e-(c-this.pages)}c=Math.min(this.pages,c);writeDebug("first_page:"+e+" page:"+this.page+" last_page:"+c);for(var b=e;b<=c;b++){this.pagesA.push(b)}for(var b=1;b<=this.side_slots;b++){if(this.pagesA[b-1]>0){this.pagesA[b-1]=b}}for(var b=1;b<=this.side_slots;b++){var a=this.pagesA.length-b;this.pagesA[a]=this.pages-b+1}writeDebug(this.pagesA.join(","));this.paginator_draw()},paginator_draw:function(){this.paginator_hide_break(1);this.paginator_hide_break(2);for(var b=1;b<=this.total_slots;b++){this.paginator_hide_link(b)}var a=0;for(var b=0;b<this.pagesA.length;b++){var c=this.pagesA[b];if(c<1){continue}a++;this.paginator_show_link(a,c);if(a==2){if(this.pagesA[b+1]&&this.pagesA[b+1]>c+1){this.paginator_show_break(1)}}if(a==this.total_slots-2){if(this.pagesA[b+1]&&this.pagesA[b+1]>c+1){this.paginator_show_break(2)}}}if(this.page==1){_ge("paginator_link_prev").className="AtStart"}else{_ge("paginator_link_prev").className="Prev"}if(this.page==this.pages){_ge("paginator_link_next").className="AtEnd"}else{_ge("paginator_link_next").className="Next"}this.paginator_show()},paginator_go_prev:function(){var a=this.page-1;this.paginator_go_page(a)},paginator_go_next:function(){var a=this.page+1;this.paginator_go_page(a)},paginator_go_page:function(a){a=Math.min(this.pages,Math.max(1,a));if(a!=this.page){this.page=a;this.paginator_draw();this.eb_broadcast("on_paginator_go_page",this.page)}},paginator_hide:function(){this.style.display="none"},paginator_show:function(){if(this.style.display!="block"){this.style.visibility="hidden"}this.style.display="block";this.paginator_place();this.style.visibility="visible"},paginator_hide_link:function(a){_ge("paginator_link_"+a).style.display="none"},paginator_show_link:function(a,c){var b=_ge("paginator_link_"+a);if(c!=undefined){b.page=c}b.innerHTML=b.page;b.className=(b.page==this.page)?"this-page":"";b.style.display="inline"},paginator_hide_break:function(a){_ge("paginator_break_"+a).style.display="none"},paginator_show_break:function(a){_ge("paginator_break_"+a).style.display="inline"}};F._carrot=new Object();F._carrot.carrot_go_go_go=function(f,e,b,g){if(this.childNodes&&this.childNodes[0]){var c=this.childNodes[0].src}else{var c=this.src}var a=c.split("/");var h=a[a.length-1];var a=h.split(".");var d=a[0].substr().replace_global("_closed","").replace_global("_open_down","").replace_global("_open_up","");this.carrot_open_img={};if(f=="up"){this.carrot_open_img.src=_images_root+"/"+d+"_open_up.gif"}else{this.carrot_open_img.src=_images_root+"/"+d+"_open_down.gif"}this.carrot_closed_img={};this.carrot_closed_img.src=_images_root+"/"+d+"_closed.gif";F.preload_images(this.carrot_open_img.src,this.carrot_closed_img.src);this.carrot_is_open=(e)?1:0;if(this.childNodes&&this.childNodes[1]){if(this.carrot_is_open){this.carrot_open_text=(b)?b:this.childNodes[1].innerHTML;this.carrot_closed_text=(g)?g:this.carrot_open_text}else{this.carrot_closed_text=(g)?g:this.childNodes[1].innerHTML;this.carrot_open_text=(b)?b:this.carrot_closed_text}}this.style.cursor=(F.is_ie)?"hand":"pointer";this.onclick_default=(this.onclick)?this.onclick:function(){};this.onclick=this.carrot_onclick;if(this.carrot_is_open){if(this.childNodes&&this.childNodes[0]){this.childNodes[0].src=this.carrot_open_img.src;if(this.childNodes[1]){this.childNodes[1].innerHTML=this.carrot_open_text}}else{this.src=this.carrot_open_img.src}}else{if(this.childNodes&&this.childNodes[0]){this.childNodes[0].src=this.carrot_closed_img.src;if(this.childNodes[1]){this.childNodes[1].innerHTML=this.carrot_closed_text}}else{this.src=this.carrot_closed_img.src}}};F._carrot.carrot_onclick=function(a){if(this.carrot_is_open){this.carrot_close()}else{this.carrot_open()}};F._carrot.carrot_open=function(){this.onclick_default();this.carrot_is_open=1;if(this.childNodes&&this.childNodes[0]){this.childNodes[0].src=this.carrot_open_img.src;if(this.childNodes[1]){this.childNodes[1].innerHTML=this.carrot_open_text}}else{this.src=this.carrot_open_img.src}};F._carrot.carrot_close=function(){this.onclick_default();this.carrot_is_open=0;if(this.childNodes&&this.childNodes[0]){this.childNodes[0].src=this.carrot_closed_img.src;if(this.childNodes[1]){this.childNodes[1].innerHTML=this.carrot_closed_text}}else{this.src=this.carrot_closed_img.src}};F._shadow=new Object();F._shadow.shadow_go_go_go=function(c,d,b){this.shadow_use_local_coords=(b!=document.body);this.shadow_for_id=c;this.style.zIndex=d;this.style.display="none";this.style.position="absolute";this.shadow_height_plus=-14;this.shadow_width_plus=-14;this.shadow_x_plus=-0;this.shadow_y_plus=-0;if(navigator.userAgent.match(/msie 5/i)||navigator.userAgent.match(/msie 6/i)){var a='<table class="shadow_table" cellpadding="0" cellspacing="0" border="0" style="padding:0px;"><tr><td width="11"><img class="trans_png" width="11" height="11" src="'+_images_root+'/tc_white_shadow_tl.png"></td><td id="'+this.id+'_width_controller"><img class="trans_png" width="100%" height="11" src="'+_images_root+'/tc_white_shadow_t.png"></td><td width="11"><img class="trans_png" width="11" height="11" src="'+_images_root+'/tc_white_shadow_tr.png"></td></tr><tr><td height="30" id="'+this.id+'_height_controller"><img class="trans_png" width="11" height="100%" src="'+_images_root+'/tc_white_shadow_l.png"></td><td></td><td><img class="trans_png" width="11" height="100%" src="'+_images_root+'/tc_white_shadow_r.png"></td></tr><tr><td><img class="trans_png" width="11" height="11" src="'+_images_root+'/tc_white_shadow_bl.png"></td><td><img class="trans_png" width="100%" height="11" src="'+_images_root+'/tc_white_shadow_b.png"></td><td><img class="trans_png" width="11" height="11" src="'+_images_root+'/tc_white_shadow_br.png"></td></tr></table>'}else{var a='<table class="shadow_table" cellpadding="0" cellspacing="0" border="0" style="padding:0px;"><tr><td width="11"><img width="11" height="11" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_tl"></td><td id="'+this.id+'_width_controller"><img width="100%" height="11" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_t"></td><td width="11"><img width="11" height="11" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_tr"></td></tr><tr><td height="30" id="'+this.id+'_height_controller"><img width="11" height="100%" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_l"></td><td></td><td><img width="11" height="100%" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_r"></td></tr><tr><td><img width="11" height="11" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_bl"></td><td><img width="100%" height="11" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_b"></td><td><img width="11" height="11" src="'+_images_root+'/spaceout.gif" class="shadow_sprite shadow_br"></td></tr></table>'}this.innerHTML=a};F._shadow.shadow_size_and_place=function(){var d=_ge(this.shadow_for_id);if(this.shadow_use_local_coords){var a=F.get_local_X(d);var e=F.get_local_Y(d)}else{var a=Y.U.Dom.getX(d);var e=Y.U.Dom.getY(d)}if(a==undefined){return}a+=this.shadow_x_plus;e+=this.shadow_y_plus;this.style.left=a+"px";this.style.top=e+"px";var b=((d.offsetWidth)+this.shadow_width_plus);if(b<0){b=0}var c=((d.offsetHeight)+this.shadow_height_plus);if(c<0){c=0}_ge(this.id+"_width_controller").style.width=b+"px";_ge(this.id+"_height_controller").style.height=c+"px"};F._shadow.shadow_show=function(){this.style.display="block"};F._shadow.shadow_hide=function(){this.style.display="none"};F.eb_add({window_onload_dom:function(){var d=3450;var g=1111;var f=_ge("e_"+(d+g+2));var c=_ge("e_"+(d+g+3));var b=_ge("e_"+(d+g+4));var a=_ge("e_"+(d+g+5));var e=_ge("e_"+(d+g+6));if(f||c||b||a||e){F.API.callMethod("flickr.people.getMagicEmail",{user_id:global_nsid},{flickr_people_getMagicEmail_onLoad:function(k,j){if(k){var h=j.documentElement.getElementsByTagName("user")[0].getAttribute("magic_email");if(f){f.href="mailto:"+h+"@photos.flickr.com";f.innerHTML=h+"@photos.flickr.com"}if(c){c.href="mailto:"+h+"2blog@photos.flickr.com";c.innerHTML=h+"2blog@photos.flickr.com"}if(b){b.href="mailto:"+h+"@photos.flickr.com";b.innerHTML=h+"@photos.flickr.com"}if(a){a.href="mailto:"+h+"2blog@photos.flickr.com";a.innerHTML=h+"2blog@photos.flickr.com"}if(e){e.href="mailto:"+h+"2twitter@photos.flickr.com";e.innerHTML=h+"2twitter@photos.flickr.com"}}}})}}});F.set_png_bg=function(b,d,f,a){var j=(navigator.userAgent.match(/msie 6/i));if(!j){if(typeof b.setStyle!="undefined"){b.setStyle(d,f)}else{YAHOO.util.Dom.setStyle(b,d,f)}}else{var c=null;var h=(typeof a=="undefined"?"scale":a);if(f.indexOf("url(")!=-1){c=f.substr(f.indexOf("(")+1);c=c.substr(0,c.lastIndexOf(")"))}else{c=f}if(typeof b.setStyle!="undefined"){b.setStyle("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+"',sizingMethod='"+h+"')")}else{try{b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+"',sizingMethod='"+h+"')"}catch(g){YAHOO.util.Dom.setStyle(b,d,f);return false}}}};F.find_parent_node=function(a){if(!a||!a.parentNode){return false}a=a.parentNode;while(a.parentNode&&a.parentNode.nodeType!=1){a=a.parentNode}return(a.nodeType==1?a:null)};F.find_parent_node_by_name=function(a,b){if(!a||!a.parentNode||!b){return false}b=b.toLowerCase();a=a.parentNode;while(a.nodeName.toLowerCase()!=b&&a.parentNode){a=a.parentNode}return(a.nodeName.toLowerCase()==b?a:null)};F.find_parent_node_by_class_name=function(b,a){if(!b||!b.parentNode||!a){return false}b=b.parentNode;while(!Y.D.hasClass(b,a)&&b.parentNode){b=b.parentNode}return(Y.D.hasClass(b,a)?b:null)};F.is_child_of=function(a,b){if(!a||!b){return false}while(a.parentNode&&a!=b){a=a.parentNode}return(a==b)};function woe_location_obj(e,j,g,b,k,d,f,a,c,h){this.id=e;this.title=j;this.sub_title=g;this.relevance=b;this.bbox=k;this.precision=d;this.lat=f;this.lon=a;this.place_url=c;this.place_disambiguate=h}F.do_explore_location_search=function(){if(!_ge("explore_loc_search_div")){var c=document.createElement("div");c.id="explore_loc_search_div";document.body.appendChild(c);var a="explore";F.decorate(c,F._loc_search_div).div_go_go_go(a)}try{_ge("explore_loc_search_div").div_do_loc_search()}catch(b){writeDebug(b)}return false};F.do_places_world_location_search=function(){var e=_ge("txt_search_for");var d=_ge("txt_taken_in");var c=false;if(e.value==""){c=true;e.focus();e.value=places.defaults.search_for;e.select()}if(d.value==""||d.value==places.defaults.taken_in){c=true;d.focus();d.value=places.defaults.taken_in;d.select()}if(c){return false}if(!_ge("explore_loc_search_div")){var f=document.createElement("div");f.id="explore_loc_search_div";document.body.appendChild(f);var a="places_world";F.decorate(f,F._loc_search_div).div_go_go_go(a)}try{_ge("explore_loc_search_div").div_do_loc_search()}catch(b){writeDebug(b)}return false};F._loc_search_div={provider_name:(_qs_args.provider_name)?_qs_args.provider_name:"woe"};F._loc_search_div.div_go_go_go=function(d){this.page_type=d;this.input_id=(this.page_type=="org")?"loc_search_input":(this.page_type=="explore")?"exploreMapSearch":(this.page_type=="places_world")?"txt_taken_in":(this.page_type=="places_home")?"location-search-field":"header_search_q";this.logged_last=0;this.last_source_id=null;this.last_search_term=null;this.setLocation_geo_point=null;this.setLocation_source_id=null;this.setLocation_search_term=null;var c=_ge(this.input_id);this.style.display="none";F.eb_add(this);this.locations=[];this.div_show_all=0;this.current_location_index=-1;var a=document.createElement("div");a.id="loc_search_inner_div";a.style.width="300px";a.style.border="0px solid black";this.appendChild(a);var f=document.createElement("div");f.id="loc_search_header_div";f.className="Pulser";f.style.position="absolute";f.style.top="10px";f.style.left="10px";f.style.height="20px";f.style.width="30px";a.appendChild(f);var f=document.createElement("div");f.id="loc_search_header_msg_div";f.style.margin="12px 15px 10px 38px";f.style.fontWeight="normal";f.style.fontFamily="arial";f.style.fontSize="12px";f.style.color="#434343";a.appendChild(f);var f=document.createElement("div");f.id="loc_search_results_div";f.style.margin="0 0 15px 38px";a.appendChild(f);var f=document.createElement("div");f.id="loc_search_msg_div";f.style.margin="0px 0 10px 30px";f.style.display="none";a.appendChild(f);var b=document.createElement("img");b.id="loc_search_close";b.style.border="0px";b.style.position="absolute";b.style.left="281px";b.style.top="4px";b.src=_images_root+"/simple_close_default.gif";b.width=b.height="15";var e=this.id;b.onclick=function(){_ge(e).div_fade()};this.appendChild(b);F.decorate(_ge("loc_search_close"),F._simple_button).button_go_go_go()};F._loc_search_div.window_onresize=function(){if(this.style.display!="none"){this.div_show()}};F._loc_search_div.div_show=function(){if(this.style.display=="none"){this.style.visibility="hidden"}this.style.display="block";var f=_ge("loc_search_results_div");var e=Y.U.Dom.getY(_ge(this.input_id));if(this.page_type=="org"){var a=(_find_screen_width()-this.offsetWidth-3);e+=25}else{if(this.page_type=="else"||this.page_type=="world_map"){var a=(_find_screen_width()-this.offsetWidth-60);if(a>Y.U.Dom.getX(_ge(this.input_id))){a=Y.U.Dom.getX(_ge(this.input_id))}e+=23}else{if(this.page_type=="explore"){var a=Y.U.Dom.getX(_ge(this.input_id));e+=23}else{if(this.page_type=="places_world"){var a=Y.U.Dom.getX(_ge(this.input_id));e+=31}else{var b=_ge("Main");var a=(b?(Y.U.Dom.getX(b)+b.offsetWidth-this.offsetWidth):Y.U.Dom.getX(_ge("header_search_q"))-56);e+=24}}}}f.style.height="";f.style.overflow="";if(this.div_show_all){if(this.page_type=="explore"){var d=88;if(this.offsetHeight+d>_find_screen_height()){f.style.height=(_find_screen_height()-d)+"px";f.style.overflow="auto"}}else{var d=58;if(this.offsetHeight+e>_find_screen_height()+document.body.scrollTop){f.style.height=(_find_screen_height()-e-d+document.body.scrollTop)+"px";f.style.overflow="auto"}}if(this.reset_scrollTop){this.reset_scrollTop=0;f.scrollTop=0}}var c=100;this.style.opacity=c/100;this.style.filter="alpha(opacity="+c+")";this.style.left=a+"px";this.style.top=e+"px";this.style.visibility="visible";if(this.page_type=="explore"){F.scroll_this_el_into_view(this.id)}if(_ge("geo_bookmarks_div")&&typeof(_ge("geo_bookmarks_div").hide=="function")){_ge("geo_bookmarks_div").hide()}};F._loc_search_div.div_hide=function(){this.style.display="none"};F._loc_search_div.div_loading=function(){_ge("loc_search_results_div").style.display="none";_ge("loc_search_close").style.display="none";_ge("loc_search_header_div").className="Pulser_gray";_ge("loc_search_header_msg_div").innerHTML="&nbsp;&nbsp;&nbsp;"+F.output.get("searching");this.reset_scrollTop=1;this.div_show_all=0;this.div_show()};F._loc_search_div.div_fade_if_open=function(){if(this.style.display=="block"){this.div_fade()}this.div_log(0)};F._loc_search_div.div_fade=function(){var b=this;var a=function(){b.div_hide()};anim_do_opacity_to(b,7,35,0,"easeInQuad",a)};F._loc_search_div.div_update_results=function(e){if(_ge("f_div_photo_ribbon_holder")){this.page_type="world_map"}if(e){this.div_show_all=1}var g=this.locations.length;_ge("loc_search_close").style.display="block";if(this.locations.length==0){_ge("loc_search_header_div").className="Problem_small";_ge("loc_search_header_msg_div").innerHTML=F.output.get("loc_results_no_matches");_ge("loc_search_results_div").style.display="none"}else{if(this.locations.length==1){if((this.page_type=="site"||this.page_type=="explore"||this.page_type=="places_home")&&!_ge("div_force_header_location_search")){}else{if(this.page_type=="places_world"){}else{setTimeout("_ge('"+this.id+"').div_fade()",2000)}}}_ge("loc_search_header_div").className="Confirm_small";if(g==1){var d=F.output.get("loc_results_one_match")}else{var d=F.output.get("loc_results_matches",g,this.last_search_term.escape_for_display())}_ge("loc_search_header_msg_div").innerHTML=d;_ge("loc_search_results_div").style.display="block";var j=[];max_abs=20;max_to_show=8;max_to_show_if_more_than_that=5;var c=(this.current_location_index>max_to_show_if_more_than_that||this.div_show_all)?this.locations.length:(this.locations.length>max_to_show)?max_to_show_if_more_than_that:this.locations.length;for(i=0;i<c;i++){var a="margin-top:3px;";if((this.page_type=="site"||this.page_type=="explore"||this.page_type=="places_home")&&!_ge("div_force_header_location_search")){if(_ge("world_map")||_ge("f_div_photo_ribbon_holder")){if(_ge("user_places_is_go")){var b="/photos/"+_ge("user_places_is_go").innerHTML+"/places"+this.locations[i].place_url}else{var b="/places"+this.locations[i].place_url}}else{if(this.locations[i].precision=="GeocodedBuilding"||this.locations[i].precision=="POI"){var b="/map?fLat="+this.locations[i].lat+"&fLon="+this.locations[i].lon+"&zl=2&place_id="+this.locations[i].id+"&woe_sub_title="+escape(this.locations[i].sub_title)}else{var b="/map?place_id="+this.locations[i].id}}var h="_ge('"+this.id+"').div_hide(); _ge('"+this.id+"').div_log('"+this.locations[i].id+"', this.href); return false"}else{a+=(i==this.current_location_index)?"font-weight:bold; text-decoration:none":"";var h="_ge('"+this.id+"').div_on_result_click("+i+"); return false;";if(this.page_type=="else"||this.page_type=="world_map"||_ge("div_force_header_location_search")){if(this.locations[i].precision=="GeocodedBuilding"||this.locations[i].precision=="POI"){var b="/map?fLat="+this.locations[i].lat+"&fLon="+this.locations[i].lon+"&zl=2&place_id="+this.locations[i].id+"&woe_sub_title="+escape(this.locations[i].sub_title)}else{var b="/map?place_id="+this.locations[i].id}}else{if(this.locations[i].precision=="GeocodedBuilding"||this.locations[i].precision=="POI"){var b="/photos/organize/?start_tab=map&fLat="+this.locations[i].lat+"&fLon="+this.locations[i].lon+"&zl=2&place_id="+this.locations[i].id+"&woe_sub_title="+escape(this.locations[i].sub_title)}else{var b="/photos/organize/?start_tab=map&place_id="+this.locations[i].id}}}var f='<div style="margin-bottom:7px; font-size:12px; font-family:arial">';if(F.is_ie){b=encodeURI(b)}if(_ge("world_map")||_ge("f_div_photo_ribbon_holder")){f+='<a href="'+b+'" style="'+a+'" onclick="'+h+'">';if(this.locations[i].title){f+='<span class="loc_search_found_term">'+this.locations[i].title+"</span>, "}}else{if(this.locations[i].title){f+='<span class="loc_search_found_term">'+this.locations[i].title+"</span>, "}f+='<a href="'+b+'" style="'+a+'" onclick="'+h+'">'}f+=" "+this.locations[i].sub_title+"</a>";if(this.locations[i].place_disambiguate!=""){f+=" ("+this.locations[i].place_disambiguate+")"}f+="</div>";j.push(f)}if(this.locations.length>c){j.push('<br><b><a href="#" onclick="_ge(\''+this.id+"').div_update_results(1); return false;\">"+F.output.get("loc_results_more")+"</a></b>")}_ge("loc_search_results_div").innerHTML=j.join("")}this.div_show()};F._loc_search_div.div_go_to_map=function(d,c){if(!c||c<1){var b=this.locations[d].id;if(this.locations[d].precision=="GeocodedBuilding"||this.locations[d].precision=="POI"){var a="/map?fLat="+this.locations[d].lat+"&fLon="+this.locations[d].lon+"&zl=2&place_id="+b+"&woe_sub_title="+escape(this.locations[d].sub_title)}else{var a="/map?place_id="+b}document.location=a;var e=F.output.get("loc_results_take_you_there")}else{setTimeout("_ge('"+this.id+"').div_go_to_map("+d+", "+(c-1000)+")",c);if(c==0){var e=F.output.get("loc_results_zero_second")}else{if(_pi(c/1000)==1){var e=F.output.get("loc_results_one_second")}else{var e=F.output.get("loc_results_x_second",_pi(c/1000))}}}writeDebug(e);if(_ge("loc_search_msg_div")){_ge("loc_search_msg_div").style.display="block";_ge("loc_search_msg_div").innerHTML=e}};F._loc_search_div.div_go_to_place=function(d,c){if(!c||c<1){var b=this.locations[d].id;if(_ge("world_map")){if(_ge("user_places_is_go")){var a="/photos/"+_ge("user_places_is_go").innerHTML+"/places"+this.locations[d].place_url}else{var a="/places"+this.locations[d].place_url}}else{if(this.locations[d].precision=="GeocodedBuilding"||this.locations[d].precision=="POI"){var a="/map?fLat="+this.locations[d].lat+"&fLon="+this.locations[d].lon+"&zl=2&place_id="+b+"&woe_sub_title="+escape(this.locations[d].sub_title)}else{var a="/map?place_id="+b}}document.location=a;var e=F.output.get("loc_results_take_you_there")}else{setTimeout("_ge('"+this.id+"').div_go_to_place("+d+", "+(c-1000)+")",c);if(c==0){var e=F.output.get("loc_results_zero_second")}else{if(_pi(c/1000)==1){var e=F.output.get("loc_results_one_second")}else{var e=F.output.get("loc_results_x_second",_pi(c/1000))}}}writeDebug(e);if(_ge("loc_search_msg_div")){_ge("loc_search_msg_div").style.display="block";_ge("loc_search_msg_div").innerHTML=e}};F._loc_search_div.div_on_result_click=function(a){if((this.page_type=="site"||this.page_type=="explore"||this.page_type=="places_home")&&!_ge("div_force_header_location_search")){}else{this.current_location_index=a;this.focus_on_location();this.div_update_results();this.div_fade()}};F._loc_search_div.div_do_loc_search=function(){var a=window.page_map_type;var c=_ge(this.input_id).value.trim();var b=/^([-\.\d]+),\s*([-\.\d]+)$/i;var d;if(c){if(this.last_search_term!=c){if(this.last_search_term){this.div_log(0);if(this.logged_last){this.logged_last=0}}this.last_search_term=c;d=b.exec(c);if(a=="org"&&d&&d.length){this.locations=[new woe_location_obj(null,null,null,null,[d[2],d[1],d[2],d[1]].join(","),null,d[1],d[2],null,null)];this.current_location_index=0;_ge(this.id).focus_on_location();F.API.callMethod("flickr.people.geo.setLocation",{lat:d[1],lon:d[2],accuracy:16,context:"last"},this,null,null,0)}else{this.div_loading();F.API.callMethod("flickr.geocode.translate",{location:this.last_search_term,provider_name:this.provider_name},this,null,null,null,0)}}}};F._loc_search_div.div_add_source_params=function(a){if(this.setLocation_geo_point!=null&&_ge("map_controller").is_this_point_on_the_map(this.setLocation_geo_point)){writeDebug("adding source!");a.source=this.setLocation_source_id;a.query=this.setLocation_search_term}return a};F._loc_search_div.flickr_geocode_translate_onLoad=function(k,b,m,y){if(k){var n=b.documentElement.getElementsByTagName("ResultSet")[0];var q=b.documentElement.getElementsByTagName("Result");this.last_source_id=n.getAttribute("fl:source_id");this.locations=[];if(q.length==0){this.div_update_results();return}for(i=0;i<q.length;i++){try{var v=String(q[i].getAttribute("precision"))}catch(A){var v=""}try{var h=String(q[i].getElementsByTagName("woe_specificprobability")[0].firstChild.nodeValue)}catch(A){var h=""}try{var l=String(q[i].getElementsByTagName("woe_woeid")[0].firstChild.nodeValue)}catch(A){var l=""}var j=String(q[i].getElementsByTagName("Latitude")[0].firstChild.nodeValue);var e=String(q[i].getElementsByTagName("Longitude")[0].firstChild.nodeValue);try{var c=String(q[i].getElementsByTagName("woe_bbox")[0].firstChild.nodeValue)}catch(A){var c=""}try{var f=String(q[i].getElementsByTagName("Address")[0].firstChild.nodeValue)}catch(A){var f=""}try{var t=String(q[i].getElementsByTagName("City")[0].firstChild.nodeValue)}catch(A){var t=""}try{var g=String(q[i].getElementsByTagName("State")[0].firstChild.nodeValue)}catch(A){var g=""}try{var x=String(q[i].getElementsByTagName("Zip")[0].firstChild.nodeValue)}catch(A){var x=""}try{var r=String(q[i].getElementsByTagName("Country")[0].firstChild.nodeValue)}catch(A){var r=""}try{var w=String(q[i].getElementsByTagName("place_url")[0].firstChild.nodeValue)}catch(A){var w=""}try{var s=String(q[i].getElementsByTagName("place_disambiguate")[0].firstChild.nodeValue)}catch(A){var s=""}r=(r=="United States")?"US":r;r=(r=="United Kingdom")?"UK":r;var B="";var a="";var d=this.last_search_term.trim().split(" ")[0].split(",")[0];var u=d.toLowerCase();if(v=="GeocodedBuilding"||v=="POI"){if(f){a=a+", "+f}}if(t){a=a+", "+t}if(g){a=a+", "+g}if(r){a=a+", "+r}if(a.length>2){a=a.substring(2,a.length)}if(v=="County"){B=d.substring(0,1).toUpperCase()+d.substring(1,d.length)+" County"}else{if(v=="GeocodedBuilding"){a=d+" "+a}else{if(v=="POI"){a=this.last_search_term+", "+a}else{sub_titleA=a.split(", ");if(u==sub_titleA[0].toLowerCase()){if(sub_titleA[0]!=a){B=sub_titleA[0];a=a.replace_global(sub_titleA[0]+", ","")}}}}}var z=new woe_location_obj(l,B,a,h,c,v,j,e,w,s);if(z.place_url!="/"){this.locations.push(z)}}this.current_location_index=-1;this.div_update_results();if(this.locations.length==1){this.current_location_index=0;if((this.page_type=="site"||this.page_type=="explore"||this.place_type=="places_home")&&!_ge("div_force_header_location_search")){if(_ge("world_map")){this.div_go_to_place(0,0)}else{this.div_go_to_map(0,0)}}else{var o=this.id;setTimeout(function(){_ge(o).focus_on_location()},50)}}else{if(this.locations.length>0&&_pf(this.locations[0].relevance)>0.85&&this.page_type=="places_world"){this.current_location_index=0;var o=this.id;setTimeout(function(){_ge(o).focus_on_location()},50)}}}else{writeDebug("Something sucked");return}};F._loc_search_div.focus_on_location=function(){var f;if(window.YGeoPoint){f={point:YGeoPoint,bbox:null,panAndZoom:"drawZoomAndCenter",getCenter:"getCenterLatLon",getZoom:"getZoomLevel",zoomToBounds:null,poiZoom:2}}else{if(window.L&&window.L.Map){f={point:L.LatLng,bbox:L.LatLngBounds,panAndZoom:"setView",getCenter:"getCenter",getZoom:"getZoom",zoomToBounds:"fitBounds",poiZoom:17}}}if((f==undefined||this.page_type=="site"||this.page_type=="places_home")&&!_ge("div_force_header_location_search")){return}var d=this.locations[this.current_location_index];if(this.page_type=="places_world"){if(_ge("txt_search_for").value!=""&&_ge("txt_search_for").value!=places.defaults.search_for){if(_ge("user_places_is_go")){window.location="photos/"+_ge("user_places_is_go").innerHTML+"/places"+d.place_url+"/?q="+_ge("txt_search_for").value}else{window.location="/places"+d.place_url+"/?q="+_ge("txt_search_for").value}}else{alert("here")}return}if(this.locations.length==1&&(d.precision=="GeocodedBuilding"||d.precision=="POI")){var h=f.poiZoom;if(_ge("f_div_photo_ribbon_holder")){map_controller.ymap[f.panAndZoom](new f.point(d.lat,d.lon),h);_ge("f_inpt_search_what").value=F.output.get("numap_amazing_photos");_ge("f_inpt_search_where").value=F.output.get("numap_this_map");if(_ge("f_div_search_mode_tab")){_ge("f_div_search_mode_tab").firstest_time_ever=false}if(typeof(map_controller)=="object"){map_controller.from_top_search=true}_ge("f_div_search_mode_tab").do_search()}else{if(_ge("div_force_header_location_search")){var g=drag_map.ymap[f.getCenter]();if(g.Lon!=d.lon||g.Lat!=d.lat||drag_map.ymap[f.getZoom]()!=h){drag_map.ymap[f.panAndZoom](new f.point(d.lat,d.lon),h);drag_map.end_pan()}}else{var g=ymap[f.getCenter]();_ge("you_are_here_holder").setYGeoPoint(new f.point(d.lat,d.lon),h);_ge("you_are_here_holder").show(true,d.sub_title);if(g.Lon!=d.lon||g.Lat!=d.lat||ymap[f.getZoom]()!=h){ymap[f.panAndZoom](new f.point(d.lat,d.lon),h);_ge("map_controller").end_pan()}}}}else{this.best_fit_points=[];this.best_fit_points.push(new f.point(d.bbox.split(",")[1],d.bbox.split(",")[0]));this.best_fit_points.push(new f.point(d.bbox.split(",")[3],d.bbox.split(",")[2]));var j=[];for(i=0;i<this.best_fit_points.length;i++){j.push(this.best_fit_points[i])}if(_ge("f_div_photo_ribbon_holder")){if(f.zoomToBounds){ymap[f.zoomToBounds](new f.bbox(j))}else{var h=map_controller.ymap[f.getZoom](j);if(d.precision!="GeocodedStreet"){h=Math.max(5,h);var b=map_controller.ymap.getGeoBox(j);var c=map_controller.ymap.getBoxGeoCenter(b.min,b.max)}else{var c=new f.point(d.lat,d.lon);var h=3}map_controller.ymap[f.panAndZoom](c,h);_ge("f_inpt_search_what").value=F.output.get("numap_amazing_photos");_ge("f_inpt_search_where").value=F.output.get("numap_this_map");if(_ge("f_div_search_mode_tab")){_ge("f_div_search_mode_tab").firstest_time_ever=false}if(typeof(map_controller)=="object"){map_controller.from_top_search=true}_ge("f_div_search_mode_tab").do_search()}}else{if(_ge("div_force_header_location_search")){if(f.zoomToBounds){ymap[f.zoomToBounds](new f.bbox(j))}else{var g=drag_map.ymap[f.getCenter]();var h=drag_map.ymap[f.getZoom](j);if(d.precision!="GeocodedStreet"){h=Math.max(5,h);var b=drag_map.ymap.getGeoBox(j);var c=drag_map.ymap.getBoxGeoCenter(b.min,b.max)}else{var c=new f.point(d.lat,d.lon);var h=3}if(g.Lon!=c.Lon||g.Lat!=c.Lat||drag_map.ymap[f.getZoom]()!=h){drag_map.ymap[f.panAndZoom](c,h);drag_map.end_pan()}}}else{if(f.zoomToBounds){var e=_ge("map_controller").dots;if(e){for(var a in e){if(a.indexOf("dot_holder")>-1&&e.hasOwnProperty(a)){e[a].show(false)}}}ymap[f.zoomToBounds](new f.bbox(j))}else{var g=ymap[f.getCenter]();var h=ymap[f.getZoom](j);_ge("you_are_here_holder").show(false,"");if(d.precision!="GeocodedStreet"){h=Math.max(5,h);var b=ymap.getGeoBox(j);var c=ymap.getBoxGeoCenter(b.min,b.max)}else{var c=new f.point(d.lat,d.lon);var h=3}if(g.Lon!=c.Lon||g.Lat!=c.Lat||ymap[f.getZoom]()!=h){ymap[f.panAndZoom](c,h);_ge("map_controller").end_pan()}}}}}this.setLocation_geo_point=new f.point(d.lat,d.lon);this.setLocation_source_id=this.last_source_id;this.setLocation_search_term=this.last_search_term;this.div_log(d.id)};F._loc_search_div.div_log=function(a,b){if(this.provider_name&&this.provider_name.toLowerCase()=="yahoo"){return}if(this.locations.length<2&&this.page_type!="places_home"){return}if(!a&&this.logged_last){return}this.logged_last=1;F.API.callMethod("flickr.geocode.log",{query:this.last_search_term,result_id:a,provider_name:this.provider_name},{flickr_geocode_log_onLoad:function(){if(b){document.location=b}}})};F._canvas={canvas_go_go_go:function(a,b){if(a!=undefined){this.width=a;this.style.width=a+"px"}if(b!=undefined){this.height=b;this.style.height=b+"px"}if(F.is_ie&&!this.getContext){G_vmlCanvasManager_.initElement(this)}},rounded_rect:function(a,f,c,d,e){var b=this.getContext("2d");b.beginPath();b.moveTo(a,f+e);b.lineTo(a,f+d-e);b.quadraticCurveTo(a,f+d,a+e,f+d);b.lineTo(a+c-e,f+d);b.quadraticCurveTo(a+c,f+d,a+c,f+d-e);b.lineTo(a+c,f+e);b.quadraticCurveTo(a+c,f,a+c-e,f);b.lineTo(a+e,f);b.quadraticCurveTo(a,f,a,f+e);b.stroke()}};F._simple_button={button_disabled:0,button_go_go_go:function(e){this.EXT=this;this.style.cursor=(F.is_ie)?"hand":"pointer";if(this.tagName=="IMG"){this.img_id=this.id}else{for(var c=0;c<this.childNodes.length;c++){var a=this.childNodes[c];if(a.tagName=="IMG"){if(!a.id){a.id=this.id+"IMG"}this.img_id=a.id}else{if(a.tagName=="SPAN"){if(!a.id){a.id=this.id+"SPAN"}this.span_id=a.id}}}}if(!this.img_id){return}this.button_has_disabled_src=(e)?1:0;var d=this.button_get_img();this.img_format=d.src.split(".")[d.src.split(".").length-1];if(/v[0-9]+/.test(this.img_format)){this.img_format=d.src.split(".")[d.src.split(".").length-2]}var g=d.src.split("/");var h=g[g.length-1];this.img_path_root=d.src.replace_global("/"+h,"");var j=h.split("_default."+this.img_format)[0];this.button_set_img_srcs(j);if(this.img_format=="png"){d.className="trans_png"}this.button_is_down=0;this.button_is_over=0;if(this.onclick){var f=this.onclick;var b=this.button_default_onclick;this.onclick=function(k){f.apply(this,[k]);b.apply(this,[k])}}else{this.onclick=this.button_default_onclick}return this},button_get_img:function(){return _ge(this.img_id)},button_get_span:function(){return _ge(this.span_id)},button_set_img_srcs_and_change:function(a){this.button_set_img_srcs(a);this.button_change_src()},button_set_text:function(a){var b=this.button_get_span();if(!b){return}b.innerHTML=a},button_set_img_srcs:function(a){this.button_default_img={};this.button_default_img.src=this.img_path_root+"/"+a+"_default."+this.img_format;this.button_hover_img={};this.button_hover_img.src=this.img_path_root+"/"+a+"_hover."+this.img_format;this.button_selected_img={};this.button_selected_img.src=this.img_path_root+"/"+a+"_selected."+this.img_format;F.preload_images(this.button_default_img.src,this.button_hover_img.src,this.button_selected_img.src);if(this.button_has_disabled_src){this.button_disabled_img={};this.button_disabled_img.src=this.img_path_root+"/"+a+"_disabled."+this.img_format;F.preload_images(this.button_disabled_img.src)}else{this.button_disabled_img=this.button_default_img}},button_change_src:function(){var a=this.button_default_img.src;if(this.button_disabled){a=this.button_disabled_img.src}else{if(this.button_is_down){a=this.button_selected_img.src}else{if(this.button_is_over){a=this.button_hover_img.src}}}var b=this.button_get_img();if(b){b.src=a}},button_enable:function(){this.button_disabled=0;this.button_change_src();if(this.tagName=="A"){this.className=this.className.replace_global("_disabled","")}},button_disable:function(){if(this.button_disabled){return}this.button_disabled=1;this.button_is_over=0;this.button_is_down=0;this.button_change_src();if(this.tagName=="A"){this.className=this.className+"_disabled"}},onmouseover:function(){if(this.button_disabled){return}this.button_is_over=1;this.button_change_src()},onmouseout:function(){if(this.button_disabled){return}this.button_is_over=0;this.button_is_down=0;this.button_change_src()},onmousedown:function(){if(this.button_disabled){return}this.button_is_over=1;this.button_is_down=1;this.button_change_src()},onmouseup:function(){if(this.button_disabled){return}this.button_is_over=1;this.button_is_down=0;this.button_change_src()},button_default_onclick:function(a){this.blur();return false}};F._link_button={_decotype:F._simple_button,button_go_go_go:function(){F._link_button._decotype.button_go_go_go.apply(this)},button_default_onclick:function(a){this.blur();return true}};F._button_bar={bar_go_go_go:function(){if(!this.bar_button){return}var b=Y.U.Dom.getElementsByClassName("menu_li","li",this);for(var a=0;a<b.length;a++){F.decorate(b[a],this.bar_button).button_go_go_go()}}};F._l10n_button={button_go_go_go:function(){this.button_menu_id=this.id.replace_global("button","menu");this.button_form_id=this.id.replace_global("button","form");var d=_ge(this.button_form_id);if(d){var c=this;d.onsubmit=function(){c.button_close();return false}}this.button_is_open=0;this.button_is_split=(this.button_get_img().src.indexOf("_split")>-1)?1:0;this.onclick_default=(this.onclick)?this.onclick:function(){};this.onclick=this.onclick_handler;var b=this.button_get_a();if(!b){return}b.onclick_default=(b.onclick)?b.onclick:null;b.onclick=null},button_get_img:function(){if(this.tagName=="IMG"){return this}return this.getElementsByTagName("img")[0]},button_get_src:function(b){if(!b){b="default"}var a=(this.button_is_split)?"split_":"";return _images_root+"/"+this.button_img_root+a+b+"."+this.button_img_ext},button_close:function(b){var a=this.button_get_img();Y.U.Dom.removeClass(this,"selected");if(b){a.src=this.button_get_src("hover")}else{Y.U.Dom.removeClass(this,"hover");a.src=this.button_get_src()}_ge(this.button_menu_id).style.display="none";this.button_is_open=0;document.onmousedown=null;F.eb_broadcast("stewart_play_if_was_playing")},button_disable:function(){this.onmouseout();this.button_is_disabled=1},button_undisable:function(){this.button_is_disabled=0},button_go_down:function(b){b=b||"both";if(b=="both"||b=="left"){Y.U.Dom.addClass(this,"selected")}if(b=="both"||b=="right"){var a=this.button_get_img();a.src=this.button_get_src("selected")}},button_open:function(){if(this.button_is_split){this.button_go_down("right")}else{this.button_go_down()}var a=_ge(this.button_menu_id);if(!a){return}a.style.display="block";this.button_is_open=1;F.eb_broadcast("stewart_pause");var b=this;document.onmousedown=function c(g){var f=_get_event_src(g);var d=0;if(f.parentNode){while(f.parentNode){if(f.parentNode==b){d=1;break}f=f.parentNode}}if(!d){b.button_close()}}},button_swap_image_if_needed:function(c,d){var b=this.button_get_img();if(b){var a=_get_event_src(c);if(a==b||this.button_always_swap_img){b.src=this.button_get_src(d);return 1}}return 0},onmouseover:function(a){if(this.button_is_disabled){return}if(this.button_is_open){return}Y.U.Dom.addClass(this,"hover");if(!this.button_swap_image_if_needed(a,"hover")){Y.U.Dom.addClass(this,"hover_left")}else{Y.U.Dom.removeClass(this,"hover_left")}},onmouseout:function(a){if(this.button_is_disabled){return}if(this.button_is_open){return}this.button_swap_image_if_needed(a,"default");Y.U.Dom.removeClass(this,"hover");Y.U.Dom.removeClass(this,"hover_left");Y.U.Dom.removeClass(this,"selected")},onmouseup:function(a){_enable_select();if(this.button_is_disabled){return}if(this.button_is_open){return}this.button_swap_image_if_needed(a,"hover");Y.U.Dom.removeClass(this,"selected")},onmousedown:function(f){if(this.button_is_disabled){return}if(this.button_is_split){var b=_get_event_src(f);var d=this.button_get_img();if(b==d){this.button_go_down("right")}else{this.button_go_down("left")}}else{this.button_go_down()}var b=_get_event_src(f);if(this.button_click_is_in_menu(b)){return}var c=this.button_get_a();if(!c||!c.href){_disable_select();return false}},onclick_handler:function(j){if(this.button_is_disabled){return false}var c=_get_event_src(j);var f=this.button_get_img();if(c==f||!this.button_is_split){if(this.button_is_open){var k=1;var h=_ge(this.button_form_id);if(h){if(this.button_click_is_in_menu(c)){k=0}}if(k){this.button_close(1)}}else{var b=_ge(this.button_menu_id);if(b){this.button_open()}}}if((c!=f||c==this)&&!this.button_click_is_in_menu(c)){var d=this.button_get_a();if(d){if(d.onclick_default){return d.onclick_default()}if(d.href&&c!=d){document.location=d.href;return}}else{this.onclick_default()}if(this.button_is_split){var b=_ge(this.button_menu_id);var g=b.getElementsByTagName("A");if(g&&g[0]){if(g[0].onclick){return g[0].onclick()}if(g[0].href){if(!d){document.location=g[0].href;return}else{if(!d.href){d.href=g[0].href}return 1}}}}}},button_get_a:function(){var a=this.getElementsByTagName("A");if(!a){return null}return a[0]},button_click_is_in_menu:function(a){var b=a;while(b){if(Y.U.Dom.hasClass(b,"candy_menu")){return 1}b=b.parentNode;if(b==this){return 0}}return 0}};F._nav_button={_decotype:F._l10n_button,button_always_swap_img:0,button_img_root:"site_nav_caret_",button_img_ext:"png",button_go_go_go:function(){F.preload_images(_images_root+"/site_nav_caret_split_default.png",_images_root+"/site_nav_caret_split_hover.png",_images_root+"/site_nav_caret_split_selected.png");F._nav_button._decotype.button_go_go_go.apply(this)}};F._gray_menu_button={_decotype:F._l10n_button,button_always_swap_img:1,button_img_root:"gray_button_caret_",button_img_ext:"gif",button_go_go_go:function(){F.preload_images(_images_root+"/gray_button_caret_default.gif",_images_root+"/gray_button_caret_hover.gif",_images_root+"/gray_button_caret_selected.gif",_images_root+"/gray_button_caret_split_default.gif",_images_root+"/gray_button_caret_split_hover.gif",_images_root+"/gray_button_caret_split_selected.gif",_images_root+"/gray_button_bg_hover.gif",_images_root+"/gray_button_bg_selected.gif");F._gray_menu_button._decotype.button_go_go_go.apply(this)}};F._gray_button={_decotype:F._l10n_button,button_always_swap_img:1,button_img_root:"gray_button_no_caret_",button_img_ext:"gif",button_go_go_go:function(){F.preload_images(_images_root+"/gray_button_no_caret_default.gif",_images_root+"/gray_button_no_caret_hover.gif",_images_root+"/gray_button_no_caret_selected.gif",_images_root+"/gray_button_bg_hover.gif",_images_root+"/gray_button_bg_selected.gif");F._gray_button._decotype.button_go_go_go.apply(this)}};F._gray_button_bar={_decotype:F._button_bar,bar_button:F._gray_menu_button,bar_go_go_go:function(){var b=Y.U.Dom.getElementsByClassName("no_menu_li","li",this);for(var a=0;a<b.length;a++){F.decorate(b[a],F._gray_button).button_go_go_go()}F._gray_button_bar._decotype.bar_go_go_go.apply(this)}};F._nav_button_bar={_decotype:F._button_bar,bar_button:F._nav_button};F.str_to_XML=function(b){var a;if(window.DOMParser){var c=new DOMParser();a=c.parseFromString(b,"text/xml")}else{if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLDOM");a.async=false;a.loadXML(b)}else{}}if(a.normalize){a.normalize()}return a};F.make_hoverable=function(a,b){a.hover_class=b;Y.U.Event.addListener(a,"mouseover",F.handle_hoverable_mouseover);Y.U.Event.addListener(a,"mouseout",F.handle_hoverable_mouseout)};F.handle_hoverable_mouseover=function(a){Y.U.Dom.addClass(this,this.hover_class)};F.handle_hoverable_mouseout=function(a){Y.U.Dom.removeClass(this,this.hover_class)};F.html_info={show:function(a){if(!a){return}if(!a.tip_div){var b=document.createElement("div");b.style.padding="10 0";b.style.display="none";b.innerHTML='<img src="'+_images_root+'/pulser2.gif" width="32" height="15" border="0">';a.tip_div=b;a.parentNode.appendChild(b);a.fragment_onLoad=function(e,c,d){a.fragment_loaded=1;a.tip_div.innerHTML=c;F.scroll_this_el_into_view(a.tip_div)}}if(a.tip_div.style.display=="none"){if(_ge("html_info_caret")){_ge("html_info_caret").src=_images_root+"/caret_open_down.gif"}a.tip_div.style.display="block";if(_ge("div_invite_loader")){_ge("div_invite_loader").style.display="none"}if(!a.fragment_loaded){F.fragment_getter.get(a.href+"&only_fragment=1",{},a,"fragment_onLoad")}else{F.scroll_this_el_into_view(a.tip_div)}}else{if(_ge("html_info_caret")){_ge("html_info_caret").src=_images_root+"/caret_closed.gif"}a.tip_div.style.display="none";if(_ge("div_invite_loader")){_ge("div_invite_loader").style.display="block"}}},showZeus:function(a){if(!a){return}if(!a.tip_div){var b=document.createElement("div");b.style.padding="10 0";b.style.display="none";b.innerHTML='<img src="'+_images_root+'/pulser2.gif" width="32" height="15" border="0">';a.tip_div=b;a.parentNode.appendChild(b);a.fragment_onLoad=function(e,c,d){a.fragment_loaded=1;a.tip_div.innerHTML=c;F.scroll_this_el_into_view(a.tip_div)}}if(a.tip_div.style.display=="none"){if(_ge("html-info-caret")){_ge("html-info-caret").innerHTML="&#9662;"}a.tip_div.style.display="block";if(_ge("div_invite_loader")){_ge("div_invite_loader").style.display="none"}if(!a.fragment_loaded){F.fragment_getter.get(a.href+"&only_fragment=1",{},a,"fragment_onLoad")}else{F.scroll_this_el_into_view(a.tip_div)}}else{if(_ge("html-info-caret")){_ge("html-info-caret").innerHTML="&#9656;"}a.tip_div.style.display="none";if(_ge("div_invite_loader")){_ge("div_invite_loader").style.display="block"}}}};F.osming={osming:false,check_map:function(j,o){var e=j.getCenterLatLon();var k=j.getZoomLevel();var m=j.getCurrentMapType();if(typeof(_use_osm)!="undefined"&&_use_osm==true){var h=false;var d="";var a=0;var l;var c=[2008,2009];if(typeof photo_taken_year!="undefined"){for(var b=0,f=c.length;b<f;b++){if(c[b]==photo_taken_year){l=_pi(photo_taken_year);break}}}if(m=="YAHOO_MAP"){if(k<10){if(e.Lat>=-4.3634901047&&e.Lat<=-4.3009300232&&e.Lon>=15.2374696732&&e.Lon<=15.3460502625){h=true}if(e.Lat>=2.0093801022&&e.Lat<=2.0614199638&&e.Lon>=45.313911438&&e.Lon<=45.3669013977){h=true}if(e.Lat>=-17.8511505127&&e.Lat<=-17.7955493927&&e.Lon>=31.021030426&&e.Lon<=31.0794296265){h=true}if(e.Lat>=-1.3546253687&&e.Lat<=-1.1987955811&&e.Lon>=36.7169952392&&e.Lon<=36.9593811035){h=true;d="kibera"}if(e.Lat>=5.5237197876&&e.Lat<=5.5998301506&&e.Lon>=-0.253580004&&e.Lon<=-0.1586299986){h=true}if(e.Lat>=30.0068798065&&e.Lat<=30.1119003296&&e.Lon>=31.2149791718&&e.Lon<=31.311170578){h=true}if(e.Lat>=36.699760437&&e.Lat<=36.8181610107&&e.Lon>=2.9909501076&&e.Lon<=3.1476099491){h=true}if(e.Lat>=50.3168792725&&e.Lon>=30.3380508423&&e.Lat<=50.5327110291&&e.Lon<=30.713060379){h=true}if(e.Lat>=16.4462890625&&e.Lon>=107.5323104858&&e.Lat<=16.4913291931&&e.Lon<=107.6173629761){h=true}if(e.Lat>=4.5628199577&&e.Lon>=-74.1714935303&&e.Lat<=4.7098898888&&e.Lon<=-74.0556335449){h=true}if(e.Lat>=3.403539896&&e.Lon>=-76.5521697998&&e.Lat<=3.4737200737&&e.Lon<=-76.4818496704){h=true}if(e.Lat>=6.2083601952&&e.Lon>=-75.618598938&&e.Lat<=6.2879300117&&e.Lon<=-75.5447769165){h=true}if(k<9){if(e.Lat>=35.46290704974905&&e.Lat<=36.02799998329552&&e.Lon>=139.21875&&e.Lon<=140.27069091796875){h=true}if(e.Lat>=17.811454&&e.Lat<=20.179721&&e.Lon>=-74.641111&&e.Lon<=-68.225095){h=true}if(k<8){if(e.Lat>=39.8558502197&&e.Lat<=40.0156097412&&e.Lon>=116.2662734985&&e.Lon<=116.4829177856){h=true}if(e.Lat>=-34.6944313049&&e.Lat<=-34.4146499634&&e.Lon>=-58.6389389038&&e.Lon<=-58.2992210388){h=true}if(e.Lat>=35.6444816589&&e.Lat<=35.7650184631&&e.Lon>=51.3495407104&&e.Lon<=51.4786109924){h=true}if(e.Lat>=20.9743099213&&e.Lat<=21.0687198639&&e.Lon>=105.7889633179&&e.Lon<=105.878868103){h=true}if(e.Lat>=10.7326498032&&e.Lat<=10.8422002792&&e.Lon>=106.6206512451&&e.Lon<=106.7253265381){h=true}if(e.Lat>=23.0498790741&&e.Lat<=23.1469707489&&e.Lon>=-82.4551391602&&e.Lon<=-82.3025131226){h=true}if(e.Lat>=-33.5340118408&&e.Lat<=-33.3920707703&&e.Lon>=-70.7330093384&&e.Lon<=-70.5628662109){h=true}if(e.Lat>=14.4964799881&&e.Lat<=14.6804504395&&e.Lon>=120.9344711304&&e.Lon<=121.0866470337){h=true}if(e.Lat>=7.0708699226&&e.Lat<=7.0890498161&&e.Lon>=125.6036834717&&e.Lon<=125.6218566895){h=true}if(e.Lat>=10.2898797989&&e.Lat<=10.3323202133&&e.Lon>=123.8772964478&&e.Lon<=123.9136810303){h=true}if(e.Lat>=-35.2210502625&&e.Lat<=-34.6507987976&&e.Lon>=138.4653778076&&e.Lon<=138.7634735107){h=true}if(e.Lat>=-34.1896095276&&e.Lat<=-33.5781402588&&e.Lon>=150.5171661377&&e.Lon<=151.3425750732){h=true}if(e.Lat>=-27.8130893707&&e.Lat<=-27.0251598358&&e.Lon>=152.6393127441&&e.Lon<=153.3230438232){h=true}if(e.Lat>=-35.4803314209&&e.Lat<=-35.1245193481&&e.Lon>=148.9959259033&&e.Lon<=149.2332458496){h=true}if(e.Lat>=-38.4112510681&&e.Lat<=-37.5401115417&&e.Lon>=144.5532073975&&e.Lon<=145.5077362061){h=true}if(e.Lat>=33.2156982422&&e.Lat<=33.4300994873&&e.Lon>=44.2592010498&&e.Lon<=44.5364112854){h=true}if(e.Lat>=34.461101532&&e.Lat<=34.5925598145&&e.Lon>=69.0997009277&&e.Lon<=69.2699813843){h=true}if(k<7){if(e.Lat>=40.735551&&e.Lat<=40.807533&&e.Lon>=-119.272041&&e.Lon<=-119.163379&&l==2008){h=true;a=1}if(e.Lat>=40.7472569628&&e.Lat<=40.7971774152&&e.Lon>=-119.267578125&&e.Lon<=-119.201660156){h=true;a=1}}}}}}if(h){if(!this.osming){this.osming=true;this.oldTileReg=YMapConfig.tileReg;var g="/map_openstreetmap_tile_broker.gne?t=m&";if(d!=""){g+="v="+d+"&"}if(a){g+="bm="+a+"&";if(l){g+="yr="+l+"&"}}YMapConfig.tileReg=[g,g];if(_ge("f_div_osm_cc")){_ge("f_div_osm_cc").style.display="block"}j._cleanTileCache();j._callTiles()}setTimeout("F.osming.hide_y_copy('"+o+"')",100);setTimeout("F.osming.hide_y_copy('"+o+"')",800)}else{if(this.osming==true){this.osming=false;YMapConfig.tileReg=this.oldTileReg;if(_ge("f_div_osm_cc")){_ge("f_div_osm_cc").style.display="none"}j._cleanTileCache();j._callTiles();setTimeout("F.osming.show_y_copy('"+o+"')",100);setTimeout("F.osming.show_y_copy('"+o+"')",800)}}}},hide_y_copy:function(b){var a=Y.U.Dom.getElementsBy(function(c){if((c.style.left=="1px"&&c.style.bottom=="0px")||c.src.indexOf("/copy")>=0){return true}return false},"img",_ge(b));if(a.length==1){a[0].style.display="none"}var a=Y.U.Dom.getElementsBy(function(c){if(c.src.indexOf("/yahoo.png")>=0){return true}return false},"img",_ge(b));if(a.length==1){a[0].style.display="none"}var a=Y.U.Dom.getElementsBy(function(c){if(c.innerHTML.indexOf("Yahoo!")>=0){return true}return false},"div",_ge(b));if(a.length==1){a[0].style.display="none"}},show_y_copy:function(b){var a=Y.U.Dom.getElementsBy(function(c){if((c.style.left=="1px"&&c.style.bottom=="0px")||c.src.indexOf("/copy")>=0){return true}return false},"img",_ge(b));if(a.length==1){a[0].style.display="block"}var a=Y.U.Dom.getElementsBy(function(c){if(c.src.indexOf("/yahoo.png")>=0){return true}return false},"img",_ge(b));if(a.length==1){a[0].style.display="block"}var a=Y.U.Dom.getElementsBy(function(c){if(c.innerHTML.indexOf("Yahoo!")>=0){return true}return false},"div",_ge(b));if(a.length==1){a[0].style.display="block"}}};F.set_spaceid=function(g){var h="//geo.yahoo.com/f?";var a=_ge("beacon");if(!a||!a.getElementsByTagName("img")[0]){return false}var d=a.getElementsByTagName("img")[0];var b=d.src;b=b.substr(b.indexOf("?")+1);var c=b.split("&");var j={s:"792600122",t:(new Date()).getTime(),r:encodeURIComponent(window.location.href)};if(g){j.s=g}var k=null;for(var e=0,f=c.length;e<f;e++){k=c[e].split("=")[0];if(j[k]){c[e]=k+"="+j[k]}}d.src=h+c.join("&");writeDebug("beaconImg.src: "+d.src)};F.getty_intl_warn=function(f){var b={"en-us":"english","fr-fr":false,"de-de":false,"es-us":false,"it-it":false,"pt-br":false,"zh-hk":false,"ko-kr":false};var d="";if(!global_intl_lang||typeof b[global_intl_lang]=="undefined"){F.getty_log_omniture();return true}if(b[global_intl_lang]){F.getty_log_omniture();window.location.href=f}else{if(global_comm_div){var h=_ge("comm_div");var g=_ge("shadow_div");var a=null;if(h){a=F.find_parent_node(h).removeChild(h);if(g){g=F.find_parent_node(g).removeChild(g);g.style.left="0px";g.style.top="0px";document.body.appendChild(g)}global_comm_div=null}}if(!global_comm_div){_make_comm_div("10001")}function c(){F.getty_log_omniture();window.location.href=f}function e(){_ge("shadow_div").style.display="none";_ge("shadow_div").style.left="-9999px";_ge("shadow_div").style.top="-9999px"}global_comm_div.start_comming(F.output.get("getty_intl_warning"),undefined,undefined,true,true,F.output.get("go_ahead"),c,true,F.output.get("remain_here"),e,undefined,true,false);return false}};F.getty_log_omniture=function(){if(window.s_gi){var a=s_gi(s_account);a.linkTrackVars="eVar9,events";a.linkTrackEvents="event21";a.eVar9=page_photo_id;a.events="event21";a.tl("","o","Link Name")}};Y.E.addListener(window,"load",function(){window.setTimeout(F._preload_images_ready,1000)});F.keyboardShortcuts={enabled:false,handlers:{jumpToSearchField:function(b,a,d){var c=_ge("header_search_q");if(c&&c.tagName.toLowerCase()==="input"&&c.focus){Y.E.stopEvent(a[1]);F.scroll_this_el_into_view(c,null,function(){c.focus()},null,10,true)}},jumpToCommentField:function(b,a,d){var c=_ge("message");if(c&&c.tagName.toLowerCase()==="textarea"&&c.focus){Y.E.stopEvent(a[1]);F.scroll_this_el_into_view(c,null,function(){c.focus()},null,60,true)}},addTag:function(b,a,c){if(tagrs_showForm&&typeof tagrs_showForm==="function"){Y.E.stopEvent(a[1]);F.scroll_this_el_into_view("tagadderlink",null,function(){tagrs_showForm()},null,0,true)}},addPerson:function(b,a,d){var c=_ge("add-person-link");if(c&&typeof c.onclick==="function"){Y.E.stopEvent(a[1]);F.scroll_this_el_into_view(c,null,function(){c.onclick()},null,0,true)}},favoritePhoto:function(b,a,c){var d=_ge("photo_gne_button_add_to_faves");if(d&&typeof d.handle_click==="function"){Y.E.stopEvent(a[1]);F.scroll_this_el_into_view("photo_gne_button_add_to_faves",null,function(){d.handle_click()},null,0,true)}},nextPhotoInContext:function(b,a,c){if(nextprev_currentContextID){var d=_ge("nextprev_div_"+nextprev_currentContextID);if(d&&d.next_url){Y.E.stopEvent(a[1]);window.location=d.next_url}}},prevPhotoInContext:function(b,a,c){if(nextprev_currentContextID){var d=_ge("nextprev_div_"+nextprev_currentContextID);if(d&&d.prev_url){Y.E.stopEvent(a[1]);window.location=d.prev_url}}},nextContext:function(b,a,c){},previousContext:function(b,a,c){},navigateToUpload:function(){window.location="/photos/upload/"},navigateToYourPhotostream:function(){window.location=photos_url},navigateToOrganizr:function(){window.location="/photos/organize/"},navigateToRecentActivity:function(){window.location="/activity/"},navigateToContactsUploads:function(){window.location="/photos/friends/"},navigateToGroups:function(){window.location="/groups/"},navigateToHelp:function(){window.location="/help/"}},enableAll:function(){if(F.keyboardShortcuts.enabled){return}F.keyboardShortcuts.jumpToSearchField.enable();F.keyboardShortcuts.jumpToCommentField.enable();F.keyboardShortcuts.addPerson.enable();F.keyboardShortcuts.favoritePhoto.enable();F.keyboardShortcuts.nextPhotoInContext.enable();F.keyboardShortcuts.prevPhotoInContext.enable();F.keyboardShortcuts.navigateToUpload.enable();F.keyboardShortcuts.navigateToYourPhotostream.enable();F.keyboardShortcuts.navigateToOrganizr.enable();F.keyboardShortcuts.navigateToRecentActivity.enable();F.keyboardShortcuts.navigateToContactsUploads.enable();F.keyboardShortcuts.navigateToGroups.enable();F.keyboardShortcuts.enabled=true},disableAll:function(){if(!F.keyboardShortcuts.enabled){return}F.keyboardShortcuts.jumpToSearchField.disable();F.keyboardShortcuts.jumpToCommentField.disable();F.keyboardShortcuts.addPerson.disable();F.keyboardShortcuts.favoritePhoto.disable();F.keyboardShortcuts.nextPhotoInContext.disable();F.keyboardShortcuts.prevPhotoInContext.disable();F.keyboardShortcuts.navigateToUpload.disable();F.keyboardShortcuts.navigateToYourPhotostream.disable();F.keyboardShortcuts.navigateToOrganizr.disable();F.keyboardShortcuts.navigateToRecentActivity.disable();F.keyboardShortcuts.navigateToContactsUploads.disable();F.keyboardShortcuts.navigateToGroups.disable();F.keyboardShortcuts.enabled=false}};F.keyboardShortcuts.jumpToSearchField=new Y.U.KeyListener(document,{keys:83,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.jumpToSearchField,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.jumpToCommentField=new Y.U.KeyListener(document,{keys:67,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.jumpToCommentField,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.addTag=new Y.U.KeyListener(document,{keys:84,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.addTag,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.addPerson=new Y.U.KeyListener(document,{keys:80,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.addPerson,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.favoritePhoto=new Y.U.KeyListener(document,{keys:70,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.favoritePhoto,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.nextPhotoInContext=new Y.U.KeyListener(document,{keys:75,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.nextPhotoInContext,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.prevPhotoInContext=new Y.U.KeyListener(document,{keys:74,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.prevPhotoInContext,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.nextContext=new Y.U.KeyListener(document,{keys:73,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.nextContext,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.previousContext=new Y.U.KeyListener(document,{keys:77,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.previousContext,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.navigateToUpload=new Y.U.KeyListener(document,{keys:85,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.navigateToUpload,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.navigateToYourPhotostream=new Y.U.KeyListener(document,{keys:89,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.navigateToYourPhotostream,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.navigateToOrganizr=new Y.U.KeyListener(document,{keys:79,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.navigateToOrganizr,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.navigateToRecentActivity=new Y.U.KeyListener(document,{keys:82,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.navigateToRecentActivity,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.navigateToContactsUploads=new Y.U.KeyListener(document,{keys:78,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.navigateToContactsUploads,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.navigateToGroups=new Y.U.KeyListener(document,{keys:71,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.navigateToGroups,scope:F.keyboardShortcuts,correctScope:true});F.keyboardShortcuts.navigateToHelp=new Y.U.KeyListener(document,{keys:191,ctrl:true,shift:true},{fn:F.keyboardShortcuts.handlers.navigateToHelp,scope:F.keyboardShortcuts,correctScope:true});F.wordwrap=function(n,t,d,q){var e=t||75,o=d||"\n",k=q||false,h,g,f,u,a;for(h=-1,f=(a=n.split(/\r\n|\n|\r/)).length;++h<f;a[h]+=u){for(u=a[h],a[h]="";u.length>e;a[h]+=u.slice(0,g)+((u=u.slice(g)).length?o:"")){g=k==2||(g=u.slice(0,e+1).match(/\S*(\s)?$/))[1]?e:g.input.length-g[0].length||k==1&&e||g.input.length+(g=u.slice(e).match(/^\S*/)).input.length}}return a.join("\n")};F.get_elm_size=function(d){var b=_ge("OffScreenElm");if(!b){b=document.createElement("div");b.id="OffScreenElm";b.style.position="absolute";b.style.top="-9999px";b.style.left="-9999px";document.getElementsByTagName("body")[0].appendChild(b)}b.innerHTML=d.innerHTML;var a=b.offsetWidth;var c=b.offsetHeight;b.innerHTML="";return[a,c]};F.GlobalDialog=function(){writeDebug("F.GlobalDialog()");var a=this;var c=(navigator.userAgent.match(/msie/i));var e=Y.D.getElementsByClassName;var b="global_dialog";var d=(navigator.userAgent.match(/msie 6/i));this.spinner=null;this.is_modal=false;this.events_on=false;this.o_shadows=null;this.is_showing=false;this.style="default";this.last_style=null;this.on_escape_handler=null;this.o=null;this.o_container=null;this.o_cover=null;this.get_elements=function(){if(!a.o_cover){a.o_cover=_ge("global-dialog-background")}if(!a.o||!a.o_container){a.o=document.getElementById(b);if(!a.o){writeDebug("F.GlobalDialog(): Warn: o_dialog is null/undefined");return false}else{writeDebug("F.GlobalDialog().get_elements");a.o_container=e("global_dialog_container","div",a.o)[0];if(a.o){a.o_shadows={left:e("shadow_l","div",a.o)[0],right:e("shadow_r","div",a.o)[0]};return true}}}else{return true}};this.reposition=function(){if(!a.get_elements()){writeDebug("GlobalDialog.reposition: o is null?");return false}var g=parseInt(a.o_container.offsetHeight);if(a.o_shadows&&a.o_shadows.left&&a.o_shadows.right){a.o_shadows.left.style.height=a.o_shadows.right.style.height=(g+"px")}a.o.style.marginLeft=-(parseInt(a.o.offsetWidth)/2)+"px";a.o.style.marginTop=-(parseInt(a.o.offsetHeight)/2)+"px";a.o.style.left="50%";a.o.style.top="50%";if(c){if(window.innerWidth){var f=window.pageXOffset;var h=window.pageYOffset}else{var f=document.body.scrollLeft;var h=document.body.scrollTop}a.o.style.top=(h+parseInt(document.body.clientHeight/2)+"px")}};this.show=function(f){writeDebug("F.global_dialog.show()");if(typeof f!="undefined"&&typeof f.loading!="undefined"){a.set_loading(f.loading?true:false)}if(!a.get_elements()){return false}if(typeof f!="undefined"){if((typeof f.modal=="undefined")||(typeof f.modal!="undefined"&&f.modal!=false)){a.set_modal(true)}else{a.set_modal(false)}if(typeof f.style!="undefined"){a.set_style(f.style)}if(typeof f.width!="undefined"){a.set_width(f.width)}}else{a.set_modal(true)}if(!a.is_showing){if(f&&typeof f.left!="undefined"){a.o.style.left=f.left;a.o.style.top=f.top;a.o.style.display="block";a.is_showing=true}else{a.o.style.left="-9999px";a.o.style.top="-9999px";a.o.style.display="block";a.reposition();a.is_showing=true}}};this.hide=function(f){writeDebug("F.global_dialog.hide()");a.set_modal();if(c){a.detach_events()}a.detach_key_events();if(f&&f.loading){a.set_loading(true)}else{a.set_loading(false)}if(!a.get_elements()){return false}if(a.is_showing){a.o.style.display="none";a.is_showing=false}a.on_escape_handler=null};this.set_width=function(f){if(!a.get_elements()){writeDebug("F.GlobalDialog.set_width: no element");return false}if(f){writeDebug("setting container width: "+f);a.o.style.width="auto";a.o_container.style.width=f+"px"}else{writeDebug("setting default width");a.o.style.width="auto";a.o_container.style.width=(d?"334px":"320px")}a.reposition()};this.set_style=function(f){if(!a.get_elements()){writeDebug("F.GlobalDialog.set_style: no element");return false}writeDebug("F.globalDialog.set_style()");if(a.last_style){Y.D.removeClass(a.o,a.last_style)}if(f){Y.D.addClass(a.o,f)}a.last_style=f;a.reposition()};this.set_spinner=function(f){if(f){if(!a.spinner){a.spinner=document.createElement("div");a.spinner.className="global_dialog_spinner";document.body.appendChild(a.spinner);if(c){a.position_cover(a.spinner)}}a.spinner.style.display="block"}else{if(a.spinner){a.spinner.style.display="none"}}};this.set_modal=function(f){a.is_modal=f;if(!a.o_cover){return false}if(f){if(c){a.o_cover.style.position="absolute";a.position_cover();a.attach_events()}else{a.o_cover.style.position="fixed"}a.attach_key_events();var g=35;a.o_cover.style.backgroundColor="#000";a.o_cover.style.opacity=g/100;a.o_cover.style.MozOpacity=g/100;a.o_cover.style.filter="alpha(opacity="+g+")";a.o_cover.style.display="block"}else{a.o_cover.style.position="absolute";a.o_cover.style.display="none";a.detach_events();a.detach_key_events()}};this.set_loading=function(f){if(!a.o_cover){writeDebug("setLoading: no cover");return false}writeDebug("F.global_dialog.set_loading(): "+f);if(f){a.set_spinner(f);Y.D.removeClass(a.o_cover,"loaded");Y.D.addClass(a.o_cover,"loading");if(!a.is_modal){a.set_modal(true)}}else{a.set_spinner(f);Y.D.removeClass(a.o_cover,"loading");Y.D.addClass(a.o_cover,"loaded");if(a.is_modal){a.set_modal(false)}}};this.remove_existing_dialog=function(){if(a.o){writeDebug("remove_existing_dialog: removing node");try{a.o.parentNode.removeChild(a.o);a.o=null;writeDebug("remove OK");return true}catch(f){writeDebug("WARN: could not remove node");return false}}};this.create_dialog=function(h,f){if(a.o){a.remove_existing_dialog();a.o=null}a.last_style=null;a.is_showing=false;var g=document.createElement("div");g.id="global_dialog";g.className="global_dialog";document.body.appendChild(g);a.o=g;a.o.innerHTML='<div id="global-dialog-container" class="global_dialog_container"><div class="wrapper">'+h+"</div></div>";a.o_container=null;a.get_elements();if(f&&f.style){a.set_style(f.style)}if(f&&f.width){a.set_width(f.width)}else{a.set_width()}return a};this.position_cover=function(g){if(!g){var g=a.o_cover}if(!a.get_elements()){return false}if(window.innerWidth){var f=window.pageXOffset;var h=window.pageYOffset}else{var f=document.body.scrollLeft;var h=document.body.scrollTop}g.style.top=h+"px";g.style.left=f+"px"};this.legacy_resize_handler=function(){writeDebug("GlobalDialog.legacy_resize_handler()");a.reposition();a.position_cover()};this.legacy_scroll_handler=function(){writeDebug("GlobalDialog.legacy_scroll_handler()");a.reposition();a.position_cover()};this.key_handler=function(g){writeDebug("key_handler()");var f=g.which||g.keyCode;if(f==27){a.hide()}};this.attach_events=function(){if(a.events_on){return false}a.events_on=true;Y.U.Event.addListener(window,"resize",a.legacy_resize_handler,a,true);Y.U.Event.addListener(window,"scroll",a.legacy_scroll_handler,a,true)};this.attach_key_events=function(){Y.U.Event.addListener(window,"keyup",a.key_handler,a,true)};this.detach_events=function(){if(!a.events_on){return false}a.events_on=false;Y.U.Event.removeListener(window,"resize",a.legacy_resize_handler);Y.U.Event.removeListener(window,"scroll",a.legacy_scroll_handler)};this.detach_key_events=function(){Y.U.Event.removeListener(window,"keyup",a.key_handler)};F.preload_images(_images_root+"/progress/balls-24x12-white.gif");this.get_elements()};F.global_dialog=null;Y.E.onDOMReady(function(){F.global_dialog=new F.GlobalDialog()});if(typeof page_printing_use_printcart!="undefined"){F.Printing=function(){var self=this;var enable_printcart=(typeof page_printing_use_printcart!="undefined");var snapfish_unavailable=(typeof page_printing_snapfish_unavailable!="undefined"?page_printing_snapfish_unavailable:null);this.cart_urls={};this.addtocart_cart_url=page_printing_snapfish_cart_url;this.authed_partners={snapfish:null};this.user_data={user_country:(typeof page_printing_country_user!="undefined"?page_printing_country_user:null)};this.size_units=null;this.options={print_partner:"snapfish",photo_ids:null,product_name:"print",product:null,show_other_products:false,user_currency:null,style:null};this.composites_allowing_single_photo={prod6:true,prod7:true,prod8:true,prod9:true};var special_country_exceptions={snapfish:{cn:"exception-china",dk:"exception-generic",hk:"exception-china",no:"exception-generic",se:"exception-generic",va:"exception-italy"}};this.printcart_config={queue:[],max_ids_per_api_call:20,api_responses:0,api_responses_expected:0};this.global_photos_data={queue:[],api_queue:[],max_ids_per_api_call:16,max_items_to_check:256,api_responses:0,api_responses_expected:0};this.reset_exclusions=function(){self.excluded_videos={ids:[]};self.excluded_photos={ids:[],non_jpeg:[]}};this.reset_exclusions();this.check_global_photo_exceptions=function(){writeDebug("check_global_photo_exceptions()");var id=null;var do_remove=null;var ok_photo_ids=[];for(var i=self.options.photo_ids.length;i--;){do_exclude=0;if(window.global_photos[self.options.photo_ids[i]]){if(window.global_photos[self.options.photo_ids[i]].media=="video"){self.excluded_videos.ids.push(self.options.photo_ids[i]);do_exclude=1}if(window.global_photos[self.options.photo_ids[i]].media=="photo"){if(window.global_photos[self.options.photo_ids[i]].originalformat){if(window.global_photos[self.options.photo_ids[i]].originalformat.match(/gif|bmp|tif|tiff|png/i)){do_exclude=1;self.excluded_photos.ids.push(self.options.photo_ids[i]);self.excluded_photos.non_jpeg.push(self.options.photo_ids[i])}else{}}else{}}}if(!do_exclude){ok_photo_ids.push(self.options.photo_ids[i])}}return ok_photo_ids};this.is_showing_products=false;var photo_id=null;var is_multiple_photoids=null;var print_item_count=0;var use_simple_confirm_dialog=null;var supported_countries=null;var last_location_class=null;var which="print";var ref_str_base="PrintDialog";var ref_str=ref_str_base+"Div";var what_key="print";this.fetched_product_list=false;this.check_is_authed=function(partner_id,f_onload){writeDebug("F.printing.check_is_authed()");if(!partner_id){writeDebug("check_is_authed: need partner id");return false}if(!f_onload){writeDebug("check_is_authed: need onload handler")}if(typeof self.authed_partners[partner_id]!="undefined"&&self.authed_partners[partner_id]!=null){f_onload(self.authed_partners[partner_id])}else{var auth_params={partner:partner_id,user_id:global_nsid};var handler={flickr_auth_userHasPartnerToken_onLoad:function(success,responseXML,responseText,params){var token_element=responseXML.documentElement.getElementsByTagName("auth")[0];if(token_element){self.authed_partners[partner_id]=(token_element.getAttribute("has_token")=="1")}else{self.authed_partners[partner_id]=false}f_onload(self.authed_partners[partner_id])}};F.API.callMethod("flickr.auth.userHasPartnerToken",auth_params,handler)}};this.reset=function(){writeDebug("reset(): starting over - will re-fetch fragment, products");self.fetched_product_list=false;self.productsO=undefined;self.is_showing_products=false};this.auth_prompt=function(o_params){if(!o_params){writeDebug("auth_prompt: {partner:} param missing?");return false}var params={partner:o_params.partner,magic_cookie:global_auth_hash};self.do_auth_ok_handler=(o_params.onsuccess?o_params.onsuccess:null);self.do_auth_fail_handler=(o_params.onfail?o_params.onfail:null);F.global_dialog.hide();F.global_dialog.set_loading(true);window.page_always_post_fragment_requests=true;F.fragment_getter.get("/photo_auth_inline_fragment.gne",params,this,"auth_prompt_onload")};this.print_location_update=function(){var snapfish_location=_ge("print_country_snapfish").value;if(!supported_countries){var o=_ge("print-supported-countries").getElementsByTagName("option");supported_countries=[];for(var i=o.length;i--;){supported_countries[o[i].value]=true}}if(typeof special_country_exceptions.snapfish[this.value]!="undefined"){Y.D.removeClass("print-location-container",last_location_class);last_location_class=special_country_exceptions.snapfish[this.value];Y.D.addClass("print-location-container",last_location_class)}else{if(!supported_countries[this.value]){Y.D.removeClass("print-location-container",last_location_class);Y.D.addClass("print-location-container","exception");last_location_class="exception"}else{Y.D.removeClass("print-location-container",last_location_class)}}};this.auth_prompt_onload=function(success,responseText,params){writeDebug("auth_account_onload()");F.global_dialog.remove_existing_dialog();var content=document.createElement("div");content.innerHTML=responseText;document.body.appendChild(content);F.global_dialog.set_width(525);F.global_dialog.show({loading:false});if(self.options.print_partner=="snapfish"&&_ge("print-location")){_ge("print-location").onchange=_ge("print-location").onkeypress=self.print_location_update;_ge("print-location").onchange.apply(_ge("print-location"))}if(!success&&o_params&&o_params.onfail){o_params.onfail()}};this.set_print_prefs_and_auth=function(o_print_prefs,o_auth_params){writeDebug("set_print_prefs_and_auth()");if(!o_print_prefs){writeDebug("need print_prefs object");return false}var print_country=o_print_prefs.print_country||null;var print_privacy=o_print_prefs.print_privacy||null;var api_responses_expected=0;var api_responses_done_handler=null;function generic_api_handler(){writeDebug("set_print_prefs_generic_api_onload()");api_responses_expected--;writeDebug("responses remaining: "+api_responses_expected);if(api_responses_expected==0){writeDebug("calling done handler");api_responses_done_handler()}}if(print_country){api_responses_expected++;if(print_privacy!=null){F.API.callMethod("flickr.printing.setPrefs",{country_code:print_country,print_privacy:print_privacy},{generic_api_onLoad:generic_api_handler})}else{F.API.callMethod("flickr.printing.setPrefs",{country_code:print_country},{generic_api_onLoad:generic_api_handler})}}if(api_responses_expected>0){api_responses_done_handler=function(){self.do_auth(o_auth_params)}}else{self.do_auth(o_auth_params)}};this.do_auth_ok_handler=function(){writeDebug("do_auth_ok_handler()")};this.do_auth_fail_handler=function(){writeDebug("do_auth_fail_handler()")};this.do_auth=function(o_params){if(!o_params){writeDebug("do_auth: {partner:} param missing?");return false}var params={magic_cookie:global_auth_hash,partner:o_params.partner};window.page_always_post_fragment_requests=true;F.fragment_getter.get("/services/auth/inline.gne",params,this,"do_auth_onload")};this.do_auth_onload=function(success,responseText,params){writeDebug("do_auth_onload: checking response: "+responseText);var rsp=eval("("+responseText+")");if(rsp.stat){var token=rsp.token;writeDebug("response: OK");if(self.do_auth_ok_handler){writeDebug("calling do_auth_ok_handler()");self.do_auth_ok_handler(success,responseText,params)}else{writeDebug("no do_auth_ok_handler()?")}}else{writeDebug("Response: Fail");if(self.do_auth_fail_handler){writeDebug("calling do_auth_fail_handler");self.do_auth_fail_handler(success,responseText,params)}else{writeDebug("no do_auth_fail_handler?")}}};this.set_photo_ids=function(a_photo_ids){writeDebug("set_photo_ids");self.options.photo_ids=a_photo_ids;print_item_count=self.options.photo_ids.length;is_multiple_photoids=(print_item_count>1)};this.need_to_get_photo_info=function(){writeDebug("need_to_get_photo_info()");var need=false;var queue=[];var item=null;for(var i=0,j=self.options.photo_ids.length;i<j;i++){item=window.global_photos[self.options.photo_ids[i]];if(!item||!item.originalformat){queue.push(self.options.photo_ids[i])}}if(queue.length){writeDebug("need_to_get_photo_info: "+queue.length+" items")}else{writeDebug("need_to_get_photo_info: photo info present")}if(!queue.length){writeDebug("need_to_get_photo_info(): nothing in queue")}return queue};this.check_global_photos=function(f_api_onload_handler){writeDebug("check_global_photos()");var queue=self.need_to_get_photo_info();writeDebug("queue: "+queue.length+" items");var new_items=0;for(var i=queue.length;i--;){new_items++;self.global_photos_data.queue.push(queue[i])}writeDebug("number of items in queue: "+self.global_photos_data.queue.length);if(self.global_photos_data.queue.length){return self.get_global_photos_info(f_api_onload_handler)}else{return 0}};this.get_global_photos_info=function(f_api_onload_handler){var api_calls=0;if(self.global_photos_data.queue.length){var max_items=Math.min(self.global_photos_data.max_items_to_check,self.global_photos_data.queue.length);api_calls=Math.max(1,Math.ceil(max_items/self.global_photos_data.max_ids_per_api_call));writeDebug("api_calls: "+api_calls);self.global_photos_data.api_responses_expected=api_calls;var get_info_photo_ids=[];var index=0;var photo_limit=Math.min(self.global_photos_data.max_items_to_check,self.global_photos_data.queue.length);for(var i=0,j=photo_limit;i<j;i++){index=Math.floor(i/self.global_photos_data.max_ids_per_api_call);if(!get_info_photo_ids[index]){get_info_photo_ids[index]=[]}get_info_photo_ids[index].push(self.global_photos_data.queue[i])}var params=null;var limit=Math.min(api_calls,get_info_photo_ids.length);for(i=0;i<limit;i++){writeDebug("checking photo "+i);params={photo_ids:get_info_photo_ids[i].join(",")};F.API.callMethod("flickr.photos.getInfo",params,{flickr_photos_getInfo_onLoad:function(success,responseXML,responseText,params){var photos=responseXML.documentElement.getElementsByTagName("photo");for(var i=0,j=photos.length;i<j;i++){_upsert_photo(photos[i])}self.global_photos_data.api_responses++;if(self.global_photos_data.api_responses>=self.global_photos_data.api_responses_expected&&f_api_onload_handler){f_api_onload_handler()}}})}self.global_photos_data.queue=[]}else{return 0}};this.order_products=function(o_options){if(typeof window.use_yui3_printing!="undefined"){writeDebug("F.printing.order_products(): YUI 3 printing active, exiting");return false}if(!o_options){writeDebug("order_products: WARN: No partner/photo ID params - using defaults")}else{if(o_options.print_partner){self.options.print_partner=o_options.print_partner}if(o_options.photo_ids){if(o_options.photo_ids instanceof Array){writeDebug("photo_ids is an array, "+o_options.photo_ids.length+" items")}else{o_options.photo_ids=o_options.photo_ids.toString().replace(/\s/g,"").split(",")}writeDebug("setting photo id(s): "+o_options.photo_ids.join(","));self.options.photo_ids=(!(o_options.photo_ids instanceof Array))?[o_options.photo_ids]:o_options.photo_ids}else{if(typeof page_photo_id!="undefined"&&page_photo_id){writeDebug("order_products: using page_photo_id");self.options.photo_ids=[page_photo_id]}}if(o_options.show_other_products){writeDebug("setting show_other_products");self.options.show_other_products=o_options.show_other_products}if(o_options.product){writeDebug("setting product filter - results will be limited to matching API endpoint");self.reset();self.options.product_name=o_options.product;self.options.product=o_options.product}if(o_options.style){self.options.style=o_options.style}}if(!self.options.print_partner){writeDebug("order_products: Need print_partner");return false}if(!self.options.photo_ids){if(typeof page_photo_id!="undefined"&&page_photo_id){writeDebug("using page_photo_id");self.options.photo_ids=[page_photo_id]}else{writeDebug("order_products: Need photo_ids");return false}}print_item_count=self.options.photo_ids.length;is_multiple_photoids=(print_item_count>1);writeDebug("order_products: using "+self.options.print_partner+" / "+self.options.photo_ids.join(","));self.check_global_photos(self.show_printing_products);if(!self.fetched_product_list){writeDebug("Fetching product list, etc...")}else{F.global_dialog.show();return false}F.global_dialog.set_loading({modal:true});var params=null;if(is_multiple_photoids){params={photo_id:self.options.photo_ids.join(",")}}else{params={photo_id:self.options.photo_ids[0]}}if(typeof window.is_organizr!=="undefined"){params.use_yui2_printing=1}use_simple_confirm_dialog=(self.options.checkout||self.options.is_organizr||(self.options.product&&!self.composites_allowing_single_photo["prod"+params.product_id])&&self.options.product!="print");F.fragment_getter.get("/photo_print_fragment.gne",params,F.printing,"photo_print_fragment_onload")};this.print_set=function(o_options){if(!o_options){writeDebug("print_set: need options");return false}var photo_ids=(o_options.photo_ids||null);var set_id=(o_options.set_id||null);if(!photo_ids||!photo_ids.length){writeDebug("print_set: no photo ids?");if(set_id==null){writeDebug("print_set: set_id is null");return false}var params={photoset_id:set_id};var handler={flickr_photosets_getPhotos_onLoad:function(success,responseXML,responseText,params){var photos=responseXML.documentElement.getElementsByTagName("photo");var photo_ids=[];for(var i=0,j=photos.length;i<j;i++){photo_ids.push(photos[i].getAttribute("id"))}if(photo_ids.length){self.order_products({photo_ids:photo_ids})}else{F.global_dialog.set_loading(false);return false}}};F.global_dialog.set_loading(true);F.API.callMethod("flickr.photosets.getPhotos",params,handler)}else{self.order_products({photo_ids:photo_ids});return false}};this.photo_print_fragment_onload=function(success,responseText,params){writeDebug("photo print fragment onload: "+responseText);F.global_dialog.remove_existing_dialog();if(is_multiple_photoids||use_simple_confirm_dialog){F.global_dialog.create_dialog('<div class="bd" style="padding:12px">'+self.get_print_options_html()+'</div><div class="ft">'+self.get_footer_checkout_note()+"</div>",{style:self.options.style})}else{F.global_dialog.create_dialog('<div class="bd" style="padding:12px">'+self.get_print_options_html()+"</div>",{style:self.options.style})}writeDebug("printDialogListDiv: "+_ge("PrintDialogListDiv"));_ge("PrintDialogListDiv").innerHTML=responseText;writeDebug("print_form: "+_ge("print_form"));_ge("PrintDialogHeaderDiv").style.display="none";_ge("PrintDialogListWrapperDiv").style.display="block";_ge("print_form").style.display="block";self.assign_other_product_links();self.show_printing_products()};this.get_product_name=function(partner_id,product_id,product_endpoint,size_label,size_units){var name=partner_id+"_product"+product_id;writeDebug("get_product_name()");if(size_label&&size_units){writeDebug("dimensions && type");if(product_endpoint=="print"){name=partner_id+"_prints";writeDebug("F.printing.get_product_name: "+name);return F.output.get(name,size_label.replace_global("x","&times;"))}else{if(product_endpoint=="poster"){name=partner_id+"_poster";writeDebug("F.printing.get_product_name: "+name);return F.output.get(name,size_label.replace_global("x","&times;"))}}}writeDebug("F.printing.get_product_name: "+name);return F.output.get(name)};this.get_print_options_html=function(){writeDebug("get_print_options_html");var ref_str_base="PrintDialog";var what_key="print";var what=F.output.get("photo_what_print");var what_plural=F.output.get("photo_what_print_plural");var button_w=58;var list_method="";var none_msg="";var start_html='<div id="'+ref_str_base+'"'+(is_multiple_photoids?' class="print_cart is_multiple_photos"':' class="print_cart"')+">";start_html+='<div id="'+ref_str_base+'HeaderDiv">'+F.output.get("photo_loading_print_options")+"</div>";start_html+='<div id="'+ref_str_base+'ListWrapperDiv">';start_html+='<div id="'+ref_str_base+'ListDiv" style="padding-right:2px; max-height:450px; overflow:auto;overflow-x:hidden"></div>';start_html+="</div>";start_html+="</div>";start_html+='<div id="'+ref_str_base+'BottomDiv" style="margin:3px; display:none; text-align:center;">';start_html+='<a href="" onclick="hide_'+ref_str_base+'(); return false;">'+F.output.get("cancel")+"</a>";start_html+="</div>";writeDebug("get_print_options_html: OK");return start_html};this.get_click_a_text=function(){writeDebug("get_click_a_text");var txt="";if(which=="sendToSet"){if(user_can_create_sets){txt+=F.output.get("photo_choose_a_set_or","_ge('"+ref_str+"').show_new_set_form();return false;")}else{txt+=F.output.get("photo_choose_a_set")}}else{if(which=="addToGallery"){txt+=F.output.get("photo_choose_a_gallery_or","_ge('"+ref_str+"').show_new_gallery_form(); return false;")}else{if(which=="print"){if(!is_multiple_photoids){txt=F.output.get("photo_snapfish_choose_a_size")}else{txt="<b>"+F.output.get("print_x_photos_with_snapfish",print_item_count)+"</b>"}}else{if(what_key=="set"){txt=F.output.get("photo_choose_a_what_set")}if(what_key=="group"){txt=F.output.get("photo_choose_a_what_group")}if(what_key=="blog"){txt=F.output.get("photo_choose_a_what_blog")}if(what_key=="print"){txt=F.output.get("photo_choose_a_what_print")}if(what_key=="gallery"){txt=F.output.get("photo_choose_a_what_gallery")}}}}return txt};this.flickr_printcart_getProductList_onLoad=function(success,responseXML,responseText,params){writeDebug("flickr_printcart_getProductList_onLoad");if(!success){alert(F.output.get("api_err_generic")+" "+responseText)}self.fetched_product_list=true;writeDebug("checking photo IDs");if(!(self.options.photo_ids instanceof Array)&&self.options.photo_ids.length&&self.options.photo_ids.indexOf(",")==-1){writeDebug("making array");self.options.photo_ids=self.options.photo_ids.join(",")}for(var i=0;i<print_item_count;i++){self.calculate_photo_props(self.options.photo_ids[i])}if(typeof window.global_photos=="undefined"){writeDebug("global_photos[] undefined - creating");window.global_photos=[]}if(typeof window.page_p=="undefined"){writeDebug("page_p undefined - creating");window.page_p=null}var p=global_photos[self.options.photo_ids[0]]||null;if(!is_multiple_photoids&&p&&!p.o_h&&page_p&&page_p.o_w){writeDebug("using page photo o_w/o_h");p.o_w=parseInt(page_p.o_w);p.o_h=parseInt(page_p.o_h)}var collection=responseXML.documentElement.getElementsByTagName("product");if(collection.length==0){writeDebug("nothing to show?");hide_printDialog();return false}else{writeDebug("checking printcart, productsO");window.page_print_prices={};self.productsO={};if(enable_printcart){var provider_host=responseXML.documentElement.getElementsByTagName("products")[0].getAttribute("provider_host")}var user_currency=responseXML.documentElement.getElementsByTagName("products")[0].getAttribute("currency");self.options.user_currency=user_currency;writeDebug("parsing collection");var hidden_count=0;for(var g=0;g<collection.length;g++){var item=collection[g];var product_id=item.getAttribute("id");var product_price=item.getAttribute("price");var product_name=item.getAttribute("name");var product_description=item.getAttribute("description");var product_minresx=parseInt(item.getAttribute("minresx"));var product_minresy=parseInt(item.getAttribute("minresy"));if(isNaN(product_minresx)){product_minresx=null}if(isNaN(product_minresy)){product_minresy=null}var product_aspect=item.getAttribute("aspect")*1;var product_panorama=item.getAttribute("panorama")*1;var product_type=null;var product_endpoint=item.getAttribute("product_endpoint");var size_label=null;var size_units=null;if(enable_printcart){product_type=item.getAttribute("product_type");F.printing.cart_urls["product"+product_id]=provider_host+product_endpoint}if(enable_printcart){if(!product_name){product_name=""}if(!product_description){product_description=F.output.get(F.printing.options.print_partner+"_product"+product_id+"_desc")}size_label=item.getAttribute("size_label");size_units=item.getAttribute("size_units");if(size_units){self.size_units=size_units}writeDebug("label/units: "+size_label+"/"+size_units);if(product_price==null){var prices_node=item.getElementsByTagName("prices")[0];if(prices_node.getAttribute("has_range")==1){product_price=prices_node.getElementsByTagName("price")[0].childNodes[0].nodeValue}else{if(prices_node.getElementsByTagName("price")[0].childNodes[0]){product_price=prices_node.getElementsByTagName("price")[0].childNodes[0].nodeValue}else{writeDebug("WARN: bad product (undefined price)");product_type="bad";product_price=999999}}}}var do_show=0;var do_exclude=0;if(!enable_printcart){if(p.huge){if(F.array_index_of(global_huge_photo_print_ids,product_id)>-1){do_show=1}}else{if(F.array_index_of(global_wallet_photo_print_ids,product_id)>-1){do_show=1}}if(p.square){if(F.array_index_of(global_square_photo_print_ids,product_id)>-1){do_show=1}}if(p.dig_dims){if(F.array_index_of(global_dig_photo_print_ids,product_id)>-1){do_show=1}}else{if(F.array_index_of(global_reg_photo_print_ids,product_id)>-1){do_show=1}}}else{do_show=1;if(self.options.product){if(self.options.product!=product_endpoint){do_show=0;if(product_type=="composite"&&!self.composites_allowing_single_photo["prod"+product_id]){do_exclude=1}}else{do_show=1;do_exclude=0}}else{if(product_type=="composite"){do_show=0;if(self.composites_allowing_single_photo["prod"+product_id]){do_exclude=0;do_show=0}else{if(is_multiple_photoids){do_exclude=1}else{do_exclude=1}}}}}if(product_type=="bad"){writeDebug("WARN: Excluding bad product "+product_id+" ("+product_name+")");do_exclude=1;do_show=0}if(!is_multiple_photoids){if(product_minresx&&product_minresy&&p&&p.o_w&&p.o_h){writeDebug("min rec size: "+product_minresx+"x"+product_minresy+", photo size:"+p.o_w+"x"+p.o_h);var product_rec=((p.o_w>=product_minresx&&p.o_h>=product_minresy)||(p.o_h>=product_minresx&&p.o_w>=product_minresy))}else{var product_rec=1}}else{var product_rec=1}if(!do_show&&!do_exclude){hidden_count++}self.productsO["prod"+product_id+"_printcart"]={id:product_id,api_product_name:product_name,name:self.get_product_name(self.options.print_partner,product_id,product_endpoint,size_label,size_units),description:product_description,price:product_price,recommended:product_rec,minresx:product_minresx,minresy:product_minresy,product_type:product_type,exclude:do_exclude,show:do_show,provider_host:provider_host,product_endpoint:product_endpoint,size_label:size_label,size_units:size_units};page_print_prices["prod"+product_id+"_printcart"]=product_price}if(hidden_count&&_ge("more_print_options")){writeDebug(hidden_count+" items hidden, showing more print options");_ge("more_print_options").style.display="inline"}var was_multiple_photoids=(self.options.photo_ids.length>1);self.reset_exclusions();var allowed_photo_ids=self.check_global_photo_exceptions();if(!was_multiple_photoids&&allowed_photo_ids.length==0){}else{self.set_photo_ids(allowed_photo_ids);if(self.options.photo_ids.length==0){F.global_dialog.hide();F.global_dialog.create_dialog('<div class="bd"><p>'+F.output.get("nothing_to_print")+'</p><p><a href="#" onclick="F.global_dialog.hide();return false" class="Butt">'+F.output.get("ok")+"</a></p></div>");F.global_dialog.show();return false}}if(self.excluded_videos.ids.length){writeDebug(self.excluded_videos.ids.length+" videos were excluded")}if(self.excluded_photos.ids.length){writeDebug(self.excluded_photos.ids.length+" photos were excluded");if(is_multiple_photoids&&_ge("multiple_unsupported_message")){_ge("multiple_unsupported_message").innerHTML=F.output.get("snapfish_unsupported").replace_global("{$js_count}",self.excluded_photos.ids.length).replace_global("{$js_photocount}",self.options.photo_ids.length+self.excluded_photos.ids.length)}_ge(is_multiple_photoids?"print_multiple_unsupported_tr":"print_single_unsupported_tr").style.display=(F.is_ie)?"block":"table-row"}else{_ge(is_multiple_photoids?"print_multiple_unsupported_tr":"print_single_unsupported_tr").style.display="none"}}};this.assign_other_product_links=function(){writeDebug("assign_other_product_links()");var links=_ge("sf-product-links");if(links){links=links.getElementsByTagName("a")}else{return false}var product_ids=(self.options.photo_ids instanceof Array?self.options.photo_ids.join(","):self.options.photo_ids);var link_types={product_photobook:{product_name:"book"},product_calendar:{product_name:"calendar"},product_card:{product_name:"card"},product_collage:{product_name:"collage"},product_canvas:{product_name:"canvas"}};for(var i=0;i<links.length;i++){links[i].href="/photos/organize/?start_tab=print&ids="+product_ids+"&product="+link_types[links[i].className].product_name}};this.show_all_printing_products=function(){F.global_dialog.hide();for(p in self.productsO){var prod=self.productsO[p];if(prod.show||prod.exclude){continue}_ge("prod"+prod.id+"_printcart").style.display=(F.is_ie)?"block":"table-row";if(!prod.recommended){_ge("print_not_rec_tr").style.display=(F.is_ie)?"block":"table-row"}}F.global_dialog.show()};this.update_print_prices=function(){var print_form=_ge("print_form");var ppt_td=_ge("price_print_total_td");var t=0;writeDebug("update_print_prices");for(var i=0;i<print_form.elements.length;i++){if(print_form.elements[i].type=="select-one"){if(print_form.elements[i].value*1>0){var p=page_print_prices[print_form.elements[i].name];t=t+(p*print_form.elements[i].value)}}}var this_price=0;if(!(self.options.photo_ids instanceof Array)){self.options.photo_ids=self.options.photo_ids.split(",")}var product_type=null;for(var i=0;i<print_form.elements.length;i++){if(print_form.elements[i].type=="radio"&&print_form.elements[i].checked){writeDebug("value: "+print_form.elements[i].value);var p=page_print_prices[print_form.elements[i].name];this_price=page_print_prices[print_form.elements[i].value];if(!isNaN(this_price)){product_type=self.productsO[print_form.elements[i].value].product_type;t=t+(page_print_prices[print_form.elements[i].value]*(product_type=="composite"&&self.composites_allowing_single_photo[print_form.elements[i].value]?1:print_item_count))}}}var ft=F.currency.format_currency(t,{currency_type:self.options.user_currency,country:self.user_data.user_country});if(t>0){ft="<nobr><b>"+ft+"</b></nobr>";if(print_form.last_total!=t){anim_do_blink_pink(ppt_td)}}else{ppt_td.style.color="rgb(0, 0, 0)"}writeDebug("update_print_prices: done");ppt_td.innerHTML=ft;print_form.last_total=t;if(_ge("print_add")){_ge("print_add").className=(t==0?"DisabledButt":"Butt")}};this.increment_print_dropdown=function(e){var target_el=Y.E.getTarget(e);var el=null;if(target_el){el=F.find_parent_node_by_name(target_el,"tr").getElementsByTagName(is_multiple_photoids?"input":"select")[0]}if(!el){return true}else{if(is_multiple_photoids){try{el.checked="checked";F.printing.update_print_prices()}catch(e){}}else{try{if(el.selectedIndex<el.getElementsByTagName("option").length-1){el.selectedIndex++;F.printing.update_print_prices()}}catch(e){}}}};this.show_printing_products=function(){writeDebug("show_printing_products");if(self.productsO==undefined){if(enable_printcart){writeDebug("show_printing_products: new cart");if(self.global_photos_data.api_responses<self.global_photos_data.api_responses_expected){writeDebug("global_photos: "+self.global_photos_data.api_responses_expected+", waiting for "+self.global_photos_data.api_responses+" responses");return false}var params={provider_id:self.options.print_partner};writeDebug("printcart.getProductList");F.API.callMethod("flickr.printcart.getProductList",params,{flickr_printcart_getProductList_onLoad:function(success,responseXML,responseText,params){F.API.callMethod("flickr.printing.getPrefs",null,{flickr_printing_getPrefs_onLoad:function(success2,responseXML2,responseText2,params2){self.user_data.user_country=responseXML2.documentElement.getElementsByTagName("country").length?responseXML2.documentElement.getElementsByTagName("country")[0].code:null;writeDebug("got print country: "+self.user_data.user_country);self.flickr_printcart_getProductList_onLoad(success,responseXML,responseText,params);try{self.show_printing_products()}catch(e){writeDebug("Oh snap! show_printing_products error: "+e.toString())}}})}})}else{writeDebug("printing.getProducts");F.API.callMethod("flickr.printing.getProducts",{provider_id:page_printing_provider},self)}return}if(self.is_showing_products){writeDebug("have already written products out - exiting");return false}writeDebug("writing innerHTML for product list");if(self.options.show_other_products){writeDebug("showing other products");if(_ge("other_printers_tr")){_ge("other_printers_tr").style.display=(F.is_ie)?"block":"table-row"}}writeDebug(ref_str_base+"HeaderDiv: "+_ge(ref_str_base+"HeaderDiv"));if(_ge(ref_str_base+"HeaderDiv")){_ge(ref_str_base+"HeaderDiv").innerHTML=self.get_click_a_text();_ge(ref_str_base+"HeaderDiv").style.display="block"}var pricing_header=F.output.get("snapfish_cost_heading",self.options.print_country);if(is_multiple_photoids){var template_tr=_ge("print_multiple_photo_tr");var header_tr=_ge("print_multiple_header_tr");_ge("print_single_header_tr").style.display="none";Y.D.getElementsByClassName("print_header_td","td",header_tr)[0].innerHTML+=" ("+self.size_units+")";var cost_header=Y.D.getElementsByClassName("print_cost_header","td",header_tr)[0];cost_header.innerHTML=F.output.get("cost_currency",self.options.user_currency);header_tr.style.display=(F.is_ie)?"block":"table-row"}else{var template_tr=_ge("print_product_tr");var header_tr=_ge("print_single_header_tr");Y.D.getElementsByClassName("print_header_td","td",header_tr)[1].innerHTML+=" ("+self.size_units+")";var cost_header=Y.D.getElementsByClassName("print_cost_header","td",header_tr)[0];cost_header.innerHTML=F.output.get("cost_currency",self.options.user_currency)}if(_ge("more-from-snapfish")){writeDebug("checking more-from-snapfish");var is_photo_owner=(window.page_p&&window.page_p.isOwner);var is_set_owner=(typeof page_set_owner_nsid!="undefined"&&global_nsid&&page_set_owner_nsid==global_nsid);_ge("more-from-snapfish").style.display=(is_photo_owner||is_set_owner)?"block":"none";writeDebug("checking OK")}var tbody=template_tr.parentNode;var rep=function(txt,prod){var tip_txt=prod.description+" "+F.output.get("photo_we_recommend",prod.minresx,prod.minresy);global_js_tip_count++;var tip_html=F.get_tip_html(tip_txt,"js_tooltip_"+global_js_tip_count,"tip_print_menu");txt=txt.replace_global("REP_TIP",tip_html);txt=txt.replace_global("REP_NAME",prod.name);txt=txt.replace_global("REP_PRODUCT","prod"+prod.id+"_printcart");var price=F.currency.format_currency(prod.price,{currency_type:self.options.user_currency,country:self.user_data.user_country,show_prefix:false});txt=txt.replace_global("REP_PRICE",(is_multiple_photoids?F.output.get("print_price_ea",price):price));return txt};for(p in self.productsO){var prod=self.productsO[p];var tr=document.createElement("tr");tr.id="prod"+prod.id+"_printcart";if(is_multiple_photoids){tr.className="print_radio_row"}tr.onclick=F.printing.update_print_prices;tr.onkeypress=F.printing.update_print_prices;tr.onchange=F.printing.update_print_prices;if(!prod.show){tr.style.display="none"}var td1=document.createElement("td");td1.className="print_dropdown_td";td1.innerHTML=rep(template_tr.childNodes[0].innerHTML,prod);tr.appendChild(td1);var td2=document.createElement("td");td2.className=(prod.recommended)?"print_item_td":"print_item_notrec_td";td2.innerHTML=rep(template_tr.childNodes[1].innerHTML,prod);tr.appendChild(td2);var td3=document.createElement("td");td3.className=(prod.recommended)?"print_price_td":"print_price_notrec_td";td3.innerHTML=rep(template_tr.childNodes[2].innerHTML,prod);tr.appendChild(td3);if(prod.recommended){tbody.insertBefore(tr,_ge("print_not_rec_tr"))}else{if(prod.show){_ge("print_not_rec_tr").style.display=(F.is_ie)?"block":"table-row"}tbody.appendChild(tr)}}var print_cancel=_ge("print_cancel");var print_add=_ge("print_add");var print_form=_ge("print_form");print_form.clear=function(){for(var i=0;i<print_form.elements.length;i++){if(print_form.elements[i].type=="select-one"){print_form.elements[i].selectedIndex=0}}self.update_print_prices()};page_print_orderA=[];print_cancel.onclick=self.hide_printDialog;print_add.onclick=function(){writeDebug("print add onclick");page_print_orderA=[];if(!is_multiple_photoids){for(var i=0;i<print_form.elements.length;i++){if(print_form.elements[i].type=="select-one"){if(print_form.elements[i].value*1>0){writeDebug("adding item, print_form.elements[i].value: "+print_form.elements[i].value);page_print_orderA.push(print_form.elements[i].name+":"+print_form.elements[i].value+":")}else{writeDebug("ignoring item "+print_form.elements[i])}}}}else{var product_type=null;for(var i=0;i<print_form.elements.length;i++){if(print_form.elements[i].type=="radio"&&print_form.elements[i].checked){writeDebug("value: "+print_form.elements[i].value);var p=page_print_prices[print_form.elements[i].name];this_price=page_print_prices[print_form.elements[i].value];if(!isNaN(this_price)){writeDebug("this price: "+this_price);product_type=self.productsO[print_form.elements[i].value].product_type;writeDebug("photo ids length: "+print_item_count);writeDebug("print_form.elements[i].value "+print_form.elements[i].value);page_print_orderA.push(print_form.elements[i].value+":"+1*(product_type=="composite"&&self.composites_allowing_single_photo[print_form.elements[i].value]?1:print_item_count)+":")}}}}writeDebug("page_print_orderA.length: "+page_print_orderA.length);if(page_print_orderA.length>0){self.send_to_action()}else{writeDebug("Nothing to order.")}return false};if(_ge("change_country_link2")){_ge("change_country_link2").onclick=function(){self.show_country_form();return false}}if(_ge("more_print_options")){_ge("more_print_options").onclick=function(){this.style.display="none";self.show_all_printing_products();return false}}_ge("print_form").style.display="block";_ge(ref_str_base+"ListDiv").parentNode.style.display="block";if(self.options.product){writeDebug("Filter case");var products=self.find_products_by_name(self.options.product);if(products.length==1){var product=products[0];var product_type=product.product_type;writeDebug("adding filtered product: "+product.product_endpoint);page_print_orderA.push("prod"+product.id+"_printcart:"+1*(product_type=="composite"&&self.composites_allowing_single_photo["prod"+product.id]?1:print_item_count)+":");var confirm_html='<div class="bd">';confirm_html+='<h3 style="margin:0px;padding:0px;color:#ff0084;font-size:14px;font-weight:bold">'+F.output.get("snapfish_off_you_go")+"</h3>";confirm_html+="<p>"+F.output.get("snapfish_handing_off")+"</p>";confirm_html+='<p id="prints-in-shopping-cart" style="display:none">'+F.output.get("prints_in_shopping_cart")+"</p>";confirm_html+="<p>"+F.output.get("have_fun")+"</p>";confirm_html+='<form id="print_cart_form" onsubmit="return false"><input type="button" id="print_ok_button" class="Butt" value="'+F.output.get("continuoo")+'" style="margin:5px 0px 0px 0px;text-transform:uppercase">&nbsp;&nbsp;<input type="button" id="print_cancel_button" class="CancelButt" value="'+F.output.get("cancel")+'" style="margin:5px 0px 0px 0px;text-transform:uppercase"></form></div>';confirm_html+="</div>";F.global_dialog.create_dialog(confirm_html,{style:self.options.style});function cart_onLoad(success,responseXML,responseText,params){var items=responseXML.getElementsByTagName("photo");if(items.length&&_ge("prints-in-shopping-cart")){_ge("prints-in-shopping-cart").style.display="block";F.global_dialog.show()}else{F.global_dialog.show()}}_ge("print_ok_button").onclick=function(){self.send_to_action()};_ge("print_cancel_button").onclick=function(){F.global_dialog.hide();F.global_dialog.set_loading(false)};if(_ge("prints-in-shopping-cart")){F.API.callMethod("flickr.printcart.getAllQueued",null,{flickr_printcart_getAllQueued_onLoad:cart_onLoad})}else{F.global_dialog.show()}}else{F.global_dialog.show({loading:false});F.global_dialog.reposition();self.update_print_prices()}}else{F.global_dialog.show({loading:false});F.global_dialog.reposition();self.update_print_prices()}self.is_showing_products=true};this.get_footer_checkout_note=function(){return['<div id="print_cart_prompt" style="border-top:none;padding-top:0px"><img src="'+_images_root+'/icon_cart.gif" width="16" height="16" border="0" style="margin:0 6px 0px 0px; border:none; float:left; display:inline">',"<div>"+F.output.get("prints_during_checkout")+"</div>",'<div style="clear:both;font-size:1px;line-height:1px;overflow:hidden;height:1px;display:inline">&nbsp;</div>',"</div>"].join("")};this.find_products_by_name=function(product_name){var results=[];if(!self.productsO){return results}var item=null;for(item in self.productsO){if(self.productsO[item].product_endpoint==product_name){results.push(self.productsO[item])}}return results};this.send_to_action=function(){var action_str=F.output.get("photo_adding_prints_to_cart");F.global_dialog.hide();F.global_dialog.set_loading(true);writeDebug("send_to_action: print case");self.addToCart_responses_expected=page_print_orderA.length;self.addToCart_responses=0;self.addToCart_error_count=0;self.addToCart_problem_product_ids=[];self.addToCart_last_error="";self.send_another_printing_product()};this.send_another_printing_product=function(){writeDebug("send_another_printing_product()");if(!page_print_orderA[self.addToCart_responses]){writeDebug("send_another_printing_product: page_print_orderA["+self.addToCart_responses+"] null/undefined");return false}var A=page_print_orderA[self.addToCart_responses].split(":");writeDebug("A split: "+A.join("/"));writeDebug("A[0]: "+A[0]);writeDebug("A[1]: "+A[1]);var params=null;if(enable_printcart){if(self.productsO[A[0]].product_type!="composite"&&self.options.product_name!="other"){F.printing.options.product_name=self.productsO[A[0]].product_endpoint;params={provider_id:self.options.print_partner,photo_ids:self.options.photo_ids,product_id:A[0].match(/[0-9]+/),quantity:(is_multiple_photoids?1:A[1])};self.add_product("flickr.printcart.addPrint",params,self)}else{F.printing.options.product_name=self.productsO[A[0]].product_endpoint;params={provider_id:self.options.print_partner,photo_ids:self.options.photo_ids,product_id:A[0].match(/[0-9]+/),quantity:(is_multiple_photoids?1:A[1])};self.add_product("flickr.printcart.addComposite",params,self)}}else{var params={provider_id:page_printing_provider,photo_ids:photo_id,product_id:A[0].replace_global("prod",""),quantity:A[1]};F.API.callMethod("flickr.printing.addToCart",params,self)}};this.add_product=function(api_method_name,params,scope){var photo_ids=params.photo_ids;if(!photo_ids.length){writeDebug("add_product: queue is empty.");return false}var handler=scope;var max_ids=self.printcart_config.max_ids_per_api_call;if(params.photo_ids.length<=max_ids){writeDebug("adding "+params.photo_ids.length+" items at once");F.API.callMethod(api_method_name,params,scope)}else{var this_ids=[];var queued_ids=[];for(var i=0;i<photo_ids.length;i++){if(i<max_ids){this_ids.push(photo_ids[i])}else{queued_ids.push(photo_ids[i])}}params.photo_ids=this_ids.join(",");writeDebug("adding "+photo_ids.length+" items, max of "+max_ids+" per API call");if(queued_ids.length){writeDebug("queued IDs after max call: "+queued_ids.length);self.addToCart_responses_expected++;handler={};handler.generic_api_onLoad=function(onload_success,onload_responseXML,onload_responseText,onload_params){writeDebug("printcart: addPrint/addComposite onload(): Going back for more");self.addToCart_responses++;params.photo_ids=queued_ids;self.add_product(api_method_name,params,scope);writeDebug("OK")}}else{writeDebug("no queued IDs")}F.API.callMethod(api_method_name,params,handler)}};this.calculate_photo_props=function(photo_id){var p=global_photos[photo_id];if(!p){return}var longer_side=Math.max(p.o_w,p.o_h);var shorter_side=Math.min(p.o_w,p.o_h);p.aspect=longer_side/shorter_side;p.panorama=(p.aspect>=2)?1:0;p.dig_dims=(p.aspect<1.36)?1:0;p.square=(p.aspect>0.96&&p.aspect<1.04)?1:0;p.small=(longer_side<=1024)?1:0;p.huge=(shorter_side>=3000&&longer_side>=4500)?1:0};this.hide_printDialog=function(){F.global_dialog.hide();var print_form=_ge("print_form");if(print_form&&print_form.clear){print_form.clear()}};this.snapfish_auth_ok=function(success,responseText,params){F.global_dialog.hide();writeDebug("self.options.print_partner: "+self.options.print_partner);if(self.options.print_partner=="snapfish"){writeDebug("success: "+success);writeDebug("responseText: "+responseText);writeDebug("params: "+params);writeDebug("evaling response..");var result=eval("("+responseText+")");writeDebug("eval OK");writeDebug("checking result.stat");var url_params={product_name:self.options.product_name};if(result.stat=="ok"&&result.token&&result.token.is_new){writeDebug("result stat OK, is new");if(_ge("share-email")&&_ge("share-email").checked&&result.user){writeDebug("going to post details");url_params={product_name:self.options.product_name,email:encodeURI(result.user.email),first_name:encodeURI(result.user.first_name),last_name:encodeURI(result.user.last_name)};writeDebug("got user params");self.post_to_url(self.addtocart_cart_url,url_params)}else{writeDebug("no result.user, no token or no email");self.post_to_url(self.addtocart_cart_url,url_params)}}else{writeDebug("result != OK or not new");self.post_to_url(self.addtocart_cart_url,url_params)}if(!success){self.post_to_url(self.addtocart_cart_url,url_params)}}else{writeDebug("Warn: missing/unknown partner?");self.post_to_url(self.addtocart_cart_url,url_params)}};this.show_snapfish_unavailable=function(){F.global_dialog.create_dialog('<div class="bd"><p>'+F.output.get("snapfish_unavailable")+'</p><p><a href="#" onclick="F.global_dialog.hide();return false" class="Butt">'+F.output.get("ok")+"</a></p></div>");F.global_dialog.show();return false};this.post_to_url=function(url,o_params){writeDebug("post_to_url()");if(snapfish_unavailable){return self.show_snapfish_unavailable()}var f=document.createElement("form");f.id="print-form";f.action=url;f.method="post";f.style.position="absolute";f.style.left="-999px";f.style.top="-999px";var formHTML="";var item=null;writeDebug("going into item loop");for(item in o_params){formHTML+='<input name="'+item+'" id="'+item+'" value="'+o_params[item]+'" />\n'}writeDebug("item loop OK");f.innerHTML=formHTML;writeDebug("innerHTML OK");document.body.appendChild(f);writeDebug("appendChild OK");f.submit()};this.check_and_go_to_cart=function(){writeDebug("check_and_go_to_cart()");F.global_dialog.hide({loading:true});function cart_onLoad(success,responseXML,responseText,params){var items=responseXML.getElementsByTagName("photo");function is_authed_onload(is_authed){if(items.length||is_authed){writeDebug(items.length+" items in cart");self.go_to_cart()}else{F.global_dialog.create_dialog('<div class="bd"><p>'+F.output.get("print_cart_empty")+'</p><p><a href="#" onclick="F.global_dialog.hide();F.printing.reset();return false" class="Butt">'+F.output.get("ok")+"</a></p></div>");F.global_dialog.show({modal:true});return false}}self.check_is_authed(self.options.print_partner,is_authed_onload)}F.API.callMethod("flickr.printcart.getAllQueued",null,{flickr_printcart_getAllQueued_onLoad:cart_onLoad})};this.go_to_cart=function(product_name,function_ok){writeDebug("go_to_cart()");F.global_dialog.hide({loading:true});var product=product_name?product_name:self.options.product_name;function is_authed_onload(is_authed){if(!is_authed){function fail(){writeDebug("User canceled, or auth failed");F.global_dialog.hide()}if(!function_ok){var function_ok=self.snapfish_auth_ok}var ok=function_ok;writeDebug("doing auth prompt");self.auth_prompt({partner:self.options.print_partner,onsuccess:ok,onfail:fail})}else{writeDebug("auth OK");self.post_to_url(self.addtocart_cart_url,{product_name:product})}}self.check_is_authed(self.options.print_partner,is_authed_onload)};this.flickr_printing_addToCart_onLoad=this.flickr_printcart_addPrint_onLoad=this.flickr_printcart_addComposite_onLoad=function(success,responseXML,responseText,params){writeDebug("flickr_printing_addToCart_onLoad()");self.addToCart_responses++;try{writeDebug("addToCart_onLoad()");if(success){var cart_url=F.printing.cart_urls["product"+params.product_id];writeDebug("cart URL: "+cart_url);self.addtocart_cart_url=cart_url}else{self.addToCart_error_count++;self.addToCart_problem_product_ids.push(params.product_id);if(responseText){self.addToCart_last_error=responseText}else{self.addToCart_last_error=F.output.get("unknown_err")}}writeDebug("addToCart_responses / self.addToCart_responses_expected: "+self.addToCart_responses+" "+self.addToCart_responses_expected);if(self.addToCart_responses<self.addToCart_responses_expected){self.send_another_printing_product();return}var photo_notes=_ge("photo_notes");writeDebug("self.addToCart_responses: "+self.addToCart_responses+", self.addToCart_error_count: "+self.addToCart_error_count);if(self.addToCart_responses>self.addToCart_error_count){var confirm_html="";if(use_simple_confirm_dialog){self.go_to_cart();return false}else{if(!enable_printcart){confirm_html='<div id="contactChangerContainer" class="global_dialog_container">'}else{confirm_html+='<div class="bd">'}if(self.addToCart_error_count>0){confirm_html+=F.output.get("photo_adding_some_errors",global_photos[photo_id].title,self.addToCart_error_count,self.addToCart_last_error.truncate_with_ellipses(400).replace_global("&","[wbr]&").replace_global("/","/[wbr]").replace_global("=","=[wbr]").escape_for_display_and_wrap().replace_global("[wbr]","<wbr>"))}else{if(use_simple_confirm_dialog){confirm_html+='<h3 style="margin:0px 0px 4px 0px;padding:0px;color:#ff0084;font-size:14px;font-weight:bold">'+F.output.get("photo_added_prints_to_order")+"</h3>"}else{confirm_html+='<div style="margin-bottom:4px"><b>'+F.output.get("photo_added_prints_to_order")+"</b></div>"}}confirm_html+='<ul style="list-style-type:none;margin:0px;padding:0px">';for(var i=0;i<page_print_orderA.length;i++){var A=page_print_orderA[i].split(":");writeDebug("looking for self.productsO["+A[0]+"]");if(F.array_index_of(self.addToCart_problem_product_ids,self.productsO[A[0]].id)>-1){confirm_html+='<li style="color:red;"><b>(0)</b> '+self.productsO[A[0]].id+" "+self.productsO[A[0]].name+"</li>"}else{if(typeof page_printing_use_printcart!="undefined"){confirm_html+="<li>("+A[1]+") "+self.productsO[A[0]].name+" <nobr> &mdash; "+F.currency.format_currency(A[1]*(self.productsO[A[0]].price),{currency_type:self.options.user_currency,country:self.user_data.user_country})+"*</nobr></li>"}else{confirm_html+="<li>("+A[1]+") "+self.productsO[A[0]].name+" <nobr>("+self.format_price(A[1]*(self.productsO[A[0]].price.replace_global(".","")))+") total*</nobr></li>"}}}confirm_html+="</ul>";if(typeof page_printing_use_printcart!="undefined"){if(self.options.user_currency!="USD"){confirm_html+='<p style="font-size:10px;color:#666">'+F.output.get("snapfish_estimated_price")+"</p>"}else{confirm_html+='<p style="font-size:10px;color:#666">'+F.output.get("snapfish_estimated_price_usd")+"</p>"}}}confirm_html+='<form id="print_cart_form" onsubmit="return false"><input type="button" id="print_cart_button" class="Butt" value="'+F.output.get("photo_proceed_to_checkout")+'" style="margin:5px 0px 0px 0px">&nbsp;&nbsp;<input type="button" id="print_ok_button" class="CancelButt" value="'+F.output.get("close")+'" style="margin:5px 0px 0px 0px;text-transform:uppercase"></form></div>';confirm_html+='<div class="ft"><div id="print_cart_prompt" style="border-top:none;padding-top:0px"><img src="'+_images_root+'/icon_cart.gif" width="16" height="16" border="0" style="margin:0 6px 20px 0; border:0; float:left; display:block;"><div>'+F.output.get("photo_get_to_cart")+"</div></div>";confirm_html+="</div></div>";if(!enable_printcart){if(photo_notes){photo_notes.start_comming(confirm_html,1,0,F.output.get("photo_go_to_cart"),1,null,null)}}else{if(photo_notes){photo_notes.stop_comming()}F.global_dialog.hide();F.global_dialog.set_loading(true);F.global_dialog.create_dialog(confirm_html,{style:self.options.style});F.global_dialog.show()}var print_ok_button=_ge("print_ok_button");if(navigator.userAgent.indexOf("KHTML")==-1){print_ok_button.focus()}print_ok_button.onclick=function(){if(!enable_printcart){photo_notes.stop_comming();this.blur()}else{F.global_dialog.hide();F.global_dialog.set_loading(false)}};var print_cart_button=_ge("print_cart_button");print_cart_button.onclick=function(){self.go_to_cart()};F.global_dialog.set_loading(false);F.global_dialog.show()}else{alert(F.output.get("photo_errors_adding_prints")+" "+self.addToCart_last_error);if(photo_notes&&photo_notes.stop_comming){photo_notes.stop_comming(1)}}}catch(e){writeDebug("ERROR: "+e.toString()+e.line||e.lineNumber)}}};F.printing=new F.Printing()}function Currency(){var a=this;this.currencies={ARS:"AR $%.2f",AUD:"AU $%.2f",BRL:"BR R$%.2f",CAD:"CAD $%.2f",CHF:"SFr. %.2f",CLP:"CL $%d",CNY:"%.2f&#20803;",COP:"CO $%.2f",DKK:"kr %.2f",EUR:"&euro; %.2f","EUR-at":"%.2f &euro;","EUR-be":"%.2f &euro;","EUR-de":"%.2f &euro;","EUR-fr":"%.2f &euro;","EUR-pt":"%.2f &euro;","EUR-es":"%.2f &euro;",GBP:"UK &pound;%.2f",HKD:"HK $%.2f",INR:"Rs. %.2f",JPY:"%d &#20870;",KRW:"&#8361; %d",MXN:"Mex $%.2f",MYR:"RM %.2f",NOK:"kr %.2f",NZD:"NZ $%.2f",PEN:"S/ %.2f",PHP:"P %.2f",SEK:"%.2f kr",SGD:"SGD $%.2f",USD:"US $%.2f",VEF:"BsF %.2f"};this.currencies_sans_prefix={ARS:"$%.2f",AUD:"$%.2f",BRL:"$%.2f",CAD:"$%.2f",CHF:"SFr. %.2f",CLP:"$%d",CNY:"%.2f&#20803;",COP:"$%.2f",DKK:"kr %.2f",EUR:"&euro; %.2f","EUR-at":"%.2f &euro;","EUR-be":"%.2f &euro;","EUR-de":"%.2f &euro;","EUR-fr":"%.2f &euro;","EUR-pt":"%.2f &euro;","EUR-es":"%.2f &euro;",GBP:"&pound; %.2f",HKD:"$%.2f",INR:"Rs. %.2f",JPY:"%d &#20870;",KRW:"&#8361; %d",MXN:"$%.2f",MYR:"RM %.2f",NOK:"kr %.2f",NZD:"$%.2f",PEN:"S/ %.2f",PHP:"P %.2f",SEK:"%.2f kr",SGD:"$%.2f",USD:"$%.2f",VEF:"BsF %.2f"};this.default_currency_type="USD";this.default_show_currency_prefix=true;this.decimal_replacements={FRA:",",DKK:",",NOK:",",SEK:",","EUR-at":",","EUR-be":",","EUR-de":",","EUR-es":",","EUR-fr":",","EUR-it":",","EUR-nl":",","EUR-pt":","};this.format_decimal=function(e,d,c){var b=d+(c?"-"+c:"");if(a.decimal_replacements[d]||a.decimal_replacements[b]){return e.replace_global(".",a.decimal_replacements[b]?a.decimal_replacements[b]:a.decimal_replacements[d])}else{return e}};this.format_currency=function(e,d){var b=a.default_currency_type;var g=null;var f=a.currencies;if(d){if(d.currency_type){b=d.currency_type}else{b=a.default_currency_type}if(d.country){g=b+"-"+d.country}if(typeof d.show_prefix!="undefined"){f=(d.show_prefix?a.currencies:a.currencies_sans_prefix)}else{f=a.currencies}}if(g){currency_string=f[g]?f[g]:f[b]}else{currency_string=f[b]}if(currency_string){var h=F.output.sprintf(currency_string,e);return a.format_decimal(h,b,d.country)}else{writeDebug("Warn: No matching currency type");var h=F.output.sprintf(f[a.default_currency_type],e);return a.format_decimal(h,a.default_currency_type)}}}F.currency=new Currency();F.photo_guestpassnotice_hide={action_element_id:"candy_hide_guestpass",message_container_id:"guestPassNotice",animation:null,hide:function(){this.animation.animate()},init:function(){var b=_ge(this.action_element_id),a=_ge(this.message_container_id);if(!b){return false}F.decorate(b,F._simple_button).button_go_go_go();this.animation=new YAHOO.util.Anim(a,{height:{to:0},padding:{to:0}},1,YAHOO.util.Easing.easeOut);this.animation.onComplete.subscribe(function(c){_ge(this.message_container_id).style.display="none";_set_cookie("flgp_d",1,0)},null,this);Y.E.on(b,"click",this.hide,null,this)}};Y.E.onDOMReady(function(){F.photo_guestpassnotice_hide.init()});(function(){if(_enable_popup_login&&!global_nsid){var b="/photo_grease_postlogin.gne",c=false,g=false,l=false,k=false;var h=function(){var m=Y.U.Connect.asyncRequest("GET","/fragment.gne?name=social-auth-fragment",{success:function(n){if(n.responseText=="1,0"){if(l){window.location="/photos/upload";return}if(k){window.location=k}else{window.location.reload()}}else{if(n.responseText=="1,1"){window.location="/"}}}},null)};var a=function(o){d();var n=o+"?popup=1&redir="+b+"?d="+window.location;try{web1999Window=window.open(n,"newWindow","width=650,height=650,resizable=1,scrollbars=1,location=yes")}catch(q){return true}try{if(web1999Window.focus){web1999Window.focus()}}catch(m){}window.setTimeout(function(){if(!web1999Window||web1999Window.closed||typeof web1999Window.closed==="undefined"||!c){var r=b+"?d="+window.location+"&notpopup=1"}},10);return false};function d(){if(document.cookie.match(/cookie_session=[^;]+/gi)){g=false;h()}else{window.setTimeout(d,20)}}function f(m){Y.E.stopEvent(m);g=true;l=false;k="/account/order/";a("/signin")}function j(m){Y.E.stopEvent(m);g=true;l=false;a("/signin")}function e(n){var m=Y.E.getTarget(n);if(m.id&&m.id==="head-signin-link"||m.id==="head-sign-up"){j(n)}else{if(m.id==="head-upload-link"){Y.E.stopEvent(n);g=true;l=true;a("/signin")}else{if(Y.D.hasClass(m,"signin-popup")){j(n)}}}}Y.E.onDOMReady(function(){var q=_ge("TopBar"),s=_ge("head-signin-link"),r=_ge("head-sign-up"),m=_ge("head-upload-link");var o=document.getElementById("buynowlink"),n=[m,s,r];Y.E.addListener(n.concat(Y.D.getElementsByClassName("signin-popup")),"click",e);if(o){Y.E.addListener(o,"click",j)}});window.onfocus=function(){if(c){g=false;h()}};window.onblur=function(){if(g){c=true}};document.onfocusout=function(){if(g){c=true}};document.onfocusin=function(){if(c){g=false;h()}}}})();F.output.sentencise=function(b,a){var e=(a)?a:"";var c=(a)?a.replace_global("<","</"):"";var f="";for(var d=0;d<b.length;d++){if(d>0){if(d==b.length-1){if(b.length>2){f+=","}f+=" "+F.output.get("and")+" "}else{f+=", "}}f+=e+b[d]+c}return f};F.output.sentencize=function(a){var c="<b>";for(var b=0;b<a.length;b++){c+=a[b];if(b==a.length-1){break}if(b==a.length-2){c+="</b> and <b>";continue}c+="</b>, <b>"}c+="</b>";return c};F.output.dateize=function(e,a,c){var b=F.output.date_strs.monthsA[a]+" "+c+", "+e;return b};F.output.get_plural=function(){var d=[];for(var b=0;b<arguments.length;b++){d[b]=arguments[b]}var a=d[0];var c=_pi(d[1]);if(c>1){a=a+"_plural"}else{if(c==0&&global_intl_lang!="fr-fr"){a=a+"_plural"}}d[0]=a;d[1]=c.pretty_num();return this.get.apply(this,d)};F.output.get=function(){var d=[];for(var c=0;c<arguments.length;c++){d[c]=arguments[c]}var a=d.shift();var b=this.format_strs[a];if(b==undefined){return" output:"+a}d.unshift(b);return this.sprintf.apply(null,d)};F.output.sprintf=function(c){var d=function(l,j,g){var k="";for(var h=0;h<Math.abs(g);h++){k+=j}return g>0?l+k:k+l};var f=function(h,l,i,g){var k=function(o,n,p){if(n>=0){if(o.indexOf(" ")>=0){p=" "+p}else{if(o.indexOf("+")>=0){p="+"+p}}}else{p="-"+p}return p};var m=parseInt(l,10);if(l.charAt(0)=="0"){var j=0;if(h.indexOf(" ")>=0||h.indexOf("+")>=0){j++}if(i.length<(m-j)){i=d(i,"0",i.length-(m-j))}return k(h,g,i)}i=k(h,g,i);if(i.length<m){if(h.indexOf("-")<0){i=d(i," ",i.length-m)}else{i=d(i," ",m-i.length)}}return i};var e=new Array();e.c=function(i,j,h,g){if(typeof(g)=="number"){return String.fromCharCode(g)}if(typeof(g)=="string"){return g.charAt(0)}return""};e.d=function(i,j,h,g){return e.i(i,j,h,g)};e.u=function(i,j,h,g){return e.i(i,j,h,Math.abs(g))};e.i=function(i,k,h,g){var l=parseInt(h);var j=((Math.abs(g)).toString().split("."))[0];if(j.length<l){j=d(j," ",l-j.length)}return f(i,k,j,g)};e.E=function(i,j,h,g){return(e.e(i,j,h,g)).toUpperCase()};e.e=function(i,j,h,g){iPrecision=parseInt(h);if(isNaN(iPrecision)){iPrecision=6}rs=(Math.abs(g)).toExponential(iPrecision);if(rs.indexOf(".")<0&&i.indexOf("#")>=0){rs=rs.replace(/^(.*)(e.*)$/g,"$1.$2")}return f(i,j,rs,g)};e.f=function(i,j,h,g){iPrecision=parseInt(h);if(isNaN(iPrecision)){iPrecision=6}rs=(Math.abs(g)).toFixed(iPrecision);if(rs.indexOf(".")<0&&i.indexOf("#")>=0){rs=rs+"."}return f(i,j,rs,g)};e.G=function(i,j,h,g){return(e.g(i,j,h,g)).toUpperCase()};e.g=function(i,j,h,g){iPrecision=parseInt(h);absArg=Math.abs(g);rse=absArg.toExponential();rsf=absArg.toFixed(6);if(!isNaN(iPrecision)){rsep=absArg.toExponential(iPrecision);rse=rsep.length<rse.length?rsep:rse;rsfp=absArg.toFixed(iPrecision);rsf=rsfp.length<rsf.length?rsfp:rsf}if(rse.indexOf(".")<0&&i.indexOf("#")>=0){rse=rse.replace(/^(.*)(e.*)$/g,"$1.$2")}if(rsf.indexOf(".")<0&&i.indexOf("#")>=0){rsf=rsf+"."}rs=rse.length<rsf.length?rse:rsf;return f(i,j,rs,g)};e.o=function(i,k,h,g){var l=parseInt(h);var j=Math.round(Math.abs(g)).toString(8);if(j.length<l){j=d(j," ",l-j.length)}if(i.indexOf("#")>=0){j="0"+j}return f(i,k,j,g)};e.X=function(i,j,h,g){return(e.x(i,j,h,g)).toUpperCase()};e.x=function(i,k,h,g){var l=parseInt(h);g=Math.abs(g);var j=Math.round(g).toString(16);if(j.length<l){j=d(j," ",l-j.length)}if(i.indexOf("#")>=0){j="0x"+j}return f(i,k,j,g)};e.s=function(i,k,h,g){var l=parseInt(h);var j=g;if(j.length>l){j=j.substring(0,l)}return f(i,k,j,0)};e.a=function(i,j,h,g){if(g instanceof Array){return F.output.sentencise(g,"<b>")}return g};farr=c.split("%");retstr=farr[0];fpRE=/^([0-9]+\$)?([-+ #]*)(\d*)\.?(\d*)([acdieEfFgGosuxX])(.*)$/;for(var b=1;b<farr.length;b++){fps=fpRE.exec(farr[b]);if(!fps){continue}var a=b;if(fps[1]){a=fps[1].replace_global("$","")}if(arguments[a]!=null){retstr+=e[fps[5]](fps[2],fps[3],fps[4],arguments[a])}retstr+=fps[6]}return retstr};if(window.ActiveXObject&&!window.XMLHttpRequest){window.XHR=function(){return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1)?"Microsoft.XMLHTTP":"Msxml2.XMLHTTP")}}if(!window.ActiveXObject&&window.XMLHttpRequest){window.ActiveXObject=function(a){switch(a.toLowerCase()){case"microsoft.xmlhttp":case"msxml2.xmlhttp":return new XMLHttpRequest()}return null}}if(typeof window.XHR==="undefined"&&window.XMLHttpRequest){window.XHR=window.XMLHttpRequest};F.API={};F.API.callMethod=function(b,l,c,e,n,k,f,r){if(_qs_args.APIdelayMS){r=_qs_args.APIdelayMS}var s={};if(typeof l=="object"){for(var j in l){s[j]=l[j]}}s.method=b;var d=(f)?0:1;var t=F.config.flickr.flags.enable_client_fullpath_api?F.config.flickrAPI.flickr_api_uri:"/services/rest/";if(k){t=k+t}s.src="js";s.api_key=global_magisterLudi;s.auth_hash=global_auth_hash;s.auth_token=global_auth_token;s.cb=new Date().getTime();var o=[];var h="";for(var j in s){if(j=="RESTURL"){continue}s[j]=s[j];o.push(j);h+="&"+j+"="+escape_utf8(s[j])}o.sort();var g=global_flickr_secret;if(g!=""&&window.md5_calcMD5){for(var q=0;q<o.length;q++){g+=o[q]+s[o[q]]}g=md5_calcMD5(g);h="api_sig="+g+h}s.RESTURL=h;var n=(n==undefined)?1:n;var a=new XHR();var m={};if(d){F.eb_add(m);m.window_onbeforeunload=function(i){F.eb_remove(m);a.onreadystatechange=function(){};a.abort();if(i&&typeof F.API=="object"){F.API.handleResponse(null,b,s,"Action cancelled by window unload. Try again please!",c)}}}s.timer_index=_page_timer.add("before api call "+s.method);if(a){a.onreadystatechange=function(){if(a.readyState==4){if(a.responseText==""&&n<2){n++;a.abort();F.API.callMethod(b,s,c,e,n,k,d)}else{F.eb_remove(m);if(typeof F.API=="object"){F.API.handleResponse(a.responseXML,b,s,a.responseText,c)}}this.onreadystatechange=null}};if(e){t=e}a.open("POST",t,d);a.withCredentials=true;a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(d&&r){if(_qs_args.no_api_debug!="1"){writeAPIDebug("delaying API call "+r+" milliseconds for "+t+"?"+h)}setTimeout(function(){if(_qs_args.no_api_debug!="1"){writeAPIDebug(t+"?"+h)}a.send(h)},r)}else{if(_qs_args.no_api_debug!="1"){writeAPIDebug(t+"?"+h)}a.send(h)}if(!d){this.handleResponse(a.responseXML,b,s,a.responseText,c)}}return a};F.API.getCallBackName=function(a){return a.split(".").join("_")+"_onLoad"};F.API.handleResponse=function(responseXML,APIMethod,params,responseText,listener){if(params.format=="json"){var success=0;var jsonFlickrApi=function(rsp){if(rsp.stat=="ok"){success=1}responseXML=rsp};try{eval(responseText)}catch(e){}}else{if(!responseXML){var success=(responseText.indexOf('<?xml version="1.0" encoding="utf-8" ?>\n<rsp stat="ok">')==0)?true:false}else{if(navigator.userAgent.indexOf("Gecko")>-1&&!F.is_safari){responseXML=F.str_to_XML(responseText)}var success=(responseXML.documentElement&&responseXML.documentElement.getAttribute("stat")=="ok")?true:false}}if(success){if(_qs_args.no_api_debug!="1"){writeAPIDebug(responseText)}}else{writeAPIDebug(responseText+"\r"+_uber_toString(params))}if((window.global_rper&&!success)||_qs_args.rper=="1"){var code="";var msg="";var rsp_str="";if(responseXML&&responseXML.documentElement){if(responseXML.documentElement.getElementsByTagName("err")){var err=responseXML.documentElement.getElementsByTagName("err")[0];if(err){code=err.getAttribute("code");msg=err.getAttribute("msg");rsp_str=responseText}}}F.fragment_getter.get("/report_error.gne",{report:"api_err",json_str:JSON.stringify({req_params:params,success:success,code:code,rsp_str:rsp_str,user_nsid:window.global_nsid,user_name:window.global_name,agent:navigator.userAgent})},{rp:function(){}},"rp")}_page_timer.add("after api call "+params.method);_page_timer.dump(params.timer_index);listener=(listener)?listener:this;if(typeof listener[this.getCallBackName(APIMethod)]=="function"){listener[this.getCallBackName(APIMethod)](success,responseXML,responseText,params)}else{if(typeof listener.generic_api_onLoad=="function"){listener.generic_api_onLoad(success,responseXML,responseText,params)}}};F.fragment_getter={};F.fragment_getter.get=function(b,h,e,c,n,g,k,i){if(typeof h!="object"){h={}}var f=(k)?0:1;var m=b;if(g){m=g+m}if(b&&b.indexOf("?")==-1){var a="?src=js"}else{var a="&src=js"}for(var d in h){a+="&"+d+"="+escape_utf8(h[d])}a+="&cb="+new Date().getTime();h.RESTURL=m+a;var n=(n==undefined)?1:n;var j=new XHR();if(j){j.onreadystatechange=function(){if(j.readyState==4){if(j.responseText==""&&n<1){n++;j.abort();F.fragment_getter.get(b,h,e,c,n,g,k,i)}else{F.fragment_getter.handleResponse(c,h,j.responseText,e)}this.onreadystatechange=null}};var l=a.length>1000||window.page_always_post_fragment_requests;if(l){j.open("POST",m,f)}else{j.open("GET",m+a,f)}j.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(f&&i){setTimeout(function(){if(l){j.send(a)}else{j.send(null)}},i)}else{if(l){j.send(a)}else{j.send(null)}}}};F.fragment_getter.handleResponse=function(a,e,d,c){c=(c)?c:this;if(_qs_args.no_api_debug!="1"){writeAPIDebug(d)}try{c[a](1,d,e)}catch(b){}};var escape_utf8=function(k){if(k===""||k===null||k===undefined){return""}if(F&&F.config&&F.config.flickr&&F.config.flickr.flags.enable_simple_client_side_utf8_escaping){return encodeURIComponent(k)}k=k.toString();var d="";for(var g=0;g<k.length;g++){var l=k.charCodeAt(g);var f=new Array();if(l>65536){f[0]=240|((l&1835008)>>>18);f[1]=128|((l&258048)>>>12);f[2]=128|((l&4032)>>>6);f[3]=128|(l&63)}else{if(l>2048){f[0]=224|((l&61440)>>>12);f[1]=128|((l&4032)>>>6);f[2]=128|(l&63)}else{if(l>128){f[0]=192|((l&1984)>>>6);f[1]=128|(l&63)}else{f[0]=l}}}if(f.length>1){for(var e=0;e<f.length;e++){var a=f[e];var h=nibble_to_hex((a&240)>>>4)+nibble_to_hex(a&15);d+="%"+h}}else{if(encodeURIComponent&&typeof encodeURIComponent=="function"){d+=encodeURIComponent(String.fromCharCode(f[0]))}else{d+=(String.fromCharCode(f[0]))}}}return d};var nibble_to_hex=function(a){var b="0123456789ABCDEF";return b.charAt(a)};var flashDescription;var requiredVersion=6;var useRedirect=false;var flashPage="movie.html";var noFlashPage="noflash.html";var upgradePage="upgrade.html";var flash2Installed=false;var flash3Installed=false;var flash4Installed=false;var flash5Installed=false;var flash6Installed=false;var flash7Installed=false;var maxVersion=7;var actualVersion=0;var hasRightVersion=false;var jsVersion=1;var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.indexOf("Windows")!=-1)?true:false;jsVersion=1.1;if(isIE&&isWin){document.write("<SCRIPT LANGUAGE=VBScript> \n");document.write("on error resume next \n");document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');document.write("</SCRIPT> \n")}function detectFlash(){if(navigator.plugins){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var isVersion2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";flashDescription=navigator.plugins["Shockwave Flash"+isVersion2].description;var a=flashDescription.split(".")[0].split(" ");var flashVersion=parseInt(a[a.length-1]);flash2Installed=flashVersion==2;flash3Installed=flashVersion==3;flash4Installed=flashVersion==4;flash5Installed=flashVersion==5;flash6Installed=flashVersion==6;flash7Installed=flashVersion>=7}}for(var i=2;i<=maxVersion;i++){if(eval("flash"+i+"Installed")==true){actualVersion=i}}if(navigator.userAgent.indexOf("WebTV")!=-1){actualVersion=3}if(actualVersion>=requiredVersion){if(useRedirect){if(jsVersion>1){window.location.replace(flashPage)}else{window.location=flashPage}}hasRightVersion=true}else{if(useRedirect){if(jsVersion>1){window.location.replace((actualVersion>=2)?upgradePage:noFlashPage)}else{window.location=(actualVersion>=2)?upgradePage:noFlashPage}}}}detectFlash();var md5_hex_chr="0123456789abcdef";function md5_rhex(e){str="";for(j=0;j<=3;j++){str+=md5_hex_chr.charAt((e>>(j*8+4))&15)+md5_hex_chr.charAt((e>>(j*8))&15)}return str}function md5_str2blks_MD5(e){nblk=((e.length+8)>>6)+1;blks=new Array(nblk*16);for(i=0;i<nblk*16;i++){blks[i]=0}for(i=0;i<e.length;i++){blks[i>>2]|=e.charCodeAt(i)<<((i%4)*8)}blks[i>>2]|=128<<((i%4)*8);blks[nblk*16-2]=e.length*8;return blks}function md5_add(e,h){var g=(e&65535)+(h&65535);var f=(e>>16)+(h>>16)+(g>>16);return(f<<16)|(g&65535)}function md5_rol(e,f){return(e<<f)|(e>>>(32-f))}function md5_cmn(l,g,f,e,k,h){return md5_add(md5_rol(md5_add(md5_add(g,l),md5_add(e,h)),k),f)}function md5_ff(g,f,m,l,e,k,h){return md5_cmn((f&m)|((~f)&l),g,f,e,k,h)}function md5_gg(g,f,m,l,e,k,h){return md5_cmn((f&l)|(m&(~l)),g,f,e,k,h)}function md5_hh(g,f,m,l,e,k,h){return md5_cmn(f^m^l,g,f,e,k,h)}function md5_ii(g,f,m,l,e,k,h){return md5_cmn(m^(f|(~l)),g,f,e,k,h)}function md5_calcMD5(e){x=md5_str2blks_MD5(e);a=1732584193;b=-271733879;c=-1732584194;d=271733878;for(i=0;i<x.length;i+=16){olda=a;oldb=b;oldc=c;oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=md5_add(a,olda);b=md5_add(b,oldb);c=md5_add(c,oldc);d=md5_add(d,oldd)}return md5_rhex(a)+md5_rhex(b)+md5_rhex(c)+md5_rhex(d)};var g_tooltip_elm=null;var g_tooltip_inner_elm=null;var g_tooltip_showing=0;var g_tooltip_trigger_elm=null;var g_tooltip_previous_click=null;var g_tip_elm=null;function init_tooltip(){g_tooltip_elm=document.createElement("DIV");g_tooltip_inner_elm=document.createElement("DIV");g_tooltip_elm.style.display="none";g_tooltip_elm.style.zIndex="200000";document.body.appendChild(g_tooltip_elm);g_tooltip_elm.appendChild(g_tooltip_inner_elm)}function show_tooltip(b,d,e,a,f){if(!g_tooltip_elm){init_tooltip()}if(Y.U.Dom.getStyle(b,"visibility")=="hidden"){return}var f=f||"ToolTip";g_tooltip_elm.className=f;if(g_tooltip_showing){if(g_tooltip_trigger_elm==b){hide_tooltip();return}hide_tooltip()}var a=(a==undefined)?"":a;e+=a.length;g_tip_elm=document.getElementById(d);g_tooltip_inner_elm.innerHTML=g_tip_elm.innerHTML+a;g_tooltip_inner_elm.style.width="auto";g_tooltip_elm.style.display="block";g_tooltip_elm.style.visibility="hidden";if(f!="ToolTipSmall"){var j=150;if(e>200){j=300}else{if(e>100){j=200}}g_tooltip_inner_elm.style.width=j+"px"}var c=g_tooltip_elm.offsetWidth;var i=Y.U.Dom.getX(b);var g=Y.U.Dom.getY(b);if(f=="ToolTipSmall"){i-=Math.round((c-b.offsetWidth)/2)-5;if(b.tip_placement=="below"){g+=b.offsetHeight+10}else{g-=22}}else{g+=20}var h=_find_screen_width()-40;if(i+c>h){i=h-c}i=Math.max(10,i);g_tooltip_elm.style.left=i+"px";g_tooltip_elm.style.top=g+"px";g_tooltip_showing=1;g_tooltip_elm.style.display="block";g_tooltip_elm.style.visibility="visible";g_tooltip_trigger_elm=b;document.onmousedown=doc_mousedown}function doc_mousedown(b){var a=_get_event_src(b);if(a==g_tooltip_trigger_elm||(_el_is_in_a_link(a)&&tooltip_el_is_in_tooltip(a))){document.onmousedown=function(){}}else{hide_tooltip()}}function hide_tooltip(a){if(a){if(g_tooltip_trigger_elm!=a){return}}document.onmousedown=function(){};if(!g_tooltip_elm){return false}g_tooltip_showing=0;g_tooltip_elm.style.display="none";g_tooltip_trigger_elm="null";return false}var tooltip_el_is_in_tooltip=function(a){var b=a;while(b){if(b==g_tooltip_elm){return 1}b=b.parentNode}return 0};function deja_view_check(b){if(!b||!_ok_for_scrumjax_xml()){return}window.deja_view_item=b;window.deja_view_should_refresh=0;window.deja_view_should_empty_titles_and_descriptions=1;window.deja_view_type=b.substring(0,1);window.deja_view_id=b.replace(deja_view_type,"");var d=_get_cookie("deja_view");if(d){georgeA=d.split(" ");for(var a=0;a<georgeA.length;a++){var c=georgeA[a].split("^");if(c[0]==b){if(global_time_stamp==c[1]){deja_view_should_refresh=1;if(deja_view_type==="t"){deja_view_should_empty_titles_and_descriptions=0}YAHOO.util.Event.onDOMReady(function(){var e=_ge("otherContexts_div");if(e){e.style.display="none"}})}break}}}}function deja_view_uh_huh(){if(!window.deja_view_item){return}var b=deja_view_item+"^"+global_time_stamp;var c=[b];var e=_get_cookie("deja_view");if(e){georgeA=e.split(" ");for(var a=0;a<georgeA.length;a++){var d=georgeA[a].split("^");if(d[0]!=deja_view_item){c.push(georgeA[a])}if(c.length==30){break}}}_set_cookie("deja_view",c.join(" "),1)}function deja_view_refresh(){if(!window.deja_view_should_refresh||!window.deja_view_item||!_ok_for_scrumjax_xml()){return}var a={};a.flickr_photos_getInfo_onLoad=function(j,i,g){if(j){var f=_ge("title_div"+deja_view_id);if(f&&typeof f.flickr_photos_getInfo_onLoad==="function"){f.flickr_photos_getInfo_onLoad(j,i,g)}var e=_ge("photo_notes");if(e&&e.p_id&&typeof e.flickr_photos_getInfo_onLoad==="function"){e.flickr_photos_getInfo_onLoad(j,i,g)}var h=_ge("description_div"+deja_view_id);if(h&&typeof h.flickr_photos_getInfo_onLoad==="function"){h.flickr_photos_getInfo_onLoad(j,i,g)}var k=_ge("tagadder");if(k&&typeof k.flickr_photos_getInfo_onLoad==="function"){k.flickr_photos_getInfo_onLoad(j,i,g)}}else{}};a.flickr_photos_getAllContexts_onLoad=function(p,m,i){var f=_ge("otherContexts_div");if(p){var o={};var h=m.documentElement.getElementsByTagName("set");for(var q=0;q<h.length;q++){var e=h[q].getAttribute("id");o["contextDiv_set"+e]=1;add_context_widget("set",e,deja_view_id)}var l=m.documentElement.getElementsByTagName("pool");for(var q=0;q<l.length;q++){var e=l[q].getAttribute("id");o["contextDiv_pool"+e]=1;add_context_widget("pool",e,deja_view_id)}var k=Y.U.Dom.getElementsByClassName("contextDiv","DIV");for(var q=0;q<k.length;q++){var g=k[q].id;if(o[g]!=1){var j="set";var n=g.split(j);if(n.length==1){j="pool";n=g.split(j)}var e=n[1];remove_context_widget(j,e)}}}else{}f.style.display="block"};a.flickr_photos_search_onLoad=function(m,l,j){if(m){var o=l.documentElement.getElementsByTagName("photo");var e,k,h;for(var f=0,i=o.length;f<i;f++){e=o[f].getAttribute("id");k=_ge("sv_title_"+e);if(k){Y.D.addClass(k,"checked")}}var g=Y.D.getElementsByClassName("StreamView","div","Main");for(var f=0,i=g.length;f<i;f++){if(g[f].id.search(/^sv_title_/)!==-1&&!Y.D.hasClass(g[f],"checked")){e=g[f].id.replace(/^sv_title_/g,"");F._photo_vanisher.vanish_photo(e,true)}}}};a.flickr_applications_getInfo_onLoad=function(j,i,g){if(j){var f=_ge("title_div"+deja_view_id);if(f&&typeof f.flickr_applications_getInfo_onLoad==="function"){f.flickr_applications_getInfo_onLoad(j,i,g)}var h=_ge("description_div"+deja_view_id);if(h&&typeof h.flickr_applications_getInfo_onLoad==="function"){h.flickr_applications_getInfo_onLoad(j,i,g)}var e=_ge("app_website_div"+deja_view_id);if(e&&typeof e.flickr_applications_getInfo_onLoad==="function"){e.flickr_applications_getInfo_onLoad(j,i,g)}}else{}};if(deja_view_type=="p"){F.API.callMethod("flickr.photos.getInfo",{photo_id:deja_view_id},a);F.API.callMethod("flickr.photos.getAllContexts",{photo_id:deja_view_id},a);if(F.people_taggr&&F.people_taggr.updateAll){F.people_taggr.updateAll()}}else{if(deja_view_type==="t"){var c=deja_view_id.split("-");var d=c[0];var b=c[1];F.API.callMethod("flickr.photos.search",{user_id:global_nsid,page:d,per_page:b},a)}else{if(deja_view_type=="a"){F.API.callMethod("flickr.applications.getInfo",{app_id:deja_view_id},a)}else{}}}};var tab_bumper=1;var insitu_init_page_app_title_div=function(a){if(!_ok_for_scrumjax()){return false}var b=insitu_init_generic_title_div(a,global_apps);b.getInput=function(){return'<input name="content" value="'+this.form_content.escape_for_xml().replace_global('"',"&#34;")+'" style="font-size:22px; font-weight: bold; font-family: Arial; padding:4px; width:100%; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'};return true};var insitu_init_page_app_description_div=function(a){if(!_ok_for_scrumjax()){return false}var b=insitu_init_generic_description_div(a,global_apps);b.getInput=function(){return'<textarea tabindex="'+tab_bumper+'1" name="content" style="font-family:arial; font-size:12px; padding:3px; margin-top:0px; width:100%; height:100px; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+this.form_content.escape_for_xml()+"</textarea>"};b.getExtra=function(){return"<br>"};return true};var insitu_init_page_app_url_div=function(a){if(!_ok_for_scrumjax()){return false}var b=_ge("app_website_div"+a);b.form_content=global_apps[a].website_url;b.emptyText="<i>"+F.output.get("insitu_click_to_add_url")+"</i>&nbsp;";b.app_id=a;b.website_button=_ge("app_website_button"+a);b.website_form=_ge("app_website_form"+a);b.getInput=function(){return'<input name="content" value="'+this.form_content.escape_for_xml().replace_global('"',"&#34;")+'" style="font-size:12px; font-weight: normal; font-family: Arial; padding:4px 0; width:100%; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'};b.getExtra=function(){return""};b.saveChanges=function(c){deja_view_uh_huh();global_apps[this.app_id]["website_url"]=c.content.value;this._oldTitle=this.innerHTML;this.innerHTML="<i>"+F.output.get("insitu_saving")+"</i>&nbsp;";this.endEditing();req={app_id:a,website_url:global_apps[this.app_id]["website_url"]};F.API.callMethod("flickr.applications.setUrls",req,b)};b.flickr_applications_setUrls_onLoad=function(h,g,f){var d=global_apps[this.app_id]["website_url"];if(!d.match(/\:\/\//)){d=" "}if(h){F.API.callMethod("flickr.applications.getInfo",{app_id:this.app_id},b)}else{var c=g.documentElement.getElementsByTagName("err");if(c&&c.length>0&&c[0].getAttribute("code")=="2"){var e=document.createElement("div");e.id="spam-url-warn-div";e.innerHTML='<p class="Problem">'+F.output.get("spam_url_warning")+".</p>";this.parentNode.insertBefore(e,this);this.startEditing()}else{global_apps[this.app_id]["website_url"]=this.form_content;this.innerHTML=(global_apps[this.app_id]["website_url"]=="")?"&nbsp;":global_apps[this.app_id]["website_url"].trim().escape_for_display().nl2br()+"&nbsp;";alert(F.output.get("insitu_url_error"))}}};b.flickr_applications_getInfo_onLoad=function(f,e,d){var c;if(f){if(e.documentElement.getElementsByTagName("website_url")[0].firstChild){var g=e.documentElement.getElementsByTagName("website_url")[0].firstChild.nodeValue}else{var g=""}global_apps[this.app_id].title=b.form_content=g;c=(global_apps[this.app_id].title=="")?"&nbsp;":global_apps[this.app_id].title.escape_for_xml()}else{b.form_content=global_apps[this.app_id].title;c=(global_apps[this.app_id].title=="")?"&nbsp;":global_apps[this.app_id].title.escape_for_display()}if(!c.match(/\:\/\//)){c=" "}if(c.length>30){new_url_trunc=c.substr(0,30)+"..."}else{new_url_trunc=c}if(new_url_trunc!=b.innerHTML){b.innerHTML=new_url_trunc}if(c=="&nbsp;"){this.website_button.disabled=true;this.website_button.className="DisabledButt"}else{this.website_form.action=c;this.website_button.disabled=false;this.website_button.className="Butt"}};if(window.deja_view_should_refresh&&window.deja_view_should_empty_titles_and_descriptions){b.innerHTML="..."}return insitu_init_editable_div(b)};var insitu_init_page_set_description_div=function(a){if(!_ok_for_scrumjax()){return false}var b=insitu_init_generic_description_div(a,global_sets);b.getInput=function(){return'<textarea name="content" tabindex="'+tab_bumper+'1" style="font-family:arial; font-size:12px; padding:3px; margin-top:14px; width:100%; height:75px;border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+this.form_content.escape_for_xml()+"</textarea>"};return true};var insitu_init_page_set_title_div=function(a){if(!_ok_for_scrumjax()){return false}var b=insitu_init_generic_title_div(a,global_sets);b.getInput=function(){return'<input name="content" value="'+this.form_content.escape_for_xml().replace_global('"',"&#34;")+'" style="font-size:32px; font-family:arial; padding:3px; width:100%; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'};b.getExtra=function(){return"<br>"};return true};var insitu_init_page_collection_description_div=function(b,a){if(!_ok_for_scrumjax()){return false}var c=insitu_init_generic_description_div(b,global_collections);c.getInput=function(){return'<textarea name="content" tabindex="'+tab_bumper+'1" style="font-family:arial; font-size:12px; padding:3px; margin-top:14px; width:100%; height:150px;border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+this.form_content.escape_for_xml()+"</textarea>"};c.after_save_func=a;return true};var insitu_init_page_collection_title_div=function(a){if(!_ok_for_scrumjax()){return false}var b=insitu_init_generic_title_div(a,global_collections);b.getInput=function(){return'<input name="content" value="'+this.form_content.escape_for_xml().replace_global('"',"&#34;")+'" style="font-size:22px; font-family:arial; padding:3px; width:100%; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'};b.getExtra=function(){return"<br>"};return true};var insitu_init_page_photo_description_div=function(a){if(!_ok_for_scrumjax()){return false}var b=insitu_init_generic_description_div(a,global_photos);b.getInput=function(){return'<textarea tabindex="'+tab_bumper+'1" name="content" style="font-family:arial; font-size:12px; padding:3px; margin-top:0px; width:100%; height:100px; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+this.form_content.escape_for_xml()+"</textarea>"};b.getExtra=function(){return"<br>"};return true};var insitu_init_page_photo_title_div=function(a){if(!_ok_for_scrumjax()){return false}var b=insitu_init_generic_title_div(a,global_photos);b.getInput=function(){return'<input name="content" value="'+this.form_content.escape_for_xml().replace_global('"',"&#34;")+'" style="font-size:22px; font-weight: bold; font-family: Arial; padding:4px; width:100%; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'};b.getExtra=function(){return"<br>"};return true};var insitu_init_group_blast_div=function(b,a,c){if(!_ok_for_scrumjax()){return false}var d=_ge("description_div"+b);d.title=F.output.get("insitu_click_to_edit");d.hash_id=b;d.show_some_html_is_ok=true;d.blast_date=a;d.buddy_icon=c;if(_ge("div_boing_alert_"+this.hash_id)){d.emptyText='<i style="color: rgb(136, 136, 136);">'+F.output.get("insitu_click_to_add_blast")+"</i>&nbsp;"}else{d.emptyText='<i style="color: rgb(136, 136, 136);">'+F.output.get("insitu_click_to_add_blast_spon")+"</i>&nbsp;"}d.form_content=(d.innerHTML==d.emptyText||d.innerHTML=="&nbsp;")?"":d.innerHTML;d.blast_date_format='<small id="blast_date" style="font-size: 11px;">'+a+"</small>";d.change_checker=false;d=insitu_init_editable_div(d);d.getInput=function(){return'<textarea id="ta_content_'+b+'" tabindex="'+tab_bumper+'1" name="content" style="font-family:arial; font-size:14px; padding:3px; margin-top:0px; width:100%; height:100px; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+_ge("description_simple_div"+d.hash_id).innerHTML.replace_global("<br>",String.fromCharCode(13))+"</textarea>"};d.getExtra=function(){return"<br>"};d.flickr_groups_getInfo_onLoad=function(h,g){var e=new Date();d.blast_date=e.flickr_minidate()+" - ";d.blast_date_format='<small id="blast_date" style="font-size: 11px;">'+d.blast_date+"</small> ";if(h){if(g.documentElement.getElementsByTagName("blast").length>0&&g.documentElement.getElementsByTagName("blast")[0].firstChild){var f=g.documentElement.getElementsByTagName("blast")[0].firstChild.nodeValue}else{var f=""}d.description=d.form_content=f}else{d.description=d.form_content=this.new_blast}if(d.form_content.length>0){_ge("description_simple_div"+d.hash_id).innerHTML=d.form_content;if(_ge("div_boing_alert_"+this.hash_id)){d.form_content='<table cellpadding="0" collspacing="0" border="0"><tr><td width="55px" valign="top"><img src="'+global_icon_url+'" id="icon_'+global_nsid+'" width="48px" height="48px" /></td><td valign="top"><strong>'+F.output.get("page_groups_view_admin_says",global_name)+"</strong><br />"+d.blast_date_format+d.form_content.trim().nl2br()+"</td></tr></table>"}else{d.form_content=d.form_content.trim().nl2br()}d.innerHTML=d.form_content;d.style.border="1px solid #e2e2e2";if(_ge("div_boing_alert_"+this.hash_id)){personmenu_process_img(_ge("icon_"+global_nsid))}}else{_ge("description_simple_div"+d.hash_id).innerHTML=d.form_content;if(_ge("div_boing_alert_"+this.hash_id)){d.form_content=F.output.get("page_groups_view_add_ann")}else{d.form_content=F.output.get("insitu_click_to_add_blast_spon")}d.innerHTML="<i>"+d.form_content+"</i>";d.style.border="1px solid #f4f4f4";d.style.color="#a3a3a3"}};d.flickr_groups_addBlast_onLoad=d.flickr_photosets_getInfo_onLoad=function(k,j){if(k){F.API.callMethod("flickr.groups.getInfo",{group_id:this.hash_id},d)}else{d.description=d.form_content=this.new_blast;var f=j.documentElement.getElementsByTagName("err");if(f&&f.length>0&&f[0].getAttribute("code")=="116"){var i=document.createElement("div");i.id="spam-url-warn-div";i.innerHTML='<p class="Problem">'+F.output.get("spam_url_warning")+".</p>";var h=_ge("group-info");if(h){h.insertBefore(i,h.firstChild)}d.startEditing();var e=_ge("ta_content_"+global_group_nsid);if(e){e.innerHTML=this.new_blast}}if(d.form_content.length>0){_ge("description_simple_div"+d.hash_id).innerHTML=d.form_content;if(_ge("div_boing_alert_"+this.hash_id)){d.form_content='<table cellpadding="0" collspacing="0" border="0"><tr><td width="55px" valign="top"><img src="'+global_icon_url+'" id="icon_'+global_nsid+'" width="48px" height="48px" /></td><td valign="top"><strong>'+F.output.get("page_groups_view_admin_says",global_name)+"</strong><br />"+d.blast_date_format+" - "+d.form_content.trim().nl2br()+"</td></tr></table>"}else{d.form_content=d.form_content.trim().nl2br()}d.innerHTML=d.form_content;d.style.border="1px solid #e2e2e2";if(_ge("div_boing_alert_"+this.hash_id)){personmenu_process_img(_ge("icon_"+global_nsid))}var g=1}else{_ge("description_simple_div"+d.hash_id).innerHTML=d.form_content;d.form_content=F.output.get("page_groups_view_add_ann");d.innerHTML=d.form_content;d.style.border="1px solid #f4f4f4"}}};d.check_changes=function(e){if(e){this.change_checker=true;setTimeout("_ge('description_div"+this.hash_id+"').do_change_checker()",250)}else{this.change_checker=false}};d.do_change_checker=function(){if(this.change_checker&&_ge("div_boing_alert_"+this.hash_id)){if(_ge("ta_content_"+this.hash_id).value.length>500){_ge("div_boing_alert_"+this.hash_id).style.display="block";if(_ge("blast_save_button")){_ge("blast_save_button").disabled=true;Y.U.Dom.removeClass("blast_save_button",(this.useSmallButts?"Small":"")+"Butt");Y.U.Dom.addClass("blast_save_button",(this.useSmallButts?"Small":"")+"DisabledButt")}}else{_ge("div_boing_alert_"+this.hash_id).style.display="none";if(_ge("blast_save_button")){_ge("blast_save_button").disabled=false}if(_ge("blast_save_button")){_ge("blast_save_button").disabled=false;Y.U.Dom.removeClass("blast_save_button",(this.useSmallButts?"Small":"")+"DisabledButt");Y.U.Dom.addClass("blast_save_button",(this.useSmallButts?"Small":"")+"Butt")}}setTimeout("_ge('description_div"+this.hash_id+"').do_change_checker()",250)}};d.saveChanges=function(e){this.new_blast=e.content.value;this.innerHTML="<i>"+F.output.get("insitu_saving")+"</i>&nbsp;";this.endEditing();var f=_ge("spam-url-warn-div");if(f){f.parentNode.removeChild(f)}F.API.callMethod("flickr.groups.addBlast",{group_id:this.hash_id,blast:this.new_blast,user_id:global_nsid},d)};return true};var insitu_init_page_photos_user_description_div=function(b,a){a=(a||240);if(!_ok_for_scrumjax()){return false}var c=insitu_init_generic_description_div(b,global_photos);c.getInput=function(){return'<textarea name="content" tabindex="'+tab_bumper+'1" style="font-family:arial; font-size:12px; padding:3px; margin-top:0px; width:'+a+'px; height:75px;border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+this.form_content.escape_for_xml()+"</textarea>"};c.useSmallButts=true;return true};var insitu_init_page_photos_user_title_div=function(b,a){a=(a||240);if(!_ok_for_scrumjax()){return false}var c=insitu_init_generic_title_div(b,global_photos);c.getInput=function(){return'<input name="content" value="'+this.form_content.escape_for_xml().replace_global('"',"&#34;")+'" style="font-size:14px; font-weight:bold; font-family:arial; padding:3px; width:'+a+'px; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;" />'};c.useSmallButts=true;return true};var insitu_init_page_gallery_note_div=function(a){var b;var b=insitu_init_generic_description_div(a,global_photos);b.getInput=function(){return'<textarea name="content" tabindex="'+tab_bumper+'1" style="font-family:arial; font-size:12px; padding:3px; margin-top:14px; width:100%; height:75px;border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+this.form_content.escape_for_xml()+"</textarea>"};return true};var insitu_init_page_gallery_description_div=function(a){var b;var b=insitu_init_generic_description_div(a,global_galleries);b.getInput=function(){return'<textarea name="content" tabindex="'+tab_bumper+'1" style="font-family:arial; font-size:12px; padding:3px; margin-top:14px; width:100%; height:75px;border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'+this.form_content.escape_for_xml()+"</textarea>"};return true};var insitu_init_page_gallery_title_div=function(a){var b=insitu_init_generic_title_div(a,global_galleries);b.getInput=function(){return'<input name="content" value="'+this.form_content.escape_for_xml().replace_global('"',"&#34;")+'" style="font-size:32px; font-family:arial; padding:3px; width:100%; border:1px inset #e9e9ae; background-color:#ffffd3; margin-bottom:5px;">'};b.getExtra=function(){return"<br>"};return true};var insitu_init_generic_description_div=function(b,a){if(!_ok_for_scrumjax()){return false}var c=_ge("description_div"+b);c.title=F.output.get("insitu_click_to_edit");c.hash_id=b;if(!a[c.hash_id]){writeDebug(F.output.get("insitu_error_no_hash",c.hash_id));return false}c.form_content=a[c.hash_id].description;c.emptyText="<i>"+F.output.get("insitu_click_to_add_description")+"</i>&nbsp;";c.getExtra=function(){return""};c.flickr_applications_getInfo_onLoad=c.flickr_photos_getInfo_onLoad=c.flickr_collections_getInfo_onLoad=c.flickr_photosets_getInfo_onLoad=c.flickr_galleries_getInfo_onLoad=function(g,f){if(g){if(f.documentElement.getElementsByTagName("description")&&f.documentElement.getElementsByTagName("description")[0]&&f.documentElement.getElementsByTagName("description")[0].firstChild){var d=f.documentElement.getElementsByTagName("description")[0].firstChild.nodeValue}else{var d=""}a[c.hash_id].description=c.form_content=d;var e=(a[c.hash_id].description=="")?"&nbsp;":a[c.hash_id].description.trim().nl2br();if(e!=c.innerHTML){c.innerHTML=e+"&nbsp;"}}else{c.form_content=a[c.hash_id].description;c.innerHTML=(a[c.hash_id].description=="")?"&nbsp;":a[c.hash_id].description.trim().nl2br()+"&nbsp;"}if(this.after_save_func){this.after_save_func()}};c.flickr_applications_setMeta_onLoad=c.flickr_photos_setMeta_onLoad=c.flickr_collections_editMeta_onLoad=c.flickr_photosets_editMeta_onLoad=c.flickr_galleries_editMeta_onLoad=c.flickr_galleries_editPhoto_onLoad=function(k,j){if(k){if(_ok_for_scrumjax_xml()){if(a==global_sets){F.API.callMethod("flickr.photosets.getInfo",{photoset_id:this.hash_id},c)}else{if(a==global_collections){F.API.callMethod("flickr.collections.getInfo",{collection_id:this.hash_id},c)}else{if(a==global_apps){F.API.callMethod("flickr.applications.getInfo",{app_id:this.hash_id},c)}else{if(a==global_photos&&!window.global_galleries){F.API.callMethod("flickr.photos.getInfo",{photo_id:this.hash_id},c)}else{if(window.global_galleries){if(j.documentElement.getElementsByTagName("comment")[0]){if(j.documentElement.getElementsByTagName("comment")[0].firstChild){var f=j.documentElement.getElementsByTagName("comment")[0].firstChild.nodeValue}else{var f=""}a[c.hash_id].description=c.form_content=f;var i=(a[c.hash_id].description=="")?"&nbsp;":a[c.hash_id].description.trim().nl2br();if(a[c.hash_id].description!=""){if(i!=c.innerHTML){c.innerHTML=_ge("gl-curator-says").innerHTML+i+"&nbsp;"}}else{writeDebug("Null description");c.innerHTML=_ge("gl-curator-empty-blurb").innerHTML}}else{F.API.callMethod("flickr.galleries.getInfo",{gallery_id:F.galleries.full_gallery_id},c)}}}}}}}else{c.form_content=a[c.hash_id].description;c.innerHTML=(a[c.hash_id].description=="")?"&nbsp;":a[c.hash_id].description.trim().nl2br()+"&nbsp;"}}else{var d=j.documentElement.getElementsByTagName("err");if(d&&d.length>0&&d[0].getAttribute("code")=="116"){var h=document.createElement("div");h.id="spam-url-warn-div";h.innerHTML='<p class="Problem">'+F.output.get("spam_url_warning")+".</p>";var g=_ge("About");if(g){g.insertBefore(h,g.firstChild)}else{var e=Y.D.getElementsByClassName("vsThumbnail","p",c.parentNode);if(e&&e.length>0){Y.D.insertAfter(h,e[0])}else{c.parentNode.insertBefore(h,c.parentNode.firstChild)}}c.form_content=a[c.hash_id].description;c.innerHTML=(a[c.hash_id].description=="")?"&nbsp;":a[c.hash_id].description.trim().nl2br()+"&nbsp;";c.startEditing()}else{a[c.hash_id].description=c.form_content;c.innerHTML=(a[c.hash_id].description=="")?"&nbsp;":a[c.hash_id].description.trim().nl2br()+"&nbsp;";alert(F.output.get("insitu_description_error"))}}};c.saveChanges=function(d){deja_view_uh_huh();a[this.hash_id].description=d.content.value;this.innerHTML="<i>"+F.output.get("insitu_saving")+"</i>&nbsp;";this.endEditing();var e=_ge("spam-url-warn-div");if(e){e.parentNode.removeChild(e)}if(!a[this.hash_id]){this.innerHTML=F.output.get("insitu_error_no_hash",this.hash_id);return false}if(a==global_sets){F.API.callMethod("flickr.photosets.editMeta",{photoset_id:this.hash_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{if(a==global_collections){F.API.callMethod("flickr.collections.editMeta",{collection_id:this.hash_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{if(a==global_photos){if(window.global_galleries){F.API.callMethod("flickr.galleries.editPhoto",{gallery_id:F.galleries.full_gallery_id,photo_id:this.hash_id,comment:a[this.hash_id].description},c)}else{F.API.callMethod("flickr.photos.setMeta",{photo_id:this.hash_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}}else{if(a==window.global_galleries){F.API.callMethod("flickr.galleries.editMeta",{gallery_id:F.galleries.full_gallery_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{if(a==global_apps){F.API.callMethod("flickr.applications.setMeta",{app_id:this.hash_id,name:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{writeDebug(F.output.get("insitu_unknown_hash"))}}}}}};if(window.deja_view_should_refresh&&window.deja_view_should_empty_titles_and_descriptions){c.innerHTML="..."}return insitu_init_editable_div(c)};var insitu_init_generic_title_div=function(b,a){if(!_ok_for_scrumjax()){return false}var c=_ge("title_div"+b);c.title=F.output.get("insitu_click_to_edit");c._oldTitle=null;c.hash_id=b;if(!a[c.hash_id]){writeDebug(F.output.get("insitu_unknown_hash"));return false}c.form_content=a[c.hash_id].title;c.emptyText="<i>"+F.output.get("insitu_click_to_add_title")+"</i>&nbsp;";c.getExtra=function(){return""};c.flickr_applications_getInfo_onLoad=c.flickr_photos_getInfo_onLoad=c.flickr_collections_getInfo_onLoad=c.flickr_photosets_getInfo_onLoad=c.flickr_galleries_getInfo_onLoad=function(f,e){var d,h;if(f){if(e.documentElement.getElementsByTagName("title")[0].firstChild){var g=e.documentElement.getElementsByTagName("title")[0].firstChild.nodeValue}else{var g=""}a[c.hash_id].title=c.form_content=g;d=(a[c.hash_id].title=="")?"&nbsp;":a[c.hash_id].title.escape_for_xml()}else{c.form_content=a[c.hash_id].title;d=(a[c.hash_id].title=="")?"&nbsp;":a[c.hash_id].title.escape_for_display()}if(d!=c.innerHTML){c.innerHTML=d}h=(d==="&nbsp;")?"":d;if(c._oldTitle==="&nbsp;"){document.title=h+document.title}else{document.title=document.title.replace_global(c._oldTitle,h)}};c.flickr_applications_setMeta_onLoad=c.flickr_photos_setMeta_onLoad=c.flickr_collections_editMeta_onLoad=c.flickr_photosets_editMeta_onLoad=c.flickr_galleries_editMeta_onLoad=function(f,e,d){if(f){if(_ok_for_scrumjax_xml()){if(a==global_sets){F.API.callMethod("flickr.photosets.getInfo",{photoset_id:this.hash_id},c)}else{if(a==global_collections){F.API.callMethod("flickr.collections.getInfo",{collection_id:this.hash_id},c)}else{if(a==global_photos){F.API.callMethod("flickr.photos.getInfo",{photo_id:this.hash_id},c)}else{if(a==global_apps){F.API.callMethod("flickr.applications.getInfo",{app_id:this.hash_id},c)}else{if(window.global_galleries){F.API.callMethod("flickr.galleries.getInfo",{gallery_id:F.galleries.full_gallery_id},c)}}}}}}else{c.form_content=a[c.hash_id].title;c.innerHTML=(a[c.hash_id].title=="")?"&nbsp;":a[c.hash_id].title.escape_for_display()}}else{a[c.hash_id].title=c.form_content;c.innerHTML=(a[c.hash_id].title=="")?"&nbsp;":a[c.hash_id].title.escape_for_display();alert(F.output.get("insitu_error_title_not_saved",d))}};c.saveChanges=function(d){deja_view_uh_huh();a[this.hash_id].title=d.content.value;this._oldTitle=this.innerHTML;this.innerHTML="<i>"+F.output.get("insitu_saving")+"</i>&nbsp;";this.endEditing();var e=_ge("spam-url-warn-div");if(e){e.parentNode.removeChild(e)}if(!a[this.hash_id]){this.innerHTML=F.output.get("insitu_error_no_hash",this.hash_id);return false}if(a==global_sets){F.API.callMethod("flickr.photosets.editMeta",{photoset_id:this.hash_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{if(a==global_collections){F.API.callMethod("flickr.collections.editMeta",{collection_id:this.hash_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{if(a==global_photos){F.API.callMethod("flickr.photos.setMeta",{photo_id:this.hash_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{if(a==window.global_galleries){F.API.callMethod("flickr.galleries.editMeta",{gallery_id:F.galleries.full_gallery_id,title:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{if(a==global_apps){F.API.callMethod("flickr.applications.setMeta",{app_id:this.hash_id,name:a[this.hash_id].title,description:a[this.hash_id].description},c)}else{writeDebug(F.output.get("insitu_unknown_hash"))}}}}}};if(window.deja_view_should_refresh&&window.deja_view_should_empty_titles_and_descriptions){c.innerHTML="..."}return insitu_init_editable_div(c)};var insitu_init_editable_div=function(a){a.startEditing=function(g){if(window.should_I_ignore_stuff_because_note_editing||window.should_I_ignore_stuff_because_of_button_action){return}if(g||event){var d=Y.E.getTarget(g?g:event);if(d&&_el_is_in_a_link(d)){return true}}window.should_I_ignore_stuff_because_of_editable_div_action=1;var b=_ge("photo_notes");if(b&&b.take_her_away){b.take_her_away()}this.isEditing=true;this.unhighlight();this.style.display="none";var c=this.getForm_div();c.style.display="block";var f=c.firstChild;f.content.focus();f.content.select();if(typeof(this.check_changes)=="function"){this.check_changes(true)}};a.endEditing=function(){window.should_I_ignore_stuff_because_of_editable_div_action=0;this.isEditing=false;var b=this.getForm_div();b.innerHTML="";b.style.display="none";this.style.display="block";if(typeof(this.check_changes)=="function"){this.check_changes(false);if(_ge("div_boing_alert_"+this.hash_id)){_ge("div_boing_alert_"+this.hash_id).style.display="none"}}};a.onclick=a.startEditing;a.getForm_div=function(){if(!this.form_div){this.form_div=document.createElement("div");this.parentNode.insertBefore(this.form_div,this);this.form_div.display_div=this}var c='<form onsubmit="this.parentNode.display_div.saveChanges(this); return false;" style="margin-left:'+this.style.marginLeft+'" style="margin-right:'+this.style.marginRight+'">';c+=this.getInput();if(a.show_some_html_is_ok){if(_ge("div_boing_alert_"+this.hash_id)){var b="window.open('/html.gne?tighten=1','html','status=yes,scrollbars=yes,resizable=yes,width=400,height=480')"}else{var b="window.open('/html.gne?','html','status=yes,scrollbars=yes,resizable=yes,width=400,height=480')"}if(window.do_bbml){if(_ge("div_boing_alert_"+this.hash_id)){b="F.html_info.show(this);"}else{b="F.html_info.show(this);"}}if(_ge("div_boing_alert_"+this.hash_id)){c+='<small>(<a class="Plain" onclick="'+b+';return false" href="/html.gne?tighten=1" tabindex="'+tab_bumper+'4">'+F.output.get("some_tiny_html")+"</a>.)</small>"}else{c+='<small>(<a class="Plain" onclick="'+b+';return false" href="/html.gne?tighten=0" tabindex="'+tab_bumper+'4">'+F.output.get("some_html")+"</a>.)</small>"}}c+='<br /><input id="blast_save_button" type="submit" class="'+(this.useSmallButts?"Small":"")+'Butt" value="'+F.output.get("save_up")+'" tabindex="'+tab_bumper+'2" />&nbsp;&nbsp;<span style="font-family:arial; font-size:'+(this.useSmallButts?"11":"12")+'px;">'+F.output.get("or_up")+'</span>&nbsp;&nbsp;<input type="button" class="'+(this.useSmallButts?"Small":"")+'CancelButt" value="'+F.output.get("cancel")+'" onclick="this.form.parentNode.display_div.endEditing();" tabindex="'+tab_bumper+'3" /></form>';c+=this.getExtra();this.form_div.innerHTML=c;tab_bumper+=10;return this.form_div};a.onmouseover=function(){if(window.should_I_ignore_stuff_because_note_editing||window.should_I_ignore_stuff_because_of_button_action){return}this.highlight()};a.onmouseout=function(){if(this.hideTimer){clearTimeout(this.hideTimer)}this.hideTimer=setTimeout('var el = document.getElementById("'+this.id+'"); if (el) el.unhighlight()',1000)};a.highlight=function(){if(this.hideTimer){clearTimeout(this.hideTimer)}a.style.backgroundColor="#ffffd3";if(this.emptyText&&(a.innerHTML=="&nbsp;"||a.innerHTML==" "||a.innerHTML.charCodeAt(0)==160)){a.style.color="#888";a.innerHTML=this.emptyText}};a.unhighlight=function(){if(this.hideTimer){clearTimeout(this.hideTimer)}if(typeof(this.check_changes)=="function"){a.style.backgroundColor="#efefef"}else{a.style.backgroundColor=""}if(this.emptyText&&a.innerHTML.toUpperCase()==this.emptyText.toUpperCase()){a.innerHTML="&nbsp;";a.style.color="#000"}};return a};F.slideshow=function(D,l,y){var v="swfdiv";var B=(D.set_id==undefined)?"":D.set_id;var p=(D.tags==undefined)?"":D.tags;var o=(D.text==undefined)?"":D.text;var c=(D.user_id==undefined)?"":D.user_id;var d=(D.favorites==undefined)?"":D.favorites;var k=(D.tag_mode==undefined)?"":D.tag_mode;var t=(D.group_id==undefined)?"":D.group_id;var f=(D.contacts==true)?"y":"";var q=(D.frifam==true)?"y":"";var C=(D.single==true)?"y":"";var g=(D.start_id==undefined||D.start_id=="start_id")?"":D.start_id;var m=(D.start_index==undefined||D.start_index=="start_index")?"":D.start_index;var A=(D.look_for_start_id==undefined||D.look_for_start_id=="look_for_start_id")?"":D.look_for_start_id;var z=(D.sort==undefined)?"":D.sort;var a=(D.api_method==undefined)?"":D.api_method;var i=(D.api_params_str==undefined)?"":D.api_params_str;var n=(D.method_params==undefined)?"":D.method_params;var r=(D.page_show_back_url==undefined)?"":D.page_show_back_url;var e=(D.page_show_url==undefined)?"":D.page_show_url;var j=document.getElementById(v);if(!j){return}var s="000000";var u="100%";if(l){u=l}var b="100%";if(_qs_args.noresize=="1"){b="300"}if(y){b=y}window.se_min_w=100;window.se_max_w=4000;window.se_min_h=100;var E="/apps/slideshow/show.swf.v"+global_slideShowVersionV3;var x=new SWFObject(E,"slideShowMovie",u,b,9,"#000000");x.addParam("allowFullScreen","true");x.addParam("allowScriptAccess","always");x.addParam("bgcolor","#000000");x.addVariable("lang",global_intl_lang);x.addVariable("flickr_notracking","true");x.addVariable("flickr_target","_self");x.addVariable("nsid",global_nsid);x.addVariable("textV",global_slideShowTextVersion);x.addVariable("lang",global_intl_lang);x.addVariable("ispro",global_ispro);x.addVariable("magisterLudi",global_magisterLudi);x.addVariable("auth_hash",global_auth_hash);if(B){x.addVariable("set_id",B)}if(o){x.addVariable("text",escape_utf8(o))}if(p){x.addVariable("tags",escape_utf8(p))}if(k){x.addVariable("tag_mode",escape(k))}if(c){x.addVariable("user_id",c)}if(d){x.addVariable("favorites",d)}if(t){x.addVariable("group_id",t)}if(f){x.addVariable("contacts",f)}if(q){x.addVariable("frifam",q)}if(C){x.addVariable("single",C)}if(g){x.addVariable("jump_to",g)}if(r){x.addVariable("page_show_back_url",r)}if(e){x.addVariable("page_show_url",e)}if(m){x.addVariable("start_index",m)}if(A){x.addVariable("look_for_start_id",A)}if(z){x.addVariable("sort",z)}if(se_min_h){x.addVariable("minH",se_min_h)}if(se_min_w){x.addVariable("minW",se_min_w)}if(a){x.addVariable("method",a)}if(i){x.addVariable("api_params_str","&"+i)}if(n){x.addVariable("method_params",n)}x.write(v);if(document.slideShowMovie&&typeof document.slideShowMovie.focus=="function"){document.slideShowMovie.focus()}};function calculateFlashHeight(){var a=_find_screen_height()-(Y.U.Dom.getY(_ge("swfdiv")));a=(a>se_min_h)?a:se_min_h;return a}function calculateFlashWidth(){var a=_find_screen_width();a=(a>se_min_w)?a:se_min_w;return a}function slide_makeItFit(){if(!_ge("swfdiv")){return}if(_qs_args.noresize!="1"){_ge("swfdiv").style.height=calculateFlashHeight()+"px"}_ge("swfdiv").style.width=calculateFlashWidth()+"px";var a=_find_screen_width();var b=_find_screen_height()}F.eb_add({window_onload_dom:function(){slide_makeItFit()}});F.eb_add({window_onresize:function(){slide_makeItFit()}});/*
Copyright (c) 2005 JSON.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The Software shall be used for Good, not Evil.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*
    The global object JSON contains two methods.

    JSON.stringify(value) takes a JavaScript value and produces a JSON text.
    The value must not be cyclical.

    JSON.parse(text) takes a JSON text and produces a JavaScript value. It will
    throw a 'JSONError' exception if there is an error.
*/

// Nope.
var JSON = JSON;

// var JSON = {
//     copyright: '(c)2005 JSON.org',
//     license: 'http://www.crockford.com/JSON/license.html',
// /*
//     Stringify a JavaScript value, producing a JSON text.
// */
//     stringify: function (v) {
//         var a = [];
//
// /*
//     Emit a string.
// */
//         function e(s) {
//             a[a.length] = s;
//         }
//
// /*
//     Convert a value.
// */
//         function g(x) {
//             var c, i, l, v;
//
//             switch (typeof x) {
//             case 'object':
//                 if (x) {
//                     if (x instanceof Array) {
//                         e('[');
//                         l = a.length;
//                         for (i = 0; i < x.length; i += 1) {
//                             v = x[i];
//                             if (typeof v != 'undefined' &&
//                                     typeof v != 'function') {
//                                 if (l < a.length) {
//                                     e(',');
//                                 }
//                                 g(v);
//                             }
//                         }
//                         e(']');
//                         return;
//                     } else if (typeof x.toString != 'undefined') {
//                         e('{');
//                         l = a.length;
//                         for (i in x) {
//                             v = x[i];
//                             if (x.hasOwnProperty(i) &&
//                                     typeof v != 'undefined' &&
//                                     typeof v != 'function') {
//                                 if (l < a.length) {
//                                     e(',');
//                                 }
//                                 g(i);
//                                 e(':');
//                                 g(v);
//                             }
//                         }
//                         return e('}');
//                     }
//                 }
//                 e('null');
//                 return;
//             case 'number':
//                 e(isFinite(x) ? +x : 'null');
//                 return;
//             case 'string':
//                 l = x.length;
//                 e('"');
//                 for (i = 0; i < l; i += 1) {
//                     c = x.charAt(i);
//                     if (c >= ' ') {
//                         if (c == '\\' || c == '"') {
//                             e('\\');
//                         }
//                         e(c);
//                     } else {
//                         switch (c) {
//                             case '\b':
//                                 e('\\b');
//                                 break;
//                             case '\f':
//                                 e('\\f');
//                                 break;
//                             case '\n':
//                                 e('\\n');
//                                 break;
//                             case '\r':
//                                 e('\\r');
//                                 break;
//                             case '\t':
//                                 e('\\t');
//                                 break;
//                             default:
//                                 c = c.charCodeAt();
//                                 e('\\u00' + Math.floor(c / 16).toString(16) +
//                                     (c % 16).toString(16));
//                         }
//                     }
//                 }
//                 e('"');
//                 return;
//             case 'boolean':
//                 e(String(x));
//                 return;
//             default:
//                 e('null');
//                 return;
//             }
//         }
//         g(v);
//         return a.join('');
//     },
// /*
//     Parse a JSON text, producing a JavaScript value.
// */
//     parse: function (text) {
//         var p = /^\s*(([,:{}\[\]])|"(\\.|[^\x00-\x1f"\\])*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)\s*/,
//             token,
//             operator;
//
//         function error(m, t) {
//             throw {
//                 name: 'JSONError',
//                 message: m,
//                 text: t || operator || token
//             };
//         }
//
//         function next(b) {
//             if (b && b != operator) {
//                 error("Expected '" + b + "'");
//             }
//             if (text) {
//                 var t = p.exec(text);
//                 if (t) {
//                     if (t[2]) {
//                         token = null;
//                         operator = t[2];
//                     } else {
//                         operator = null;
//                         try {
//                             token = eval(t[1]);
//                         } catch (e) {
//                             error("Bad token", t[1]);
//                         }
//                     }
//                     text = text.substring(t[0].length);
//                 } else {
//                     error("Unrecognized token", text);
//                 }
//             } else {
//                 token = operator = undefined;
//             }
//         }
//
//
//         function val() {
//             var k, o;
//             switch (operator) {
//             case '{':
//                 next('{');
//                 o = {};
//                 if (operator != '}') {
//                     for (;;) {
//                         if (operator || typeof token != 'string') {
//                             error("Missing key");
//                         }
//                         k = token;
//                         next();
//                         next(':');
//                         o[k] = val();
//                         if (operator != ',') {
//                             break;
//                         }
//                         next(',');
//                     }
//                 }
//                 next('}');
//                 return o;
//             case '[':
//                 next('[');
//                 o = [];
//                 if (operator != ']') {
//                     for (;;) {
//                         o.push(val());
//                         if (operator != ',') {
//                             break;
//                         }
//                         next(',');
//                     }
//                 }
//                 next(']');
//                 return o;
//             default:
//                 if (operator !== null) {
//                     error("Missing value");
//                 }
//                 k = token;
//                 next();
//                 return k;
//             }
//         }
//         next();
//         return val();
//     }
// };
anim_eqA=["easeInOutBounce","easeOutBounce","easeInBounce","easeInOutBack","easeOutBack","easeInBack","easeInOutElastic","easeOutElastic","easeInElastic","easeOutCirc","easeInOutCirc","easeInCirc","easeInOutExpo","easeOutExpo","easeInExpo","easeInOutSine","easeOutSine","easeInSine","easeInOutQuint","easeOutQuint","easeInQuint","easeInOutQuart","easeOutQuart","easeInQuart","easeOutCubic","easeInCubic","easeInOutQuad","easeOutQuad","easeInQuad","linearTween"];anim_count=0;anim_animate=function(b,d){var d=(d==undefined)?"anim_seq"+(anim_count++):d;var c=0;var e=d+"i";this[d]=function(){if(this[e]){clearTimeout(this[e])}if(c==b.length){this[d]=null;this[e]=null;if(!this.length){if(F.is_ie){this.removeAttribute(d);this.removeAttribute(e)}else{delete this[d];delete this[e]}}else{this[d]=null;this[e]=null}if(typeof list_properties=="function"){list_properties(this)}return}b[c].unshift(this[d]);this[e]=anim_step.apply(this,b[c]);c++;return this[e]};return this[d]()};anim_step=function(o,m,a,q,f,r){var c="anim_interv"+(anim_count++);var s=0;var m=m;var e=this;var r=r;var j=[];for(var h=6;h<arguments.length;h++){var b=arguments[h];if(e.length){var n=[];for(var g=0;g<b.e.length;g++){n.push(b.e[g]-b.b[g])}b.c=n}else{b.c=b.e-b.b}if(b.eq==""||!Math[b.eq]){b.eq="linearTween"}j.push(b)}if(j.length==0){return}var l=setInterval(function(){var w=(e.length==undefined)?[e]:e;if(s>m){return}for(var d=0;d<w.length;d++){if(typeof r=="function"){var t=[];for(var k=0;k<j.length;k++){var u=j[k];if(e.length!=undefined){var v=_pi(Math[u.eq](s,u.b[d],u.c[d],m))}else{var v=_pi(Math[u.eq](s,u.b,u.c,m))}t.push(v)}r.apply(w[d],t)}else{for(var k=0;k<j.length;k++){var u=j[k];if(e.length!=undefined){var v=_pi(Math[u.eq](s,u.b[d],u.c[d],m))}else{var v=_pi(Math[u.eq](s,u.b,u.c,m))}if(v){v+="px"}w[d].style[u.p]=v}}}if(s==m){clearTimeout(l);o.call(e);if(typeof q=="function"){if(!f){f=[]}q.apply(e[d],f)}}s++},a);return l};anim_do_height_to=function(b,k,a,j,m,l,c,g){if(b.length){var e=[];for(var f=0;f<b.length;f++){e.push((b[f].style.height)?_pi(b[f].style.height):b[f].offsetHeight)}if(b.length!=j.length){alert("wrong length h "+b.length+" "+j.length);return}}else{var e=(b.style.height)?_pi(b.style.height):b.offsetHeight}return anim_animate.call(b,[[k,a,l,c,g,{p:"height",b:e,e:j,eq:m}]],"anim_do_height_to")};anim_do_width_to=function(f,h,e,c,b,a,g){return anim_animate.call(f,[[h,e,a,g,null,{p:"width",b:f.offsetWidth,e:c,eq:b}]],"anim_do_width_to")};anim_do_size_to=function(f,h,c,e,b,a,g){return anim_animate.call(f,[[h,c,a,g,anim_handler_size_to,{p:"s",b:f.offsetWidth,e:e,eq:b}]],"anim_do_size_to")};anim_do_opacity_to=function(c,h,b,g,l,k,e){if(c.length){var j=[];for(var f=0;f<c.length;f++){var a=100;if(F.is_ie){if(c[f].style.filter.indexOf("alpha(opacity=")!=-1){a=c[f].style.filter.replace("alpha(opacity=","").replace(")","")}}else{if(c[f].style.opacity!=undefined&&c[f].style.opacity.length>0){a=c[f].style.opacity*100}}j.push(a)}if(c.length!=j.length){alert("wrong length of bop "+c.length+" "+j.length);return}if(c.length!=g.length){if(!g.length){opA=[];for(var f=0;f<c.length;f++){opA.push(g)}g=opA}else{alert("wrong length of op "+g);return}}}else{var j=100;if(F.is_ie){if(c.style.filter.indexOf("alpha(opacity=")!=-1){j=c.style.filter.replace("alpha(opacity=","").replace(")","")*1}}else{if(c.style.opacity!=undefined&&c.style.opacity.length>0){j=c.style.opacity*100}}}return anim_animate.call(c,[[h,b,k,e,anim_handler_opacity,{p:"val",b:j,e:g,eq:l}]],"anim_do_opacity_to")};anim_do_size_to_and_slide_to_on_center=function(b,e,a,j,g,f,i,h,c){return anim_animate.call(b,[[e,a,h,c,anim_handler_size_to_and_slide_to_on_center,{p:"s",b:b.offsetWidth,e:j,eq:i},{p:"x",b:Y.U.Dom.getX(b)+(b.offsetWidth/2),e:g,eq:i},{p:"y",b:Y.U.Dom.getY(b)+(b.offsetHeight/2),e:f,eq:i}]],"anim_do_size_to_and_slide_to_on_center")};anim_do_size_to_and_slide_to=function(b,e,a,j,g,f,i,h,c){return anim_animate.call(b,[[e,a,h,c,anim_handler_size_to_and_slide_to,{p:"s",b:b.offsetWidth,e:j,eq:i},{p:"x",b:F.get_local_X(b),e:g,eq:i},{p:"y",b:F.get_local_Y(b),e:f,eq:i}]],"anim_do_size_to_and_slide_to")};anim_do_slide_to_on_center=function(f,h,e,c,i,b,a,g){return anim_animate.call(f,[[h,e,a,g,anim_handler_center_on,{p:"x",b:Y.U.Dom.getX(f)+(f.offsetWidth/2),e:c,eq:b},{p:"y",b:Y.U.Dom.getY(f)+(f.offsetHeight/2),e:i,eq:b}]],"anim_do_slide_to_on_center")};anim_do_slide_to=function(b,f,a,k,h,m,l,c,j,g){if(b.length){if(j==undefined||j.length==undefined){var j=[];var g=[];for(var e=0;e<b.length;e++){if(b[e].style.left!=undefined){j.push(_pi(b[e].style.left))}else{j.push(Y.U.Dom.getX(b[e]))}if(b[e].style.top!=undefined){g.push(_pi(b[e].style.top))}else{g.push(Y.U.Dom.getY(b[e]))}}}if(b.length!=j.length||b.length!=g.length){alert("wrong length of sx or sy "+b.length+" "+j.length+" "+g.length);return}if(b.length!=k.length||b.length!=h.length){alert("wrong length of s or y");return}}else{j=(j!=undefined)?j:(b.style.left!=undefined)?_pi(b.style.left):Y.U.Dom.getX(b);g=(g!=undefined)?g:(b.style.top!=undefined)?_pi(b.style.top):Y.U.Dom.getY(b)}return anim_animate.call(b,[[f,a,l,c,null,{p:"left",b:j,e:k,eq:m},{p:"top",b:g,e:h,eq:m}]],"anim_do_slide_to")};anim_do_slide_relative_to=function(f,h,e,c,i,b,a,g){return anim_animate.call(f,[[h,e,a,g,null,{p:"left",b:_pi(f.style.left),e:c,eq:b},{p:"top",b:_pi(f.style.top),e:i,eq:b}]],"anim_do_slide_relative_to")};anim_do_slide_to_x=function(f,h,e,c,b,a,g){return anim_animate.call(f,[[h,e,a,g,null,{p:"left",b:F.get_local_X(f),e:c,eq:b}]],"anim_do_slide_to_x")};anim_do_scroll_to_scrollTop=function(e,h,c,g,b,a,f){return anim_animate.call(e,[[h,c,a,f,anim_handler_set_scrollTop,{p:"scrollTop",b:e.scrollTop,e:g,eq:b}]],"anim_do_scroll_to_scrollTop")};anim_do_marginTop_to=function(e,h,c,f,b,a,g){return anim_animate.call(e,[[h,c,a,g,null,{p:"marginTop",b:_pi(e.style.marginTop),e:f,eq:b}]],"anim_do_marginTop_to")};anim_do_marginLeft_to=function(e,h,c,f,b,a,g){return anim_animate.call(e,[[h,c,a,g,null,{p:"marginLeft",b:_pi(e.style.marginLeft),e:f,eq:b}]],"anim_do_marginLeft_to")};anim_do_blink_pink=function(b,a,c){return anim_animate.call(b,[[1,1,null,[],anim_handler_set_color_rgb,{p:"r",b:0,e:255,eq:"easeOutQuad"},{p:"g",b:0,e:0,eq:"easeOutQuad"},{p:"b",b:0,e:132,eq:"easeOutQuad"}],[4,50,null,[],anim_handler_set_color_rgb,{p:"r",b:255,e:0,eq:"easeOutQuad"},{p:"g",b:0,e:0,eq:"easeOutQuad"},{p:"b",b:132,e:0,eq:"easeOutQuad"}],[1,1,null,[],anim_handler_set_color_rgb,{p:"r",b:0,e:255,eq:"easeOutQuad"},{p:"g",b:0,e:0,eq:"easeOutQuad"},{p:"b",b:0,e:132,eq:"easeOutQuad"}],[4,50,a,c,anim_handler_set_color_rgb,{p:"r",b:255,e:0,eq:"easeOutQuad"},{p:"g",b:0,e:0,eq:"easeOutQuad"},{p:"b",b:132,e:0,eq:"easeOutQuad"}]],"anim_do_blink_pink")};anim_do_blink_yellow=function(b,a,c){return anim_animate.call(b,[[8,200,null,[],anim_handler_set_bgcolor_rgb,{p:"r",b:254,e:255,eq:"easeInQuad"},{p:"g",b:254,e:255,eq:"easeInQuad"},{p:"b",b:234,e:242,eq:"easeInQuad"}],[8,200,null,[],anim_handler_set_bgcolor_rgb,{p:"r",b:255,e:254,eq:"easeInQuad"},{p:"g",b:255,e:254,eq:"easeInQuad"},{p:"b",b:242,e:234,eq:"easeInQuad"}],],"anim_do_blink_yellow")};anim_do_color_to=function(c,i,b,a,g,j,l,f,h,m,k,e){return anim_animate.call(c,[[i,b,null,[],anim_handler_set_color_rgb,{p:"r",b:a,e:l,eq:m},{p:"g",b:g,e:f,eq:m},{p:"b",b:j,e:h,eq:m}]],"anim_do_color_to")};anim_do_bgcolor_to=function(c,i,b,a,g,j,l,f,h,m,k,e){return anim_animate.call(c,[[i,b,k,e,anim_handler_set_bgcolor_rgb,{p:"r",b:a,e:l,eq:m},{p:"g",b:g,e:f,eq:m},{p:"b",b:j,e:h,eq:m}]],"anim_do_bgcolor_to")};anim_do_pink_fade=function(b,a,c){return anim_animate.call(b,[[50,50,null,[],anim_handler_set_backgroundColor_rgb,{p:"r",b:255,e:239,eq:"easeOutQuad"},{p:"g",b:255,e:239,eq:"easeOutQuad"},{p:"b",b:255,e:239,eq:"easeOutQuad"}]],"anim_do_blink_pink")};anim_do_margin_dance_right=function(b,c,a){return anim_animate.call(b,[[c,a,null,[],null,{p:"marginRight",b:110,e:0,eq:"easeInOutQuad"},{p:"marginLeft",b:-110,e:0,eq:"easeInOutQuad"}]],"anim_do_margin_dance_right")};anim_do_margin_dance_left=function(b,c,a){return anim_animate.call(b,[[c,a,null,[],null,{p:"marginLeft",b:110,e:0,eq:"easeInOutQuad"}]],"anim_do_margin_dance_left")};anim_handler_set_color_rgb=function(d,c,a){anm_set_rgb.call(this,"color",d,c,a)};anim_handler_set_bgcolor_rgb=function(d,c,a){anm_set_rgb.call(this,"backgroundColor",d,c,a)};anim_handler_set_scrollTop=function(a){this.scrollTop=a};anim_handler_set_backgroundColor_rgb=function(d,c,a){anm_set_rgb.call(this,"backgroundColor",d,c,a)};anim_handler_center_on=function(a,b){this.style.left=_pi(a-(this.offsetWidth/2))+"px";this.style.top=_pi(b-(this.offsetHeight/2))+"px"};anim_handler_opacity=function(a){this.style.opacity=a/100;this.style.filter="alpha(opacity="+a+")"};anim_handler_size_to=function(a){this.style.width=a+"px";this.style.height=a+"px"};anim_handler_size_to_and_slide_to_on_center=function(b,a,c){this.style.left=_pi(a-(b/2))+"px";this.style.top=_pi(c-(b/2))+"px";this.style.width=b+"px";this.style.height=b+"px"};anim_handler_size_to_and_slide_to=function(b,a,c){this.style.left=_pi(a)+"px";this.style.top=_pi(c)+"px";this.style.width=b+"px";this.style.height=b+"px"};anm_set_rgb=function(e,d,c,a){this.style[e]="rgb("+d+", "+c+", "+a+")"};Math.linearTween=function(e,a,g,f){return g*e/f+a};Math.easeInQuad=function(e,a,g,f){return g*(e/=f)*e+a};Math.easeOutQuad=function(e,a,g,f){return -g*(e/=f)*(e-2)+a};Math.easeInOutQuad=function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a}return -g/2*((--e)*(e-2)-1)+a};Math.easeInCubic=function(e,a,g,f){return g*(e/=f)*e*e+a};Math.easeOutCubic=function(e,a,g,f){return g*((e=e/f-1)*e*e+1)+a};Math.easeInOutCubic=function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e+a}return g/2*((e-=2)*e*e+2)+a};Math.easeInQuart=function(e,a,g,f){return g*(e/=f)*e*e*e+a};Math.easeOutQuart=function(e,a,g,f){return -g*((e=e/f-1)*e*e*e-1)+a};Math.easeInOutQuart=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};Math.easeInQuint=function(e,a,g,f){return g*(e/=f)*e*e*e*e+a};Math.easeOutQuint=function(e,a,g,f){return g*((e=e/f-1)*e*e*e*e+1)+a};Math.easeInOutQuint=function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e*e*e+a}return g/2*((e-=2)*e*e*e*e+2)+a};Math.easeInSine=function(e,a,g,f){return -g*Math.cos(e/f*(Math.PI/2))+g+a};Math.easeOutSine=function(e,a,g,f){return g*Math.sin(e/f*(Math.PI/2))+a};Math.easeInOutSine=function(e,a,g,f){return -g/2*(Math.cos(Math.PI*e/f)-1)+a};Math.easeInExpo=function(e,a,g,f){return(e==0)?a:g*Math.pow(2,10*(e/f-1))+a};Math.easeOutExpo=function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a};Math.easeInOutExpo=function(e,a,g,f){if(e==0){return a}if(e==f){return a+g}if((e/=f/2)<1){return g/2*Math.pow(2,10*(e-1))+a}return g/2*(-Math.pow(2,-10*--e)+2)+a};Math.easeInCirc=function(e,a,g,f){return -g*(Math.sqrt(1-(e/=f)*e)-1)+a};Math.easeOutCirc=function(e,a,g,f){return g*Math.sqrt(1-(e=e/f-1)*e)+a};Math.easeInOutCirc=function(e,a,g,f){if((e/=f/2)<1){return -g/2*(Math.sqrt(1-e*e)-1)+a}return g/2*(Math.sqrt(1-(e-=2)*e)+1)+a};Math.easeInElastic=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<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};Math.easeOutElastic=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<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};Math.easeInOutElastic=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<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};Math.easeInBack=function(e,a,h,g,f){if(f==undefined){f=1.70158}return h*(e/=g)*e*((f+1)*e-f)+a};Math.easeOutBack=function(e,a,h,g,f){if(f==undefined){f=1.70158}return h*((e=e/g-1)*e*((f+1)*e+f)+1)+a};Math.easeInOutBack=function(e,a,h,g,f){if(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};Math.easeInBounce=function(e,a,g,f){return g-Math.easeOutBounce(f-e,0,g,f)+a};Math.easeOutBounce=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}else{return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+a}}}};Math.easeInOutBounce=function(e,a,g,f){if(e<f/2){return Math.easeInBounce(e*2,0,g,f)*0.5+a}return Math.easeOutBounce(e*2-f,0,g,f)*0.5+g*0.5+a};F._one_photo_tab=new Object();F._one_photo_tab.tab_go_go_go=function(a){this.rsp_errs=[];if(a){this.style.cursor="default";_ge("one_photo_edit_pop").pop_activate_tab(this.id)}else{this.style.cursor=(F.is_ie)?"hand":"pointer"}};F._one_photo_tab.tab_activate=function(){this.className="one_photo_tab_active";this.style.cursor="default"};F._one_photo_tab.tab_deactivate=function(){this.className="one_photo_tab";this.style.cursor=(F.is_ie)?"hand":"pointer"};F._one_photo_tab.onclick=function(b){var a=_get_event_src(b);if(!b){b=window.event}if(a!=this){return}_ge("one_photo_edit_pop").pop_activate_tab(this.id)};F._one_photo_edit_pop=new Object();F._one_photo_edit_pop.pop_go_go_go=function(){F.decorate(this,F._eb).eb_go_go_go();this.style.position="absolute";this.style.zIndex="995";this.style.top="0";this.style.left="0";this.style.display="none";this.pop_shadow_id=F.make_shadow(this.id,994).id;this.pop_showing=0;this.pop_loading=1;this.pop_fragment_loaded=0;var a=document.createElement("DIV");a.id="one_photo_modal_blocker";a.style.position="absolute";a.style.zIndex="993";a.style.top=0;a.style.backgroundColor="#999";a.style.opacity=".5";a.style.filter="alpha(opacity=50)";a.style.display="none";document.body.appendChild(a);F.eb_add(this);return this};F._one_photo_edit_pop.pop_get_mb=function(){return _ge("one_photo_modal_blocker")};F._one_photo_edit_pop.pop_get_active_tab_id=function(){return this.pop_active_tab_id};F._one_photo_edit_pop.pop_get_mat_id_from_tab_id=function(a){return a.replace_global("_tab_","_mat_")};F._one_photo_edit_pop.pop_activate_tab=function(a){if(this.pop_get_active_tab_id()!=a){if(this.pop_get_active_tab_id()){this.pop_deactivate_tab(this.pop_get_active_tab_id())}_ge(a).tab_activate();var b=this.pop_get_mat_id_from_tab_id(a);_ge(b).style.display="block";this.pop_active_tab_id=a;this.pop_place();this.pop_do_focus()}};F._one_photo_edit_pop.pop_close_license_pop=function(){l_pop=_ge("one_photo_license_pop");l_pop.style.display="none";if(this.pop_license_pop_shadow_id){_ge(this.pop_license_pop_shadow_id).shadow_hide()}};F._one_photo_edit_pop.pop_license_was_switched=function(){this.pop_close_license_pop();this.pop_change_license_name()};F._one_photo_edit_pop.pop_open_license_pop=function(){l_pop=_ge("one_photo_license_pop");if(!this.pop_license_pop_shadow_id){this.pop_license_pop_shadow_id=F.make_shadow("one_photo_license_pop",2,this,l_pop).id}l_pop.style.display="block";l_pop.style.visibility="hidden";var a=_pi((this.offsetWidth-l_pop.offsetWidth)/2);var b=_pi((this.offsetHeight-l_pop.offsetHeight)/2);l_pop.style.left=a+"px";l_pop.style.top=b+"px";l_pop.style.visibility="visible";_ge(this.pop_license_pop_shadow_id).shadow_size_and_place();if(!F.is_ie){_ge(this.pop_license_pop_shadow_id).shadow_show()}};F._one_photo_edit_pop.pop_toggle_more_perms_table=function(){var b=_ge("one_photo_more_perms_table");var a=_ge("one_photo_more_perm_carrot_div");if(b.style.display!="none"){b.style.display="none";a.style.display="block"}else{b.style.display="block";a.style.display="none"}this.pop_place()};F._one_photo_edit_pop.pop_deactivate_tab=function(a){if(!_ge(a)){return}_ge(a).tab_deactivate();var b=this.pop_get_mat_id_from_tab_id(a);_ge(b).style.display="none"};F._one_photo_edit_pop.fragment_onLoad=function(e,c,d){this.innerHTML=c;this.pop_fragment_loaded=1;var b=Y.U.Dom.getElementsByClassName("one_photo_tab","div",_ge("one_photo_inner_border_div"));for(var a=0;a<b.length;a++){F.decorate(b[a],F._one_photo_tab).tab_go_go_go()}var b=Y.U.Dom.getElementsByClassName("one_photo_tab_active","div",_ge("one_photo_inner_border_div"));for(var a=0;a<b.length;a++){this.pop_active_tab_id=b[a].id;F.decorate(b[a],F._one_photo_tab).tab_go_go_go(1)}F.decorate(_ge("one_photo_more_perm_carrot_div"),F._carrot).carrot_go_go_go("down",0);F.decorate(_ge("one_photo_close_img"),F._simple_button).button_go_go_go();this.pop_stop_comming();if(this.pop_photo){this.pop_show(this.pop_photo.id,this.pop_A,this.pop_photo_slot,this.pop_what)}};F._one_photo_edit_pop.pop_done_hiding=function(){this.style.display="none";_ge(this.pop_shadow_id).shadow_hide();this.pop_photo=null;this.pop_A=null;this.pop_photo_slot=null;this.pop_what=null;this.pop_get_mb().style.display="none";this.pop_change_next_prev_text();this.pop_activate_tab("one_photo_tab_title");this.eb_broadcast("one_photo_onhide");_ge("one_photo_prev_link").style.visibility="hidden";_ge("one_photo_next_link").style.visibility="hidden";_ge("one_photo_goto_next").style.visibility=_ge("one_photo_goto_next_label").style.visibility="hidden";this.pop_clear_form();if(window.ymap){ymap._disableKeys=false}F.eb_broadcast("stewart_play_if_was_playing")};F._one_photo_edit_pop.pop_hide=function(){_ge(this.pop_shadow_id).shadow_hide();this.pop_close_license_pop();var b=this;var a=function(){b.pop_done_hiding()};anim_do_opacity_to(b,5,35,0,"easeInQuad",a);this.pop_showing=0};F._one_photo_edit_pop.pop_show_start=function(e,a,b,d,c){this.pop_were_changes_when_opened=F.changes_count;this.eb_broadcast("one_photo_onshow");this.pop_show(e,a,b,d,c)};F._one_photo_edit_pop.pop_show=function(e,a,b,d,c){F.eb_broadcast("stewart_pause");if(window.ymap){ymap._disableKeys=true}this.pop_photo=global_photos[e];this.pop_A=a;this.pop_photo_slot=b;this.pop_what=d;this.pop_place();if(!this.pop_fragment_loaded){this.pop_loading=1;this.pop_start_comming(F.output.get("loading_interface"));F.fragment_getter.get("/photo_edit_fragment.gne",{one_photo_show_belongs:one_photo_show_belongs},this,"fragment_onLoad");return}this.style.opacity="1";this.style.filter="alpha(opacity=100)";this.style.display="block";this.pop_get_mb().style.display="block";this.pop_place();_ge(this.pop_shadow_id).shadow_show();if(!c||(!this.pop_photo||this.pop_photo.description==undefined)){this.pop_loading=1;this.pop_clear_form();this.pop_start_comming(F.output.get("one_photo_edit_loading_info"));F.API.callMethod("flickr.photos.getInfo",{photo_id:e,get_contexts:one_photo_show_belongs,get_geofences:true},this);return}this.pop_loading=0;this.pop_fill_form();this.pop_change_next_prev_text();this.pop_place();_ge(this.pop_shadow_id).shadow_show();this.pop_showing=1;this.pop_do_focus()};F._one_photo_edit_pop.flickr_photos_getInfo_onLoad=function(e,d,b){if(e&&d){var a=d.documentElement.getElementsByTagName("photo")[0];var c=_upsert_photo(a);writeAPIDebug(this.pop_photo.toString());this.pop_stop_comming();this.pop_show(c.id,this.pop_A,this.pop_photo_slot,this.pop_what,1)}else{this.pop_start_comming(F.output.get("one_photo_edit_problem_loading",b.escape_for_display()),1,1);this.pop_hide()}};F._one_photo_edit_pop.pop_change_next_prev_text=function(a){var b=(this.pop_what)?"&nbsp;in "+this.pop_what:"";b="";_ge("one_photo_next_link_what").innerHTML=b;_ge("one_photo_prev_link_what").innerHTML=b;_ge("one_photo_goto_what").innerHTML=b};F._one_photo_edit_pop.window_onresize=function(){this.pop_place()};F._one_photo_edit_pop.pop_place=function(a,d){if(window.innerWidth){var e=window.innerWidth;var b=window.innerHeight;var h=window.pageXOffset;var g=window.pageYOffset}else{var e=document.body.clientWidth;var b=document.body.clientHeight;var h=document.body.scrollLeft;var g=document.body.scrollTop}var l=this;var c=function(){var n=l.offsetWidth;var m=h+_pi((e-n)/2);m=Math.max(m,1);return m};var f=function(){var m=l.offsetHeight;var n=g+_pi((b-m)/2);n=Math.min(n,90);n=Math.max(n,1);return n};var j=(typeof a=="function")?a():(typeof a=="number")?a:c();var i=(typeof d=="function")?d():(typeof d=="number")?d:f();j=Math.max(j,10);i=Math.max(i,10);this.style.left=j+"px";this.style.top=i+"px";if(0&&this.pop_fragment_loaded){this.style.width=this.offsetWidth+"px";this.style.height=this.offsetHeight+"px"}_ge(this.pop_shadow_id).shadow_size_and_place();var k=l.pop_get_mb();k.style.left=h+"px";k.style.top=g+"px";k.style.width=e+"px";k.style.height=b+"px"};F._one_photo_edit_pop.pop_start_comming=function(b,d,k,c,a,j,e,f,g,l){if(!global_comm_div){_make_comm_div("1002")}x_func=null;var i=this;y_func=function(){i.pop_place();return _pi(i.style.top)+100};var h=1;if(this.pop_fragment_loaded){this.pop_place();h={opacity:"0",filter:"alpha(opacity=0)"}}global_comm_div.start_comming(b,x_func,y_func,d,k,c,a,j,e,f,g,h,l)};F._one_photo_edit_pop.pop_stop_comming=function(){global_comm_div.stop_comming()};F._one_photo_edit_pop.pop_go_to_next=function(a){this.pop_go_to_either(1,0,a)};F._one_photo_edit_pop.pop_go_to_previous=function(a){this.pop_go_to_either(-1,0,a)};F._one_photo_edit_pop.pop_get_next_id=function(){return this.pop_go_to_either(1,1)};F._one_photo_edit_pop.pop_get_previous_id=function(){return this.pop_go_to_either(-1,1)};F._one_photo_edit_pop.pop_go_to_either=function(c,d,i){if(!d&&i){if(this.pop_has_changes()){var b=function(){_ge("one_photo_edit_pop").pop_go_to_either(c,d)};var g,h,l,j;var f=true;_ge("tabl").tabl_start_comming(F.output.get("unsaved_msg"),1,1,F.output.get("yes_discard"),b,1,F.output.get("no_stay_here"),g,h,l,j,f);return}}var a=null;var e=0;var k=_ge("findr");if(this.pop_A){curr_index=F.array_index_of(this.pop_A,this.pop_photo.id);e=this.pop_A[curr_index+c]}else{if(this.pop_photo_slot!=undefined&&k){a=this.pop_photo_slot+c;e=k.findr_get_photo_for_slot(a).id}else{writeDebug("unknown context")}}if(d){return e}if(!e){return}if(this.pop_loading){return}this.pop_show(e,this.pop_A,a,this.pop_what)};F._one_photo_edit_pop.pop_clear_form=function(){_ge("one_photo_title").value="";_ge("addtagbox").value="";_ge("one_photo_description").value="";_ge("one_photo_img_div").style.visibility="hidden";_ge("one_photo_date_taken_exact").value="";_ge("one_photo_time_taken_exact").value="";_ge("one_photo_date_posted_exact").value="";_ge("one_photo_time_posted_exact").value="";_ge("one_photo_geo_data_lon").value="";_ge("one_photo_geo_data_lat").value="";_ge("div_load_photo_on_map").style.display="none";if(_ge("one_photo_geofence_title")){_ge("one_photo_geofence_title").innerHTML=""}if(_ge("one_photo_geofence")){_ge("one_photo_geofence").style.display="none"}_ge("one_photo_mat_belongs_list_div").innerHTML=""};F._one_photo_edit_pop.pop_fill_form=function(){if(!disable_geo){if(prefs_isset_viewgeo&&_qs_args.show_geo_pref!="true"){_ge("one_photo_tab_loc").style.display="inline"}else{_ge("one_photo_tab_loc").style.display="none"}}var N=this.pop_photo;var m=(N.media=="video")?"one_photo_v_text":"one_photo_p_text";var o=(N.media=="video")?"one_photo_p_text":"one_photo_v_text";var V=Y.U.Dom.getElementsByClassName(o);for(var S=0;S<V.length;S++){V[S].style.display="none"}var D=Y.U.Dom.getElementsByClassName(m);for(var S=0;S<D.length;S++){D[S].style.display="inline"}var z=this.pop_get_previous_id();var P=this.pop_get_next_id();_ge("one_photo_prev_link").style.visibility=(z)?"visible":"hidden";_ge("one_photo_next_link").style.visibility=(P)?"visible":"hidden";_ge("one_photo_goto_next").style.visibility=_ge("one_photo_goto_next_label").style.visibility=(P)?"visible":"hidden";this.pop_is_there_a_next=P;_ge("one_photo_title").value=N.title;var Q=[];for(var S=0;S<N.tags_rawA.length;S++){var O=N.tags_rawA[S];if(O.indexOf(" ")!=-1){O='"'+O+'"'}Q.push(O)}var B=Q.join(" ");_ge("addtagbox").value=B;_ge("one_photo_description").value=N.description;var k='<img src="'+_get_photo_src(N,"m")+'" style=""';var I,T;if(N.media=="video"&&N.video_ready){I=N.video_width*1;T=N.video_height*1}else{if(N.o_h&&N.o_w){}}var u=240;if(I>u||T>u){var H=u/I;var v=u/T;var d=Math.min(v,H);I=I*d;T=T*d}if(I&&T){k+=' height="'+T+'" width="'+I+'"'}k+=">";if(N.media=="video"&&N.video_ready){k='<span class="photo_container pc_m" id="stewart_swf_'+N.id+'one_photo_div" >'+k+'<a href="/photos/eric/430026997/" class="pc_link" id="stewart_swf_'+N.id+'one_photo_trigger_a"><img src="/images/video_play_icon_medium.png" alt="Play Video"></a></span>'}_ge("one_photo_img_div").innerHTML=k;_ge("one_photo_img_div").style.visibility="visible";if(N.media=="video"&&N.video_ready){F.decorate(_ge("stewart_swf_"+N.id+"one_photo_div"),F._stewart_swf_div).stewart_go_go_go(I,T,{flickr_forceControlSize:"medium",onsite:"true",photo_secret:N.secret,photo_id:N.id},1)}_ge("one_photo_link").href=photos_url+N.id;var n=N.date_taken.split(" ")[0].split("-");var C=(n[1]*1).addZeros(2);var J=(n[2]*1).addZeros(2);var U=n[0]*1;var j=C+"/"+J+"/"+U;var E=N.date_taken.split(" ")[1];_ge("one_photo_date_taken_exact").value=j;_ge("one_photo_time_taken_exact").value=E;var M=_ge("one_photo_date_taken_approx_month");if(N.date_taken_granularity==6){M.options[0].selected=1}else{if(N.date_taken_granularity==8){M.options[1].selected=1}else{for(var S=M.options.length-1;S>-1;S--){var G=M.options[S];if(G.value*1==C){G.selected=1;break}}}}var l=_ge("one_photo_date_taken_approx_year");for(var S=l.options.length-1;S>-1;S--){var G=l.options[S];if(G.value*1==U){G.selected=1;break}}if(N.date_taken_granularity==0){_ge("one_photo_date_taken_exact_div").style.display="block";_ge("one_photo_date_taken_approx_div").style.display="none";_ge("one_photo_date_taken_exact_switcher").style.display="none";_ge("one_photo_date_taken_approx_switcher").style.display="inline"}else{_ge("one_photo_date_taken_exact_div").style.display="none";_ge("one_photo_date_taken_approx_div").style.display="block";_ge("one_photo_date_taken_exact_switcher").style.display="inline";_ge("one_photo_date_taken_approx_switcher").style.display="none"}var R=F.convert_unix_time_stamp(N.date_upload);var q=(R.getMonth()+1).addZeros(2);var b=R.getDate().addZeros(2);var a=R.getFullYear();var s=q+"/"+b+"/"+a;var c=R.getHours().addZeros(2)+":"+R.getMinutes().addZeros(2)+":"+R.getSeconds().addZeros(2);_ge("one_photo_date_posted_exact").value=s;_ge("one_photo_time_posted_exact").value=c;var A=(_pf(N.longitude)&&_pf(N.latitude))?N.latitude:"";var e=(_pf(N.longitude)&&_pf(N.latitude))?N.longitude:"";_ge("one_photo_geo_data_lat").value=A;_ge("one_photo_geo_data_lon").value=e;if(A.length>0&&e.length>0&&_ge("tabl")&&_ge("tabl").tabl_get_active_tab_id()=="tabl_tab_map"){_ge("map_controller")._photo_to_open=_pi(N.id);_ge("div_load_photo_on_map").style.display="block"}else{_ge("div_load_photo_on_map").style.display="none"}if(_pi(N.accuracy)!=0){if(N.geo_is_family=="1"&&N.geo_is_friend=="1"){_ge("one_photo_perm_viewgeo_2").checked=1}else{if(N.geo_is_family=="1"){_ge("one_photo_perm_viewgeo_4").checked=1}else{if(N.geo_is_friend=="1"){_ge("one_photo_perm_viewgeo_3").checked=1}else{if(N.geo_is_contact=="1"){_ge("one_photo_perm_viewgeo_1").checked=1}else{if(N.geo_is_public=="1"){_ge("one_photo_perm_viewgeo_0").checked=1}else{_ge("one_photo_perm_viewgeo_5").checked=1}}}}}}else{_ge("one_photo_perm_viewgeo_"+user_default_geo).checked=1}if(typeof N.geofence_count!=="undefined"&&N.geofence_count>0){if(N.geofence_count==1){if(_ge("one_photo_geofence_title")){_ge("one_photo_geofence_title").innerHTML=N.geofence_label?F.output.get("organizer_geofence_title_name",N.geofence_label.truncate_with_ellipses(40).escape_for_display()):F.output.get("organizer_geofence_title_noname")}}else{if(_ge("one_photo_geofence_title")){_ge("one_photo_geofence_title").innerHTML=F.output.get("organizer_geofence_title_number",N.geofence_count)}}if(_ge("one_photo_geofence")){_ge("one_photo_geofence").style.display="block"}}else{if(_ge("one_photo_geofence_title")){_ge("one_photo_geofence_title").innerHTML=""}if(_ge("one_photo_geofence")){_ge("one_photo_geofence").style.display="none"}}if(global_eighteen){_ge("one_photo_safety_level_"+N.safety_level).checked=1;_ge("one_photo_content_type_"+N.content_type).checked=1;if(N.moderation_mode=="0"||N.moderation_mode=="3"){for(var S=0;S<3;S++){_ge("one_photo_safety_level_"+S).disabled=0;_ge("one_photo_content_type_"+S).disabled=0;Y.D.removeClass("one_photo_safety_level_"+S+"_label","findr_input_disabled");Y.D.removeClass("one_photo_content_type_"+S+"_label","findr_input_disabled")}_ge("one_photo_mat_filters_moderated_div").style.display="none"}else{for(var S=0;S<3;S++){_ge("one_photo_safety_level_"+S).disabled=1;_ge("one_photo_content_type_"+S).disabled=1;Y.D.addClass("one_photo_safety_level_"+S+"_label","findr_input_disabled");Y.D.addClass("one_photo_content_type_"+S+"_label","findr_input_disabled")}_ge("one_photo_mat_filters_moderated_div").style.display="block";_ge("one_photo_mat_filters_moderated_a").href="/help/contact/?cat_shortcut=review_photo&photo_id="+N.id}}var L=_ge("one_photo_license_form").one_photo_license;for(var S=0;S<L.length;S++){var K=L[S];if(K.value==N.license_id){K.checked=1;break}}this.pop_change_license_name();if(window.user_license_restricted){var f=_ge("one_photo_change_license_link_span");if(f){f.style.display="none"}}_ge("one_photo_is_public").checked=1;_ge("one_photo_is_family").checked=1;_ge("one_photo_is_friend").checked=1;if(N.is_public=="0"){_ge("one_photo_is_private").checked=1;if(N.is_friend!="1"){_ge("one_photo_is_friend").checked=0}if(N.is_family!="1"){_ge("one_photo_is_family").checked=0}}var y={"0":"4","1":"3","2":"2","3":"1"};if(!y[N.perm_comment]){N.perm_comment=3}if(!y[N.perm_addmeta]){N.perm_addmeta=3}_ge("one_photo_perm_comment_"+y[N.perm_comment]).checked=1;_ge("one_photo_perm_addmeta_"+y[N.perm_addmeta]).checked=1;_privacy_specific_change("one_photo_",1);var g=[];g.push(F.output.get("one_photo_edit_sets_title"));if(N.sets){for(var S=0;S<N.sets.length;S++){var x=global_sets[N.sets[S]];if(!x){continue}g.push(this.pop_generate_set_HTML(x))}}else{g.push(F.output.get("one_photo_edit_none"))}g.push(F.output.get("one_photo_edit_groups_title"));if(N.pools){for(var S=0;S<N.pools.length;S++){var t=global_groups[N.pools[S]];if(!t){continue}g.push(this.pop_generate_group_HTML(t))}}else{g.push(F.output.get("one_photo_edit_none"))}_ge("one_photo_mat_belongs_list_div").innerHTML=g.join("");this.pop_add_form_handlers();this.pop_form_data_saved=this.pop_get_data_from_form();this.pop_disable_save_and_revert_buttons();if(this.pop_slot&&_ge("findr")){_ge("findr").findr_place_slot_in_mid(this.pop_slot)}};F._one_photo_edit_pop.pop_generate_set_HTML=function(c){var a=global_photos[c.primary_photo_id];var b='<table class="existing_set_table" cellpadding="0" cellspacing="0" border="0"><tr><td><img src="'+_get_photo_src(a)+'" width="25" height="25" alt="" title=""></td><td>'+c.title.truncate_with_ellipses(40).escape_for_display()+" (<b>"+c.count.pretty_num()+"</b>)</td></tr></table>";return b};F._one_photo_edit_pop.pop_generate_group_HTML=function(c){if(c.count!=undefined){var a=(c.count!=1)?F.output.get("one_photo_edit_plural_photos",c.count.pretty_num()):F.output.get("one_photo_edit_single_photo");if(_get_group_throttle_txt(c)){a+=' <span class="group_pipe"> | </span> '+F.output.get("one_photo_edit_limit")+" "+_get_group_throttle_txt(c)}}else{var a=F.output.get("one_photo_edit_no_longer_member")}var b='<table class="existing_group_table" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><img src="'+c.icon_url+'" width="24" height="24" alt="" title=""></td><td><b>'+c.name.truncate_with_ellipses(40).escape_for_display()+"</b><br>"+a+"</td></tr></table>";return b};F._one_photo_edit_pop.pop_change_license_name=function(){var a="";var d=_ge("one_photo_license_form").one_photo_license;for(var b=0;b<d.length;b++){var c=d[b];if(c.checked){a=_ge("one_photo_license_label"+c.value).innerHTML;break}}_ge("one_photo_current_license_name").innerHTML=a};F._one_photo_edit_pop.pop_do_focus=function(){if(!this.pop_showing){return}if(this.pop_get_active_tab_id()=="one_photo_tab_title"){_ge("one_photo_title").focus();_ge("one_photo_title").select()}};F._one_photo_edit_pop.pop_get_data_from_form=function(){var a={};a.title=_ge("one_photo_title").value;a.description=_ge("one_photo_description").value;a.tags=_ge("addtagbox").value;a.dates=F.get_dates_from_form("one_photo_",0);a.lat=_ge("one_photo_geo_data_lat").value;a.lon=_ge("one_photo_geo_data_lon").value;var e="0";var d=_ge("one_photo_license_form").one_photo_license;for(var b=0;b<d.length;b++){if(d[b].checked){e=d[b].value;break}}a.license_id=e;a.is_private=(_ge("one_photo_is_private").checked)?1:0;a.is_public=(a.is_private)?0:1;a.is_friend=(a.is_public||_ge("one_photo_is_friend").checked)?1:0;a.is_family=(a.is_public||_ge("one_photo_is_family").checked)?1:0;a.safety_level=(_ge("one_photo_safety_level_1").checked)?1:0;a.safety_level=(_ge("one_photo_safety_level_2").checked)?2:a.safety_level;if(global_eighteen){a.content_type=(_ge("one_photo_content_type_1").checked)?1:0;a.content_type=(_ge("one_photo_content_type_2").checked)?2:a.content_type}a.geo_is_public=(_ge("one_photo_perm_viewgeo_0").checked)?1:0;a.geo_is_family=(_ge("one_photo_perm_viewgeo_2").checked||_ge("one_photo_perm_viewgeo_4").checked)?1:0;a.geo_is_friend=(_ge("one_photo_perm_viewgeo_2").checked||_ge("one_photo_perm_viewgeo_3").checked)?1:0;a.geo_is_contact=(_ge("one_photo_perm_viewgeo_1").checked)?1:0;a.perm_comment="0";if((_ge("one_photo_perm_comment_3").checked)){a.perm_comment="1"}if((_ge("one_photo_perm_comment_2").checked)){a.perm_comment="2"}if((_ge("one_photo_perm_comment_1").checked)){a.perm_comment="3"}a.perm_addmeta="0";if((_ge("one_photo_perm_addmeta_3").checked)){a.perm_addmeta="1"}if((_ge("one_photo_perm_addmeta_2").checked)){a.perm_addmeta="2"}if((_ge("one_photo_perm_addmeta_1").checked)){a.perm_addmeta="3"}var c="pop_get_data_from_form";for(b in a){c+="<br>"+b+":"+a[b]}return a};F._one_photo_edit_pop.pop_on_form_activity=function(){if(this.pop_has_changes()){F.changes_were_made(F.output.get("one_photo_edit_photo_changed"));this.pop_enable_save_and_revert_buttons()}else{if(!this.pop_were_changes_when_opened){F.changes_were_saved()}this.pop_disable_save_and_revert_buttons()}};F._one_photo_edit_pop.pop_add_form_handlers=function(){var e=function(g){_ge("one_photo_edit_pop").pop_on_form_activity()};var d=function(g){setTimeout("_ge('one_photo_edit_pop').pop_on_form_activity();",100)};_ge("one_photo_date_taken_exact_switcher").onclick=_ge("one_photo_date_taken_approx_switcher").onclick=function(g){_ge("one_photo_edit_pop").pop_toggle_date_taken();e();return false};var b=function(g){_privacy_specific_change("one_photo_");e()};var a=function(g){_ge("one_photo_edit_pop").pop_license_was_switched();e()};Y.E.addListener(_ge("one_photo_title"),"change",e);Y.E.addListener(_ge("one_photo_title"),"keyup",e);Y.E.addListener(_ge("one_photo_title"),"keydown",d);Y.E.addListener(_ge("addtagbox"),"change",e);Y.E.addListener(_ge("addtagbox"),"keyup",e);Y.E.addListener(_ge("addtagbox"),"keydown",d);Y.E.addListener(_ge("one_photo_description"),"change",e);Y.E.addListener(_ge("one_photo_description"),"keyup",e);Y.E.addListener(_ge("one_photo_description"),"keydown",d);Y.E.addListener(_ge("one_photo_date_taken_exact"),"change",e);Y.E.addListener(_ge("one_photo_date_taken_exact"),"keyup",e);Y.E.addListener(_ge("one_photo_date_taken_exact"),"keydown",d);Y.E.addListener(_ge("one_photo_date_taken_exact"),"focus",e);Y.E.addListener(_ge("one_photo_time_taken_exact"),"change",e);Y.E.addListener(_ge("one_photo_time_taken_exact"),"keyup",e);Y.E.addListener(_ge("one_photo_time_taken_exact"),"keydown",d);Y.E.addListener(_ge("one_photo_date_taken_approx_month"),"change",e);Y.E.addListener(_ge("one_photo_date_taken_approx_year"),"change",e);Y.E.addListener(_ge("one_photo_date_posted_exact"),"change",e);Y.E.addListener(_ge("one_photo_date_posted_exact"),"keyup",e);Y.E.addListener(_ge("one_photo_date_posted_exact"),"keydown",d);Y.E.addListener(_ge("one_photo_date_posted_exact"),"focus",e);Y.E.addListener(_ge("one_photo_time_posted_exact"),"change",e);Y.E.addListener(_ge("one_photo_time_posted_exact"),"keyup",e);Y.E.addListener(_ge("one_photo_time_posted_exact"),"keydown",d);if(!disable_geo){Y.E.addListener(_ge("one_photo_geo_data_lon"),"change",e);Y.E.addListener(_ge("one_photo_geo_data_lon"),"keyup",e);Y.E.addListener(_ge("one_photo_geo_data_lon"),"keydown",d);Y.E.addListener(_ge("one_photo_geo_data_lat"),"change",e);Y.E.addListener(_ge("one_photo_geo_data_lat"),"keyup",e);Y.E.addListener(_ge("one_photo_geo_data_lat"),"keydown",d)}var f=_ge("one_photo_license_form").one_photo_license;for(var c=0;c<f.length;c++){Y.E.addListener(f[c],"click",a)}if(!disable_geo){for(var c=0;c<7;c++){Y.E.addListener(_ge("one_photo_perm_viewgeo_"+c),"click",e)}}Y.E.addListener(_ge("one_photo_is_private"),"click",b);Y.E.addListener(_ge("one_photo_is_public"),"click",b);Y.E.addListener(_ge("one_photo_is_family"),"click",b);Y.E.addListener(_ge("one_photo_is_friend"),"click",b);for(var c=1;c<5;c++){Y.E.addListener(_ge("one_photo_perm_comment_"+c),"click",e);Y.E.addListener(_ge("one_photo_perm_addmeta_"+c),"click",e)}if(!disable_geo){for(var c=0;c<7;c++){Y.E.addListener(_ge("one_photo_perm_viewgeo_"+c),"change",e)}}Y.E.addListener(_ge("one_photo_is_private"),"change",b);Y.E.addListener(_ge("one_photo_is_public"),"change",b);Y.E.addListener(_ge("one_photo_is_family"),"change",b);Y.E.addListener(_ge("one_photo_is_friend"),"change",b);for(var c=1;c<5;c++){Y.E.addListener(_ge("one_photo_perm_comment_"+c),"change",e);Y.E.addListener(_ge("one_photo_perm_addmeta_"+c),"change",e)}if(global_eighteen){for(var c=0;c<3;c++){Y.E.addListener(_ge("one_photo_safety_level_"+c),"change",e);Y.E.addListener(_ge("one_photo_content_type_"+c),"change",e);Y.E.addListener(_ge("one_photo_safety_level_"+c),"click",e);Y.E.addListener(_ge("one_photo_content_type_"+c),"click",e)}}this.pop_add_form_handlers=function(){}};F._one_photo_edit_pop.pop_toggle_date_taken=function(){if(_ge("one_photo_date_taken_exact_div").style.display=="none"){_ge("one_photo_date_taken_exact_div").style.display="block";_ge("one_photo_date_taken_approx_div").style.display="none";_ge("one_photo_date_taken_exact_switcher").style.display="none";_ge("one_photo_date_taken_approx_switcher").style.display="inline"}else{_ge("one_photo_date_taken_exact_div").style.display="none";_ge("one_photo_date_taken_approx_div").style.display="block";_ge("one_photo_date_taken_exact_switcher").style.display="inline";_ge("one_photo_date_taken_approx_switcher").style.display="none"}};F._one_photo_edit_pop.pop_disable_save_and_revert_buttons=function(){this.pop_disable_save_button();this.pop_disable_revert_button()};F._one_photo_edit_pop.pop_enable_save_and_revert_buttons=function(){this.pop_enable_save_button();this.pop_enable_revert_button()};F._one_photo_edit_pop.pop_disable_save_button=function(){_ge("one_photo_save").disabled=true;_ge("one_photo_save").className="DisabledButt"};F._one_photo_edit_pop.pop_enable_save_button=function(){_ge("one_photo_save").disabled=false;_ge("one_photo_save").className="Butt"};F._one_photo_edit_pop.pop_disable_revert_button=function(){_ge("one_photo_revert_link").style.visibility="hidden";_ge("one_photo_revert_link").onclick=function(){this.blur();return false}};F._one_photo_edit_pop.pop_enable_revert_button=function(){_ge("one_photo_revert_link").style.visibility="visible";_ge("one_photo_revert_link").onclick=function(){this.blur();_ge("one_photo_edit_pop").pop_revert();return false}};F._one_photo_edit_pop.pop_delete_photo=function(b){if(!b){var d=F.output.get("one_photo_edit_really_delete");var a=this;var c=function(){a.pop_delete_photo(1)};this.pop_start_comming(d,1,1,F.output.get("yes_delete"),c,1,F.output.get("one_photo_edit_no"));return}this.pop_start_comming(F.output.get("one_photo_edit_deleting"));F.API.callMethod("flickr.photos.delete",{photo_id:this.pop_photo.id},this)};F._one_photo_edit_pop.flickr_photos_delete_onLoad=function(c,b,a){if(c){this.pop_done_deleting()}else{this.pop_start_comming(F.output.get("api_err_generic")+" "+a.escape_for_display(),1,1)}};F._one_photo_edit_pop.pop_done_deleting=function(){if(!this.pop_were_changes_when_opened){F.changes_were_saved()}this.pop_stop_comming();this.eb_broadcast("one_photo_on_save",this.pop_photo.id,0,1);this.pop_hide();var a=global_photos[this.pop_photo.id];global_photos[this.pop_photo.id]=null;delete global_photos[this.pop_photo.id]};F._one_photo_edit_pop.pop_save=function(){exp_rsps=0;var f=this.pop_what_changed();var b=f.now;var g="";if(f.tags){var a=F.get_tags_from_input_str(b.tags);if(a.length>global_tag_limit){g=F.output.get("too_many_tags",global_tag_limit)}}if(g!=""){g="<b>"+F.output.get("cant_save")+"</b> "+g;this.pop_start_comming(g,1,1);return}this.rsp_errs=[];this.pop_changed_dates=f.dates;if(f.dates){exp_rsps++}if(f.meta){exp_rsps++}if(f.tags){exp_rsps++}if(f.perms){exp_rsps++}if(f.geo||f.geoperms){exp_rsps++}if(f.license){exp_rsps++}if(f.content_type){exp_rsps++}if(f.safety_level){exp_rsps++}if(!exp_rsps){writeDebug(F.output.get("one_photo_edit_nothing_saved"));this.pop_done_saving();return}this.pop_start_comming(F.output.get("one_photo_edit_saving"));var c={exp_rsps:exp_rsps,rec_rsps:0,tabl:this};c.flickr_photos_setMeta_onLoad=c.flickr_photos_geo_setPerms_onLoad=c.flickr_photos_licenses_setLicense_onLoad=c.flickr_photos_setContentType_onLoad=c.flickr_photos_setSafetyLevel_onLoad=c.flickr_photos_setDates_onLoad=function(k,j,i){this.rec_rsps++;if(!k){var h=j.documentElement.getElementsByTagName("err")[0];if(h.getAttribute("code")=="116"){alert(F.output.get("spam_url_warning")+".")}}if(this.rec_rsps==this.exp_rsps){this.tabl.pop_done_saving(1)}};c.flickr_photos_setTags_onLoad=function(k,j,i){this.rec_rsps++;if(!k){var h=j.documentElement.getElementsByTagName("err")[0];if(h&&h.getAttribute("code")=="2"){_ge("one_photo_edit_pop").rsp_errs.push(F.output.get("tags_not_saved",global_tag_limit))}}if(this.rec_rsps==this.exp_rsps){this.tabl.pop_done_saving(1)}};c.flickr_photos_setPerms_onLoad=function(l,k,h,j){this.rec_rsps++;if(l){var i=global_photos[j.photo_id];if(!i){return}i.is_public=j.is_public;i.is_friend=j.is_friend;i.is_family=j.is_family;i.perm_comment=j.perm_comment;i.perm_addmeta=j.perm_addmeta;F.handle_changed_secret(k)}if(this.rec_rsps==this.exp_rsps){this.tabl.pop_done_saving(1)}};c.flickr_photos_geo_setLocation_onLoad=function(l,k,h,j){this.rec_rsps++;if(l){var i=global_photos[j.photo_id];if(!i){return}i.latitude=j.lat;i.longitude=j.lon;i.accuracy=j.accuracy;if(_ge("map_controller")){_ge("map_controller").search_and_open_this_photo(j.photo_id)}}if(this.rec_rsps==this.exp_rsps){this.tabl.pop_done_saving(1)}};c.flickr_photos_geo_removeLocation_onLoad=function(l,k,h,j){this.rec_rsps++;if(l){var i=global_photos[j.photo_id];if(!i){return}i.latitude="0";i.longitude="0";i.accuracy="0";if(_ge("map_controller")){_ge("map_controller").search_and_open_this_photo(j.photo_id)}}if(this.rec_rsps==this.exp_rsps){this.tabl.pop_done_saving(1)}};if(f.tags){F.API.callMethod("flickr.photos.setTags",{photo_id:this.pop_photo.id,tags:b.tags},c)}if(f.meta){F.API.callMethod("flickr.photos.setMeta",{photo_id:this.pop_photo.id,title:b.title,description:b.description},c)}if(f.content_type&&global_eighteen){F.API.callMethod("flickr.photos.setContentType",{photo_id:this.pop_photo.id,content_type:b.content_type+1},c)}if(f.safety_level&&global_eighteen){F.API.callMethod("flickr.photos.setSafetyLevel",{photo_id:this.pop_photo.id,safety_level:b.safety_level+1},c)}if(f.dates){F.API.callMethod("flickr.photos.setDates",{photo_id:this.pop_photo.id,date_posted:b.dates.date_posted,date_taken:b.dates.date_taken,date_taken_granularity:b.dates.date_taken_granularity},c)}if(f.geo){if(!b.lat&&!b.lon){F.API.callMethod("flickr.photos.geo.removeLocation",{photo_id:this.pop_photo.id},c)}else{var e={photo_id:this.pop_photo.id,lat:b.lat.convert_geo_value(),lon:b.lon.convert_geo_value(),accuracy:16};e.is_public=b.geo_is_public;e.is_friend=b.geo_is_friend;e.is_family=b.geo_is_family;e.is_contact=b.geo_is_contact;F.API.callMethod("flickr.photos.geo.setLocation",e,c)}}else{if(f.geoperms){F.API.callMethod("flickr.photos.geo.setPerms",{photo_id:this.pop_photo.id,is_public:b.geo_is_public,is_friend:b.geo_is_friend,is_family:b.geo_is_family,is_contact:b.geo_is_contact},c)}}if(f.license){F.API.callMethod("flickr.photos.licenses.setLicense",{photo_id:this.pop_photo.id,license_id:b.license_id},c)}if(f.perms){var d={photo_id:this.pop_photo.id,is_public:b.is_public,is_friend:b.is_friend,is_family:b.is_family,perm_comment:b.perm_comment,perm_addmeta:b.perm_addmeta};F.API.callMethod("flickr.photos.setPerms",d,c)}};F._one_photo_edit_pop.pop_done_saving=function(a){if(!this.pop_were_changes_when_opened){F.changes_were_saved()}this.pop_stop_comming();if(a){this.eb_broadcast("one_photo_on_save",this.pop_photo.id,this.pop_changed_dates)}if(this.rsp_errs.length>0){var c="<b>"+F.output.get("not_all_saved")+"</b>";for(var b=0;b<this.rsp_errs.length;b++){c+="<br><br>"+this.rsp_errs[b]}this.pop_start_comming(c,1,1);return}if(_ge("one_photo_goto_next").checked&&this.pop_is_there_a_next){this.pop_go_to_next()}else{this.pop_hide()}};F._one_photo_edit_pop.pop_cancel=function(b){if(this.pop_has_changes()&&!b){var d=function(){_ge("one_photo_edit_pop").pop_cancel(1)};var g,c,a,f;var e=true;_ge("tabl").tabl_start_comming(F.output.get("unsaved_msg"),1,1,F.output.get("yes_discard"),d,1,F.output.get("no_stay_here"),g,c,a,f,e);return}if(!this.pop_were_changes_when_opened){F.changes_were_saved()}this.pop_hide()};F._one_photo_edit_pop.pop_revert=function(){this.pop_fill_form();if(!this.pop_were_changes_when_opened){F.changes_were_saved()}};F._one_photo_edit_pop.pop_has_changes=function(){if(this.pop_loading){return 0}var a=this.pop_what_changed();if(a.dates){return 1}if(a.meta){return 1}if(a.tags){return 1}if(a.perms){return 1}if(a.geo){return 1}if(a.geoperms){return 1}if(a.license){return 1}if(a.content_type){return 1}if(a.safety_level){return 1}return 0};F._one_photo_edit_pop.pop_what_changed=function(){var a={};a.dates=0;a.meta=0;a.tags=0;a.perms=0;a.geo=0;a.geoperms=0;a.license_id=0;a.content_type=0;a.safety_level=0;var c=this.pop_form_data_saved;var b=this.pop_get_data_from_form();a.now=b;if(b.title!=c.title){a.meta=1}else{if(b.description!=c.description){a.meta=1}}if(b.content_type!=c.content_type){a.content_type=1}if(b.safety_level!=c.safety_level){a.safety_level=1}if(b.tags!=c.tags){a.tags=1}if(b.dates.date_posted!=c.dates.date_posted){a.dates=1}else{if(b.dates.date_taken!=c.dates.date_taken){a.dates=1}else{if(b.dates.date_taken_granularity!=c.dates.date_taken_granularity){a.dates=1}}}if(!disable_geo){if(b.lat!=c.lat){a.geo=1}else{if(b.lon!=c.lon){a.geo=1}}if(b.geo_is_public!=c.geo_is_public){a.geoperms=1}else{if(b.geo_is_friend!=c.geo_is_friend){a.geoperms=1}else{if(b.geo_is_family!=c.geo_is_family){a.geoperms=1}else{if(b.geo_is_contact!=c.geo_is_contact){a.geoperms=1}}}}}if(b.license_id!=c.license_id){a.license=1}if(b.is_private!=c.is_private){a.perms=1}else{if(b.is_friend!=c.is_friend){a.perms=1}else{if(b.is_family!=c.is_family){a.perms=1}else{if(b.perm_comment!=c.perm_comment){a.perms=1}else{if(b.perm_addmeta!=c.perm_addmeta){a.perms=1}}}}}return a};var test_JS_callback_NAME=function(a,b){writeDebug("test_JS_callback_NAME pType:"+a+" pItem:"+b)};F.stewart_event=function(c,a,b){writeDebug("stewart_event div_id:"+c+" pType:"+a+" pItem:"+b);if(_ge(c)){_ge(c).stewart_swf_event(a,b)}};F.set_hd_cookie=function(a){if(a!=1&&a!=0){return}_set_cookie("likes_hd",a,1000)};F.get_hd_cookie=function(a){writeDebug("getting cookie"+_get_cookie("likes_hd"));return _get_cookie("likes_hd")};F.stewart_likes_hd=function(b){if(b!=1&&b!=0){return}F.set_hd_cookie(b);var a=document.location.href;a=a.replace(/[\?\&]likes_hd=[01]/,"");a+=(a.indexOf("?")>-1)?"&":"?";a+="likes_hd="+b;document.location=a};F._stewart_swf_div={swf_path:(_qs_args.yep_branch)?"/apps/video/stewart_"+_qs_args.yep_branch+".swf.v"+new Date().getTime():"/apps/video/stewart.swf.v"+global_stewartVersion,swf_id:"",is_playing:false,was_playing:false,play_tim:null,stewart_swf_event:function(a,b){writeDebug("stewart_swf_event this.id:"+this.id+" pType:"+a+" pItem:"+b);var c=_ge(this.swf_id);if(a=="isPlayingChanged"){this.is_playing=(b=="true");if(this.is_playing){this.stewart_hide_loading_el()}}if(a=="showingPhotoAtStart"){this.stewart_hide_loading_el()}if(a=="platformReady"){this.stewart_swap_img_out()}},stewart_hide_loading_el:function(){if(_ge(this.loading_el_id)){_ge(this.loading_el_id).style.display="none"}},stewart_swap_img_in:function(){if(_ge(this.swf_id)){_ge(this.swf_id).style.visibility="hidden"}if(_ge(this.img_id)){_ge(this.img_id).style.display="block"}},stewart_swap_img_out:function(){if(_ge(this.swf_id)){_ge(this.swf_id).style.visibility="visible"}if(_ge(this.img_id)){_ge(this.img_id).style.display="none"}},stewart_play_after_pause:function(){var a=_ge(this.id);var b=_ge(this.swf_id);if(this.play_tim){clearTimeout(this.play_tim)}this.play_tim=setTimeout(function(){if(a.stewart_need_to_hide_video){a.stewart_swap_img_out()}if(b&&b.playVideo){a.was_playing=false;b.playVideo()}},200)},stewart_play_if_was_playing:function(){if(this.was_playing){this.stewart_play_after_pause()}else{if(this.stewart_need_to_hide_video){this.stewart_swap_img_out()}}},stewart_pause_if_need_to_hide_video:function(){if(this.stewart_need_to_hide_video){this.stewart_pause()}},stewart_pause:function(){if(this.stewart_need_to_hide_video){this.stewart_swap_img_in()}if(this.play_tim){clearTimeout(this.play_tim)}this.play_tim=null;var a=false;if(!this.is_playing){return}a=true;var b=_ge(this.swf_id);if(b&&b.getIsPlaying){a=b.getIsPlaying();if(b.pauseVideo){b.pauseVideo()}}this.was_playing=a},stewart_go_go_go:function(l,f,m,e,a){F.eb_add(this);this.loading_el_id=this.id.replace_global("_div","_loading_el");this.img_id=this.id.replace_global("_div","_img");this.swf_id=this.id.replace_global("_div","");this.form_id=this.id.replace_global("_div","_form");this.wait=e;this.stewart_need_to_hide_video=(window.opera||F.is_chrome||(!F.is_safari&&!(F.is_ff3&&F.is_mac)));this.flash_version=deconcept.SWFObjectUtil.getPlayerVersion();if(_qs_args.noflash){this.flash_version.major=0}writeDebug("Flash:"+this.flash_version.major+"."+this.flash_version.minor+"r"+this.flash_version.rev);this.w=l.toString();this.h=f.toString();this.thumb_src=a;this.init_ob=m;this.stewart_make_sure_we_have_thumb_src();this.style.position="relative";if(_ge(this.form_id)){this.stewart_add_form()}var g=this.id;if(this.wait){if(this.stewart_is_flash_good()){var b=this.id.replace_global("_div","_trigger_a");var d=_ge(b);if(d){d.onclick=function(){if(_ge(g)&&_ge(g).stewart_write){_ge(g).stewart_write();return false}}}var i=this.id.replace_global("_div","_big_trigger_a");var k=_ge(i);if(k){k.onclick=d.onclick}}}else{if(Y.U.Dom.hasClass(this,"photo_gne_video_wrapper_div")){this.style.backgroundColor="black"}if(this.stewart_is_flash_good()){var j=0;if(!window.video_has_had_focus){j=1}if(F.is_safari){j=0}var j=0;if(j){var c=document.createElement("IMG");c.id="stewart_temp_jpg";c.src=this.thumb_src;c.width=this.w;c.height=this.h;c.style.position="absolute";c.style.display="block";this.appendChild(c);var c=document.createElement("IMG");c.id="stewart_play_button";c.src=_images_root+"/video_play_icon_large.png";c.width=40;c.height=22;c.style.position="absolute";c.style.display="block";c.style.left=Math.round(this.w/2)-Math.round(c.width/2)+"px";c.style.top=Math.round(this.h/2)-Math.round(c.height/2)+"px";this.appendChild(c);window.video_play_on_focus=function(){window.video_has_had_focus=1;Y.U.Event.removeListener(window,"focus",window.video_play_on_focus);_ge(g).stewart_write()};Y.U.Event.addListener(window,"focus",window.video_play_on_focus)}else{this.stewart_write()}}else{if(_ge("photo_gne_flash_notice_div")){_ge("photo_gne_flash_notice_div").style.display="block"}}}},stewart_make_sure_we_have_thumb_src:function(){this.thumb_src=(!this.thumb_src&&global_photos&&global_photos[this.init_ob.photo_id]&&global_photos[this.init_ob.photo_id].video_thumb_src)?global_photos[this.init_ob.photo_id].video_thumb_src:this.thumb_src},stewart_is_flash_good:function(){if(this.flash_version.major*1<9){return false}if(this.flash_version.major*1==9&&this.flash_version.minor*1>0){return true}if(this.flash_version.major*1==9&&this.flash_version.rev*1>=28){return true}if(this.flash_version.major*1>=10){return true}return false},stewart_write:function(e){if(this.stewart_wrote&&!e){return}var h=new SWFObject(this.swf_path,this.swf_id,this.w,this.h,9,"#000000");h.addParam("wmode","opaque");h.addParam("allowFullScreen","true");h.addParam("allowScriptAccess","always");h.addParam("bgcolor","#000000");h.addVariable("intl_lang",global_intl_lang);h.addVariable("div_id",this.id);h.addVariable("flickr_notracking","true");h.addVariable("flickr_target","_self");h.addVariable("flickr_h",this.h);h.addVariable("flickr_w",this.w);h.addVariable("flickr_no_logo","true");if(0&&this.init_ob.flickr_noAutoPlay!="true"&&!window.already_auto_played){writeDebug("AP PAUSE");this.init_ob.flickr_noAutoPlay="true";window.auto_play_this_id=this.id}var g=F.get_hash();if(g&&g.indexOf&&g.indexOf("comment")==0){this.init_ob.flickr_noAutoPlay="true"}for(var f in this.init_ob){if(this.init_ob[f]==undefined){continue}if(this.init_ob[f]==null){continue}h.addVariable(f,this.init_ob[f])}if(_qs_args.doSmall!="0"){h.addVariable("flickr_doSmall","true")}else{h.addVariable("flickr_doSmall","false")}if(_qs_args.flv){h.addVariable("flickr_flv",_qs_args.flv)}if(_qs_args.noLimit=="1"){h.addVariable("flickr_noLimit","true")}if(_qs_args.debugPos=="1"){h.addVariable("flickr_debugPos","true")}if(_qs_args.use_debugswf=="1"){h.addVariable("use_debugswf","true")}if(_qs_args.noBuffer=="1"){h.addVariable("flickr_noBuffer","true")}if(this.init_ob.onsite){var a=document.createElement("DIV");a.id=this.loading_el_id;a.className="loading_el";a.innerHTML=F.output.get("loading");if(Y.U.Dom.getStyle(this.parentNode,"position")!="absolute"){this.parentNode.style.position="relative"}this.parentNode.appendChild(a);if(this.parentNode.offsetWidth&&!Y.U.Dom.hasClass(this,"photo_gne_video_wrapper_div")&&!Y.U.Dom.hasClass(this,"pc_l")&&!Y.U.Dom.hasClass(this,"bbml_img")){var b=Math.round(this.parentNode.offsetWidth/2)-Math.round(a.offsetWidth/2)}else{var b=Math.round(this.w/2)-Math.round(a.offsetWidth/2)}var d=Math.round(this.h/2)-Math.round(a.offsetHeight/2);a.style.left=b+"px";a.style.top=d+"px"}if(this.wait){var c=this;setTimeout(function(){c.stewart_actually_write(h)},100)}else{this.stewart_actually_write(h)}this.stewart_wrote=1;return},stewart_actually_write:function(a){var b="";this.stewart_make_sure_we_have_thumb_src();if(this.stewart_need_to_hide_video&&this.thumb_src){b='<img style="display:none; position:absolute;" id="'+this.img_id+'" width="'+this.w+'" height="'+this.h+'" src="'+this.thumb_src+'">'}if(!a.write(this.id,b)){return}if(F.is_ie){this.stewart_swap_img_in()}if(F.is_ie){window[this.swf_id]=_ge(this.swf_id)}writeAPIDebug(this.id+" "+_ge(this.id).innerHTML)},stewart_add_form:function(){var c=this.id;_ge(this.form_id+"_submit").style.display="none";var a=function(){var d=_ge(c);clearTimeout(d.activity_func_tim);d.activity_func_tim=setTimeout(function(){_ge(c).stewart_on_form_activity()},1000)};var b=function(){_ge(c).stewart_on_form_activity()};yui.Event.addListener(_ge(this.form_id+"_show_info_box_cb"),"click",b);yui.Event.addListener(_ge(this.form_id+"_show_info_box_cb"),"change",b);yui.Event.addListener(_ge(this.form_id+"_w_input"),"change",b);yui.Event.addListener(_ge(this.form_id+"_w_input"),"keyup",a);yui.Event.addListener(_ge(this.form_id+"_w_input"),"keydown",a);yui.Event.addListener(_ge(this.form_id+"_h_input"),"change",b);yui.Event.addListener(_ge(this.form_id+"_h_input"),"keyup",a);yui.Event.addListener(_ge(this.form_id+"_h_input"),"keydown",a);if(_ge(this.form_id+"_reset_to_suggested_a")){yui.Event.addListener(_ge(this.form_id+"_reset_to_suggested_a"),"click",function(d){_ge(c).stewart_reset_to_suggested_dims();YAHOO.util.Event.preventDefault(d||window.event)})}if(_ge(this.form_id+"_reset_to_original_a")){yui.Event.addListener(_ge(this.form_id+"_reset_to_original_a"),"click",function(d){_ge(c).stewart_reset_to_original_dims();YAHOO.util.Event.preventDefault(d||window.event)})}if(_ge(this.form_id+"_textarea")){yui.Event.addListener(_ge(this.form_id+"_textarea"),"click",function(f){var d=_get_event_src(f);d.select()})}},stewart_on_form_activity:function(){clearTimeout(this.activity_func_tim);var a=_ge(this.form_id+"_w_input").value;var c=_ge(this.form_id+"_h_input").value;if(isNaN(a)){a=this.w;_ge(this.form_id+"_w_input").value=a}if(isNaN(c)){c=this.h;_ge(this.form_id+"_h_input").value=c}var b=(_ge(this.form_id+"_show_info_box_cb").checked)?"true":undefined;if(a!=this.w||c!=this.h||b!=this.init_ob.flickr_show_info_box){writeDebug("w:"+a+" this.w:"+this.w);writeDebug("h:"+c+" this.h:"+this.h);if(c!=this.h){writeDebug("h changed");a=Math.round(this.w*(c/this.h));_ge(this.form_id+"_w_input").value=a}else{if(a!=this.w){writeDebug("w changed");c=Math.round(this.h*(a/this.w));_ge(this.form_id+"_h_input").value=c}}writeDebug("w:"+a+" this.w:"+this.w);writeDebug("h:"+c+" this.h:"+this.h);writeDebug("show_info_box:"+b+" this.init_ob.flickr_show_info_box:"+this.init_ob.flickr_show_info_box);this.w=a;this.h=c;this.init_ob.flickr_show_info_box=b;this.stewart_write(1);if(_ge(this.form_id+"_textarea")){_ge(this.form_id+"_textarea").value=F.output.get("loading");this.stewart_load_markup({markup_only:1,id:this.init_ob.photo_id,w:a,h:c,show_info_box:(b=="true")?1:0})}}},stewart_load_markup:function(a){F.fragment_getter.get("/photo_embed.gne",a,this,"stewart_markup_loaded")},stewart_markup_loaded:function(c,a,b){_ge(this.form_id+"_textarea").value=a},stewart_reset_to_suggested_dims:function(){_ge(this.form_id+"_w_input").value=_ge(this.form_id+"_suggested_w").value;_ge(this.form_id+"_h_input").value=_ge(this.form_id+"_suggested_h").value;this.stewart_on_form_activity()},stewart_reset_to_original_dims:function(){_ge(this.form_id+"_w_input").value=_ge(this.form_id+"_original_w").value;_ge(this.form_id+"_h_input").value=_ge(this.form_id+"_original_h").value;this.stewart_on_form_activity()}};YAHOO.util.Event.on(window,"focus",function(){var a=new Date().getTime();window.video_has_had_focus=1});F._stewart_poller={start_polling:function(a){if(!a){return}this.p_id=a;this.poll()},poll:function(){setTimeout(function(){F.API.callMethod("flickr.photos.getInfo",{photo_id:F._stewart_poller.p_id},F._stewart_poller)},5000)},flickr_photos_getInfo_onLoad:function(e,d,b){if(e&&d){var a=d.documentElement.getElementsByTagName("photo")[0];var c=_upsert_photo(a);writeAPIDebug(_uber_toString(c));if(c.video_ready||c.video_failed){document.location=page_current_url+"?processed=1&cb="+new Date().getTime();return}}this.poll()}};if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept._playerVersion=null;deconcept.SWFObject=function(f,d,m,g,j,l,o,i,a,e,n){if(!document.getElementById){return}this.DETECT_KEY=e?e:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(f){this.setAttribute("swf",f)}if(d){this.setAttribute("id",d)}if(m){this.setAttribute("width",m)}if(g){this.setAttribute("height",g)}this.setAttribute("base",(n)?n:".");if(j){this.setAttribute("version",new deconcept.PlayerVersion(j.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(l){this.addParam("bgcolor",l)}var b=o?o:"high";this.addParam("quality",b);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var k=(i)?i:window.location;this.setAttribute("xiRedirectUrl",k);this.setAttribute("redirectUrl","");if(a){this.setAttribute("redirectUrl",a)}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var a=new Array();var b;var c=this.getVariables();for(b in c){a[a.length]=b+"="+c[b]}return a},getSWFHTML:function(e){var d="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}d='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';d+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" base="'+this.getAttribute("base")+'" ';var c=this.getParams();for(var a in c){d+=[a]+'="'+c[a]+'" '}var b=this.getVariablePairs().join("&");if(b.length>0){d+='flashvars="'+b+'"'}d+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}d='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';d+='<param name="movie" value="'+this.getAttribute("swf")+'" />';d+='<param name="base" value="'+this.getAttribute("base")+'" />';var c=this.getParams();for(var a in c){d+='<param name="'+a+'" value="'+c[a]+'" />'}var b=this.getVariablePairs().join("&");if(b.length>0){d+='<param name="flashvars" value="'+b+'" />'}d+="</object>"}d=(typeof e!="undefined"?e:"")+d;return d},write:function(a,d){if(this.getAttribute("useExpressInstall")){var b=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(b)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var c=(typeof a=="string")?document.getElementById(a):a;c.innerHTML=this.getSWFHTML(d);return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){if(deconcept._playerVersion){return deconcept._playerVersion}var c=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){a.description.match(/[a-zA-Z\s]([0-9]+)\.([0-9]+)\s*[rbd]([0-9]+)/);var g=[RegExp.$1,RegExp.$2,RegExp.$3];if(navigator.platform.match(/win32/i)&&!g[0]){a.description.match(/[a-zA-Z\s]([0-9]+)\.([0-9]+|([0-9]+.[0-9]+.))\s*[rbd]([0-9]+)/);g=[RegExp.$1,RegExp.$2,RegExp.$3]}c=new deconcept.PlayerVersion(g)}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var d=1;var b=3;while(d){try{b++;d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);c=new deconcept.PlayerVersion([b,0,0])}catch(f){d=null}}}else{try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(f){try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");c=new deconcept.PlayerVersion([6,0,21]);d.AllowScriptAccess="always"}catch(f){if(c.major==6){return c}}try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(f){}}if(d!=null){c=new deconcept.PlayerVersion(d.GetVariable("$version").split(" ")[1].split(","))}}}deconcept._playerVersion=c;return c};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};deconcept.util={getRequestParameter:function(d){var c=document.location.search||document.location.hash;if(d==null){return c}if(c){var b=c.substring(1).split("&");for(var a=0;a<b.length;a++){if(b[a].substring(0,b[a].indexOf("="))==d){return b[a].substring((b[a].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var c=document.getElementsByTagName("OBJECT");for(var b=c.length-1;b>=0;b--){c[b].style.display="none";for(var a in c[b]){if(typeof c[b][a]=="function"){c[b][a]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(a){return document.all[a]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function SWFMacMouseWheel(a){this.so=a;var b=navigator.appVersion.toLowerCase().indexOf("mac")!=-1;if(b){this.init()}}SWFMacMouseWheel.prototype={init:function(){SWFMacMouseWheel.instance=this;if(window.addEventListener){window.addEventListener("DOMMouseScroll",SWFMacMouseWheel.instance.wheel,false)}window.onmousewheel=document.onmousewheel=SWFMacMouseWheel.instance.wheel},handle:function(a){document[this.so.getAttribute("id")].externalMouseEvent(a)},wheel:function(a){var b=0;if(a.wheelDelta){b=a.wheelDelta/120;if(window.opera){b=-b}}else{if(a.detail){b=-a.detail/3}}if(/AppleWebKit/.test(navigator.userAgent)){b/=3}if(b){SWFMacMouseWheel.instance.handle(b)}if(a.preventDefault){a.preventDefault()}a.returnValue=false}};var icon_ccbgdiv=null;var icon_ccdiv=null;var icon_doneit=null;var icon_isPopped=false;var icon_scrollTim=null;var icon_popup_w=330;var icon_popup_h=394;var icon_buddyIcon=null;var user_data=null;var icon_progress_w=136;var icon_progress_h=49;var icon_after_contact_change_funcs=[];function icon_windowClose(){clearTimeout(icon_scrollTim);Y.U.Event.removeListener(window,"resize",icon_positionWindow);Y.U.Event.removeListener(window,"scroll",icon_positionWindowOnScroll);icon_ccdiv.style.display="none";icon_ccbgdiv.style.display="none";icon_isPopped=false;if(!F.is_safari&&!((F.is_ff2||F.is_ff3)&&F.is_mac)){F.eb_broadcast("stewart_play_if_was_playing")}}function icon_windowOpenFromHover(a){user_data=_ge("person_hover").hover_persons[a];if(!user_data){alert(F.output.get("personmenu_buddyicon")+" '"+a+"'");return}var b=1;return icon_windowOpen()}function icon_windowOpenFromLink(a){var b={};b.flickr_people_getInfo_onLoad=function(e,d,c){user_data=new BuddyData(d);icon_windowOpen()};F.API.callMethod("flickr.people.getInfo",{user_id:a},b)}function icon_windowOpen(){var c=user_data.nsid;var b=user_data.is_contact;var e=user_data.name;var f=F.wordwrap(e,26,'<span class="breaking-non-space"> </span>',true);var a=user_data.is_friend;var i=user_data.is_family;var d=user_data.icon_url;_ge("contactChangerCheckContactLabel").innerHTML=F.output.get("personmenu_contactChanger_addContact");_ge("contactChangerCheckFriendLabel").innerHTML=F.output.get("personmenu_contactChanger_addFriend");_ge("contactChangerCheckFamilyLabel").innerHTML=F.output.get("personmenu_contactChanger_addFamily");if(b){_ge("contactChangerText1").innerHTML=F.output.get("personmenu_contactChangerText1_con",f);_ge("contactChangerButtonOk").value=F.output.get("ok");_ge("contactChangerCheckContactLabel").innerHTML=F.output.get("personmenu_contactChanger_keepContact");if(a){_ge("contactChangerCheckFriendLabel").innerHTML=F.output.get("personmenu_contactChanger_keepFriend")}if(i){_ge("contactChangerCheckFamilyLabel").innerHTML=F.output.get("personmenu_contactChanger_keepFamily")}}else{_ge("contactChangerText1").innerHTML=F.output.get("personmenu_contactChangerText1_notcon",f);_ge("contactChangerButtonOk").value=F.output.get("personmenu_contactChangerButtonOk_add");b=true}_ge("contactChangerIcon").src=d;_ge("contactChangerCheckContact").checked=b;_ge("contactChangerCheckFriend").checked=a;_ge("contactChangerCheckFamily").checked=i;_ge("contactChangerButtonOk").style.display="";_ge("contactChangerButtonRemove").style.display="";_ge("contactChangerButtonRemove").onclick=function(){icon_removeContact(c)};_ge("person_hover").hover_go_away();icon_ccdiv.style.display="block";icon_ccbgdiv.style.display="block";icon_isPopped=true;icon_positionWindow();Y.E.on(window,"resize",icon_positionWindow);Y.E.on(window,"scroll",icon_positionWindowOnScroll);var g=_pi(_ge("contactChangerContainer").offsetHeight);Y.D.setStyle(["contactChangerShadowLeft","contactChangerShadowRight"],"height",g+"px");if(!F.is_safari&&!((F.is_ff2||F.is_ff3)&&F.is_mac)){F.eb_broadcast("stewart_pause")}return false}function icon_setSubmitButton(d){var a=_ge("contactChangerCheckContact").checked,c=_ge("contactChangerCheckFriend").checked,b=_ge("contactChangerCheckFamily").checked;if(!user_data.is_contact&&!a){return false}if(d.id==="contactChangerCheckContact"&&!a){_ge("contactChangerCheckFriend").checked=false;_ge("contactChangerCheckFamily").checked=false}if(((d.id==="contactChangerCheckFriend"&&c)||(d.id==="contactChangerCheckFamily"&&b))&&!a){_ge("contactChangerCheckContact").checked=true;a=true}if(user_data.is_contact){if(a){_ge("contactChangerButtonOk").style.display="";_ge("contactChangerButtonRemove").style.display=""}else{_ge("contactChangerButtonOk").style.display="none";_ge("contactChangerButtonRemove").style.display="inline"}}return true}function icon_positionWindowOnScroll(a){if(icon_doneit==false){return}icon_doneit=false;clearTimeout(icon_scrollTim);icon_scrollTim=setTimeout("icon_positionWindowOnScroll(true)",50);if(a){icon_doneit=true;icon_positionWindow()}}function icon_positionWindow(){if(!icon_isPopped){return}if(window.innerWidth){var c=window.innerWidth;var b=window.innerHeight;var a=window.pageXOffset;var d=window.pageYOffset}else{var c=document.body.clientWidth;var b=document.body.clientHeight;var a=document.body.scrollLeft;var d=document.body.scrollTop}icon_ccdiv.style.left=(a+((c-icon_popup_w)/2))+"px";icon_ccdiv.style.top=(d+((b-icon_popup_h)/2))+"px";icon_ccbgdiv.style.left=a;icon_ccbgdiv.style.top=d}function icon_windowCloseDone(){icon_ccdiv.style.display="none";var b=user_data.nsid;var a=_ge("contactChangerCheckFriend").checked;var e=_ge("contactChangerCheckFamily").checked;var c=a==user_data.is_friend;var d=e==user_data.is_family;if(c&&d&&user_data.is_contact){icon_windowClose();return}icon_showProgress(F.output.get("personmenu_working"));var f={};f.flickr_contacts_edit_onLoad=function(l,k,i,j){if(l){if(user_data){user_data.is_contact=true;user_data.is_friend=a;user_data.is_family=e}_ge("person_hover").hover_persons[j.user_id]=null;icon_updateContactTxt();icon_afterContactChange(user_data);icon_showProgress(F.output.get("personmenu_success"));window.setTimeout("icon_hideProgress(); icon_windowClose();",300)}else{var g;if(k&&k.documentElement){var h=k.documentElement.getElementsByTagName("err")[0];if(h){g=h.getAttribute("code")}}if(g=="3"){icon_showProgress(F.output.get("personmenu_success"));window.setTimeout("icon_hideProgress(); icon_windowClose();",500)}else{if(g=="4"){icon_showDialog(F.output.get("too_many_contacts",user_data.name,global_contact_limit))}else{if(g=="106"){icon_showDialog(F.output.get("too_many_contacts_today"))}else{icon_showProgress(F.output.get("personmenu_failure"));window.setTimeout("icon_hideProgress(); icon_windowClose();",500)}}}}};f.flickr_contacts_add_onLoad=f.flickr_contacts_edit_onLoad;if(user_data.is_contact){F.API.callMethod("flickr.contacts.edit",{user_id:user_data.nsid,friend:a?1:0,family:e?1:0},f)}else{F.API.callMethod("flickr.contacts.add",{user_id:user_data.nsid,friend:a?1:0,family:e?1:0},f)}}function icon_updateContactTxt(){var a=_ge("span_user_contact_txt"+user_data.nsid);if(a){if(user_data.is_contact){var i='<a href="/relationship.gne?id='+user_data.nsid+'" onclick="icon_windowOpenFromLink(\''+user_data.nsid+"'); return false\">"+F.output.get("personmenu_change")+"</a>?";if(user_data.is_friend&&user_data.is_family){if(user_data.gender=="M"){a.innerHTML=F.output.get("personmenu_updatecontact_ff_m",i)}if(user_data.gender=="F"){a.innerHTML=F.output.get("personmenu_updatecontact_ff_f",i)}if(user_data.gender!="M"&&user_data.gender!="F"){a.innerHTML=F.output.get("personmenu_updatecontact_ff_o",i)}}else{if(user_data.is_friend){if(user_data.gender=="M"){a.innerHTML=F.output.get("personmenu_updatecontact_fri_m",i)}if(user_data.gender=="F"){a.innerHTML=F.output.get("personmenu_updatecontact_fri_f",i)}if(user_data.gender!="M"&&user_data.gender!="F"){a.innerHTML=F.output.get("personmenu_updatecontact_fri_o",i)}}else{if(user_data.is_family){if(user_data.gender=="M"){a.innerHTML=F.output.get("personmenu_updatecontact_fam_m",i)}if(user_data.gender=="F"){a.innerHTML=F.output.get("personmenu_updatecontact_fam_f",i)}if(user_data.gender!="M"&&user_data.gender!="F"){a.innerHTML=F.output.get("personmenu_updatecontact_fam_o",i)}}else{if(user_data.gender=="M"){a.innerHTML=F.output.get("personmenu_updatecontact_con_m",i)}if(user_data.gender=="F"){a.innerHTML=F.output.get("personmenu_updatecontact_con_f",i)}if(user_data.gender!="M"&&user_data.gender!="F"){a.innerHTML=F.output.get("personmenu_updatecontact_con_o",i)}}}}}else{if(user_data.gender=="M"){a.innerHTML='<a href="/relationship.gne?id='+user_data.nsid+'" onclick="icon_windowOpenFromLink(\''+user_data.nsid+"'); return false\">"+F.output.get("personmenu_updatecontact_notcon_m")+"</a>?"}if(user_data.gender=="F"){a.innerHTML='<a href="/relationship.gne?id='+user_data.nsid+'" onclick="icon_windowOpenFromLink(\''+user_data.nsid+"'); return false\">"+F.output.get("personmenu_updatecontact_notcon_f")+"</a>?"}if(user_data.gender!="M"&&user_data.gender!="F"){a.innerHTML='<a href="/relationship.gne?id='+user_data.nsid+'" onclick="icon_windowOpenFromLink(\''+user_data.nsid+"'); return false\">"+F.output.get("personmenu_updatecontact_notcon_o")+"</a>?"}}}var c=_ge("uber_contact_status_"+user_data.nsid);if(c){Y.D.removeClass(c,"contact-list-nothingyet");if(user_data.is_contact){if(user_data.is_friend&&user_data.is_family){c.innerHTML=F.output.get("uber_contact_list_friend_and_family")+(YAHOO.env.ua.ie?"&nbsp;":"")}else{if(user_data.is_friend){c.innerHTML=F.output.get("uber_contact_list_friend")+(YAHOO.env.ua.ie?"&nbsp;":"")}else{if(user_data.is_family){c.innerHTML=F.output.get("uber_contact_list_family")+(YAHOO.env.ua.ie?"&nbsp;":"")}else{c.innerHTML=F.output.get("uber_contact_list_contact")+(YAHOO.env.ua.ie?"&nbsp;":"")}}}}else{c.innerHTML='<em style="color: #f15050">'+F.output.get("uber_contact_list_removed")+"</em>"+(YAHOO.env.ua.ie?"&nbsp;":"")}var d=_ge("uber_contact_status_edit_"+user_data.nsid);if(d){d.style.display="";d.id=""}}var b=_ge("photo_navi_contact_span_"+user_data.nsid);if(b){var f=user_data.name.truncate_with_ellipses(15).escape_for_display();var g="/people/"+user_data.nsid+"/relationship/";if(user_data.is_contact){var e;if(user_data.is_friend&&user_data.is_family){e=F.output.get("rel_link_friend_and_family",f)}else{if(user_data.is_friend){e=F.output.get("rel_link_friend",f)}else{if(user_data.is_family){e=F.output.get("rel_link_family",f)}else{e=F.output.get("rel_link_contact",f)}}}e+=' <span class="edit_relationship">(<a href="'+g+'" onclick="icon_windowOpenFromLink(\''+user_data.nsid+"');return false\">"+F.output.get("corrections_edit")+"</a>)</span>";b.innerHTML=e}else{b.innerHTML='<a href="'+g+'" onclick="icon_windowOpenFromLink(\''+user_data.nsid+"');return false\">"+F.output.get("rel_link_add",f)+"</a>"}}if(global_users&&global_users[user_data.nsid]){var h=global_users[user_data.nsid];h.friend=(user_data.is_friend)?"1":"0";h.family=(user_data.is_family)?"1":"0";if(!user_data.is_contact){h.removed="1"}}}function icon_afterContactChange(b){for(var c=0,a=icon_after_contact_change_funcs.length;c<a;c++){icon_after_contact_change_funcs[c](b)}}function icon_onAfterContactChange(a){if(typeof a==="function"){icon_after_contact_change_funcs.push(a)}}function icon_removeContact(a){icon_ccdiv.style.display="none";icon_showProgress(F.output.get("personmenu_working"));var b={};b.flickr_contacts_remove_onLoad=function(f,e,c,d){if(f){user_data.is_contact=false;_ge("person_hover").hover_persons[d.user_id]=null;icon_updateContactTxt();icon_afterContactChange(user_data);icon_showProgress(F.output.get("personmenu_success"));window.setTimeout("icon_hideProgress(); icon_windowClose();",500)}else{icon_showProgress(F.output.get("personmenu_failure"));window.setTimeout("icon_hideProgress(); icon_windowClose();",500)}};F.API.callMethod("flickr.contacts.remove",{user_id:user_data.nsid},b)}function icon_showProgress(a){if(!global_comm_div){_make_comm_div("20002")}global_comm_div.start_comming(a)}function icon_showDialog(b){if(!global_comm_div){_make_comm_div("20002")}var a=function(){icon_hideProgress();icon_windowClose()};global_comm_div.start_comming(b,null,null,1,1,null,a)}function icon_hideProgress(){global_comm_div.stop_comming()}function iframeify(a){return null}function personmenu_process_img(a){_ge("person_hover").hover_add_img(a);a.onmouseover=_hitch(_ge("person_hover"),"icon_mouseover");a.onmouseout=_hitch(_ge("person_hover"),"icon_mouseout")}function get_img_src(a){var b=a.getAttribute("data-defer-src");src=b||a.src;return src}function personmenu_init(e,d){if(!d){setTimeout(function(){personmenu_init(e,1)},50);return}if(e){F.decorate(_ge("person_hover"),F._person_hover).hover_go_go_go()}var g=function(i){if(Y.U.Dom.hasClass(i,"xBuddyIcon")){return false}if(Y.U.Dom.hasClass(i,"xBuddyIconH")){return false}if(Y.U.Dom.hasClass(i,"xBuddyIconX")){return false}if(Y.U.Dom.hasClass(i,"person_hover_img")){return false}if(Y.U.Dom.hasClass(i,"gn-buddyicon")){return false}if(Y.U.Dom.hasClass(i,"cover-img")){return false}var k=get_img_src(i).split("#");var j=k[1];if(j){i.nsid=j;return true}return false};var a=[];var h=document.getElementsByTagName("IMG");for(var b=0;b<h.length;b++){var c=h[b];if(e&&g(c)){a.push(c);setTimeout(function(){personmenu_process_img(a.pop())},1*b)}}if(!e){return}icon_ccbgdiv=_ge("global-dialog-background");var f=35;icon_ccbgdiv.style.backgroundColor="#000";icon_ccbgdiv.style.opacity=f/100;icon_ccbgdiv.style.MozOpacity=f/100;icon_ccbgdiv.style.filter="alpha(opacity="+f+")";icon_ccdiv=_ge("contactChangerPopup");iframeify(icon_ccbgdiv)}F._person_hover=new Object();F._person_hover.hover_go_go_go=function(){this.hover_persons={};this.hover_showing=0;this.hover_menu_showing=0;this.hover_show_timer=null;this.hover_hide_timer=null;this.hover_anim_timer=null;this.hover_over=0;this.hover_curr_img=null;F.decorate(_ge("personmenu_button_bar"),F._personmenu_button_bar).bar_go_go_go();if(F.is_ie){_ge("person_hover_inner").style.width="79px";_ge("person_hover_inner").style.height="58px"}this.onmouseover=_hitch(this,"hover_mouseover");this.onmouseout=_hitch(this,"hover_mouseout")};F._person_hover.hover_add_img=function(a){var c="hover_img"+a.nsid;if(_ge(c)){return}var b=document.createElement("IMG");b.id=c;b.nsid=a.nsid;b.deferred_src=get_img_src(a);b.className="person_hover_img";_ge("person_hover_link").appendChild(b)};F._person_hover.hover_mouseover=function(a){clearTimeout(this.hover_hide_timer);this.hover_over=1};F._person_hover.hover_mouseout=function(a){this.hover_over=0;if(this.hover_menu_showing){return}this.hover_hide_timer=setTimeout(function(){var b=_ge("person_hover");if(!b.hover_over){b.hover_hide()}},500)};F._person_hover.icon_mouseover=function(b){if(this.hover_menu_showing){return}clearTimeout(this.hover_hide_timer);this.hover_icon=_get_event_src(b);if(this.hover_showing){this.hover_place_and_show()}if(this.hover_curr_img&&this.hover_curr_img.nsid!=this.hover_icon.nsid){this.hover_curr_img.style.display="none";this.hover_curr_img.style.visibility="hidden"}this.hover_curr_img=_ge("hover_img"+this.hover_icon.nsid);if(!this.hover_curr_img.src){this.hover_curr_img.src=this.hover_curr_img.deferred_src}this.hover_curr_img.style.display="block";this.hover_curr_img.style.visibility="visible";_ge("person_hover_link").href=(this.hover_icon.parentNode.href)?this.hover_icon.parentNode.href:"/photos/"+this.hover_icon.nsid+"/";if(!this.hover_showing){var a=this.hover_icon;this.hover_show_timer=setTimeout(function(){var c=_ge("person_hover");if(a==c.hover_icon){c.hover_place_and_show()}},100)}};F._person_hover.hover_go_away=function(){this.hover_menu_showing=0;clearTimeout(this.hover_show_timer);clearTimeout(this.hover_hide_timer);clearTimeout(this.hover_anim_timer);this.hover_over=0;this.hover_hide_menu();this.hover_hide()};F._person_hover.icon_mouseout=function(a){if(this.hover_showing){return}clearTimeout(this.hover_show_timer)};F._person_hover.hover_hide=function(){this.hover_showing=0;this.style.display="none";Y.U.Event.removeListener(window,"resize",this.window_resize);Y.U.Event.removeListener(window,"scroll",this.window_scroll)};F._person_hover.window_mousedown=function(c,a){var b=_get_event_src(c);while(b){if(b.id=="person_hover"||b.id=="personmenu_down_button"){return}b=b.parentNode}a.hover_go_away()};F._person_hover.window_resize=function(b,a){a.hover_place()};F._person_hover.window_scroll=function(b,a){a.hover_place()};F._person_hover.hover_place_and_show=function(){this.hover_place();this.hover_show_hover()};F._person_hover.hover_show_hover=function(){this.hover_showing=1;this.style.display="block";Y.U.Event.addListener(window,"resize",this.window_resize,this);Y.U.Event.addListener(window,"scroll",this.window_scroll,this)};F._person_hover.hover_place=function(){var a=Y.U.Dom.getX(this.hover_icon);var b=Y.U.Dom.getY(this.hover_icon);a-=_pi((48-this.hover_icon.width)/2);b-=_pi((48-this.hover_icon.height)/2);this.style.left=(a-6)+"px";this.style.top=(b-5)+"px"};F._person_hover.hover_toggle_menu=function(){if(this.hover_menu_showing){this.hover_hide_menu()}else{this.hover_show_menu()}};F._person_hover.hover_add_contact=function(){icon_windowOpenFromHover(this.hover_icon.nsid)};F._person_hover.hover_hide_menu=function(){this.hover_menu_showing=0;_ge("person_hover_shadow").className="shadowLight";_ge("personmenu_down_button").button_hide_menu();_ge("personmenu_down_button").button_set_img_srcs_and_change("personmenu_down");Y.U.Event.removeListener(window,"mousedown",this.window_mousedown)};F._person_hover.hover_actually_show_menu=function(){clearTimeout(this.hover_anim_timer);_ge("personmenu_down_button").button_show_menu();_ge("person_hover_pulser_img").style.display="none";_ge("person_hover_link").style.display="block";F.scroll_this_el_into_view("personmenu_down_menu")};F._person_hover.hover_show_menu=function(f){this.hover_menu_showing=1;_ge("person_hover_shadow").className="shadowDark";var a=_ge("personmenu_down_button");a.button_hide_menu();a.button_set_img_srcs_and_change("personmenu_up");if(this.hover_icon.nsid==global_nsid){Y.U.Event.addListener(document.body,"mousedown",this.window_mousedown,this);_ge("person_menu_other_div").style.display="none";_ge("person_menu_you_div").style.display="block";_ge("personmenu_relationship_p").innerHTML=F.output.get("personmenu_hiyou");_ge("personmenu_relationship_p").style.display="block";this.hover_actually_show_menu()}else{_ge("person_menu_you_div").style.display="none";_ge("person_menu_other_div").style.display="block";var b=this.hover_persons[this.hover_icon.nsid];if(b){Y.U.Event.addListener(document.body,"mousedown",this.window_mousedown,this);var d=b.getRelationshipHTML();if(d){_ge("personmenu_relationship_p").innerHTML=d;_ge("personmenu_contact_link").style.display="none";_ge("personmenu_relationship_p").style.display="block"}else{d=F.output.get("personmenu_add_as_contact",b.name);_ge("personmenu_contact_link").innerHTML=d;_ge("personmenu_contact_link").href="/relationship.gne?id="+b.nsid;_ge("personmenu_relationship_p").style.display="none";_ge("personmenu_contact_link").style.display="block";if(typeof _is_beehive!="undefined"&&_is_beehive==true){var g=_ge("personmenu_contact_link");var e=g.parentNode.getElementsByTagName("div")[0];var h="menu_item_line_above";if(e&&YAHOO.util.Dom.hasClass(e,h)){YAHOO.util.Dom.removeClass(e,h)}g.style.display="none"}}if(b.has_collections){if(_ge("personmenu_collections_link")){_ge("personmenu_collections_link").style.display="block"}}else{if(_ge("personmenu_collections_link")){_ge("personmenu_collections_link").style.display="none"}}_ge("personmenu_photos_link").href=b.getphotos_url();_ge("personmenu_profile_link").href=b.getprofile_url();_ge("personmenu_sets_link").href=b.getphotos_url()+"sets/";_ge("personmenu_galleries_link").href=b.getphotos_url()+"galleries/";if(_ge("personmenu_collections_link")){_ge("personmenu_collections_link").href=b.getphotos_url()+"collections/"}_ge("personmenu_tags_link").href=b.getTagsUrl();_ge("personmenu_archives_link").href=b.getArchivesUrl();if(_ge("personmenu_map_link")){_ge("personmenu_map_link").href=b.getMapUrl()}_ge("personmenu_faves_link").href=b.getFavoritesUrl();_ge("personmenu_contacts_link").href=b.getContactsUrl();if(_ge("personmenu_photosof_link")){_ge("personmenu_photosof_link").href=b.getPhotosOfUrl()}_ge("personmenu_mail_link").href=b.getSendMailUrl();var c=(b.is_blocked)?F.output.get("personmenu_unblock"):F.output.get("personmenu_block");_ge("personmenu_block_link").innerHTML=c;_ge("personmenu_block_link").href="/ignore.gne?id="+b.nsid;this.hover_actually_show_menu()}else{if(!f){this.hover_anim_timer=setTimeout(function(){_ge("person_hover_link").style.display="none";_ge("person_hover_pulser_img").style.display="block"},1000);F.API.callMethod("flickr.people.getInfo",{user_id:this.hover_icon.nsid},this,null,null,null,0,0)}}}};F._person_hover.flickr_people_getInfo_onLoad=function(d,c,b){var a=c.documentElement.getElementsByTagName("person")[0].getAttribute("nsid");this.hover_persons[a]=new BuddyData(c);if(this.hover_menu_showing){this.hover_show_menu(1)}};function BuddyData(c){var a=c.documentElement;var d=a;var f=a.getElementsByTagName("person").item(0);this.nsid=f.getAttribute("nsid");this.is_contact=f.getAttribute("contact")==="1";this.is_friend=f.getAttribute("friend")==="1";this.is_family=f.getAttribute("family")==="1";this.is_rev_contact=f.getAttribute("revcontact")==="1";this.is_rev_friend=f.getAttribute("revfriend")==="1";this.is_rev_family=f.getAttribute("revfamily")==="1";this.is_blocked=f.getAttribute("ignored")==="1";this.has_collections=f.getAttribute("hascollections")&&f.getAttribute("hascollections")==="1";this.forum_blocked=f.getAttribute("forum_blocked")&&f.getAttribute("forum_blocked")==="1";this.gender=f.getAttribute("gender");this.name=this.nsid;try{this.name=a.getElementsByTagName("username").item(0).firstChild.nodeValue.escape_for_display()}catch(h){}this.photos_url="/photos/"+this.nsid+"/";this.profile_url="/people/"+this.nsid+"/";try{this.photos_url=a.getElementsByTagName("photosurl").item(0).firstChild.nodeValue}catch(h){}try{this.profile_url=a.getElementsByTagName("profileurl").item(0).firstChild.nodeValue}catch(h){}var i=f.getAttribute("iconserver");var g=Math.ceil(i/1000);if(i&&i!="0"){var b=_photo_root.replace_global("http://farm","http://farm"+g);this.icon_url=b+i+"/buddyicons/"+this.nsid+".jpg"}else{this.icon_url=_images_root+"/buddyicon.gif"}if(F.config.flickr.is_secure){this.icon_url=this.icon_url.replace("http:","https:")}}BuddyData.prototype={isMe:function(){if(global_nsid){return this.nsid==global_nsid}else{return false}},getYourRecentActivityUrl:function(){return"/recent_activity.gne"},getYourFlickrMailUrl:function(){return"/mail/"},getYourAccountUrl:function(){return"/account/"},getYourBuddyIconEditUrl:function(){return"/iconbuilder/"},getphotos_url:function(){return this.photos_url},getprofile_url:function(){return this.profile_url},getTagsUrl:function(){return this.photos_url+"tags/"},getArchivesUrl:function(){return this.photos_url+"archives/"},getMapUrl:function(){return this.photos_url+"map/"},getFavoritesUrl:function(){return this.photos_url+"favorites/"},getContactsUrl:function(){return this.profile_url+"contacts/"},getPhotosOfUrl:function(){return this.profile_url+"photosof/"},getSendMailUrl:function(){return"/mail/write/?to="+this.nsid},getRelationshipHTML:function(){var a='<a href="/relationship.gne?id='+this.nsid+'" onclick="return icon_windowOpenFromHover(\''+this.nsid+'\');" role="menuitem">'+F.output.get("personmenu_change")+"</a>";switch(true){case this.is_blocked:return F.output.get("personmenu_are_blocking",this.name);case this.is_friend&&this.is_family:return F.output.get("personmenu_is_ff",this.name,a);case this.is_friend:return F.output.get("personmenu_is_fri",this.name,a);case this.is_family:return F.output.get("personmenu_is_fam",this.name,a);case this.is_contact:return F.output.get("personmenu_is_con",this.name,a);default:return null}},getReverseRelationshipHTML:function(){switch(true){case this.is_rev_friend&&this.isRefFamily:return F.output.get("personmenu_as_ff",this.name);case this.is_rev_friend:return F.output.get("personmenu_as_fri",this.name);case this.isRefFamily:return F.output.get("personmenu_as_fam",this.name);case this.is_rev_contact:return F.output.get("personmenu_as_con",this.name);default:return null}}};F._personmenu_button_bar={bar_go_go_go:function(){F.decorate(_ge("personmenu_down_button"),F._personmenu_button).button_go_go_go()}};F._personmenu_button={_decotype:F._simple_button,button_always_swap_img:0,button_img_root:"personmenu_down_",button_img_ext:"gif",button_go_go_go:function(){F.preload_images(_images_root+"/personmenu_down_default.gif",_images_root+"/personmenu_down_hover.gif",_images_root+"/personmenu_down_selected.gif");var d=this.button_get_menu();this.iframe=iframeify(d);var a=d.getElementsByTagName("A");for(var b=0;b<a.length;b++){var c=a[b];Y.U.Event.addListener(c,"click",function(){if(_ge("person_hover").hover_menu_showing){_ge("person_hover").hover_go_away()}})}F._personmenu_button._decotype.button_go_go_go.apply(this)},button_get_menu:function(){return _ge("personmenu_down_menu")},button_hide_menu:function(){this.button_get_menu().style.display="none"},button_show_menu:function(){var b=this.button_get_menu();b.style.visibility="hidden";b.style.display="block";var a=F.get_local_X(this);var c=F.get_local_Y(this);if(a+b.offsetWidth>_find_screen_width()){a=_find_screen_width()-b.offsetWidth}c+=(this.height);b.style.top=(c)+"px";b.style.left=(a)+"px";if(this.iframe){this.iframe.style.width=b.offsetWidth+"px";this.iframe.style.height=b.offsetHeight+"px"}b.style.visibility="visible"}};/*
YUI 3.11.0 (build d549e5c)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

typeof YUI!="undefined"&&(YUI._YUI=YUI);var YUI=function(){var e=0,t=this,n=arguments,r=n.length,i=function(e,t){return e&&e.hasOwnProperty&&e instanceof t},s=typeof YUI_config!="undefined"&&YUI_config;i(t,YUI)?(t._init(),YUI.GlobalConfig&&t.applyConfig(YUI.GlobalConfig),s&&t.applyConfig(s),r||t._setup()):t=new YUI;if(r){for(;e<r;e++)t.applyConfig(n[e]);t._setup()}return t.instanceOf=i,t};(function(){var e,t,n="3.11.0",r=".",i="http://yui.yahooapis.com/",s="yui3-js-enabled",o="yui3-css-stamp",u=function(){},a=Array.prototype.slice,f={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},l=typeof window!="undefined",c=l?window:null,h=l?c.document:null,p=h&&h.documentElement,d=p&&p.className,v={},m=(new Date).getTime(),g=function(e,t,n,r){e&&e.addEventListener?e.addEventListener(t,n,r):e&&e.attachEvent&&e.attachEvent("on"+t,n)},y=function(e,t,n,r){if(e&&e.removeEventListener)try{e.removeEventListener(t,n,r)}catch(i){}else e&&e.detachEvent&&e.detachEvent("on"+t,n)},b=function(){YUI.Env.windowLoaded=!0,YUI.Env.DOMReady=!0,l&&y(window,"load",b)},w=function(e,t){var n=e.Env._loader,r=["loader-base"],i=YUI.Env,s=i.mods;return n?(n.ignoreRegistered=!1,n.onEnd=null,n.data=null,n.required=[],n.loadType=null):(n=new e.Loader(e.config),e.Env._loader=n),s&&s.loader&&(r=[].concat(r,YUI.Env.loaderExtras)),YUI.Env.core=e.Array.dedupe([].concat(YUI.Env.core,r)),n},E=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},S={success:!0};p&&d.indexOf(s)==-1&&(d&&(d+=" "),d+=s,p.className=d),n.indexOf("@")>-1&&(n="3.5.0"),e={applyConfig:function(e){e=e||u;var t,n,r=this.config,i=r.modules,s=r.groups,o=r.aliases,a=this.Env._loader;for(n in e)e.hasOwnProperty(n)&&(t=e[n],i&&n=="modules"?E(i,t):o&&n=="aliases"?E(o,t):s&&n=="groups"?E(s,t):n=="win"?(r[n]=t&&t.contentWindow||t,r.doc=r[n]?r[n].document:null):n!="_yuid"&&(r[n]=t));a&&a._config(e)},_config:function(e){this.applyConfig(e)},_init:function(){var e,t,r=this,s=YUI.Env,u=r.Env,a;r.version=n;if(!u){r.Env={core:["get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"],loaderExtras:["loader-rollup","loader-yui3"],mods:{},versions:{},base:i,cdn:i+n+"/build/",_idx:0,_used:{},_attached:{},_missed:[],_yidx:0,_uidx:0,_guidp:"y",_loaded:{},_BASE_RE:/(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,parseBasePath:function(e,t){var n=e.match(t),r,i;return n&&(r=RegExp.leftContext||e.slice(0,e.indexOf(n[0])),i=n[3],n[1]&&(r+="?"+n[1]),r={filter:i,path:r}),r},getBase:s&&s.getBase||function(t){var n=h&&h.getElementsByTagName("script")||[],i=u.cdn,s,o,a,f;for(o=0,a=n.length;o<a;++o){f=n[o].src;if(f){s=r.Env.parseBasePath(f,t);if(s){e=s.filter,i=s.path;break}}}return i}},u=r.Env,u._loaded[n]={};if(s&&r!==YUI)u._yidx=++s._yidx,u._guidp=("yui_"+n+"_"+u._yidx+"_"+m).replace(/[^a-z0-9_]+/g,"_");else if(YUI._YUI){s=YUI._YUI.Env,u._yidx+=s._yidx,u._uidx+=s._uidx;for(a in s)a in u||(u[a]=s[a]);delete YUI._YUI}r.id=r.stamp(r),v[r.id]=r}r.constructor=YUI,r.config=r.config||{bootstrap:!0,cacheUse:!0,debug:!0,doc:h,fetchCSS:!0,throwFail:!0,useBrowserConsole:!0,useNativeES5:!0,win:c,global:Function("return this")()},h&&!h.getElementById(o)?(t=h.createElement("div"),t.innerHTML='<div id="'+o+'" style="position: absolute !important; visibility: hidden !important"></div>',YUI.Env.cssStampEl=t.firstChild,h.body?h.body.appendChild(YUI.Env.cssStampEl):p.insertBefore(YUI.Env.cssStampEl,p.firstChild)):h&&h.getElementById(o)&&!YUI.Env.cssStampEl&&(YUI.Env.cssStampEl=h.getElementById(o)),r.config.lang=r.config.lang||"en-US",r.config.base=YUI.config.base||r.Env.getBase(r.Env._BASE_RE);if(!e||!"mindebug".indexOf(e))e="min";e=e?"-"+e:e,r.config.loaderPath=YUI.config.loaderPath||"loader/loader"+e+".js"},_setup:function(){var e,t=this,n=[],r=YUI.Env.mods,i=t.config.core||[].concat(YUI.Env.core);for(e=0;e<i.length;e++)r[i[e]]&&n.push(i[e]);t._attach(["yui-base"]),t._attach(n),t.Loader&&w(t)},applyTo:function(e,t,n){if(t in f){var r=v[e],i,s,o;if(r){i=t.split("."),s=r;for(o=0;o<i.length;o+=1)s=s[i[o]],s||this.log("applyTo not found: "+t,"warn","yui");return s&&s.apply(r,n)}return null}return this.log(t+": applyTo not allowed","warn","yui"),null},add:function(e,t,n,r){r=r||{};var i=YUI.Env,s={name:e,fn:t,version:n,details:r},o={},u,a,f,l=i.versions;i.mods[e]=s,l[n]=l[n]||{},l[n][e]=s;for(f in v)v.hasOwnProperty(f)&&(a=v[f],o[a.id]||(o[a.id]=!0,u=a.Env._loader,u&&(!u.moduleInfo[e]||u.moduleInfo[e].temp)&&u.addModule(r,e)));return this},_attach:function(e,t){var n,r,i,s,o,u,a,f=YUI.Env.mods,l=YUI.Env.aliases,c=this,h,p=YUI.Env._renderedMods,d=c.Env._loader,v=c.Env._attached,m=e.length,d,g,y,b=[];for(n=0;n<m;n++){r=e[n],i=f[r],b.push(r);if(d&&d.conditions[r])for(h in d.conditions[r])d.conditions[r].hasOwnProperty(h)&&(g=d.conditions[r][h],y=g&&(g.ua&&c.UA[g.ua]||g.test&&g.test(c)),y&&b.push(g.name))}e=b,m=e.length;for(n=0;n<m;n++)if(!v[e[n]]){r=e[n],i=f[r];if(l&&l[r]&&!i){c._attach(l[r]);continue}if(!i)d&&d.moduleInfo[r]&&(i=d.moduleInfo[r],t=!0),!t&&r&&r.indexOf("skin-")===-1&&r.indexOf("css")===-1&&(c.Env._missed.push(r),c.Env._missed=c.Array.dedupe(c.Env._missed),c.message("NOT loaded: "+r,"warn","yui"));else{v[r]=!0;for(h=0;h<c.Env._missed.length;h++)c.Env._missed[h]===r&&(c.message("Found: "+r+" (was reported as missing earlier)","warn","yui"),c.Env._missed.splice(h,1));if(d&&p&&p[r]&&p[r].temp){d.getRequires(p[r]),o=[];for(h in d.moduleInfo[r].expanded_map)d.moduleInfo[r].expanded_map.hasOwnProperty(h)&&o.push(h);c._attach(o)}s=i.details,o=s.requires,u=s.use,a=s.after,s.lang&&(o=o||[],o.unshift("intl"));if(o)for(h=0;h<o.length;h++)if(!v[o[h]]){if(!c._attach(o))return!1;break}if(a)for(h=0;h<a.length;h++)if(!v[a[h]]){if(!c._attach(a,!0))return!1;break}if(i.fn)if(c.config.throwFail)i.fn(c,r);else try{i.fn(c,r)}catch(w){return c.error("Attach error: "+r,w,r),!1}if(u)for(h=0;h<u.length;h++)if(!v[u[h]]){if(!c._attach(u))return!1;break}}}return!0},_delayCallback:function(e,t){var n=this,r=["event-base"];return t=n.Lang.isObject(
t)?t:{event:t},t.event==="load"&&r.push("event-synthetic"),function(){var i=arguments;n._use(r,function(){n.on(t.event,function(){i[1].delayUntil=t.event,e.apply(n,i)},t.args)})}},use:function(){var e=a.call(arguments,0),t=e[e.length-1],n=this,r=0,i,s=n.Env,o=!0;n.Lang.isFunction(t)?(e.pop(),n.config.delayUntil&&(t=n._delayCallback(t,n.config.delayUntil))):t=null,n.Lang.isArray(e[0])&&(e=e[0]);if(n.config.cacheUse){while(i=e[r++])if(!s._attached[i]){o=!1;break}if(o)return e.length,n._notify(t,S,e),n}return n._loading?(n._useQueue=n._useQueue||new n.Queue,n._useQueue.add([e,t])):n._use(e,function(n,r){n._notify(t,r,e)}),n},_notify:function(e,t,n){if(!t.success&&this.config.loadErrorFn)this.config.loadErrorFn.call(this,this,e,t,n);else if(e){this.Env._missed&&this.Env._missed.length&&(t.msg="Missing modules: "+this.Env._missed.join(),t.success=!1);if(this.config.throwFail)e(this,t);else try{e(this,t)}catch(r){this.error("use callback error",r,n)}}},_use:function(e,t){this.Array||this._attach(["yui-base"]);var r,i,s,o=this,u=YUI.Env,a=u.mods,f=o.Env,l=f._used,c=u.aliases,h=u._loaderQueue,p=e[0],d=o.Array,v=o.config,m=v.bootstrap,g=[],y,b=[],E=!0,S=v.fetchCSS,x=function(e,t){var r=0,i=[],s,o,f,h,p;if(!e.length)return;if(c){o=e.length;for(r=0;r<o;r++)c[e[r]]&&!a[e[r]]?i=[].concat(i,c[e[r]]):i.push(e[r]);e=i}o=e.length;for(r=0;r<o;r++){s=e[r],t||b.push(s);if(l[s])continue;f=a[s],h=null,p=null,f?(l[s]=!0,h=f.details.requires,p=f.details.use):u._loaded[n][s]?l[s]=!0:g.push(s),h&&h.length&&x(h),p&&p.length&&x(p,1)}},T=function(n){var r=n||{success:!0,msg:"not dynamic"},i,s,u=!0,a=r.data;o._loading=!1,a&&(s=g,g=[],b=[],x(a),i=g.length,i&&[].concat(g).sort().join()==s.sort().join()&&(i=!1)),i&&a?(o._loading=!0,o._use(g,function(){o._attach(a)&&o._notify(t,r,a)})):(a&&(u=o._attach(a)),u&&o._notify(t,r,e)),o._useQueue&&o._useQueue.size()&&!o._loading&&o._use.apply(o,o._useQueue.next())};if(p==="*"){e=[];for(y in a)a.hasOwnProperty(y)&&e.push(y);return E=o._attach(e),E&&T(),o}return(a.loader||a["loader-base"])&&!o.Loader&&o._attach(["loader"+(a.loader?"":"-base")]),m&&o.Loader&&e.length&&(i=w(o),i.require(e),i.ignoreRegistered=!0,i._boot=!0,i.calculate(null,S?null:"js"),e=i.sorted,i._boot=!1),x(e),r=g.length,r&&(g=d.dedupe(g),r=g.length),m&&r&&o.Loader?(o._loading=!0,i=w(o),i.onEnd=T,i.context=o,i.data=e,i.ignoreRegistered=!1,i.require(g),i.insert(null,S?null:"js")):m&&r&&o.Get&&!f.bootstrapped?(o._loading=!0,s=function(){o._loading=!1,h.running=!1,f.bootstrapped=!0,u._bootstrapping=!1,o._attach(["loader"])&&o._use(e,t)},u._bootstrapping?h.add(s):(u._bootstrapping=!0,o.Get.script(v.base+v.loaderPath,{onEnd:s}))):(E=o._attach(e),E&&T()),o},namespace:function(){var e=arguments,t,n=0,i,s,o;for(;n<e.length;n++){t=this,o=e[n];if(o.indexOf(r)>-1){s=o.split(r);for(i=s[0]=="YAHOO"?1:0;i<s.length;i++)t[s[i]]=t[s[i]]||{},t=t[s[i]]}else t[o]=t[o]||{},t=t[o]}return t},log:u,message:u,dump:function(e){return""+e},error:function(e,t,n){var r=this,i;r.config.errorFn&&(i=r.config.errorFn.apply(r,arguments));if(!i)throw t||new Error(e);return r.message(e,"error",""+n),r},guid:function(e){var t=this.Env._guidp+"_"+ ++this.Env._uidx;return e?e+t:t},stamp:function(e,t){var n;if(!e)return e;e.uniqueID&&e.nodeType&&e.nodeType!==9?n=e.uniqueID:n=typeof e=="string"?e:e._yuid;if(!n){n=this.guid();if(!t)try{e._yuid=n}catch(r){n=null}}return n},destroy:function(){var e=this;e.Event&&e.Event._unload(),delete v[e.id],delete e.Env,delete e.config}},YUI.prototype=e;for(t in e)e.hasOwnProperty(t)&&(YUI[t]=e[t]);YUI.applyConfig=function(e){if(!e)return;YUI.GlobalConfig&&this.prototype.applyConfig.call(this,YUI.GlobalConfig),this.prototype.applyConfig.call(this,e),YUI.GlobalConfig=this.config},YUI._init(),l?g(window,"load",b):b(),YUI.Env.add=g,YUI.Env.remove=y,typeof exports=="object"&&(exports.YUI=YUI,YUI.setLoadHook=function(e){YUI._getLoadHook=e},YUI._getLoadHook=null)})(),YUI.add("yui-base",function(e,t){function m(e,t,n){var r,i;t||(t=0);if(n||m.test(e))try{return d.slice.call(e,t)}catch(s){i=[];for(r=e.length;t<r;++t)i.push(e[t]);return i}return[e]}function g(){this._init(),this.add.apply(this,arguments)}var n=e.Lang||(e.Lang={}),r=String.prototype,i=Object.prototype.toString,s={"undefined":"undefined",number:"number","boolean":"boolean",string:"string","[object Function]":"function","[object RegExp]":"regexp","[object Array]":"array","[object Date]":"date","[object Error]":"error"},o=/\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,u="	\n\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff",a="[	-\r \u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+",f=new RegExp("^"+a),l=new RegExp(a+"$"),c=new RegExp(f.source+"|"+l.source,"g"),h=/\{\s*\[(?:native code|function)\]\s*\}/i;n._isNative=function(t){return!!(e.config.useNativeES5&&t&&h.test(t))},n.isArray=n._isNative(Array.isArray)?Array.isArray:function(e){return n.type(e)==="array"},n.isBoolean=function(e){return typeof e=="boolean"},n.isDate=function(e){return n.type(e)==="date"&&e.toString()!=="Invalid Date"&&!isNaN(e)},n.isFunction=function(e){return n.type(e)==="function"},n.isNull=function(e){return e===null},n.isNumber=function(e){return typeof e=="number"&&isFinite(e)},n.isObject=function(e,t){var r=typeof e;return e&&(r==="object"||!t&&(r==="function"||n.isFunction(e)))||!1},n.isString=function(e){return typeof e=="string"},n.isUndefined=function(e){return typeof e=="undefined"},n.isValue=function(e){var t=n.type(e);switch(t){case"number":return isFinite(e);case"null":case"undefined":return!1;default:return!!t}},n.now=Date.now||function(){return(new Date).getTime()},n.sub=function(e,t){return e.replace?e.replace(o,function(e,r){return n.isUndefined(t[r])?e:t[r]}):e},n.trim=n._isNative(r.trim)&&!u.trim()?function(e){return e&&e.trim?e.trim():e}:function(e){try{return e.replace(c,"")}catch(t){return e}},n.trimLeft=n._isNative(r.trimLeft)&&!u.trimLeft()?function(e){return e.trimLeft()}:function(
e){return e.replace(f,"")},n.trimRight=n._isNative(r.trimRight)&&!u.trimRight()?function(e){return e.trimRight()}:function(e){return e.replace(l,"")},n.type=function(e){return s[typeof e]||s[i.call(e)]||(e?"object":"null")};var p=e.Lang,d=Array.prototype,v=Object.prototype.hasOwnProperty;e.Array=m,m.dedupe=p._isNative(Object.create)?function(e){var t=Object.create(null),n=[],r,i,s;for(r=0,s=e.length;r<s;++r)i=e[r],t[i]||(t[i]=1,n.push(i));return n}:function(e){var t={},n=[],r,i,s;for(r=0,s=e.length;r<s;++r)i=e[r],v.call(t,i)||(t[i]=1,n.push(i));return n},m.each=m.forEach=p._isNative(d.forEach)?function(t,n,r){return d.forEach.call(t||[],n,r||e),e}:function(t,n,r){for(var i=0,s=t&&t.length||0;i<s;++i)i in t&&n.call(r||e,t[i],i,t);return e},m.hash=function(e,t){var n={},r=t&&t.length||0,i,s;for(i=0,s=e.length;i<s;++i)i in e&&(n[e[i]]=r>i&&i in t?t[i]:!0);return n},m.indexOf=p._isNative(d.indexOf)?function(e,t,n){return d.indexOf.call(e,t,n)}:function(e,t,n){var r=e.length;n=+n||0,n=(n>0||-1)*Math.floor(Math.abs(n)),n<0&&(n+=r,n<0&&(n=0));for(;n<r;++n)if(n in e&&e[n]===t)return n;return-1},m.numericSort=function(e,t){return e-t},m.some=p._isNative(d.some)?function(e,t,n){return d.some.call(e,t,n)}:function(e,t,n){for(var r=0,i=e.length;r<i;++r)if(r in e&&t.call(n,e[r],r,e))return!0;return!1},m.test=function(e){var t=0;if(p.isArray(e))t=1;else if(p.isObject(e))try{"length"in e&&!e.tagName&&(!e.scrollTo||!e.document)&&!e.apply&&(t=2)}catch(n){}return t},g.prototype={_init:function(){this._q=[]},next:function(){return this._q.shift()},last:function(){return this._q.pop()},add:function(){return this._q.push.apply(this._q,arguments),this},size:function(){return this._q.length}},e.Queue=g,YUI.Env._loaderQueue=YUI.Env._loaderQueue||new g;var y="__",v=Object.prototype.hasOwnProperty,b=e.Lang.isObject;e.cached=function(e,t,n){return t||(t={}),function(r){var i=arguments.length>1?Array.prototype.join.call(arguments,y):String(r);if(!(i in t)||n&&t[i]==n)t[i]=e.apply(e,arguments);return t[i]}},e.getLocation=function(){var t=e.config.win;return t&&t.location},e.merge=function(){var e=0,t=arguments.length,n={},r,i;for(;e<t;++e){i=arguments[e];for(r in i)v.call(i,r)&&(n[r]=i[r])}return n},e.mix=function(t,n,r,i,s,o){var u,a,f,l,c,h,p;if(!t||!n)return t||e;if(s){s===2&&e.mix(t.prototype,n.prototype,r,i,0,o),f=s===1||s===3?n.prototype:n,p=s===1||s===4?t.prototype:t;if(!f||!p)return t}else f=n,p=t;u=r&&!o;if(i)for(l=0,h=i.length;l<h;++l){c=i[l];if(!v.call(f,c))continue;a=u?!1:c in p;if(o&&a&&b(p[c],!0)&&b(f[c],!0))e.mix(p[c],f[c],r,null,0,o);else if(r||!a)p[c]=f[c]}else{for(c in f){if(!v.call(f,c))continue;a=u?!1:c in p;if(o&&a&&b(p[c],!0)&&b(f[c],!0))e.mix(p[c],f[c],r,null,0,o);else if(r||!a)p[c]=f[c]}e.Object._hasEnumBug&&e.mix(p,f,r,e.Object._forceEnum,s,o)}return t};var p=e.Lang,v=Object.prototype.hasOwnProperty,w,E=e.Object=p._isNative(Object.create)?function(e){return Object.create(e)}:function(){function e(){}return function(t){return e.prototype=t,new e}}(),S=E._forceEnum=["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","toLocaleString","valueOf"],x=E._hasEnumBug=!{valueOf:0}.propertyIsEnumerable("valueOf"),T=E._hasProtoEnumBug=function(){}.propertyIsEnumerable("prototype"),N=E.owns=function(e,t){return!!e&&v.call(e,t)};E.hasKey=N,E.keys=p._isNative(Object.keys)&&!T?Object.keys:function(e){if(!p.isObject(e))throw new TypeError("Object.keys called on a non-object");var t=[],n,r,i;if(T&&typeof e=="function")for(r in e)N(e,r)&&r!=="prototype"&&t.push(r);else for(r in e)N(e,r)&&t.push(r);if(x)for(n=0,i=S.length;n<i;++n)r=S[n],N(e,r)&&t.push(r);return t},E.values=function(e){var t=E.keys(e),n=0,r=t.length,i=[];for(;n<r;++n)i.push(e[t[n]]);return i},E.size=function(e){try{return E.keys(e).length}catch(t){return 0}},E.hasValue=function(t,n){return e.Array.indexOf(E.values(t),n)>-1},E.each=function(t,n,r,i){var s;for(s in t)(i||N(t,s))&&n.call(r||e,t[s],s,t);return e},E.some=function(t,n,r,i){var s;for(s in t)if(i||N(t,s))if(n.call(r||e,t[s],s,t))return!0;return!1},E.getValue=function(t,n){if(!p.isObject(t))return w;var r,i=e.Array(n),s=i.length;for(r=0;t!==w&&r<s;r++)t=t[i[r]];return t},E.setValue=function(t,n,r){var i,s=e.Array(n),o=s.length-1,u=t;if(o>=0){for(i=0;u!==w&&i<o;i++)u=u[s[i]];if(u===w)return w;u[s[i]]=r}return t},E.isEmpty=function(e){return!E.keys(Object(e)).length},YUI.Env.parseUA=function(t){var n=function(e){var t=0;return parseFloat(e.replace(/\./g,function(){return t++===1?"":"."}))},r=e.config.win,i=r&&r.navigator,s={ie:0,opera:0,gecko:0,webkit:0,safari:0,chrome:0,mobile:null,air:0,phantomjs:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,silk:0,accel:!1,webos:0,caja:i&&i.cajaVersion,secure:!1,os:null,nodejs:0,winjs:typeof Windows!="undefined"&&!!Windows.System,touchEnabled:!1},o=t||i&&i.userAgent,u=r&&r.location,a=u&&u.href,f;return s.userAgent=o,s.secure=a&&a.toLowerCase().indexOf("https")===0,o&&(/windows|win32/i.test(o)?s.os="windows":/macintosh|mac_powerpc/i.test(o)?s.os="macintosh":/android/i.test(o)?s.os="android":/symbos/i.test(o)?s.os="symbos":/linux/i.test(o)?s.os="linux":/rhino/i.test(o)&&(s.os="rhino"),/KHTML/.test(o)&&(s.webkit=1),/IEMobile|XBLWP7/.test(o)&&(s.mobile="windows"),/Fennec/.test(o)&&(s.mobile="gecko"),f=o.match(/AppleWebKit\/([^\s]*)/),f&&f[1]&&(s.webkit=n(f[1]),s.safari=s.webkit,/PhantomJS/.test(o)&&(f=o.match(/PhantomJS\/([^\s]*)/),f&&f[1]&&(s.phantomjs=n(f[1]))),/ Mobile\//.test(o)||/iPad|iPod|iPhone/.test(o)?(s.mobile="Apple",f=o.match(/OS ([^\s]*)/),f&&f[1]&&(f=n(f[1].replace("_","."))),s.ios=f,s.os="ios",s.ipad=s.ipod=s.iphone=0,f=o.match(/iPad|iPod|iPhone/),f&&f[0]&&(s[f[0].toLowerCase()]=s.ios)):(f=o.match(/NokiaN[^\/]*|webOS\/\d\.\d/),f&&(s.mobile=f[0]),/webOS/.test(o)&&(s.mobile="WebOS",f=o.match(/webOS\/([^\s]*);/),f&&f[1]&&(s.webos=n(f[1]))),/ Android/.test(o)&&(/Mobile/.test(o)&&(s.mobile="Android"),f=o.match(/Android ([^\s]*);/),f&&f[1]&&(s.android=n(f[1]))),/Silk/.test(o)&&(f=o.match(/Silk\/([^\s]*)\)/),f&&f[1]&&(s.silk=n(f[1])),s.android||
(s.android=2.34,s.os="Android"),/Accelerated=true/.test(o)&&(s.accel=!0))),f=o.match(/OPR\/(\d+\.\d+)/),f&&f[1]?s.opera=n(f[1]):(f=o.match(/(Chrome|CrMo|CriOS)\/([^\s]*)/),f&&f[1]&&f[2]?(s.chrome=n(f[2]),s.safari=0,f[1]==="CrMo"&&(s.mobile="chrome")):(f=o.match(/AdobeAIR\/([^\s]*)/),f&&(s.air=f[0])))),s.webkit||(/Opera/.test(o)?(f=o.match(/Opera[\s\/]([^\s]*)/),f&&f[1]&&(s.opera=n(f[1])),f=o.match(/Version\/([^\s]*)/),f&&f[1]&&(s.opera=n(f[1])),/Opera Mobi/.test(o)&&(s.mobile="opera",f=o.replace("Opera Mobi","").match(/Opera ([^\s]*)/),f&&f[1]&&(s.opera=n(f[1]))),f=o.match(/Opera Mini[^;]*/),f&&(s.mobile=f[0])):(f=o.match(/MSIE ([^;]*)|Trident.*; rv ([0-9.]+)/),f&&(f[1]||f[2])?s.ie=n(f[1]||f[2]):(f=o.match(/Gecko\/([^\s]*)/),f&&(s.gecko=1,f=o.match(/rv:([^\s\)]*)/),f&&f[1]&&(s.gecko=n(f[1]),/Mobile|Tablet/.test(o)&&(s.mobile="ffos"))))))),r&&i&&!(s.chrome&&s.chrome<6)&&(s.touchEnabled="ontouchstart"in r||"msMaxTouchPoints"in i&&i.msMaxTouchPoints>0),t||(typeof process=="object"&&process.versions&&process.versions.node&&(s.os=process.platform,s.nodejs=n(process.versions.node)),YUI.Env.UA=s),s},e.UA=YUI.Env.UA||YUI.Env.parseUA(),e.UA.compareVersions=function(e,t){var n,r,i,s,o,u;if(e===t)return 0;r=(e+"").split("."),s=(t+"").split(".");for(o=0,u=Math.max(r.length,s.length);o<u;++o){n=parseInt(r[o],10),i=parseInt(s[o],10),isNaN(n)&&(n=0),isNaN(i)&&(i=0);if(n<i)return-1;if(n>i)return 1}return 0},YUI.Env.aliases={anim:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],"anim-shape-transform":["anim-shape"],app:["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","router","view","view-node-map"],attribute:["attribute-base","attribute-complex"],"attribute-events":["attribute-observable"],autocomplete:["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],axes:["axis-numeric","axis-category","axis-time","axis-stacked"],"axes-base":["axis-numeric-base","axis-category-base","axis-time-base","axis-stacked-base"],base:["base-base","base-pluginhost","base-build"],cache:["cache-base","cache-offline","cache-plugin"],charts:["charts-base"],collection:["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],color:["color-base","color-hsl","color-harmony"],controller:["router"],dataschema:["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],datasource:["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],datatable:["datatable-core","datatable-table","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"],datatype:["datatype-date","datatype-number","datatype-xml"],"datatype-date":["datatype-date-parse","datatype-date-format","datatype-date-math"],"datatype-number":["datatype-number-parse","datatype-number-format"],"datatype-xml":["datatype-xml-parse","datatype-xml-format"],dd:["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],dom:["dom-base","dom-screen","dom-style","selector-native","selector"],editor:["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],event:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange","event-tap"],"event-custom":["event-custom-base","event-custom-complex"],"event-gestures":["event-flick","event-move"],handlebars:["handlebars-compiler"],highlight:["highlight-base","highlight-accentfold"],history:["history-base","history-hash","history-hash-ie","history-html5"],io:["io-base","io-xdr","io-form","io-upload-iframe","io-queue"],json:["json-parse","json-stringify"],loader:["loader-base","loader-rollup","loader-yui3"],node:["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"],pluginhost:["pluginhost-base","pluginhost-config"],querystring:["querystring-parse","querystring-stringify"],recordset:["recordset-base","recordset-sort","recordset-filter","recordset-indexer"],resize:["resize-base","resize-proxy","resize-constrain"],slider:["slider-base","slider-value-range","clickable-rail","range-slider"],template:["template-base","template-micro"],text:["text-accentfold","text-wordbreak"],widget:["widget-base","widget-htmlparser","widget-skin","widget-uievents"]}},"3.11.0",{use:["yui-base","get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"]}),YUI.add("get",function(e,t){var n=e.Lang,r,i,s;e.Get=i={cssOptions:{attributes:{rel:"stylesheet"},doc:e.config.linkDoc||e.config.doc,pollInterval:50},jsOptions:{autopurge:!0,doc:e.config.scriptDoc||e.config.doc},options:{attributes:{charset:"utf-8"},purgethreshold:20},REGEX_CSS:/\.css(?:[?;].*)?$/i,REGEX_JS:/\.js(?:[?;].*)?$/i,_insertCache:{},_pending:null,_purgeNodes:[],_queue:[],abort:function(e){var t,n,r,i,s;if(!e.abort){n=e,s=this._pending,e=null;if(s&&s.transaction.id===n)e=s.transaction,this._pending=null;else for(t=0,i=this._queue.length;t<i;++t){r=this._queue[t].transaction;if(r.id===n){e=r,this._queue.splice(t,1);break}}}e&&e.abort()},css:function(e,t,n){return this._load("css",e,t,n)},js:function(e,t,n){return this._load("js",e,t,n)},load:function(e,t,n){return this._load(null,e,t,n)},_autoPurge:function(e){e&&this._purgeNodes.length>=e&&this._purge(this._purgeNodes)},_getEnv:function(){var t=e.config.doc,n=e.UA;return this._env={async:t&&t.createElement("script").async===!0||n.ie>=10,cssFail:n.gecko>=9||n.compareVersions(n.webkit,535.24)>=0,cssLoad:(!n.gecko&&!n.webkit||n.gecko>=9||n.compareVersions(n.webkit,535.24)>=0)&&!(n.chrome&&n.chrome<=18
),preservesScriptOrder:!!(n.gecko||n.opera||n.ie&&n.ie>=10)}},_getTransaction:function(t,r){var i=[],o,u,a,f;n.isArray(t)||(t=[t]),r=e.merge(this.options,r),r.attributes=e.merge(this.options.attributes,r.attributes);for(o=0,u=t.length;o<u;++o){f=t[o],a={attributes:{}};if(typeof f=="string")a.url=f;else{if(!f.url)continue;e.mix(a,f,!1,null,0,!0),f=f.url}e.mix(a,r,!1,null,0,!0),a.type||(this.REGEX_CSS.test(f)?a.type="css":(!this.REGEX_JS.test(f),a.type="js")),e.mix(a,a.type==="js"?this.jsOptions:this.cssOptions,!1,null,0,!0),a.attributes.id||(a.attributes.id=e.guid()),a.win?a.doc=a.win.document:a.win=a.doc.defaultView||a.doc.parentWindow,a.charset&&(a.attributes.charset=a.charset),i.push(a)}return new s(i,r)},_load:function(e,t,n,r){var s;return typeof n=="function"&&(r=n,n={}),n||(n={}),n.type=e,n._onFinish=i._onTransactionFinish,this._env||this._getEnv(),s=this._getTransaction(t,n),this._queue.push({callback:r,transaction:s}),this._next(),s},_onTransactionFinish:function(){i._pending=null,i._next()},_next:function(){var e;if(this._pending)return;e=this._queue.shift(),e&&(this._pending=e,e.transaction.execute(e.callback))},_purge:function(t){var n=this._purgeNodes,r=t!==n,i,s;while(s=t.pop()){if(!s._yuiget_finished)continue;s.parentNode&&s.parentNode.removeChild(s),r&&(i=e.Array.indexOf(n,s),i>-1&&n.splice(i,1))}}},i.script=i.js,i.Transaction=s=function(t,n){var r=this;r.id=s._lastId+=1,r.data=n.data,r.errors=[],r.nodes=[],r.options=n,r.requests=t,r._callbacks=[],r._queue=[],r._reqsWaiting=0,r.tId=r.id,r.win=n.win||e.config.win},s._lastId=0,s.prototype={_state:"new",abort:function(e){this._pending=null,this._pendingCSS=null,this._pollTimer=clearTimeout(this._pollTimer),this._queue=[],this._reqsWaiting=0,this.errors.push({error:e||"Aborted"}),this._finish()},execute:function(e){var t=this,n=t.requests,r=t._state,i,s,o,u;if(r==="done"){e&&e(t.errors.length?t.errors:null,t);return}e&&t._callbacks.push(e);if(r==="executing")return;t._state="executing",t._queue=o=[],t.options.timeout&&(t._timeout=setTimeout(function(){t.abort("Timeout")},t.options.timeout)),t._reqsWaiting=n.length;for(i=0,s=n.length;i<s;++i)u=n[i],u.async||u.type==="css"?t._insert(u):o.push(u);t._next()},purge:function(){i._purge(this.nodes)},_createNode:function(e,t,n){var i=n.createElement(e),s,o;r||(o=n.createElement("div"),o.setAttribute("class","a"),r=o.className==="a"?{}:{"for":"htmlFor","class":"className"});for(s in t)t.hasOwnProperty(s)&&i.setAttribute(r[s]||s,t[s]);return i},_finish:function(){var e=this.errors.length?this.errors:null,t=this.options,n=t.context||this,r,i,s;if(this._state==="done")return;this._state="done";for(i=0,s=this._callbacks.length;i<s;++i)this._callbacks[i].call(n,e,this);r=this._getEventData(),e?(t.onTimeout&&e[e.length-1].error==="Timeout"&&t.onTimeout.call(n,r),t.onFailure&&t.onFailure.call(n,r)):t.onSuccess&&t.onSuccess.call(n,r),t.onEnd&&t.onEnd.call(n,r),t._onFinish&&t._onFinish()},_getEventData:function(t){return t?e.merge(this,{abort:this.abort,purge:this.purge,request:t,url:t.url,win:t.win}):this},_getInsertBefore:function(t){var n=t.doc,r=t.insertBefore,s,o;return r?typeof r=="string"?n.getElementById(r):r:(s=i._insertCache,o=e.stamp(n),(r=s[o])?r:(r=n.getElementsByTagName("base")[0])?s[o]=r:(r=n.head||n.getElementsByTagName("head")[0],r?(r.appendChild(n.createTextNode("")),s[o]=r.lastChild):s[o]=n.getElementsByTagName("script")[0]))},_insert:function(t){function c(){u._progress("Failed to load "+t.url,t)}function h(){f&&clearTimeout(f),u._progress(null,t)}var n=i._env,r=this._getInsertBefore(t),s=t.type==="js",o=t.node,u=this,a=e.UA,f,l;o||(s?l="script":!n.cssLoad&&a.gecko?l="style":l="link",o=t.node=this._createNode(l,t.attributes,t.doc)),s?(o.setAttribute("src",t.url),t.async?o.async=!0:(n.async&&(o.async=!1),n.preservesScriptOrder||(this._pending=t))):!n.cssLoad&&a.gecko?o.innerHTML=(t.attributes.charset?'@charset "'+t.attributes.charset+'";':"")+'@import "'+t.url+'";':o.setAttribute("href",t.url),s&&a.ie&&(a.ie<9||document.documentMode&&document.documentMode<9)?o.onreadystatechange=function(){/loaded|complete/.test(o.readyState)&&(o.onreadystatechange=null,h())}:!s&&!n.cssLoad?this._poll(t):(a.ie>=10?(o.onerror=function(){setTimeout(c,0)},o.onload=function(){setTimeout(h,0)}):(o.onerror=c,o.onload=h),!n.cssFail&&!s&&(f=setTimeout(c,t.timeout||3e3))),this.nodes.push(o),r.parentNode.insertBefore(o,r)},_next:function(){if(this._pending)return;this._queue.length?this._insert(this._queue.shift()):this._reqsWaiting||this._finish()},_poll:function(t){var n=this,r=n._pendingCSS,i=e.UA.webkit,s,o,u,a,f,l;if(t){r||(r=n._pendingCSS=[]),r.push(t);if(n._pollTimer)return}n._pollTimer=null;for(s=0;s<r.length;++s){f=r[s];if(i){l=f.doc.styleSheets,u=l.length,a=f.node.href;while(--u>=0)if(l[u].href===a){r.splice(s,1),s-=1,n._progress(null,f);break}}else try{o=!!f.node.sheet.cssRules,r.splice(s,1),s-=1,n._progress(null,f)}catch(c){}}r.length&&(n._pollTimer=setTimeout(function(){n._poll.call(n)},n.options.pollInterval))},_progress:function(e,t){var n=this.options;e&&(t.error=e,this.errors.push({error:e,request:t})),t.node._yuiget_finished=t.finished=!0,n.onProgress&&n.onProgress.call(n.context||this,this._getEventData(t)),t.autopurge&&(i._autoPurge(this.options.purgethreshold),i._purgeNodes.push(t.node)),this._pending===t&&(this._pending=null),this._reqsWaiting-=1,this._next()}}},"3.11.0",{requires:["yui-base"]}),YUI.add("features",function(e,t){var n={};e.mix(e.namespace("Features"),{tests:n,add:function(e,t,r){n[e]=n[e]||{},n[e][t]=r},all:function(t,r){var i=n[t],s=[];return i&&e.Object.each(i,function(n,i){s.push(i+":"+(e.Features.test(t,i,r)?1:0))}),s.length?s.join(";"):""},test:function(t,r,i){i=i||[];var s,o,u,a=n[t],f=a&&a[r];return!f||(s=f.result,e.Lang.isUndefined(s)&&(o=f.ua,o&&(s=e.UA[o]),u=f.test,u&&(!o||s)&&(s=u.apply(e,i)),f.result=s)),s}});var r=e.Features.add;r("load","0",{name:"app-transitions-native",test:function(e){var t=e.config.doc,n=t?t.documentElement:null;return n&&n.style?"MozTransition"in 
n.style||"WebkitTransition"in n.style||"transition"in n.style:!1},trigger:"app-transitions"}),r("load","1",{name:"autocomplete-list-keys",test:function(e){return!e.UA.ios&&!e.UA.android},trigger:"autocomplete-list"}),r("load","2",{name:"dd-gestures",trigger:"dd-drag",ua:"touchEnabled"}),r("load","3",{name:"dom-style-ie",test:function(e){var t=e.Features.test,n=e.Features.add,r=e.config.win,i=e.config.doc,s="documentElement",o=!1;return n("style","computedStyle",{test:function(){return r&&"getComputedStyle"in r}}),n("style","opacity",{test:function(){return i&&"opacity"in i[s].style}}),o=!t("style","opacity")&&!t("style","computedStyle"),o},trigger:"dom-style"}),r("load","4",{name:"editor-para-ie",trigger:"editor-para",ua:"ie",when:"instead"}),r("load","5",{name:"event-base-ie",test:function(e){var t=e.config.doc&&e.config.doc.implementation;return t&&!t.hasFeature("Events","2.0")},trigger:"node-base"}),r("load","6",{name:"graphics-canvas",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"}),r("load","7",{name:"graphics-canvas-default",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"}),r("load","8",{name:"graphics-svg",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"}),r("load","9",{name:"graphics-svg-default",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"}),r("load","10",{name:"graphics-vml",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"}),r("load","11",{name:"graphics-vml-default",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"}),r("load","12",{name:"history-hash-ie",test:function(e){var t=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange"in e.config.win)||!t||t<8)},trigger:"history-hash"}),r("load","13",{name:"io-nodejs",trigger:"io-base",ua:"nodejs"}),r("load","14",{name:"json-parse-shim",test:function(e){function i(e,t){return e==="ok"?!0:t}var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONParse!==!1&&!!n;if(r)try{r=n.parse('{"ok":false}',i).ok}catch(s){r=!1}return!r},trigger:"json-parse"}),r("load","15",{name:"json-stringify-shim",test:function(e){var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONStringify!==!1&&!!n;if(r)try{r="0"===n.stringify(0)}catch(i){r=!1}return!r},trigger:"json-stringify"}),r("load","16",{name:"scrollview-base-ie",trigger:"scrollview-base",ua:"ie"}),r("load","17",{name:"selector-css2",test:function(e){var t=e.config.doc,n=t&&!("querySelectorAll"in t);return n},trigger:"selector"}),r("load","18",{name:"transition-timer",test:function(e){var t=e.config.doc,n=t?t.documentElement:null,r=!0;return n&&n.style&&(r=!("MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style)),r},trigger:"transition"}),r("load","19",{name:"widget-base-ie",trigger:"widget-base",ua:"ie"}),r("load","20",{name:"yql-jsonp",test:function(e){return!e.UA.nodejs&&!e.UA.winjs},trigger:"yql",when:"after"}),r("load","21",{name:"yql-nodejs",trigger:"yql",ua:"nodejs",when:"after"}),r("load","22",{name:"yql-winjs",trigger:"yql",ua:"winjs",when:"after"})},"3.11.0",{requires:["yui-base"]}),YUI.add("intl-base",function(e,t){var n=/[, ]/;e.mix(e.namespace("Intl"),{lookupBestLang:function(t,r){function a(e){var t;for(t=0;t<r.length;t+=1)if(e.toLowerCase()===r[t].toLowerCase())return r[t]}var i,s,o,u;e.Lang.isString(t)&&(t=t.split(n));for(i=0;i<t.length;i+=1){s=t[i];if(!s||s==="*")continue;while(s.length>0){o=a(s);if(o)return o;u=s.lastIndexOf("-");if(!(u>=0))break;s=s.substring(0,u),u>=2&&s.charAt(u-2)==="-"&&(s=s.substring(0,u-2))}}return""}})},"3.11.0",{requires:["yui-base"]}),YUI.add("yui-log",function(e,t){var n=e,r="yui:log",i="undefined",s={debug:1,info:2,warn:4,error:8};n.log=function(e,t,o,u){var a,f,l,c,h,p,d=n,v=d.config,m=d.fire?d:YUI.Env.globalEvents;return v.debug&&(o=o||"",typeof o!="undefined"&&(f=v.logExclude,l=v.logInclude,!l||o in l?l&&o in l?a=!l[o]:f&&o in f&&(a=f[o]):a=1,d.config.logLevel=d.config.logLevel||"debug",p=s[d.config.logLevel.toLowerCase()],t in s&&s[t]<p&&(a=1)),a||(v.useBrowserConsole&&(c=o?o+": "+e:e,d.Lang.isFunction(v.logFn)?v.logFn.call(d,e,t,o):typeof console!==i&&console.log?(h=t&&console[t]&&t in s?t:"log",console[h](c)):typeof opera!==i&&opera.postError(c)),m&&!u&&(m===d&&!m.getEvent(r)&&m.publish(r,{broadcast:2}),m.fire(r,{msg:e,cat:t,src:o})))),d},n.message=function(){return n.log.apply(n,arguments)}},"3.11.0",{requires:["yui-base"]}),YUI.add("yui-later",function(e,t){var n=[];e.later=function(t,r,i,s,o){t=t||0,s=e.Lang.isUndefined(s)?n:e.Array(s),r=r||e.config.win||e;var u=!1,a=r&&e.Lang.isString(i)?r[i]:i,f=function(){u||(a.apply?a.apply(r,s||n):a(s[0],s[1],s[2],s[3]))},l=o?setInterval(f,t):setTimeout(f,t);return{id:
l,interval:o,cancel:function(){u=!0,this.interval?clearInterval(l):clearTimeout(l)}}},e.Lang.later=e.later},"3.11.0",{requires:["yui-base"]}),YUI.add("loader-base",function(e,t){YUI.Env[e.version]||function(){var t=e.version,n="/build/",r=t+"/",i=e.Env.base,s="gallery-2013.07.03-22-52",o="2in3",u="4",a="2.9.0",f=i+"combo?",l={version:t,root:r,base:e.Env.base,comboBase:f,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},c=l.groups,h=function(e,t,r){var s=o+"."+(e||u)+"/"+(t||a)+n,l=r&&r.base?r.base:i,h=r&&r.comboBase?r.comboBase:f;c.yui2.base=l+s,c.yui2.root=s,c.yui2.comboBase=h},p=function(e,t){var r=(e||s)+n,o=t&&t.base?t.base:i,u=t&&t.comboBase?t.comboBase:f;c.gallery.base=o+r,c.gallery.root=r,c.gallery.comboBase=u};c[t]={},c.gallery={ext:!1,combine:!0,comboBase:f,update:p,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}},c.yui2={combine:!0,ext:!1,comboBase:f,update:h,patterns:{"yui2-":{configFn:function(e){/-skin|reset|fonts|grids|base/.test(e.name)&&(e.type="css",e.path=e.path.replace(/\.js/,".css"),e.path=e.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin"))}}}},p(),h(),YUI.Env[t]=l}();var n={},r=[],i=1024,s=YUI.Env,o=s._loaded,u="css",a="js",f="intl",l="sam",c=e.version,h="",p=e.Object,d=p.each,v=e.Array,m=s._loaderQueue,g=s[c],y="skin-",b=e.Lang,w=s.mods,E,S=function(e,t,n,r){var i=e+"/"+t;return r||(i+="-min"),i+="."+(n||u),i};YUI.Env._cssLoaded||(YUI.Env._cssLoaded={}),e.Env.meta=g,e.Loader=function(t){var n=this;t=t||{},E=g.md5,n.context=e,n.base=e.Env.meta.base+e.Env.meta.root,n.comboBase=e.Env.meta.comboBase,n.combine=t.base&&t.base.indexOf(n.comboBase.substr(0,20))>-1,n.comboSep="&",n.maxURLLength=i,n.ignoreRegistered=t.ignoreRegistered,n.root=e.Env.meta.root,n.timeout=0,n.forceMap={},n.allowRollup=!1,n.filters={},n.required={},n.patterns={},n.moduleInfo={},n.groups=e.merge(e.Env.meta.groups),n.skin=e.merge(e.Env.meta.skin),n.conditions={},n.config=t,n._internal=!0,n._populateCache(),n.loaded=o[c],n.async=!0,n._inspectPage(),n._internal=!1,n._config(t),n.forceMap=n.force?e.Array.hash(n.force):{},n.testresults=null,e.config.tests&&(n.testresults=e.config.tests),n.sorted=[],n.dirty=!0,n.inserted={},n.skipped={},n.tested={},n.ignoreRegistered&&n._resetModules()},e.Loader.prototype={_populateCache:function(){var t=this,n=g.modules,r=s._renderedMods,i;if(r&&!t.ignoreRegistered){for(i in r)r.hasOwnProperty(i)&&(t.moduleInfo[i]=e.merge(r[i]));r=s._conditions;for(i in r)r.hasOwnProperty(i)&&(t.conditions[i]=e.merge(r[i]))}else for(i in n)n.hasOwnProperty(i)&&t.addModule(n[i],i)},_resetModules:function(){var e=this,t,n,r,i,s;for(t in e.moduleInfo)if(e.moduleInfo.hasOwnProperty(t)){r=e.moduleInfo[t],i=r.name,s=YUI.Env.mods[i]?YUI.Env.mods[i].details:null,s&&(e.moduleInfo[i]._reset=!0,e.moduleInfo[i].requires=s.requires||[],e.moduleInfo[i].optional=s.optional||[],e.moduleInfo[i].supersedes=s.supercedes||[]);if(r.defaults)for(n in r.defaults)r.defaults.hasOwnProperty(n)&&r[n]&&(r[n]=r.defaults[n]);delete r.langCache,delete r.skinCache,r.skinnable&&e._addSkin(e.skin.defaultSkin,r.name)}},REGEX_CSS:/\.css(?:[?;].*)?$/i,FILTER_DEFS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"},COVERAGE:{searchExp:"-min\\.js",replaceStr:"-coverage.js"}},_inspectPage:function(){var e=this,t,n,r,i,s;for(s in e.moduleInfo)e.moduleInfo.hasOwnProperty(s)&&(t=e.moduleInfo[s],t.type&&t.type===u&&e.isCSSLoaded(t.name)&&(e.loaded[s]=!0));for(s in w)w.hasOwnProperty(s)&&(t=w[s],t.details&&(n=e.moduleInfo[t.name],r=t.details.requires,i=n&&n.requires,n?!n._inspected&&r&&i.length!==r.length&&delete n.expanded:n=e.addModule(t.details,s),n._inspected=!0))},_requires:function(e,t){var n,r,i,s,o=this.moduleInfo,a=o[e],f=o[t];if(!a||!f)return!1;r=a.expanded_map,i=a.after_map;if(i&&t in i)return!0;i=f.after_map;if(i&&e in i)return!1;s=o[t]&&o[t].supersedes;if(s)for(n=0;n<s.length;n++)if(this._requires(e,s[n]))return!0;s=o[e]&&o[e].supersedes;if(s)for(n=0;n<s.length;n++)if(this._requires(t,s[n]))return!1;return r&&t in r?!0:a.ext&&a.type===u&&!f.ext&&f.type===u?!0:!1},_config:function(t){var n,r,i,s,o,u,a,f=this,l=[],c;if(t)for(n in t)if(t.hasOwnProperty(n)){i=t[n];if(n==="require")f.require(i);else if(n==="skin")typeof i=="string"&&(f.skin.defaultSkin=t.skin,i={defaultSkin:i}),e.mix(f.skin,i,!0);else if(n==="groups"){for(r in i)if(i.hasOwnProperty(r)){a=r,u=i[r],f.addGroup(u,a);if(u.aliases)for(s in u.aliases)u.aliases.hasOwnProperty(s)&&f.addAlias(u.aliases[s],s)}}else if(n==="modules")for(r in i)i.hasOwnProperty(r)&&f.addModule(i[r],r);else if(n==="aliases")for(r in i)i.hasOwnProperty(r)&&f.addAlias(i[r],r);else n==="gallery"?this.groups.gallery.update&&this.groups.gallery.update(i,t):n==="yui2"||n==="2in3"?this.groups.yui2.update&&this.groups.yui2.update(t["2in3"],t.yui2,t):f[n]=i}o=f.filter,b.isString(o)&&(o=o.toUpperCase(),f.filterName=o,f.filter=f.FILTER_DEFS[o],o==="DEBUG"&&f.require("yui-log","dump"));if(f.filterName&&f.coverage&&f.filterName==="COVERAGE"&&b.isArray(f.coverage)&&f.coverage.length){for(n=0;n<f.coverage.length;n++)c=f.coverage[n],f.moduleInfo[c]&&f.moduleInfo[c].use?l=[].concat(l,f.moduleInfo[c].use):l.push(c);f.filters=f.filters||{},e.Array.each(l,function(e){f.filters[e]=f.FILTER_DEFS.COVERAGE}),f.filterName="RAW",f.filter=f.FILTER_DEFS[f.filterName]}},formatSkin:function(e,t){var n=y+e;return t&&(n=n+"-"+t),n},_addSkin:function(e,t,n){var r,i,s,o,u=this.moduleInfo,a=this.skin,f=u[t]&&u[t].ext;return t&&(s=this.formatSkin(e,t),u[s]||(r=u[t],i=r.pkg||t,o={skin:!0,name:s,group:r.group,type:"css",after:a.after,path:(n||i)+"/"+a.base+e+"/"+t+".css",ext:f},r.base&&(o.base=r.base),r.configFn&&(o.configFn=r.configFn),this.addModule(o,s))),s},addAlias:function(e,t){YUI.Env.aliases[t]=e,this.addModule({name:t,use:e})},addGroup:function(e,t){var n=e.modules,r=this,i,s;t=t||e.name,e.name=t,r.groups[t]=e;if(e.patterns
)for(i in e.patterns)e.patterns.hasOwnProperty(i)&&(e.patterns[i].group=t,r.patterns[i]=e.patterns[i]);if(n)for(i in n)n.hasOwnProperty(i)&&(s=n[i],typeof s=="string"&&(s={name:i,fullpath:s}),s.group=t,r.addModule(s,i))},addModule:function(t,n){n=n||t.name,typeof t=="string"&&(t={name:n,fullpath:t});var r,i,o,f,l,c,p,d,m,g,y,b,w,E,x,T,N,C,k,L,A,O,M=this.conditions,_;this.moduleInfo[n]&&this.moduleInfo[n].temp&&(t=e.merge(this.moduleInfo[n],t)),t.name=n;if(!t||!t.name)return null;t.type||(t.type=a,O=t.path||t.fullpath,O&&this.REGEX_CSS.test(O)&&(t.type=u)),!t.path&&!t.fullpath&&(t.path=S(n,n,t.type)),t.supersedes=t.supersedes||t.use,t.ext="ext"in t?t.ext:this._internal?!1:!0,r=t.submodules,this.moduleInfo[n]=t,t.requires=t.requires||[];if(this.requires)for(i=0;i<this.requires.length;i++)t.requires.push(this.requires[i]);if(t.group&&this.groups&&this.groups[t.group]){A=this.groups[t.group];if(A.requires)for(i=0;i<A.requires.length;i++)t.requires.push(A.requires[i])}t.defaults||(t.defaults={requires:t.requires?[].concat(t.requires):null,supersedes:t.supersedes?[].concat(t.supersedes):null,optional:t.optional?[].concat(t.optional):null}),t.skinnable&&t.ext&&t.temp&&(k=this._addSkin(this.skin.defaultSkin,n),t.requires.unshift(k)),t.requires.length&&(t.requires=this.filterRequires(t.requires)||[]);if(!t.langPack&&t.lang){y=v(t.lang);for(g=0;g<y.length;g++)T=y[g],b=this.getLangPackName(T,n),p=this.moduleInfo[b],p||(p=this._addLangPack(T,t,b))}if(r){l=t.supersedes||[],o=0;for(i in r)if(r.hasOwnProperty(i)){c=r[i],c.path=c.path||S(n,i,t.type),c.pkg=n,c.group=t.group,c.supersedes&&(l=l.concat(c.supersedes)),p=this.addModule(c,i),l.push(i);if(p.skinnable){t.skinnable=!0,C=this.skin.overrides;if(C&&C[i])for(g=0;g<C[i].length;g++)k=this._addSkin(C[i][g],i,n),l.push(k);k=this._addSkin(this.skin.defaultSkin,i,n),l.push(k)}if(c.lang&&c.lang.length){y=v(c.lang);for(g=0;g<y.length;g++)T=y[g],b=this.getLangPackName(T,n),w=this.getLangPackName(T,i),p=this.moduleInfo[b],p||(p=this._addLangPack(T,t,b)),E=E||v.hash(p.supersedes),w in E||p.supersedes.push(w),t.lang=t.lang||[],x=x||v.hash(t.lang),T in x||t.lang.push(T),b=this.getLangPackName(h,n),w=this.getLangPackName(h,i),p=this.moduleInfo[b],p||(p=this._addLangPack(T,t,b)),w in E||p.supersedes.push(w)}o++}t.supersedes=v.dedupe(l),this.allowRollup&&(t.rollup=o<4?o:Math.min(o-1,4))}d=t.plugins;if(d)for(i in d)d.hasOwnProperty(i)&&(m=d[i],m.pkg=n,m.path=m.path||S(n,i,t.type),m.requires=m.requires||[],m.group=t.group,this.addModule(m,i),t.skinnable&&this._addSkin(this.skin.defaultSkin,i,n));if(t.condition){f=t.condition.trigger,YUI.Env.aliases[f]&&(f=YUI.Env.aliases[f]),e.Lang.isArray(f)||(f=[f]);for(i=0;i<f.length;i++)_=f[i],L=t.condition.when,M[_]=M[_]||{},M[_][n]=t.condition,L&&L!=="after"?L==="instead"&&(t.supersedes=t.supersedes||[],t.supersedes.push(_)):(t.after=t.after||[],t.after.push(_))}return t.supersedes&&(t.supersedes=this.filterRequires(t.supersedes)),t.after&&(t.after=this.filterRequires(t.after),t.after_map=v.hash(t.after)),t.configFn&&(N=t.configFn(t),N===!1&&(delete this.moduleInfo[n],delete s._renderedMods[n],t=null)),t&&(s._renderedMods||(s._renderedMods={}),s._renderedMods[n]=e.mix(s._renderedMods[n]||{},t),s._conditions=M),t},require:function(t){var n=typeof t=="string"?v(arguments):t;this.dirty=!0,this.required=e.merge(this.required,v.hash(this.filterRequires(n))),this._explodeRollups()},_explodeRollups:function(){var e=this,t,n,r,i,s,o,u,a=e.required;if(!e.allowRollup){for(r in a)if(a.hasOwnProperty(r)){t=e.getModule(r);if(t&&t.use){o=t.use.length;for(i=0;i<o;i++){n=e.getModule(t.use[i]);if(n&&n.use){u=n.use.length;for(s=0;s<u;s++)a[n.use[s]]=!0}else a[t.use[i]]=!0}}}e.required=a}},filterRequires:function(t){if(t){e.Lang.isArray(t)||(t=[t]),t=e.Array(t);var n=[],r,i,s,o;for(r=0;r<t.length;r++){i=this.getModule(t[r]);if(i&&i.use)for(s=0;s<i.use.length;s++)o=this.getModule(i.use[s]),o&&o.use&&o.name!==i.name?n=e.Array.dedupe([].concat(n,this.filterRequires(o.use))):n.push(i.use[s]);else n.push(t[r])}t=n}return t},getRequires:function(t){if(!t)return r;if(t._parsed)return t.expanded||r;var n,i,s,o,u,a,l=this.testresults,c=t.name,m,g=w[c]&&w[c].details,y,b,E,S,x,T,N,C,k,L,A=t.lang||t.intl,O=this.moduleInfo,M=e.Features&&e.Features.tests.load,_,D;t.temp&&g&&(x=t,t=this.addModule(g,c),t.group=x.group,t.pkg=x.pkg,delete t.expanded),D=!!this.lang&&t.langCache!==this.lang||t.skinCache!==this.skin.defaultSkin;if(t.expanded&&!D)return t.expanded;y=[],_={},S=this.filterRequires(t.requires),t.lang&&(y.unshift("intl"),S.unshift("intl"),A=!0),T=this.filterRequires(t.optional),t._parsed=!0,t.langCache=this.lang,t.skinCache=this.skin.defaultSkin;for(n=0;n<S.length;n++)if(!_[S[n]]){y.push(S[n]),_[S[n]]=!0,i=this.getModule(S[n]);if(i){o=this.getRequires(i),A=A||i.expanded_map&&f in i.expanded_map;for(s=0;s<o.length;s++)y.push(o[s])}}S=this.filterRequires(t.supersedes);if(S)for(n=0;n<S.length;n++)if(!_[S[n]]){t.submodules&&y.push(S[n]),_[S[n]]=!0,i=this.getModule(S[n]);if(i){o=this.getRequires(i),A=A||i.expanded_map&&f in i.expanded_map;for(s=0;s<o.length;s++)y.push(o[s])}}if(T&&this.loadOptional)for(n=0;n<T.length;n++)if(!_[T[n]]){y.push(T[n]),_[T[n]]=!0,i=O[T[n]];if(i){o=this.getRequires(i),A=A||i.expanded_map&&f in i.expanded_map;for(s=0;s<o.length;s++)y.push(o[s])}}m=this.conditions[c];if(m){t._parsed=!1;if(l&&M)d(l,function(e,t){var n=M[t].name;!_[n]&&M[t].trigger===c&&e&&M[t]&&(_[n]=!0,y.push(n))});else for(n in m)if(m.hasOwnProperty(n)&&!_[n]){E=m[n],b=E&&(!E.ua&&!E.test||E.ua&&e.UA[E.ua]||E.test&&E.test(e,S));if(b){_[n]=!0,y.push(n),i=this.getModule(n);if(i){o=this.getRequires(i);for(s=0;s<o.length;s++)y.push(o[s])}}}}if(t.skinnable){C=this.skin.overrides;for(n in YUI.Env.aliases)YUI.Env.aliases.hasOwnProperty(n)&&e.Array.indexOf(YUI.Env.aliases[n],c)>-1&&(k=n);if(C&&(C[c]||k&&C[k])){L=c,C[k]&&(L=k);for(n=0;n<C[L].length;n++)N=this._addSkin(C[L][n],c),this.isCSSLoaded(N,this._boot)||y.push(N)}else N=this._addSkin(this.skin.defaultSkin,c),this.isCSSLoaded
(N,this._boot)||y.push(N)}return t._parsed=!1,A&&(t.lang&&!t.langPack&&e.Intl&&(a=e.Intl.lookupBestLang(this.lang||h,t.lang),u=this.getLangPackName(a,c),u&&y.unshift(u)),y.unshift(f)),t.expanded_map=v.hash(y),t.expanded=p.keys(t.expanded_map),t.expanded},isCSSLoaded:function(t,n){if(!t||!YUI.Env.cssStampEl||!n&&this.ignoreRegistered)return!1;var r=YUI.Env.cssStampEl,i=!1,s=YUI.Env._cssLoaded[t],o=r.currentStyle;return s!==undefined?s:(r.className=t,o||(o=e.config.doc.defaultView.getComputedStyle(r,null)),o&&o.display==="none"&&(i=!0),r.className="",YUI.Env._cssLoaded[t]=i,i)},getProvides:function(t){var r=this.getModule(t),i,s;return r?(r&&!r.provides&&(i={},s=r.supersedes,s&&v.each(s,function(t){e.mix(i,this.getProvides(t))},this),i[t]=!0,r.provides=i),r.provides):n},calculate:function(e,t){if(e||t||this.dirty)e&&this._config(e),this._init||this._setup(),this._explode(),this.allowRollup?this._rollup():this._explodeRollups(),this._reduce(),this._sort()},_addLangPack:function(t,n,r){var i=n.name,s,o,u=this.moduleInfo[r];return u||(s=S(n.pkg||i,r,a,!0),o={path:s,intl:!0,langPack:!0,ext:n.ext,group:n.group,supersedes:[]},n.root&&(o.root=n.root),n.base&&(o.base=n.base),n.configFn&&(o.configFn=n.configFn),this.addModule(o,r),t&&(e.Env.lang=e.Env.lang||{},e.Env.lang[t]=e.Env.lang[t]||{},e.Env.lang[t][i]=!0)),this.moduleInfo[r]},_setup:function(){var t=this.moduleInfo,n,r,i,o,u,a;for(n in t)t.hasOwnProperty(n)&&(o=t[n],o&&(o.requires=v.dedupe(o.requires),o.lang&&(a=this.getLangPackName(h,n),this._addLangPack(null,o,a))));u={},this.ignoreRegistered||e.mix(u,s.mods),this.ignore&&e.mix(u,v.hash(this.ignore));for(i in u)u.hasOwnProperty(i)&&e.mix(u,this.getProvides(i));if(this.force)for(r=0;r<this.force.length;r++)this.force[r]in u&&delete u[this.force[r]];e.mix(this.loaded,u),this._init=!0},getLangPackName:function(e,t){return"lang/"+t+(e?"_"+e:"")},_explode:function(){var t=this.required,n,r,i={},s=this,o,u;s.dirty=!1,s._explodeRollups(),t=s.required;for(o in t)t.hasOwnProperty(o)&&(i[o]||(i[o]=!0,n=s.getModule(o),n&&(u=n.expound,u&&(t[u]=s.getModule(u),r=s.getRequires(t[u]),e.mix(t,v.hash(r))),r=s.getRequires(n),e.mix(t,v.hash(r)))))},_patternTest:function(e,t){return e.indexOf(t)>-1},getModule:function(t){if(!t)return null;var n,r,i,s=this.moduleInfo[t],o=this.patterns;if(!s||s&&s.ext)for(i in o)if(o.hasOwnProperty(i)){n=o[i],n.test||(n.test=this._patternTest);if(n.test(t,i)){r=n;break}}return s?r&&s&&r.configFn&&!s.configFn&&(s.configFn=r.configFn,s.configFn(s)):r&&(n.action?n.action.call(this,t,i):(s=this.addModule(e.merge(r),t),r.configFn&&(s.configFn=r.configFn),s.temp=!0)),s},_rollup:function(){},_reduce:function(e){e=e||this.required;var t,n,r,i,s=this.loadType,o=this.ignore?v.hash(this.ignore):!1;for(t in e)if(e.hasOwnProperty(t)){i=this.getModule(t),((this.loaded[t]||w[t])&&!this.forceMap[t]&&!this.ignoreRegistered||s&&i&&i.type!==s)&&delete e[t],o&&o[t]&&delete e[t],r=i&&i.supersedes;if(r)for(n=0;n<r.length;n++)r[n]in e&&delete e[r[n]]}return e},_finish:function(e,t){m.running=!1;var n=this.onEnd;n&&n.call(this.context,{msg:e,data:this.data,success:t}),this._continue()},_onSuccess:function(){var t=this,n=e.merge(t.skipped),r,i=[],s=t.requireRegistration,o,u,f,l;for(f in n)n.hasOwnProperty(f)&&delete t.inserted[f];t.skipped={};for(f in t.inserted)t.inserted.hasOwnProperty(f)&&(l=t.getModule(f),!l||!s||l.type!==a||f in YUI.Env.mods?e.mix(t.loaded,t.getProvides(f)):i.push(f));r=t.onSuccess,u=i.length?"notregistered":"success",o=!i.length,r&&r.call(t.context,{msg:u,data:t.data,success:o,failed:i,skipped:n}),t._finish(u,o)},_onProgress:function(e){var t=this,n;if(e.data&&e.data.length)for(n=0;n<e.data.length;n++)e.data[n]=t.getModule(e.data[n].name);t.onProgress&&t.onProgress.call(t.context,{name:e.url,data:e.data})},_onFailure:function(e){var t=this.onFailure,n=[],r=0,i=e.errors.length;for(r;r<i;r++)n.push(e.errors[r].error);n=n.join(","),t&&t.call(this.context,{msg:n,data:this.data,success:!1}),this._finish(n,!1)},_onTimeout:function(e){var t=this.onTimeout;t&&t.call(this.context,{msg:"timeout",data:this.data,success:!1,transaction:e})},_sort:function(){var e=p.keys(this.required),t={},n=0,r,i,s,o,u,a,f;for(;;){r=e.length,a=!1;for(o=n;o<r;o++){i=e[o];for(u=o+1;u<r;u++){f=i+e[u];if(!t[f]&&this._requires(i,e[u])){s=e.splice(u,1),e.splice(o,0,s[0]),t[f]=!0,a=!0;break}}if(a)break;n++}if(!a)break}this.sorted=e},_insert:function(t,n,r,i){t&&this._config(t);var s=this.resolve(!i),o=this,f=0,l=0,c={},h,p;o._refetch=[],r&&(s[r===a?u:a]=[]),o.fetchCSS||(s.css=[]),s.js.length&&f++,s.css.length&&f++,p=function(t){l++;var n={},r=0,i=0,s="",u,a,p;if(t&&t.errors)for(r=0;r<t.errors.length;r++)t.errors[r].request?s=t.errors[r].request.url:s=t.errors[r],n[s]=s;if(t&&t.data&&t.data.length&&t.type==="success")for(r=0;r<t.data.length;r++){o.inserted[t.data[r].name]=!0;if(t.data[r].lang||t.data[r].skinnable)delete o.inserted[t.data[r].name],o._refetch.push(t.data[r].name)}if(l===f){o._loading=null;if(o._refetch.length){for(r=0;r<o._refetch.length;r++){h=o.getRequires(o.getModule(o._refetch[r]));for(i=0;i<h.length;i++)o.inserted[h[i]]||(c[h[i]]=h[i])}c=e.Object.keys(c);if(c.length){o.require(c),p=o.resolve(!0);if(p.cssMods.length){for(r=0;r<p.cssMods.length;r++)a=p.cssMods[r].name,delete YUI.Env._cssLoaded[a],o.isCSSLoaded(a)&&(o.inserted[a]=!0,delete o.required[a]);o.sorted=[],o._sort()}t=null,o._insert()}}t&&t.fn&&(u=t.fn,delete t.fn,u.call(o,t))}},this._loading=!0;if(!s.js.length&&!s.css.length){l=-1,p({fn:o._onSuccess});return}s.css.length&&e.Get.css(s.css,{data:s.cssMods,attributes:o.cssAttributes,insertBefore:o.insertBefore,charset:o.charset,timeout:o.timeout,context:o,onProgress:function(e){o._onProgress.call(o,e)},onTimeout:function(e){o._onTimeout.call(o,e)},onSuccess:function(e){e.type="success",e.fn=o._onSuccess,p.call(o,e)},onFailure:function(e){e.type="failure",e.fn=o._onFailure,p.call(o,e)}}),s.js.length&&e.Get.js(s.js,{data:s.jsMods,insertBefore:o.insertBefore,attributes:o.jsAttributes,charset:o.charset
,timeout:o.timeout,autopurge:!1,context:o,async:o.async,onProgress:function(e){o._onProgress.call(o,e)},onTimeout:function(e){o._onTimeout.call(o,e)},onSuccess:function(e){e.type="success",e.fn=o._onSuccess,p.call(o,e)},onFailure:function(e){e.type="failure",e.fn=o._onFailure,p.call(o,e)}})},_continue:function(){!m.running&&m.size()>0&&(m.running=!0,m.next()())},insert:function(t,n,r){var i=this,s=e.merge(this);delete s.require,delete s.dirty,m.add(function(){i._insert(s,t,n,r)}),this._continue()},loadNext:function(){return},_filter:function(e,t,n){var r=this.filter,i=t&&t in this.filters,s=i&&this.filters[t],o=n||(this.moduleInfo[t]?this.moduleInfo[t].group:null);return o&&this.groups[o]&&this.groups[o].filter&&(s=this.groups[o].filter,i=!0),e&&(i&&(r=b.isString(s)?this.FILTER_DEFS[s.toUpperCase()]||null:s),r&&(e=e.replace(new RegExp(r.searchExp,"g"),r.replaceStr))),e},_url:function(e,t,n){return this._filter((n||this.base||"")+e,t)},resolve:function(e,t){var r,s,o,f,c,h,p,d,v,m,g,y,w,E,S=[],x,T,N={},C=this,k,A,O=C.ignoreRegistered?{}:C.inserted,M={js:[],jsMods:[],css:[],cssMods:[]},_=C.loadType||"js",D;(C.skin.overrides||C.skin.defaultSkin!==l||C.ignoreRegistered)&&C._resetModules(),e&&C.calculate(),t=t||C.sorted,D=function(e){if(e){c=e.group&&C.groups[e.group]||n,c.async===!1&&(e.async=c.async),f=e.fullpath?C._filter(e.fullpath,t[s]):C._url(e.path,t[s],c.base||e.base);if(e.attributes||e.async===!1)f={url:f,async:e.async},e.attributes&&(f.attributes=e.attributes);M[e.type].push(f),M[e.type+"Mods"].push(e)}},r=t.length,y=C.comboBase,f=y,m={};for(s=0;s<r;s++){v=y,o=C.getModule(t[s]),h=o&&o.group,c=C.groups[h];if(h&&c){if(!c.combine||o.fullpath){D(o);continue}o.combine=!0,c.comboBase&&(v=c.comboBase),"root"in c&&b.isValue(c.root)&&(o.root=c.root),o.comboSep=c.comboSep||C.comboSep,o.maxURLLength=c.maxURLLength||C.maxURLLength}else if(!C.combine){D(o);continue}m[v]=m[v]||[],m[v].push(o)}for(p in m)if(m.hasOwnProperty(p)){N[p]=N[p]||{js:[],jsMods:[],css:[],cssMods:[]},f=p,g=m[p],r=g.length;if(r)for(s=0;s<r;s++){if(O[g[s]])continue;o=g[s],o&&(o.combine||!o.ext)?(N[p].comboSep=o.comboSep,N[p].group=o.group,N[p].maxURLLength=o.maxURLLength,d=(b.isValue(o.root)?o.root:C.root)+(o.path||o.fullpath),d=C._filter(d,o.name),N[p][o.type].push(d),N[p][o.type+"Mods"].push(o)):g[s]&&D(g[s])}}for(p in N)if(N.hasOwnProperty(p)){w=p,k=N[w].comboSep||C.comboSep,A=N[w].maxURLLength||C.maxURLLength;for(_ in N[w])if(_===a||_===u){E=N[w][_],g=N[w][_+"Mods"],r=E.length,x=w+E.join(k),T=x.length,A<=w.length&&(A=i);if(r)if(T>A){S=[];for(t=0;t<r;t++)S.push(E[t]),x=w+S.join(k),x.length>A&&(o=S.pop(),x=w+S.join(k),M[_].push(C._filter(x,null,N[w].group)),S=[],o&&S.push(o));S.length&&(x=w+S.join(k),M[_].push(C._filter(x,null,N[w].group)))}else M[_].push(C._filter(x,null,N[w].group));M[_+"Mods"]=M[_+"Mods"].concat(g)}}return N=null,M},load:function(e){if(!e)return;var t=this,n=t.resolve(!0);t.data=n,t.onEnd=function(){e.apply(t.context||t,arguments)},t.insert()}}},"3.11.0",{requires:["get","features"]}),YUI.add("loader-rollup",function(e,t){e.Loader.prototype._rollup=function(){var e,t,n,r,i=this.required,s,o=this.moduleInfo,u,a,f;if(this.dirty||!this.rollups){this.rollups={};for(e in o)o.hasOwnProperty(e)&&(n=this.getModule(e),n&&n.rollup&&(this.rollups[e]=n))}for(;;){u=!1;for(e in this.rollups)if(this.rollups.hasOwnProperty(e)&&!i[e]&&(!this.loaded[e]||this.forceMap[e])){n=this.getModule(e),r=n.supersedes||[],s=!1;if(!n.rollup)continue;a=0;for(t=0;t<r.length;t++){f=o[r[t]];if(this.loaded[r[t]]&&!this.forceMap[r[t]]){s=!1;break}if(i[r[t]]&&n.type===f.type){a++,s=a>=n.rollup;if(s)break}}s&&(i[e]=!0,u=!0,this.getRequires(n))}if(!u)break}}},"3.11.0",{requires:["loader-base"]}),YUI.add("loader-yui3",function(e,t){YUI.Env[e.version].modules=YUI.Env[e.version].modules||{},e.mix(YUI.Env[e.version].modules,{"align-plugin":{requires:["node-screen","node-pluginhost"]},anim:{use:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"]},"anim-base":{requires:["base-base","node-style"]},"anim-color":{requires:["anim-base"]},"anim-curve":{requires:["anim-xy"]},"anim-easing":{requires:["anim-base"]},"anim-node-plugin":{requires:["node-pluginhost","anim-base"]},"anim-scroll":{requires:["anim-base"]},"anim-shape":{requires:["anim-base","anim-easing","anim-color","matrix"]},"anim-shape-transform":{use:["anim-shape"]},"anim-xy":{requires:["anim-base","node-screen"]},app:{use:["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","router","view","view-node-map"]},"app-base":{requires:["classnamemanager","pjax-base","router","view"]},"app-content":{requires:["app-base","pjax-content"]},"app-transitions":{requires:["app-base"]},"app-transitions-css":{type:"css"},"app-transitions-native":{condition:{name:"app-transitions-native",test:function(e){var t=e.config.doc,n=t?t.documentElement:null;return n&&n.style?"MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style:!1},trigger:"app-transitions"},requires:["app-transitions","app-transitions-css","parallel","transition"]},"array-extras":{requires:["yui-base"]},"array-invoke":{requires:["yui-base"]},arraylist:{requires:["yui-base"]},"arraylist-add":{requires:["arraylist"]},"arraylist-filter":{requires:["arraylist"]},arraysort:{requires:["yui-base"]},"async-queue":{requires:["event-custom"]},attribute:{use:["attribute-base","attribute-complex"]},"attribute-base":{requires:["attribute-core","attribute-observable","attribute-extras"]},"attribute-complex":{requires:["attribute-base"]},"attribute-core":{requires:["oop"]},"attribute-events":{use:["attribute-observable"]},"attribute-extras":{requires:["oop"]},"attribute-observable":{requires:["event-custom"]},autocomplete:{use:["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"]},"autocomplete-base":{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-filters"
:{requires:["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{requires:["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{requires:["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{requires:["array-extras","highlight-accentfold"]},"autocomplete-list":{after:["autocomplete-sources"],lang:["en","es","hu","it"],requires:["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],skinnable:!0},"autocomplete-list-keys":{condition:{name:"autocomplete-list-keys",test:function(e){return!e.UA.ios&&!e.UA.android},trigger:"autocomplete-list"},requires:["autocomplete-list","base-build"]},"autocomplete-plugin":{requires:["autocomplete-list","node-pluginhost"]},"autocomplete-sources":{optional:["io-base","json-parse","jsonp","yql"],requires:["autocomplete-base"]},axes:{use:["axis-numeric","axis-category","axis-time","axis-stacked"]},"axes-base":{use:["axis-numeric-base","axis-category-base","axis-time-base","axis-stacked-base"]},axis:{requires:["dom","widget","widget-position","widget-stack","graphics","axis-base"]},"axis-base":{requires:["classnamemanager","datatype-number","datatype-date","base","event-custom"]},"axis-category":{requires:["axis","axis-category-base"]},"axis-category-base":{requires:["axis-base"]},"axis-numeric":{requires:["axis","axis-numeric-base"]},"axis-numeric-base":{requires:["axis-base"]},"axis-stacked":{requires:["axis-numeric","axis-stacked-base"]},"axis-stacked-base":{requires:["axis-numeric-base"]},"axis-time":{requires:["axis","axis-time-base"]},"axis-time-base":{requires:["axis-base"]},base:{use:["base-base","base-pluginhost","base-build"]},"base-base":{requires:["attribute-base","base-core","base-observable"]},"base-build":{requires:["base-base"]},"base-core":{requires:["attribute-core"]},"base-observable":{requires:["attribute-observable"]},"base-pluginhost":{requires:["base-base","pluginhost"]},button:{requires:["button-core","cssbutton","widget"]},"button-core":{requires:["attribute-core","classnamemanager","node-base"]},"button-group":{requires:["button-plugin","cssbutton","widget"]},"button-plugin":{requires:["button-core","cssbutton","node-pluginhost"]},cache:{use:["cache-base","cache-offline","cache-plugin"]},"cache-base":{requires:["base"]},"cache-offline":{requires:["cache-base","json"]},"cache-plugin":{requires:["plugin","cache-base"]},calendar:{requires:["calendar-base","calendarnavigator"],skinnable:!0},"calendar-base":{lang:["de","en","es","es-AR","fr","hu","it","ja","nb-NO","nl","pt-BR","ru","zh-HANT-TW"],requires:["widget","datatype-date","datatype-date-math","cssgrids"],skinnable:!0},calendarnavigator:{requires:["plugin","classnamemanager","datatype-date","node"],skinnable:!0},charts:{use:["charts-base"]},"charts-base":{requires:["dom","event-mouseenter","event-touch","graphics-group","axes","series-pie","series-line","series-marker","series-area","series-spline","series-column","series-bar","series-areaspline","series-combo","series-combospline","series-line-stacked","series-marker-stacked","series-area-stacked","series-spline-stacked","series-column-stacked","series-bar-stacked","series-areaspline-stacked","series-combo-stacked","series-combospline-stacked"]},"charts-legend":{requires:["charts-base"]},classnamemanager:{requires:["yui-base"]},"clickable-rail":{requires:["slider-base"]},collection:{use:["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"]},color:{use:["color-base","color-hsl","color-harmony"]},"color-base":{requires:["yui-base"]},"color-harmony":{requires:["color-hsl"]},"color-hsl":{requires:["color-base"]},"color-hsv":{requires:["color-base"]},console:{lang:["en","es","hu","it","ja"],requires:["yui-log","widget"],skinnable:!0},"console-filters":{requires:["plugin","console"],skinnable:!0},controller:{use:["router"]},cookie:{requires:["yui-base"]},"createlink-base":{requires:["editor-base"]},cssbase:{after:["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],type:"css"},"cssbase-context":{after:["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],type:"css"},cssbutton:{type:"css"},cssfonts:{type:"css"},"cssfonts-context":{type:"css"},cssgrids:{optional:["cssnormalize"],type:"css"},"cssgrids-base":{optional:["cssnormalize"],type:"css"},"cssgrids-responsive":{optional:["cssnormalize"],requires:["cssgrids","cssgrids-responsive-base"],type:"css"},"cssgrids-units":{optional:["cssnormalize"],requires:["cssgrids-base"],type:"css"},cssnormalize:{type:"css"},"cssnormalize-context":{type:"css"},cssreset:{type:"css"},"cssreset-context":{type:"css"},dataschema:{use:["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"]},"dataschema-array":{requires:["dataschema-base"]},"dataschema-base":{requires:["base"]},"dataschema-json":{requires:["dataschema-base","json"]},"dataschema-text":{requires:["dataschema-base"]},"dataschema-xml":{requires:["dataschema-base"]},datasource:{use:["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"]},"datasource-arrayschema":{requires:["datasource-local","plugin","dataschema-array"]},"datasource-cache":{requires:["datasource-local","plugin","cache-base"]},"datasource-function":{requires:["datasource-local"]},"datasource-get":{requires:["datasource-local","get"]},"datasource-io":{requires:["datasource-local","io-base"]},"datasource-jsonschema":{requires:["datasource-local","plugin","dataschema-json"]},"datasource-local":{requires:["base"]},"datasource-polling":{requires:["datasource-local"]},"datasource-textschema":{requires:["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{requires:["datasource-local","plugin","datatype-xml","dataschema-xml"]},datatable:{use:["datatable-core"
,"datatable-table","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"]},"datatable-base":{requires:["datatable-core","datatable-table","datatable-head","datatable-body","base-build","widget"],skinnable:!0},"datatable-body":{requires:["datatable-core","view","classnamemanager"]},"datatable-column-widths":{requires:["datatable-base"]},"datatable-core":{requires:["escape","model-list","node-event-delegate"]},"datatable-datasource":{requires:["datatable-base","plugin","datasource-local"]},"datatable-foot":{requires:["datatable-core","view"]},"datatable-formatters":{requires:["datatable-body","datatype-number-format","datatype-date-format","escape"]},"datatable-head":{requires:["datatable-core","view","classnamemanager"]},"datatable-message":{lang:["en","fr","es","hu","it"],requires:["datatable-base"],skinnable:!0},"datatable-mutable":{requires:["datatable-base"]},"datatable-paginator":{lang:["en"],requires:["model","view","paginator-core","datatable-foot","datatable-paginator-templates"],skinnable:!0},"datatable-paginator-templates":{requires:["template"]},"datatable-scroll":{requires:["datatable-base","datatable-column-widths","dom-screen"],skinnable:!0},"datatable-sort":{lang:["en","fr","es","hu"],requires:["datatable-base"],skinnable:!0},"datatable-table":{requires:["datatable-core","datatable-head","datatable-body","view","classnamemanager"]},datatype:{use:["datatype-date","datatype-number","datatype-xml"]},"datatype-date":{use:["datatype-date-parse","datatype-date-format","datatype-date-math"]},"datatype-date-format":{lang:["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","hu","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]},"datatype-date-math":{requires:["yui-base"]},"datatype-date-parse":{},"datatype-number":{use:["datatype-number-parse","datatype-number-format"]},"datatype-number-format":{},"datatype-number-parse":{},"datatype-xml":{use:["datatype-xml-parse","datatype-xml-format"]},"datatype-xml-format":{},"datatype-xml-parse":{},dd:{use:["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"]},"dd-constrain":{requires:["dd-drag"]},"dd-ddm":{requires:["dd-ddm-base","event-resize"]},"dd-ddm-base":{requires:["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{requires:["dd-ddm"]},"dd-delegate":{requires:["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{requires:["dd-ddm-base"]},"dd-drop":{requires:["dd-drag","dd-ddm-drop"]},"dd-drop-plugin":{requires:["dd-drop"]},"dd-gestures":{condition:{name:"dd-gestures",trigger:"dd-drag",ua:"touchEnabled"},requires:["dd-drag","event-synthetic","event-gestures"]},"dd-plugin":{optional:["dd-constrain","dd-proxy"],requires:["dd-drag"]},"dd-proxy":{requires:["dd-drag"]},"dd-scroll":{requires:["dd-drag"]},dial:{lang:["en","es","hu"],requires:["widget","dd-drag","event-mouseenter","event-move","event-key","transition","intl"],skinnable:!0},dom:{use:["dom-base","dom-screen","dom-style","selector-native","selector"]},"dom-base":{requires:["dom-core"]},"dom-core":{requires:["oop","features"]},"dom-deprecated":{requires:["dom-base"]},"dom-screen":{requires:["dom-base","dom-style"]},"dom-style":{requires:["dom-base","color-base"]},"dom-style-ie":{condition:{name:"dom-style-ie",test:function(e){var t=e.Features.test,n=e.Features.add,r=e.config.win,i=e.config.doc,s="documentElement",o=!1;return n("style","computedStyle",{test:function(){return r&&"getComputedStyle"in r}}),n("style","opacity",{test:function(){return i&&"opacity"in i[s].style}}),o=!t("style","opacity")&&!t("style","computedStyle"),o},trigger:"dom-style"},requires:["dom-style"]},dump:{requires:["yui-base"]},editor:{use:["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"]},"editor-base":{requires:["base","frame","node","exec-command","editor-selection"]},"editor-bidi":{requires:["editor-base"]},"editor-br":{requires:["editor-base"]},"editor-lists":{requires:["editor-base"]},"editor-para":{requires:["editor-para-base"]},"editor-para-base":{requires:["editor-base"]},"editor-para-ie":{condition:{name:"editor-para-ie",trigger:"editor-para",ua:"ie",when:"instead"},requires:["editor-para-base"]},"editor-selection":{requires:["node"]},"editor-tab":{requires:["editor-base"]},escape:{requires:["yui-base"]},event:{after:["node-base"],use:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange","event-tap"]},"event-base":{after:["node-base"],requires:["event-custom-base"]},"event-base-ie":{after:["event-base"],condition:{name:"event-base-ie",test:function(e){var t=e.config.doc&&e.config.doc.implementation;return t&&!t.hasFeature("Events","2.0")},trigger:"node-base"},requires:["node-base"]},"event-contextmenu":{requires:["event-synthetic","dom-screen"]},"event-custom":{use:["event-custom-base","event-custom-complex"]},"event-custom-base":{requires:["oop"]},"event-custom-complex":{requires:["event-custom-base"]},"event-delegate":{requires:["node-base"]},"event-flick":{requires:["node-base","event-touch","event-synthetic"]},"event-focus":{requires:["event-synthetic"]},"event-gestures":{use:["event-flick","event-move"]},"event-hover":{requires:["event-mouseenter"]},"event-key":{requires:["event-synthetic"]},"event-mouseenter"
:{requires:["event-synthetic"]},"event-mousewheel":{requires:["node-base"]},"event-move":{requires:["node-base","event-touch","event-synthetic"]},"event-outside":{requires:["event-synthetic"]},"event-resize":{requires:["node-base","event-synthetic"]},"event-simulate":{requires:["event-base"]},"event-synthetic":{requires:["node-base","event-custom-complex"]},"event-tap":{requires:["node-base","event-base","event-touch","event-synthetic"]},"event-touch":{requires:["node-base"]},"event-valuechange":{requires:["event-focus","event-synthetic"]},"exec-command":{requires:["frame"]},features:{requires:["yui-base"]},file:{requires:["file-flash","file-html5"]},"file-flash":{requires:["base"]},"file-html5":{requires:["base"]},frame:{requires:["base","node","selector-css3","yui-throttle"]},"gesture-simulate":{requires:["async-queue","event-simulate","node-screen"]},get:{requires:["yui-base"]},graphics:{requires:["node","event-custom","pluginhost","matrix","classnamemanager"]},"graphics-canvas":{condition:{name:"graphics-canvas",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"},requires:["graphics"]},"graphics-canvas-default":{condition:{name:"graphics-canvas-default",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"}},"graphics-group":{requires:["graphics"]},"graphics-svg":{condition:{name:"graphics-svg",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"},requires:["graphics"]},"graphics-svg-default":{condition:{name:"graphics-svg-default",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"}},"graphics-vml":{condition:{name:"graphics-vml",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"},requires:["graphics"]},"graphics-vml-default":{condition:{name:"graphics-vml-default",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"}},handlebars:{use:["handlebars-compiler"]},"handlebars-base":{requires:[]},"handlebars-compiler":{requires:["handlebars-base"]},highlight:{use:["highlight-base","highlight-accentfold"]},"highlight-accentfold":{requires:["highlight-base","text-accentfold"]},"highlight-base":{requires:["array-extras","classnamemanager","escape","text-wordbreak"]},history:{use:["history-base","history-hash","history-hash-ie","history-html5"]},"history-base":{requires:["event-custom-complex"]},"history-hash":{after:["history-html5"],requires:["event-synthetic","history-base","yui-later"]},"history-hash-ie":{condition:{name:"history-hash-ie",test:function(e){var t=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange"in e.config.win)||!t||t<8)},trigger:"history-hash"},requires:["history-hash","node-base"]},"history-html5":{optional:["json"],requires:["event-base","history-base","node-base"]},imageloader:{requires:["base-base","node-style","node-screen"]},intl:{requires:["intl-base","event-custom"]},"intl-base":{requires:["yui-base"]},io:{use:["io-base","io-xdr","io-form","io-upload-iframe","io-queue"]},"io-base":{requires:["event-custom-base","querystring-stringify-simple"]},"io-form":{requires:["io-base","node-base"]},"io-nodejs":{condition:{name:"io-nodejs",trigger:"io-base",ua:"nodejs"},requires:["io-base"]},"io-queue":{requires:["io-base","queue-promote"]},"io-upload-iframe":{requires:["io-base","node-base"]},"io-xdr":{requires:["io-base","datatype-xml-parse"]},json:{use:["json-parse","json-stringify"]},"json-parse":{requires:["yui-base"]},"json-parse-shim":{condition:{name:"json-parse-shim",test:function(e){function i(e,t){return e==="ok"?!0:t}var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONParse!==!1&&!!n;if(r)try{r=n.parse('{"ok":false}',i).ok}catch(s){r=!1}return!r},trigger:"json-parse"},requires:["json-parse"]},"json-stringify":{requires:["yui-base"]},"json-stringify-shim":{condition:{name:"json-stringify-shim",test:function(e){var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONStringify!==!1&&!!n;if(r)try{r="0"===n.stringify(0)}catch(i){r=!1}return!r},trigger:"json-stringify"},requires:["json-stringify"]},jsonp:{requires:["get","oop"]},"jsonp-url":{requires:["jsonp"]},"lazy-model-list":{requires:["model-list"]},loader:{use:["loader-base","loader-rollup","loader-yui3"]},"loader-base":{requires:["get","features"]},"loader-rollup":{requires:["loader-base"]},"loader-yui3":{requires:["loader-base"]},matrix:{requires:["yui-base"]},model:{requires:["base-build","escape","json-parse"]},"model-list":{requires:["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]},"model-sync-rest":{requires:["model","io-base","json-stringify"]},node:{use:["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"]},"node-base":{requires:["event-base","node-core"
,"dom-base"]},"node-core":{requires:["dom-core","selector"]},"node-deprecated":{requires:["node-base"]},"node-event-delegate":{requires:["node-base","event-delegate"]},"node-event-html5":{requires:["node-base"]},"node-event-simulate":{requires:["node-base","event-simulate","gesture-simulate"]},"node-flick":{requires:["classnamemanager","transition","event-flick","plugin"],skinnable:!0},"node-focusmanager":{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-load":{requires:["node-base","io-base"]},"node-menunav":{requires:["node","classnamemanager","plugin","node-focusmanager"],skinnable:!0},"node-pluginhost":{requires:["node-base","pluginhost"]},"node-screen":{requires:["dom-screen","node-base"]},"node-scroll-info":{requires:["array-extras","base-build","event-resize","node-pluginhost","plugin","selector"]},"node-style":{requires:["dom-style","node-base"]},oop:{requires:["yui-base"]},overlay:{requires:["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],skinnable:!0},paginator:{requires:["paginator-core"]},"paginator-core":{requires:["base"]},"paginator-url":{requires:["paginator"]},panel:{requires:["widget","widget-autohide","widget-buttons","widget-modality","widget-position","widget-position-align","widget-position-constrain","widget-stack","widget-stdmod"],skinnable:!0},parallel:{requires:["yui-base"]},pjax:{requires:["pjax-base","pjax-content"]},"pjax-base":{requires:["classnamemanager","node-event-delegate","router"]},"pjax-content":{requires:["io-base","node-base","router"]},"pjax-plugin":{requires:["node-pluginhost","pjax","plugin"]},plugin:{requires:["base-base"]},pluginhost:{use:["pluginhost-base","pluginhost-config"]},"pluginhost-base":{requires:["yui-base"]},"pluginhost-config":{requires:["pluginhost-base"]},promise:{requires:["timers"]},querystring:{use:["querystring-parse","querystring-stringify"]},"querystring-parse":{requires:["yui-base","array-extras"]},"querystring-parse-simple":{requires:["yui-base"]},"querystring-stringify":{requires:["yui-base"]},"querystring-stringify-simple":{requires:["yui-base"]},"queue-promote":{requires:["yui-base"]},"range-slider":{requires:["slider-base","slider-value-range","clickable-rail"]},recordset:{use:["recordset-base","recordset-sort","recordset-filter","recordset-indexer"]},"recordset-base":{requires:["base","arraylist"]},"recordset-filter":{requires:["recordset-base","array-extras","plugin"]},"recordset-indexer":{requires:["recordset-base","plugin"]},"recordset-sort":{requires:["arraysort","recordset-base","plugin"]},resize:{use:["resize-base","resize-proxy","resize-constrain"]},"resize-base":{requires:["base","widget","event","oop","dd-drag","dd-delegate","dd-drop"],skinnable:!0},"resize-constrain":{requires:["plugin","resize-base"]},"resize-plugin":{optional:["resize-constrain"],requires:["resize-base","plugin"]},"resize-proxy":{requires:["plugin","resize-base"]},router:{optional:["querystring-parse"],requires:["array-extras","base-build","history"]},scrollview:{requires:["scrollview-base","scrollview-scrollbars"]},"scrollview-base":{requires:["widget","event-gestures","event-mousewheel","transition"],skinnable:!0},"scrollview-base-ie":{condition:{name:"scrollview-base-ie",trigger:"scrollview-base",ua:"ie"},requires:["scrollview-base"]},"scrollview-list":{requires:["plugin","classnamemanager"],skinnable:!0},"scrollview-paginator":{requires:["plugin","classnamemanager"]},"scrollview-scrollbars":{requires:["classnamemanager","transition","plugin"],skinnable:!0},selector:{requires:["selector-native"]},"selector-css2":{condition:{name:"selector-css2",test:function(e){var t=e.config.doc,n=t&&!("querySelectorAll"in t);return n},trigger:"selector"},requires:["selector-native"]},"selector-css3":{requires:["selector-native","selector-css2"]},"selector-native":{requires:["dom-base"]},"series-area":{requires:["series-cartesian","series-fill-util"]},"series-area-stacked":{requires:["series-stacked","series-area"]},"series-areaspline":{requires:["series-area","series-curve-util"]},"series-areaspline-stacked":{requires:["series-stacked","series-areaspline"]},"series-bar":{requires:["series-marker","series-histogram-base"]},"series-bar-stacked":{requires:["series-stacked","series-bar"]},"series-base":{requires:["graphics","axis-base"]},"series-candlestick":{requires:["series-range"]},"series-cartesian":{requires:["series-base"]},"series-column":{requires:["series-marker","series-histogram-base"]},"series-column-stacked":{requires:["series-stacked","series-column"]},"series-combo":{requires:["series-cartesian","series-line-util","series-plot-util","series-fill-util"]},"series-combo-stacked":{requires:["series-stacked","series-combo"]},"series-combospline":{requires:["series-combo","series-curve-util"]},"series-combospline-stacked":{requires:["series-combo-stacked","series-curve-util"]},"series-curve-util":{},"series-fill-util":{},"series-histogram-base":{requires:["series-cartesian","series-plot-util"]},"series-line":{requires:["series-cartesian","series-line-util"]},"series-line-stacked":{requires:["series-stacked","series-line"]},"series-line-util":{},"series-marker":{requires:["series-cartesian","series-plot-util"]},"series-marker-stacked":{requires:["series-stacked","series-marker"]},"series-ohlc":{requires:["series-range"]},"series-pie":{requires:["series-base","series-plot-util"]},"series-plot-util":{},"series-range":{requires:["series-cartesian"]},"series-spline":{requires:["series-line","series-curve-util"]},"series-spline-stacked":{requires:["series-stacked","series-spline"]},"series-stacked":{requires:["axis-stacked"]},"shim-plugin":{requires:["node-style","node-pluginhost"]},slider:{use:["slider-base","slider-value-range","clickable-rail","range-slider"]},"slider-base":{requires:["widget","dd-constrain","event-key"],skinnable:!0},"slider-value-range":{requires:["slider-base"]},sortable:{requires:["dd-delegate","dd-drop-plugin","dd-proxy"
]},"sortable-scroll":{requires:["dd-scroll","sortable"]},stylesheet:{requires:["yui-base"]},substitute:{optional:["dump"],requires:["yui-base"]},swf:{requires:["event-custom","node","swfdetect","escape"]},swfdetect:{requires:["yui-base"]},tabview:{requires:["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],skinnable:!0},"tabview-base":{requires:["node-event-delegate","classnamemanager"]},"tabview-plugin":{requires:["tabview-base"]},template:{use:["template-base","template-micro"]},"template-base":{requires:["yui-base"]},"template-micro":{requires:["escape"]},test:{requires:["event-simulate","event-custom","json-stringify"]},"test-console":{requires:["console-filters","test","array-extras"],skinnable:!0},text:{use:["text-accentfold","text-wordbreak"]},"text-accentfold":{requires:["array-extras","text-data-accentfold"]},"text-data-accentfold":{requires:["yui-base"]},"text-data-wordbreak":{requires:["yui-base"]},"text-wordbreak":{requires:["array-extras","text-data-wordbreak"]},timers:{requires:["yui-base"]},transition:{requires:["node-style"]},"transition-timer":{condition:{name:"transition-timer",test:function(e){var t=e.config.doc,n=t?t.documentElement:null,r=!0;return n&&n.style&&(r=!("MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style)),r},trigger:"transition"},requires:["transition"]},tree:{requires:["base-build","tree-node"]},"tree-labelable":{requires:["tree"]},"tree-lazy":{requires:["base-pluginhost","plugin","tree"]},"tree-node":{},"tree-openable":{requires:["tree"]},"tree-selectable":{requires:["tree"]},"tree-sortable":{requires:["tree"]},uploader:{requires:["uploader-html5","uploader-flash"]},"uploader-flash":{requires:["swf","widget","base","cssbutton","node","event-custom","file-flash","uploader-queue"]},"uploader-html5":{requires:["widget","node-event-simulate","file-html5","uploader-queue"]},"uploader-queue":{requires:["base"]},view:{requires:["base-build","node-event-delegate"]},"view-node-map":{requires:["view"]},widget:{use:["widget-base","widget-htmlparser","widget-skin","widget-uievents"]},"widget-anim":{requires:["anim-base","plugin","widget"]},"widget-autohide":{requires:["base-build","event-key","event-outside","widget"]},"widget-base":{requires:["attribute","base-base","base-pluginhost","classnamemanager","event-focus","node-base","node-style"],skinnable:!0},"widget-base-ie":{condition:{name:"widget-base-ie",trigger:"widget-base",ua:"ie"},requires:["widget-base"]},"widget-buttons":{requires:["button-plugin","cssbutton","widget-stdmod"]},"widget-child":{requires:["base-build","widget"]},"widget-htmlparser":{requires:["widget-base"]},"widget-locale":{requires:["widget-base"]},"widget-modality":{requires:["base-build","event-outside","widget"],skinnable:!0},"widget-parent":{requires:["arraylist","base-build","widget"]},"widget-position":{requires:["base-build","node-screen","widget"]},"widget-position-align":{requires:["widget-position"]},"widget-position-constrain":{requires:["widget-position"]},"widget-skin":{requires:["widget-base"]},"widget-stack":{requires:["base-build","widget"],skinnable:!0},"widget-stdmod":{requires:["base-build","widget"]},"widget-uievents":{requires:["node-event-delegate","widget-base"]},yql:{requires:["oop"]},"yql-jsonp":{condition:{name:"yql-jsonp",test:function(e){return!e.UA.nodejs&&!e.UA.winjs},trigger:"yql",when:"after"},requires:["jsonp","jsonp-url"]},"yql-nodejs":{condition:{name:"yql-nodejs",trigger:"yql",ua:"nodejs",when:"after"}},"yql-winjs":{condition:{name:"yql-winjs",trigger:"yql",ua:"winjs",when:"after"}},yui:{},"yui-base":{},"yui-later":{requires:["yui-base"]},"yui-log":{requires:["yui-base"]},"yui-throttle":{requires:["yui-base"]}}),YUI.Env[e.version].md5="b48f48e0499b41d980deaefd4100d336"},"3.11.0",{requires:["loader-base"]}),YUI.add("yui",function(e,t){},"3.11.0",{use:["yui-base","get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"]});
