var YI={anim:YAHOO.util.Anim,customEvent:YAHOO.util.CustomEvent,dom:YAHOO.util.Dom,getByClass:YAHOO.util.Dom.getElementsByClassName,easing:YAHOO.util.Easing,effect:YAHOO.widget.ContainerEffect,event:YAHOO.util.Event,lang:YAHOO.lang,region:YAHOO.util.Region,ua:YAHOO.env.ua,widget:YAHOO.widget},Y3=YUI(),addthis_config={services_compact:'digg, email, facebook, google, twitter, live, delicious, technorati, linkedin, yahoobkm, myspace, favorites',data_track_linkbacks:true},tabDisplay,overlay,tipline,TabDisplay,OverlayMgr,OverlayTrigger,Tooltip,TipLine;YI.event.on(window,'load',function()
{tabDisplay=new TabDisplay('infographic','infographic');tipline=new TipLine(YI.getByClass('tooltip','div')[0],YI.getByClass('lineHover','div')[0]);tabDisplay.ontabchange.subscribe(function(e,tabIndex)
{tipline.disappear();});if(YI.dom.get('overlay'))
{overlay=new OverlayMgr('overlay');}
YI.dom.batch(YI.dom.get('mapStage1').getElementsByTagName('area'),function(o)
{if(YI.dom.getAttribute(o,'shape').toLowerCase()=='circle')
{var classes=YI.dom.getAttribute(o,'class').split(/\s+/),label=YI.dom.get(classes[0].replace('view','stage1')),isBig=YI.dom.hasClass(label,'bigLabel');YI.event.on(o,'mouseover',function(e)
{YI.dom.addClass(label,isBig?'bigLabelHover':'labelHover');YI.dom.setStyle('stage1','cursor','pointer');});YI.event.on(o,'mouseout',function(e)
{YI.dom.removeClass(label,isBig?'bigLabelHover':'labelHover');YI.dom.setStyle('stage1','cursor','auto');});YI.event.on(o,'click',function(e)
{overlay.show(classes[0]);});}});YI.dom.batch(YI.dom.get('mapStage2').getElementsByTagName('area'),function(o)
{if(YI.dom.getAttribute(o,'shape').toLowerCase()=='circle')
{var classes=YI.dom.getAttribute(o,'class').split(/\s+/),label=YI.dom.get(classes[0].replace('view','stage2')),isBig=YI.dom.hasClass(label,'bigLabel');YI.event.on(o,'mouseover',function(e)
{tipline.disappear();YI.dom.addClass(label,isBig?'bigLabelHover':'labelHover');YI.dom.setStyle('stage2','cursor','pointer');});YI.event.on(o,'mouseout',function(e)
{YI.dom.removeClass(label,isBig?'bigLabelHover':'labelHover');YI.dom.setStyle('stage2','cursor','auto');});YI.event.on(o,'click',function(e)
{overlay.show(classes[0]);});}});YI.dom.batch(YI.dom.get('mapStage3').getElementsByTagName('area'),function(o)
{if(YI.dom.getAttribute(o,'shape').toLowerCase()=='circle')
{var classes=YI.dom.getAttribute(o,'class').split(/\s+/),label=YI.dom.get(classes[0].replace('view','stage3')),isBig=YI.dom.hasClass(label,'bigLabel');YI.event.on(o,'mouseover',function(e)
{tipline.disappear();YI.dom.addClass(label,isBig?'bigLabelHover':'labelHover');YI.dom.setStyle('stage3','cursor','pointer');});YI.event.on(o,'mouseout',function(e)
{YI.dom.removeClass(label,isBig?'bigLabelHover':'labelHover');YI.dom.setStyle('stage3','cursor','auto');});YI.event.on(o,'click',function(e)
{overlay.show(classes[0]);});}});YI.dom.batch(YI.getByClass('overlayTrigger','a'),function(o)
{YI.event.on(o,'click',function(e)
{overlay.show(YI.dom.getAttribute(o,'rel'));YI.event.stopEvent(e);});});var stage2Lines={'viewAdcPetroecuador':{'color':'green','tooltip':'<em>Petroecuador</em> has largely escaped any criticism by the <em>Amazon Defense Coalition</em>. Pablo Fajardo, a lawyer associated with the Amazon Defense Coalition, was quoted in an interview with <i>La Hora</i> newspaper on October 20, 2006, demanding that Petroecuador stop a remediation effort because it was altering his case. The state oil company stands to benefit, directly and indirectly, if the cost of widespread remediation is shifted to Chevron.','lineClass':'lineAdcPetroecuador','offset':[140,117]},'viewRCorreaFajardo':{'color':'blue','tooltip':'<em>Pablo Fajardo</em> has accompanied <em>President Correa</em> on a media tour of the Amazon. President Correa has thrown the support of the government behind Fajardo and Yanza, offering to help gather evidence against Chevron.','lineClass':'lineRCorreaFajardo','offset':[122,172]},'viewRCorreaVillacis':{'color':'blue','tooltip':'<em>Alejandro Ponce Villac&#237;s</em> was one of the Lago Agrio plaintiffs&#8217; attorneys in the lawsuit against Chevron. He is also <em>President Correa&#8217;s</em> personal attorney.','lineClass':'lineRCorreaVillacis','offset':[45,172]},'viewRCorreaAdc':{'color':'blue','tooltip':'<em>President Correa</em> has met with Pablo Fajardo, the lead lawyer for the Lago Agrio plaintiffs, and Luis Yanza, of the <em>Amazon Defense Coalition</em> &ndash; accompanying them on a media tour of the Amazon. He has called Yanza and Fajardo national &#8220;heroes&#8221; and said his government fully supports the efforts of the Amazon Defense Coalition in its legal battle against Chevron.','lineClass':'lineRCorreaAdc','offset':[140,172]},'viewRCorreaYanza':{'color':'blue','tooltip':'<em>Luis Yanza</em> has accompanied <em>President Correa</em> on a media tour of the Amazon. President Correa has thrown the support of the government behind Yanza and Fajardo, offering to help gather evidence against Chevron.','lineClass':'lineRCorreaYanza','offset':[260,172]},'viewAdcViva':{'color':'green','tooltip':'The <em>Amazon Defense Coalition</em> receives funding through <em>Selva Viva</em>, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition.','lineClass':'lineAdcViva','offset':[140,531]},'viewVivaCabrera':{'color':'green','tooltip':'<em>Selva Viva</em> paid at least $200,000 to <em>Richard Cabrera</em>, a mining engineer with no experience or training in oil field remediation work. The checks were apparently signed by Luis Yanza, legal coordinator of the Amazon Defense Coalition and general manager of Selva Viva.','lineClass':'lineVivaCabrera','offset':[206,589]},'viewAdcCabrera':{'color':'green','tooltip':'<em>Richard Cabrera</em>, a mining engineer, was appointed by the court to assess the extent and cause of damages, if any, from oil operations in the former concession area, and to suggest remediation. Cabrera was paid by the <em>Amazon Defense Coalition</em> for work in a previous phase of the trial. Members of the Amazon Defense Coalition participated in Cabrera&#8217;s evidence gathering. He also has appeared at public presentations and forums alongside Pablo Fajardo and scientists hired by the Amazon Defense Coalition.','lineClass':'lineAdcCabrera','offset':[140,531]},'viewCabreraNunez':{'color':'blue','tooltip':'<em>Judge N&uacute;&#241;ez</em> shielded <em>Richard Cabrera</em> from being deposed or questioned in person by Chevron&#8217;s lawyers. He denied Chevron&#8217;s request for a hearing on &#8220;fundamental flaws&#8221; that Chevron alleges invalidate the Cabrera reports and, once proven, would be ground for striking them from the record in their entirety.','lineClass':'lineCabreraNunez','offset':[110,656]},'viewYanzaViva':{'color':'blue','tooltip':'The company records of <em>Selva Viva</em>, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition, list <em>Luis Yanza</em> as the company&#8217;s general manager.','lineClass':'lineYanzaViva','offset':[261,484]},'viewAdcYanza':{'color':'blue','tooltip':'<em>Luis Yanza</em> is the legal coordinator of the <em>Amazon Defense Coalition</em>.','lineClass':'lineAdcYanza','offset':[139,484]},'viewFajardoViva':{'color':'blue','tooltip':'<em>Pablo Fajardo</em>, lead lawyer for the Lago Agrio plaintiffs, is a member of <em>Selva Viva</em>, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition.','lineClass':'lineFajardoViva','offset':[122,422]},'viewFajardoYanza':{'color':'blue','tooltip':'<em>Pablo Fajardo</em> and <em>Luis Yanza</em> work closely together. They appear together at most public events and they are both associated with the ADC and Selva Viva, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition.','lineClass':'lineFajardoYanza','offset':[122,423]},'viewAdcFajardo':{'color':'blue','tooltip':'<em>Pablo Fajardo</em> is the lead Ecuadorian lawyer for the plaintiffs in the lawsuit against Chevron and is closely associated with the <em>Amazon Defense Coalition</em>.','lineClass':'lineAdcFajardo','offset':[122,423]},'viewAdcVillacis':{'color':'blue','tooltip':'<em>Alejandro Ponce Villac&#237;s</em> at one time served as one of the lead Ecuadorian lawyers for the Lago Agrio plaintiffs.','lineClass':'lineAdcVillacis','offset':[44,502]},'viewVillacisFajardo':{'color':'blue','tooltip':'As a top Ecuadorian lawyer in the case, <em>Alejandro Ponce Villac&#237;s</em> worked closely with <em>Pablo Fajardo</em>.','lineClass':'lineVillacisFajardo','offset':[44,423]},'viewRCorreaLarrea':{'color':'blue','tooltip':'<em>Gustavo Larrea</em> was <em>President Correa&#8217;s</em> campaign manager during his 2006 presidential bid. He then became Internal Security Minister in the Correa Administration. It has been reported that Larrea was involved in the government&#8217;s alleged ties to the FARC, including contributions from the FARC to Correa&#8217;s electoral campaign.','lineClass':'lineRCorreaLarrea','offset':[533,172]},'viewRCorreaGarcia':{'color':'blue','tooltip':'<em>Patricio Garc&iacute;a</em> represents himself as an official with Alianza PAIS, <em>President Correa&#8217;s</em> ruling political party, and claims to have contacts within President Correa&#8217;s innermost circles, including his sister Pierina and his legal advisor, Alex Mera.','lineClass':'lineRCorreaGarcia','offset':[533,172]},'viewRCorreaPesantez':{'color':'blue','tooltip':'Not long after <em>President Correa</em> publicly called for a prosecution, <em>Washington Pes&aacute;ntez</em> issued an unfounded indictment for fraud against two Chevron lawyers and nine former government officials involved in the remediation accords.','lineClass':'lineRCorreaPesantez','offset':[533,153]},'viewRCorreaFCorrea':{'color':'green','tooltip':'<em>President Correa&#8217;s</em> brother, <em>Fabricio Correa</em>, is involved in a scandal for allegedly receiving government contracts.','lineClass':'lineRCorreaFCorrea','offset':[533,70]},'viewRCorreaPetroecuador':{'color':'blue','tooltip':'The Correa Administration oversees the operations of the state-owned oil company, <em>Petroecuador</em>. During <em>President Correa&#8217;s</em> tenure, the company continues to be criticized in the media for its dismal environmental record, rampant levels of corruption and lack of accountability for its share of remediation.','lineClass':'lineRCorreaPetroecuador','offset':[447,117]},'viewPetroecuadorFCorrea':{'color':'green','tooltip':'According to press reports, President Correa&#8217;s brother, <em>Fabricio Correa</em>, is associated with companies that have contracts with <em>Petroecuador</em>. The legality of these contracts has been questioned due to laws in Ecuador prohibiting family members of high-ranking officials from doing business with the state.','lineClass':'linePetroecuadorFCorrea','offset':[447,70]},'viewGarciaNunez':{'color':'blue','tooltip':'<em>Patricio Garc&iacute;a</em>, who presented himself as a representative of Alianza PAIS, President Correa&#8217;s ruling political party, arranged meetings between <em>Judge Juan N&uacute;&#241;ez</em> and two businessmen in an effort to solicit $3 million in bribes in return for awarding environmental remediation contracts after the verdict is handed down.','lineClass':'lineGarciaNunez','offset':[110,304]}},stage3Lines={'viewAdcAw':{'color':'green','tooltip':'According to tax records, <em>Amazon Watch</em> gave nearly $70,000 between 2005 and 2007 to the <em>Amazon Defense Coalition</em>.','lineClass':'lineAdcAw','offset':[144,390]},'viewAdcHinton':{'color':'blue','tooltip':'<em>Karen Hinton</em> is one of the leading spokespersons for the <em>Amazon Defense Coalition</em>.','lineClass':'lineAdcHinton','offset':[144,425]},'viewAdcKsp':{'color':'green','tooltip':'Press reports suggest that <em>Kohn, Swift &amp; Graf PC</em> stands to profit greatly from a settlement or judgment against Chevron.','lineClass':'lineAdcKsp','offset':[144,484]},'viewKspViva':{'color':'green','tooltip':'<em>Selva Viva</em> is an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition.  The organization is funded by <em>Kohn, Swift &amp; Graf PC</em> to help pay for costs associated with the lawsuit.','lineClass':'lineKspViva','offset':[41,491]},'viewAdcDonziger':{'color':'green','tooltip':'Press reports suggest that <em>Steven Donziger</em> stands to realize great profit from a financial settlement or judgment against Chevron.','lineClass':'lineAdcDonziger','offset':[144,483]},'viewKspBonifaz':{'color':'blue','tooltip':'In 1993, <em>Crist&oacute;bal Bonifaz</em> enlisted the support of Joe Kohn, of Kohn, Swift &amp; Graf PC, and <em>Steven Donziger</em> to file the first lawsuit against Texaco in a New York federal court.','lineClass':'lineKspBonifaz','offset':[472,485]},'viewBonifazDonziger':{'color':'blue','tooltip':'In 1993, <em>Crist&oacute;bal Bonifaz</em> enlisted the support of Joe Kohn, of Kohn, Swift &amp; Graf PC, and <em>Steven Donziger</em> to file the first lawsuit against Texaco in a New York federal court.','lineClass':'lineBonifazDonziger','offset':[472,485]},'viewVivaDonziger':{'color':'blue','tooltip':'The company records of <em>Selva Viva</em>, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition, list <em>Steven Donziger</em> as the company&#8217;s president.','lineClass':'lineVivaDonziger','offset':[41,549]},'viewDonzigerVillacis':{'color':'blue','tooltip':'<em>Steven Donziger</em> and <em>Alejandro Ponce Villac&#237;s</em> worked together to formulate legal strategy on the case.','lineClass':'lineDonzigerVillacis','offset':[213,394]},'viewDonzigerFajardo':{'color':'blue','tooltip':'<em>Steven Donziger</em> now oversees the campaign against Chevron, working closely with <em>Pablo Fajardo</em>.','lineClass':'lineDonzigerFajardo','offset':[217,599]},'viewDonzigerYanza':{'color':'blue','tooltip':'<em>Steven Donziger</em> now oversees the campaign against Chevron, working closely with <em>Luis Yanza</em>.','lineClass':'lineDonzigerYanza','offset':[115,599]},'viewNunezCabrera':{'color':'blue','tooltip':'<em>Judge N&uacute;&#241;ez</em> shielded <em>Richard Cabrera</em> from being deposed or questioned in person by Chevron&#8217;s lawyers. He denied Chevron&#8217;s request for a hearing on &#8220;fundamental flaws&#8221; that Chevron alleges invalidate the Cabrera reports and, once proven, would be ground for striking them from the record in their entirety.','lineClass':'lineNunezCabrera','offset':[42,392]},'viewCabreraViva':{'color':'green','tooltip':'<em>Selva Viva</em> paid at least $200,000 to <em>Richard Cabrera</em>, a mining engineer with no experience or training in oil field remediation work. The checks were signed by Luis Yanza, legal coordinator of the Amazon Defense Coalition and general manager of Selva Viva.','lineClass':'lineCabreraViva','offset':[40,453]},'viewVivaYanza':{'color':'blue','tooltip':'The company records of <em>Selva Viva</em>, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition, list <em>Luis Yanza</em> as the company&#8217;s general manager.','lineClass':'lineVivaYanza','offset':[40,549]},'viewYanzaFajardo':{'color':'blue','tooltip':'<em>Pablo Fajardo</em> and <em>Luis Yanza</em> work closely together. They appear together at most public events and they are both associated with the ADC and Selva Viva, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition.','lineClass':'lineYanzaFajardo','offset':[115,605]},'viewVivaFajardo':{'color':'blue','tooltip':'<em>Pablo Fajardo</em>, lead lawyer for the Lago Agrio plaintiffs, is a member of <em>Selva Viva</em>, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition.','lineClass':'lineVivaFajardo','offset':[40,549]},'viewAdcYanza3':{'color':'blue','tooltip':'<em>Luis Yanza</em> is the legal coordinator of the <em>Amazon Defense Coalition</em>.','lineClass':'lineAdcYanza3','offset':[115,482]},'viewAdcViva3':{'color':'green','tooltip':'The <em>Amazon Defense Coalition</em> receives funding through <em>Selva Viva</em>, an Ecuadorian company that serves as the financial and logistical intermediary for the Amazon Defense Coalition.','lineClass':'lineAdcViva3','offset':[40,482]},'viewAdcCabrera3':{'color':'green','tooltip':'<em>Richard Cabrera</em>, a mining engineer, was appointed by the court to assess the extent and cause of damages, if any, from oil operations in the former concession area, and to suggest remediation. Cabrera was paid by the <em>Amazon Defense Coalition</em> for work in a previous phase of the trial. Members of the Amazon Defense Coalition participated in Cabrera&#8217;s evidence gathering. He also has appeared at public presentations and forums alongside Pablo Fajardo and scientists hired by the Amazon Defense Coalition.','lineClass':'lineAdcCabrera3','offset':[40,453]},'viewAdcVillacis3':{'color':'blue','tooltip':'<em>Alejandro Ponce Villac&#237;s</em> at one time served as one of the lead Ecuadorian lawyers for the Lago Agrio plaintiffs.','lineClass':'lineAdcVillacis3','offset':[144,394]},'viewFajardoVillacis':{'color':'blue','tooltip':'As a top Ecuadorian lawyer in the case, <em>Alejandro Ponce Villac&#237;s</em> worked closely with <em>Pablo Fajardo</em>.','lineClass':'lineFajardoVillacis','offset':[213,394]},'viewAdcFajardo3':{'color':'blue','tooltip':'<em>Pablo Fajardo</em> is the lead Ecuadorian lawyer for the plaintiffs in the lawsuit against Chevron and is closely associated with the <em>Amazon Defense Coalition</em>.','lineClass':'lineAdcFajardo3','offset':[144,483]},'viewAwDonziger':{'color':'green','tooltip':'<em>Steven Donziger</em> is an ongoing financial contributor to <em>Amazon Watch</em>, a San Francisco-based activist group that has partnered with the Amazon Defense Coalition in an international campaign against Chevron.','lineClass':'lineAwDonziger','offset':[532,391]},'viewKspAw':{'color':'green','tooltip':'<em>Kohn, Swift &amp; Graf PC</em> is an ongoing financial donor to <em>Amazon Watch</em>, a San Francisco-based activist group that has partnered with the Amazon Defense Coalition in an international campaign against Chevron.','lineClass':'lineKspAw','offset':[552,391]},'viewKspDonziger':{'color':'blue','tooltip':'<em>Steven Donziger</em>, the lead legal advisor in the lawsuit against Chevron, joined Joe Kohn and Crist&oacute;bal Bonifaz to file the original lawsuit in 1993. Since then, Donziger has served as the intermediary between <em>Kohn, Swift &amp; Graf PC</em> and the Ecuadorian team &ndash; securing and soliciting funds as well as developing legal strategy.<br /><br />Donziger now oversees the campaign against Chevron, which is partially funded by Kohn, Swift &amp; Graf PC.','lineClass':'lineKspDonziger','offset':[532,491]},'viewKspBarnes':{'color':'blue','tooltip':'<em>Kohn Swift &amp; Graf</em> retained DC lobbyist <em>Ben Barnes</em> to lobby the US Congress regarding environmental matters resulting from oil exploration in Ecuador.','lineClass':'lineKspBarnes','offset':[570,491]},'viewHintonBarnes':{'color':'blue','tooltip':'<em>Karen Hinton</em>, who provides public relations and media support for the Amazon Defense Coalition in the campaign against Chevron, lists the <em>Ben Barnes Group</em> on her company&#8217;s website of current and past clients.','lineClass':'lineHintonBarnes','offset':[665,426]}},stage2=YI.getByClass('second','div')[0],stage3=YI.getByClass('third','div')[0],className,config;YI.dom.batch(stage2.getElementsByTagName('area'),function(o)
{className=YI.dom.getAttribute(o,'class');config=stage2Lines[className];if(className=='viewStage3')
{YI.event.on(o,'mouseover',function(e)
{YI.dom.setStyle('stage2','cursor','pointer');});YI.event.on(o,'mouseout',function(e)
{YI.dom.setStyle('stage2','cursor','auto');});YI.event.on(o,'click',function(e)
{tabDisplay.displayTab('third');});}
else if(config)
{YI.event.on(o,'mouseover',function(e,config)
{tipline.show(config.color,config.tooltip,e,config.lineClass,config.offset,stage2);YI.dom.setStyle('stage2','cursor','pointer');if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<7)
{YI.dom.batch(YI.getByClass('labelHover','div',stage2),function(label)
{YI.dom.removeClass(label,'labelHover');});YI.dom.batch(YI.getByClass('bigLabelHover','div',stage2),function(label)
{YI.dom.removeClass(label,'bigLabelHover');});}},config);YI.event.on(o,'mouseout',function(e)
{if(!YAHOO.env.ua.ie)tipline.hide();YI.dom.setStyle('stage2','cursor','auto');});}});YI.dom.batch(stage3.getElementsByTagName('area'),function(o)
{className=YI.dom.getAttribute(o,'class');config=stage3Lines[className];if(className=='viewStage2')
{YI.event.on(o,'mouseover',function(e)
{YI.dom.setStyle('stage3','cursor','pointer');});YI.event.on(o,'mouseout',function(e)
{YI.dom.setStyle('stage3','cursor','auto');});YI.event.on(o,'click',function(e)
{tabDisplay.displayTab('second');});}
else if(config)
{YI.event.on(o,'mouseover',function(e,config)
{tipline.show(config.color,config.tooltip,e,config.lineClass,config.offset,stage3);YI.dom.setStyle('stage3','cursor','pointer');if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<7)
{YI.dom.batch(YI.getByClass('labelHover','div',stage3),function(label)
{YI.dom.removeClass(label,'labelHover');});YI.dom.batch(YI.getByClass('bigLabelHover','div',stage3),function(label)
{YI.dom.removeClass(label,'bigLabelHover');});}},config);YI.event.on(o,'mouseout',function(e)
{if(!YAHOO.env.ua.ie)tipline.hide();YI.dom.setStyle('stage3','cursor','auto');});}});});function getElementWidth(el)
{var region=YI.dom.getRegion(el);return(region.right-region.left);}
function getElementHeight(el)
{var region=YI.dom.getRegion(el);return(region.bottom-region.top);}
TabDisplay=function(tabContainer,displayContainer)
{this.SEL_TAB_CLASS='selected';this.TAB_CLASS='tab';this.DURATION=0.6;this.EASE=YI.easing.easeBoth;this.activeIndex=null;this.ontabchange=new YI.customEvent('tabChange',this);this.tabs=[];this.displays=[];YI.dom.batch(YI.getByClass(this.TAB_CLASS,'*',tabContainer),function(tab)
{var link=tab.getElementsByTagName('a')[0],index=YI.dom.getAttribute(link,'rel');this.tabs[index]=tab;this.displays[index]=YI.getByClass(index,'*',displayContainer);if(YI.dom.hasClass(tab,this.SEL_TAB_CLASS))
{this.activeIndex=index;}
YI.event.on(link,'click',this.clickTabHandler,index,this);},this,true);}
TabDisplay.prototype={clickTabHandler:function(e,index)
{this.displayTab(index);YI.event.stopEvent(e);},displayTab:function(index)
{var fadeIn,fadeOut;if(this.activeIndex)
{if(this.activeIndex==index)return;YI.dom.removeClass(this.tabs[this.activeIndex],this.SEL_TAB_CLASS);fadeOut=this.displays[this.activeIndex];}
YI.dom.addClass(this.tabs[index],this.SEL_TAB_CLASS);fadeIn=this.displays[index];this.activeIndex=index;this.fadeElements(fadeIn,fadeOut);this.ontabchange.fire(index);},fadeElements:function(fadeInEls,fadeOutEls)
{if(this.anim)this.anim.stop();this.anim=fadeAnim=new YI.anim(null,null,this.DURATION);fadeAnim.onTween.subscribe(function(type,data)
{YI.dom.setStyle(fadeInEls,'opacity',this.EASE(data[0].currentFrame,0,1,this.DURATION*1000));YI.dom.setStyle(fadeOutEls,'opacity',this.EASE(data[0].currentFrame,1,-1,this.DURATION*1000));},this,true);fadeAnim.onComplete.subscribe(function()
{YI.dom.setStyle(fadeOutEls,'display','none');this.anim=null;},this,true);YI.dom.setStyle(fadeInEls,'opacity',0);YI.dom.setStyle(fadeInEls,'display','block');fadeAnim.animate();}}
OverlayMgr=function(overlayEl)
{this.CLOSE_CLASS='close';this.ESC_CHAR_CODE=27;this.cont=YI.dom.get(overlayEl);this.overlay=new YI.widget.Panel(this.cont,{fixedcenter:false,modal:true,visible:false,close:false,underlay:false,effect:{effect:YI.effect.FADE,duration:0.5}});this.overlay.hideEvent.subscribe(this.hideCompleteHandler,this,true);this.overlay.render(document.body);this.btnsClose=YI.getByClass(this.CLOSE_CLASS,'a',this.cont);YI.dom.batch(this.btnsClose,function(btnClose)
{YI.event.on(btnClose,'click',this.clickCloseHandler,this,true);},this,true);YI.event.on(document,'keydown',this.keypressHandler,this,true);this.overlay.buildMask();YI.event.on(this.overlay.mask,'click',this.clickMaskHandler,this,true)
this.onshow=new YI.customEvent('show',this);this.onhide=new YI.customEvent('hide',this);this.activeCont=null;this.shown=false;}
OverlayMgr.prototype={keypressHandler:function(e)
{if(YI.event.getCharCode(e)==27)
{this.hide();}},clickCloseHandler:function(e)
{this.hide();YI.event.stopEvent(e);},clickMaskHandler:function(e)
{this.hide();YI.event.stopEvent(e);},load:function(content)
{this.clear();content=YI.dom.get(content);YI.dom.setStyle(content,'display','block');this.activeCont=content;},clear:function()
{if(this.activeCont)
{YI.dom.setStyle(this.activeCont,'display','none');this.activeCont=false;}},show:function(content)
{this.load(content);var scrollTop=YI.dom.getDocumentScrollTop(),scrollLeft=YI.dom.getDocumentScrollLeft(),yPos=scrollTop+(YI.dom.getViewportHeight()-getElementHeight(this.cont))/2,xPos=scrollLeft+(YI.dom.getViewportWidth()-getElementWidth(this.cont))/2;yPos=(yPos<scrollTop)?scrollTop:yPos;xPos=(xPos<scrollLeft)?scrollLeft:xPos;this.overlay.cfg.setProperty('y',yPos);this.overlay.cfg.setProperty('x',xPos);this.overlay.show();this.shown=true;this.onshow.fire();},hide:function()
{if(YI.ua.gecko&&YI.ua.gecko<1.9&&(/Macintosh/).test(navigator.userAgent))
{this.clear();}
this.overlay.hide();this.shown=false;this.onhide.fire();},hideCompleteHandler:function()
{this.overlay.cfg.setProperty('y',0);this.overlay.cfg.setProperty('x',0);}}
Tooltip=function(el)
{this.CONTENT_CLASS='cont';this.UP_CLASS='Up';this.DOWN_CLASS='Dn';this.LEFT_CLASS='Left';this.RIGHT_CLASS='Right';this.OFFSET_X=1;this.OFFSET_Y=1;this.DURATION=0.2;this.EASE=YI.easing.easeOut;this.DELAY=1.5;this.tooltip=YI.dom.get(el);this.contentArea=YI.getByClass(this.CONTENT_CLASS,'*',this.tooltip)[0];}
Tooltip.prototype={show:function(color,content,context)
{if(this.interval)this.interval.cancel();if(this.fade)this.fade.stop();if(this.shown&&this.currContent==content)
{return;}
this.contentArea.innerHTML=content;YI.dom.setStyle(this.tooltip,'opacity',0);YI.dom.setStyle(this.tooltip,'display','block');context=(context.type)?YI.event.getXY(context):YI.dom.get(context);var flagUp=this.hitsBottom(context)||!this.hitsTop(context),flagLeft=this.hitsRight(context)||!this.hitsLeft(context),x,y,newClassName=color,appear=new YI.anim(this.tooltip,{opacity:{from:0,to:1}},this.DURATION,this.EASE);if(flagUp)
{y=YI.lang.isArray(context)?context[1]:YI.dom.getRegion(context).top;y-=(this.tooltip.offsetHeight+this.OFFSET_Y);newClassName+=this.UP_CLASS;}
else
{y=YI.lang.isArray(context)?context[1]:YI.dom.getRegion(context).bottom;y+=this.OFFSET_Y;newClassName+=this.DOWN_CLASS;}
if(flagLeft)
{x=YI.lang.isArray(context)?context[0]:YI.dom.getRegion(context).left;x-=(this.tooltip.offsetWidth+this.OFFSET_X);newClassName+=this.LEFT_CLASS;}
else
{x=YI.lang.isArray(context)?context[0]:YI.dom.getRegion(context).right;x+=this.OFFSET_X;newClassName+=this.RIGHT_CLASS;}
YAHOO.util.Dom.removeClass(this.tooltip,this.currClass);YAHOO.util.Dom.addClass(this.tooltip,newClassName);this.currClass=newClassName;this.currContent=content;this.shown=true;YI.dom.setXY(this.tooltip,[x,y]);appear.animate();},hide:function()
{this.interval=Y3.later(this.DELAY*1000,this,this.disappear,null,false);},disappear:function()
{this.fade=new YI.anim(this.tooltip,{opacity:{from:1,to:0}},this.DURATION,this.EASE);this.fade.onComplete.subscribe(function()
{YI.dom.setStyle(this.tooltip,'display','none');YI.dom.setXY(this.tooltip,[0,0]);this.shown=false;},this,true);this.fade.animate();},hitsTop:function(context)
{var contextTop=YI.lang.isArray(context)?context[1]:YI.dom.getRegion(context).top,viewportTop=YI.dom.getDocumentScrollTop();return((contextTop-this.tooltip.offsetHeight-this.OFFSET_Y)<viewportTop);},hitsBottom:function(context)
{var contextBottom=YI.lang.isArray(context)?context[1]:YI.dom.getRegion(context).bottom,viewportBottom=YI.dom.getDocumentScrollTop()+YI.dom.getViewportHeight();return((contextBottom+this.tooltip.offsetHeight+this.OFFSET_Y)>viewportBottom);},hitsLeft:function(context)
{var contextLeft=YI.lang.isArray(context)?context[0]:YI.dom.getRegion(context).left,viewportLeft=YI.dom.getDocumentScrollLeft();return((contextLeft-this.tooltip.offsetWidth-this.OFFSET_X)<viewportLeft);},hitsRight:function(context)
{var contextRight=YI.lang.isArray(context)?context[0]:YI.dom.getRegion(context).right,viewportRight=YI.dom.getDocumentScrollLeft()+YI.dom.getViewportWidth();return((contextRight+this.tooltip.offsetWidth+this.OFFSET_X)>viewportRight);}}
TipLine=function(el,lineEl)
{TipLine.superclass.constructor.call(this,el);this.line=YI.dom.get(lineEl);}
YI.lang.extend(TipLine,Tooltip,{show:function(color,content,context,lineClass,position,lineContext)
{TipLine.superclass.show.call(this,color,content,context);YI.dom.removeClass(this.line,this.currLineClass);YI.dom.addClass(this.line,lineClass);this.currLineClass=lineClass;var lineContextRegion=YI.dom.getRegion(lineContext);YI.dom.setStyle(this.line,'visibility','hidden');YI.dom.setStyle(this.line,'display','block');YI.dom.setXY(this.line,[lineContextRegion.left+position[0],lineContextRegion.top+position[1]]);YI.dom.setStyle(this.line,'visibility','visible');},disappear:function()
{TipLine.superclass.disappear.call(this);YI.dom.setStyle(this.line,'display','none');YI.dom.setXY(this.line,[0,0]);}});