var myname='';

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function SwitchMenu(parent, obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById(parent).getElementsByTagName("DIV"); 
		if(el.style.display != "block"){ 
			for (var i=0; i<ar.length; i++){
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}
		else{
			el.style.display = "none";
		}
	}
	else
	{
	
	}
}

function show(){
if (location.pathname.toLowerCase().indexOf("chapter")> 0)
    {
    var path = location.pathname.toLowerCase();
    var pos = path.lastIndexOf("/")+1
    var pos1 = path.indexOf(".htm")
    var pos3= path.indexOf("-")
    
    var el = document.getElementById("subchapter11");   
    if (el) el.style.display = "block";     
    var el = document.getElementById("subchapter12");   
    if (el) el.style.display = "block";     
    
    
    if (pos3 > 0 )
    {
        var strTemp = path.substring(pos, pos1).split("-")
        if (strTemp.length >= 3)
        {
            var el = document.getElementById("sub"+path.substring(pos, pos3));
            if (el) el.style.display = "block";
            var ar = document.getElementById("sub"+path.substring(pos, pos3+2)).getElementsByTagName("DIV"); 
            var el = document.getElementById("sub"+path.substring(pos, pos3+2));
            if (el) el.style.display = "block";            
            var ar1 = document.getElementById("sub"+path.substring(pos, pos1) + "bullet1"); 
//            if (ar1) ar1.src="http://hkbiz.hktdc.com/img/space.gif"
            var ar = document.getElementById("sub"+path.substring(pos, pos1) + "bullet");    

        }
        else
        {
            var el = document.getElementById("sub"+path.substring(pos, pos3));
            var ar = document.getElementById(path.substring(pos, pos3)).getElementsByTagName("DIV");    
            if (el) el.style.display = "block";         
            var el = document.getElementById("sub" + path.substring(pos, pos1));         
            var ar = document.getElementById(path.substring(pos, pos1) + "bullet");            
                     
        }
        if (el) el.style.display = "block";

    }
    else
	{
    	var el = document.getElementById("sub"+path.substring(pos, pos1));
    	var ar = document.getElementById(path.substring(pos, pos1)).getElementsByTagName("DIV"); 
    	var ar = document.getElementById(path.substring(pos, pos1) + "bullet");    
	
	}

    if (el)	el.style.display = "block";
    if (ar) 
		{
			ar.src="http://hkbiz.hktdc.com/img/arrow1.gif"
			ar.alt="ͼƬ";
		}
    }	
}
