document.domain="firstrade.com";

var menu1=new Array();
menu1[0]='<a href="/public/zh_cn/welcome/">首页</a>';
menu1[1]='<a href="/public/zh_cn/welcome/whyfirstrade/">第一优势</a>';
menu1[2]='<a href="/public/zh_cn/welcome/interactivedemo/">互动式预览</a>';
menu1[3]='<a href="/public/zh_cn/welcome/aboutfirstrade/">关於第一理财</a>';
menu1[4]='<a href="/public/zh_cn/welcome/promotions/">特惠活动</a>';
menu1[5]='<a href="/public/zh_cn/welcome/newsletter/">第一理财快报</a>';
menu1[6]='<a href="http://freetime.firstrade.com/blog/" target="_blank">第一理财Blog</a>';

var menu2=new Array();
menu2[0]='<a href="/public/zh_cn/productsservices/investmentchoices/">投资产品一览</a>';
menu2[1]='<a href="/public/zh_cn/productsservices/accounttypes/">帐户类型一览</a>';
menu2[2]='<a href="/public/zh_cn/productsservices/toolsresearch/">工具与研究</a>';
menu2[3]='<a href="/public/zh_cn/productsservices/waystotrade/">多种交易方式</a>';
menu2[4]='<a href="/public/zh_cn/productsservices/options/">期权交易</a>';
menu2[5]='<a href="/public/zh_cn/productsservices/complexoptions/">复式期权</a>';
menu2[6]='<a href="/public/zh_cn/productsservices/internationalinvestors/">国际帐户</a>';

var menu3=new Array();
menu3[0]='<a href="/public/zh_cn/pricing/commissions/">佣金</a>';
menu3[1]='<a href="/public/zh_cn/pricing/marginrates/">融资利率</a>';
menu3[2]='<a href="/public/zh_cn/pricing/specialservices/">特殊服务</a>';
menu3[3]='<a href="/public/zh_cn/pricing/brokercomparison/">证券公司比较</a>';

var menu4=new Array();
//menu4[0]='<a href="/public/zh_cn/marketsnews/chinesenews/">中文财经新闻</a>';
//menu4[1]='<a href="/public/zh_cn/marketsnews/wsmvideos/">美国股市音像报导</a>';

var menu5=new Array();
menu5[0]='<a href="/public/zh_cn/retirement/traditionalira/">传统IRA</a>';
menu5[1]='<a href="/public/zh_cn/retirement/rothira/">罗斯IRA</a>';
menu5[2]='<a href="/public/zh_cn/retirement/rolloverira/">滚存IRA</a>';
menu5[3]='<a href="/public/zh_cn/retirement/sepira/">简易雇员退休金IRA</a>';
menu5[4]='<a href="/public/zh_cn/retirement/simpleira/">小型企业雇员配款IRA</a>';
menu5[5]='<a href="/public/zh_cn/retirement/coverdellesa/">Coverdell教育储蓄ESA</a>';
menu5[6]='<a href="/public/zh_cn/knowledgecenter/taxcenter/taxretirement/">税务中心</a>';

var menu6=new Array();
menu6[0]='<a href="/public/zh_cn/knowledgecenter/investmentguides/">投资手册</a>';
menu6[1]='<a href="/public/zh_cn/knowledgecenter/securitycenter/">网路保全中心</a>';
menu6[2]='<a href="/public/zh_cn/knowledgecenter/taxcenter/">税务中心</a>';
/*menu6[2]='<a href="/public/zh_cn/knowledgecenter/usingfirstrade/">Using Firstrade</a>';*/
menu6[3]='<a href="/public/zh_cn/support/faqs/">常见疑问解答FAQ</a>';
menu6[4]='<a href="/public/zh_cn/knowledgecenter/glossary/">投资辞典</a>';
menu6[5]='<a href="http://www.invest-store.com/firstrade" target="_blank">投资理财书店</a>';
/*menu6[6]='<a href="/public/zh_cn/knowledgecenter/podcasts/">Podcasts</a>';*/
/*menu6[7]='<a href="/public/zh_cn/knowledgecenter/firstradewiki/">Firstrade Wiki</a>';*/

var menu7=new Array();
menu7[0]='<a href="/public/zh_cn/support/">联络我们</a>';
menu7[1]='<a href="/public/zh_cn/support/livechat/">线上即时服务</a>';
menu7[2]='<a href="/public/zh_cn/support/fundyouraccount/">存入资金须知</a>';
menu7[3]='<a href="/public/zh_cn/support/transfertofirstrade/">帐户转到第一理财</a>';
menu7[4]='<a href="/public/zh_cn/support/faqs/">常见疑问解答FAQ</a>';
menu7[5]='<a href="/public/zh_cn/support/glossary/">投资辞典</a>';
menu7[6]='<a href="/public/zh_cn/support/formscenter/">表格中心</a>';

var menuwidth='165px';
var menubgcolor='#FFFFCC';
var disappeardelay=250;
var hidemenu_onclick="yes";

var ie4=document.all;
var ns6=document.getElementById&&!document.all;

if (ie4||ns6)
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 (ie4||ns6)
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=ie4 && !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=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
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 (ie4||ns6){
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 (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


<!--
// Copyright 1999 - 2002 by Ray Stott, Pop-up Windows Script ver 2.0
// OK to use if this copyright is included
// Script is available at http://www.crays.com/jsc   
var popWin = null    // use this when referring to pop-up window
var winCount = 0
var winName = "popWin"
function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
  var d_winLeft = 20  // default, pixels from screen left to window left
  var d_winTop = 20   // default, pixels from screen top to window top
  winName = "popWin" + winCount++ //unique name for each pop-up window
  closePopWin()           // close any previously opened pop-up window
  if (openPopWin.arguments.length >= 4)  // any additional features? 
    winFeatures = "," + winFeatures
  else 
    winFeatures = "" 
  if (openPopWin.arguments.length == 6)  // location specified
    winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)
  else
    winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop)
  popWin = window.open(winURL, winName, "width=" + winWidth 
           + ",height=" + winHeight + winFeatures)
  }
function closePopWin(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(popWin != null) if(!popWin.closed) popWin.close() 
  }
function getLocation(winWidth, winHeight, winLeft, winTop){
  return ""
  }
//-->
<!--
function swapImgRestore() {
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function 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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() {
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->