<!--
//Define global variables
var timerID = null;
var timerOn = false;
var timecount = 1000;
var what = null;
var newbrowser = true;
var check = false;

nav=new Array();
nav[0]=new Array();
nav[1]=new Array();
nav[2]=new Array();
nav[3]=new Array();

//nav[0][0]={name:"Overview",img:"etf_btn08_1_off.gif",imgover:"etf_btn08_1_on.gif",width:158,height:26,url:"hsi.html",target:"",top:211};
//nav[0][1]={name:"The Index",img:"etf_btn08_2_off.gif",imgover:"etf_btn08_2_on.gif",width:158,height:25,url:"hsi_theindex.html",target:""};

//nav[1][0]={name:"Overview",img:"etf_btn08_1_off.gif",imgover:"etf_btn08_1_on.gif",width:158,height:26,url:"hshare.html",target:"",top:211};
//nav[1][1]={name:"The Index",img:"etf_btn08_2_off.gif",imgover:"etf_btn08_2_on.gif",width:158,height:25,url:"hshare_theindex.html",target:""};

nav[0][0]={name:"Hang Seng Index ETF",img:"etf_btn08_1_off.gif",imgover:"etf_btn08_1_on.gif",width:235,height:26,url:"hsi.html",target:"",top:211};
nav[0][1]={name:"Hang Seng H-Share Index ETF",img:"etf_btn08_2_off.gif",imgover:"etf_btn08_2_on.gif",width:235,height:25,url:"hshare.html",target:""};
nav[0][2]={name:"Hang Seng FTSE/Xinhua China 25 Index ETF",img:"etf_btn08_3_off.gif",imgover:"etf_btn08_3_on.gif",width:235,height:24,url:"fxi.html",target:""};

nav[1][0]={name:"Hang Seng Index ETF",img:"etf_btn08_1_off.gif",imgover:"etf_btn08_1_on.gif",width:235,height:26,url:"hsi_doclib1.html",target:"",top:211};
nav[1][1]={name:"Hang Seng H-Share Index ETF",img:"etf_btn08_2_off.gif",imgover:"etf_btn08_2_on.gif",width:235,height:25,url:"hshare_doclib1.html",target:""};
nav[1][2]={name:"Hang Seng FTSE/Xinhua China 25 Index ETF",img:"etf_btn08_3_off.gif",imgover:"etf_btn08_3_on.gif",width:235,height:24,url:"fxi_doclib1.html",target:""};
    
nav[2][0]={name:"Hang Seng Index ETF",img:"etf_btn08_1_off.gif",imgover:"etf_btn08_1_on.gif",width:235,height:26,url:"hsi_japdoc.html",target:"",top:211};
nav[2][1]={name:"Hang Seng H-Share Index ETF",img:"etf_btn08_2_off.gif",imgover:"etf_btn08_2_on.gif",width:235,height:25,url:"hshare_japdoc.html",target:""};
nav[2][2]={name:"Hang Seng FTSE/Xinhua China 25 Index ETF",img:"etf_btn08_3_off.gif",imgover:"etf_btn08_3_on.gif",width:235,height:24,url:"fxi_japdoc.html",target:""};

//nav[2][0]={name:"Offering Documents & Financial Reports",img:"menu_bt31.gif",imgover:"menu_bt31n.gif",width:158,height:36,url:"doclib1.html",target:"",top:211};
//nav[2][1]={name:"General Announcement",img:"menu_bt32.gif",imgover:"menu_bt32n.gif",width:158,height:25,url:"doclib2.html",target:""};
//nav[2][2]={name:"Notices to Unitholders",img:"menu_bt33.gif",imgover:"menu_bt33n.gif",width:158,height:25,url:"doclib3.html",target:""};

nav[3][0]={name:"Hang Seng Bank",img:"menu_bt61.gif",imgover:"menu_bt61n.gif",width:158,height:26,url:"http://www.hangseng.com/hse.html",target:"_blank",top:299};
nav[3][1]={name:"This hyperlink may allow you to leave Hang Seng Investment Management Limited website.  The website accessed through this hyperlink may not provide you with any regulatory protections.  Hang Seng Investment Management Limited is not liable for your use of the hyperlinked website.",img:"menu_bt62.gif",imgover:"menu_bt62n.gif",width:158,height:25,url:"http://www.hkex.com.hk",target:"_blank"};
nav[3][2]={name:"Hang Seng Indexes",img:"menu_bt63.gif",imgover:"menu_bt63n.gif",width:158,height:25,url:"http://www.hsi.com.hk",target:"_blank"};
nav[3][3]={name:"This hyperlink may allow you to leave Hang Seng Investment Management Limited website.  The website accessed through this hyperlink may not provide you with any regulatory protections.  Hang Seng Investment Management Limited is not liable for your use of the hyperlinked website.",img:"menu_bt64.gif",imgover:"menu_bt64n.gif",width:158,height:26,url:"http://www.invested.hk/invested/en/html/section/index.html",target:"_blank"};

pos=new Array();
pos[0]=new Array();
pos[1]=new Array();

pos[0][0]={top:186,left:199};
pos[0][1]={top:248,left:199};
pos[0][2]={top:277,left:199};
pos[0][3]={top:335,left:199};
//pos[0][3]={top:306,left:199};

pos[1][0]={top:184,left:142};
pos[1][1]={top:241,left:142};
pos[1][2]={top:270,left:142};
pos[1][3]={top:328,left:142};
//pos[1][3]={top:304,left:142};


function reDo() {
	window.location.reload()
}

function checkBrowser() {
	if (document.layers) {
		//  Running Netscape 4
		layerRef="document.layers";
		styleSwitch="";
		visibleVar="show";
		what="ns4";
	}
	else if(document.all) {
		//  Running IE
		layerRef="document.all";
		styleSwitch=".style";
		visibleVar="visible";
		what ="ie";
	}
	else if(document.getElementById) {
		//  Running Netscape 7
		layerRef="document.getElementByID";
		styleSwitch=".style";
		visibleVar="visible";
		what="moz";
	}
	else {
		// Older than 4.0 browser
		what="none";
		newbrowser = false;
	}
}

window.onresize = reDo;
checkBrowser();

function initMenu() {
	check = true;
	hideAll();
}

// Turns the layers on and off
function showLayer(layerName) {
	if (check) {
		if (what =="none") {
			return;
		}
		else if (what == "moz") {
			document.getElementById(layerName).style.visibility="visible";
		}
		else {
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
		}
	}
	else {
		// Please wait for the page to finish loading
		return;
	}
}

function hideLayer(layerName) {
	if (check) {
		if (what =="none") {
			return;
		}
		else if (what == "moz") {
			document.getElementById(layerName).style.visibility="hidden";
		}
		else {
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		}
	}
	else {
		// Please wait for the page to finish loading
		return;
	}
}

function hideAll() {
	for (i=0;i<nav.length;i++) {
		eval("hideLayer('layernav"+i+"')");
	}
}

function startTime() {
	if (timerOn == false) {
		timerID=setTimeout( "hideAll()" , timecount);
		timerOn = true;
	}
}

function stopTime() {
	if (timerOn) {
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}

function createSubMenu() {
	for (x=0;x<nav.length;x++) {
		writeMenu("nav",x);
	}
}

function writeMenu(menu,idx) {
	html="";
	tempArray=eval(menu+"["+idx+"]");
	pageID=="home"?posidx=0:posidx=1;

	if (what!="ns4") {
		html+='<div id="layer'+menu+idx+'" style="position:absolute; top:'+pos[posidx][idx].top+'px; left:'+pos[posidx][idx].left+'px;" onMouseOver="stopTime();" onMouseOut="startTime();">\n';
	}
	else {
		html+='<layer name="layer'+menu+idx+'" top='+pos[posidx][idx].top+'px left='+pos[posidx][idx].left+'px z-index=110 visibility=hide onMouseOver="stopTime();" onMouseOut="startTime();">\n';
	}
		if (tempArray.length>1) {
			for (i=0;i<tempArray.length;i++) {
				html+='<a href="'+tempArray[i].url+'" onMouseOver="stopTime(); MM_swapImage(\'nav'+idx+i+'\',\'\',\'/hsb/eng/per/invs/image2/'+tempArray[i].imgover+'\',1);" onMouseOut="startTime(); MM_swapImgRestore();"';
				tempArray[i].target==""?html=html:html+=' target="'+tempArray[i].target+'"';
				html+='><img name="nav'+idx+i+'"src="/hsb/eng/per/invs/image2/'+tempArray[i].img+'" width='+tempArray[i].width+' height='+tempArray[i].height+' alt="'+tempArray[i].name+'" border=0></a><br>\n';

				eval("MM_preloadImages('/hsb/eng/per/invs/image2/"+tempArray[i].imgover+"')");
			}
		}
	if (what!="ns4") {
		html+='</div>\n';
	}
	else {
		html+='</layer>\n';
	}

	document.write(html);
}
//-->

