//combination of:
// adplacer, customad, tsc-util, nav
/*adplacer*/function registerNS(C){var D=C.split(".");var A=window;for(var B=0;B<D.length;B++){if(typeof A[D[B]]=="undefined"){A[D[B]]=new Object()}A=A[D[B]]}}registerNS("TSCM.ads");TSCM.ads.AdPlacerx=new function(){function A(W){if(typeof W=="undefined"||W==null||W==""||W=="undefined"){return false}else{return true}}function Q(Y){if(document.cookie.length>0){var W=document.cookie.indexOf(Y+"=");if(W!=-1){W=W+Y.length+1;var X=document.cookie.indexOf(";",W);if(X==-1){X=document.cookie.length}return unescape(document.cookie.substring(W,X))}}return""}function N(X){var W=X.toString();W=W.toLowerCase();W=W.replace(/ /g,"-");W=W.replace(/\|\.|\[|\]|\*|\!|\@|\#|\$|\%|\^|\&|\(|\)|\:|\'|\"|\<|\>|\?|\\|\/|\~|\`/g,"");return W}var J=["tsc-headlines-and-perspectives","tsc-thestreet-picks","tsc-investing-a-z","tsc-life-and-money","tsc-business-news","tsc-portfolio","tsc-quote","tsc-peps","tsc-audio","tsc-tools-quotes","mainstreet.thestreet.com","tsc-business-news","remnant.thestreet.com"];var S=["tscstage.tsc-headlines","tscstage.tsc-thestreet-picks","tscstage.tsc-investing-a-z","tscstage.tsc-life-and-money","tscstage.tsc-business-news","tscstage.tsc-portfolio","tscstage.tsc-quote","tscstage.tsc-peps","tscstage.tsc-audio","tscstage.tsc-tools-quotes","mainstreet.thestreet.com","tscstage.tsc-business-news","tscstage.remnant.thestreet.com"];var O=new Array();var V={};var D="/";var T=";";var P="=";var G="&";var K="ad_cookie";var F="tile";var L="ptile";var C="kval";var I="ord";var M="sz";var H="u";var R="-";var U="|";var E=false;var B="adtype";return{autotarget:true,protocol:"http://",server:"ad.doubleclick.net",calltype:"adj",default_calltype:"adj",site:"thestreet.com",defaultsite:"tsc-thestreet.com",zone:"index",sz:"",adtype:"",type:"adj",ord:Math.floor(Math.random()*1000000000000000),includeUvalues:false,autotile:true,tile:1,includeDcopt:false,usePtile:false,includeOrd:true,setSite:function(W){if(typeof W!="undefined"){this.site=W;E=true}},parseMeta:function(){var b=TSCM.metadata;var a="";a=T+"";var d=new String(document.location);var c=d.indexOf("tscstage",0);if(c!=-1||TSCM.cfg.useStageDART=="true"){this.defaultsite="tscstage.tsc-headlines"}try{var W=TSCM.metadata.Ads.site;if(A(W)){if(W.indexOf("/")!=-1){var h=W.split("/");if(!E){this.site=h[0]}this.zone=h[1];this.zone=this.zone.replace(/tsc-/,"")}else{if(!E){this.site=this.defaultsite}this.zone=this.defaultsite}}else{if(!E){this.site=this.defaultsite}this.zone=this.defaultsite}}catch(q){this.site=this.defaultsite;this.zone=this.defaultsite}try{var Y=TSCM.metadata.Story;for(var m in Y){var X,p;var g=Y[m];if(g instanceof Array){if(m=="keyword"){try{for(var l=0;l<g.length;l++){p=g[l];if(p!=null){this.setTarget("kword",p)}}}catch(q){}}if(m=="authors"){try{for(var l=0;l<g.length;l++){p=g[l];if(p!=null){this.setTarget("authors",p)}}}catch(q){}}}else{if(typeof g=="object"){try{var r=g.dirname;this.setTarget("storytype",r)}catch(q){}}else{if((m=="primaryTickers")||(m=="updateTickers")||(m=="bearishTickers")||(m=="bullishTickers")){var n=g.split(" ");for(var l=0;l<n.length;l++){var t=n[l];if(A(t)){this.setTarget("tkr",t)}}}if(m=="hasReporting"){}else{if(m=="isPrint"){}else{if(m=="headline"){}else{if(m=="tickers"){}else{if(m=="stockPositions"){}else{if(m=="pubDate"){}else{if(m=="callout"){}else{if(m=="authorName"){this.setTarget("author",g)}else{if(A(g)){this.setTarget(m,g)}}}}}}}}}}}}}catch(q){}try{this.setTarget("contenttype",TSCM.metadata.Page.contentType)}catch(q){}try{if(A(TSCM.pages.PageInfo.Ticker)){this.setTarget("ticker",TSCM.pages.PageInfo.Ticker)}if(A(TSCM.pages.PageInfo.Sector)){this.setTarget("sector",TSCM.pages.PageInfo.Sector)}}catch(q){}this.handleOverrides();var Z=J;var s=false;var f=-1;for(var m=0;m<Z.length;m++){var k=Z[m];if(this.site==k){s=true;f=m}}if(!s){this.site=this.defaultsite}var d=new String(document.location);var c=d.indexOf("tscstage",0);if(c!=-1||TSCM.cfg.useStageDART=="true"){Z=S;if(s){this.site=Z[f]}}},handleOverrides:function(){try{if(TSCM.metadata.Page.template=="portfolio"){this.site="tsc-portfolio";var X=new String(document.location);var W=X.indexOf("tscstage",0);if(W!=-1||TSCM.cfg.useStageDART=="true"){this.site="tscstage.tsc-portfolio"}}}catch(Y){}},resetTargets:function(W){V={};this.adtype="";this.includeDcopt=false},setTarget:function(W,Y){if(W=="remove"){return }if(typeof Y=="string"){Y=Y.toLowerCase();Y=N(Y)}try{}catch(Z){}try{if(typeof V[W]!="undefined"){if(V[W] instanceof Array){V[W].push(Y)}else{var X=V[W];V[W]=[X,Y]}}else{V[W]=Y}}catch(Z){}},getTargets:function(){return V},removeTarget:function(W,X){V[W]=null},reset:function(W,X){V=new Array();O=new Array();this.tile=1},getTargetingString:function(){var Z="";for(var X in V){var Y=V[X];if(Y instanceof Array){for(var W=0;W<Y.length;W++){Z+=T+this.makeParam(X,Y[W])}}else{if(typeof Y=="object"){}else{Z+=T+this.makeParam(X,Y)}}}if(A(this.additionalTargeting)){Z+=this.additionalTargeting}return Z},getTile:function(){var W=F;if(this.usePtile==true){W=L}return this.autotile?this.makeParam(W,this.tile++):this.makeParam(W,this.tile)},getRSIvals:function(){var Z=";";var W;var a="rsi";var Y="";if((Y=Q(a))!=null){var X=Y.split(":");for(i=0;i<X.length;i++){Z+=("rsi="+X[i]+";")}}return Z},geturl:function(){if(this.autotarget){if(typeof (TSCM.metadata)!="undefined"){this.autotarget=true;this.parseMeta()}else{}}var b="";try{var W=this.getParameter("kval");if(A(W)){this.setTarget("kval",W)}}catch(Z){}if(this.includeDcopt==true){this.setTarget("dcopt","ist")}var b=this.getTargetingString();b+=this.getRSIvals();if(document.cookie.indexOf(K)!=-1){var a=YAHOO.util.Cookie.get("ad_cookie");b+=T+this.makeParam(C,a)}try{if(typeof TSCM.metadata.Ads.targeting!="undefined"){b+=TSCM.metadata.Ads.targeting}}catch(Z){}var X=this.makeParam(M,this.sz);if(!A(this.calltype)){this.calltype=this.default_calltype}if(this.adtype=="cau"){var d=this.makeParam(B,this.adtype);var c=this.protocol+this.server+D+this.calltype+D+this.site+D+this.zone+b+T+X+";"+d}else{var c=this.protocol+this.server+D+this.calltype+D+this.site+D+this.zone+b+T+X}if(this.autotile==true){var Y="";Y+=T+this.getTile();c+=T+Y}c+=this.getOrd();try{c=c.replace(/\;\;/g,";")}catch(Z){}return c},getZoneFromURL:function(){try{var Y=document.location.pathname;var W=Y.split("/");if(W.length>1){this.site=W[2]}}catch(X){}},getOrd:function(){return T+this.makeParam(I,this.getOrdNum())},getOrdNum:function(){if(this.includeOrd==true){if(this.autotile==true){return this.ord}else{return Math.floor(Math.random()*100000000000)}}else{return this.ord}},makeParam:function(W,X){if(W=="remove"){return }return W+P+X},getUVals:function(){var W=this.getTargetingString();var X=W.length;if(W.charAt(X-1)==T){W=W.slice(0,X-1)}W=W.split(P).join(R).split(T).join(U);W=W+T;return W},getParameter:function(Y){var W=window.location.search;var c=Y+P;try{var b=W.indexOf(c);if(b!=-1){var d=b+c.length;var Z=W.substring(d);var X=Z.indexOf(G);if(X!=-1){return Z.substring(0,X)}else{return Z.substring(0)}}}catch(a){return""}},addScript:function(X){while(X.hasChildNodes()==true){X.removeChild(X.childNodes[0])}var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",this.geturl());X.appendChild(W)},writeTag:function(X){var W=this.getScriptTag();document.write(W)},getIframeName:function(){var W="iframe_ad"+this.sz+"t"+this.tile;return W},getScriptTag:function(){if(!A(this.calltype)){this.calltype=this.default_calltype}if(this.calltype=="adj"){var X=this.geturl();var Z='<SCRIPT type="text/javascript" src="'+X+'"></SCRIPT>'}if(this.calltype=="adi"){var a=this.sz.split("x");var W=a[0];var Y=a[1];var Z;var X=this.geturl();if(this.override=="blank"){X="http://i.thestreet.com/files/tsc/blank.html"}Z="<iframe name='"+this.getIframeName()+"' id='"+this.getIframeName()+"' frameborder='no' scrolling='no' width='"+W+"' height='"+Y+"' src='"+X+"'></iframe>"}return Z}}};
/*customad*/TSCM.ads.sponsorName="";TSCM.cfg.customAdSponsor="";TSCM.cfg.SponsorIndexLink="";TSCM.ads.adXMLFileToUse="ad.xml";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(h,g){var i=document.createElement("link");i.href=h;i.rel="stylesheet";g.appendChild(i)}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"||"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"||"business-news-update")){var b=TSCM.cfg.contextRoot+"/sponsor-section/ups/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="+g.puc;if(TSCM.ads.sponsorName==("small-business-solutions"||"business-news-update")){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(c){if(!c){c="customAdUnit"}var b=YAHOO.util.Dom.getElementsByClassName("cau_off","li",c);for(var a=0;a<b.length;a++){if(b[a].className=="cau_off"){b[a].onmouseover=function(){this.className="cau_over"};b[a].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"}}}};
/*tsc-util*/var supersleight=function(){var C=false;var A=false;var F=TSCM.cfg.imagesBaseUrl+"/images/x.gif";F.toString;var E=function(){if(C){C=document.getElementById(C)}else{C=document}for(var G=C.all.length-1,H=null;(H=C.all[G]);G--){if(H.currentStyle.backgroundImage.match(/\.png/i)!==null){D(H)}if(H.tagName=="IMG"&&H.src.match(/\.png$/i)!==null){B(H)}if(A&&(H.tagName=="A"||H.tagName=="INPUT")&&H.style.position===""){H.style.position="relative"}}};var D=function(H){var J="scale";var G=H.currentStyle.backgroundImage;var I=G.substring(5,G.length-2);if(H.currentStyle.backgroundRepeat=="no-repeat"){J="crop"}H.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+I+"', sizingMethod='"+J+"')";H.style.backgroundImage="url("+F+")"};var B=function(G){var H=TSCM.cfg.imagesBaseUrl+"/css/images/";if(G.src!=H+"downArrowBtn.png"&&G.src!=H+"advanceSearch.png"&&G.src!=H+"standardSearch.png"&&G.src!=H+"leftEnabled.png"&&G.src!=H+"leftDisabled.png"&&G.src!=H+"rightEnabled.png"&&G.src!=H+"rightDisabled.png"){var I=G.src;G.style.width=G.width+"px";G.style.height=G.height+"px";G.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+I+"', sizingMethod='scale')";G.src=F}};return{init:function(){YAHOO.util.Event.on(window,"load",E)},limitTo:function(G){C=G},run:function(){E()}}}();supersleight.limitTo("bd");if(YAHOO.env.ua.ie<7&&YAHOO.env.ua.ie!=0){supersleight.init()}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");TSCM.register=function(A){registerNS(A)};function audioPlayer(E,D){var F=null;var C=false;var H="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(H)>-1){F=TSCM.util.GetCookie(";",H);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 numOrdA(B,A){return(B-A)}function numOrdD(B,A){return(A-B)}function properCase(A){return A.toLowerCase().replace(/\b\w/g,function(B){return B.toUpperCase()})}function DLListNode(A){this.elem=A;this.prev=this.next=null}DLListNode.prototype.extract=function(){if(this.prev){this.prev.next=this.next}if(this.next){this.next.prev=this.prev}this.prev=this.next=null};DLListNode.prototype.insertAfter=function(A){if(this==A){return }A.extract();A.prev=this;if(this.next){A.next=this.next;this.next.prev=A}this.next=A};function DLList(){this.prev=this.next=this}DLList.prototype.insertAfter=DLListNode.prototype.insertAfter;DLList.prototype.getFirst=function(){return(this.next==this)?null:this.next};DLList.prototype.getLast=function(){return(this.prev==this)?null:this.prev};DLList.prototype.add=function(B,C){var A=new DLListNode(B);if(!C){if(this.prev){C=this.prev}else{C=this}}C.insertAfter(A);return A};DLList.prototype.foreach=function(B){for(var A=this.next;A!=this;A=A.next){B(A.elem)}};DLList.prototype.count=function(){var A=0;for(var B=this.next;B!=this;B=B.next){A++}return A};DLList.prototype.find=function(C,A){if(!A){A=this}for(var B=A.next;B!=this;B=B.next){if(B&&C(B.elem)){return B}}};function updateFlashVar(A,C,B){YAHOO.util.Dom.get(A).SetVariable(C,B)}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){}}String.prototype.chop=function(A){if(isNaN(A)){A=this.length-1}return(this.substring(0,A))};registerNS("TSCM.util");TSCM.util.isDefined=function(A){if(typeof A=="undefined"||A==null||A==""||A=="undefined"){return false}else{return true}};TSCM.util.popgallery=function(B){var A=TSCM.cfg.contextRoot+"/gallery/"+B+"/index.html";window.open(A,"photogallery","location=0,status=1,scrollbars=0, width=970,height=700")};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.ext.util.JSON.encode(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 H=window.location.search;if(top.location!=self.location){H=top.window.location.search}var E="=";var I="&";var C=A+E;try{var F=H.indexOf(C);if(F!=-1){var B=F+C.length;var J=H.substring(B);var D=J.indexOf(I);if(D!=-1){return J.substring(0,D)}else{return J.substring(0)}}}catch(G){return""}};TSCM.util.setText=function(C,A){try{YAHOO.util.Dom.get(C).innerHTML=A}catch(B){}};TSCM.util.rmnonAlpha=function(A){try{return A.replace(/\ |\[|\]|\*|\!|\@|\#|\$|\%|\^|\&|\(|\)|\-|\:|\'|\"|\<|\>|\?|\\|\/|\~|\`/g,"")}catch(B){return }};TSCM.util.attachScript=function(F,A){var E=document.createElement("script");E.type="text/javascript";E.defer=true;E.id=F;E.src=A;var C=document.getElementById(F);var B=document.getElementsByTagName("head")[0];try{if(C){B.removeChild(C)}}catch(D){}B.appendChild(E);return };TSCM.util.getEl=function(A){return YAHOO.util.Dom.get(A)};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.addCommas=function(B){B+="";x=B.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var A=/(\d+)(\d{3})/;while(A.test(x1)){x1=x1.replace(A,"$1,$2")}return x1+x2};var req,imagepath,imgEl,replacementImg;TSCM.util.loadimage=function(C,B,A){TSCM.util.imagepath=C;TSCM.util.imgEl=Ext.get(B);TSCM.util.replacementImg=A;TSCM.util.req=TSCM.util.getreq();TSCM.util.req.onreadystatechange=TSCM.util.imagexists;TSCM.util.req.open("get",TSCM.util.imagepath,true);TSCM.util.req.send(null)};TSCM.util.imagexists=function(){if(TSCM.util.req.readyState==4){if(TSCM.util.req.status==200){TSCM.util.imgEl.src=TSCM.util.imagepath}else{TSCM.util.imgEl.src=TSCM.util.replacementImg}}};TSCM.util.getreq=function(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else{if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP")}}};registerNS("YAHOO.ext.util");YAHOO.ext.util.JSON=new function(){var useHasOwn={}.hasOwnProperty?true:false;var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(v===null?"null":YAHOO.ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};var encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(o instanceof Array){return encodeArray(o)}else{if(o instanceof Date){return encodeDate(o)}else{if(typeof o=="string"){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(var i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}}}}}}};this.decode=function(json){return eval("("+json+")")}}();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.MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");TSCM.util.DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");TSCM.util.LZ=function(A){return(A<0||A>9?"":"0")+A};TSCM.util.formatDate=function(f,a){a=a+"";var J="";var T=0;var e="";var D="";var I=f.getYear()+"";var F=f.getMonth()+1;var b=f.getDate();var N=f.getDay();var L=f.getHours();var V=f.getMinutes();var P=f.getSeconds();var R,S,B,Q,g,C,Z,Y,W,O,l,L,j,G,A,X;var U=new Object();if(I.length<4){I=""+(I-0+1900)}U.y=""+I;U.yyyy=I;U.yy=I.substring(2,4);U.M=F;U.MM=TSCM.util.LZ(F);U.MMM=TSCM.util.MONTH_NAMES[F-1];U.NNN=TSCM.util.MONTH_NAMES[F+11];U.d=b;U.dd=TSCM.util.LZ(b);U.E=TSCM.util.DAY_NAMES[N+7];U.EE=TSCM.util.DAY_NAMES[N];U.H=L;U.HH=TSCM.util.LZ(L);if(L==0){U.h=12}else{if(L>12){U.h=L-12}else{U.h=L}}U.hh=TSCM.util.LZ(U.h);if(L>11){U.K=L-12}else{U.K=L}U.k=L+1;U.KK=TSCM.util.LZ(U.K);U.kk=TSCM.util.LZ(U.k);if(L>11){U.a="PM"}else{U.a="AM"}U.m=V;U.mm=TSCM.util.LZ(V);U.s=P;U.ss=TSCM.util.LZ(P);while(T<a.length){e=a.charAt(T);D="";while((a.charAt(T)==e)&&(T<a.length)){D+=a.charAt(T++)}if(U[D]!=null){J=J+U[D]}else{J=J+D}}return J};TSCM.util.Glom=function(E,A){var C;if(document.all){C=354}else{C=343}this.backgroundColor="#cccccc";this.mousedownColor="#888888";this.width=200;this.maxfont=A.maxfontsize!==undefined?A.maxfontsize:400;this.minfont=A.minfontsize!==undefined?A.minfontsize:70;this.big=(A.maxed===false)?false:true;A.iframe=false;TSCM.util.Glom.superclass.constructor.call(this,E,A);this.el=this.element;if(typeof E=="string"){var B=dom.get(E);if(typeof E=="undefined"){this.render(document.body)}else{}}else{}if(this.big){this.initheight=Math.floor(YAHOO.util.Dom.getStyle(this.element.id,"height").replace("px",""));var D=YAHOO.util.Dom.getStyle(this.element.id,"height");if(this.browser.indexOf("ie")!=-1){var F=YAHOO.util.Dom.get(this.element.id);this.initheight=F.offsetHeight}}else{this.initheight=C}this.glom()};YAHOO.extend(TSCM.util.Glom,YAHOO.widget.Module);TSCM.util.Glom.prototype.glom=function(D){var E=YAHOO.util.Dom;var C=YAHOO.util.Event;var B;if(document.all){B=185}else{B=178}if(!this.big){E.setStyle(this.el,"height",B+"px")}E.setStyle(this.el,"overflow","hidden");C.on(this.el,"mousedown",function(G){},this,true);C.on(this.el,"mouseup",function(G){},this,true);var A={height:{to:this.initheight}};this.maxanim=new YAHOO.util.Anim(this.el,A,0.5,YAHOO.util.Easing.easeOut);this.maxanim.onComplete.subscribe(this.maximize,this,true);var F={height:{to:B}};this.minanim=new YAHOO.util.Anim(this.el,F,0.5,YAHOO.util.Easing.easeIn);this.minanim.onComplete.subscribe(this.minimize,this,true);C.on("expandButton","click",function(){TSC.reporting.sendLinkEvent("Quote|button|viewmore");var J=document.getElementById("expandButton");var G;var H;for(var I=0;I<J.childNodes.length;I++){if(J.childNodes[I].nodeType==1){if(J.childNodes[I].tagName.toUpperCase()=="IMG"){var K=J.childNodes[I].src;H=K.substring(0,K.lastIndexOf("/")+1);G=I}}}if(!this.big){this.maxanim.animate();J.childNodes[G].src=H+"closeExpandView.jpg"}else{this.minanim.animate();J.childNodes[G].src=H+"viewMoreQuote.jpg"}this.big=!this.big},this,true)};TSCM.util.Glom.prototype.minimize=function(){this.setBody("");this.setFooter("")};TSCM.util.Glom.prototype.maximize=function(){};TSCM.util.createEl=function(B){var D=null;var A=B;if(typeof A=="undefined"){A={}}if(typeof A.nodeName=="undefined"){A.nodeName="div"}try{D=document.createElement(A.nodeName);D.setAttribute("id",YAHOO.util.Dom.generateId());if(A.text!=undefined){D.appendChild(document.createTextNode(A.text))}if(A.html!=undefined){D.innerHTML=A.html}if(A.properties!=undefined){for(var C in A.properties){D.setAttribute(C,A.properties[C])}}var F=null;if(typeof A.parentNode=="string"){F=YAHOO.util.Dom.get(A.parentNode)}else{if(typeof A.parentNode=="object"){F=A.parentNode}else{if(A.parentNode instanceof Array){throw"can't add "+A.nodeName+" to parent array "}else{if(typeof A.parentNode=="undefined"){return D}}}}try{F.appendChild(D)}catch(E){throw"couldn't append element "+D.toString()}try{F.innerHTML=F.innerHTML}catch(E){throw"couldn't set innerHTML to itself"}}catch(E){}return D};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(J){var G;try{G=TSCM.cfg.contextRoot+"/video/index.html?bctid="+id;var F=J.responseXML;var E=F.getElementsByTagName("link");var H=E[1];G=H.firstChild.nodeValue}catch(I){G=TSCM.cfg.contextRoot+"/video/index.html"}document.location.href=G},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)}}};registerNS("TSCM.util.Format");TSCM.util.Format.currency=function(B,G){B=(Math.round((B-0)*100))/100;B=(B==Math.floor(B))?B+".00":((B*10==Math.floor(B*10))?B+"0":B);B=String(B);var F=B.split(".");var E=F[0];var C=F[1]?"."+F[1]:".00";var A="";if(G){if((E+C)>0){A="+"}else{A="-"}}E=String(Math.abs(E));var D=/(\d+)(\d{3})/;while(D.test(E)){E=E.replace(D,"$1,$2")}return A+E+C};TSCM.util.Format.percentage=function(B,G){B=(Math.round((B-0)*10))/10;B=String(B);var F=B.split(".");var E=F[0];var C=F[1]?"."+F[1]:".0";var A="";if(G){if((E+C)>0){A="+"}else{A="-"}}E=String(Math.abs(E));var D=/(\d+)(\d{3})/;while(D.test(E)){E=E.replace(D,"$1,$2")}return A+E+C+"%"};var expandableList=new function(){var A=YAHOO.util.Dom;return{init:function(){try{var B=A.getElementsByClassName("expandableBtn","img","twoCol_left",function(D){YAHOO.util.Event.on(D,"click",expandableList.doclick,expandableList,true)});A.getElementsByClassName("authImg","img",p,function(D){if(D.getAttribute("src").indexOf("1x1")!=-1){D.setAttribute("src",D.getAttribute("title"))}});try{A.getElementsByClassName("exTitle","div","twoCol_left",function(D){var E=D.getElementsByTagName("a")[0];E.setAttribute("title","find articles by "+E.innerHTML)})}catch(C){}}catch(C){log(C.message)}},doclick:function(D,C){try{var E=null;if(YAHOO.env.ua.ie){E=D.srcElement}else{E=D.target}TSC.reporting.sendLinkEvent("HLP|BTL|button|"+E.title);var H=A.getAncestorByClassName(E,"expandItem");var G=A.getElementsByClassName("openedText","div",H);var B=A.getElementsByClassName("closedText","div",H);if(E.getAttribute("src").indexOf("plus")!=-1){E.setAttribute("src","http://i.thestreet.com/files/tsc/v2008/css/images/minus.png");A.setStyle(G,"display","block");A.setStyle(B,"display","none");A.getElementsByClassName("authImg","img",H,function(I){if(I.getAttribute("src").indexOf("1x1")!=-1){I.setAttribute("src",I.getAttribute("title"))}})}else{E.setAttribute("src","http://i.thestreet.com/files/tsc/v2008/css/images/plus.png");A.setStyle(B,"display","block");A.setStyle(G,"display","none")}}catch(F){log(F)}}}};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(K,B,L,D,H,I,F,E,C,J){if(!document.getElementById){return }this.DETECT_KEY=J?J:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(K){this.setAttribute("swf",K)}if(B){this.setAttribute("id",B)}if(L){this.setAttribute("width",L)}if(D){this.setAttribute("height",D)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(I){this.addParam("bgcolor",I)}var A=F?F:"high";this.addParam("quality",A);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var G=(E)?E:window.location;this.setAttribute("xiRedirectUrl",G);this.setAttribute("redirectUrl","");if(C){this.setAttribute("redirectUrl",C)}};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 E=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){E=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);E=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");E=new deconcept.PlayerVersion([6,0,21]);B.AllowScriptAccess="always"}catch(D){if(E.major==6){return E}}try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(D){}}if(B!=null){E=new deconcept.PlayerVersion(B.GetVariable("$version").split(" ")[1].split(","))}}}return E};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;
/*headerSearch-min*/registerNS("TSCM.Quotes.Search");TSCM.Quotes.Search=new function(){var C,A,D,E,B;E=YAHOO.util.Dom;B=TSCM.cfg.contextRoot;return{init:function(){C=new YAHOO.widget.DS_XHR(B+"/ticker/search.ajaxaction",["tickers","symbol"]);C.scriptQueryParam="tickerName";C.queryMatchContains=false;C.queryMatchSubset=true;C.connXhrMode="ignoreStaleResponses";C.maxCacheEntries=100;A=new YAHOO.widget.AutoComplete("quoteSearch","quoteContainer",C);A.useShadow=true;A.typeAhead=false;A.forceSelection=false;A.animVert=false;A.animHoriz=false;A.alwaysShowContainer=false;A.autoHighlight=false;A.queryDelay=0;A.formatResult=function(F,G){return"<span style='font-weight:bold;'>"+F[0]+"</span>"+F[1].companyName};A.doBeforeExpandContainer=function(F,G,J,I){var H=E.getXY(F);H[0]+=-1;H[1]+=E.get(F).offsetHeight;E.setXY(G,H);return true};D=new TSCM.util.PersistenceManager();D.id="tsc_recentquotes";D.expiry_days=365},gotoTicker:function(){var I=document.getElementById("quoteSearch").value;var G=B+"/quote/"+I+".html";var H=D.get();var F=false;if(H!==null){if(H.length>20){H.shift()}for(i=0;i<H.length;i++){if(H[i]==I.toUpperCase()){F=true;break}}if(!F){H.push(I.toUpperCase())}}else{H=new Array(I.toUpperCase())}D.save(H);if(I!==null&&I!==""){document.location=G}},submitenter:function(H,G){var F;if(window.event){F=window.event.keyCode}else{if(G){F=G.which}else{return true}}if(F==13){TSCM.Quotes.Search.gotoTicker();return false}else{return true}}}};YAHOO.util.Event.on(window,"load",TSCM.Quotes.Search.init);


/* miniquote - min */
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,FUT-GOLD";var callback={success:function(o){var tickerObj=eval("("+o.responseText+")");if((tickerObj===null)||(tickerObj.results===null)||(tickerObj.results.length<6)){return }if(dom.getStyle("miniQuoteActualBox","display")!="block"){dom.setStyle("miniQuoteActualBox","display","block")}var miniten,mininet,minoil,minioilnet,minigold,minigoldnet,minidj,minidjnet,minisp,minispnet,mininas,mininasnet;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");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.X"){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")}}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=="FUT-GOLD"){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("miniQuoteActualBox")!==null){TSCM.Quotes.MiniQuote.updateIndices();window.setInterval(function(){TSCM.Quotes.MiniQuote.updateIndices()},60000)}if(dom.get("recentquotes")!==null){TSCM.Quotes.MiniQuote.updateRecentQuotes()}var quotesLink=document.createElement("span");quotesLink.id="quotesHover";document.body.appendChild(quotesLink);var quotesBox=document.createElement("div");quotesBox.id="recentQuotesPanel";document.body.appendChild(quotesBox);var quotesSurround=document.createElement("img");quotesSurround.id="capsHoverSurround";quotesSurround.src="http://i.thestreet.com/files/tsc/v2008/css/images/spacer.gif";document.body.appendChild(quotesSurround);var el=dom.get("recentQuotesExpand");if(el){TSCM.Quotes.MiniQuote.enhanceQuoteLink(el,quotesLink,quotesBox,quotesSurround)}},enhanceQuoteLink:function(ticker,hoverLink,hoverBox,hoverBoxSurround){var state=new TSCM.util.PersistenceManager();state.id="tsc_recentquotes";var stateResult=state.get();ticker.onmouseover=function(){if(stateResult===null){return }var tics="";for(var i=0;i<stateResult.length;i++){tics=tics+stateResult[i]+","}var recentQuotesDS=new YAHOO.util.DataSource(TSCM.cfg.contextRoot+"/ticker/recentQuoteDetail.ajaxaction?symbols="+tics);recentQuotesDS.responseType=YAHOO.util.DataSource.TYPE_JSON;recentQuotesDS.responseSchema={resultsList:"results",fields:["company","currentprice","sincelast"]};var movement=function(elCell,oRecord,oColumn,oData){var direction=oRecord.getData("sincelast");var im;if(direction<0){im="/css/images/quoteDownArrow.gif"}else{if(direction>0){im="/css/images/quoteUpArrow.gif"}}elCell.innerHTML="<img src='"+TSCM.cfg.imagesBaseUrl+im+"'/>"};var recentquotelink=function(elCell,oRecord,oColumn,oData){elCell.innerHTML="<a class='recentquotea' href='"+TSCM.cfg.contextRoot+"/quote/"+oData+".html'>"+oData+"</a>"};var changeValue=function(elCell,oRecord,oColumn,oData){if(isNaN(oData)){elCell.innerHTML="N/A"}else{var value=oData.toFixed(2);elCell.innerHTML=value+"%"}};this.mycustomCurrency=function(elCell,oRecord,oColumn,oData){if(isNaN(oData)){elCell.innerHTML="N/A"}else{el.innerHTML=util.Number.format(oData,oColumn.currencyOptions||this.get("currencyOptions"))}};var recentQuotesColumnDefs=[{key:"company",label:"Company",formatter:recentquotelink,sortable:true},{key:"pricemovement",label:"&nbsp;",formatter:movement},{key:"currentprice",label:"Price",formatter:"mycustomCurrency",sortable:true},{key:"sincelast",label:"Change",formatter:changeValue,sortable:true}];YAHOO.widget.DataTable.formatCurrency=this.mycustomCurrency;var recentQuotesTable=new YAHOO.widget.DataTable("recentQuotesPanel",recentQuotesColumnDefs,recentQuotesDS);ticker.pos=YAHOO.util.Dom.getXY(ticker);var agent=navigator.userAgent.toLowerCase();var indexMSIE=agent.indexOf("msie");if(indexMSIE!=-1){if(ticker.offsetLeft<10){var para=ticker.parentNode;var children=para.childNodes;if(ticker!=children.item(0)){ticker.pos[1]=ticker.pos[1]+ticker.offsetHeight}}}hoverLink.style.visibility="visible";var hoverLinkLeft=ticker.pos[0];var hoverLinkTop=ticker.pos[1];hoverLink.style.left=hoverLinkLeft+"px";hoverLink.style.top=hoverLinkTop+"px";hoverBox.style.visibility="visible";hoverBox.style.top=(hoverLinkTop+25)+"px";hoverBox.style.left=((hoverLinkLeft-hoverBox.offsetWidth)+29)+"px";hoverBoxSurround.style.visibility="visible";hoverBoxSurround.style.width=(hoverBox.offsetWidth+130)+"px";hoverBoxSurround.style.height=((stateResult.length*30)+260)+"px";hoverBoxSurround.style.top=(hoverLinkTop-100)+"px";hoverBoxSurround.style.left=(hoverLinkLeft-350)+"px";recentQuotesTable.subscribe("rowMouseoverEvent",recentQuotesTable.onEventHighlightRow);recentQuotesTable.subscribe("rowMouseoutEvent",recentQuotesTable.onEventUnhighlightRow);recentQuotesTable.subscribe("cellClickEvent",recentQuotesTable.onEventHighlightCell);recentQuotesTable.on("rowClickEvent",function(oArgs){var row=oArgs.target;var href=row.firstChild.firstChild.firstChild.href;window.location=href});var tableElem=YAHOO.util.Dom.getElementsByClassName("yui-dt-table","table","recentQuotesPanel");for(var n=0;n<tableElem.length;n++){var disclaimerFoot=document.createElement("tfoot");disclaimerFoot.id="disclaimerFoot";disclaimerFoot.colSpan="4";var disclaimerRow=document.createElement("tr");disclaimerRow.id="disclaimerRow";disclaimerRow.colSpan="4";var disclaimerCell=document.createElement("td");disclaimerCell.id="disclaimerCell";disclaimerCell.colSpan="4";var delayText=document.createTextNode("Data delayed 20 min");tableElem[n].appendChild(disclaimerFoot);disclaimerFoot.appendChild(disclaimerRow);disclaimerRow.appendChild(disclaimerCell);disclaimerCell.appendChild(delayText)}};var hideTickerHover=function(){hoverLink.style.visibility="hidden";hoverBox.style.visibility="hidden";hoverBoxSurround.style.visibility="hidden"};hoverBoxSurround.onmouseover=hideTickerHover;YAHOO.util.Event.addListener(window,"unload",hideTickerHover)}}};YAHOO.util.Event.onAvailable("miniQuoteActualBox",TSCM.Quotes.MiniQuote.init);
/* fix for premium services openAds iframe (ie6 only) */
//if (YAHOO.env.ua.ie != 0 && YAHOO.env.ua.ie < 7 ) {
//	function ieSucks() {
//		primsvcIframe.document.location.reload(true)
//	}
//	setTimeout('ieSucks()',12000);
//}
