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");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 numOrdA(d,c){return(d-c)}function numOrdD(d,c){return(c-d)}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 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.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(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.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(O,J){J=J+"";var n="";var A=0;var N="";var f="";var l=O.getYear()+"";var g=O.getMonth()+1;var L=O.getDate();var r=O.getDay();var q=O.getHours();var C=O.getMinutes();var u=O.getSeconds();var w,z,b,v,P,e,I,G,D,t,R,q,Q,j,a,F;var B=new Object();if(l.length<4){l=""+(l-0+1900)}B.y=""+l;B.yyyy=l;B.yy=l.substring(2,4);B.M=g;B.MM=TSCM.util.LZ(g);B.MMM=TSCM.util.MONTH_NAMES[g-1];B.NNN=TSCM.util.MONTH_NAMES[g+11];B.d=L;B.dd=TSCM.util.LZ(L);B.E=TSCM.util.DAY_NAMES[r+7];B.EE=TSCM.util.DAY_NAMES[r];B.H=q;B.HH=TSCM.util.LZ(q);if(q==0){B.h=12}else{if(q>12){B.h=q-12}else{B.h=q}}B.hh=TSCM.util.LZ(B.h);if(q>11){B.K=q-12}else{B.K=q}B.k=q+1;B.KK=TSCM.util.LZ(B.K);B.kk=TSCM.util.LZ(B.k);if(q>11){B.a="PM"}else{B.a="AM"}B.m=C;B.mm=TSCM.util.LZ(C);B.s=u;B.ss=TSCM.util.LZ(u);while(A<J.length){N=J.charAt(A);f="";while((J.charAt(A)==N)&&(A<J.length)){f+=J.charAt(A++)}if(B[f]!=null){n=n+B[f]}else{n=n+f}}return n};TSCM.util.formatCurrency=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.Glom=function(f,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,f,a);this.el=this.element;if(typeof f=="string"){var b=dom.get(f);if(typeof f=="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 e=YAHOO.util.Dom.getStyle(this.element.id,"height");if(this.browser.indexOf("ie")!=-1){var g=YAHOO.util.Dom.get(this.element.id);this.initheight=g.offsetHeight}}else{this.initheight=c}this.glom()};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 l=document.getElementById("expandButton");var g;var j;for(var k=0;k<l.childNodes.length;k++){if(l.childNodes[k].nodeType==1){if(l.childNodes[k].tagName.toUpperCase()=="IMG"){var m=l.childNodes[k].src;j=m.substring(0,m.lastIndexOf("/")+1);g=k}}}if(!this.big){this.maxanim.animate();l.childNodes[g].src=j+"closeExpandView.jpg"}else{this.minanim.animate();l.childNodes[g].src=j+"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 g=null;if(typeof a.parentNode=="string"){g=YAHOO.util.Dom.get(a.parentNode)}else{if(typeof a.parentNode=="object"){g=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{g.appendChild(d)}catch(f){throw"couldn't append element "+d.toString()}try{g.innerHTML=g.innerHTML}catch(f){throw"couldn't set innerHTML to itself"}}catch(f){}return d};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)}}};registerNS("TSCM.util.Format");TSCM.util.Format.currency=function(b,g){if(isNaN(b)){return("N/A");alert("Grace")}else{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(f,d){try{var g=null;if(YAHOO.env.ua.ie){g=f.srcElement}else{g=f.target}TSC.reporting.sendLinkEvent("HLP|BTL|button|"+g.title);var l=a.getAncestorByClassName(g,"expandItem");var k=a.getElementsByClassName("openedText","div",l);var c=a.getElementsByClassName("closedText","div",l);if(g.getAttribute("src").indexOf("plus")!=-1){g.setAttribute("src","http://i.thestreet.com/files/tsc/v2008/css/images/minus.png");a.setStyle(k,"display","block");a.setStyle(c,"display","none");a.getElementsByClassName("authImg","img",l,function(b){if(b.getAttribute("src").indexOf("1x1")!=-1){b.setAttribute("src",b.getAttribute("title"))}})}else{g.setAttribute("src","http://i.thestreet.com/files/tsc/v2008/css/images/plus.png");a.setStyle(c,"display","block");a.setStyle(k,"display","none")}}catch(j){log(j)}}}};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,r,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(r){this.setAttribute("width",r)}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;YAHOO.namespace("extension");YAHOO.extension.Carousel=function(b,a){this.init(b,a)};YAHOO.extension.Carousel.prototype={UNBOUNDED_SIZE:1000000,init:function(r,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=r;this.carouselElem=YAHOO.util.Dom.get(r);this._prevEnabled=true;this._nextEnabled=true;this.cfg=new YAHOO.util.Config(this);this.cfg.addProperty("scrollBeforeAmount",{value:0,handler:function(t,s,u){},validator:k.cfg.checkNumber});this.cfg.addProperty("scrollAfterAmount",{value:0,handler:function(t,s,u){},validator:k.cfg.checkNumber});this.cfg.addProperty("loadOnStart",{value:true,handler:function(t,s,u){},validator:k.cfg.checkBoolean});this.cfg.addProperty("orientation",{value:"horizontal",handler:function(t,s,u){k.reload()},validator:function(s){if(typeof s=="string"){return("horizontal,vertical".indexOf(s.toLowerCase())!=-1)}else{return false}}});this.cfg.addProperty("size",{value:this.UNBOUNDED_SIZE,handler:function(t,s,u){k.reload()},validator:k.cfg.checkNumber});this.cfg.addProperty("numVisible",{value:3,handler:function(t,s,u){k.reload()},validator:k.cfg.checkNumber});this.cfg.addProperty("firstVisible",{value:1,handler:function(t,s,u){k.moveTo(s[0])},validator:k.cfg.checkNumber});this.cfg.addProperty("scrollInc",{value:3,handler:function(t,s,u){},validator:k.cfg.checkNumber});this.cfg.addProperty("animationSpeed",{value:0.25,handler:function(t,s,u){k.animationSpeed=s[0]},validator:k.cfg.checkNumber});this.cfg.addProperty("animationMethod",{value:YAHOO.util.Easing.easeOut,handler:function(t,s,u){}});this.cfg.addProperty("animationCompleteHandler",{value:null,handler:function(t,s,u){if(k._animationCompleteEvt){k._animationCompleteEvt.unsubscribe(k._currAnimationCompleteHandler,k)}k._currAnimationCompleteHandler=s[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(u,s,v){var t=s[0];if(t>0){k.startAutoPlay()}else{k.stopAutoPlay()}}});this.cfg.addProperty("wrap",{value:false,handler:function(t,s,u){},validator:k.cfg.checkBoolean});this.cfg.addProperty("navMargin",{value:0,handler:function(t,s,u){k.calculateSize()},validator:k.cfg.checkNumber});this.cfg.addProperty("revealAmount",{value:0,handler:function(t,s,u){k.reload()},validator:k.cfg.checkNumber});this.cfg.addProperty("prevElementID",{value:null,handler:function(t,s,u){if(k._carouselPrev){YAHOO.util.Event.removeListener(k._carouselPrev,"click",k._scrollPrev)}k._prevElementID=s[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(t,s,u){if(k._carouselPrev){YAHOO.util.Event.removeListener(k._carouselPrev,"click",k._scrollPrev)}k._prevElementID=s[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(t,s,u){if(k._carouselNext){YAHOO.util.Event.removeListener(k._carouselNext,"click",k._scrollNext)}k._nextElementID=s[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(t,s,u){if(k._carouselNext){YAHOO.util.Event.removeListener(k._carouselNext,"click",k._scrollNext)}k._nextElementID=s[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(t,s,u){if(k._loadInitHandlerEvt){k._loadInitHandlerEvt.unsubscribe(k._currLoadInitHandler,k)}k._currLoadInitHandler=s[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(t,s,u){if(k._loadNextHandlerEvt){k._loadNextHandlerEvt.unsubscribe(k._currLoadNextHandler,k)}k._currLoadNextHandler=s[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(t,s,u){if(k._loadPrevHandlerEvt){k._loadPrevHandlerEvt.unsubscribe(k._currLoadPrevHandler,k)}k._currLoadPrevHandler=s[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(t,s,u){if(k._currPrevButtonStateHandler){k._prevButtonStateHandlerEvt.unsubscribe(k._currPrevButtonStateHandler,k)}k._currPrevButtonStateHandler=s[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(t,s,u){if(k._currNextButtonStateHandler){k._nextButtonStateHandlerEvt.unsubscribe(k._currNextButtonStateHandler,k)}k._currNextButtonStateHandler=s[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 q=this.cfg.getProperty("loadPrevHandler");if(q){this._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",this);this._loadPrevHandlerEvt.subscribe(q,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 K=this.carouselList.childNodes;var u=null;for(var F=0;F<K.length;F++){u=K[F];if(u.tagName=="LI"||u.tagName=="li"){break}}var E=this.cfg.getProperty("navMargin");var M=this.cfg.getProperty("numVisible");var j=this.cfg.getProperty("firstVisible");var I=this._getStyleVal(u,"paddingLeft");var B=this._getStyleVal(u,"paddingRight");var H=this._getStyleVal(u,"marginLeft");var A=this._getStyleVal(u,"marginRight");var z=this._getStyleVal(u,"paddingTop");var c=this._getStyleVal(u,"paddingBottom");var y=this._getStyleVal(u,"marginTop");var a=this._getStyleVal(u,"marginBottom");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-vertical");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-horizontal");if(this.isVertical()){var w=I+B+H+A;YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical");var f=z+c+y+a;var l=this._getStyleVal(this.carouselList,"paddingTop");var D=this._getStyleVal(this.carouselList,"paddingBottom");var k=this._getStyleVal(this.carouselList,"marginTop");var C=this._getStyleVal(this.carouselList,"marginBottom");var L=l+D+k+C;var s=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(f)/2):0;var d=this._getStyleVal(u,"height",true);this.scrollAmountPerInc=(d+f);var e=this._getStyleVal(u,"width");this.carouselElem.style.width=(e+w)+"px";this._clipReg.style.height=(this.scrollAmountPerInc*M+s*2+L)+"px";this.carouselElem.style.height=(this.scrollAmountPerInc*M+s*2+E*2+L)+"px";var G=(this._isExtraRevealed())?(s-(Math.abs(y-a)+Math.abs(z-c))/2):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"top",""+G+"px");var q=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,q-this.scrollAmountPerInc*(j-1))}else{YAHOO.util.Dom.addClass(this.carouselList,"carousel-horizontal");var v=this._getStyleVal(this.carouselList,"paddingLeft");var n=this._getStyleVal(this.carouselList,"paddingRight");var t=this._getStyleVal(this.carouselList,"marginLeft");var m=this._getStyleVal(this.carouselList,"marginRight");var g=v+n+t+m;var J=H+A;var w=J+B+I;var s=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(w)/2):0;var e=u.offsetWidth;this.scrollAmountPerInc=e+J;this._clipReg.style.width=(this.scrollAmountPerInc*M+s*2)+"px";var b=(this._isExtraRevealed())?(s-(Math.abs(A-H)+Math.abs(B-I))/2-(t+v)):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"left",""+b+"px");var r=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,r-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 r=this.cfg.getProperty("numVisible");var n=this._priorFirstVisible;var k=this._priorLastVisible;var s=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+r-1;if(g>a.end){g=a.end;m=g-r+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 q={points:{by:[-this.scrollAmountPerInc*e,0]}};if(this.isVertical()){q={points:{by:[0,-this.scrollAmountPerInc*e]}}}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,q,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 r=this.cfg.getProperty("numVisible");var n=this._priorFirstVisible;var k=this._priorLastVisible;var s=this.cfg.getProperty("size");var m=n-g;var a=this._calculateAllowableScrollExtent();m=(m<a.start)?a.start:m;var f=m+r-1;if(f>a.end){f=a.end;m=f-r+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 q={points:{by:[this.scrollAmountPerInc*g,0]}};if(this.isVertical()){q={points:{by:[0,this.scrollAmountPerInc*g]}}}this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,q,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}};registerNS("TSCM.ratings");TSCM.ratings.loadQuoteRating=function(g){if(g!==null&&g){var j,f;if(g.type=="equity"){j=g.CurrentRating.toUpperCase();f=g.LetterGradeRating.chop(1)}if(g.type=="fund"||g.type=="etf"){j=g.recommendation.toUpperCase();f=g.InvestmentRating.chop(1)}if(j=="BUY"){Ext.get("stockQuoteRating").dom.innerHTML="<img src='http://i.thestreet.com/files/tsc/v2008/css/images/buy.png' width='71' height='66' />"}if(j=="SELL"){Ext.get("stockQuoteRating").dom.innerHTML="<img src='http://i.thestreet.com/files/tsc/v2008/css/images/sell.png' width='75' height='66' />"}if(j=="HOLD"){Ext.get("stockQuoteRating").dom.innerHTML="<img src='http://i.thestreet.com/files/tsc/v2008/css/images/hold.png' width='75' height='66' />"}if(f=="A"){YAHOO.util.Dom.get("ratingA").className="activeGreen"}if(f=="B"){YAHOO.util.Dom.get("ratingB").className="activeGreen"}if(f=="C"){YAHOO.util.Dom.get("ratingC").className="activeBlue"}if(f=="D"){YAHOO.util.Dom.get("ratingD").className="activeRed"}if(f=="E"){YAHOO.util.Dom.get("ratingE").className="activeRed"}if(g.ratingHistory!==null&&g.ratingHistory){var c=g.ratingHistory;var b=Math.min(c.length,4);var a="";var e;for(var d=0;d<b;d++){if(c[d].to.toLowerCase()=="buy"){ratingHistoryColor="upGreenBgrd"}if(c[d].to.toLowerCase()=="hold"){ratingHistoryColor="holdBlueBgrd"}if(c[d].to.toLowerCase()=="sell"){ratingHistoryColor="downRedBgrd"}if(TSCM.ratings.stristr(c[d].date,"/",false)){e=c[d].date}else{e=c[d].date.substring(4,6)+"/"+c[d].date.substring(6,8)+"/"+c[d].date.substring(0,4)}a+="<div><div class='boxSubTitle'>"+e+"</div><div class='boxSubData'><div class='"+ratingHistoryColor+"'></div>"+c[d].to+"</div></div>"}Ext.get("ratingHistorySection").dom.innerHTML="<div class='boxTitle'>Rating History</div>"+a}}else{Ext.get("stockQuoteRatingDetails").dom.innerHTML="";Ext.get("stockQuoteRating").dom.innerHTML="NA"}};TSCM.ratings.stristr=function(b,c,a){var d=0;d=b.toLowerCase().indexOf(c.toLowerCase());if(d==-1){return false}else{if(a){return b.substr(0,d)}else{return b.slice(d)}}};TSCM.ratings.getRecFromRating=function(b){var a;if(typeof b!="string"){return"-"}if((b.indexOf("A")!=-1)||(b.indexOf("B")!=-1)){a="BUY"}if((b.indexOf("C")!=-1)){a="HOLD"}if((b.indexOf("D")!=-1)||(b.indexOf("E")!=-1)||(b.indexOf("F")!=-1)){a="SELL"}return a};registerNS("TSCM.pages.Quote");TSCM.pages.Quote=new function(){var j;var f=TSCM.pages.Quote.CHART_1YEAR;var k="";var b;var d=new DLList();var e="";var c=TSCM.pages.Quote.CHART_FREQ_15;var g=YAHOO.util.Dom;var l=YAHOO.util.Event;var a=YAHOO.util.Element;return{CHART_DAY:1,CHART_1MONTH:2,CHART_3MONTH:3,CHART_6MONTH:4,CHART_1YEAR:5,CHART_2YEAR:6,CHART_5YEAR:7,CHART_ALL:8,CHART_FREQ_1:1,CHART_FREQ_5:5,CHART_FREQ_15:15,init:function(){f=TSCM.pages.Quote.CHART_1YEAR;if(g.get("quotearea")!==null){var m=YAHOO.util.Dom.getElementsByClassName("quotepanel");for(var s=0;s<m.length;s++){YAHOO.util.Dom.generateId(m[s],"asdfafdaf");j=new TSCM.util.Glom(m[s],{visible:true,maxed:false})}}if(g.get("moreinfobutton")!==null){var v=document.createElement("span");v.id="relInfoHover";document.body.appendChild(v);var n=g.get("relInfoDropdown");if(g.get("relInfoSurround")==null){var w=document.createElement("img");w.id="relInfoSurround";w.src="http://i.thestreet.com/files/tsc/v2008/css/images/spacer.gif";document.body.appendChild(w)}else{var w=g.get("relInfoSurround");w.src="http://i.thestreet.com/files/tsc/v2008/css/images/spacer.gif"}var q=g.get("moreinfobutton");TSCM.pages.Quote.enhanceRelInfoLink(q,v,n,w)}if(g.get("stockQuoteRating")!==null){try{TSCM.ratings.loadQuoteRating(TSCM.ratings.ratingData)}catch(u){}}if(g.get("quoteCompare")!==null){g.get("quoteCompare").style.display="none";l.addListener(g.get("compareBtn"),"click",TSCM.pages.Quote.togglecompare);YAHOO.util.Event.addListener(["SPX.XCompareCheck","INDUCompareCheck","COMPXCompareCheck"],"click",TSCM.pages.Quote.chartoverlay)}if(g.get("freqDropdown")!==null){var y=document.createElement("span");y.id="freqHover";document.body.appendChild(y);var t=g.get("freqDropdown");if(g.get("freqSurround")==null){var r=document.createElement("img");r.id="freqSurround";r.src="http://i.thestreet.com/files/tsc/v2008/css/images/spacer.gif";document.body.appendChild(r)}else{var r=g.get("freqSurround");r.src="http://i.thestreet.com/files/tsc/v2008/css/images/spacer.gif"}var q=g.get("frequency");TSCM.pages.Quote.enhanceFreqInfoLink(q,y,t,r);YAHOO.util.Dom.setStyle(["chartfreq1","chartfreq5","chartfreq15"],"fontWeight","normal");YAHOO.util.Dom.setStyle("chartfreq15","fontWeight","bold")}},tradeNow:{defaultBroker:YAHOO.util.Cookie.get("tradeNowBroker"),modifyLink:function(){YAHOO.util.Dom.get("tradenowBtn").href=TSCM.cfg.contextRoot+"/staticFramed/tradenow.html?broker="+this.defaultBroker},setButton:function(){if(this.defaultBroker){this.modifyLink()}}},scaleText:{el:null,elText:null,defaultEms:null,threshold:null,overThreshold:false,amt:null,checkTextLength:function(){if(this.elText.length>this.threshold){this.overThreshold=true}if(this.overThreshold){this.resize()}},resize:function(){var q=this.elText.length-this.threshold;var m=q*this.amt;var n=(this.defaultEms-m)+"em";YAHOO.util.Dom.get(this.el.id).style.fontSize=n},init:function(m){this.el=m.element;this.elText=m.element.firstChild;this.defaultEms=m.defaultEms;this.threshold=parseFloat(m.threshold);this.overThreshold=false;this.amt=m.incrementEms;this.checkTextLength()}},togglecompare:function(){if(g.get("quoteCompare").style.display=="none"){g.get("compareBtn").src=TSCM.cfg.imagesBaseUrl+"/css/images/compareStockUpBtn.png";g.get("quoteCompare").style.display="block"}else{g.get("compareBtn").src=TSCM.cfg.imagesBaseUrl+"/css/images/compareStockBtn.png";g.get("quoteCompare").style.display="none"}},getChart:function(){return f},setFreq:function(m,n){c=m;YAHOO.util.Dom.setStyle(["chartfreq1","chartfreq5","chartfreq15"],"fontWeight","normal");YAHOO.util.Dom.setStyle(n,"fontWeight","bold");if(f==TSCM.pages.Quote.CHART_DAY){if(b!=""){window.clearInterval(b)}b=window.setInterval("TSCM.pages.Quote.chartoverlay()",c*60000)}TSC.reporting.sendLinkEvent("Quote|CF|freq|"+n)},switchchart:function(m){f=m;TSCM.pages.Quote.chartoverlay()},reportLink:function(m){TSC.reporting.sendLinkEvent("QUOTE|PVNM|tab|"+m.target.title)},newsMapPopUp:function(n,q,m){newwindow=window.open(n,"window","height="+m+",width="+q+",scrollbars=0,resizable=0")},addcompareticker:function(r){if(r===null||r==""){return}r=r.toUpperCase();if(r>10){r=r.substring(0,9)}var m=g.get("chartCompareList");if(d.count()>=4){return}var q=null;while((q=d.find(function(n){return n==r+"ListItem"},q))){return}TSCM.util.createEl({parentNode:m,nodeName:"li",html:"<input id='"+r+"CompareCheck' type='checkbox' class='tickerCompareCheck' checked='true'/>"+r+"<img id='"+r+"CompareDel' class='closeCompare imgArrow' src='"+TSCM.cfg.imagesBaseUrl+"/css/images/closeBtn.png' width='16px' height='16px' />",properties:{id:r+"ListItem"}});YAHOO.util.Event.addListener(r+"CompareDel","click",TSCM.pages.Quote.removecompareticker);YAHOO.util.Event.addListener(r+"CompareCheck","click",TSCM.pages.Quote.chartoverlay);d.add(r+"ListItem");TSCM.pages.Quote.chartoverlay();return},removecompareticker:function(q){var m=this.id.replace(/CompareDel/,"ListItem");l.purgeElement(m,true);Ext.get(m).remove();var s=null;var r=null;while((s=d.find(function(n){return n==m},s))){r=s}r.extract();TSCM.pages.Quote.chartoverlay()},chartoverlay:function(){if(f!=TSCM.pages.Quote.CHART_DAY){window.clearInterval(b)}g.get("symbolChartImg").src="http://i.thestreet.com/files/tsc/v2008/css/images/ajax-loader.gif";var n=YAHOO.util.Dom.getElementsByClassName("tickerCompareCheck","input");e="";for(i=0;i<n.length;i++){if(n[i].checked===true){e=String(e+n[i].id.replace(/CompareCheck/,"")+",")}}var m=TSCM.cfg.contextRoot+"/ticker/getChart.ajaxaction?symbol="+TSCM.pages.PageInfo.Ticker+"&period="+f+"&dd=true";if(e!=""){m=m+"&benchmarks="+e}g.get("symbolChartImg").src=m},enhanceRelInfoLink:function(t,q,r,n){var s=new TSCM.util.PersistenceManager();s.id="tsc_recentquotes";var m=s.get();t.onmouseover=function(){t.pos=YAHOO.util.Dom.getXY(t);var y=navigator.userAgent.toLowerCase();var z=y.indexOf("msie");if(z!=-1){if(t.offsetLeft<10){var u=t.parentNode;var w=u.childNodes;if(t!=w.item(0)){t.pos[1]=t.pos[1]+t.offsetHeight}}}q.style.visibility="visible";var A=t.pos[0];var v=t.pos[1];q.style.left=A+"px";q.style.top=v+"px";r.style.visibility="visible";r.style.top=(v+18)+"px";r.style.left=(A+1)+"px";n.style.visibility="visible";n.style.width=(r.offsetWidth+200)+"px";n.style.height=(r.offsetHeight+200)+"px";n.style.top=(v-100)+"px";n.style.left=(A-100)+"px"};hideTickerHover=function(){try{q.style.visibility="hidden";r.style.visibility="hidden";n.style.visibility="hidden"}catch(u){}};n.onmouseover=hideTickerHover;YAHOO.util.Event.addListener(window,"unload",hideTickerHover)},enhanceFreqInfoLink:function(t,q,r,n){var s=new TSCM.util.PersistenceManager();s.id="tsc_recentquotes";var m=s.get();t.onmouseover=function(){t.pos=YAHOO.util.Dom.getXY(t);var y=navigator.userAgent.toLowerCase();var z=y.indexOf("msie");if(z!=-1){if(t.offsetLeft<10){var u=t.parentNode;var w=u.childNodes;if(t!=w.item(0)){t.pos[1]=t.pos[1]+t.offsetHeight}}}q.style.visibility="visible";var A=t.pos[0];var v=t.pos[1];q.style.left=A+"px";q.style.top=v+"px";r.style.visibility="visible";r.style.top=(v+13)+"px";r.style.left=(A-13)+"px";n.style.visibility="visible";n.style.width=(r.offsetWidth+200)+"px";n.style.height=(r.offsetHeight+200)+"px";n.style.top=(v-100)+"px";n.style.left=(A-100)+"px"};hideTickerHover=function(){q.style.visibility="hidden";r.style.visibility="hidden";n.style.visibility="hidden"};n.onmouseover=hideTickerHover;YAHOO.util.Event.addListener(window,"unload",hideTickerHover)}}};registerNS("TSCM.ratings");TSCM.ratings.loadQuoteRating=function(f){if(f!==null&&f){var k=YAHOO.util.Dom;var b,a;if(f.type=="equity"){b=f.CurrentRating.toUpperCase();a=f.LetterGradeRating.chop(1)}if(f.type=="fund"||f.type=="etf"){b=f.recommendation.toUpperCase();a=f.InvestmentRating.chop(1)}if(b=="BUY"){k.get("stockQuoteRating").innerHTML='<span class="buy">BUY</span>'}if(b=="SELL"){k.get("stockQuoteRating").innerHTML='<span class="sell">SELL</span>'}if(b=="HOLD"){k.get("stockQuoteRating").innerHTML='<span class="hold">HOLD</span>'}if(a=="A"){k.get("ratingA").className="activeGreen"}if(a=="B"){k.get("ratingB").className="activeGreen"}if(a=="C"){k.get("ratingC").className="activeBlue"}if(a=="D"){k.get("ratingD").className="activeRed"}if(a=="E"){k.get("ratingE").className="activeRed"}if(f.ratingHistory!==null&&f.ratingHistory){var j=f.ratingHistory;var c=Math.min(j.length,3);var d="";var g;for(var e=0;e<c;e++){if(j[e].to.toLowerCase()=="buy"){ratingHistoryColor="upGreenBgrd"}if(j[e].to.toLowerCase()=="hold"){ratingHistoryColor="holdBlueBgrd"}if(j[e].to.toLowerCase()=="sell"){ratingHistoryColor="downRedBgrd"}if(TSCM.ratings.stristr(j[e].date,"/",false)){g=j[e].date}else{g=j[e].date.substring(4,6)+"/"+j[e].date.substring(6,8)+"/"+j[e].date.substring(0,4)}d+="<div><div class='boxSubTitle'>"+g+"</div><div class='boxSubData'><div class='"+ratingHistoryColor+"'></div>"+j[e].to+"</div></div>"}k.get("ratingHistorySection").innerHTML=d}}else{k.get("stockQuoteRatingDetails").innerHTML="";k.get("stockQuoteRating").innerHTML="NA"}};TSCM.ratings.stristr=function(b,c,a){var d=0;d=b.toLowerCase().indexOf(c.toLowerCase());if(d==-1){return false}else{if(a){return b.substr(0,d)}else{return b.slice(d)}}};TSCM.ratings.getRecFromRating=function(b){var a;if(typeof b!="string"){return"-"}if((b.indexOf("A")!=-1)||(b.indexOf("B")!=-1)){a="BUY"}if((b.indexOf("C")!=-1)){a="HOLD"}if((b.indexOf("D")!=-1)||(b.indexOf("E")!=-1)||(b.indexOf("F")!=-1)){a="SELL"}return a};registerNS("TSCM.pages.Author");TSCM.pages.Author=new function(){return{init:function(){}}};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.pages.Static");TSCM.pages.Static=new function(){return{}};function stopVideo(){callFlash("stopVideo")}registerNS("TSCM.pages.General");TSCM.pages.General=new function(){var d;var a;var c=YAHOO.util.Dom;var b=YAHOO.util.Event;return{init:function(){if(c.get("headlinesScroller")!==null){var g=function(m,k){var l=k[0];var n=k[1];if(l){n.className=""}else{n.className="disabled"}};var j=function(n,l){var m=l[0];var k=l[1];if(m){k.className=""}else{k.className="disabled"}};d=new YAHOO.extension.Carousel("headlinesScroller",{numVisible:1,scrollInc:1,prevElement:"scrollBack",nextElement:"scrollForward",size:3,prevButtonStateHandler:this.handlePrevButtonStateStories,nextButtonStateHandler:this.handleNextButtonStateStories})}if((c.get("tTabs")!==null)){a=new YAHOO.widget.TabView("tTabs");b.on("tTabs","click",TSCM.pages.General.reportLink)}if((document.getElementById("flashObj0")!==null)){var e=document.getElementsByTagName("a");for(var f=0;f<e.length;f++){YAHOO.util.Event.addListener(e[f],"click",stopVideo)}}},onclick:function(e){TSC.reporting.sendLinkEvent("GLOBAL|tab|"+e.target.title)},imgError:function(e){e.width=0;e.height=0;e.src=TSCM.cfg.imagesBaseUrl+"/css/images/1x1.gif";e.style.margin=0;var f=document.getElementById("authorName");if(f){f.style.display="none"}},inString:function(e,f){var g=0;g=e.toLowerCase().indexOf(f.toLowerCase());if(g==-1){return false}else{return true}},include_rsipixel:function(){var m=document.getElementsByTagName("head")[0];var k=document.createElement("script");k.type="text/javascript";k.src="http://js.revsci.net/gateway/gw.js?csid=G05524";try{for(var l=0;l<rsinetsegs.length;l++){var j=rsinetsegs[l];var f=j.replace(/G05524_/,"");rsinetsegs[l]=f}var g=rsinetsegs.join(":");var q=new Date();q.setDate(q.getDate()+14);document.cookie="rsi="+escape(g)+";expires="+q.toGMTString()}catch(n){}},replacePepsTitle:function(){var f=YAHOO.util.Dom.getElementsByClassName("pepsTitle","span","topItemsTab2");for(var e=0;e<=f.length-1;e++){f[e].innerHTML="(&#36;)"}},replaceRmContainer:function(){var f=YAHOO.util.Dom.getElementsByClassName("rmContainer","span","topItemsTab2");for(var e=0;e<=f.length-1;e++){f[e].innerHTML="(&#36;)"}}}};YAHOO.util.Event.on(window,"load",TSCM.pages.General.init);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}}};