/*****************************************************************************

  website.js
  
  Supporting JavaScript for Hansard Financial Trust group of websites.
  
  Mark Pratt
  September 2000

*****************************************************************************/

var bodyLoaded = false ;
var isScreenShot = false ;
var oPopupWin ;

//*****************************************************************************

  function bodyLoad ( )

//*****************************************************************************
{
  bodyLoaded = true ;
  
  if ( isScreenShot ) upDate ( ) ;
}

//*****************************************************************************

  function swapImg ( imgName , state )

//*****************************************************************************
{  
  if ( bodyLoaded ) if ( document.images ) document.images[ imgName ].src = eval ( imgName + state + ".src" ) ; ;
}

//*****************************************************************************

  function setupImages ( )

//*****************************************************************************
{
  hansardlogoNorm      = new Image ( 120 , 120 ) ;
  hansardlogoNorm.src  = "images/logo_black.gif" ;
  
  hansardlogoHIL       = new Image ( 120 , 120 ) ;
  hansardlogoHIL.src   = "images/logo_blue.gif" ;
  
  hansardlogoHEL       = new Image ( 120 , 120 ) ;
  hansardlogoHEL.src   = "images/logo_green.gif" ;
  
  hansardlogoHITCO     = new Image ( 120 , 120 ) ;
  hansardlogoHITCO.src = "images/logo_red.gif" ;
}

//*****************************************************************************

   function setupSlideShow ( )
  
// Set the descriptions for all the screens for the online demo here.
// The images are called scrnshot1.gif, scrnshot2.gif, scrnshotX.gif
// Set the number of images in online_slideshow.html
// You can put any HTML in the descriptions below.

//*****************************************************************************
{
    textDescriptions = new Array ( ) ;
    
    textDescriptions [ 1 ]  = "<b>Hansard OnLine</b> offers 4 levels of security:<ul><li>An encrypted Internet connection <li>A unique, Hansard-supplied username <li>A user-generated password <li>A unique passcode, which changes every minute, generated by a keyfob held by the user</ul>" ;

    textDescriptions [ 2 ]  = "The personalised <b>Hansard OnLine</b> <i>Front Page</i> offers summaries and detailed reports on Overdue Premiums, Policy Status Changes and Pending Business and gives access to the various applications available. There is also a Messaging System allowing individuals or groups to be notified of Product, Fund or General News via the <i>Front Page</i>." ;

    textDescriptions [ 3 ]  = "This is one of the <i>Front Page</i> reports, showing all overdue premiums. This information is updated regularly throughout the day." ;

    textDescriptions [ 4 ]  = "<b>Hansard OnLine</b> offers a powerful <i>Fund Reporting System</i>.<br> This is a <i>Relative Fund Performance Graph</i>, one of a range of fund performance reports available to brokers at all times. <br>Fund choice can be honed according to a variety of criteria and then performance can be compared graphically or in tabular format. Performance of major indices is also available for comparison. <br><i>Fund Market Exposure</i> charts can also be selected to enable the user to visualise the asset sector and geographical split of a potential portfolio. " ;

    textDescriptions [ 5 ]  = "The <b>Hansard OnLine</b> <i>Commission Reporting System</i>, allows brokers to run detailed reports or summaries on their commission on Hansard products." ;

    textDescriptions [ 6 ]  = "The most popular <b>Hansard OnLine</b> application is the <i>Policy Detail System</i>. This allows brokers to interrogate their client bank according to a large range of criteria." ;

    textDescriptions [ 7 ]  = "Once a policy, or set of policies has been selected, a range of reports can be run, either singly or as a batch, in HTML format or PDF format (allowing policy reports to be sent to clients by e-mail).<br>The reports available are: <ul><li>Unit Allocation Statements (Current/Backdated/Detailed)<li>Fund Performance Graph/Table<li>Fund Market Exposure Chart<li>Fund Switch History Table<li>Premium History Report<li>Policy Information Report<li>Policy Graph (against Premiums)<li>Policy Funds Graph</ul>" ;

    textDescriptions [ 8 ]  = "This <i>Policy Fund Graph</i> shows the evolution of policy value over time, together with a breakdown of how each fund has contributed to the policy value." ;

    textDescriptions [ 9 ]  = "This <i>Policy Graph</i> plots policy value against Premiums paid, allowing an instant appraisal of how a client's investment has fared." ;

    textDescriptions [ 10 ] = "This is an example of a <i>Premium History</i> report, detailing all payments made to a policy." ;

    textDescriptions [ 11 ] = "Any or all of the Policy Reports can be combined in a <i>Policy Booklet</i>, tailored according to what information the broker wishes to present to the client." ;

    textDescriptions [ 12 ] = "Detailed reports are also available for Hansard Universal Personal Portfolio contracts" ;

    textDescriptions [ 13 ] = "Brokers can set <i>Alerts</i>, personal to them, so that they are notified via the <i>Front Page</i>, should certain events occur or become imminent, for example if policy values move outside certain parameters, or if any policies are due to lapse." ;

    textDescriptions [ 14 ] = "This is an example of a <i>Unit Price Alert</i>, where a broker has asked to be notified in the event of a change in value of at least 5% in any funds in which his clients have invested."
    
    isScreenShot = true ;
    
    fullSizeImages = new Array ( ) ;
    
    // Add "full size" image sizes here ...
    // fullSizeImages [ x ] = new Array ( width , height ) ;
    
    fullSizeImages [ 1 ]  = new Array ( 720 , 384 ) ;
    fullSizeImages [ 2 ]  = new Array ( 878 , 602 ) ;
    fullSizeImages [ 3 ]  = new Array ( 760 , 456 ) ;
    fullSizeImages [ 4 ]  = new Array ( 658 , 738 ) ;
    fullSizeImages [ 5 ]  = new Array ( 768 , 362 ) ;
    fullSizeImages [ 6 ]  = new Array ( 782 , 466 ) ;
    fullSizeImages [ 7 ]  = new Array ( 784 , 348 ) ;
    fullSizeImages [ 8 ]  = new Array ( 790 , 850 ) ;
    fullSizeImages [ 9 ]  = new Array ( 784 , 800 ) ;
    fullSizeImages [ 10 ] = new Array ( 774 , 584 ) ;
    fullSizeImages [ 11 ] = new Array ( 674 , 273 ) ;
    fullSizeImages [ 12 ] = new Array ( 776 , 850 ) ;
    fullSizeImages [ 13 ] = new Array ( 710 , 360 ) ;
    fullSizeImages [ 14 ] = new Array ( 770 , 220 ) ;

}

//*****************************************************************************

// DONT CHANGE THIS STUFF YET

//*****************************************************************************

setupImages ( ) ;

NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);
isMac = (navigator.appVersion.indexOf("Mac") != -1);
isMenu = (NS4 || (IE4 && !isMac));
function popUp(){return};
function popDown(){return};
function startIt(){return};
if (!ver4) event = null;

if (isMenu) {
        menuVersion = 0;
        menuWidth = 260;
        borWid = 0;
        borSty = "solid";
        borCol = "#FF0000";
        separator = 6;
        separatorCol = "#CC0000";
        fntFam = "Tahoma,Verdana,Arial";
        fntBold = false;
        fntItal = false;
        fntSiz = 9;
        if (NS4) fntSiz ++ ;
        fntCol = "#FFFFFF";
        overFnt = "#FFFFFF";
        itemPad = 2;
        backCol = "#CC0000";
        overCol = "#FF0000";
        imgSrc = "../images/menu_arrow.gif";
        imgSiz = 10;

        childOffset = 0;
        childOverlap = 0;
        perCentOver = null;

        clickStart = false;
        clickKill = false;
        secondsVisible = 0.5;

        keepHilite = false;
        NSfontOver = true;
        showVisited = null;

        isFrames = false;
        navFrLoc = "left";
        mainFrName = "main";
}


lastcolor = null;

if (isMenu) {

var menu_y_pos  =  71 ;

  /* - HFTRUST ------------------------------------------------------------------------------- */
 

  arMenu1 = new Array ( "" , 1 ,menu_y_pos , "" , "" , "" , "" , "" , "" ,
                        "﹝首　頁﹞","index.html" , 0 ,
                        "... USP公司介紹","home_coa.html" , 0 ,
                        "... 馬恩島","_home_man.html" , 0 ,
                        "... IFA專區","home_ifa.html" , 0 );

  // About Us
  
  arMenu2 = new Array ( "" , 80 , menu_y_pos , "" , "" , "" , "" , "" , "" ,
                        "﹝新　訊﹞","index.html#news" , 0 ,
                        "... 訊息公告" , "2news.html" , 0 ) ;  

  arMenu3 = new Array ( "" , 160 ,menu_y_pos , "" , "" , "" , "" , "" , "" ,
                        "﹝產　品﹞","3product.html" , 0 ,
                        "... 退休計劃","3pro_01.html" , 0 ,
                        "... 子女教育計劃" , "3pro_02.html" , 0 ,
                        "... 定時定額投資計畫" , "3pro_03.html" , 0 ) ;  

  arMenu4 = new Array ( "" , 240 ,menu_y_pos , "" , "" , "" , "" , "" , "" ,
                        "﹝服　務﹞","4service.html" , 0 ,
                        "... Hansard 對市場的看法","4se_h.html" , 0 ,
                        "... 專題報導","4se.html" , 0 ,
                        "... 季刊簡介","4se_season.html" , 0 ) ;  

  arMenu5 = new Array ( "" , 320 , menu_y_pos , "" , "" , "" , "" , "" , "" ,
                        "﹝基　金﹞","5funds.html" , 0 ,
                        "... 基金觀測站","5fund_info.html" , 0 ,
                        "... Hansard 精選基金 報告" , "5fund_hansard.html" , 0 ,
                        "... Hansard 基金每週淨值績效表 (Bulletin)","5fund_bulletin.html" , 0 ,  
                        "... Vision 精選基金報告","Vision fund.html" , 0 ,
                        "... Vision 基金淨值績效","Vision price.html" , 0 ,
                        "... Quantum & Oracle 精選基金報告","Quantum fund.html" , 0 ,
                        "... Quantum & Oracle 基金淨值績效","Quantum price.html" , 0 ,
                        "... Castlestone","co_castlestone.html" , 0 ,
                        "... Miton","co_miton.html" , 0 ) ;

  arMenu6 = new Array ( "" , 400 , menu_y_pos , "" , "" , "" , "" , "" , "" ,
                        "... (連結) Hansard","http://www.hansard.com/" , 0 ,
                        "... (連結) Hansard 登入客戶專屬","to_hans.html" , 0 ,
                        "... (連結) Miton","http://www.mitonam.com" , 0 ,
	                    "... (連結) 往來基金公司網頁" , "to_link.html" , 0 );

  /* - End Menu Definition ------------------------------------------------------------------ */
}

if (isMenu) {

/*hierMenus.js - Cross-Browser/Full-Window/Frames
* by Peter Belesis. v3.05 990126
* Copyright (c) 1999 internet.com LLC. All Rights Reserved.
* Originally published and documented at http://www.dhtmlab.com/
* You may re-use this code on a public Web site only if this entire
* copyright notice appears unchanged and you publicly display
* on the Web page a link to http://www.dhtmlab.com/.
*
* Contact pbel@internet.com for all other uses.
*/

loader = (isFrames) ? (NS4) ? parent : parent.document.body : window;
loader.onload = startIt;
if(NS4){
        origWidth = loader.innerWidth;
        origHeight = loader.innerHeight;
        loader.onresize = reDo;
}
isLoaded = false;
NSresized = false;

if (!window.menuVersion) {
        clickKill = showVisited = NSfontOver = keepHilite = clickStart = false;
}

isWin = (navigator.appVersion.indexOf("Win") != -1)
if (!isWin && !isMac) NSfontOver = showVisited = false;

mSecsVis = secondsVisible*1000;
isRight = (window.navFrLoc && navFrLoc == "right");

imgSuf = (isRight) ? ">"  : "ALIGN=RIGHT>";
imgStr = "<IMG SRC=" + imgSrc + " WIDTH=" + imgSiz + " HEIGHT=" + imgSiz +" BORDER=0 VSPACE=2 " + imgSuf;
spStr = (isRight && NS4) ? "<SPACER TYPE=HORIZONTAL SIZE="+imgSiz+">" : "";

areCreated = false;
menuLoc = null;

//*****************************************************************************

  function initVars ( )

//*****************************************************************************
{
  if ( areCreated )
  {
    for( init = 1 ; init < topCount ; init++ )
    {
      cur = eval ( "elMenu" + init ) ;
      clearTimeout ( cur.hideTimer ) ;
      cur.hideTimer = null ;
    }
    clearTimeout ( allTimer ) ;
  }
  
  topCount     = 1 ;
  areCreated   = false ;
  beingCreated = false ;
  isOverMenu   = false ;
  currentMenu  = null ;
  allTimer     = null ;
}

initVars ( ) ;

//*****************************************************************************

  function NSunloaded ( )

//*****************************************************************************
{
  isLoaded = false ;
}

//*****************************************************************************

  function NSloaded ( e )

//*****************************************************************************
{
  if ( e.target.name == mainFrName )
  {
    initVars ( ) ;
    startIt ( ) ;
  }
}

//*****************************************************************************

  function IEunloaded ( )

//*****************************************************************************
{
  initVars ( ) ;
  isLoaded = false ;
  setTimeout ( "keepTrack()" , 50 ) ;
}

//*****************************************************************************

  function keepTrack ( )

//*****************************************************************************
{
  if ( menuLoc.document.readyState == "complete" )
  {
    initVars ( ) ;
    startIt ( ) ;
  }
  else setTimeout ("keepTrack()" , 50 ) ;
}

//*****************************************************************************

  function startIt ( )

//*****************************************************************************
{
  isLoaded = true ;
  if ( isFrames )
  {
    menuLoc = eval ( "parent.frames." + mainFrName ) ;
    if ( NS4 )
    {
      loader.captureEvents ( Event.LOAD ) ;
      loader.onload = NSloaded ;
      menuLoc.onunload = NSunloaded ;
    }
    
    if ( IE4 ) menuLoc.document.body.onunload = IEunloaded ;
  }
  else menuLoc = window ;
  
  menuLoc.nav = nav = window ;
  
  if ( clickKill )
  {
    if ( NS4 ) menuLoc.document.captureEvents ( Event.MOUSEDOWN ) ;
    menuLoc.document.onmousedown = clicked ;
  }
  
  makeTop ( ) ;
  bodyLoad ( ) ;
}

//*****************************************************************************

  function makeTop ( )

//*****************************************************************************
{
  beingCreated = true ;
  status = "Please wait, creating menus..." ;
  
  while ( eval ( "window.arMenu" + topCount ) )
  {
    ( NS4 ) ? makeMenuNS ( false , topCount ) : makeMenuIE ( false , topCount ) ;
    topCount++ ;
  }
  
  status = "" ;
  areCreated = true ;
  beingCreated = false ;
}

//*****************************************************************************

  function makeMenuNS ( isChild , menuCount , parMenu , parItem )

//*****************************************************************************
{
  tempArray = eval ( "arMenu" + menuCount ) ;
  
  if ( ! isChild )
  {
    tempWidth = tempArray[0] ? tempArray[0] : menuWidth ;
    menu = makeElement ( "elMenu" + menuCount , tempWidth , null , null ) ;
  }
  else menu = makeElement ( "elMenu" + menuCount , null , parMenu , null ) ;
  
  menu.array = tempArray ;
  menu.setMenuTree = setMenuTree ;
  menu.setMenuTree ( isChild , parMenu ) ;
  
  while ( menu.itemCount < menu.maxItems )
  {
    menu.itemCount++ ;
    prevItem = ( menu.itemCount > 1 ) ? menu.item : null ;
    itemName = "item" + menuCount + "_" + menu.itemCount ;
    
    menu.item = makeElement ( itemName , null , null , menu ) ;
    menu.item.prevItem = prevItem ;
    menu.item.setup = itemSetup ;
    menu.item.setup ( menu.itemCount , menu.array ) ;
    
    if ( menu.item.hasMore )
    {
      makeMenuNS ( true , menuCount + "_" + menu.itemCount , menu , menu.item ) ;
      menu = menu.parentMenu ;
    }
  }
  
  menu.lastItem = menu.item ;
  menu.setup ( isChild , parMenu , parItem ) ;
}

//*****************************************************************************

  function setMenuTree ( isChild , parMenu )

//*****************************************************************************
{
        if (!isChild) {
                this.menuWidth = this.array[0] ? this.array[0] : menuWidth;
                this.menuLeft = this.array[1];
                this.menuTop = this.array[2];
                this.menuFontColor = this.array[3] ? this.array[3] : fntCol;
                this.menuFontOver = this.array[4] ? this.array[4] : overFnt;
                this.menuBGColor = this.array[5] ? this.array[5] : backCol;
                this.menuBGOver = this.array[6] ? this.array[6] : overCol;
                this.menuBorCol = this.array[7] ? this.array[7] : borCol;
                this.menuSeparatorCol = this.array[8] ? this.array[8] : separatorCol;
                this.treeParent = this;
                this.startChild = this;
        }
        else {
                this.menuWidth = parMenu.menuWidth;
                this.menuLeft = parMenu.menuLeft;
                this.menuTop = parMenu.menuTop;
                this.menuFontColor = parMenu.menuFontColor;
                this.menuFontOver = parMenu.menuFontOver;
                this.menuBGColor = parMenu.menuBGColor;
                this.menuBGOver = parMenu.menuBGOver;
                this.menuBorCol = parMenu.menuBorCol;
                this.menuSeparatorCol = parMenu.menuSeparatorCol;
                this.treeParent = parMenu.treeParent;
        }

        this.maxItems = (isChild) ? this.array.length/3 : (this.array.length-9)/3;
        this.hasParent = isChild;
    this.setup = menuSetup;
        this.itemCount = 0;
}

function makeMenuIE(isChild,menuCount,parMenu) {

        menu = makeElement("elMenu" + menuCount);
        menu.array = eval("arMenu" + menuCount);

        menu.setMenuTree = setMenuTree;
        menu.setMenuTree(isChild,parMenu);

        menu.itemStr = "";

        while (menu.itemCount < menu.maxItems) {
                menu.itemCount++;
                itemName = "item" + menuCount + "_" + menu.itemCount;

                arrayPointer = (isChild) ? (menu.itemCount-1)*3 :((menu.itemCount-1)*3)+9;
                dispText = menu.array[arrayPointer];
                hasMore = menu.array[arrayPointer + 2];
                htmStr = (hasMore) ? imgStr + dispText : dispText;
                menu.itemStr += "<SPAN ID=" + itemName + " STYLE=\"width:" + menu.menuWidth + "\">" + htmStr + "</SPAN><BR>";

                if (hasMore) {
                        makeMenuIE(true,menuCount + "_" + menu.itemCount,menu);
                        menu = menu.parentMenu;
                }
        }

        menu.innerHTML = menu.itemStr;
        itemColl = menu.children.tags("SPAN");
        for (i=0; i<itemColl.length; i++) {
                it = itemColl(i);
                it.setup = itemSetup;
                it.setup(i+1,menu.array);
        }
        menu.lastItem = itemColl(itemColl.length-1);
        menu.setup(isChild,parMenu);
}

function makeElement(whichEl,whichWidth,whichParent,whichContainer) {
        if (NS4) {
                if (whichWidth) {
                        elWidth = whichWidth;
                }
                else {
                        elWidth = (whichContainer) ? whichContainer.menuWidth : whichParent.menuWidth;
                        if (whichContainer) elWidth = elWidth-(borWid*2)-(itemPad*2);
                }
                if (!whichContainer) whichContainer = menuLoc;
                eval(whichEl + "= new Layer(elWidth,whichContainer)");
        }
        else {
                elStr = "<DIV ID=" + whichEl + " STYLE='position:absolute'></DIV>";
                menuLoc.document.body.insertAdjacentHTML("BeforeEnd",elStr);
                if (isFrames) eval(whichEl + "= menuLoc." + whichEl);
        }
        return eval(whichEl);
}

function itemSetup(whichItem,whichArray) {
        this.onmouseover = itemOver;
        this.onmouseout = itemOut;
        this.container = (NS4) ? this.parentLayer : this.offsetParent;

        arrayPointer = (this.container.hasParent) ? (whichItem-1)*3 : ((whichItem-1)*3)+9;

        this.dispText = whichArray[arrayPointer];
        this.linkText = whichArray[arrayPointer + 1];
        this.hasMore = whichArray[arrayPointer + 2];

        if (IE4 && this.hasMore) {

// 3.05: omit the next line:
//              this.child = eval("elMenu" + this.id.substr(this.id.indexOf("_")-1));
// 3.05: replace with this line:
                this.child = eval("elMenu" + this.id.substr(4));
                this.child.parentMenu = this.container;
                this.child.parentItem = this;
        }

        if (this.linkText) {
                if (NS4) {
                        this.captureEvents(Event.MOUSEUP)
                        this.onmouseup = linkIt;
                }
                else {
                        this.onclick = linkIt;
                        this.style.cursor = "hand";
                }
        }

        if (NS4) {
                htmStr = this.dispText;
                this.document.tags.A.textDecoration = "none";
                if (fntBold) htmStr = htmStr.bold();
                if (fntItal) htmStr = htmStr.italics();
                htmStr = "<FONT FACE=" + fntFam + " POINT-SIZE=" + fntSiz + ">" + htmStr+ "</FONT>";

                if (this.linkText) {
                        with (this.document) {
                                linkColor = this.container.menuFontColor;
                                alinkColor = this.container.menuFontColor;
                                vlinkColor = (showVisited) ? showVisited : this.container.menuFontColor;
                        }
                        htmStrOver = htmStr.fontcolor(this.container.menuFontOver).link("javascript:void(0)");
                        htmStr = htmStr.link("javascript:void(0)");
                }
                else {
                        htmStrOver = htmStr.fontcolor(this.container.menuFontOver);
                        htmStr = htmStr.fontcolor(this.container.menuFontColor);
                }

                this.htmStr = (this.hasMore) ? imgStr + htmStr : spStr + htmStr;
                this.htmStrOver = (this.hasMore) ? imgStr + htmStrOver : spStr + htmStrOver;

                this.document.write(this.htmStr);
                this.document.close();

// 3.05: added next 2 lines for status bar display when mousing over link part of item:
                if (this.linkText)
                        eval("this.document.links[0].onmouseover = function(){menuLoc.status='"+ this.linkText +"';return true}");

                this.visibility = "inherit";
                this.bgColor = this.container.menuBGColor;

                if (whichItem == 1) {
                        this.top = borWid + itemPad;
                }
                else {
                        this.top = this.prevItem.top + this.prevItem.clip.height + separator;
                }

                this.left = borWid + itemPad;
                this.clip.top = this.clip.left = -itemPad;
                this.clip.bottom += itemPad;
                this.clip.right = this.container.menuWidth-(borWid*2)-itemPad;
        }
        else {
                with (this.style) {
                        padding = itemPad;
                        if (isRight && !this.hasMore) paddingLeft = parseInt(padding)+imgSiz;
                        color = this.container.menuFontColor;
                        fontSize = fntSiz + "pt";
                        fontWeight = (fntBold) ? "bold" : "normal";
                        fontStyle =     (fntItal) ? "italic" : "normal";
                        fontFamily = fntFam;

                        borderBottomWidth = separator + "px";
                        borderBottomColor = this.container.menuSeparatorCol;
                        borderBottomStyle = "solid";
                        backgroundColor = this.container.menuBGColor;
                }
        }
}

function menuSetup(hasParent,openCont,openItem) {
        this.onmouseover = menuOver;
        this.onmouseout = menuOut;

        this.showIt = showIt;
        this.keepInWindow = keepInWindow;
        this.hideTree = hideTree
        this.hideParents = hideParents;
        this.hideChildren = hideChildren;
        this.hideTop = hideTop;
        this.hasChildVisible = false;
        this.isOn = false;
        this.hideTimer = null;

        this.childOverlap = (perCentOver != null) ? ((perCentOver/100) * this.menuWidth) : childOverlap;
        this.currentItem = null;
        this.hideSelf = hideSelf;

        if (hasParent) {
                this.hasParent = true;
                this.parentMenu = openCont;
                if (NS4) {
                        this.parentItem = openItem;
                        this.parentItem.child = this;
                }
        }
        else {
                this.hasParent = false;
        }

        if (NS4) {
                this.bgColor = this.menuBorCol;
                this.fullHeight = this.lastItem.top + this.lastItem.clip.bottom + borWid;
                this.clip.right = this.menuWidth;
                this.clip.bottom = this.fullHeight;
                this.document.captureEvents(Event.CLICK);
                this.document.onclick = function(){return false};
        }
        else {
                with (this.style) {
                        width = this.menuWidth;
                        borderWidth = borWid;
                        borderColor = this.menuBorCol;
                        borderStyle = borSty;
                }

                this.lastItem.style.border="";
                this.fullHeight = this.scrollHeight;
                this.showIt(false);
                this.onselectstart = cancelSelect;
                this.moveTo = moveTo;
                this.moveTo(0,0);

        }
}

function popUp ( menuName , e )
{
  if ( isLoaded == null ) return ;
  if ( NS4 && NSresized ) startIt ( ) ;
  if ( ! isLoaded ) return ;
  linkEl = ( NS4 ) ? e.target : event.srcElement ;
  if ( clickStart ) linkEl.onclick = popMenu ;
  if ( ! beingCreated && ! areCreated ) startIt ( ) ;
  linkEl.menuName = menuName ;
  if ( ! clickStart ) popMenu ( e ) ;
}

function popMenu ( e )
{
  if ( ! isLoaded || ! areCreated ) return true ;
  
  eType = ( NS4 ) ? e.type : event.type ;
  if ( clickStart && eType != "click" ) return true ;
  hideAll ( ) ;
  
  linkEl = ( NS4 ) ? e.target : event.srcElement ;
  
  currentMenu = eval ( linkEl.menuName ) ;
  currentMenu.hasParent = false ;
  currentMenu.treeParent.startChild = currentMenu ;
  
  if ( IE4 ) menuLocBod = menuLoc.document.body ;
  if ( ! isFrames )
  {
    xPos = ( currentMenu.menuLeft ) ? currentMenu.menuLeft : ( NS4 ) ? e.pageX : ( event.clientX + menuLocBod.scrollLeft ) ;
    yPos = ( currentMenu.menuTop ) ? currentMenu.menuTop : ( NS4 ) ? e.pageY : ( event.clientY + menuLocBod.scrollTop ) ;
  }
  else
  {
    switch ( navFrLoc )
    {
       case "left":
         xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? menuLoc.pageXOffset : menuLocBod.scrollLeft;
         yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? (e.pageY-pageYOffset)+menuLoc.pageYOffset : event.clientY + menuLocBod.scrollTop;
         break;
       case "top":
         xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? (e.pageX-pageXOffset)+menuLoc.pageXOffset : event.clientX + menuLocBod.scrollLeft;
         yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? menuLoc.pageYOffset : menuLocBod.scrollTop;
         break;
       case "bottom":
         xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? (e.pageX-pageXOffset)+menuLoc.pageXOffset : event.clientX + menuLocBod.scrollLeft;
         yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? menuLoc.pageYOffset+menuLoc.innerHeight : menuLocBod.scrollTop + menuLocBod.clientHeight;
         break;
       case "right":
         xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? menuLoc.pageXOffset+menuLoc.innerWidth : menuLocBod.scrollLeft+menuLocBod.clientWidth;
         yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? (e.pageY-pageYOffset)+menuLoc.pageYOffset : event.clientY + menuLocBod.scrollTop;
         break;
     }
  }
  
  currentMenu.moveTo ( xPos , yPos ) ;
  currentMenu.keepInWindow ( ) ;
  currentMenu.isOn = true ;
  currentMenu.showIt ( true ) ;
  
  return false ;
}

function menuOver(e) {
        this.isOn = true;
        isOverMenu = true;
        currentMenu = this;
        if (this.hideTimer) clearTimeout(this.hideTimer);
}

function menuOut() {
        if (IE4) {
                theEvent = menuLoc.event;
                if (theEvent.srcElement.contains(theEvent.toElement)) return;
        }
        this.isOn = false;
        isOverMenu = false;

// 3.05: added next line for status bar display when mousing out of menu:
        menuLoc.status = "";

        if (!clickKill) allTimer = setTimeout("currentMenu.hideTree()",10);

}

function itemOver(){
        if (keepHilite) {
                if (this.container.currentItem && this.container.currentItem != this) {
                        if (NS4) {
                                this.container.currentItem.bgColor = this.container.menuBGColor;
                                if (NSfontOver) {
                                        with (this.container.currentItem.document) {
                                                linkColor = this.container.menuFontColor;
                                                write(this.container.currentItem.htmStr)
                                                close();
                                        }
                                }
                        }
                        else {
                                with (this.container.currentItem.style) {
                                        backgroundColor = this.container.menuBGColor;
                                        color = this.container.menuFontColor;
                                }
                        }
                }
        }

        if (IE4) {
                theEvent = menuLoc.event;
                if (theEvent.srcElement.tagName == "IMG") return;
                this.style.backgroundColor = this.container.menuBGOver;
                this.style.color = this.container.menuFontOver;
        }
        else {
                this.bgColor = this.container.menuBGOver;
                if (NSfontOver) {
                        this.document.write(this.htmStrOver);
                        this.document.close();
                }
        }

// 3.05: added next line for status bar display when mousing over an item:
        menuLoc.status = this.linkText;

        this.container.currentItem = this;

        if (this.container.hasChildVisible) {
                this.container.hideChildren(this);
        }

        if (this.hasMore) {
                horOffset = (isRight) ? (this.container.childOverlap - this.container.menuWidth) : (this.container.menuWidth - this.container.childOverlap);

                if (NS4) {
                        this.childX = this.container.left + horOffset;
                        this.childY = this.pageY + childOffset;
                }
                else {
                        this.childX = this.container.style.pixelLeft + horOffset;
                        this.childY = this.offsetTop + this.container.style.pixelTop + childOffset;
                }

                this.child.moveTo(this.childX,this.childY);
                this.child.keepInWindow();
                this.container.hasChildVisible = true;
                this.container.visibleChild = this.child;
                this.child.showIt(true);
        }
}

function itemOut() {
        if (IE4) {
                theEvent = menuLoc.event;
        if (theEvent.srcElement.contains(theEvent.toElement)
     || (theEvent.fromElement.tagName=="IMG" && theEvent.toElement.contains(theEvent.fromElement)))
        return;
                if (!keepHilite) {
                        this.style.backgroundColor = this.container.menuBGColor;
                        this.style.color = this.container.menuFontColor;
                }
        }
        else {
                if (!keepHilite) {
                        this.bgColor = this.container.menuBGColor;
                        if (NSfontOver) {
                                with (this.document) {
                                        linkColor = this.container.menuFontColor;
                                        write(this.htmStr);
                                        close();
                                }
                        }

                }
                if (!isOverMenu && !clickKill) {
                        allTimer = setTimeout("currentMenu.hideTree()",10);
                }
        }
}

function moveTo(xPos,yPos) {
        this.style.pixelLeft = xPos;
        this.style.pixelTop = yPos;
}

function showIt(on) {
        if (NS4) {
                this.visibility = (on) ? "show" : "hide";
                if (keepHilite && this.currentItem) {
                        this.currentItem.bgColor = this.menuBGColor;
                        if (NSfontOver) {
                                with (this.currentItem.document) {
                                        write(this.currentItem.htmStr);
                                        close();
                                }
                        }
                }
        }
        else {
                this.style.visibility = (on) ? "visible" : "hidden";
                if (keepHilite && this.currentItem) {
                        with (this.currentItem.style) {
                                backgroundColor = this.menuBGColor;
                                color = this.menuFontColor;
                        }
                }
        }
        this.currentItem = null;
}

function keepInWindow() {
        scrBars = 20;
        botScrBar = (isFrames && navFrLoc=="bottom") ? (borWid*2) : scrBars;
        rtScrBar = (isFrames && navFrLoc=="right") ? (borWid*2) : scrBars;
        if (NS4) {
                winRight = (menuLoc.pageXOffset + menuLoc.innerWidth) - rtScrBar;
                rightPos = this.left + this.menuWidth;

                if (rightPos > winRight) {
                        if (this.hasParent) {
                                parentLeft = this.parentMenu.left;
                                newLeft = ((parentLeft-this.menuWidth) + this.childOverlap);
                                this.left = newLeft;
                        }
                        else {
                                dif = rightPos - winRight;
                                this.left -= dif;
                        }
                }

                winBot = (menuLoc.pageYOffset + menuLoc.innerHeight) - botScrBar ;
                botPos = this.top + this.fullHeight;

                if (botPos > winBot) {
                        dif = botPos - winBot;
                        this.top -= dif;
                }

                winLeft = menuLoc.pageXOffset;
                leftPos = this.left;

                if (leftPos < winLeft) {
                        if (this.hasParent) {
                                parentLeft = this.parentMenu.left;
                                newLeft = ((parentLeft+this.menuWidth) - this.childOverlap);
                                this.left = newLeft;
                        }
                        else {
                                this.left = 5;
                        }
                }
        }
        else {
        winRight = (menuLoc.document.body.scrollLeft + menuLoc.document.body.clientWidth) - rtScrBar;
                rightPos = this.style.pixelLeft + this.menuWidth;

                if (rightPos > winRight) {
                        if (this.hasParent) {
                                parentLeft = this.parentMenu.style.pixelLeft;
                                newLeft = ((parentLeft - this.menuWidth) + this.childOverlap);
                                this.style.pixelLeft = newLeft;
                        }
                        else {
                                dif = rightPos - winRight;
                                this.style.pixelLeft -= dif;
                        }
                }

                winBot = (menuLoc.document.body.scrollTop + menuLoc.document.body.clientHeight) - botScrBar;
                botPos = this.style.pixelTop + this.fullHeight;

                if (botPos > winBot) {
                        dif = botPos - winBot;
                        this.style.pixelTop -= dif;
                }

                winLeft = menuLoc.document.body.scrollLeft;
                leftPos = this.style.pixelLeft;

                if (leftPos < winLeft) {
                        if (this.hasParent) {
                                parentLeft = this.parentMenu.style.pixelLeft;
                                newLeft = ((parentLeft+this.menuWidth) - this.childOverlap);
                                this.style.pixelLeft = newLeft;
                        }
                        else {
                                this.style.pixelLeft = 5;
                        }
                }
        }
}

function linkIt() {
        if (this.linkText.indexOf("javascript")!=-1) eval(this.linkText)
        else menuLoc.location.href = this.linkText;
}

function popDown(menuName){
        if (!isLoaded || !areCreated) return;
        whichEl = eval(menuName);
        whichEl.isOn = false;
        if (!clickKill) whichEl.hideTop();
}

function hideAll() {
        for(i=1; i<topCount; i++) {
                temp = eval("elMenu" + i + ".startChild");
                temp.isOn = false;
                if (temp.hasChildVisible) temp.hideChildren();
                temp.showIt(false);
        }
}

function hideTree() {
        allTimer = null;
        if (isOverMenu) return;
        if (this.hasChildVisible) {
                this.hideChildren();
        }
        this.hideParents();
}

function hideTop() {
        whichEl = this;
        (clickKill) ? whichEl.hideSelf() : (this.hideTimer = setTimeout("whichEl.hideSelf()",mSecsVis));
}

function hideSelf() {
        this.hideTimer = null;
        if (!this.isOn && !isOverMenu) {
                this.showIt(false);
        }
}

function hideParents() {
        tempMenu = this;
        while (tempMenu.hasParent) {
                tempMenu.showIt(false);
                tempMenu.parentMenu.isOn = false;
                tempMenu = tempMenu.parentMenu;
        }
        tempMenu.hideTop();
}

function hideChildren(item) {
        tempMenu = this.visibleChild;
        while (tempMenu.hasChildVisible) {
                tempMenu.visibleChild.showIt(false);
                tempMenu.hasChildVisible = false;
                tempMenu = tempMenu.visibleChild;
        }

        if (!this.isOn || !item.hasMore || this.visibleChild != this.child) {
                this.visibleChild.showIt(false);
                this.hasChildVisible = false;
        }
}

function cancelSelect(){return false}

function reDo(){
        if (loader.innerWidth==origWidth && loader.innerHeight==origHeight) return;
        initVars();
        NSresized=true;
        menuLoc.location.reload();
}

function clicked() {
        if (!isOverMenu && currentMenu!=null && !currentMenu.isOn) {
                whichEl = currentMenu;
                whichEl.hideTree();
        }
}

window.onerror = handleErr;

function handleErr(){
        arAccessErrors = ["permission","access"];
        mess = arguments[0].toLowerCase();
        found = false;
        for (i=0;i<arAccessErrors.length;i++) {
                errStr = arAccessErrors[i];
                if (mess.indexOf(errStr)!=-1) found = true;
        }
        return found;
}

}

//*****************************************************************************

  function menu_header ()

//*****************************************************************************
{

  var HTML = "" ;
  
  var path = "" ;
  var company = "hftrust"

    bgcolor = "#000000" ;
    table_width = 320 ;
    title_width = 320 ;
  
  HTML += '<table width="100%" border="0" cellpadding="0" cellspacing="0">' + "\n" ;
  HTML += '  <tr>' + "\n" ;
  HTML += '    <td background="images/menu_up00.jpg"><img src="images/menu_up01.jpg" width="320" height="44" /></td>' + "\n" ;
  HTML += '  </tr>' + "\n" ;
  HTML += '  <tr>' + "\n" ;

  HTML += '   <td background="images/menu_dn00.jpg">' + "\n" ;
  HTML += '   <table border="0" width="' + table_width + '" cellspacing="0" cellpadding="0">' + "\n" ;

  HTML += '    <td width="40"><a href="index.html" onMouseOver="popUp(\'elMenu1\',event);" onMouseOut="popDown(\'elMenu1\');"><img border="0" src="images/menu_dn01.jpg" width="80" height="27" name="menu_home"></a></td>' + "\n" ;
  HTML += '    <td width="40"><a href="index.html#news" onmouseover="popUp(\'elMenu2\',event);" onmouseout="popDown(\'elMenu2\');"><img border="0" src="images/menu_dn02.jpg" width="80" height="27" name="menu_02"></a></td>' + "\n" ;
  HTML += '    <td width="40"><a href="3product.html" onmouseover="popUp(\'elMenu3\',event);" onmouseout="popDown(\'elMenu3\');"><img border="0" src="images/menu_dn03.jpg" width="80" height="27" name="menu_03"></a></td>' + "\n" ;
  HTML += '    <td width="40"><a href="4service.html" onmouseover="popUp(\'elMenu4\',event);" onmouseout="popDown(\'elMenu3\');"><img border="0" src="images/menu_dn04.jpg" width="80" height="27" name="menu_04"></a></td>' + "\n" ;
  HTML += '    <td width="40"><a href="5funds.html" onmouseover="popUp(\'elMenu5\',event);" onmouseout="popDown(\'elMenu3\');"><img border="0" src="images/menu_dn05.jpg" width="80" height="27" name="menu_05"></a></td>' + "\n" ;
  HTML += '    <td width="40"><a href="http://www.hansard.com" onmouseover="popUp(\'elMenu6\',event);" onmouseout="popDown(\'elMenu3\');"><img border="0" src="images/menu_dn06.jpg" width="80" height="27" name="menu_06"></a></td>' + "\n" ;
  HTML += '    <td width="40"><img border="0" src="images/menu_dn99.jpg" width="80" height="27" name="menu_99"></a></td>' + "\n" ;
  HTML += '</table>' + "\n" ;
  HTML += '</table>' + "\n" ;
  
  document.write ( HTML ) ;
}

function footer ( dir )
{
  var HTML = "" ;
  
  if ( dir == "HFTRUST" ) path = "" ;
  else if ( dir == "ROOT" ) path = "hftrust/" ;
  else path = "../hftrust/" ;
  
  HTML += '<!-- Footer -->' + "\n" ;
  HTML += '<p align="center"><a href="#top">~Top</a><br><br>' + "\n" ;
  HTML += '<a href="index.html">首頁</a>  |  <a href="mailto:service@uspifa.com">聯絡我們</a>  |  <a href="http://www.chinese-t.adobe.com/products/acrobat/readstep2.html" target="new">PDF閱覽軟體</a>  |  USP2010  </td>' + "\n" ;
  HTML += '<!-- End Footer-->' + "\n" ;
  
  document.write ( HTML ) ;
}

function slideShowFooter ( )
{
  var HTML = "" ;

  HTML += '<p align="center" style="font-family: Verdana, Tahoma, Arial; font-size: 12pt; color: #000000;"><br><br>' + "\n" ;
  HTML += '<a style="font-family: Verdana, Tahoma, Arial; font-size: 12pt; color: #0000FF; text-decoration: underline;" href="#" onclick="popup(\'../hftrust/termscons.html\',500,300);return false">Terms</a>  |  <a style="font-family: Verdana, Tahoma, Arial; font-size: 10pt; color: #0000FF; text-decoration: underline;" href="#" onclick="popup(\'../hftrust/disclaim.html\',500,300);return false">Home</a>  |  <a style="font-family: Verdana, Tahoma, Arial; font-size: 12pt; color: #0000FF; text-decoration: underline;" href="mailto:webmaster@hansard.com">Email WebMaster</a><br></td>' + "\n" ;

  return HTML ;
}

function upDate ( )
{
  if ( document.images ) document.images [ "slide" ].src = "images/scrnshot" + curRecord + ".gif" ;
  if ( ! ver4 ) return ;
  
  var part1 = "<table border='0' width='100%' cellspacing='0' cellpadding='5'><tr><td width='20'></td><td><table border='0' width='640' cellspacing='0' cellpadding='0'><tr><td width='50%'><font style='font-family: Verdana, Tahoma, Arial; font-size: 10pt; color: #000000;'>Screen " + curRecord + " of " + maxRecords ; 
  var part2 = "</font></td><td width='50%' align='right'><a href='javascript:showPrev()'><img border='0' src='../images/back.gif' width='40' height='17' alt='Back'><img border='0' src='../images/left_arrow.gif' width='16' height='17' alt='Back'></a><a href='javascript:showNext()'><img border='0' src='../images/right_arrow.gif' width='16' height='17' alt='More'><img border='0' src='../images/more.gif' width='40' height='17' alt='More'></a></td></td></tr><tr><td width='100%' colspan='2'><br><font style='font-family: Verdana, Tahoma, Arial; font-size: 10pt; color: #000000;'>" + textDescriptions [ curRecord ] ;
  var part3 = "</font></td></tr><tr><td width='100%' colspan='2' align='center'><br>" + slideShowFooter ( ) + "</td></tr></table></td></tr></table>" ;

  if ( NS4 )
  {
    with ( document.dynamic.document )
    {
      open ( ) ;
      write ( part1 + part2 + part3 ) ;
      close ( ) ;
    }
  }
  else document.all.dynamic.innerHTML = part1 + part2 + part3 ;
}

function showNext ( )
{
  curRecord = ( curRecord < maxRecords ) ? ++curRecord : 1 ;
  upDate ( ) ;
}

function showPrev ( )
{
  curRecord = ( curRecord > 1 ) ? --curRecord : maxRecords ;
  upDate ( ) ;
}

function imgZoom ( )
{
  popup ( "showslide.html?filename='images/scrnshot" + curRecord + "_full.gif'" , fullSizeImages[curRecord][0] , fullSizeImages[curRecord][1] ) ;
}

function popup ( filename , width , height )
{
  var str = "height=" + height + ",innerHeight=" + height ;
  str += ",width=" + width + ",innerWidth=" + width ;

  if ( window.screen )
  {
    var marginWidth = 40 ;
    var marginHeight = 40 ;
    
    var availableHeight = screen.availHeight - ( 2 * marginHeight ) ;
    var availableWidth  = screen.availWidth - ( 2 * marginWidth ) ;
    
    var xc , yc , sb ;
    
    if ( height > availableHeight || width > availableWidth ) sb = "scrollbars=1" ;
    else sb = "scrollbars=0" ;
    
    if ( height > availableHeight )
    {
      height = availableHeight ;
      yc = marginHeight ;
    }
    else yc = ( ( availableHeight - height ) / 2 ) + marginHeight ;
    
    if ( width > availableWidth )
    {
      width = availableWidth ;
      xc = marginWidth ;
    }
    else xc = ( ( availableWidth - width ) / 2 ) + marginWidth ;
    
    str = "height=" + height + ",innerHeight=" + height ;
    str += ",width=" + width + ",innerWidth=" + width ;
    str += ",left=" + xc + ",screenX=" + xc ;
    str += ",top=" + yc + ",screenY=" + yc ;
    str += ",location=0,menubar=0,personalbar=0," + sb + ",status=0,toolbar=0,alwaysRaised=1,dependent=1,resizable=0" ;
  }
  
  var tmp ;
  
  if ( oPopupWin )
  {
    tmp = oPopupWin ;
    oPopupWin = null ;
    
    if ( navigator.appName != "Netscape" ) tmp.close ( ) ;
  }
  
  oPopupWin = window.open ( filename , "popup" , str ) ;
  oPopupWin.focus ( ) ;
  
  return ! oPopupWin ;
}

//-------------------------------------------------------------------------------
function passWord() 
//-------------------------------------------------------------------------------
{  
var testV = 1;  
var pass1 = prompt('　USP下載專區','請輸入下載密碼');  
while (testV < 3) {  
if (!pass1)   
history.go(-1);  
if (pass1.toLowerCase() == "807676") {  
 
window.open('home_ifain.html');  
break;  
}   
testV+=1;  
var pass1 =   
prompt('　USP下載專區','密碼錯誤！請重新輸入');  
}  
if (pass1.toLowerCase()!="password" & testV ==3)   
history.go(-1);  
return " ";  
}   

