function filename()
{
	path = location.href;
	
	if (path.lastIndexOf("#") > 0) {
	nam_id = path.lastIndexOf("#");
	path = path.substring(0,nam_id);
	}
	
	file_id = path.lastIndexOf("/");
	file_id2 = path.lastIndexOf(".");
	fname = path.substring(file_id+1,file_id2);
	return fname;
}

function spacer(){
	document.write("<tr>");
	document.write("<td><img src=\"images/space.jpg\" width=\"200\" height=\"2\"></td>");
	document.write("</tr>");
}

function MenuItem(_name,_label,_url,_target)
{
	this.name = _name;
	this.label = _label;
	this.url = _url;
	this.target = _target;
	this.relatives = false;
	this.children = false;
}

var TagLabel = "<tr>";
	TagLabel+= "<td><img name=\"nav_{prefix}{idx}\" border=\"0\" src=\"images/nav_{prefix}{idx}_ro.gif\"  alt=\"{alt}\"></td>";
	TagLabel+= "</tr>";
	
var TagLabelLink = "<tr>";
	TagLabelLink+= "<td><a href=\"{url}\" target=\"{target}\"><img name=\"nav_{prefix}{idx}\" border=\"0\" src=\"images/nav_{prefix}{idx}_ro.gif\"  alt=\"{alt}\"></a></td>";
	TagLabelLink+= "</tr>";
	
var TagLink = "<tr>";
	TagLink+= "<td><a href=\"{url}\" target=\"{target}\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('nav_{prefix}{idx}','','images/nav_{prefix}{idx}_ro.gif',1);MM_displayStatusMsg('{alt}');return document.MM_returnValue\"><img name=\"nav_{prefix}{idx}\" border=\"0\" src=\"images/nav_{prefix}{idx}.gif\"  alt=\"{alt}\"></a></td>";
	TagLink+= "</tr>";

function relativePageChk(name,nameGrp)
{
	if (nameGrp == false || nameGrp == undefined || nameGrp.length <= 0)
	return false;
	
	var grpLen = nameGrp.length;
	for (var i = 0; i < grpLen; i++) { if (name == nameGrp[i]) return true; }
	return false;
}
function pageChk(pageGrp)
{
	if (pageGrp == false || pageGrp.length <= 0)
	return -1;
	
	var idxLvl = new Array();
	var grpLen = pageGrp.length;
	for (var i = 0; i < grpLen; i++)
	{
		if ( filename() == pageGrp[i].name ||
			(filename() != pageGrp[i].name && relativePageChk(filename(),pageGrp[i].relatives) != false) ) {
			idxLvl.push(i);
			return idxLvl;
		} else if (filename() != pageGrp[i].name && pageChk(pageGrp[i].children) >= 0) {
			idxLvl.push(i);
			idxLvl = idxLvl.concat(pageChk(pageGrp[i].children));
			return idxLvl;
		}
	}
	return -1;
}

function convertMenuItem(tag,menuItem,idx,prefix)
{
	var tempCode = tag;
		tempCode = tempCode.replace(/{idx}/g,idx);
		tempCode = tempCode.replace(/{prefix}/g,prefix);
		tempCode = tempCode.replace(/{url}/g,menuItem.url);
		tempCode = tempCode.replace(/{alt}/g,menuItem.label);
		tempCode = tempCode.replace(/{target}/g,menuItem.target);
	return tempCode;
}

function ListMenuCode(menuGrp,prefix,lvl,childForceSwitch)
{
	if ( menuGrp == false || menuGrp.length <= 0 ||
		(pageChk(menuGrp) < 0 && childForceSwitch == false) )
	return false;
	
	var menuLen = menuGrp.length;
	var idxLvl = pageChk(menuGrp);
	var menuCode = "";
	
	for (var i = 0; i < menuLen; i++)
	{
		var tempCode = "";
		var childCode = "";
		if ( i == idxLvl[0] &&
			(idxLvl.length > 1 || relativePageChk(filename(),menuGrp[i].relatives) != false) ) {
			TagCode = TagLabelLink;
			childForceSwitch = true;
		} else if (i == idxLvl[0] && idxLvl.length <= 1) {
			TagCode = TagLabel;
			childForceSwitch = true;
		} else {
			TagCode = TagLink;
			childForceSwitch = false;
		}
			tempCode = convertMenuItem(TagCode,menuGrp[i],i,prefix);
			childCode = ListMenuCode(menuGrp[i].children,prefix+i+"_",lvl+1,childForceSwitch);
		if (childCode != false) tempCode+= childCode;
			menuCode+= tempCode;
	}
	return menuCode;
}

var statMenuGrp	= new Array();
	statMenuGrp[0] = new MenuItem("index","Statistics","index.asp","_self");
	statMenuGrp[0].children = new Array();
	statMenuGrp[0].children[0] = new MenuItem("index","Estates/ Projects Managed ","index.asp","_self");
	statMenuGrp[0].children[1] = new MenuItem("population","Estimated Population of Rental Estates &amp; Managed Properties","population.asp","_self");
	statMenuGrp[0].children[2] = new MenuItem("est_proj_completed","Estates / Projects Completed","est_proj_completed.asp","_self");
	statMenuGrp[0].children[3] = new MenuItem("complete","Existing Developments Completed","complete.asp","_self");
	statMenuGrp[0].children[4] = new MenuItem("flat","Flat Production Forecast","flat.asp","_self");
	statMenuGrp[0].children[5] = new MenuItem("annual","Annual Flat Production","annual.asp","_self");
	statMenuGrp[0].children[6] = new MenuItem("five","Five Years Financial Highlights","five.asp","_self");
	
var photoMenuGrp = new Array();
	photoMenuGrp[0] = new MenuItem("photo","Photo Gallery","photo.asp","_self");
	photoMenuGrp[0].children = new Array();
	photoMenuGrp[0].children[0] = new MenuItem("photo","Milestones","photo.asp","_self");
	photoMenuGrp[0].children[0].relatives = new Array("photo02","photo03","photo04","photo05","photo06","photo07","photo08","photo09","photo10","photo11","photo12","photo13","photo14","photo15","photo16");
	photoMenuGrp[0].children[1] = new MenuItem("gallery","Rental Estates","gallery.asp","_self");
	photoMenuGrp[0].children[1].children = new Array();
	photoMenuGrp[0].children[1].children[0] = new MenuItem("gallery","Ming Wah Dai Ha","gallery.asp","_self");
	photoMenuGrp[0].children[1].children[1] = new MenuItem("gallery02","Yue Kwong Chuen","gallery02.asp","_self");
	photoMenuGrp[0].children[1].children[2] = new MenuItem("gallery03","Moon Lok Dai Ha","gallery03.asp","_self");
	photoMenuGrp[0].children[1].children[3] = new MenuItem("gallery04","Chun Seen Mei Chuen","gallery04.asp","_self");
	photoMenuGrp[0].children[1].children[4] = new MenuItem("gallery05","Healthy Village","gallery05.asp","_self");
	photoMenuGrp[0].children[1].children[5] = new MenuItem("gallery06","Kwun Tong Garden Estate","gallery06.asp","_self");
	photoMenuGrp[0].children[1].children[6] = new MenuItem("gallery07","Kwun Lung Lau","gallery07.asp","_self");
	photoMenuGrp[0].children[1].children[7] = new MenuItem("gallery08","Lok Man Sun Chuen","gallery08.asp","_self");
	photoMenuGrp[0].children[1].children[8] = new MenuItem("gallery09","Lai Tak Tsuen","gallery09.asp","_self");
	photoMenuGrp[0].children[1].children[9] = new MenuItem("gallery10","Cho Yiu Chuen","gallery10.asp","_self");
	photoMenuGrp[0].children[1].children[10] = new MenuItem("gallery11","Jat Min Chuen","gallery11.asp","_self");
	photoMenuGrp[0].children[1].children[11] = new MenuItem("gallery12","Ka Wai Chuen","gallery12.asp","_self");
	photoMenuGrp[0].children[1].children[12] = new MenuItem("gallery13","Clague Garden Estate","gallery13.asp","_self");
	photoMenuGrp[0].children[1].children[13] = new MenuItem("gallery14","Broadview Garden","gallery14.asp","_self");
	photoMenuGrp[0].children[1].children[14] = new MenuItem("gallery15","Prosperous Garden","gallery15.asp","_self");
	photoMenuGrp[0].children[1].children[15] = new MenuItem("gallery16","Bo Shek Mansion","gallery16.asp","_self");
	photoMenuGrp[0].children[1].children[16] = new MenuItem("gallery17","Verbena Heights","gallery17.asp","_self");
	photoMenuGrp[0].children[1].children[17] = new MenuItem("gallery18","Sha Tau Kok Chuen","gallery18.asp","_self");
	photoMenuGrp[0].children[1].children[18] = new MenuItem("gallery19","Lakeside Garden","gallery19.asp","_self");
	photoMenuGrp[0].children[1].children[19] = new MenuItem("gallery20","Tui Min Hoi Chuen","gallery20.asp","_self");


function callmenu(){

/**
The order of items under Statistics would be rearranged:

1.      Estates/ Projects Mngaged

2.      Estimated Population of…

3.      Estates/ Projects Completed

4.      Existing Developments Completed (new)

5.      Flat Production Forecast

6.      Annual Flat Production

7.      Five Years…
-----------------------------------------
 Estate / Proj completed  - index.asp (est_proj_complete)
 Estate / proj manage - est_proj_manage
 Estate Population - population
 Flat Production Forecast - flat
 annual flat finanical - annual
 


*/
	
	document.write("<table width=\"20%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr>");
	document.write("<td><img src=\"images/blank.gif\" width=\"200\" height=\"27\"></td>");
	document.write("</tr>");
	
	document.write(ListMenuCode(statMenuGrp,"2_",0,true));
	

	if ((filename() == "housing") || (filename() == "corporate") || (filename() == "annualr") || (filename() == "envrep") || (filename() == "elderlybook") || (filename() == "issue6_1") || (filename() == "issue6_2") || (filename() == "issue6_3") || (filename() == "issue6_4") || (filename() == "issue6_5") || (filename() == "issue6_6") || (filename() == "issue6_7") || (filename() == "issue6_8") || (filename() == "issue6_9") || (filename() == "issue6_10") || (filename() == "issue6_11") || (filename() == "issue6_12")){
		document.write("<tr>");
		document.write("<td><a href=\"housing.asp\"><img name=\"Image60\" border=\"0\" src=\"images/nav_03_hl.jpg\" width=\"200\" height=\"18\" alt=\"Publications\"></a></td>");
		document.write("</tr>");
		if ((filename() == "housing") || (filename() == "issue6_1") || (filename() == "issue6_2") || (filename() == "issue6_3") || (filename() == "issue6_4") || (filename() == "issue6_5") || (filename() == "issue6_6") || (filename() == "issue6_7") || (filename() == "issue6_8") || (filename() == "issue6_9") || (filename() == "issue6_10") || (filename() == "issue6_11") || (filename() == "issue6_12")){
		document.write("<tr>");
    		document.write("<td><a href=\"housing.asp\"><img name=\"Image61\" border=\"0\" src=\"images/nav_03a_ro.jpg\" width=\"200\" height=\"16\" alt=\"Housing Society Today\"></a></td>");
  		document.write("</tr>");
  		}else{
  		document.write("<tr>");
    		document.write("<td><a href=\"housing.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image61','','images/nav_03a_ro.jpg',1);MM_displayStatusMsg('Housing Society Today');return document.MM_returnValue\"><img name=\"Image61\" border=\"0\" src=\"images/nav_03a.jpg\" width=\"200\" height=\"16\" alt=\"Housing Society Today\"></a></td>");
  		document.write("</tr>");
  	        }
  	        if (filename() == "corporate"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"corporate.asp\"><img name=\"Image62\" border=\"0\" src=\"images/nav_03b_ro.jpg\" width=\"200\" height=\"17\" alt=\"Corporate Brochure\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"corporate.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image62','','images/nav_03b_ro.jpg',1);MM_displayStatusMsg('Corporate Brochure');return document.MM_returnValue\"><img name=\"Image62\" border=\"0\" src=\"images/nav_03b.jpg\" width=\"200\" height=\"17\" alt=\"Corporate Brochure\"></a></td>");
   		document.write("</tr>");
   		}
   		if (filename() == "annualr"){
    		document.write("<tr>");
    		document.write("<td><a href=\"annualr.asp\"><img name=\"Image63\" border=\"0\" src=\"images/nav_03c_ro.jpg\" width=\"200\" height=\"18\" alt=\"Annual Report\"></a></td>");
  		document.write("</tr>");
  		}else{
  	        document.write("<tr>");
    		document.write("<td><a href=\"annualr.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image63','','images/nav_03c_ro.jpg',1);MM_displayStatusMsg('Annual Report');return document.MM_returnValue\"><img name=\"Image63\" border=\"0\" src=\"images/nav_03c.jpg\" width=\"200\" height=\"18\" alt=\"Annual Report\"></a></td>");
  		document.write("</tr>");
		}
   		if (filename() == "envrep"){
    		document.write("<tr>");
    		document.write("<td><a href=\"envrep.asp\"><img name=\"Image64d\" border=\"0\" src=\"images/nav_03d_ro.jpg\" width=\"200\" height=\"19\" alt=\"Environmental Report\"></a></td>");
  		document.write("</tr>");
  		}else{
  	        document.write("<tr>");
    		document.write("<td><a href=\"envrep.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image64d','','images/nav_03d_ro.jpg',1);MM_displayStatusMsg('Environmental Report');return document.MM_returnValue\"><img name=\"Image64d\" border=\"0\" src=\"images/nav_03d.jpg\" width=\"200\" height=\"19\" alt=\"Environmental Report\"></a></td>");
  		document.write("</tr>");
		}
		if (filename() == "elderlybook"){
    		document.write("<tr>");
    		document.write("<td><a href=\"elderlybook.asp\"><img name=\"Image64e\" border=\"0\" src=\"images/nav_03ee_ro.jpg\" width=\"200\" height=\"19\" alt=\"Elderly Book\"></a></td>");
  		document.write("</tr>");
  		}else{
  	        document.write("<tr>");
    		document.write("<td><a href=\"elderlybook.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image64e','','images/nav_03ee_ro.jpg',1);MM_displayStatusMsg('Elderly Book');return document.MM_returnValue\"><img name=\"Image64e\" border=\"0\" src=\"images/nav_03ee.jpg\" width=\"200\" height=\"19\" alt=\"Elderly Book\"></a></td>");
  		document.write("</tr>");
		}
		


  	}else{
		document.write("<tr>");
		document.write("<td><a href=\"housing.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image60','','images/nav_03_ro.jpg',1);MM_displayStatusMsg('Publications');return document.MM_returnValue\"><img name=\"Image60\" border=\"0\" src=\"images/nav_03.jpg\" width=\"200\" height=\"18\" alt=\"Publications\"></a></td>");
		document.write("</tr>");
		spacer();
	}

// ---------------------------------------------------------------------------------------------
// Video
// ---------------------------------------------------------------------------------------------

	if (filename() == "video"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"video.asp\"><img name=\"Image80\" border=\"0\" src=\"images/nav_10_ro.gif\" alt=\"Video/Audio\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"video.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg('Video/Audio');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image80','','images/nav_10_ro.gif',1);MM_displayStatusMsg('Video/Audio');return document.MM_returnValue\"><img name=\"Image80\" border=\"0\" src=\"images/nav_10.gif\" alt=\"Video/Audio\"></a></td>");
   		document.write("</tr>");
   		}
		
// ---------------------------------------------------------------------------------------------
// form
// ---------------------------------------------------------------------------------------------

	if (filename() == "form"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"form.asp\"><img name=\"Image70\" border=\"0\" src=\"images/nav_11_ro.gif\" alt=\"Form\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"form.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg('Form');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image70','','images/nav_11_ro.gif',1);MM_displayStatusMsg('Form');return document.MM_returnValue\"><img name=\"Image70\" border=\"0\" src=\"images/nav_11.gif\" alt=\"Form\"></a></td>");
   		document.write("</tr>");
   		}



// ---------------------------------------------------------------------------------------------
// Comprehensive study on the Housing Needs of the Elderly in Hong Kong (Executive Summary)
// ---------------------------------------------------------------------------------------------



	if (filename() == "elderly_housing"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"elderly_housing.asp\"><img name=\"Image67\" border=\"0\" src=\"images/nav_06_ro.jpg\" alt=\"Comprehensive Study on the Housing Needs of the Elderly in Hong Kong (Executive Summary)\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"elderly_housing.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg('Comprehensive Study on the Housing Needs of the Elderly in Hong Kong (Executive Summary)');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image67','','images/nav_06_ro.jpg',1);MM_displayStatusMsg('Comprehensive Study on the Housing Needs of the Elderly in Hong Kong (Executive Summary)');return document.MM_returnValue\"><img name=\"Image67\" border=\"0\" src=\"images/nav_06.jpg\" alt=\"Comprehensive Study on the Housing Needs of the Elderly in Hong Kong (Executive Summary)\"></a></td>");
   		document.write("</tr>");
   		}








// -------------------------------
// UDG
// -------------------------------



	if (filename() == "udg"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"udg.asp\"><img name=\"Image68\" border=\"0\" src=\"images/nav_07_ro.jpg\" alt=\"Universal Design Guidebook For Residential Development in Hong Kong\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"udg.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image68','','images/nav_07_ro.jpg',1);MM_displayStatusMsg('Universal Design Guidebook For Residential Development in Hong Kong');return document.MM_returnValue\"><img name=\"Image68\" border=\"0\" src=\"images/nav_07.jpg\" alt=\"Universal Design Guidebook For Residential Development in Hong Kong\"></a></td>");
   		document.write("</tr>");
   		}




// -------------------------------
// GUIDEBOOK
// -------------------------------



	if (filename() == "guidebook"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"guidebook.asp\"><img name=\"guidebook\" border=\"0\" src=\"images/nav_08_ro.jpg\" alt=\"Building Management Guidebook\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"guidebook.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('guidebook','','images/nav_08_ro.jpg',1);MM_displayStatusMsg('Building Management Guidebook');return document.MM_returnValue\"><img name=\"guidebook\" border=\"0\" src=\"images/nav_08.jpg\" alt=\"Building Management Guidebook\"></a></td>");
   		document.write("</tr>");
   		}






// -------------------------------
// QFP
// -------------------------------



	if (filename() == "qfp" || filename() == "qfp_list"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"qfp.asp\"><img name=\"Image66\" border=\"0\" src=\"images/nav_05_ro.jpg\" alt=\"Quality Field Practices\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"qfp.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image66','','images/nav_05_ro.jpg',1);MM_displayStatusMsg('Quality Field Practices');return document.MM_returnValue\"><img name=\"Image66\" border=\"0\" src=\"images/nav_05.jpg\" alt=\"Quality Field Practices\"></a></td>");
   		document.write("</tr>");
   		}


// ---------------------------------------------------------------------------------------------
// Liberal Study Teaching Kit for Senior Secondary Schools  高中通識科教材套
// ---------------------------------------------------------------------------------------------


	if (filename() == "liberal_study"){
  	        document.write("<tr>");
    		document.write("<td><a href=\"liberal_study.asp\"><img name=\"Image09\" border=\"0\" src=\"images/nav_09_ro.gif\" alt=\"Liberal Study Teaching Kit for Senior Secondary Schools\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"liberal_study.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg('Liberal Study Teaching Kit for Senior Secondary Schools');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image09','','images/nav_09_ro.gif',1);MM_displayStatusMsg('Liberal Study Teaching Kit for Senior Secondary Schools');return document.MM_returnValue\"><img name=\"Image09\" border=\"0\" src=\"images/nav_09.gif\" alt=\"Liberal Study Teaching Kit for Senior Secondary Schools\"></a></td>");
   		document.write("</tr>");
   		}

	/*if ((filename() == "photo")||(filename() == "photo01")||(filename() == "photo02")||(filename() == "photo03")||(filename() == "photo04")||(filename() == "photo05")||(filename() == "photo06")||(filename() == "photo07")||(filename() == "photo08")||(filename() == "photo09")||(filename() == "photo10")||(filename() == "photo11")||(filename() == "photo12")||(filename() == "photo13")||(filename() == "photo14")||(filename() == "photo15")||(filename() == "photo16")){
  	        document.write("<tr>");
    		document.write("<td><a href=\"photo.asp\"><img name=\"Image64\" border=\"0\" src=\"images/nav_04_ro.jpg\" width=\"200\" height=\"21\" alt=\"Photo Gallery\"></a></td>");
   		document.write("</tr>");
   	        }else{
   	        document.write("<tr>");
    		document.write("<td><a href=\"photo.asp\" onMouseOut=\"MM_swapImgRestore();MM_displayStatusMsg(' ');return document.MM_returnValue\" onMouseOver=\"MM_swapImage('Image64','','images/nav_04_ro.jpg',1);MM_displayStatusMsg('Photo Gallery');return document.MM_returnValue\"><img name=\"Image64\" border=\"0\" src=\"images/nav_04.jpg\" width=\"200\" height=\"21\" alt=\"Photo Gallery\"></a></td>");
   		document.write("</tr>");
   		}*/
		document.write(ListMenuCode(photoMenuGrp,"4_",0,true));

	document.write("</table>");


}


// Dreamweaver

function MM_swapImgRestore() { //v3.0
  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_preloadImages() { //v3.0
  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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  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 MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function lang(version){
	link = location.href;
	english = "/eng/";
	chinese = "/chi/";
	
	//setting for no chinese
	if (version == "nchi"){
		parent.location.href= "";
	}

	//setting for no english
	if (version == "neng"){
		parent.location.href="";
	}
	
	
	if (version == "en"){
		link = link.replace (chinese, english);
		parent.location.href = link;
	}else if (version == "ch"){
		link = link.replace (english, chinese);
		parent.location.href = link;
	}
}
