var FlashVers=null,agt=navigator.userAgent.toLowerCase(),isMac=(agt.indexOf("mac")!=-1),dtime,utime,vmid,oMid,oIid=null,currDat=new Date();var includesptab="n";if(getCookie("includesptab")!=""){includesptab=getCookie("includesptab").substring(1,getCookie("includesptab").length)}function encode(c){var a="",b=0;for(;b<c.length;b++){if(c.charAt(b)==" "){a+="+"}else{a+=c.charAt(b)}}return escape(a)}function etWin(e,t,a,o,g,d,b,p,s,h,n,q,l){var f;if(l==null){l=true}if(!e){return}t=(l?(t?t:"ETpopUP"):(t?t:"_blank"));f=(l?"width="+(a?a:400)+",":(a?"width="+a+",":""))+(l?"height="+(o?o:400)+",":(o?"height="+o+",":""))+(l?"toolbar="+(g?g:1)+",":(g?"toolbar="+g+",":""))+(l?"location="+(d?d:1)+",":(d?"location="+d+",":""))+(l?"scrollbars="+(b?b:1)+",":(b?"scrollbars="+b+",":""))+(l?"menubar="+(p?p:1)+",":(p?"menubar="+p+",":""))+(l?"resizable="+(s?s:1)+",":(s?"resizable="+s+",":""))+(l?"top="+(n?n:5)+",":(n?"top="+n+",":""))+(l?"left="+(h?h:5)+",":(h?"left="+h+",":""))+"fullscreen=no";if(!q||e.substr(0,4)=="http"){q=""}t=removeSpecialChar(t,"*");t=removeSpecialChar(t," ");var c=/etrtpcounter_goto/.test(e),m=e.indexOf("gxml");if(c!=false&&m!=-1){var u=e.substring(0,m),j=e.substring(m);e=u+encode(j)}if(t=="_blank"){f="toolbar=1,menubar=1,location=1,scrollbars=1,resizable=1"}ETpopUp=(f?window.open(q+e,t,f):window.open(q+e,t));if(t=="_blank"){if(window.screen){var k=screen.availWidth,r=screen.availHeight;ETpopUp.moveTo(0,0);ETpopUp.resizeTo(k,r)}}if(window.focus){ETpopUp.focus()}}function etURL(a,b){this.sHref=arguments.callee.parse(a,b);return this.sHref}etURL.parse=function(a,d){var c=checkSpeedBump(a),b="";if(d.length<1){var d=""}if(!a){a=""}if(!d){b=a+c}else{if(a==""||a.length<1){a="/"}b=GoToETURL.thirdParty(d)+a+c}return b};etURL.jump=function(a,b){top.location.href=etURL(a,b)};etURL.open=function(a,b){etWin(etURL(a,b),"_blank",null,null,null,null,null,null,null,null,null,null,0)};function skinIt(urlPath,thirdParty){var fs="",url=document.URL,skinning=url.indexOf("_skinnertab="),urlSkin=urlPath.indexOf("?skinname=none&"),concated="",qContain=urlPath.indexOf("?");if(skinning!=-1){var whichTab=eval(skinning+12);if(url.charAt(whichTab)=="b"){concated="bank"}else{if(url.charAt(whichTab)=="m"){concated="mortgage"}else{concated="invest"}}if((urlSkin!=-1)&&(concated=="bank")){var e=eval(urlSkin+15),urlLength=urlPath.length,front=urlPath.substr(0,urlSkin),back=urlPath.substr(e,urlLength);if(qContain==-1){urlPath=front+"?"+back}else{urlPath=front+"&"+back}}if(qContain==-1){var newURL=urlPath+"?_skinnertab="+concated}else{var newURL=urlPath+"&_skinnertab="+concated}GoToETURL(newURL,thirdParty)}else{GoToETURL(urlPath,thirdParty)}}function makeSpeedBumpUrls(){for(i=3;i<8;i++){var b=tab_titles[i].url.split("/");var a="";if(b.length>4){a="/e/t/user/speedbump?target_app="+b[3]+"&target_page="+b[4]}else{a="/e/t/user/speedbump?target_app="+b[3]+"&target_page=defaultpage"}tab_titles[i].url=a}}function buildSecondLevel(tab_val){var cookieVal=getCookie("ghome="),tab_html="<ul>",current="",stylecurrent="",seperator="",i=0;for(;i<eval(secondnav_titles[tab_val]+"level.length");i++){title=eval(secondnav_titles[tab_val]+"level["+i+"].name");if(i+1<eval(secondnav_titles[tab_val]+"level.length")){next_title=eval(secondnav_titles[tab_val]+"level["+(i+1)+"].name")}else{next_title=""}while(title.match("&nbsp;")||title.match("&amp;")){title=title.replace("&nbsp;"," ");title=title.replace("&amp;","&")}while(next_title.match("&nbsp;")||next_title.match("&amp;")){next_title=next_title.replace("&nbsp;"," ");next_title=next_title.replace("&amp;","&")}if(famSelTab.indexOf("/")!=-1){var title_array=famSelTab.split("/");if(title==title_array[0]||title==title_array[1]){current='id="current_secondary"';seperator=""}else{current="";if((i+1)<eval(secondnav_titles[tab_val]+"level.length")){seperator='<li style="padding-top:5px;color:#FFFFFF;font-size:14px;">|</li>'}else{seperator=""}}if(next_title==title_array[0]||next_title==title_array[1]){seperator=""}}else{if(famSelTab==title){current='id="current_secondary"';seperator=""}else{current="";if((i+1)<eval(secondnav_titles[tab_val]+"level.length")){seperator='<li style="padding-top:5px;color:#FFFFFF;font-size:14px;">|</li>'}else{seperator=""}}if(famSelTab==next_title){seperator=""}}if(current!=""){stylecurrent='style="padding-top:5px;float:left;display:block;"'}else{stylecurrent=""}tab_html+="<li "+current+'><div class="second_nav" onclick=\'javascript:GoToETURL("'+eval(secondnav_titles[tab_val]+"level["+i+"].url")+'","'+eval(secondnav_titles[tab_val]+"level["+i+"].server")+'");\'><div id="urltext" '+stylecurrent+">";if(cookieVal=="visitor:zh_TW:US"){tab_html+=eval(secondnav_titles[tab_val]+"level["+i+"].chinesename")}else{tab_html+=eval(secondnav_titles[tab_val]+"level["+i+"].name")}tab_html+="</div></div></li>"+seperator}tab_html+="</ul>";return tab_html}function makeNav(){var h=getCookie("ghome="),d=userType.toLowerCase(),b;if(d!="visitor"){d="customer";is_customer=true}else{is_customer=false}if(includesptab=="y"&&is_customer){is_esp_customer=true}else{is_esp_customer=false}var g="107px",e="margin-right:1px;",c="",f="",k="",a='style="padding-top:3px;padding-bottom:2px;"',l=tabSelect(famTab);if(l==1&&is_customer){l=2}if(typeof(j)=="undefined"){var j=false}if(j==true){l=10}if(l==8||l==9){makeSpeedBumpUrls();k="_nonbrokerage"}var b='<div id="navigation"><ul>';for(i=1;i<tab_titles.length;i++){if(is_customer&&i==1){i=2}if(is_customer&&i!=2){g="128px;"}if(!is_customer&&i==1){g="111px;"}else{g="127px;"}if(!is_customer&&i==2){i=3}if(is_esp_customer){if(i!=2){g="108px;"}}if(!is_esp_customer&&i==6){i=7}if(i==9){e=""}if(l==i||l==10){f='id="current'+k+'"'}else{f=""}if(i==1||i==2){a='style="padding-top:10px;padding-bottom:9px;"';if(is_esp_customer){g="105px"}else{g="119px;"}}else{if(ccCust&&i==8){a='style="padding-top:3px;padding-bottom:2px;"'}else{a='style="padding-top:3px;padding-bottom:2px;"'}}b+="<li "+f+" style='width:"+g+";"+e+'\'><div class="mainnav" '+c+" onclick=\"GoToETURL('"+tab_titles[i].url+"', '"+tab_titles[i].server+'\');"><div class="tab_titles" '+a+">";if(h=="visitor:zh_TW:US"){b+=tab_titles[i].chinesename}else{b+=tab_titles[i].name}b+="</div></div></li>"}b+='</ul></div><div style="clear:both;">';if(l!=10){b+='<div style="float:left;"><img src="'+AkamaiURL+"/images/left_secondary"+k+'_sliver.gif" alt="" height="27" border="0"/></div><div id="second_navigation'+k+'">'+buildSecondLevel(tabSelect(famTab))+'</div><div style="float:left;"><img src="'+AkamaiURL+"/images/right_secondary"+k+'_sliver.gif" alt="" height="27" border="0"/></div>'}else{b+='<div style="float:left;"><img src="'+AkamaiURL+"/images/left_secondary"+k+'_sliver.gif" alt="" height="27" border="0"/></div><div id="second_navigation_nolink">&nbsp;</div><div style="float:left;"><img src="'+AkamaiURL+"/images/right_secondary"+k+'_sliver.gif" alt="" height="27" border="0"/></div>'}b+='</div><div style="clear:both;line-height:1px;">&nbsp;</div>';document.write(b)}function tabSelect(a){var b=a.toLowerCase();if(b.indexOf("home")>-1&&b.indexOf("equity")<0){return"1"}if(b.indexOf("accounts")>-1){return"2"}if(b.indexOf("invest")>-1||b.indexOf("trading")>-1){return"3"}if(b.indexOf("quotes")>-1){return"4"}if(b.indexOf("mutual")>-1){if(document.cookie.indexOf("xborder")>-1){return"4"}else{return"5"}}if(b.indexOf("employee")>-1){return"6"}if(b.indexOf("retirement")>-1||b.indexOf("plan")>-1){return"7"}if(b.indexOf("bank")>-1){return"8"}if(b.indexOf("mortgages")>-1||b.indexOf("borrow")>-1){return"9"}if(b.indexOf("chinese")>-1){return"chinese"}if(b.indexOf("none")>-1){return"10"}return"1"}function openNewMT(a){window.open(a,"","personalbar=no,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,width=720,height=520")}var fromMTFlag=false;function check_frommarkettrader(){if(fromMTFlag){window.focus()}}var casterFlag=false;function open_marketcaster_window(){newwin=window.open("","MarketCasterWindow","personalbar=no,toolbar=no,status=no,scrollbars=no,resizable=yes,menubar=no,width=860,height=600");if(newwin.opener==null){newwin.opener=window}window.focus();window.location=("/e/t/applogic/MarketCasterInfo1?"+get_reload_val())}function get_reload_val(){return new Date().getTime()+""}function removeSpecialChar(b,a){while(b.indexOf(a)!=-1){b=b.substring(0,b.indexOf(a))+b.substring(b.indexOf(a)+1,b.length)}return b}function openHelp(a){web_Server=INVESTORHOUSE;fresh_url=web_Server+a;leftPos=0;if(screen){leftPos=screen.width-280}SmallWin=window.open(fresh_url,"HelpWindow","scrollbars=yes,resizable=yes,toolbar=no,height=688,width=270,left="+leftPos+",top=0");if(window.focus){SmallWin.focus()}if(SmallWin.opener==null){SmallWin.opener=window;SmallWin.opener.name="newPUMain"}}function symbolSearch(b){var a;if(b!=null&&b.toLowerCase()!="us"){a="/e/t/gmc/gtsymbolsearch?searchtype=2"}else{a="/e/t/applogic/lookup?ntag=Symbol&symPre=&lookup_start_value="}var c=etWin(a,"Lookup","400","340","no","yes","yes","yes","yes",5,5,"")}function FindFlashVers(){var b=false,e=0;if(navigator.plugins!=null&&navigator.plugins.length>0){var a=navigator.plugins["Shockwave Flash"];if(typeof a=="object"){for(var d=0;d<navigator.plugins.length;d++){if(navigator.plugins[d].name.toLowerCase().indexOf("shockwave flash")>=0){var g=navigator.plugins[d].description.substring(navigator.plugins[d].description.toLowerCase().lastIndexOf("flash ")+6,navigator.plugins[d].description.length);var e=g.split(".")[0];if(!isNaN(e)){if(e>FlashVers){FlashVers=e}}}}}}else{if(typeof window.clipboardData!="undefined"){var c,d=5;for(;d<20;d++){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+d);FlashVers=d}catch(f){break}}}}if(isNaN(FlashVers)||FlashVers==0){FlashVers="noFlash"}return FlashVers}function getExp(b){var a;Today=new Date();diff=Date.parse(Today);Today.setTime(diff+b*24*60*60*1000);a=Today.toUTCString();return a}function getCookie(a){var d=""+document.cookie;var c=d.indexOf(a);if(c==-1||a==""){return""}var b=d.indexOf(";",c);if(b==-1){b=d.length}return unescape(d.substring(c+a.length,b))}function setGhomeCookie(a,e,b){var d,c,f;c=b+":"+a+":"+e;f="ghome="+c+";DOMAIN=.investorhouse.com.mx;PATH=/;EXPIRES="+getExp(12000);document.cookie=f;setCountryLocaleCookie(a,e)}function setCountryLocaleCookie(a,b){var c;c=b+"_locale="+a+";DOMAIN=.investorhouse.com.mx;PATH=/;EXPIRES="+getExp(12000);document.cookie=c}function cookieThenRedirect(a){switch(a){case"us_english":setGhomeCookie("en_US","US","visitor");this.location.href=INVESTORHOUSE+"/e/t/home";break;case"xborder":set_site("xborder");setGhomeCookie("in_US","US","visitor");this.location.href=INVESTORHOUSE+"/e/t/home";break;case"us_chinese":setGhomeCookie("zh_TW","US","visitor");this.location.href=INVESTORHOUSE+"/e/t/home";break}}function set_site(a){var c,b="";switch(a){case"site04":b="site04:serena2";break;case"serena":b="site04:serena2";break;case"xborder":b="xborder:serena2";break;default:b="site04:serena2"}c="et_site="+b+";DOMAIN=.investorhouse.com.mx;PATH=/;EXPIRES="+getExp(12000);document.cookie=c;document.location.href=document.location.href}function setRC(){var d=(new Date().getTimezoneOffset()/60)*(-1);var b=(typeof(navigator.userLanguage)!="undefined")?navigator.userLanguage:((typeof(navigator.language)!="undefined")?navigator.language:"");var a="UserLanguage="+b+";DOMAIN=.investorhouse.com.mx;PATH=/;EXPIRES="+getExp(12000);var c="TimeZone="+d+";DOMAIN=.investorhouse.com.mx;PATH=/;EXPIRES="+getExp(12000);document.cookie=a;document.cookie=c}function postIntoITW(a){tWin=window.open("/e/t/pfm/pfmwledit?addinvto.x=x&symbollist="+a,"","innerWidth=1, innerHeight=1,width=1,height=1,titlebar=0,personalbar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");alert(""+a+" has been added into your investments to watch");tWin.close()}function brkFrm(){var a=self.location.href;if(window.top!=window.self){window.top.location.href=a}}function safeOnload(){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",safeOnloadFunc,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",safeOnloadFunc,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",safeOnloadFunc)}else{if(typeof window.onload=="function"){var a=onload;window.onload=function(){a();safeOnloadFunc()}}else{window.onload=safeOnloadFunc}}}}}function checkboxValue(a){return !(a==""||a=="Quotes"||a=="Search")}function setServer(form,site,txtfld){var oForm=eval(form),fval=oForm[txtfld].value;if(checkboxValue(fval)){var st=oForm.action;oForm.action=site+st.substring(st.indexOf("/e/t/"),st.length);return true}return false}function setSearchServer(form,site,txtfld,skinnertab,skinnerfamily){var oForm=eval(form),fval=oForm[txtfld].value;if(checkboxValue(fval)){var st=oForm.action,e=site+st.substring(st.indexOf("/e/t/"),st.length);e+="?_skinnertab="+skinnertab+"&_skinnerfamily="+skinnerfamily;oForm.action=e;return true}return false}function writeAlert(c,b,g,f){var a="sym="+b+"&alt_prod="+g+"&alt_quote="+f+"&skinname=none",h="545";if(FindFlashVers()>=6){var d="/e/t/invest/flash_oneclickalert?"+a,e="43";document.write("<br>")}else{var d="/e/t/invest/oneclickalert?"+a,e="60";if(c==true){h="585"}}document.write("<iframe align='center' width='"+h+"' height='"+e+"' frameborder='0' marginheight='0' marginwidth='0' scrolling='no' src='"+d+"'></iframe>")}function bd(c){var b=document.URL,d=b.toUpperCase(),a;if(d.search("BONDDESK.C")!=-1){a="/investorhouse/owa/pkg_static.home?p_custom=BASE,";if(c==1){GoToETURL(a+"GOTOURL_EQ_pkg_order_bond.output%3Fp_action_subset%3DBS","bond")}if(c==2){GoToETURL(a+"GOTOURL_EQ_pkg_quickpick.output","bond")}if(c==3){GoToETURL(a+"GOTOURL_EQ_pkg_static.resultSet%3Fp_src1%3Dpkg_query_bond.output","bond")}}else{a="/e/t/applogic/bondbridge?bdest=";if(c==1){GoToETURL(a+"TICKET&traxui=F_FN","")}if(c==2){GoToETURL(a+"QUICKPICK&traxui=F_FN","")}if(c==3){GoToETURL(a+"QUERY&traxui=F_FN","")}}}var isMac=navigator.userAgent.indexOf("Mac")!=-1;if(isMac){var style_node=document.createElement("link");style_node.setAttribute("rel","stylesheet");style_node.setAttribute("type","text/css");style_node.setAttribute("href",AkamaiURL+"/stylesheet/mac.css");document.getElementsByTagName("head")[0].appendChild(style_node)}function updDisclosures(){var a=document.getElementById("etDisclosures");if(!a){return}if(document.getElementById("dynamic_disclosure")||document.getElementById("disclosures")){a.style.marginBottom="1em";if(document.getElementById("dynamic_disclosure")){a.innerHTML=document.getElementById("dynamic_disclosure").innerHTML}if(document.getElementById("disclosures")){a.innerHTML=document.getElementById("disclosures").innerHTML}}else{a.style.marginBottom="0em"}}function check_index(){var c=document.quote.header_search_country_dd;var d=document.quote.sym.value;var a=c.options[c.selectedIndex].value;if(a=="US"){var b=INVESTORHOUSE+"/e/t/invest/quotesandresearch"}else{var b=INVESTORHOUSE+"/e/t/gmc/globalsnapshot?sym="+d+"&country="+a}document.quote.action=b}function checkCookie(){var a=getCookie("ghome").split(":");if(a!=null||a!=""){if(a[1]=="in_US"){}}}function getRefURL(f,g){var d="";var c;(f=="BANKING")?c=mainNav[6].subNav:c=mainNav[7].subNav;var b=c.length-1;if(g==null||g==""||g=="MORTGAGES & HOME EQUITY"){(f=="BANKING")?d="/e/t/banking/banking":d="/e/t/mortgageshomeequity/mortgageshomeequity"}else{for(var e=0;e<b;e++){if(c[e].tabName==g){d=c[e].url;return d}}}return d}function getExpire(b){var a;Today=new Date();diff=Date.parse(Today);Today.setTime(diff+b*24*60*60*1000);a=Today.toUTCString();return a}function checkForSurveyCookie(){var a=getCookie("survey_status");return a}function setSurveyCookie(a){var b;b="survey_status="+a+";DOMAIN=.investorhouse.com.mx;PATH=/;EXPIRES="+getExpire(12000);document.cookie=b}function mktSurvey(){var b=Math.floor(Math.random()*1001);var a=window.location.search.substring(1);var c=a.match(/s=y/g);if((b>500&&b<511)||(c!=null)){if(checkForSurveyCookie()=="=done"||checkForSurveyCookie()=="done"){}else{if(checkForSurveyCookie()=="=one"||checkForSurveyCookie()=="one"){etWin("https://www.surveymk.com//s.aspx?sm=YtW9Pfhr0ZqGTL8YC5CMug_3d_3d","surveypop",500,520,"no","no","yes","no","no",5,5,"");setSurveyCookie("done")}else{etWin("https://www.surveymk.com//s.aspx?sm=YtW9Pfhr0ZqGTL8YC5CMug_3d_3d","surveypop",500,520,"no","no","yes","no","no",5,5,"");setSurveyCookie("one")}}}}function addLoadEvt(b){var a=window.onload;if(typeof window.onload!="function"){window.onload=b}else{window.onload=function(){a();b()}}}function addUnLoadEvt(b){var a=window.onunload;if(typeof window.onunload!="function"){window.onunload=b}else{window.onunload=function(){a();b()}}}function strBuffer(){this.buffer=[]}strBuffer.prototype.append=function append(a){this.buffer.push(a);return this};strBuffer.prototype.getBuffer=function getBufText(){return this.buffer.join("")};function doQS(frm,act,el){with(frm){if(frm.elements[el].value!=""&&frm.elements[el].value!=null){if(act.indexOf("/search/prospect")>=0){action=SEARCH+act}else{action=INVESTORHOUSE+act;method="post";submit()}}}}function Visit_State(a){if(a!=""&&a!=null){document.location.href="javascript:GoToETURL('/e/t/welcome/accessus?gxml=hm_acu_findcenter.html&state="+a+"','investorhouse');"}}function p_ghostText(){var a=document.mainsrch.searchtext;if(a.value=="Search"){a.value=""}else{if(a.value==""){a.value="Search"}}}function p_ghostQuoteText(){var a=document.quote.sym;if(a.value=="Enter Symbol or Name"){a.value="";a.style.fontSize="13px";a.style.fontweight="normal";a.style.color="#000000";a.style.paddingLeft="1px";a.style.paddingRight="2px";a.style.width="109px";a.style.height="15px"}else{if(a.value==""){a.value="Enter Symbol or Name";a.style.fontSize="10px";a.style.color="#7f7f7f";a.style.padding="3px 1px 0 2px";a.style.width="109px";a.style.height="15px"}}}function p_ghostQuoteMarket(){var a=document.get_Quote.sym;if(a.value=="Enter Symbol(s) or Name"){a.value=""}else{if(a.value==""){a.value="Enter Symbol(s) or Name"}}}function ghostText(){var a=document.mainsrch.searchtext;if(a.value=="Enter Question or Keywords"){a.value="";a.style.fontSize="11px";a.style.fontweight="normal";a.style.color="#000000";a.style.padding="1px";a.style.width="137px";a.style.height="13px"}else{if(a.value==""){a.value="Enter Question or Keywords";a.style.fontSize="11px";a.style.color="#7f7f7f";a.style.padding="1px";a.style.width="137px";a.style.height="13px"}}}function ghostQuoteText(){var a=document.quote.sym;if(a.value=="Enter Symbol or Name"){a.value="";a.style.fontSize="11px";a.style.fontweight="normal";a.style.color="#000000";a.style.padding="1px";a.style.width="109px";a.style.height="13px"}else{if(a.value==""){a.value="Enter Symbol or Name";a.style.fontSize="11px";a.style.color="#7f7f7f";a.style.padding="1px";a.style.width="109px";a.style.height="13px"}}}function ghostQuoteMarket(){var a=document.get_Quote.sym;if(a.value=="Enter Symbol(s) or Name"){a.value="";a.style.fontSize="11px";a.style.fontweight="normal";a.style.color="#000000";a.style.paddingLeft="1px";a.style.paddingRight="2px";a.style.width="160px";a.style.height="15px"}else{if(a.value==""){a.value="Enter Symbol(s) or Name";a.style.fontSize="11px";a.style.color="#7f7f7f";a.style.padding="3px 1px 0 2px";a.style.width="160px";a.style.height="15px"}}}function formatTimeStamp(j,c){if(j.length>0){function g(o){if(b[o]){return b[o]}else{return o}}function h(){for(var o=0;o<12;o++){if(n[o]==e[0]){return ++o}}}function l(){var q=e[1],p=parseInt(q),o=q.substr(-1,1);if(o>3||(parseInt(q)%10)==0||(p>10&&p<14)){return q+"th"}if(o=="1"){return q+"st"}if(o=="2"){return q+"nd"}if(o=="3"){return q+"rd"}}function k(){var o=parseInt(a[0]);if(e[4]=="PM"){if(o<12){o+=12}}else{if(o==12){o=0}}return o.toString()}if(!c){c=""}var n=["January","February","March","April","May","June","July","August","September","October","November","December"],e=j.replace(",","").split(" "),a=e[3].split(":"),b=[],m=c.split(""),d=m.length;if(d>0){b.m=h();b.M=e[0];b.n=e[0].substr(0,3);b.d=e[1];b.D=l();b.y=e[2].substr(2,2);b.Y=e[2];b.h=a[0];b.H=k();b.i=a[1];b.s=(a[2])?a[2]:"00";b.r=e[4];b.t=(e[5]=="EDT")?"ET":e[5];for(var f=0;f<d;f++){m[f]=g(m[f])}return m.join("")}else{return j}}}function formatFlashTimeString(m,d){if(m.length>0){function k(s){if(c[s]){return c[s]}else{return s}}function l(){for(var s=0;s<12;s++){if(r[s]==h[0]){return ++s}}}function p(){var u=a[1],t=parseInt(u),s=u.substr(-1,1);if(s>3||(parseInt(u)%10)==0||(t>10&&t<14)){return u+"th"}if(s=="1"){return u+"st"}if(s=="2"){return u+"nd"}if(s=="3"){return u+"rd"}}function o(){var s=parseInt(b[0]);if(h[4]=="PM"){if(s<12){s+=12}}else{if(s==12){s=0}}return s.toString()}if(!d){d=""}var r=["January","February","March","April","May","June","July","August","September","October","November","December"],h=m.replace(",","").split("-"),f=h[1].split(" "),g=f[1],n=f[0].substr((f[0].length-2),2),b=f[0].split(":"),a=h[0].split("/"),c=[],q=d.split(""),e=q.length;if(a[0][0]==0){a[0]=a[0].substr(1,1)}if(a[1][0]==0){a[1]=a[1].substr(1,1)}if(e>0){c.m=a[0];c.M=r[a[0]-1];c.n=r[a[0]-1].substr(0,3);c.d=a[1];c.D=p();c.y=a[2];c.Y=a[2];c.h=b[0];c.H=o();c.i=b[1];c.s=(b[2])?b[2].substr(0,2):"00";c.r=n;c.t=g;for(var j=0;j<e;j++){q[j]=k(q[j])}return q.join("")}else{return m}}}function formatDelayedMarketTimeStamp(d){if(d.length>0){var c=formatTimeStamp(d,"h i").split(" "),a=parseInt(c[0]),b=parseInt(c[1])-15;if(b<0){b+=60;if(a==1){a=12}else{a--}}if(b<10){b="0"+b}return a+":"+b+" "+formatTimeStamp(d,"r t m/d/y")+" 15 min delay"}}function formatClosedMarketTimeStamp(f){if(f.length>0){console.log(formatFlashTimeString(f,"Y m d h i r"));var j=new Date(),g=formatFlashTimeString(f,"Y m d h i r").split(" "),h=g[0],e=g[1],b=g[2],d,l=["11","119","216","410","625","73","907","1126","1225"],k=false,a=false;if(g[5]=="AM"){if(g[3]==9){if(g[4]<45){a=true}}else{if(g[3]<9){a=true}}}else{if(g[5]=="PM"){if(g[3]>=4){k=true}}}j.setFullYear(h,e-1,b);d=j.getDay();switch(d){case 0:j.setDate(j.getDate()-2);b-=2;break;case 1:if(a){j.setDate(j.getDate()-3)}b-=3;break;case 6:j.setDate(j.getDate()-1);b-=1;break}d=j.getDay();sShortHandDate=(j.getMonth()+1)+""+j.getDate();if(d!=0&&d!=1&&d!=6){for(var c=0;c<l.length;c++){if(sShortHandDate==l[c]){j.setDate(j.getDate()-1)}}}return(j.getMonth()+1)+"/"+j.getDate()+"/"+j.getFullYear().toString().substr(2,2)}};

