//ST MM.js (from old js file)
function MM_reloadPage(init) { if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage;}}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}
MM_reloadPage(true); function MM_preloadImages() { var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}
function MM_findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x;}
function MM_swapImage() { var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function set_active_tab (page_section) { var imagesDir = "https://www.scottrade.com/library/images/"; switch (page_section) { case "market":
MM_findObj('market1').src = imagesDir + "market02.gif"; break; case "commissions":
MM_findObj('commissions1').src = imagesDir + "commissions02.gif"; break; case "broker":
MM_findObj('broker1').src = imagesDir + "broker02.gif"; break; case "products":
MM_findObj('products1').src = imagesDir + "products02.gif"; break; case "active_trader":
MM_findObj('active_trader1').src = imagesDir + "active_trader02.gif"; break; case "chinese":
MM_findObj('active_trader1').src = imagesDir + "active_trader02.gif"; break; case "mutual":
MM_findObj('mutual1').src = imagesDir + "mutual02.gif"; break; case "retirement":
MM_findObj('retirement1').src = imagesDir + "retirement02.gif"; break;}
}

//new
var exclude=1; var agt=navigator.userAgent.toLowerCase(); var win=0;var mac=0;var lin=1; if(agt.indexOf('win')!=-1){win=1;lin=0;}
if(agt.indexOf('mac')!=-1){mac=1;lin=0;}
var lnx=0;if(lin){lnx=1;}
var ice=0; var ie=0;var ie4=0;var ie5=0;var ie6=0;var com=0;var dcm; var op5=0;var op6=0;var op7=0; var ns4=0;var ns6=0;var ns7=0;var mz7=0;var kde=0;var saf=0; if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE"){ var thisKDE=agt; var splitKDE=thisKDE.split("konqueror/"); var aKDE=splitKDE[1].split("; "); var KDEn=parseFloat(aKDE[0]); if(KDEn>=2.2){ kde=1; ns6=1; exclude=0;}
}
else if(agt.indexOf('webtv')!=-1){exclude=1;}
else if(typeof window.opera!="undefined"){ exclude=0; if(/opera[\/ ][5]/.test(agt)){op5=1;}
if(/opera[\/ ][6]/.test(agt)){op6=1;}
if(/opera[\/ ][7-9]/.test(agt)){op7=1;}
}
else if(typeof document.all!="undefined"&&!kde){ exclude=0; ie=1; if(typeof document.getElementById!="undefined"){ ie5=1; if(agt.indexOf("msie 6")!=-1){ ie6=1; dcm=document.compatMode; if(dcm!="BackCompat"){com=1;}
}
}
else{ie4=1;}
}
else if(typeof document.getElementById!="undefined"){ exclude=0; if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}
else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}
else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}
if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){mz7=0;ns6=1;saf=1;}
}
else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){ exclude=0; ns4=1; if(typeof navigator.mimeTypes['*']=="undefined"){ exclude=1; ns4=0;}
}
if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}
if(typeof navigator.__ice_version!="undefined"){exclude=1;ie4=0;}
var menu2=new Array()
menu2[0]='<a href="https://www.scottrade.com/online_trading_commissions/index.asp">Commissions Schedule</a>'
menu2[1]='<a href="https://www.scottrade.com/online_trading_commissions/investment_interest_rates.asp">Interest Rates</a>'
menu2[2]='<a href="https://www.scottrade.com/online_trading_commissions/investment_fees.asp">Fees</a>'
menu2[3]='<a href="https://www.scottrade.com/online_trading_commissions/investment_free_services.asp">Free Services</a>'
var menu4=new Array()
menu4[0]='<a href="https://www.scottrade.com/online_trading_reasons/">Reasons to Choose</a>'; menu4[1]='<a href="https://www.scottrade.com/online_broker_comparison/discount_brokerage_comparison.asp">Broker Comparison Chart</a>'; menu4[2]='<a href="https://www.scottrade.com/online_trading_documents/trading_execution/index.asp">Trade Quality & Execution</a>'; var menu5=new Array()
menu5[0]='<a href="https://www.scottrade.com/investment_services/index.asp">Main</a>'
menu5[1]='<a href="https://www.scottrade.com/investment_services/investing_in_stocks.asp">Stocks</a>'
menu5[2]='<a href="https://www.scottrade.com/investment_services/options_trading.asp">Options</a>'
menu5[3]='<a href="https://www.scottrade.com/investment_services/mutual_funds_performance.asp">Mutual Funds</a>'
menu5[4]='<a href="https://www.scottrade.com/investment_services/IRA_investing.asp">IRAs</a>'
menu5[5]='<a href="https://www.scottrade.com/investment_services/etf.asp">ETFs</a>'
menu5[6]='<a href="https://www.scottrade.com/investment_services/coverdell_esa.asp">ESAs</a>'
menu5[7]='<a href="https://www.scottrade.com/investment_services/bond_investing.asp">Bonds</a>'
menu5[8]='<a href="https://www.scottrade.com/investment_services/IRA_CD.asp">CDs</a>'
menu5[9]='<a href="https://www.scottrade.com/investment_services/fixed_income_investments.asp">Fixed Income</a>'
var menu6=new Array()
menu6[0]='<a href="https://www.scottrade.com/web_trading_platform">Scottrade.com</a>'
menu6[1]='<a href="https://www.scottrade.com/scottradeelite_online_trading_platform">ScottradeELITE</a>'
menu6[2]='<a href="https://www.scottrade.com/scottrader_stock_market_quote">Scottrader</a>'
var menuwidth='107px'
var menubgcolor='gray'
var disappeardelay=250
var hidemenu_onclick="yes"
var ie4doc=document.all
var ns6doc=document.getElementById&&!document.all
if ((ie4doc||ns6doc) && !(mac && ie5))
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent;}
return totaloffset;}
function showhide(obj, e, visible, hidden, menuwidth){ if ((ie4doc||ns6doc) && !(mac && ie5))
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){ dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}
function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){ var edgeoffset=0
if (whichedge=="rightedge"){ var windowedge=ie4doc && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{ var topedge=ie4doc && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4doc && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}
function populatemenu(what){ if ((ie4doc||ns6doc) && !(mac && ie5))
dropmenuobj.innerHTML=what.join("")
}
function dropdownmenu(obj, e, menucontents, menuwidth){ if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)
if ((ie4doc||ns6doc) && !(mac && ie5)){ showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}
function clickreturnvalue(){ if ((ie4doc||ns6doc) && !(mac && ie5)) return false
else return true
}
function contains_ns6doc(a, b) { while (b.parentNode)
if ((b = b.parentNode) == a)
return true; return false;}
function dynamichide(e){ if (ie4doc&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6doc&&e.currentTarget!= e.relatedTarget&& !contains_ns6doc(e.currentTarget, e.relatedTarget))
delayhidemenu()
}
function hidemenu(e){ if (typeof dropmenuobj!="undefined"){ if ((ie4doc||ns6doc) && !(mac && ie5))
dropmenuobj.style.visibility="hidden"
}
}
function delayhidemenu(){ if ((ie4doc||ns6doc) && !(mac && ie5))
delayhide=setTimeout("hidemenu()",disappeardelay)
}
function clearhidemenu(){ if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
if (hidemenu_onclick=="yes")
document.onclick=hidemenu