function registerNS(d){if(typeof d=="undefined"){return}var c=d.split(".");var a=window;for(var b=0;b<c.length;b++){if(typeof a[c[b]]=="undefined"){a[c[b]]=new Object()}a=a[c[b]]}}registerNS("TSCM.pages.PageInfo");registerNS("TSCM.metadata");registerNS("TSCM.cfg");registerNS("TSCM.util");registerNS("TSCM");TSCM.register=function(a){registerNS(a)};function audioPlayer(e,d){var f=null;var c=false;var j="selectedAudioFormat";var a="wma_player.html";var g="audio_player.html";if(d!=null){a=d+"_wma_player.html";g=d+"_audio_player.html"}if(document.cookie.indexOf(j)>-1){f=TSCM.util.GetCookie(";",j);if((f!=null)&&(f=="formatSelectedWMA")){b="http://www.thestreet.com/radio/"+a+"?clip="+e;window.open(b,"clip","WIDTH=400,HEIGHT=490,top=50,left=50,status=yes,toolbar=no,menubar=no,location=no,resizable=yes")}else{var b="http://www.thestreet.com/radio/"+g+"?clip="+e;window.open(b,"clip","WIDTH=400,HEIGHT=490,top=50,left=50,status=yes,toolbar=no,menubar=no,location=no,resizable=yes")}}else{var b="http://www.thestreet.com/radio/"+g+"?clip="+e;window.open(b,"clip","WIDTH=400,HEIGHT=490,top=50,left=50,status=yes,toolbar=no,menubar=no,location=no,resizable=yes")}}function log(b){if(typeof console!="undefined"){console.log(b)}else{var a=document.getElementById("consoleelement");if(a){a.innerHTML+="<p>"+b+"</p>"}}}function debug(b){try{h=document.getElementById("debug").innerHTML;document.getElementById("debug").innerHTML=b+"<br>"+h}catch(a){}}TSCM.util.isDefined=function(a){if(!YAHOO.lang.isUndefined(a)){return true}else{return false}};TSCM.util.GetCookie=function(f,d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;while(e<a){var c=e+g;if(document.cookie.substring(e,c)==b){return TSCM.util.getCookieVal(f,c)}e=document.cookie.indexOf(" ",e)+1;if(e==0){break}}return null};function GetCookie(b,a){return TSCM.util.GetCookie(b,a)}TSCM.util.getCookieVal=function(a,c){var b=document.cookie.indexOf(a,c);if(b==-1){b=document.cookie.length}return unescape(document.cookie.substring(c,b))};TSCM.util.PersistenceManager=function(ob){this.data=null;this.id="tscs_data";this.expiry_days=365;this.path="/";this.flashid=null;this.session_cookie=false;this.get=function(){var s=this.getCookie(this.id);try{var str="var o = "+s+"";eval(str);this.data=o}catch(e){return null}return this.data};this.getstr=function(){return this.data_str};this.getdata=function(){return this.data};this.setData=function(ob){if(typeof ob=="object"){this.data=ob;try{this.data_str=YAHOO.lang.JSON.stringify(ob)}catch(e){this.data_str=""}}else{if(typeof ob=="string"){this.data_str=ob;try{eval("var o = "+this.data_str);this.data=o}catch(e){this.data=e}}}};this.setDataStr=function(str){this.data_str=str};this.save=function(ob){if(typeof ob!="undefined"){this.setData(ob)}this.setCookie(this.id,this.data_str,this.expiry_days)};this.setCookie=function(cookieName,cookieValue,num_days){var today=new Date();var expiry=new Date();if(num_days==null||num_days==0){num_days=this.expiry_days}expiry.setTime(today.getTime()+3600000*24*num_days);try{var cs;if(this.session_cookie==true){cs=escape(cookieName)+"="+escape(cookieValue)+";path="+this.path}else{cs=escape(cookieName)+"="+escape(cookieValue)+";expires="+expiry.toGMTString()+";path="+this.path}document.cookie=cs}catch(e){}};this.getCookie=function(name){var prefix=name+"=";var begin=document.cookie.indexOf(prefix);if(begin==-1){begin=document.cookie.indexOf(prefix);if(begin!=0){return null}}else{}var end=document.cookie.indexOf(";",begin);if(end==-1){end=document.cookie.length}var t=unescape(document.cookie.substring(begin+prefix.length,end));return t};this.serialize=function(ob){window.status="flash-save not implemented";return;if(typeof ob!="undefined"){this.setData(ob)}if(this.flashid==null){throw"error-flash object not defined"}else{var fl=document.ElementById(this.flashid);fl.SetVariable("mtvi_yeti_data",this.data_str)}};this.setData(ob)};TSCM.util.getParameter=function(a){var k=window.location.search;if(top.location!=self.location){k=top.window.location.search}var f="=";var l="&";var c=a+f;try{var g=k.indexOf(c);if(g!=-1){var b=g+c.length;var m=k.substring(b);var d=m.indexOf(l);if(d!=-1){return m.substring(0,d)}else{return m.substring(0)}}}catch(j){return""}};TSCM.util.attachScript=function(g,a){var f=document.createElement("script");f.type="text/javascript";f.defer=true;f.id=g;f.src=a;var c=document.getElementById(g);var b=document.getElementsByTagName("head")[0];try{if(c){b.removeChild(c)}}catch(d){}b.appendChild(f);return};TSCM.util.getEl=function(a){return YAHOO.util.Dom.get(a)};TSCM.util.ImgError=function(a){a.width=0;a.height=0;a.src=TSCM.cfg.imagesBaseUrl+"/css/images/1x1.gif";a.style.margin=0;var b=document.getElementById(a.id);if(b){b.style.display="none"}};TSCM.util.Quote=function(b,a){this.server="http://custom.marketwatch.com";this.path="/custom/thestreet-com/xml-quote.asp?";this.params={output:"json",symb:null,callback:null};this.params.callback=b;this.params.symb=a;this.getParams=function(){var e="";for(var d in this.params){var g=this.params[d];if(g instanceof Array){var f=d;for(var c=0;c<g.length;c++){f+=g[c]}if(e!=""){e+="&"}e+=f}else{if(e!=""){e+="&"}f=d+"="+this.params[d];e+=f}}return e};this.url=this.server+this.path+this.getParams();this.get=function(){return attachScript(YAHOO.util.Dom.generateId(),this.url)};return this.url};TSCM.util.saveQuoteTickerToMiniBox=function(c){state=new TSCM.util.PersistenceManager();state.id="tsc_recentquotes";state.expiry_days=365;var b=state.get();var a=false;if(b!=null){if(b.length>20){b.shift()}for(i=0;i<b.length;i++){if(b[i]==c.toUpperCase()){a=true;break}}if(!a){b.push(c.toUpperCase())}}else{var b=new Array(c.toUpperCase())}state.save(b)};TSCM.util.positionToPlaceholder=function(a,f){var d=YAHOO.util.Dom;var c=d.get(a);var b=d.get(f);d.setXY(c,d.getXY(b));if(c.style.display==="none"){c.style.display="block"}if(c.style.visibility==="hidden"){c.style.visibility="visible"}};function log(a){if(typeof console!="undefined"){console.log(a)}}TSCM.util.getTrackingPixel=function(b){var a=Math.floor(Math.random()*100000000000);if(typeof b!="undefined"){if(b.indexOf("?")!=-1){b+="&"}else{b+="?"}b+="ord="+a;return"<img border='0' width='1' height='1' src='"+b+"'>"}};TSCM.util.Rss=new function(){return{latestVid:function(c){var d={success:function(m){var j;try{j=TSCM.cfg.contextRoot+"/video/index.html?bctid="+id;var g=m.responseXML;var f=g.getElementsByTagName("link");var k=f[1];j=k.firstChild.nodeValue}catch(l){j=TSCM.cfg.contextRoot+"/video/index.html"}document.location.href=j},failure:function(){log("connection failed");var e=TSCM.cfg.contextRoot+"/video/index.html";document.location.href=e},scope:this,argument:null};var a=TSCM.cfg.contextRoot+"/util/videoRSSProxy.jsp?id="+c;log(a);var b=YAHOO.util.Connect.asyncRequest("GET",a,d,null)}}};TSCM.util.loginLinks={loginId:"login",accountId:"account",bottomLoginId:"loginBottom",loginUrl:TSCM.cfg.contextRoot+"/k/community/login.html?targetUrl=",logoutUrl:TSCM.cfg.contextRoot+"/user/logoff.html?redirectTo="+TSCM.cfg.commerceBaseUrl+"%2fcap%2fuserLogoff.do%3furl%3dhttp%253a%252f%252fwww.thestreet.com%252findex.html%253flogoff%253dtrue",joinUrl:TSCM.cfg.contextRoot+"/k/community/register.html?targetUrl="+location.href,accountUrl:TSCM.cfg.commerceBaseUrl+"/cap/selfserve/SSMainMenu.jsp?site=tsc&url=http://www.thestreet.com/index.html",referringUrl:new String(window.location),updateLink:function(a){if(!YAHOO.lang.isUndefined(a)||!YAHOO.lang.isNull(a)){a.link.href=a.href;a.link.innerHTML=a.text}},handleAuthenticated:function(){TSCM.util.loginLinks.updateLink({link:YAHOO.util.Dom.get(this.loginId),href:this.logoutUrl,text:"Log Out"});TSCM.util.loginLinks.updateLink({link:YAHOO.util.Dom.get(this.accountId),href:this.accountUrl,text:"Your Account"});TSCM.util.loginLinks.updateLink({link:YAHOO.util.Dom.get(this.bottomLoginId),href:this.logoutUrl,text:"Log Out"})},handleUnathenticated:function(){TSCM.util.loginLinks.updateLink({link:YAHOO.util.Dom.get(this.loginId),href:this.loginUrl+this.referringUrl,text:"Log In"});TSCM.util.loginLinks.updateLink({link:YAHOO.util.Dom.get(this.accountId),href:this.joinUrl,text:"Join for Free!"});TSCM.util.loginLinks.updateLink({link:YAHOO.util.Dom.get(this.bottomLoginId),href:this.loginUrl+this.referringUrl,text:"Log In"})},init:function(){if(YAHOO.util.Cookie.get("RGIS")){var b=YAHOO.util.Cookie.get("RGIS");if(b.indexOf("|")!=-1){var a=YAHOO.util.Cookie.get("RGIS").split("|")[0]}else{var a=YAHOO.util.Cookie.get("RGIS").split(",")[0]}var c=a.replace('"',"");if(parseInt(c)>0){this.handleAuthenticated()}else{this.handleUnathenticated()}}else{this.handleUnathenticated()}}};YAHOO.util.Event.onDOMReady(TSCM.util.loginLinks.init,TSCM.util.loginLinks,true);if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(n,b,p,e,k,l,g,f,d,m){if(!document.getElementById){return}this.DETECT_KEY=m?m:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(n){this.setAttribute("swf",n)}if(b){this.setAttribute("id",b)}if(p){this.setAttribute("width",p)}if(e){this.setAttribute("height",e)}if(k){this.setAttribute("version",new deconcept.PlayerVersion(k.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(l){this.addParam("bgcolor",l)}var a=g?g:"high";this.addParam("quality",a);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var j=(f)?f:window.location;this.setAttribute("xiRedirectUrl",j);this.setAttribute("redirectUrl","");if(d){this.setAttribute("redirectUrl",d)}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(b,a){this.params[b]=a},getParams:function(){return this.params},addVariable:function(b,a){this.variables[b]=a},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var c=new Array();var b;var a=this.getVariables();for(b in a){c[c.length]=b+"="+a[b]}return c},getSWFHTML:function(){var b="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}b='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';b+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var f=this.getParams();for(var e in f){b+=[e]+'="'+f[e]+'" '}var d=this.getVariablePairs().join("&");if(d.length>0){b+='flashvars="'+d+'"'}b+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}b='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';b+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var c=this.getParams();for(var e in c){b+='<param name="'+e+'" value="'+c[e]+'" />'}var a=this.getVariablePairs().join("&");if(a.length>0){b+='<param name="flashvars" value="'+a+'" />'}b+="</object>"}return b},write:function(b){if(this.getAttribute("useExpressInstall")){var a=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(a)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var c=(typeof b=="string")?document.getElementById(b):b;c.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var f=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){f=new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var b=1;var c=3;while(b){try{c++;b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);f=new deconcept.PlayerVersion([c,0,0])}catch(d){b=null}}}else{try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(d){try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=new deconcept.PlayerVersion([6,0,21]);b.AllowScriptAccess="always"}catch(d){if(f.major==6){return f}}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(d){}}if(b!=null){f=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(","))}}}return f};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};deconcept.util={getRequestParameter:function(c){var d=document.location.search||document.location.hash;if(c==null){return d}if(d){var b=d.substring(1).split("&");for(var a=0;a<b.length;a++){if(b[a].substring(0,b[a].indexOf("="))==c){return b[a].substring((b[a].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var b=document.getElementsByTagName("OBJECT");for(var c=b.length-1;c>=0;c--){b[c].style.display="none";for(var a in b[c]){if(typeof b[c][a]=="function"){b[c][a]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(a){return document.all[a]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;TSCM.ads.sponsorName="";TSCM.cfg.customAdSponsor="";TSCM.cfg.SponsorIndexLink="";registerNS("TSCM.ads.Slider");TSCM.ads.adXMLFileToUse="ad.xml";TSCM.ads.setXMLFileToUse=function(a){if(YAHOO.lang.isString(a)){TSCM.ads.adXMLFileToUse=a}};TSCM.ads.getAdXML={init:function(b){TSCM.ads.sponsorName=b;var f={success:TSCM.ads.getAdXML.drawAd,failure:this.handleAdXMLfailure,scope:this,argument:null};function c(j,g){var k=document.createElement("link");k.href=j;k.rel="stylesheet";g.appendChild(k)}c(TSCM.cfg.staticFilePath+"/ads/css/customAdVideo.css",document.body);c(TSCM.cfg.staticFilePath+"/ads/customAdUnits/"+TSCM.ads.sponsorName+"/cau.css",document.body);function e(g){TSCM.cfg.customAdSponsor=g;TSCM.cfg.SponsorIndexLink=function(){if(TSCM.cfg.customAdSponsor==="small-business-solutions"){document.location=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.cfg.customAdSponsor+"/index.html"}else{if(TSCM.cfg.customAdSponsor==="business-news-update"){document.location=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.cfg.customAdSponsor+"/index.html"}else{if(TSCM.cfg.customAdSponsor==="technology-update"){document.location=TSCM.cfg.contextRoot+"/sponsor/"+TSCM.cfg.customAdSponsor+"/index.html"}else{document.location=TSCM.cfg.contextRoot+"/sponsor/"+TSCM.cfg.customAdSponsor+"/index.html?partner="+TSCM.cfg.customAdSponsor}}}}}e(TSCM.ads.sponsorName);var a=TSCM.cfg.staticFilePath+"/ads/customAdUnits/"+TSCM.ads.sponsorName+"/"+TSCM.ads.adXMLFileToUse;var d=YAHOO.util.Connect.asyncRequest("GET",a,f)},drawAd:function(d){var c=YAHOO.util.Dom.get("customUnit");c.innerHTML=d.responseText;if(TSCM.ads.sponsorName==="small-business-solutions"){var b=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.ads.sponsorName+"/ad.ajaxaction?callbackfunction=renderHeadlines"}else{if(TSCM.ads.sponsorName==="business-news-update"){var b=TSCM.cfg.contextRoot+"/sponsor-section/"+TSCM.ads.sponsorName+"/ad.ajaxaction?callbackfunction=renderHeadlines"}else{var b=TSCM.cfg.contextRoot+"/sponsor/"+TSCM.ads.sponsorName+"/ad.ajaxaction?callbackfunction=renderHeadlines"}}var a=document.createElement("script");a.src=b;a.type="text/javascript";document.body.appendChild(a)},handleAdXMLfailure:function(){}};TSCM.ads.placeQuiz=function(a){YAHOO.util.Dom.get(a.flashDiv).title="quiz";var b=new SWFObject(a.swfPath,"quiz",a.width,a.height,a.flashVersion,a.bgColor);b.addParam("wmode",a.wmode);b.addVariable("xmlFile",a.xmlPath);b.write(a.flashDiv)};YAHOO.util.Event.onAvailable("adImg",function(){var b=document.getElementById("adImg");var a=b.src;b.src=a+Math.floor(Math.random()*10000000000)});TSCM.ads.placePoll=function(b){YAHOO.util.Dom.get(b.flashDiv).title="poll";var a=b.questions.length-1;var c=Math.floor(Math.random()*a);var d=b.questions[c];var e=new SWFObject(b.swfPath,"poll",b.width,b.height,b.flashVersion,b.bgColor);e.addParam("align","middle");e.addParam("quality","high");e.addParam("menu","false");e.addParam("allowScriptAccess","sameDomain");e.addParam("wmode",b.wmode);e.addParam("flashVars",b.xmlDir+"node."+d+".xml");e.write(b.flashDiv)};var renderHeadlines=function(g){var e=YAHOO.util.Dom.getElementsByClassName("dart_adunit_article");for(var d=0;d<e.length;d++){var f=e[d];var a=g.results[d];var b=TSCM.cfg.contextRoot+a.link+"?partner="+TSCM.ads.sponsorName;if(TSCM.ads.sponsorName===("small-business-solutions")){b=b.replace("/story/","/sponsor-story/ups/")}else{if(TSCM.ads.sponsorName===("business-news-update")){b=b.replace("/story/","/sponsor-story/ups/")}else{if(TSCM.ads.sponsorName===("best-in-class")){b=b.replace("/story/","/sponsor-story/ups/")}}}var c=a.headline;f.setAttribute("href",b);f.innerHTML=c}};var scriptLink=function(b){var a=document.createElement("script");a.src=b;a.type="text/javascript";document.body.appendChild(a)};var cau_util={classRoll:function(a){YAHOO.util.Event.onAvailable("adunit_btm",function(){if(!a){a="customAdUnit"}var c=YAHOO.util.Dom.getElementsByClassName("cau_off","li",a);for(var b=0;b<c.length;b++){if(c[b].className=="cau_off"){c[b].onmouseover=function(){this.className="cau_over"};c[b].onmouseout=function(){this.className="cau_off"}}}})},grabAdXMLByPercent:function(a,c){var b=1+(Math.floor(Math.random()*100));if(b<=a){TSCM.ads.adXMLFileToUse=c}else{if(b<=100){TSCM.ads.adXMLFileToUse="ad.xml"}}}};if(TSCM.cfg.RMportal===false){var servicesPopup={init:function(){var f=YAHOO.util.Dom;var e=document.createElement("span");e.id="capsHoverTabServices";document.body.appendChild(e);var a=f.get("servicesPopup");var j=document.createElement("img");j.id="capsHoverSurround";j.src="http://i.thestreet.com/files/tsc/v2008/css/images/spacer.gif";document.body.appendChild(j);var g;if(premiumPage){g="iframe"}else{g="em"}var b=document.createElement(g);b.id="servicesiframeShim";document.body.appendChild(b);var c=f.get("servicesArrow");var d=f.get("servicesLink");enhanceServicesLink(d,e,a,j,c,b)}};function enhanceServicesLink(e,b,c,a,d,g){var f=YAHOO.util.Dom;e.onmouseover=function(){e.pos=f.getXY(e);var m=navigator.userAgent.toLowerCase();var n=m.indexOf("msie");if(n!=-1){if(e.offsetLeft<10){var j=e.parentNode;var l=j.childNodes;if(e!=l.item(0)){e.pos[1]=e.pos[1]+e.offsetHeight}}}d.src="http://i.thestreet.com/files/tsc/v2008/css/images/greenArrowTrans.gif";b.innerHTML=e.innerHTML;b.style.visibility="visible";var p=e.pos[0];var k=e.pos[1];b.style.left=p-3+"px";b.style.top=k+"px";c.style.visibility="visible";c.style.top=(k+b.offsetHeight+1)+"px";c.style.left=(p-(c.offsetWidth-b.offsetWidth)+1)+"px";a.style.visibility="visible";a.style.width=(c.offsetWidth+200)+"px";a.style.height=(c.offsetHeight+200)+"px";a.style.top=(k-100)+"px";a.style.left=(p-200)+"px";g.style.top=(k+23)+"px";g.style.left=(p-20)+"px";g.style.width=c.offsetWidth+"px";g.style.height=c.offsetHeight+"px";g.style.visibility="visible"};hideServicesHover=function(){d.src="http://i.thestreet.com/files/tsc/v2008/css/images/transArrow.gif";b.style.visibility="hidden";c.style.visibility="hidden";a.style.visibility="hidden";g.style.visibility="hidden";g.style.height=0+"px"};a.onmouseover=hideServicesHover;YAHOO.util.Event.addListener(window,"unload",hideServicesHover)}var tscNavRoll=new function(){var j=YAHOO.util.Dom;var a=YAHOO.util.Event;var d=[];var f=null;var c=null;var b=null;var e=null;var g=[];return{init:function(){var r=j.getRegion("nav");var p=j.getRegion("taxonomy_subnav");this.helperTop=tscNavRoll.createHelper("helperTop",j.getDocumentWidth(),3);this.helperBottom=tscNavRoll.createHelper("helperBottom",j.getDocumentWidth(),6);var m=YAHOO.util.Dom.getChildren(YAHOO.util.Dom.getFirstChild("nav"));var n=false;for(var l in m){var k=m[l];if(YAHOO.util.Dom.hasClass(k,"active")){this.defaultId=k.id;n=true}YAHOO.util.Event.on(k,"mouseover",function(s){tscNavRoll.over(this)})}if((!n)||typeof(this.defaultId)=="undefined"){this.defaultId=m[0].id}d=j.getChildren("taxonomy_subnav");for(var l in d){var q=d[l];if(q.id==="subnav_"+this.defaultId){this.defaultSubnav=q}}this.showDefault();YAHOO.util.Event.addListener(window,"resize",function(){tscNavRoll.positionAllHelpers()});window.setTimeout(function(){tscNavRoll.positionAllHelpers()},100);m=j.getChildren(j.getFirstChild("nav"))},over:function(n){var m=false;for(var l in d){var p=d[l];if(p.id==="subnav_"+n.id){m=true;j.setStyle(p,"display","block")}else{j.setStyle(p,"display","none")}}if(!m){j.setStyle(this.defaultSubnav,"display","block")}for(var l in g){var k=g[l];if(k.id===this.defaultId){}else{if(k.id==n.id){j.addClass(k,"active")}else{j.removeClass(k,"active")}}}},createHelper:function(l,k,m){var p=YAHOO.util.Dom;var n=document.createElement("div");n.id=l;document.body.appendChild(n);p.setStyle(n,"position","absolute");p.setStyle(n,"height",m+"px");p.setStyle(n,"font-nize","0px");p.setStyle(n,"padding","0px");p.setStyle(n,"margin","0px");p.setStyle(n,"background","transparent url(http://www.thestreet.com/files/tsc/v2008/css/images/1x1.gif) repeat");this.positionHelper(n);YAHOO.util.Event.on(n,"mouseover",function(q){this.showDefault()},this,true);return n},positionHelper:function(l){var n=j.getRegion("nav");var m=j.getRegion("taxonomy_subnav");switch(l.id){case"helperTop":var k=[0,(n.top-3)];break;case"helperBottom":var k=[0,(n.top+n.height+m.height)];break;default:log("unrecognized helper: "+l.id)}j.setXY(l.id,k);j.setStyle(l,"width",j.getViewportWidth()+"px")},positionAllHelpers:function(){try{this.positionHelper(this.helperTop);this.positionHelper(this.helperBottom)}catch(k){log(k)}},showDefault:function(){var m=YAHOO.util.Dom;for(var l in d){var n=d[l];m.setStyle(d[l],"display","none")}m.setStyle(this.defaultSubnav,"display","block");for(var l in g){var k=g[l];if(k.id==this.defaultId){}else{m.removeClass(k,"active")}}}}}}registerNS("TSCM.Quotes.MiniQuote");TSCM.Quotes.MiniQuote=new function(){var dom=YAHOO.util.Dom;var Evt=YAHOO.util.Event;var Formatcurrency=function(v,returnSign){if(isNaN(v)){return("N/A")}else{v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var sign="";if(returnSign){if((whole+sub)>0){sign="+"}else{sign="-"}}whole=String(Math.abs(whole));var r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}return sign+whole+sub}};var state=new TSCM.util.PersistenceManager();state.id="tsc_recentquotes";var stateResult=state.get();var recentup,recentdown;var URL=new String(window.location);var urlFragments=URL.split("/");var ROOT="http://"+urlFragments[2];return{updateRecentQuotes:function(){if(stateResult!==null){var tics="";for(var i=0;i<stateResult.length;i++){tics=tics+stateResult[i]+","}var callback={success:function(o){var tickerObj=eval("("+o.responseText+")");if(tickerObj===null){return}dom.get("recentUp").innerHTML=tickerObj.up;dom.get("recentDown").innerHTML=tickerObj.down;var removalList=tickerObj.symbolRemovalList;if(removalList.length>0){var removalSymbols=removalList.split(",");for(var index=0;index<removalSymbols.length;index++){for(var ii=0;ii<stateResult.length;ii++){if(removalSymbols[index]===stateResult[ii]){stateResult.pop();break}}}state.save(stateResult)}},failure:function(o){},scope:this,argument:null};var url=ROOT+"/ticker/recentQuoteSummary.ajaxaction?symbols="+tics;var conn=YAHOO.util.Connect.asyncRequest("GET",url,callback,null)}},updateIndices:function(){var url=ROOT+"/ticker/multiTicker.ajaxaction?symbols=^DJI,^GSPC,^IXIC,^TNX,FUT-OIL,GLD";var callback={success:function(o){var tickerObj=eval("("+o.responseText+")");if((tickerObj===null)||(tickerObj.results===null)||(tickerObj.results.length<6)){return}var miniten,mininet,minoil,minioilnet,minigold,minigoldnet,minidj,minidjnet,minisp,minispnet,mininas,mininasnet,minitres,minitresnet,minitrespct;miniten=dom.get("miniLive10yrCurrent");mininet=dom.get("miniLive10yrNetChange");minioil=dom.get("miniLiveOilCurrent");minioilnet=dom.get("miniLiveOilNetChange");minigold=dom.get("miniLiveGoldCurrent");minigoldnet=dom.get("miniLiveGoldNetChange");minidj=dom.get("miniLiveDjCurrent");minidjnet=dom.get("miniLiveDjNetChange");minidjpct=dom.get("miniLiveDjPercentChange");minisp=dom.get("miniLiveSandpCurrent");minispnet=dom.get("miniLiveSandpNetChange");minisppct=dom.get("miniLiveSandpPercentChange");mininas=dom.get("miniLiveNasdaqCurrent");mininasnet=dom.get("miniLiveNasdaqNetChange");mininaspct=dom.get("miniLiveNasdaqPercentChange");minitres=dom.get("miniLiveTreasuryCurrent");minitresnet=dom.get("miniLiveTreasuryNetChange");minitrespct=dom.get("miniLiveTreasuryPercentChange");var last,change,pct,uphtml,downhtml,company;uphtml='<div class="arrowBox upGreenBgrd"><em>UP</em></div>';downhtml='<div class="arrowBox downRedBgrd"><em>DOWN</em></div>';for(var to=0;to<tickerObj.results.length;to++){try{if(tickerObj.results[to]!=null){last=Formatcurrency(tickerObj.results[to].currentPrice,false);change=Formatcurrency(tickerObj.results[to].netChange,true);pct=Formatcurrency(tickerObj.results[to].percentChange,true)+"%";company=tickerObj.results[to].company;if(tickerObj.results[to].company=="^TNX"){miniten.innerHTML=(tickerObj.results[to].currentPrice/10).toFixed(2)+"%";if(tickerObj.results[to].netChange>=0){dom.removeClass(mininet,"redVertLine");dom.addClass(mininet,"greenVertLine")}else{dom.removeClass(mininet,"greenVertLine");dom.addClass(mininet,"redVertLine")}minitres.innerHTML=last;if(tickerObj.results[to].netChange>=0){minitresnet.innerHTML=uphtml+"<nobr>"+change+"</nobr>"}else{minitresnet.innerHTML=downhtml+"<nobr>"+change+"</nobr>"}minitrespct.innerHTML=pct}else{if(company=="FUT-OIL"){minioil.innerHTML=last;if(change>=0){dom.removeClass(minioilnet,"redVertLine");dom.addClass(minioilnet,"greenVertLine")}else{dom.removeClass(minioilnet,"greenVertLine");dom.addClass(minioilnet,"redVertLine")}}else{if(company=="GLD"){minigold.innerHTML=last;if(change>=0){dom.removeClass(minigoldnet,"redVertLine");dom.addClass(minigoldnet,"greenVertLine")}else{dom.removeClass(minigoldnet,"greenVertLine");dom.addClass(minigoldnet,"redVertLine")}}else{if(company=="^DJI"){minidj.innerHTML=last;if(tickerObj.results[to].netChange>=0){minidjnet.innerHTML=uphtml+"<nobr>"+change+"</nobr>"}else{minidjnet.innerHTML=downhtml+"<nobr>"+change+"</nobr>"}minidjpct.innerHTML=pct}else{if(company=="^GSPC"){minisp.innerHTML=last;if(tickerObj.results[to].netChange>=0){minispnet.innerHTML=uphtml+"<nobr>"+change+"</nobr>"}else{minispnet.innerHTML=downhtml+"<nobr>"+change+"</nobr>"}minisppct.innerHTML=pct}else{if(company=="^IXIC"){mininas.innerHTML=last;if(tickerObj.results[to].netChange>=0){mininasnet.innerHTML=uphtml+"<nobr>"+change+"</nobr>"}else{mininasnet.innerHTML=downhtml+"<nobr>"+change+"</nobr>"}mininaspct.innerHTML=pct}}}}}}}}catch(err){}}},failure:function(o){},scope:this,argument:null};var conn=YAHOO.util.Connect.asyncRequest("GET",url,callback,null)},init:function(){if(dom.get("marketdata")!==null){TSCM.Quotes.MiniQuote.updateIndices();window.setInterval(function(){TSCM.Quotes.MiniQuote.updateIndices()},60000)}if(dom.get("recentquotes")!==null){TSCM.Quotes.MiniQuote.updateRecentQuotes()}}}};YAHOO.util.Event.onAvailable("marketdata",TSCM.Quotes.MiniQuote.init);registerNS("TSCM.Quotes.Search");TSCM.Quotes.Search=new function(){var c,a,e,f,b;var d=false;f=YAHOO.util.Dom;b=TSCM.cfg.contextRoot;return{init:function(){if(!d){if(typeof YAHOO.util.XHRDataSource=="function"){c=new YAHOO.util.XHRDataSource("/ticker/search.ajaxaction");c.responseSchema={resultsList:"tickers",fields:["symbol","companyName"]}}else{c=new YAHOO.widget.DS_XHR(b+"/ticker/search.ajaxaction",["tickers","symbol"])}c.responseType=YAHOO.util.XHRDataSource.TYPE_JSON;c.scriptQueryParam="tickerName";c.queryMatchContains=false;c.queryMatchSubset=true;c.connXhrMode="ignoreStaleResponses";c.maxCacheEntries=0;a=new YAHOO.widget.AutoComplete("quoteSearch","quoteContainer",c);a.queryDelay=0;a.useShadow=true;a.typeAhead=false;a.forceSelection=false;a.animVert=false;a.animHoriz=false;a.alwaysShowContainer=false;a.autoHighlight=false;try{if(TSCM.cfg.isExternal===true){a.maxResultsDisplayed=2}}catch(j){}if(typeof YAHOO.util.XHRDataSource=="function"){a.generateRequest=function(k){return"?tickerName="+k}}a.formatResult=function(k,l){if(typeof YAHOO.util.XHRDataSource=="function"){return"<span style='font-weight:bold;'>"+k[0]+"</span>"+k[1]}else{return"<span style='font-weight:bold;'>"+k[0]+"</span>"+k[1].companyName}};a.doBeforeExpandContainer=function(k,l,p,n){var m=f.getXY(k);m[0]+=-1;m[1]+=f.get(k).offsetHeight;f.setXY(l,m);return true};var g=function(m,l){var k=l[2];TSCM.Quotes.Search.gotoTicker(k[0])};a.itemSelectEvent.subscribe(g);e=new TSCM.util.PersistenceManager();e.id="tsc_recentquotes";e.expiry_days=365}d=true},gotoTicker:function(g){var n=g||document.getElementById("quoteSearch").value;if(n.indexOf("\\")!=-1){var l=b+"/quote/lookup.html?s="+n+"&omorig=header"}else{var l=b+"/quote/"+n+".html?omorig=header"}try{var m=e.get();var j=false;if(m!==null){if(m.length>20){m.shift()}for(i=0;i<m.length;i++){if(m[i]==n.toUpperCase()){j=true;break}}if(!j){m.push(n.toUpperCase())}}else{m=new Array(n.toUpperCase())}e.save(m)}catch(k){}if(n!==null&&n!==""){top.location=l}},submitenter:function(k,j){var g;if(window.event){g=window.event.keyCode}else{if(j){g=j.which}else{return true}}if(g==13){TSCM.Quotes.Search.gotoTicker();return false}else{return true}}}};function tsc_SearchInputBox(){if(document.getElementById("topicSearch")){document.getElementById("topicSearch").style.backgroundImage="url(http://i.thestreet.com/files/tsc/v2008/css/images/hdrTxtBgrd.jpg)"}}YAHOO.namespace("extension");YAHOO.extension.Carousel=function(b,a){this.init(b,a)};YAHOO.extension.Carousel.prototype={UNBOUNDED_SIZE:1000000,init:function(q,l){var k=this;this.getCarouselItem=this.getItem;var b="carousel-list";var c="carousel-clip-region";var f="carousel-next";var e="carousel-prev";this._carouselElemID=q;this.carouselElem=YAHOO.util.Dom.get(q);this._prevEnabled=true;this._nextEnabled=true;this.cfg=new YAHOO.util.Config(this);this.cfg.addProperty("scrollBeforeAmount",{value:0,handler:function(s,r,t){},validator:k.cfg.checkNumber});this.cfg.addProperty("scrollAfterAmount",{value:0,handler:function(s,r,t){},validator:k.cfg.checkNumber});this.cfg.addProperty("loadOnStart",{value:true,handler:function(s,r,t){},validator:k.cfg.checkBoolean});this.cfg.addProperty("orientation",{value:"horizontal",handler:function(s,r,t){k.reload()},validator:function(r){if(typeof r=="string"){return("horizontal,vertical".indexOf(r.toLowerCase())!=-1)}else{return false}}});this.cfg.addProperty("size",{value:this.UNBOUNDED_SIZE,handler:function(s,r,t){k.reload()},validator:k.cfg.checkNumber});this.cfg.addProperty("numVisible",{value:3,handler:function(s,r,t){k.reload()},validator:k.cfg.checkNumber});this.cfg.addProperty("firstVisible",{value:1,handler:function(s,r,t){k.moveTo(r[0])},validator:k.cfg.checkNumber});this.cfg.addProperty("scrollInc",{value:3,handler:function(s,r,t){},validator:k.cfg.checkNumber});this.cfg.addProperty("animationSpeed",{value:0.25,handler:function(s,r,t){k.animationSpeed=r[0]},validator:k.cfg.checkNumber});this.cfg.addProperty("animationMethod",{value:YAHOO.util.Easing.easeOut,handler:function(s,r,t){}});this.cfg.addProperty("animationCompleteHandler",{value:null,handler:function(s,r,t){if(k._animationCompleteEvt){k._animationCompleteEvt.unsubscribe(k._currAnimationCompleteHandler,k)}k._currAnimationCompleteHandler=r[0];if(k._currAnimationCompleteHandler){if(!k._animationCompleteEvt){k._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",k)}k._animationCompleteEvt.subscribe(k._currAnimationCompleteHandler,k)}}});this.cfg.addProperty("autoPlay",{value:0,handler:function(t,r,u){var s=r[0];if(s>0){k.startAutoPlay()}else{k.stopAutoPlay()}}});this.cfg.addProperty("wrap",{value:false,handler:function(s,r,t){},validator:k.cfg.checkBoolean});this.cfg.addProperty("navMargin",{value:0,handler:function(s,r,t){k.calculateSize()},validator:k.cfg.checkNumber});this.cfg.addProperty("revealAmount",{value:0,handler:function(s,r,t){k.reload()},validator:k.cfg.checkNumber});this.cfg.addProperty("prevElementID",{value:null,handler:function(s,r,t){if(k._carouselPrev){YAHOO.util.Event.removeListener(k._carouselPrev,"click",k._scrollPrev)}k._prevElementID=r[0];if(k._prevElementID==null){k._carouselPrev=YAHOO.util.Dom.getElementsByClassName(e,"div",k.carouselElem)[0]}else{k._carouselPrev=YAHOO.util.Dom.get(k._prevElementID)}YAHOO.util.Event.addListener(k._carouselPrev,"click",k._scrollPrev,k)}});this.cfg.addProperty("prevElement",{value:null,handler:function(s,r,t){if(k._carouselPrev){YAHOO.util.Event.removeListener(k._carouselPrev,"click",k._scrollPrev)}k._prevElementID=r[0];if(k._prevElementID==null){k._carouselPrev=YAHOO.util.Dom.getElementsByClassName(e,"div",k.carouselElem)[0]}else{k._carouselPrev=YAHOO.util.Dom.get(k._prevElementID)}YAHOO.util.Event.addListener(k._carouselPrev,"click",k._scrollPrev,k)}});this.cfg.addProperty("nextElementID",{value:null,handler:function(s,r,t){if(k._carouselNext){YAHOO.util.Event.removeListener(k._carouselNext,"click",k._scrollNext)}k._nextElementID=r[0];if(k._nextElementID==null){k._carouselNext=YAHOO.util.Dom.getElementsByClassName(f,"div",k.carouselElem)}else{k._carouselNext=YAHOO.util.Dom.get(k._nextElementID)}if(k._carouselNext){YAHOO.util.Event.addListener(k._carouselNext,"click",k._scrollNext,k)}}});this.cfg.addProperty("nextElement",{value:null,handler:function(s,r,t){if(k._carouselNext){YAHOO.util.Event.removeListener(k._carouselNext,"click",k._scrollNext)}k._nextElementID=r[0];if(k._nextElementID==null){k._carouselNext=YAHOO.util.Dom.getElementsByClassName(f,"div",k.carouselElem)}else{k._carouselNext=YAHOO.util.Dom.get(k._nextElementID)}if(k._carouselNext){YAHOO.util.Event.addListener(k._carouselNext,"click",k._scrollNext,k)}}});this.cfg.addProperty("loadInitHandler",{value:null,handler:function(s,r,t){if(k._loadInitHandlerEvt){k._loadInitHandlerEvt.unsubscribe(k._currLoadInitHandler,k)}k._currLoadInitHandler=r[0];if(k._currLoadInitHandler){if(!k._loadInitHandlerEvt){k._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",k)}k._loadInitHandlerEvt.subscribe(k._currLoadInitHandler,k)}}});this.cfg.addProperty("loadNextHandler",{value:null,handler:function(s,r,t){if(k._loadNextHandlerEvt){k._loadNextHandlerEvt.unsubscribe(k._currLoadNextHandler,k)}k._currLoadNextHandler=r[0];if(k._currLoadNextHandler){if(!k._loadNextHandlerEvt){k._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",k)}k._loadNextHandlerEvt.subscribe(k._currLoadNextHandler,k)}}});this.cfg.addProperty("loadPrevHandler",{value:null,handler:function(s,r,t){if(k._loadPrevHandlerEvt){k._loadPrevHandlerEvt.unsubscribe(k._currLoadPrevHandler,k)}k._currLoadPrevHandler=r[0];if(k._currLoadPrevHandler){if(!k._loadPrevHandlerEvt){k._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",k)}k._loadPrevHandlerEvt.subscribe(k._currLoadPrevHandler,k)}}});this.cfg.addProperty("prevButtonStateHandler",{value:null,handler:function(s,r,t){if(k._currPrevButtonStateHandler){k._prevButtonStateHandlerEvt.unsubscribe(k._currPrevButtonStateHandler,k)}k._currPrevButtonStateHandler=r[0];if(k._currPrevButtonStateHandler){if(!k._prevButtonStateHandlerEvt){k._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",k)}k._prevButtonStateHandlerEvt.subscribe(k._currPrevButtonStateHandler,k)}}});this.cfg.addProperty("nextButtonStateHandler",{value:null,handler:function(s,r,t){if(k._currNextButtonStateHandler){k._nextButtonStateHandlerEvt.unsubscribe(k._currNextButtonStateHandler,k)}k._currNextButtonStateHandler=r[0];if(k._currNextButtonStateHandler){if(!k._nextButtonStateHandlerEvt){k._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",k)}k._nextButtonStateHandlerEvt.subscribe(k._currNextButtonStateHandler,k)}}});if(l){this.cfg.applyConfig(l)}this._origFirstVisible=this.cfg.getProperty("firstVisible");this._currLoadInitHandler=this.cfg.getProperty("loadInitHandler");this._currLoadNextHandler=this.cfg.getProperty("loadNextHandler");this._currLoadPrevHandler=this.cfg.getProperty("loadPrevHandler");this._currPrevButtonStateHandler=this.cfg.getProperty("prevButtonStateHandler");this._currNextButtonStateHandler=this.cfg.getProperty("nextButtonStateHandler");this._currAnimationCompleteHandler=this.cfg.getProperty("animationCompleteHandler");this._nextElementID=this.cfg.getProperty("nextElementID");if(!this._nextElementID){this._nextElementID=this.cfg.getProperty("nextElement")}this._prevElementID=this.cfg.getProperty("prevElementID");if(!this._prevElementID){this._prevElementID=this.cfg.getProperty("prevElement")}this._autoPlayTimer=null;this._priorLastVisible=this._priorFirstVisible=this.cfg.getProperty("firstVisible");this._lastPrebuiltIdx=0;this.carouselList=YAHOO.util.Dom.getElementsByClassName(b,"ul",this.carouselElem)[0];if(this._nextElementID==null){this._carouselNext=YAHOO.util.Dom.getElementsByClassName(f,"div",this.carouselElem)[0]}else{this._carouselNext=YAHOO.util.Dom.get(this._nextElementID)}if(this._prevElementID==null){this._carouselPrev=YAHOO.util.Dom.getElementsByClassName(e,"div",this.carouselElem)[0]}else{this._carouselPrev=YAHOO.util.Dom.get(this._prevElementID)}this._clipReg=YAHOO.util.Dom.getElementsByClassName(c,"div",this.carouselElem)[0];if(this.isVertical()){YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical")}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,this.scrollNextParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,this.scrollPrevParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this._carouselNext){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this)}if(this._carouselPrev){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this)}var j=this.cfg.getProperty("loadInitHandler");if(j){this._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",this);this._loadInitHandlerEvt.subscribe(j,this)}var n=this.cfg.getProperty("loadNextHandler");if(n){this._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",this);this._loadNextHandlerEvt.subscribe(n,this)}var p=this.cfg.getProperty("loadPrevHandler");if(p){this._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",this);this._loadPrevHandlerEvt.subscribe(p,this)}var m=this.cfg.getProperty("animationCompleteHandler");if(m){this._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",this);this._animationCompleteEvt.subscribe(m,this)}var a=this.cfg.getProperty("prevButtonStateHandler");if(a){this._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",this);this._prevButtonStateHandlerEvt.subscribe(a,this)}var g=this.cfg.getProperty("nextButtonStateHandler");if(g){this._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",this);this._nextButtonStateHandlerEvt.subscribe(g,this)}var d=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+d.start,this._calculateSize,this);if(this.cfg.getProperty("loadOnStart")){this._loadInitial()}},clear:function(){var a=this.cfg.getProperty("loadInitHandler");if(a){this._removeChildrenFromNode(this.carouselList);this._lastPrebuiltIdx=0}this.stopAutoPlay();this._priorLastVisible=this._priorFirstVisible=this._origFirstVisible;this.cfg.setProperty("firstVisible",this._origFirstVisible,true);this.moveTo(this._origFirstVisible)},reload:function(b){if(this._isValidObj(b)){this.cfg.setProperty("numVisible",b)}this.clear();var a=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+a.start,this._calculateSize,this);this._loadInitial()},load:function(){var a=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+a.start,this._calculateSize,this);this._loadInitial()},addItem:function(c,b,d){if(c>this.cfg.getProperty("size")){return null}var e=this.getItem(c);if(!this._isValidObj(e)){e=this._createItem(c,b);this.carouselList.appendChild(e)}else{if(this._isValidObj(e.placeholder)){var a=this._createItem(c,b);this.carouselList.replaceChild(a,e);e=a}}if(this._isValidObj(d)){YAHOO.util.Dom.addClass(e,d)}if(this.isVertical()){setTimeout(function(){e.style.display="block"},1)}return e},insertBefore:function(b,d){if(b>=this.cfg.getProperty("size")){return null}if(b<1){b=1}var a=b-1;if(a>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,b)}var c=this._insertBeforeItem(b,d);this._enableDisableControls();return c},insertAfter:function(b,d){if(b>this.cfg.getProperty("size")){b=this.cfg.getProperty("size")}var a=b+1;if(a>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,a+1)}var c=this._insertAfterItem(b,d);if(a>this.cfg.getProperty("size")){this.cfg.setProperty("size",a,true)}this._enableDisableControls();return c},scrollNext:function(){this._scrollNext(null,this);this._autoPlayTimer=null;if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay()}},scrollPrev:function(){this._scrollPrev(null,this)},scrollTo:function(a){this._position(a,true)},moveTo:function(a){this._position(a,false)},startAutoPlay:function(a){if(this._isValidObj(a)){this.cfg.setProperty("autoPlay",a,true)}if(this._autoPlayTimer!==null){return this._autoPlayTimer}var c=this;var b=function(){c.scrollNext()};this._autoPlayTimer=setTimeout(b,this.cfg.getProperty("autoPlay"));return this._autoPlayTimer},stopAutoPlay:function(){if(this._autoPlayTimer!==null){clearTimeout(this._autoPlayTimer);this._autoPlayTimer=null}},isVertical:function(){return(this.cfg.getProperty("orientation")!="horizontal")},isItemLoaded:function(a){var b=this.getItem(a);if(this._isValidObj(b)&&!this._isValidObj(b.placeholder)){return true}return false},getItem:function(a){var b=this._carouselElemID+"-item-"+a;var c=YAHOO.util.Dom.get(b);return c},show:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","block");this.calculateSize()},hide:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","none")},calculateSize:function(){var I=this.carouselList.childNodes;var t=null;for(var D=0;D<I.length;D++){t=I[D];if(t.tagName=="LI"||t.tagName=="li"){break}}var C=this.cfg.getProperty("navMargin");var K=this.cfg.getProperty("numVisible");var j=this.cfg.getProperty("firstVisible");var G=this._getStyleVal(t,"paddingLeft");var z=this._getStyleVal(t,"paddingRight");var F=this._getStyleVal(t,"marginLeft");var y=this._getStyleVal(t,"marginRight");var x=this._getStyleVal(t,"paddingTop");var c=this._getStyleVal(t,"paddingBottom");var w=this._getStyleVal(t,"marginTop");var a=this._getStyleVal(t,"marginBottom");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-vertical");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-horizontal");if(this.isVertical()){var v=G+z+F+y;YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical");var f=x+c+w+a;var l=this._getStyleVal(this.carouselList,"paddingTop");var B=this._getStyleVal(this.carouselList,"paddingBottom");var k=this._getStyleVal(this.carouselList,"marginTop");var A=this._getStyleVal(this.carouselList,"marginBottom");var J=l+B+k+A;var r=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(f)/2):0;var d=this._getStyleVal(t,"height",true);this.scrollAmountPerInc=(d+f);var e=this._getStyleVal(t,"width");this.carouselElem.style.width=(e+v)+"px";this._clipReg.style.height=(this.scrollAmountPerInc*K+r*2+J)+"px";this.carouselElem.style.height=(this.scrollAmountPerInc*K+r*2+C*2+J)+"px";var E=(this._isExtraRevealed())?(r-(Math.abs(w-a)+Math.abs(x-c))/2):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"top",""+E+"px");var p=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,p-this.scrollAmountPerInc*(j-1))}else{YAHOO.util.Dom.addClass(this.carouselList,"carousel-horizontal");var u=this._getStyleVal(this.carouselList,"paddingLeft");var n=this._getStyleVal(this.carouselList,"paddingRight");var s=this._getStyleVal(this.carouselList,"marginLeft");var m=this._getStyleVal(this.carouselList,"marginRight");var g=u+n+s+m;var H=F+y;var v=H+z+G;var r=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(v)/2):0;var e=t.offsetWidth;this.scrollAmountPerInc=e+H;this._clipReg.style.width=(this.scrollAmountPerInc*K+r*2)+"px";var b=(this._isExtraRevealed())?(r-(Math.abs(y-F)+Math.abs(z-G))/2-(s+u)):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"left",""+b+"px");var q=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,q-this.scrollAmountPerInc*(j-1))}},setProperty:function(c,b,a){this.cfg.setProperty(c,b,a)},getProperty:function(a){return this.cfg.getProperty(a)},getFirstItemRevealed:function(){return this._firstItemRevealed},getLastItemRevealed:function(){return this._lastItemRevealed},getFirstVisible:function(){return this.cfg.getProperty("firstVisible")},getLastVisible:function(){var b=this.cfg.getProperty("firstVisible");var a=this.cfg.getProperty("numVisible");return b+a-1},_getStyleVal:function(a,c,d){var b=YAHOO.util.Dom.getStyle(a,c);var e=d?parseFloat(b):parseInt(b,10);if(c=="height"&&isNaN(e)){e=a.offsetHeight}else{if(isNaN(e)){e=0}}return e},_calculateSize:function(a){a.calculateSize();a.show()},_removeChildrenFromNode:function(b){if(!this._isValidObj(b)){return}var a=b.childNodes.length;while(b.hasChildNodes()){b.removeChild(b.firstChild)}},_prebuildLiElem:function(a){if(a<1){return}var b=document.createElement("li");b.id=this._carouselElemID+"-item-"+a;b.placeholder=true;this.carouselList.appendChild(b);this._lastPrebuiltIdx=(a>this._lastPrebuiltIdx)?a:this._lastPrebuiltIdx},_createItem:function(b,a){if(b<1){return}var c=document.createElement("li");c.id=this._carouselElemID+"-item-"+b;if(typeof(a)==="string"){c.innerHTML=a}else{c.appendChild(a)}return c},_insertAfterItem:function(b,a){return this._insertBeforeItem(b+1,a)},_insertBeforeItem:function(g,a){var b=this.getItem(g);var d=this.cfg.getProperty("size");if(d!=this.UNBOUNDED_SIZE){this.cfg.setProperty("size",d+1,true)}for(var c=this._lastPrebuiltIdx;c>=g;c--){var f=this.getItem(c);if(this._isValidObj(f)){f.id=this._carouselElemID+"-item-"+(c+1)}}var j=this._createItem(g,a);var e=this.carouselList.insertBefore(j,b);this._lastPrebuiltIdx+=1;return j},insertAfterEnd:function(a){return this.insertAfter(this.cfg.getProperty("size"),a)},_position:function(a,b){var c=this._priorFirstVisible;if(a>c){var d=a-c;this._scrollNextInc(d,b)}else{var e=c-a;this._scrollPrevInc(e,b)}},_scrollPrev:function(b,a){if(b!==null){a.stopAutoPlay()}if(a._scrollPrevAnim.isAnimated()){return false}a._scrollPrevInc(a.cfg.getProperty("scrollInc"),(a.cfg.getProperty("animationSpeed")!==0))},_scrollNext:function(b,a){if(b!==null){a.stopAutoPlay()}if(a._scrollNextAnim.isAnimated()){return false}a._scrollNextInc(a.cfg.getProperty("scrollInc"),(a.cfg.getProperty("animationSpeed")!==0))},_handleAnimationComplete:function(c,b,a){var e=a[0];var d=a[1];e._animationCompleteEvt.fire(d)},_areAllItemsLoaded:function(d,c){var a=true;for(var b=d;b<=c;b++){var e=this.getItem(b);if(!this._isValidObj(e)){this._prebuildLiElem(b);a=false}else{if(this._isValidObj(e.placeholder)){a=false}}}return a},_prebuildItems:function(c,b){for(var a=c;a<=b;a++){var d=this.getItem(a);if(!this._isValidObj(d)){this._prebuildLiElem(a)}}},_isExtraRevealed:function(){return(this.cfg.getProperty("revealAmount")>0)},_scrollNextInc:function(e,l){var q=this.cfg.getProperty("numVisible");var n=this._priorFirstVisible;var k=this._priorLastVisible;var r=this.cfg.getProperty("size");var a=this._calculateAllowableScrollExtent();if(this.cfg.getProperty("wrap")&&k==a.end){this.scrollTo(a.start);return}var m=n+e;var g=m+q-1;if(g>a.end){g=a.end;m=g-q+1}e=m-n;this.cfg.setProperty("firstVisible",m,true);if(e>0){if(this._isValidObj(this.cfg.getProperty("loadNextHandler"))){var d=this._calculateVisibleExtent(m,g);var f=(k+1)<d.start?(k+1):d.start;var j=this._areAllItemsLoaded(f,d.end);this._loadNextHandlerEvt.fire(d.start,d.end,j)}if(l){var p={points:{by:[-this.scrollAmountPerInc*e,0]}};if(this.isVertical()){p={points:{by:[0,-this.scrollAmountPerInc*e]}}}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,p,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollNextAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"next"])}this._scrollNextAnim.animate()}else{if(this.isVertical()){var b=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,b-this.scrollAmountPerInc*e)}else{var c=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,c-this.scrollAmountPerInc*e)}}}this._priorFirstVisible=m;this._priorLastVisible=g;this._enableDisableControls();return false},_scrollPrevInc:function(g,l){var q=this.cfg.getProperty("numVisible");var n=this._priorFirstVisible;var k=this._priorLastVisible;var r=this.cfg.getProperty("size");var m=n-g;var a=this._calculateAllowableScrollExtent();m=(m<a.start)?a.start:m;var f=m+q-1;if(f>a.end){f=a.end;m=f-q+1}g=n-m;this.cfg.setProperty("firstVisible",m,true);if(g>0){if(this._isValidObj(this.cfg.getProperty("loadPrevHandler"))){var e=this._calculateVisibleExtent(m,f);var c=(n-1)>e.end?(n-1):e.end;var j=this._areAllItemsLoaded(e.start,c);this._loadPrevHandlerEvt.fire(e.start,e.end,j)}if(l){var p={points:{by:[this.scrollAmountPerInc*g,0]}};if(this.isVertical()){p={points:{by:[0,this.scrollAmountPerInc*g]}}}this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,p,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollPrevAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"prev"])}this._scrollPrevAnim.animate()}else{if(this.isVertical()){var b=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,b+this.scrollAmountPerInc*g)}else{var d=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,d+this.scrollAmountPerInc*g)}}}this._priorFirstVisible=m;this._priorLastVisible=f;this._enableDisableControls();return false},_enableDisableControls:function(){var c=this.cfg.getProperty("firstVisible");var a=this.getLastVisible();var b=this._calculateAllowableScrollExtent();if(this._prevEnabled){if(c===b.start){this._disablePrev()}}if(this._prevEnabled===false){if(c>b.start){this._enablePrev()}}if(this._nextEnabled){if(a===b.end){this._disableNext()}}if(this._nextEnabled===false){if(a<b.end){this._enableNext()}}},_loadInitial:function(){var c=this.cfg.getProperty("firstVisible");this._priorLastVisible=this.getLastVisible();if(this._loadInitHandlerEvt){var a=this._calculateVisibleExtent(c,this._priorLastVisible);var b=this._areAllItemsLoaded(1,a.end);this._loadInitHandlerEvt.fire(a.start,a.end,b)}if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay()}this._enableDisableControls()},_calculateAllowableScrollExtent:function(){var d=this.cfg.getProperty("scrollBeforeAmount");var a=this.cfg.getProperty("scrollAfterAmount");var b=this.cfg.getProperty("size");var c={start:1-d,end:b+a};return c},_calculateVisibleExtent:function(d,a){if(!d){d=this.cfg.getProperty("firstVisible");a=this.getLastVisible()}var b=this.cfg.getProperty("size");d=d<1?1:d;a=a>b?b:a;var c={start:d,end:a};this._firstItemRevealed=-1;this._lastItemRevealed=-1;if(this._isExtraRevealed()){if(d>1){this._firstItemRevealed=d-1;c.start=this._firstItemRevealed}if(a<b){this._lastItemRevealed=a+1;c.end=this._lastItemRevealed}}return c},_disablePrev:function(){this._prevEnabled=false;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(false,this._carouselPrev)}if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.removeListener(this._carouselPrev,"click",this._scrollPrev)}},_enablePrev:function(){this._prevEnabled=true;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(true,this._carouselPrev)}if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this)}},_disableNext:function(){if(this.cfg.getProperty("wrap")){return}this._nextEnabled=false;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(false,this._carouselNext)}if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.removeListener(this._carouselNext,"click",this._scrollNext)}},_enableNext:function(){this._nextEnabled=true;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(true,this._carouselNext)}if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this)}},_isValidObj:function(a){if(null==a){return false}if("undefined"==typeof(a)){return false}return true}};TSCM.pages.Search=new function(){var a=YAHOO.util.Dom;return{searchCont:function(d,g,c,b){var e=a.get(d);if(c.length>0){e.sort.value=c;e.sortByMediaType.value="false"}if(b.length>0){e.perPage.value=b}e.page.value=g;e.submit()},searchQuote:function(b){if(b.length>0){window.location.href=b}},toggleAdvancedSearch:function(){if(a.get("advancedSearch").style.display=="none"){a.get("advancedSearch").style.display="block";a.get("searchToggle").innerHTML="Standard Search"}else{a.get("advancedSearch").style.display="none";a.get("searchToggle").innerHTML="Advanced Search"}},advancedSearchHelp:function(b){if(b){a.get("advancedSearchHelp").style.display="block";a.get("advancedSearchHelpLinkOpen").style.display="none";a.get("advancedSearchHelpLinkClose").style.display="inline"}else{a.get("advancedSearchHelp").style.display="none";a.get("advancedSearchHelpLinkClose").style.display="none";a.get("advancedSearchHelpLinkOpen").style.display="inline"}},showHideDates:function(){if(a.get("allDates").checked){a.get("advancedDates").style.display="none"}else{a.get("advancedDates").style.display="block"}}}};registerNS("TSCM.Error.Search");TSCM.Error.Search=new function(){var b;var a;var c;return{init:function(){b=new YAHOO.widget.DS_XHR(TSCM.cfg.contextRoot+"/ticker/search.ajaxaction",["tickers","symbol"]);b.scriptQueryParam="tickerName";b.queryMatchContains=false;b.queryMatchSubset=true;a=new YAHOO.widget.AutoComplete("quoteSearchError","quoteContainerError",b);a.useShadow=true;a.autoHighlight=false;a.typeAhead=true;a.forceSelection=true;a.formatResult=function(d,e){return"<span style='font-weight:bold;'>"+d[0]+"</span>"+d[1].companyName};a.doBeforeExpandContainer=function(d,e,j,g){var f=YAHOO.util.Dom.getXY(d);f[0]+=-1;f[1]+=YAHOO.util.Dom.get(d).offsetHeight;YAHOO.util.Dom.setXY(e,f);return true};c=new TSCM.util.PersistenceManager();c.id="tsc_recentquotes";c.expiry_days=365},gotoTicker:function(){var g=document.getElementById("quoteSearchError").value;var e=TSCM.cfg.contextRoot+"/quote/"+g+".html";var f=c.get();var d=false;if(f!==null){if(f.length>20){f.shift()}for(i=0;i<f.length;i++){if(f[i]==g.toUpperCase()){d=true;break}}if(!d){f.push(g.toUpperCase())}}else{f=new Array(g.toUpperCase())}c.save(f);if(g!==null&&g!==""){document.location=e}},submitenter:function(g,f){var d;if(window.event){d=window.event.keyCode}else{if(f){d=f.which}else{return true}}if(d==13){TSCM.Error.Search.gotoTicker();return false}else{return true}}}};registerNS("TSCM.pages.Peps");TSCM.pages.Peps=new function(){return{init:function(){var a=YAHOO.util.Dom.getElementsByClassName("TICKERFLAT","SPAN");for(var b=0;b<a.length;b++){a[b].innerHTML="<a href='"+TSCM.cfg.contextRoot+"/quote/"+a[b].getAttribute("ID")+".html?omorig=peps'>"+a[b].getAttribute("ID")+"</a>"}},disabletext:function(a){return false},reEnable:function(){return true},checkKey:function(c){var a=c.keyCode?c.keyCode:c.charCode;var b=c.ctrlKey;if(a==97&&b==true){return false}},loadPdf:function(c,a){var b=document.getElementById("recommendedPDF");b.src=c}}};