
String.prototype.WWtrim=function()
{return this.replace(/(^\s*)|(\s*$)/g,"");}
String.prototype.WWpeek=function()
{(/([^,;]+)$/i).exec(this);return RegExp.$1;}
String.prototype.WWhighlight=function(s)
{var
esc=s.replace(/\./g,"\\."),rx=new RegExp("\\b(".concat(esc,")"),"i");return rx.test(this)?this.replace(rx,RegExp.$1.bold()):this;}
String.prototype.WWfrmt=function(rg)
{var s=this,c=0;for(;c<rg.length;c++)
{s=s.replace(new RegExp("\\{".concat(c,"\\}"),"g"),rg[c]);}
return s;}
if(!window.WordWheel)
{document.write("<script type=\"text/javascript\" src=\"/MSWebScriptResource.axd?s="+"%2f4Zxu6Y%2f3KSJK4EpT0o9WtYqtwTdwd%2fuh%2ftVi256vhK2ZCvSV2B8XeK5B7XPr%2f5VzRy5ZlH%2bDyLmd5t%2fwFiuJwgx8Sq%2bKOB5JJORWJttup8%3d"+"\"><"+"/script>");document.close();window.WordWheel={Request:{},Governor:{},CcPattern:{},Urls:{Host:null,FindSymbol:null,QuoteDetail:null},TextBox:{Object:null,DefaultText:null,LastIndexOf:-1},Canvas:{Object:null,Table:null,FindSymbol:null,SelectedRow:-1,Visible:false,SetVisible:function(fShow)
{var
s,w=WordWheel,c=w.Canvas;c.SelectedRow=-1;c.Visible=fShow;if(fShow)
{s="block";}
else
{s="none";w.Governor==null;}
c.Object.style.display=s;},SetPosition:function()
{var
w=WordWheel,p=w.TextBox.Object,s=w.Canvas.Object.style,cY=p.offsetHeight,cX=0;while(p!=null&&"HTML"!=p.tagName.toUpperCase())
{cY+=p.offsetTop;cX+=p.offsetLeft;p=p.offsetParent;}
s.top=cY+"px";s.left=cX+"px";},RowClick:function()
{var
w=WordWheel,v=w.TextBox.Object.value.WWtrim(),t=this.getAttribute("ticker").replace(w.CcPattern,""),q=(v.replace(/;/g,",").indexOf(",")==-1)?t:v.concat(",",t);document.location=w.Urls.QuoteDetail.concat("?symbol=",q,"&ww=1");},RowExit:function(e)
{if(e==null)
{e=window.event;}
if(e.type=="mouseout")
{WordWheel.Canvas.SelectedRow=-1;}
this.className="wwOut";},RowEnter:function(e)
{if(e==null)
{e=window.event;}
var
w=WordWheel,c=w.Canvas,t=w.TextBox,p=t.Object,idx=t.LastIndexOf,txt=this.getAttribute("ticker").replace(w.CcPattern,"");if(c.SelectedRow>-1)
{c.Table.rows[c.SelectedRow].onmouseout();}
this.className="wwOvr";c.SelectedRow=parseInt(this.getAttribute("rowidx"));if(e.type!="mouseover")
{p.value=(idx==-1)?txt.concat(","):p.value.substring(0,idx).concat(",",txt,",");}}}};}
WordWheel.Ctrl=function(){}
WordWheel.Ctrl.prototype={init:function()
{var
d=document,w=window,fn=new Function("s","var p = document.getElementById(s);return (p != null && 'OBJECT' == p.tagName.toUpperCase());");if(!(d.createElement&&d.getElementById&&d.getElementsByTagName&&w.encodeURIComponent))
{return;}
if(fn("PortMgr")||fn("chrtctl")||fn("FndrCtl")||fn("uniqueidobj"))
{return;}
var
h,f=d.createElement("div"),i=d.createElement("img"),s=d.createElement("span"),t=d.createElement("table"),z=d.createElement("div"),q=d.getElementById("txtQbe"),x=d.getElementById("qbe").getElementsByTagName("form")[0],u="/inc/css/ww.css?v=14",ww=WordWheel,cv=ww.Canvas,tb=ww.TextBox,url=ww.Urls;if(typeof(x)=="undefined")
{return;}
z.id="wwFoot";t.id="wwTbl";s.id="wwLnk";f.id="wwFra";i.src="/inc/images/question.gif";i.title=WordWheelResources.HelpLabel;i.onclick=function(){DoHelp(null,"Money_Investing_GetQuoteWordWheel.htm");};i.style.cursor="hand";t.cellPadding=0;t.cellSpacing=0;t.insertRow(0).insertCell(0);z.appendChild(i);z.appendChild(s);f.appendChild(t);f.appendChild(z);d.body.appendChild(f);ww.CcPattern=new RegExp(WordWheelResources.DefaultCountryCode.concat(":"),"i");if(d.createStyleSheet&&navigator.userAgent.indexOf("Firefox")==-1)
{d.createStyleSheet(u);}
else
{h=d.createElement("link");h.rel="stylesheet";h.href=u;d.getElementsByTagName("head")[0].appendChild(h);}
(/^(https*:\/\/[^\/]+)\/.+$/i).exec(x.action);url.Host=RegExp.$1;url.FindSymbol=url.Host.concat("/investor/common/findsymbol.asp");url.QuoteDetail=x.action;tb.Object=q;tb.DefaultText=q.value;cv.Object=f;cv.Table=t;cv.FindSymbol=s;cv.SetPosition();AddHandler(d,"onclick",gWWCtrl.HandleInput);AddHandler(d,"onkeyup",gWWCtrl.HandleInput);AddHandler(q,"onkeyup",gWWCtrl.HandleInput);AddHandler(w,"onunload",gWWCtrl.dispose);AddHandler(w,"onresize",cv.SetPosition);},dispose:function()
{RemoveHandler(WordWheel.TextBox.Object,"onkeyup",gWWCtrl.HandleInput);RemoveHandler(window,"onresize",WordWheel.Canvas.SetPosition);RemoveHandler(document,"onkeyup",gWWCtrl.HandleInput);RemoveHandler(document,"onclick",gWWCtrl.HandleInput);},getData:function()
{var
d=document,ww=WordWheel,v=ww.TextBox.Object.value,nxt=v.WWpeek().trim();if(v.length==0)
{ww.Canvas.SetVisible(false);return;}
if
((v==WordWheelResources.QbeDefaultValue)||(v.search(/(:|,|;|\s)$/)!=-1)||(nxt.search(/^(\$|\+|=|\/|\-|\.)$/)!=-1))
{return;}
if(window.XMLHttpRequest)
{ww.Request=new XMLHttpRequest();}
if(ww.Request)
{ww.Request.onreadystatechange=gWWCtrl.setData;ww.Request.open("GET","/inc/findsymbol.ashx?s=".concat(encodeURIComponent(nxt)),true);ww.Request.setRequestHeader("X-WordWheel-Client","1");ww.Request.send(null);}},setData:function()
{var
ww=WordWheel,rq=ww.Request;if(rq.readyState!=4)
{return;}
if(rq.status!=200&&(rq.status!=204&&rq.status!=1223))
{return;}
var
htm,cv=ww.Canvas,t=cv.Table,tbx=ww.TextBox,ipt=tbx.Object.value,txt=ipt.WWpeek(),fnT=new Function("s","var c = 40,t = s.length <= c ? s : s.substring(0,c).concat('...');return t.replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/&/g,'&amp;')");tbx.LastIndexOf=ipt.lastIndexOf(",");while(t.rows.length>0){t.deleteRow(0);}
switch(rq.status)
{case 204:case 1223:htm=WordWheelResources.NoResults.WWfrmt([fnT(txt)]);break;case 200:var
v=(typeof(rq.responseXml)=="undefined"?rq.responseXML:rq.responseXml),dE=v.documentElement,mpQy=(v.evaluate?dE.getElementsByTagName("Query"):dE.selectNodes("//Query")),cmpQy=mpQy.length,fn=new Function("p","n","return p.getElementsByTagName(n)[0].firstChild.nodeValue;"),cQy=0;for(;cQy<cmpQy;cQy++)
{var
gp=mpQy[cQy],ky=fn(gp,"Ticker"),mpRw=gp.getElementsByTagName("Item"),cmpRw=mpRw.length;for(var cRw=0;cRw<cmpRw;cRw++)
{var
c,s,r=t.insertRow(cRw),rw=mpRw[cRw],rg=[fn(rw,"Ticker"),fn(rw,"Name"),fn(rw,"Type"),fn(rw,"Country")],tk=(rg[3].length==0)?rg[0]:rg[3].concat(":",rg[0]);r.setAttribute("ticker",(rg[2].toLowerCase()=="index")?"$".concat(tk):tk);r.setAttribute("rowidx",cRw);r.onclick=cv.RowClick;r.onmouseout=cv.RowExit;r.onmouseover=cv.RowEnter;r.className="wwOut";c=r.insertCell(0);c.innerHTML=rg[0].WWhighlight(ky);c=r.insertCell(1);c.innerHTML=rg[1].WWhighlight(ky);for(var cCells=2;cCells<=3;cCells++)
{s=document.createTextNode(rg[cCells]);c=r.insertCell(cCells);c.className="memo";c.appendChild(s);}}}
htm=WordWheelResources.ShowAllLabel.WWfrmt([fnT(txt)]).link(ww.Urls.FindSymbol.concat("?company=",encodeURIComponent(txt)));break;}
cv.FindSymbol.innerHTML=htm;cv.SetVisible(true);},HandleInput:function(e)
{if(e==null)
{e=window.event;}
var
w=WordWheel,c=w.Canvas,g=w.Governor,s=e.srcElement?e.srcElement:e.target;if(s!=w.TextBox.Object)
{c.SetVisible(false);}
else
{if(e.stopPropagation)
{e.stopPropagation();}
else
{e.cancelBubble=true;}
if(c.Visible)
{var
ch=e.keyCode,t=c.Table,ix=c.SelectedRow;if(ch==38)
{if(ix>0)
{t.rows[ix-1].onmouseover();}
else
{t.rows[ix].onmouseout();c.SelectedRow=-1;}
return;}
if(ch==40)
{if(ix+1<t.rows.length)
{t.rows[ix+1].onmouseover();}
return;}
if(ch==27)
{c.SetVisible(false);return;}}
g=null;g=window.setTimeout(gWWCtrl.getData,300);}}}
var gWWCtrl=new WordWheel.Ctrl();if(self==top&&(typeof(AddHandler)=="function"))
{AddHandler(window,"onload",gWWCtrl.init);}