if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};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(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B0){A=H[0];}try{F=L.fn.call(K,A,L.obj);}catch(E){this.lastError=E;}}else{try{F=L.fn.call(K,this.type,H,L.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}if(I){var J=[],B=this.subscribers;for(C=0,D=B.length;C=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O0);}var O=[];var Q=function(S,T){var R=S;if(T.override){if(T.override===true){R=T.obj;}else{R=T.override;}}T.fn.call(R,T.obj);};var L,K,N,M;for(L=0,K=F.length;L0){for(var Q=0,S=T.length;Q0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M);}N--;}L=null;}G=null;Q._simpleRemove(window,"unload",Q._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);A._dri=setInterval(function(){var C=document.createElement("p");try{C.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();C=null;}catch(B){C=null;}},A.POLL_INTERVAL);}else{if(A.webkit){A._dri=setInterval(function(){var B=document.readyState;if("loaded"==B||"complete"==B){clearInterval(A._dri);A._dri=null;A._ready();}},A.POLL_INTERVAL);}else{A._simpleAdd(document,"DOMContentLoaded",A._ready);}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C0)?C:0;}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B);},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E);}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)];}else{E=0;}return E;},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined");};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false;}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"];}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0&&!(K[0]instanceof Array)){K=[K];}else{var J=[];for(L=0,N=K.length;L0){this.runtimeAttributes[O]=this.runtimeAttributes[O].concat(K);}this.runtimeAttributes[O][this.runtimeAttributes[O].length]=H;}else{E.setRuntimeAttribute.call(this,O);}};var A=function(F,H){var G=D.Dom.getXY(this.getEl());F=[F[0]-G[0]+H[0],F[1]-G[1]+H[1]];return F;};var C=function(F){return(typeof F!=="undefined");};})();(function(){YAHOO.util.Scroll=function(E,D,F,G){if(E){YAHOO.util.Scroll.superclass.constructor.call(this,E,D,F,G);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var B=YAHOO.util;var C=B.Scroll.superclass;var A=B.Scroll.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("Scroll "+E);};A.doMethod=function(D,G,E){var F=null;if(D=="scroll"){F=[this.method(this.currentFrame,G[0],E[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],E[1]-G[1],this.totalFrames)];}else{F=C.doMethod.call(this,D,G,E);}return F;};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop];}else{F=C.getAttribute.call(this,D);}return F;};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1];}else{C.setAttribute.call(this,D,G,F);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.4.1",build:"742"});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(B){var A=YAHOO.util.Event.getTarget(B);if(A.type&&A.type.toLowerCase()=="submit"){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.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(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E};}catch(C){for(var B=0;B=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G.success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E");if(typeof A=="boolean"){C.src="javascript:false";}else{if(typeof secureURI=="string"){C.src=A;}}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C0){for(var G=0;G=0?L.substr(M+1):null;}function A(){var M,N,O=[],L=[];for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){N=D[M];O.push(M+"="+N.initialState);L.push(M+"="+N.currentState);}}K.value=O.join("&")+"|"+L.join("&");if(YAHOO.env.ua.webkit){K.value+="|"+B.join(",");}}function H(L){var Q,R,M,O,P,T,S,N;if(!L){for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){O=D[M];O.currentState=O.initialState;O.onStateChange(unescape(O.currentState));}}return;}P=[];T=L.split("&");for(Q=0,R=T.length;Q"+O+"";try{N=C.contentWindow.document;N.open();N.write(L);N.close();return true;}catch(M){return false;}}function G(){var O,L,N,M;if(!C.contentWindow||!C.contentWindow.document){setTimeout(G,10);return;}O=C.contentWindow.document;L=O.getElementById("state");N=L?L.innerText:null;M=I();setInterval(function(){var U,Q,R,S,T,P;O=C.contentWindow.document;L=O.getElementById("state");U=L?L.innerText:null;T=I();if(U!==N){N=U;H(N);if(!N){Q=[];for(R in D){if(YAHOO.lang.hasOwnProperty(D,R)){S=D[R];Q.push(R+"="+S.initialState);}}T=Q.join("&");}else{T=N;}top.location.hash=T;M=T;A();}else{if(T!==M){M=T;J(T);}}},50);F=true;YAHOO.util.History.onLoadEvent.fire();}function E(){var S,U,Q,W,M,O,V,P,T,N,L,R;Q=K.value.split("|");if(Q.length>1){V=Q[0].split("&");for(S=0,U=V.length;S=2){M=W[0];N=W[1];O=D[M];if(O){O.currentState=N;}}}}if(Q.length>2){B=Q[2].split(",");}if(YAHOO.env.ua.ie){G();}else{L=history.length;R=I();setInterval(function(){var Z,X,Y;X=I();Y=history.length;if(X!==R){R=X;L=Y;H(R);A();}else{if(Y!==L&&YAHOO.env.ua.webkit){R=X;L=Y;Z=B[L-1];H(Z);A();}}},50);F=true;YAHOO.util.History.onLoadEvent.fire();}}return{onLoadEvent:new YAHOO.util.CustomEvent("onLoad"),onReady:function(M,N,L){if(F){setTimeout(function(){var O=window;if(L){if(L===true){O=N;}else{O=L;}}M.call(O,"onLoad",[],N);},0);}else{YAHOO.util.History.onLoadEvent.subscribe(M,N,L);}},register:function(O,L,Q,R,N){var P,M;if(typeof O!=="string"||YAHOO.lang.trim(O)===""||typeof L!=="string"||typeof Q!=="function"){throw new Error("Missing or invalid argument");}if(D[O]){return;}if(F){throw new Error("All modules must be registered before calling YAHOO.util.History.initialize");}O=escape(O);L=escape(L);P=null;if(N===true){P=R;}else{P=N;}M=function(S){return Q.call(P,S,R);};D[O]={name:O,initialState:L,currentState:L,onStateChange:M};},initialize:function(L,M){if(F){return;}if(YAHOO.env.ua.opera){throw new Error("Unsupported browser");}if(typeof L==="string"){L=document.getElementById(L);}if(!L||L.tagName!=="TEXTAREA"&&(L.tagName!=="INPUT"||L.type!=="hidden"&&L.type!=="text")){throw new Error("Missing or invalid argument");}K=L;if(YAHOO.env.ua.ie){if(typeof M==="string"){M=document.getElementById(M);}if(!M||M.tagName!=="IFRAME"){throw new Error("Missing or invalid argument");}C=M;}YAHOO.util.Event.onDOMReady(E);},navigate:function(M,N){var L;if(typeof M!=="string"||typeof N!=="string"){throw new Error("Missing or invalid argument");}L={};L[M]=N;return YAHOO.util.History.multiNavigate(L);},multiNavigate:function(M){var L,N,P,O,Q;if(typeof M!=="object"){throw new Error("Missing or invalid argument");}if(!F){throw new Error("The Browser History Manager is not initialized");}for(N in M){if(!D[N]){throw new Error("The following module has not been registered: "+N);}}L=[];for(N in D){if(YAHOO.lang.hasOwnProperty(D,N)){P=D[N];if(YAHOO.lang.hasOwnProperty(M,N)){O=M[N];}else{O=P.currentState;}N=escape(N);O=escape(O);L.push(N+"="+O);}}Q=L.join("&");if(YAHOO.env.ua.ie){return J(Q);}else{top.location.hash=Q;if(YAHOO.env.ua.webkit){B[history.length]=Q;A();}return true;}},getCurrentState:function(L){var M;if(typeof L!=="string"){throw new Error("Missing or invalid argument");}if(!F){throw new Error("The Browser History Manager is not initialized");}M=D[L];if(!M){throw new Error("No such registered module: "+L);}return unescape(M.currentState);},getBookmarkedState:function(Q){var P,M,L,S,N,R,O;if(typeof Q!=="string"){throw new Error("Missing or invalid argument");}L=top.location.href.indexOf("#");S=L>=0?top.location.href.substr(L+1):top.location.href;N=S.split("&");for(P=0,M=N.length;P=0?N.substr(L+1):N;L=S.lastIndexOf("#");S=L>=0?S.substr(0,L):S;R=S.split("&");for(O=0,M=R.length;O=2){if(P[0]===Q){return unescape(P[1]);}}}return null;}};})();YAHOO.register("history",YAHOO.util.History,{version:"2.4.1",build:"742"});if(typeof YAHOO==="undefined")var YAHOO={};if(typeof YAHOO.ads==="undefined")YAHOO.ads={};YAHOO.ads.darla={_isSafari:navigator.userAgent.match(/AppleWebKit\/([^ ]*)/),_isIE:(!navigator.userAgent.match(/AppleWebKit\/([^ ]*)/)&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_beacons:[],_eventTimer:null,_lastEvent:null,_handoffStore:null,_renderStore:null,_rotationTimer:null,_rotationTime:(new Date()).getTime(),_rotationEvents:false,_config:null,_baseConfig:{callFrame:"fccall",callScript:"fc.php",domainScript:"fc.php",rotation:5000,autoRotation:false,autoRotationWindow:1000,cancelShortEvents:true,doubleBuffering:true,fullDoubleBuffering:true,autoSwitchRendering:true,property:"yahoo",encoding:"utf-8",standardDelay:100,cancellableDelay:500,beaconDelay:2000,beaconUrl:"http://geo.yahoo.com/serv?s=",throbberDelay:350,simpleTemplate:""+"
"+"",simpleTemplateEncodingTag:"",simpleTemplateStyleTag:""},setConfig:function(config,initialState){YAHOO.ads.darla._config=config;if(initialState===0) YAHOO.ads.darla._config._startRotationTimer();},event:function(action,overrides){if(YAHOO.ads.darla._config==null)return;YAHOO.ads.darla.log("YAHOO.ads.darla.event called with action: "+action+"-"+YAHOO.ads.darla.lookupSpaceID(action),true);var settings=YAHOO.ads.darla.lookupActionSettings(action,overrides);if((settings.lv==-1)&&!YAHOO.ads.darla.getConfigSetting("autoRotation")) return;if(YAHOO.ads.darla._eventTimer!=null){if((YAHOO.ads.darla.getConfigSetting("cancelShortEvents")==true)||(YAHOO.ads.darla._lastEvent&&YAHOO.ads.darla._lastEvent.settings&&YAHOO.ads.darla._lastEvent.settings.ca)){clearTimeout(YAHOO.ads.darla._eventTimer);YAHOO.ads.darla._eventTimer=null;YAHOO.ads.darla.log("YAHOO.ads.darla.event: cancelling prior short-lived event",true);}} YAHOO.ads.darla.log("YAHOO.ads.darla.event firing timer for action: "+action+"-"+settings.sp,true);YAHOO.ads.darla._lastEvent={action:action,settings:settings};YAHOO.ads.darla._startEventTimer(YAHOO.ads.darla._lastEvent);},sendBeacon:function(action,delay){if(delay===true) delay=YAHOO.ads.darla.getConfigSetting("beaconDelay");if(typeof delay=="number"&&delay>0){setTimeout("YAHOO.ads.darla.sendBeacon( '"+action+"', null )",delay);return;} var spaceid=YAHOO.ads.darla.lookupSpaceID(action);if((spaceid==null)||(spaceid=="undefined")||(spaceid=="null")) return;var url=YAHOO.ads.darla._getBeaconUrl(spaceid);if(url==null||url==""){YAHOO.ads.darla.log("ignoring spaceid (no beacon url provided): "+action+"-"+spaceid,true);return;} if(YAHOO.ads.darla._beacons==null) YAHOO.ads.darla._beacons=[];var id=new Date().getTime();while(YAHOO.ads.darla._beacons["x"+id]!=null) --id;id="x"+id;var beacon=new Image();YAHOO.ads.darla._beacons[id]=beacon;beacon.onload=function(){eval("'onload'; YAHOO.ads.darla._beacons['"+id+"']=null;this.onload = null; this.onerror = null; YAHOO.ads.darla._throbberHack( true );")};beacon.onerror=function(){eval("'onerror'; YAHOO.ads.darla._beacons['"+id+"']=null;this.onload = null; this.onerror = null; YAHOO.ads.darla._throbberHack( true );")};beacon.src=url;YAHOO.ads.darla.log("beaconing spaceid: "+action+" - "+spaceid);},stallAdRequest:function(delayAmount){if((YAHOO.ads.darla._config==null)||(YAHOO.ads.darla._lastEvent==null)) return;if(delayAmount==null) delayAmount=YAHOO.ads.darla.getConfigSetting("cancellableDelay");if(delayAmount==null) return;YAHOO.ads.darla._startEventTimer(YAHOO.ads.darla._lastEvent,delayAmount);YAHOO.ads.darla.log("Stalling outstanding ad event",true);},lookupSpaceID:function(action,getRawID){if(YAHOO.ads.darla._config==null)return null;var rec=YAHOO.ads.darla._config.events[action];if(rec==null)return null;var sid=rec.sp;if(getRawID)return sid;if(sid==null)return null;if(YAHOO.ads.darla._config.spaceIdOffset==null) YAHOO.ads.darla._config.spaceIdOffset=0;return((sid-0)+(YAHOO.ads.darla._config.spaceIdOffset-0));},lookupActionSettings:function(action,overrides){if(YAHOO.ads.darla._config==null)return overrides;var results={};var rec=YAHOO.ads.darla._config.events["default"];if(rec!=null){for(var f in rec) results[f]=rec[f];} var rec=YAHOO.ads.darla._config.events[action];if(rec!=null){for(var f in rec) results[f]=rec[f];} if(overrides!=null) for(var f in overrides) results[f]=overrides[f];results.sp=YAHOO.ads.darla.lookupSpaceID(action);if(YAHOO.ads.darla._config.levelOverride!=null) results.lv=YAHOO.ads.darla._config.levelOverride;if(YAHOO.ads.darla._config.events[action]==-1) result.lv=-1;var ps=results.ps;if(ps!=null){var psStr="";var psa=ps.split(",");for(var i=0;i0)psStr+=",";var pos=psa[i];var d=YAHOO.ads.darla._config.destinationMap[pos];if(d!=null&&d!=""){switch(typeof d){case"string":psStr+=pos;var e=document.getElementById(d);if(e!=null){psStr+=":";if(e.tagName.toLowerCase()=="iframe") psStr+="!";else psStr+=d;}else if(typeof d=="function") psStr+=":"+d;break;case"object":if(d.length){psStr+="n"+d.length+pos+":!";} break;}}else psStr+=pos;} results.psStr=psStr;} if(YAHOO.ads.darla._config.verboseLogging){var s="";for(var f in results) s+=f+":"+results[f]+"; ";YAHOO.ads.darla.log("computed action settings: "+action+" - "+s,true);} return results;},getConfigSetting:function(key,customOnly){var value=null;if(YAHOO.ads.darla._config) value=YAHOO.ads.darla._config[key];if(customOnly||(value===null)) return value;if(value==null) return YAHOO.ads.darla._baseConfig[key];return value;},getTemplate:function(dest){var c=YAHOO.ads.darla._config;if(c==null||c.templates==null||c.templates[dest]==null) return null;var e=document.getElementById(dest);if(e==null||e.tagName.toLowerCase()!="iframe") return null;var t=[];if(c.templatePrefix!==null){t[t.length]=c.templatePrefix;if(YAHOO.ads.darla._isIE) t[t.length-1]=t[t.length-1].replace(new RegExp("","i"),"");} t[t.length]=c.templates[dest];if(c.templatePostfix!==null) t[t.length]=c.templatePostfix;return t.join("");},fillSimpleTemplate:function(pos,adHtml){var t=YAHOO.ads.darla.getConfigSetting("simpleTemplate");if((t==null)||(t=="")) return null;var e=YAHOO.ads.darla.getConfigSetting("encoding");if((e!=null)&&(e!="")){var et=YAHOO.ads.darla.getConfigSetting("simpleTemplateEncodingTag");if(et){et=et.replace(new RegExp("__ENCODING__","g"),e);t=t.replace(new RegExp("","g"),et);}} var e=YAHOO.ads.darla.getConfigSetting("bg");if((e!=null)&&(e!="")){var et=YAHOO.ads.darla.getConfigSetting("simpleTemplateStyleTag");if(et){et=et.replace(new RegExp("__BGCOLOR__","g"),e);t=t.replace(new RegExp("","g"),et);}} adHtml=adHtml.replace(/\$/g,"%24");t=t.replace(new RegExp("","g"),adHtml);YAHOO.ads.darla.log("built from simple template: "+t,true);return t;},log:function(message,verboseOnly){if(YAHOO.ads.darla._config==null||YAHOO.ads.darla._config.log==null)return;if(verboseOnly&&YAHOO.ads.darla._config.verboseLogging!=true)return;if(message==null)message="null";var e;try{YAHOO.ads.darla._config.log(message);}catch(e){};},_startEventTimer:function(eventObject,delayAmount){if(YAHOO.ads.darla._eventTimer!=null){clearTimeout();YAHOO.ads.darla._eventTimer=null;} if(eventObject==null)return;var delay=(delayAmount!=null)?delayAmount:(eventObject.settings.ca?YAHOO.ads.darla.getConfigSetting("cancellableDelay"):YAHOO.ads.darla.getConfigSetting("standardDelay"));YAHOO.ads.darla._lastEvent=eventObject;YAHOO.ads.darla._eventTimer=setTimeout("YAHOO.ads.darla._processEvent('"+eventObject.action+"')",delay);},_processEvent:function(action){YAHOO.ads.darla.log("YAHOO.ads.darla._processEvent firing for action: "+action);YAHOO.ads.darla._eventTimer=null;if(YAHOO.ads.darla._config==null)return;if(YAHOO.ads.darla._lastEvent==null||YAHOO.ads.darla._lastEvent.action!=action){return null;} YAHOO.ads.darla._recordEvent();var settings=YAHOO.ads.darla._lastEvent.settings;var level=settings.lv;if(level==null) level=(settings.sp!=null)?1:-1;if(level<0){if(YAHOO.ads.darla.getConfigSetting("autoRotation")) level=1;else return;} if(level>1){YAHOO.ads.darla._clearRotationTimer();level=1;} if((level==1)&&YAHOO.ads.darla._checkRotation(settings.ro)){if(YAHOO.ads.darla._call(action,settings)==true) return;} if(YAHOO.ads.darla.getConfigSetting("beaconsDisabled")!=true) YAHOO.ads.darla.sendBeacon(action,YAHOO.ads.darla.getConfigSetting("beaconDelay"));},_recordEvent:function(){if(YAHOO.ads.darla.getConfigSetting("autoRotation")){var wndw=YAHOO.ads.darla.getConfigSetting("autoRotationWindow");var rotation=YAHOO.ads.darla.getConfigSetting("rotation");if(wndw==null||wndw>rotation) wndw=rotation;if((YAHOO.ads.darla._rotationTime==0)||((new Date()).getTime()-YAHOO.ads.darla._rotationTime)>(rotation-wndw)) YAHOO.ads.darla._rotationEvents=true;}},_call:function(action,settings){if(YAHOO.ads.darla._config==null)return;var config=YAHOO.ads.darla._config;if(config.callFrame==null){YAHOO.ads.darla.log("YAHOO.ads.darla._call called, but no call iframe specified.",true);return;} var adFrame;if(settings.callFrame==null){adFrame=document.getElementById(YAHOO.ads.darla.getConfigSetting("callFrame"));}else{adFrame=document.getElementById(settings.callFrame);} YAHOO.ads.darla.log("callFrame specified: "+adFrame.id,true);if(adFrame==null){YAHOO.ads.darla.log("YAHOO.ads.darla._call called, but call iframe not found, id: "+config.callFrame,true);return;} var spaceid=settings.sp;if(spaceid==null||spaceid==""){YAHOO.ads.darla.log("YAHOO.ads.darla._call called, but null space ID found; the action was: "+action,true);return false;} var loc=settings.psStr;if(loc==""){YAHOO.ads.darla._clearRotationTimer();YAHOO.ads.darla.log("YAHOO.ads.darla._call called, but no positions to update; the action was: "+action,true);return false;} var extraMime=settings.em;if(extraMime==null) extraMime=config.extraMime;var bgColor=settings.bg;if(bgColor==null)bgColor="";YAHOO.ads.darla._handoffStore=null;var url=[YAHOO.ads.darla.getConfigSetting("callScript")+"?cb=YAHOO.ads.darla._loaded"];url[url.length]="p="+YAHOO.ads.darla.getConfigSetting("property");url[url.length]="f="+spaceid;url[url.length]="l="+loc;url[url.length]="en="+YAHOO.ads.darla.getConfigSetting("encoding");url[url.length]="rn="+(new Date().getTime());if(extraMime!=null) url[url.length]="em="+extraMime;if(config.target) url[url.length]="tg="+config.target;if(config.domain) url[url.length]="dm="+config.domain;if(settings.op){var params=settings.op;for(var f in params) url[url.length]=f+"="+params[f];} if(config.otherParams){var params=config.otherParams;for(var f in params){if(settings.op&&settings.op[f]) continue;url[url.length]=f+"="+params[f];}} url=url.join("&");YAHOO.ads.darla.log("ad request: "+action+"; url="+url);adFrame.contentWindow.location.replace(url);return true;},_startRotationTimer:function(delayAmount){if(YAHOO.ads.darla._config==null)return;YAHOO.ads.darla._clearRotationTimer();YAHOO.ads.darla._rotationEvents=false;YAHOO.ads.darla._rotationTime=(new Date()).getTime();if(YAHOO.ads.darla.getConfigSetting("autoRotation")){if(delayAmount==null) delayAmount=YAHOO.ads.darla.getConfigSetting("rotation");if(delayAmount==null) return;YAHOO.ads.darla._rotationTimer=setTimeout("YAHOO.ads.darla._rotateAdState()",delayAmount);YAHOO.ads.darla.log("start ad timer: "+delayAmount,true);}},_clearRotationTimer:function(){YAHOO.ads.darla._rotationTime=0;if(YAHOO.ads.darla._rotationTimer!=null){clearTimeout(YAHOO.ads.darla._rotationTimer);YAHOO.ads.darla._rotationTimer=null;}},_rotateAdState:function(){YAHOO.ads.darla._clearRotationTimer();if(YAHOO.ads.darla.getConfigSetting("autoRotation")&&YAHOO.ads.darla._rotationEvents){YAHOO.ads.darla.event("default");} YAHOO.ads.darla._rotationEvents=false;},_checkRotation:function(rotationTime){if(YAHOO.ads.darla._config==null)return false;if(YAHOO.ads.darla._rotationTime==0)return true;if(rotationTime==null) rotationTime=YAHOO.ads.darla.getConfigSetting("rotation");return(YAHOO.ads.darla._rotationTime+rotationTime<=(new Date().getTime()));},_throbberHack:function(delay){if((YAHOO.ads.darla._config==null)||(typeof YAHOO.ads.darla._config.throbberHack!="function")) return;if(delay===true) delay=YAHOO.ads.darla.getConfigSetting("throbberDelay");if(typeof delay=="number"&&delay>0){if(YAHOO.ads.darla._throbTimer!=null) clearTimeout(YAHOO.ads.darla._throbTimer);YAHOO.ads.darla._throbTimer=setTimeout("YAHOO.ads.darla._throbberHack()",delay);return;} if(typeof YAHOO.ads.darla._config.throbberHack=="function"){YAHOO.ads.darla.log("letting loose the throbber hack",true);YAHOO.ads.darla._config.throbberHack();}},_getBeaconUrl:function(spaceid){var url=YAHOO.ads.darla.getConfigSetting("beaconUrl");if((url==null)||(url==""))return null;return url+spaceid+"&t="+Math.random();},renderHandoffs:function(positions){var swapPositions="";if(YAHOO.ads.darla._handoffStore!=null){YAHOO.ads.darla.log("rendering request: '"+YAHOO.ads.darla._lastEvent.settings.ps+"'");YAHOO.ads.darla._renderStore={};for(var t in YAHOO.ads.darla._handoffStore){var d=YAHOO.ads.darla._config.destinationMap[t];YAHOO.ads.darla.log("found ad in handoff store: "+t);switch(typeof d){case"string":YAHOO.ads.darla._updateTemplate(t,0,d);break;case"object":for(var i=0;i0) swapPositions+=",";swapPositions+=t;}}} if(swapPositions.length>0) setTimeout('YAHOO.ads.darla._swapElements ( "'+swapPositions+'" )',100);},_updateTemplate:function(pos,posIndex,dest){var ad=YAHOO.ads.darla._handoffStore[pos][posIndex];if(ad==null) return;if(YAHOO.ads.darla._renderStore[dest]==null){var h=YAHOO.ads.darla.getTemplate(dest);if((h==null)||(h=="")){var e=document.getElementById(dest);if(e&&e.tagName.toLowerCase()=="iframe") var h=YAHOO.ads.darla.fillSimpleTemplate(pos,ad);if(h!=null){YAHOO.ads.darla._renderStore[dest]=h;return;} YAHOO.ads.darla._renderStore[dest]=ad;return;} YAHOO.ads.darla._renderStore[dest]=h;YAHOO.ads.darla.log("template found: "+pos+"->"+dest+": "+h,true);} var h=YAHOO.ads.darla._renderStore[dest];YAHOO.ads.darla._renderStore[dest]=h.replace(new RegExp("",""),ad);},_renderTemplate:function(tid){var swap=false;var d=null;if(!YAHOO.ads.darla._isSafari&&YAHOO.ads.darla.getConfigSetting("doubleBuffering")) d=document.getElementById(tid+"_");if(d){if(d.tagName.toLowerCase()=="iframe"){if(YAHOO.ads.darla.getConfigSetting("fullDoubleBuffering")){if(d.addEventListener){d.onload=YAHOO.ads.darla._iframeLoaded;}else if(d.attachEvent){d.detachEvent("onload",YAHOO.ads.darla._iframeLoaded);d.attachEvent("onload",YAHOO.ads.darla._iframeLoaded);}}else{swap=true;}}else{swap=true;}}else{d=document.getElementById(tid);} if(d&&d.tagName.toLowerCase()=="iframe"){var html=YAHOO.ads.darla._renderStore[tid];YAHOO.ads.darla.log("rendering start: "+tid,true);var dm=YAHOO.ads.darla.getConfigSetting("domain");if(YAHOO.ads.darla._isSafari||(YAHOO.ads.darla._isIE&&(dm!=null)&&(dm!=""))){YAHOO.ads.darla.log("rendering via document.write for "+tid+": "+html.length+" "+html,true);YAHOO.ads.darla._renderWithWrite(d,tid);}else{YAHOO.ads.darla.log("rendering via JS Url for "+tid+": "+html.length+" chars - "+html,true);if(YAHOO.ads.darla._isIE) YAHOO.ads.darla._aboutToRewriteIframe(d);var url='parent.YAHOO.ads.darla._getTemplateForJsUrl(\"'+tid+'\")';if(YAHOO.ads.darla._isSafari) url='document.write('+url+')';d.contentWindow.location.replace('javascript:'+url);}}else if(d){d.innerHTML=YAHOO.ads.darla._renderStore[tid];} return swap;},_getTemplateForJsUrl:function(tid){var h=YAHOO.ads.darla._renderStore[tid];if(h==null)return"";return YAHOO.ads.darla._encodeForJSUrl(h);},_renderWithWrite:function(d,tid){var html=YAHOO.ads.darla._renderStore[tid];var dm=YAHOO.ads.darla.getConfigSetting("domain");var e;if((dm==null)||(dm=="")){if(YAHOO.ads.darla._isIE){try{_aboutToRewriteIframe(d);}catch(e){YAHOO.ads.darla.log("renderTemplate failure: loading blank document for "+tid,true);}} try{d.contentWindow.document.write(html);d.contentWindow.document.close();}catch(e){YAHOO.ads.darla.log("renderTemplate failure: direct call to document.write for "+tid,true);}}else{if(YAHOO.ads.darla._isIE){try{d.contentWindow.location.replace(YAHOO.ads.darla._getDomainHackUrl());}catch(e){YAHOO.ads.darla.log("renderTemplate failure: loading blank document for "+tid,true);}} var f1=function(h){return function(ev){if(ev==null||ev.type!="load") return;YAHOO.ads.darla.log("domain-hack onload called for: "+ev.type+" "+ev.srcElement.id,true);ev.srcElement.detachEvent("onload",arguments.callee);h=h.replace(/<\/head>/i,"<\/head>");YAHOO.ads.darla.log("final write: "+h);ev.srcElement.contentWindow.document.write(h);var e;try{ev.srcElement.contentWindow.document.close();}catch(e){}}}(html);var f2=function(h){return function(ev){if(ev==null||ev.type!="load") return;YAHOO.ads.darla.log("domain-hack onload called for: "+ev.type+" "+ev.srcElement.id,true);ev.srcElement.detachEvent("onload",arguments.callee);YAHOO.ads.darla.log("final write: "+h);ev.srcElement.contentWindow.document.write(h);var e;try{}catch(e){}}}(html);d.attachEvent("onload",f1);}},_getDomainHackUrl:function(){var d=YAHOO.ads.darla.getConfigSetting("domain");if((d==null)||(d=="")) return"about:blank";var url=YAHOO.ads.darla.getConfigSetting("domainScript");url+="?dh="+d;url+="&en="+YAHOO.ads.darla.getConfigSetting("encoding");return url;},_blankIframe:function(f){if(typeof f=="string") f=document.getElementById(f);if((f==null)||(f.tagName.toLowerCase()!="iframe")) return;if(f.onload==YAHOO.ads.darla._iframeLoaded) f.onload=null;else if(f.detachEvent) f.detachEvent("onload",YAHOO.ads.darla._iframeLoaded);f.contentWindow.location.replace(YAHOO.ads.darla._isIE?"javascript:''":"about:blank");},_aboutToRewriteIframe:function(f){if(typeof f=="string") f=document.getElementById(f);if((f==null)||(f.tagName.toLowerCase()!="iframe")) return;f.contentWindow.location.replace("about:blank");},_encodeForJSUrl:function(s,useJsEscaping){var t=[];var m=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];for(var i=0;i>>12)&15]+m[(e>>>8)&15]+ m[(e>>>4)&15]+m[e&15];}else{t[t.length]="&#"+e+";";}}} return t.join("");},_swapElements:function(positions){function swapElts(id){var newElt=document.getElementById(id+"_");var oldElt=document.getElementById(id);if(newElt==null||oldElt==null)return;newElt.id=id;newElt.style.display="block";newElt.style.visibility="visible";oldElt.id=id+"_";oldElt.style.display="none";if(oldElt.tagName.toLowerCase()=="iframe") YAHOO.ads.darla._blankIframe(oldElt);else oldElt.innerHTML="";} YAHOO.ads.darla.log("swapping positions: "+positions,true);var ps=positions.split(",");for(var i=0;i8){return u;} if(k.indexOf(' ')!=-1){return u;} if(YAHOO.ULT.has_ctrl_char(k)||YAHOO.ULT.has_ctrl_char(v)){return u;} ks[i++]=k;} ks=ks.sort();var f=[];for(i=0;i1024){return u;} f=';_ylc='+YAHOO.ULT.encode64(f);i=u.indexOf('/*');if(i==-1){i=u.indexOf('/?');} if(i==-1){i=u.indexOf('?');} if(i==-1){return u+f;}else{return u.substr(0,i)+f+u.substr(i);}};YAHOO.ULT.beacon_click=function(p,i){if(!i){i=YAHOO.ULT.IMG;} if(p){var url=YAHOO.ULT.track_click(YAHOO.ULT.BEACON,p);url+='?t='+Math.random();i.src=url;} return true;};YAHOO.ULT.has_ctrl_char=function(s){for(var i=0;i>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;} output=output+ YAHOO.ULT.BASE64_STR.charAt(enc1)+ YAHOO.ULT.BASE64_STR.charAt(enc2)+ YAHOO.ULT.BASE64_STR.charAt(enc3)+ YAHOO.ULT.BASE64_STR.charAt(enc4);chr1=chr2=chr3="";enc1=enc2=enc3=enc4="";}while(i0){pvSelf.appID=obj.appID;pvSelf.thumbList=obj.thumbList;pvSelf.moreSSData=obj.moreSSData;pvSelf.darlaConfig=obj.darlaConfig;pvSelf.ssCategoryID=obj.ssCategoryID;pvSelf.type='photo';pvSelf.relatedDefault=obj.relatedDefault;pvSelf.current=$D.get('ypv-current');pvSelf.photo=$D.get('ypv-photo');pvSelf.photobtn=$D.get('btn-photo');pvSelf.gallery=$D.get('ypv-gallery');pvSelf.gallerybtn=$D.get('btn-gallery');pvSelf.moreSS=$D.get('ypv-more-slideshows');pvSelf.relevant=$D.get('ypv-relevant');pvSelf.main=$D.get('yui-main');pvSelf.ssControls=$D.getElementsByClassName('options','div','ypv-hdr')[0];pvSelf.ssControls.replay=$D.get('replaySlideshow');pvSelf.ssControls.play=$D.get('btn-play');$D.removeClass(pvSelf.ssControls.play,'hide');pvSelf.ssControls.ctrls=$D.get('sscontrols');pvSelf.ssControls.status=false;pvSelf.thumbs=$D.get('ypv-thumbs');$D.removeClass(pvSelf.thumbs,'hide');var r=$D.getRegion(pvSelf.thumbs);pvSelf.thumbs.height=r.bottom-r.top;$E.on(pvSelf.photobtn,'click',function(e){pvSelf.UltBeacon.send({'sec':'ypv_header','slk':'singlephoto'});pvSelf.toggleDisplay(e);});$E.on(pvSelf.gallerybtn,'click',function(e){pvSelf.UltBeacon.send({'sec':'ypv_header','slk':'gallery'});pvSelf.toggleDisplay(e);});pvSelf.Photo.init();pvSelf.Gallery.init();pvSelf.SlideShowControls.init();pvSelf.PageView.init();pvSelf.Darla.init();pvSelf.HistoryManager.init();pvSelf.Loading.init();pvSelf.connectionStatus=new YAHOO.util.CustomEvent('connection success');if(typeof rt_RemoveHandler=='function'){rt_RemoveHandler("beforeunload");} $E.on(window,'unload',pvSelf.destroy);}} YAHOO.News.PhotoViewer.prototype={Data:function(){function buildImageIDList(d){var aImageID=[];if(pvSelf.type=='gallery'){var limit=pvSelf.config.gallery.numOfPhotos;var start=Math.ceil((pvSelf.gallery.panes.current*pvSelf.config.gallery.perPage))-(pvSelf.config.gallery.perPage-1);var end=Math.ceil(pvSelf.gallery.panes.current*pvSelf.config.gallery.perPage);}else{var limit=pvSelf.config.photo.numOfPhotos;var start=Math.ceil((pvSelf.photo.panes.current*pvSelf.config.photo.perPage))-(pvSelf.config.photo.perPage-1);var end=Math.ceil(pvSelf.photo.panes.current*pvSelf.config.photo.perPage);} switch(d){case'p':var from=end-limit;if(from<1)from=1;var to=end;break;case'f':var to=limit;if(to>pvSelf.thumbTotal)to=pvSelf.thumbTotal;var from=1;break;case'l':var to=pvSelf.thumbTotal;var from=to-limit;if(from<1)from=1;break;default:var from=start;var to=from+limit;if(to>pvSelf.thumbTotal)to=pvSelf.thumbTotal;break;} var aRange=[];for(var x=0;from<=to;x++){if(from<=to&&!pvSelf.imageDataObj['image'+from]){aImageID[aImageID.length]=pvSelf.thumbList[from];aRange[aRange.length]=from;} from++;} if(to==pvSelf.thumbTotal){aImageID[aImageID.length]='end-of-slideshow';} sImageID=aImageID.join(',');var parameters={list:sImageID,from:aRange[0],to:aRange[aRange.length-1]} return parameters;} function getImages(d,r){var oReturn=buildImageIDList(d);if(!oReturn)return false;var sImageID=oReturn.list;var from=oReturn.from;var to=oReturn.to;var params='/thumb/id/'+pvSelf.ssCategoryID+'/imageid/'+sImageID+'/output/json';var callback={success:getDataSuccess,failure:getDataFailure} $C.initHeader('PHOTO-APP-ID',pvSelf.appID);var connect=$C.asyncRequest('GET',pvSelf.apiURL.thumbs+params,callback);pvSelf.Loading.show();function getDataSuccess(o){var response=o.responseText;response=response.replace(//gi,'');eval('var json = '+response+';');var dataObj=json.slideshow_images;var aln=json.slideshow_image_count;pvSelf.darlaConfig.gallerySpaceID=json.gallery_spaceid_info;if(aln>0){for(var x=1,start=from;x<=aln;x++){if(!pvSelf.imageDataObj['image'+start]){pvSelf.imageDataObj['image'+start]=dataObj['image'+x];if(start==pvSelf.thumbTotal){pvSelf.moreSSData=json.slideshow_end_page;}} start++;}} pvSelf.Loading.hide();pvSelf.connectionStatus.fire('connection successful');} function getDataFailure(o){pvSelf.Loading.hide();}} return{get:getImages}}(),Photo:function(){var oPhoto=new Object;var oPhotoElements=new Object function init(){oPhoto=$D.getElementsByClassName('viewer','div',pvSelf.thumbs)[0];if(oPhoto){oPhotoElements.container=$D.get('ypv-current');if(!oPhotoElements.container)return false;oPhotoElements.main=$D.get('photoMain');oPhotoElements.photocont=$D.get('photo-cont');oPhotoElements.provider=$D.get('photoProvider');oPhotoElements.busy=$D.getElementsByClassName('busy','div',oPhotoElements.photocont)[0];oPhotoElements.date=$D.get('photoTimestamp');oPhotoElements.caption=$D.get('photoCaption');oPhotoElements.captionCite=$D.get('captionCite');oPhotoElements.tools=$D.get('photoTools');oPhotoElements.tools.links=oPhotoElements.tools.getElementsByTagName('A');oPhotoElements.recommend=$D.get('recommend-count');oPhotoElements.oImageTemp=new Image();oPhotoElements.relevant=pvSelf.relevant;oPhotoElements.relevant.related=$D.get('related-media');oPhotoElements.relevant.relatedVideo=$D.get('related-video');oPhotoElements.relevant.relatedVideo.nodes=oPhotoElements.relevant.relatedVideo.childNodes;oPhotoElements.relevant.relatedStory=$D.get('related-story');oPhotoElements.relevant.relatedStory.nodes=oPhotoElements.relevant.relatedStory.childNodes;oPhotoElements.relevant.keywords=$D.get('related-keywords');oPhotoElements.relevant.ss=$D.get('related-slideshow');if(oPhotoElements.relevant.ss){oPhotoElements.relevant.ss.nodes=oPhotoElements.relevant.ss.childNodes;} oPhotoElements.list=$D.getElementsByClassName('list','UL',oPhoto)[0];oPhotoElements.photoCount=$D.get('photo-count');oPhotoElements.navRange=$D.get('navRange');pvSelf.photo.panes=$D.getElementsByClassName('item','li',oPhoto);createCarousel();preLoadImages();}} function createCarousel(){var r=$D.getRegion(pvSelf.photo.panes[0]);oPhoto.scrollDistance=r.right-r.left;pvSelf.photo.panes.total=Math.ceil(pvSelf.thumbTotal/pvSelf.config.photo.perPage);if((pvSelf.thumbTotal%pvSelf.config.photo.perPage)==0)pvSelf.photo.panes.total++;pvSelf.photo.panes.current=Math.ceil(pvSelf.currentImage/pvSelf.config.photo.perPage);oPhoto.anim=new YAHOO.util.Scroll(oPhoto,{scroll:{}},pvSelf.config.photo.scrollSpeed,YAHOO.util.Easing.easeOut);oPhoto.animNext=new YAHOO.util.Scroll(oPhoto,{scroll:{}},pvSelf.config.photo.scrollSpeed,YAHOO.util.Easing.easeOut);oPhoto.animPrev=new YAHOO.util.Scroll(oPhoto,{scroll:{}},pvSelf.config.photo.scrollSpeed,YAHOO.util.Easing.easeOut);oPhoto.selectedThumb=$D.getElementsByClassName('active','a',oPhotoElements.list)[0];attachEventListeners();updateNav();} function resetCarousel(e){if(e)$E.stopEvent(e);pvSelf.currentImage=1;if(pvSelf.imageDataObj['image1']){getFirst();var thumb=$D.get('photo1');changeThumb(null,thumb);}else{getFirst();pvSelf.connectionStatus.subscribe(function(){if(pvSelf.currentImage==1){getFirst();var thumb=$D.get('photo1');changeThumb(null,thumb);}});}} function attachEventListeners(){oPhoto.first=$D.getElementsByClassName('first','a',pvSelf.thumbs)[0];oPhoto.prev=$D.getElementsByClassName('prev','a',pvSelf.thumbs)[0];oPhoto.next=$D.getElementsByClassName('next','a',pvSelf.thumbs)[0];oPhoto.last=$D.getElementsByClassName('last','a',pvSelf.thumbs)[0];oPhoto.photoNav=$D.get('photo-nav');oPhoto.photoNav.prev=$D.get('prev');oPhoto.photoNav.next=$D.get('next');function getThumb(e){$E.stopEvent(e);var target=$E.getTarget(e);while(pvSelf.checkTarget(target,'A')!==true){if(!target)return false;target=target.parentNode;} var pos=target.id;pos=pos.replace('photo','');pvSelf.UltBeacon.send({'sec':'ypv_thumbs','slk':'thumb','pos':pos});changeThumb(null,target);} $E.on(oPhoto,'click',getThumb);$E.on(oPhotoElements.oImageTemp,'load',function(){if(typeof rt_Done=='function'){rt_Done(true);} $D.removeClass(oPhotoElements.busy,'show');oPhotoElements.main.src=pvSelf.imageDataObj['image'+pvSelf.currentImage].image_photo_url;});$E.addListener(oPhoto.first,"click",function(e){if(e)$E.stopEvent(e);getFirst();pvSelf.UltBeacon.send({'sec':'ypv_thumbs','slk':'first'});});$E.addListener(oPhoto.prev,"click",function(e){if(e)$E.stopEvent(e);getPrev();pvSelf.UltBeacon.send({'sec':'ypv_thumbs','slk':'previous'});});$E.addListener(oPhoto.next,"click",function(e){if(e)$E.stopEvent(e);getNext();pvSelf.UltBeacon.send({'sec':'ypv_thumbs','slk':'next'});});$E.addListener(oPhoto.last,"click",function(e){if(e)$E.stopEvent(e);getLast();pvSelf.UltBeacon.send({'sec':'ypv_thumbs','slk':'last'});});$E.addListener(oPhoto.photoNav.prev,"click",function(e){if(e)$E.stopEvent(e);photoPrev();pvSelf.UltBeacon.send({'sec':'ypv_current','slk':'previous'});});$E.addListener(oPhoto.photoNav.next,"click",function(e){if(e)$E.stopEvent(e);photoNext();pvSelf.UltBeacon.send({'sec':'ypv_current','slk':'next'});});var kp=new YAHOO.util.KeyListener(document,{ctrl:true,shift:true,keys:37},{fn:photoPrev});kp.enable();var kn=new YAHOO.util.KeyListener(document,{ctrl:true,shift:true,keys:39},{fn:photoNext});kn.enable();var kf=new YAHOO.util.KeyListener(document,{ctrl:true,shift:true,keys:220},{fn:pvSelf.SlideShowControls.replay});kf.enable();var kp2=new YAHOO.util.KeyListener(document,{ctrl:true,shift:true,keys:219},{fn:photoPrev});kp2.enable();var kn2=new YAHOO.util.KeyListener(document,{ctrl:true,shift:true,keys:221},{fn:photoNext});kn2.enable();} function scrollToView(){if(!oPhoto.anim.isAnimated()){var oldPane=pvSelf.photo.panes.current;var newPane=getPane();if(newPane!=oldPane){if(newPane>oldPane){getNext();}else if(newPane1){pvSelf.photo.panes.current=1;if(pvSelf.imageDataObj['image1']){buildImages('p');}else{pvSelf.Data.get('f');pvSelf.connectionStatus.subscribe(function(){if(pvSelf.photo.panes.current==1){buildImages('p');}});}}} function getPrev(e){if(e)$E.stopEvent(e);if((pvSelf.photo.panes.current>1)&&(checkPrevPane()==true)&&!oPhoto.animPrev.isAnimated()) {pvSelf.photo.panes.current--;buildImages('p');}} function getNext(e){if(e)$E.stopEvent(e);if(((pvSelf.photo.panes.current+1)<=pvSelf.photo.panes.total)&&(checkNextPane()==true)&&!oPhoto.animNext.isAnimated()) {pvSelf.photo.panes.current++;buildImages('n');}} function getLast(e){if(e)$E.stopEvent(e);if(pvSelf.photo.panes.current1&&pvSelf.photo.panes.currentpvSelf.thumbTotal)lastPhotoInPane=pvSelf.thumbTotal;if(!pvSelf.imageDataObj['image'+lastPhotoInPane]&&!pvSelf.Loading.busy) {pvSelf.Data.get('n');pvSelf.connectionStatus.subscribe(function(){if(pvSelf.photo.panes.current>1&&pvSelf.photo.panes.current1)&&(!oPhoto.anim.isAnimated())&&(pvSelf.imageDataObj['image'+(pvSelf.currentImage-1)])&&(!pvSelf.recommending)) {var photo=pvSelf.currentImage-1;var thumb=$D.get('photo'+photo);if(!thumb){var thumb=pvSelf.currentImage-1;showPhoto(null,thumb,'p');}else{pvSelf.currentImage--;changeThumb(null,thumb);}}} function photoNext(e){if(e&&(typeof e=='object')){$E.stopEvent(e);} if((pvSelf.currentImage<=(pvSelf.thumbTotal))&&(!oPhoto.anim.isAnimated())&&((pvSelf.imageDataObj['image'+(pvSelf.currentImage+1)])||(pvSelf.currentImage+1)==(pvSelf.thumbTotal+1))&&(!pvSelf.recommending)) {var photo=pvSelf.currentImage+1;if(photo>pvSelf.thumbTotal){var thumb=$D.get('last');}else{var thumb=$D.get('photo'+photo);} if(!thumb){var thumb=pvSelf.currentImage+1;showPhoto(null,thumb,'n');}else{pvSelf.currentImage++;changeThumb(null,thumb);}}} function updateNav(d){var end=pvSelf.config.photo.perPage*pvSelf.photo.panes.current;var start=end-(pvSelf.config.photo.perPage-1);if(end>pvSelf.thumbTotal)end=pvSelf.thumbTotal;if(end<1)end=1;if(start<1)start=1;if(start>pvSelf.thumbTotal)start=pvSelf.thumbTotal;oPhotoElements.navRange.innerHTML=start+' - '+end;if(pvSelf.photo.panes.total==1){$D.addClass(oPhoto.first,'off');$D.setStyle(oPhoto.first,'opacity',0.6);$D.addClass(oPhoto.prev,'off');$D.setStyle(oPhoto.prev,'opacity',0.6);$D.addClass(oPhoto.next,'off');$D.setStyle(oPhoto.next,'opacity',0.6);$D.addClass(oPhoto.last,'off');$D.setStyle(oPhoto.last,'opacity',0.6);} else if(pvSelf.photo.panes.current==1){$D.addClass(oPhoto.first,'off');$D.setStyle(oPhoto.first,'opacity',0.6);$D.addClass(oPhoto.prev,'off');$D.setStyle(oPhoto.prev,'opacity',0.6);$D.removeClass(oPhoto.next,'off');$D.setStyle(oPhoto.next,'opacity',1);$D.removeClass(oPhoto.last,'off');$D.setStyle(oPhoto.last,'opacity',1);} else if(pvSelf.photo.panes.current==pvSelf.photo.panes.total){$D.removeClass(oPhoto.first,'off');$D.setStyle(oPhoto.first,'opacity',1);$D.removeClass(oPhoto.prev,'off');$D.setStyle(oPhoto.prev,'opacity',1);$D.addClass(oPhoto.next,'off');$D.setStyle(oPhoto.next,'opacity',0.6);$D.addClass(oPhoto.last,'off');$D.setStyle(oPhoto.last,'opacity',0.6);}else{$D.removeClass(oPhoto.first,'off');$D.setStyle(oPhoto.first,'opacity',1);$D.removeClass(oPhoto.prev,'off');$D.setStyle(oPhoto.prev,'opacity',1);$D.removeClass(oPhoto.next,'off');$D.setStyle(oPhoto.next,'opacity',1);$D.removeClass(oPhoto.last,'off');$D.setStyle(oPhoto.last,'opacity',1);}} function updatePhotoNav(){if(pvSelf.currentImage=='last'){oPhotoElements.photoCount.innerHTML=pvSelf.thumbTotal;}else{oPhotoElements.photoCount.innerHTML=pvSelf.currentImage;} if(pvSelf.currentImage==1){$D.addClass(oPhoto.photoNav.prev,'off');$D.setStyle(oPhoto.photoNav.prev,'opacity',0.6);$D.removeClass(oPhoto.photoNav.next,'off');$D.setStyle(oPhoto.photoNav.next,'opacity',1);} else if(pvSelf.currentImage==(pvSelf.thumbTotal+1)){$D.removeClass(oPhoto.photoNav.prev,'off');$D.setStyle(oPhoto.photoNav.prev,'opacity',1);$D.addClass(oPhoto.photoNav.next,'off');$D.setStyle(oPhoto.photoNav.next,'opacity',0.6);}else{$D.removeClass(oPhoto.photoNav.prev,'off');$D.setStyle(oPhoto.photoNav.prev,'opacity',1);$D.removeClass(oPhoto.photoNav.next,'off');$D.setStyle(oPhoto.photoNav.next,'opacity',1);}} function changeThumb(e,obj){if(e)$E.stopEvent(e);if(pvSelf.recommending)return false;$D.removeClass(pvSelf.main,'more-ss');if(typeof obj==='string'||typeof obj==='number'){var id='photo'+obj;var obj=$D.get(id);}else{if(obj.o){obj=obj.o;}} if(!obj){return false;} if(obj.id=='last'){pvSelf.currentImage='last';pvSelf.MoreSlideShows.show();}else{pvSelf.currentImage=parseInt(obj.id.replace("photo",""),10);changeImage(pvSelf.currentImage);} clearSelected();oPhoto.selectedThumb=obj;showSelected();updatePhotoNav();scrollToView();preLoadImages();} function showPhoto(e,id,direction){if(e)$E.stopEvent(e);if(id){pvSelf.currentImage=id;pvSelf.photo.panes.current=getPane();if(!direction)direction='';buildImages(direction);changeThumb(null,id);if(pvSelf.type=="gallery")pvSelf.toggleDisplay();}} function clearSelected(){if(oPhoto.selectedThumb){$D.removeClass(oPhoto.selectedThumb,"active");}} function showSelected(){if(oPhoto.selectedThumb){$D.addClass(oPhoto.selectedThumb,"active");}} function refreshSelected(){ePhoto=false;if(pvSelf.currentImage=='last'){var ePhoto=$D.get('last');}else{var ePhoto=$D.get('photo'+pvSelf.currentImage);} if(ePhoto){oPhoto.selectedThumb=ePhoto;showSelected();}} function changeImage(currentImage){var img=pvSelf.imageDataObj['image'+currentImage];if(!img)return false;$D.addClass(oPhotoElements.busy,'show');document.title=img.image_title+' - Yahoo! News Photos';oPhotoElements.oImageTemp.src=img.image_photo_url;oPhotoElements.main.alt=img.image_title;if(img.provider_image_url!=''){oPhotoElements.provider.innerHTML=''+img.image_provider+'';}else{oPhotoElements.provider.innerHTML=''+img.image_provider+'';} oPhotoElements.date.innerHTML=img.image_date;oPhotoElements.caption.innerHTML=img.image_caption;if(img.image_caption_provider){oPhotoElements.captionCite.innerHTML=img.image_caption_provider;}else{oPhotoElements.captionCite.innerHTML='';} var imageid=document.recommend.imageid;if(imageid)imageid.value=img.image_id;if(typeof img.image_recommend_count=='undefined'){img.image_recommend_count=0;} oPhotoElements.recommend.innerHTML=pvSelf.Recommend.count(img.image_recommend_count);if(img.image_recommended){pvSelf.Recommend.toggle('b');}else{pvSelf.Recommend.toggle('f');} if(oPhotoElements.tools&&oPhotoElements.tools.links){for(var x=0,aln=oPhotoElements.tools.links.length;xpvSelf.thumbTotal)end=pvSelf.thumbTotal;if(start<1)start=1;function buildEmptyThumbs(ul){var li=document.createElement('LI');li.innerHTML='view more slideshows';ul.appendChild(li);for(var i=1;ipvSelf.thumbTotal){buildEmptyThumbs(ul);}else{for(var x=start;x<=end;x++){var image=pvSelf.imageDataObj['image'+x];if(!image)continue;html[html.length]='
  • ';html[html.length]='';html[html.length]=''+image.image_title+'';html[html.length]='';html[html.length]='';html[html.length]='
  • ';if(x==end){var pane=html.join('\n');ul.innerHTML=pane;} if(x==pvSelf.thumbTotal){buildEmptyThumbs(ul);}}} switch(direction){case'p':pvSelf.photo.panes.old=$D.getFirstChild(oPhotoElements.list);$D.insertBefore(item,pvSelf.photo.panes.old);oPhoto.scrollLeft=oPhoto.scrollDistance;scrollPrev();checkPrevPane();break;case'n':oPhotoElements.list.appendChild(item);pvSelf.photo.panes.old=$D.getFirstChild(oPhotoElements.list);scrollNext();checkNextPane();break;default:oPhotoElements.list.innerHTML='';oPhotoElements.list.appendChild(item);checkPrevPane();checkNextPane();break;} refreshSelected();updateNav();} function preLoadImages(){if(pvSelf.imageDataObj['image'+(pvSelf.currentImage-1)]){var prev2=new Image();prev2.src=pvSelf.imageDataObj['image'+(pvSelf.currentImage-1)].image_photo_url;} if(pvSelf.imageDataObj['image'+(pvSelf.currentImage+1)]){var next2=new Image();next2.src=pvSelf.imageDataObj['image'+(pvSelf.currentImage+1)].image_photo_url;}} return{init:init,show:showPhoto,change:changeImage,buildImages:buildImages,next:photoNext,reset:resetCarousel,scroll:scrollToView}}(),Gallery:function(){var oGallery=new Object;var oGalleryElements=new Object;function init(){oGalleryElements.range=$D.get('photoNavNum');oGalleryElements.title=document.getElementsByTagName('H1')[0];oGalleryElements.prev=$D.get('ssprev');oGalleryElements.next=$D.get('ssnext');pvSelf.gallery.panes=$D.getElementsByClassName('bd','div','ypv-gallery')[0];pvSelf.gallery.panes.total=Math.ceil(pvSelf.thumbTotal/pvSelf.config.gallery.perPage);attachEventListeners();} function showPane(cp,d){if(pvSelf.currentImage=='last'){pvSelf.Photo.reset();} if(!cp){pvSelf.gallery.panes.current=Math.ceil(pvSelf.currentImage/pvSelf.config.gallery.perPage);}else{currrentPane=cp;} oGallery.end=pvSelf.gallery.panes.current*pvSelf.config.gallery.perPage;oGallery.begin=(oGallery.end-pvSelf.config.gallery.perPage)+1;if(oGallery.begin<1)oGallery.begin=1;if(oGallery.end>pvSelf.thumbTotal)oGallery.end=pvSelf.thumbTotal;if(!d){checkData('n');}else{checkData(d);}} function attachEventListeners(){var gallery=$D.get('ypv-gallery');if(!gallery)return false;$E.on(oGalleryElements.prev,'click',scrollPrev);$E.on(oGalleryElements.next,'click',scrollNext);function getThumb(e){$E.stopEvent(e);var target=$E.getTarget(e);while(pvSelf.checkTarget(target,'IMG')!==true){if(!target)return false;target=target.parentNode;} var id=target.id;pvSelf.Photo.show(null,id);} $E.on(gallery,'click',getThumb);} function updateNav(){oGalleryElements.range.innerHTML=pvSelf.gallery.panes.current;if(pvSelf.gallery.panes.total==1){$D.addClass(oGalleryElements.prev,'off');$D.addClass(oGalleryElements.next,'off');}else if(pvSelf.gallery.panes.current==1){$D.addClass(oGalleryElements.prev,'off');$D.removeClass(oGalleryElements.next,'off');} else if(pvSelf.gallery.panes.current==pvSelf.gallery.panes.total){$D.removeClass(oGalleryElements.prev,'off');$D.addClass(oGalleryElements.next,'off');} else{$D.removeClass(oGalleryElements.prev,'off');$D.removeClass(oGalleryElements.next,'off');}} function scrollNext(e){if(e&&(typeof e=='object')){$E.stopEvent(e);} if(pvSelf.gallery.panes.current1&&!pvSelf.Loading.busy){pvSelf.gallery.panes.current--;showPane(pvSelf.gallery.panes.current,'p');pvSelf.UltBeacon.send({'sec':'ypv_gallery','slk':'previous'});}} function checkData(d){if((!pvSelf.imageDataObj['image'+oGallery.begin]||!pvSelf.imageDataObj['image'+oGallery.end])&&oGallery.end<=pvSelf.thumbTotal) {pvSelf.Data.get(d);if(pvSelf.SlideShowControls.status)pvSelf.SlideShowControls.pause();pvSelf.connectionStatus.subscribe(function(){buildImages();if(pvSelf.SlideShowControls.status)pvSelf.SlideShowControls.play(null,pvSelf.ssControls.speed);});}else{buildImages();}} function buildImages(d){var html=[];for(var x=oGallery.begin;x<=oGallery.end;x++){var image=pvSelf.imageDataObj['image'+x];if(image){html[html.length]='
    ';html[html.length]='
    ';html[html.length]='

    '+x+'

    ';html[html.length]=''+image.image_provider+'';html[html.length]='
    ';html[html.length]='';html[html.length]=''+image.image_title+'';html[html.length]='';html[html.length]='
    ';}} pvSelf.gallery.panes.innerHTML=html.join('\n');updateNav();document.title=oGalleryElements.title.innerHTML+' - Yahoo! News Photos';pvSelf.currentSpaceID=pvSelf.darlaConfig.gallerySpaceID.spaceid;var siteAttr=pvSelf.darlaConfig.gallerySpaceID['site-attribute'];var attr=siteAttr.content;pvSelf.Darla.show(pvSelf.currentSpaceID,attr);pvSelf.PageView.call('gallery');if(pvSelf.ssControls.status&&(pvSelf.gallery.panes.current==pvSelf.gallery.panes.total)){pvSelf.SlideShowControls.stop();}} return{init:init,show:showPane,next:scrollNext}}(),toggleDisplay:function(e){if(e){$E.stopEvent(e);var target=$E.getTarget(e);} if(pvSelf.type=='photo'){pvSelf.type='gallery';var finish=function(){pvSelf.Gallery.show();$D.addClass(pvSelf.main,'gallery');} var anim=new $A(pvSelf.thumbs,{height:{to:0}},.5,$Y.Easing.easeOut);anim.onStart.subscribe(finish);anim.animate();}else{pvSelf.type='photo';var finish=function(){$D.removeClass(pvSelf.main,'gallery');} var anim=new $A(pvSelf.thumbs,{height:{to:pvSelf.thumbs.height}},.5,$Y.Easing.easeOut);anim.onStart.subscribe(finish);anim.animate();}},SlideShowControls:function(){function init(){function toggleAction(){if(pvSelf.ssControls.status){stopSlideShow();}else{playSlideShow(null,2);}} var kp=new YAHOO.util.KeyListener(document,{ctrl:true,shift:true,keys:80},{fn:toggleAction});kp.enable();pvSelf.ssControls.sec='ypv_header';pvSelf.ssControls.slk='';if(pvSelf.ssControls.play){$E.on(pvSelf.ssControls.play,'click',playSlideShow,2);} if(pvSelf.ssControls.ctrls){pvSelf.ssControls.speeds=pvSelf.ssControls.ctrls.getElementsByTagName('A');pvSelf.ssControls.picked=pvSelf.ssControls.speeds[2];for(var x=0,lln=pvSelf.ssControls.speeds.length;x';html[html.length]='« Replay Slideshow';html[html.length]=' ';html[html.length]=' ';if(ss_total>0){html[html.length]='
    ';var title=pvSelf.moreSSData.title;html[html.length]='

    More '+title+' Slideshows:

    ';function buildList(title,url,total,timestamp){var list=[];var date=new Date(parseInt(timestamp,10)*1000);date=pvSelf.Date.convertMonth(date.getMonth())+' '+date.getDate();list[list.length]='
  • ';list[list.length]=''+title+'';list[list.length]=''+date+' / '+total+' Photos';list[list.length]='
  • ';var html=list.join('\n');return html;} html[html.length]='';if(ss_total>1){html[html.length]='';} if(ss_total>2){html[html.length]='';} html[html.length]='
    ';} pvSelf.moreSS=document.createElement('DIV');pvSelf.moreSS.id='ypv-more-slideshows';var ss=$D.get('ypv-slideshows');var parent=ss.parentNode;parent.insertBefore(pvSelf.moreSS,ss);pvSelf.moreSS.sec='ypv_last_slide';pvSelf.moreSS.slk='';function getEndOfSSLink(e){$E.stopEvent(e);var target=$E.getTarget(e);while(pvSelf.checkTarget(target,'A')!==true){if(!target)return false;target=target.parentNode;} if(target.id=='replaySlideshow'){pvSelf.moreSS.slk='replay';}else{var linkHTML=target.innerHTML;linkHTML=linkHTML.replace(/\s+/g,'');linkHTML=linkHTML.replace(/[^a-zA-Z0-9-]/g,'');linkHTML=linkHTML.toLowerCase();pvSelf.moreSS.slk=linkHTML;} pvSelf.moreSS.param={'sec':pvSelf.moreSS.sec,'slk':pvSelf.moreSS.slk};pvSelf.UltBeacon.send(pvSelf.moreSS.param);if(target.id!='replaySlideshow'){var delay=setTimeout(function(){document.location.href=target.href;},500);}} $E.on(pvSelf.moreSS,'click',getEndOfSSLink);pvSelf.moreSS.innerHTML=html.join('\n');pvSelf.moreSS.replay=$D.get('replaySlideshow');if(pvSelf.moreSS.replay){$E.on(pvSelf.moreSS.replay,'click',function(e){$E.stopEvent(e);pvSelf.UltBeacon.send({'sec':pvSelf.moreSS.sec,'slk':'replay'});pvSelf.SlideShowControls.replay();});}} $D.addClass(pvSelf.main,'more-ss');pvSelf.currentSpaceID=pvSelf.moreSSData.spaceid_info.spaceid;var attr=pvSelf.moreSSData.spaceid_info['site-attribute'].content;pvSelf.Darla.show(pvSelf.currentSpaceID,attr);pvSelf.PageView.call('end-of-slideshow');} return{show:show}}(),Recommend:function(){var oRecommend={};function init(){oRecommend.form=document.recommend;if(!oRecommend.form)return false;oRecommend.container=$D.get('recommend');oRecommend.button=$D.get('recommend-button');oRecommend.count=$D.get('recommend-count');oRecommend.voted=$D.get('recommend-voted');oRecommend.loading=document.createElement('DIV');oRecommend.loading.id='recload';oRecommend.loading.innerHTML=' Recommending';if(oRecommend.button){$E.on(oRecommend.button,'click',send,oRecommend.button);} pvSelf.recommending=false;var kr=new YAHOO.util.KeyListener(document,{ctrl:true,shift:true,keys:86},{fn:send,scope:oRecommend.button});kr.enable();} function send(e,obj){if(e)$E.stopEvent(e);if(pvSelf.imageDataObj['image'+pvSelf.currentImage].image_recommended){return false;} pvSelf.UltBeacon.send({'sec':'ypv_current','slk':'recommend'});var button=$E.getTarget(e);if($D.hasClass(button,'signedout')){var delay=setTimeout(function(){if(document.location.hash){pvSelf.HashPhotoRedirect.init(true);}else{var host=document.location.host;var path=document.location.pathname;var return_url='http://'+host+path;document.location.href=pvSelf.config.urls.login+'?.intl='+pvSelf.config.urls.intl+'&.done='+return_url;}},500);return false;} var imageid=document.recommend.imageid.value;$D.addClass(oRecommend.container,'loading');if(pvSelf){pvSelf.recommending=true;} oRecommend.container.appendChild(oRecommend.loading);var params='/recommend/imageid/'+imageid+'/ratetype/post/crumb/'+pvSelf.crumb+'/output/json';var callback={success:getDataSuccess,failure:getDataFailure} $C.initHeader('PHOTO-APP-ID',pvSelf.appID);var connect=$C.asyncRequest('GET',pvSelf.apiURL.thumbs+params,callback);function getDataSuccess(o){eval('var json = '+o.responseText+';');var image=parseInt(pvSelf.currentImage,10);pvSelf.imageDataObj['image'+image].image_recommend_count=json['1'].count;pvSelf.imageDataObj['image'+image].image_recommended=1;oRecommend.count.innerHTML=recommendCountText(json['1'].count);oRecommend.container.removeChild(oRecommend.loading);$D.removeClass(oRecommend.container,'loading');$D.addClass(oRecommend.container,'recommended');if(pvSelf){pvSelf.recommending=false;}} function getDataFailure(o){if(pvSelf){pvSelf.recommending=false;}}} function toggle(t){if(!t)return false;switch(t){case'f':$D.removeClass(oRecommend.container,'recommended');break;case'b':$D.addClass(oRecommend.container,'recommended');break;}} function getData(imageid,index){if(pvSelf.imageDataObj['image'+index].image_recommend_data)return false;var recommendCookie=pvSelf.getCookie('yn_lrate');if(recommendCookie&&(recommendCookie Loading images';} function show(){switch(pvSelf.type){case'gallery':self.galleryContainer.appendChild(html);break;default:self.photoContainer.appendChild(html);break;} this.busy=true;} function hide(){switch(pvSelf.type){case'gallery':self.galleryContainer.removeChild(html);break;default:self.photoContainer.removeChild(html);break;} this.busy=false;} return{init:init,show:show,hide:hide,busy:self.busy}}(),LoadSlideshows:function(){var oLoadSlideshows=this;function init(){oLoadSlideshows.categories=$D.get('slideshowdd');if(oLoadSlideshows.categories){$E.on(oLoadSlideshows.categories,'change',getData,oLoadSlideshows.categories);oLoadSlideshows.container=$D.get('ypv-slideshows');oLoadSlideshows.bd=$D.getElementsByClassName('bd','DIV',oLoadSlideshows.container)[0];oLoadSlideshows.hd=$D.getPreviousSibling(oLoadSlideshows.bd);oLoadSlideshows.title=oLoadSlideshows.hd.getElementsByTagName('H2')[0];oLoadSlideshows.more=$D.get('sslink');oLoadSlideshows.loading=document.createElement('DIV');oLoadSlideshows.loading.id='loading';oLoadSlideshows.loading.innerHTML=' Loading slideshows';attachEvents();}} function attachEvents(){var mods=$D.getElementsByClassName('mod','DIV',oLoadSlideshows.bd);if(mods){function fireBeacon(target){if(!target){return false;} target.slk=target.innerHTML;target.slk=target.slk.replace(/\s+/g,'');target.slk=target.slk.replace(/[^a-zA-Z0-9-]/g,'');target.slk=target.slk.toLowerCase();pvSelf.UltBeacon.send({'sec':'ypv_ss','slk':target.slk});var delay=setTimeout(function(){location.href=target.href;},500);} function mouseover(e,o){$D.addClass(o,'active');} function mouseout(e,o){$D.removeClass(o,'active');} function clicked(e,o){if(e){$E.stopEvent(e);var target=$E.getTarget(e);} if(target.nodeName!='A'&&target.nodeName!='IMG'){var anchor=o.getElementsByTagName('A')[0];fireBeacon(anchor);}else if(target.nodeName=='IMG'){var anchor=o.getElementsByTagName('A')[0];fireBeacon(anchor);}else{fireBeacon(target);}} var mln=mods.length;for(var x=0;x/gi,'');var title=option.innerHTML;title=title.replace(' Slideshows','');title=title.replace('Photos','');h2=title+' Slideshows';linktitle='All '+title+' Photos and Slideshows';oLoadSlideshows.title.innerHTML=h2;oLoadSlideshows.more.innerHTML=linktitle;if(option.id=='featured'){oLoadSlideshows.more.href='/images';}else{oLoadSlideshows.more.href='/images'+option.value;} if(response.length<25){oLoadSlideshows.bd.innerHTML='

    Sorry, we could not retrieve '+title+'. Please select another slideshow.

    ';}else{oLoadSlideshows.bd.innerHTML=o.responseText;attachEvents();} oLoadSlideshows.hd.removeChild(oLoadSlideshows.loading);} function getDataFailure(o){}} return{init:init}}(),Darla:function(){var sponsored=false;var level=2;var lrec=false;var darla=false;var clicks=0;function init(){var sponsor=$D.get('sponsor');if(sponsor){level=0;sponsored=true;}} function clickTracker(){if(sponsored){clicks++;if((clicks%pvSelf.darlaConfig.clickIteration)==0){level=2;}else{level=0;}}} function show(sp,attr){if(!darla||!lrec){lrec=$D.get('lrec');darla=$D.get('darla');} if(lrec){lrec.innerHTML='';lrec.style.display='none';} if(darla)darla.style.display='block';clickTracker();var changePhotoConfig={callFrame:"z",callScript:"/"+pvSelf.apiURL.url_prefix+"/darla",rotation:5000,autoRotation:false,property:"news",destinationMap:{},otherParams:{"t_e":1,".intl":"us"},events:{"changephoto":{lv:level,sp:sp,ps:"LREC",em:escape('{"site-attribute":"content=\'no_expandable\'}"')}}} if(window.YAHOO.ads.darla)YAHOO.ads.darla.setConfig(changePhotoConfig);if(window.YAHOO.ads.darla)YAHOO.ads.darla.event("changephoto",{lv:2});} return{init:init,show:show}}(),PageView:function(){var iframe=false;function init(){iframe=document.createElement('IFRAME');iframe.src='';iframe.style.width="0px";iframe.style.height="0px";iframe.style.display='none';iframe.name='pageview';document.body.appendChild(iframe);} function call(type){if(iframe){switch(type){case'gallery':var imageid='';var categoryid='';break;case'end-of-slideshow':var imageid='';var categoryid='';break;default:var img=pvSelf.imageDataObj['image'+pvSelf.currentImage];var imageid='&imageid='+img.image_id;var categoryid='&cid='+img.image_category_id;break;} if(pvSelf.ssControls.status){iframe.src="javascript:document.location.replace('"+pvSelf.config.urls.pageview+"?autoplay=true&spaceid="+pvSelf.currentSpaceID+imageid+categoryid+"')";}else{iframe.src="javascript:document.location.replace('"+pvSelf.config.urls.pageview+"?spaceid="+pvSelf.currentSpaceID+imageid+categoryid+"')";}}} return{init:init,call:call}}(),UltBeacon:function(){function send(clickData){if(pvSelf.ultSlideshow!=null){clickData.staid=pvSelf.ultSlideshow;} var ypvUltBeaconImage=new Image();if(YAHOO.ULT&&clickData!=null){clickData[YAHOO.ULT.SRC_SPACEID_KEY]=pvSelf.currentSpaceID;YAHOO.ULT.BEACON='http://geo.yahoo.com/t';YAHOO.ULT.beacon_click(clickData,ypvUltBeaconImage);}} function fire(e,param){send(param);} function init(){var tools=$D.get('photoTools');if(!tools)return false;var anchors=tools.getElementsByTagName('A');var sec='ypv_tools';for(var x=0,ln=anchors.length;x-1){msgr_installed=1;msgr_version="";msgr_platform="";break;}}} if(msgr_installed){var imlink=$D.getElementsByClassName('iim','A')[0];if(imlink){imlink.style.display='inline';$E.addListener(imlink,'click',function(e){if(e)$E.stopEvent(e);imStory(this.title,this.href);});}}}}}(),HashPhotoRedirect:function(){function init(login){if(!login)var login=false;var host=document.location.host;var path=document.location.pathname;var split=path.split('im:');var ss_id=split[0];if(!split[1])ss_id=ss_id+'/';var hash=document.location.hash;var image_id=hash.split('#photoViewer=')[1];if(path.indexOf('/photo/')!='-1'){var seo=path.split('/photo/');var new_url='http://'+host+seo[0]+'/photo/'+image_id+'/';}else{var new_url='http://'+host+ss_id+'im:'+image_id+'/';} if(login){var new_url=pvSelf.config.urls.login+'?.intl='+pvSelf.config.urls.intl+'&.done='+new_url;} document.location.href=new_url;return false;} return{init:init}}(),HistoryManager:function(){function init(){var module="photoViewer";var historyIFrame='yui-history-iframe';var historyField='yui-history-field';var bookMarkedState=$H.getBookmarkedState(module);var initialState=bookMarkedState||pvSelf.imageDataObj['image'+pvSelf.currentImage].image_id;var iframe=document.createElement('IFRAME');iframe.id=historyIFrame;var input=document.createElement('INPUT');input.type='hidden';input.id=historyField;document.body.appendChild(iframe);document.body.appendChild(input);function stateChangeHandler(state){if(!state)return false;for(var i in pvSelf.thumbList){if(pvSelf.thumbList[i]==state&&pvSelf.imageDataObj['image'+pvSelf.currentImage].image_id!=state) {var t=true;pvSelf.Photo.show(null,i,t);}}} $H.register(module,initialState,stateChangeHandler);try{$H.initialize(historyField,historyIFrame);}catch(e){} $H.onReady(function(){var currentState=$H.getCurrentState(module);stateChangeHandler(currentState);});} return{init:init}}(),Date:function(){function convertMonth(o){var month=new Array();month[month.length]="Jan";month[month.length]="Feb";month[month.length]="Mar";month[month.length]="Apr";month[month.length]="May";month[month.length]="Jun";month[month.length]="Jul";month[month.length]="Aug";month[month.length]="Sep";month[month.length]="Oct";month[month.length]="Nov";month[month.length]="Dec";return month[o];} function convertTime(hour,minute){var ampm="AM";if(hour>=12){ampm="PM";if(hour!=12)hour=hour-12;} time=hour+":"+minute+" "+ampm;return time;} return{convertMonth:convertMonth,convertTime:convertTime}}(),destroy:function(){if(YAHOO.lang.isNull(pvSelf))return false;for(var i in pvSelf){if(YAHOO.lang.hasOwnProperty(pvSelf,i)){pvSelf[i]=null;}}},checkTarget:function(obj,el){if(obj==null)return false;if(obj.nodeName==el){return true;}else{return false;}},getCookie:function(sName){var sRE="(?:; )?"+sName+"=([^;]*);?";var oRE=new RegExp(sRE);if(oRE.test(document.cookie)){return decodeURIComponent(RegExp["$1"]);}else{return false;}}};if(document.location.hash){YAHOO.News.PhotoViewer.prototype.HashPhotoRedirect.init();}})();