function init(){
	setTopLayerPosition(true);
	if(printPage){
		window.print();
	}
	onresize=setTopLayerPosition;
}

function getMenuPath(ID, sub_ID, showlink){
	var strText;
	
	if(showlink)
		strText = "<a href='"+menuObj[selectedId].url+"' class='path_link'>"+getCaption('menuObj', ID)+"</a>"
	else
		strText = getCaption('menuObj', ID)
	
	return strText;
}

function getSubMenuPath(ID, sub_ID, showlink){
	var strText;
	var langText;
	
	if(langID==1)
		langText=".caption";
	else if(langID==2)
		langText=".chiCaption";
	else if(langID==3)
		langText=".schiCaption";
	for(var i=1;i<y;i++){
		if (subMenuObj[i])
		{
			if (subMenuObj[i].menuID==ID){
				if (subMenuObj[i].id == sub_ID){
					if(showlink)
						strText = "<a href='"+subMenuObj[i].url+"'"+subMenuObj[i].popup+" class='path_link'>"+eval('subMenuObj[i]'+langText)+"</a>";
					else
						strText = eval('subMenuObj[i]'+langText);
				}
			}
		}
	}

	return strText;
}

function getCaption(menu, i){
	var showAlt;
	
	if(langID==1)
		eval('showAlt='+menu+'['+i+'].caption');
	else if(langID==2)
		eval('showAlt='+menu+'['+i+'].chiCaption');
	else
		eval('showAlt='+menu+'['+i+'].schiCaption');
	return showAlt;
}

//function for Draw Print Button
function genPrintButton(){

	if(langID==1){ var altText='Print'; }else{ var altText=''; }

	document.writeln('<p><table border=0 cellspacing=0 cellpadding=0 width=100%>');
	if(!isText){
		document.writeln('<tr valign=top><td align=right><a href="javascript:PrintDocument();"><img src="'+imagePath+'images/but_print.gif" border=0 align=top alt="'+altText+'"></a></td></tr>');
	}else{
		document.writeln('<tr valign=top><td align=right><a href="javascript:PrintDocument();">'+altText+'</a></td></tr>');
	}
	document.writeln('');
	document.writeln('</table>');
}

function getAcrobat(){
	if(langID==1)
	{
		var StrText='This document is stored in Portable Document Format (.pdf). Adobe Acrobat Reader 5.0 or above is required to navigate this document. Click the following icon to download Adobe Acrobat Reader latest version:';
		var StrImgLink='http://www.adobe.com/products/acrobat/readstep2.html'
	}
	else if(langID==2)
	{
		StrText='セ ゅ ン 琌  Portable Document File  Α 纗   惠   杆 Adobe Acrobat Reader 5.0 ┪    セ   弄   叫   瓜   更 Adobe Acrobat Reader ';
		StrImgLink='http://www.chinese-t.adobe.com/products/acrobat/readstep2.html';
	}
	else if(langID==3)
	{
		StrText='本 文 件 是 以 Portable Document File 格 式 储 存 ， 需 先 安 装 Adobe Acrobat Reader 5.0 或 以 上 版 本 才 可 读 取 ， 请 按 下 图 以 下 载 Adobe Acrobat Reader ：';
		StrImgLink='http://www.chinese-t.adobe.com/products/acrobat/readstep2.html';
	}

	var StrImg='<img src="'+locationPath+'/images/get_adobe_reader.gif" border=0 align=top>';
		
	document.writeln('<p>'+StrText+'<br><br><a href="'+StrImgLink+'" target="_blank">'+StrImg+'</a></p>');
}

function getRealPlayer(){
	var StrText='You can use RealPlayer to view the videos in Real Media format. RealPlayer is available free at <a class="text_link" href="javascript:externalLink(\'http://www.real.com/\');">www.real.com</a>.';
	if(langID==2) StrText='祏斗ㄏノRealPlayer芠, 硁ン<a class="text_link" href="javascript:externalLink(\'http://www.real.com/\');">www.real.com</a>禣更:';
	var StrImg='<img src="'+locationPath+'/images/realplayer.gif" border=0 align=top alt="RealPlayer">';
		
	document.writeln('<p><table border=0 cellspacing=0 cellpadding=2 width=585><tr valign=top>');
	if(!isText)
		document.writeln('<td width=1%><a href="javascript:externalLink(\'http://www.real.com/\');">'+StrImg+'</a></td>');
	document.writeln('<td width=99%>'+StrText+'</td>');
	document.writeln('</tr></table>');
}

function addMenu(sectionID, caption, chiCaption, schiCaption, url, picNo, hasChild, sitemap, navigationMenu)
{
	var tempCaption = new Array();
	tempCaption=caption.split(",")
//	var x=menuObj.length;
	menuObj[x]	= new Object();
	menuObj[x].id = sectionID;
//	menuObj[x].caption = tempCaption[langID-1];
	menuObj[x].caption = caption;
	menuObj[x].chiCaption = chiCaption;
	menuObj[x].schiCaption = schiCaption;
	if(url.search('http://')!=-1){
		menuObj[x].url = url;
		menuObj[x].popup = ' target="_blank"'
	}else{
		menuObj[x].url = locationPath+langPath+url;
		menuObj[x].popup = ''
	}
//	menuObj[x].url = locationPath+langPath+url;
	menuObj[x].picNo = menuImageName+picNo;
	menuObj[x].picPath = imagePath+menuImagePath+menuObj[x].picNo+menuImageType;
	menuObj[x].hasChild = hasChild;
	menuObj[x].sitemap = sitemap;
	menuObj[x].navigationMenu = navigationMenu;
	x++;
}

function addSubMenu(menuID, subSectionID, caption, chiCaption, schiCaption, url, picNo, hasChild, sitemap, navigationMenu)
{
	var tempCaption = new Array();
	tempCaption=caption.split(",")
//	var y=subMenuObj.length;
	subMenuObj[y] = new Object();
	subMenuObj[y].menuID = menuID;
	subMenuObj[y].id = subSectionID;
//	subMenuObj[y].caption = tempCaption[langID-1];
	subMenuObj[y].caption = caption;
	subMenuObj[y].chiCaption = chiCaption;
	subMenuObj[y].schiCaption = schiCaption;
	if(url.search('.pdf')!=-1){
		subMenuObj[y].url = locationPath+langPath+url;
		subMenuObj[y].popup = ' target="_blank"'
	}
	else{
		subMenuObj[y].url = locationPath+langPath+url;
		subMenuObj[y].popup = ''
	}
	subMenuObj[y].picNo = subMenuImageName+picNo;
	subMenuObj[y].picPath = imagePath+menuImagePath+subMenuObj[y].picNo+menuImageType;
	subMenuObj[y].hasChild = hasChild;
	subMenuObj[y].sitemap = sitemap;
	subMenuObj[y].navigationMenu = navigationMenu;
	y++;
}

//function for generating the top menu
function getTopMenu(){
	
	document.writeln('<table border=0 cellpadding=0 cellspacing=0 width="775">');
	document.writeln('<tr valign=top>');
	document.writeln('	<td>');
	document.writeln('		<table border=0 cellpadding=0 cellspacing=0>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td><img src="'+imagePath+menuImagePath+'logo_left.gif" border="0"></td>');
	document.writeln('			<td colspan=2><a href="'+locationPath+langPath+'index.htm"><img src="'+imagePath+menuImagePath+'logo.gif" border="0"></a></td>');
	document.writeln('		</tr>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td><img src="'+imagePath+menuImagePath+'hd_left.gif" border="0"></td>');
}

function getTopic(){
	var pic="";
	var swfName="";
//	var caption="";
	var showPath;
//	if(exLink!=null)
//		showPath = exLink;
	var checkList = new Array()
		checkList[0] = "selectedSubId"
		checkList[1] = "selectedId"
	var functionList = new Array()
		functionList[0] ="getSubMenuPath" 
		functionList[1] ="getMenuPath" 
	
	for (var i in checkList){
		if(eval(checkList[i]) > 0){
			if(showPath==null){
				showPath = eval(eval("functionList["+i+"]")+"("+selectedId+", "+selectedSubId+", false)");
			}else{
				showPath = eval(eval("functionList["+i+"]")+"("+selectedId+", "+selectedSubId+", true)") + " > " + showPath;
			}
		}
	}

//	showPath = " > " + showPath;

	for(var i in menuObj){
		if (selectedId==menuObj[i].id){
			if (selectedId<10)
				swfName = "s0" + menuObj[i].id;
			else
				swfName = "s" + menuObj[i].id;
//			caption=menuObj[i].caption
		}
	}

	if(location.href.toString().search('/disclaimer/')!=-1){
		swfName = "disclaimer";
	}
	else if(location.href.toString().search('/sitemap/')!=-1){
		swfName = "sitemap";
	}
	
	if(selectedSubId>0){
		for(var i in subMenuObj){
			if(subMenuObj[i].menuID==selectedId){
				if (selectedSubId==subMenuObj[i].id){
					pic = subMenuObj[i].picPath.replace(subMenuImageName, topicImageName);
//					caption+=" > "+subMenuObj[i].caption
				}
			}
		}
	}

	document.writeln('			<td colspan=2><table border=0 cellpadding=0 cellspacing=0><tr><td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="576" height="80"><param name=movie value="'+imagePath+menuImagePath+'banner_'+swfName+'.swf"><param name=quality value=high><embed src="'+imagePath+menuImagePath+'banner_'+swfName+'.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="576" height="80"></embed></object></td><td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="1" height="1"></td></tr></table></td>');
	document.writeln('		</tr>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td colspan=3><img src="'+imagePath+menuImagePath+'hd_bottom.gif" border="0"></td>');
	document.writeln('		</tr>');
	if(selectedSubId>0){
		document.writeln('		<tr valign=top>');
		document.writeln('			<td colspan=3><img src="'+pic+'" border="0"></td>');
		document.writeln('		</tr>');
	}
	document.writeln('		<tr valign=top>');
//	document.writeln('			<td colspan=3><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="1" height="10"></td>');
	document.writeln('			<td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="21" height="10"></td>');
	document.writeln('			<td colspan=2><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="1" height="10"></td>');
	document.writeln('		</tr>');
if((eval(checkList[0]) > 0) && (eval(checkList[1]) > 0))
{
	document.writeln('		<tr valign=top>');
	document.writeln('			<td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="21" height="10"></td>');
	document.writeln('			<td colspan=2>'+showPath+'</td>');
	document.writeln('		</tr>');
}
	document.writeln('		<tr valign=top>');
	document.writeln('			<td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="21" height="10"></td>');
	document.writeln('			<td colspan=2><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="1" height="10"></td>');
	document.writeln('		</tr>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="21" height="1"></td>');
	document.writeln('			<td width=567>');
}

function getTopBotton(){
	document.writeln('<table border=0 cellpadding=0 cellspacing=0 width="100%" valign="bottom"><tr>');
	document.writeln('<td width="100%">&nbsp;</td>');
	if(backButton=='Y')
	{
		document.writeln('<td align="right"><a href="javascript:history.go(-1);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_'+arTopMenu[langID][10]+'\',\'\',\''+imagePath+menuImagePath+'btn_'+arTopMenu[langID][10]+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_'+arTopMenu[langID][10]+'.gif" name="btn_'+arTopMenu[langID][10]+'" border="0"></a></td>');
	}
	document.writeln('<td align="right"><a href="#top" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_'+arTopMenu[langID][9]+'\',\'\',\''+imagePath+menuImagePath+'btn_'+arTopMenu[langID][9]+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_'+arTopMenu[langID][9]+'.gif" name="btn_'+arTopMenu[langID][9]+'" border="0"></a></td></tr></table>');
}

function getRightMenu(){

	document.writeln('			</td>');
	document.writeln('			<td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="10" height="1"></td>');
	document.writeln('		</tr>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td colspan=3><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="1" height="10"></td>');
	document.writeln('		</tr>');
	document.writeln('		</table>');
	document.writeln('	</td>');
	document.writeln(' 	<td rowspan="2" background="'+imagePath+menuImagePath+'right_nav_btn_bg.gif">');
	document.writeln('		<!-- Right Menu -->');
	document.writeln('		<table border=0 cellpadding=0 cellspacing=0>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td colspan=2>');
	document.writeln('				<table border=0 cellpadding=0 cellspacing=0 bgcolor="#CECFCE">');
	document.writeln('				<tr valign=top>');
	document.writeln('					<td bgcolor="#CECFCE"><a href="'+langPath+'index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_'+arTopMenu[langID][8]+'\',\'\',\''+imagePath+menuImagePath+'btn_'+arTopMenu[langID][8]+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_'+arTopMenu[langID][8]+'.gif" name="btn_'+arTopMenu[langID][8]+'" border="0"></a></td>');
	document.writeln('					<td align="center"><a href="javascript:changeLanguage(\''+arTopMenu[langID][4]+'\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_'+arTopMenu[langID][6]+'\',\'\',\''+imagePath+menuImagePath+'btn_'+arTopMenu[langID][6]+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_'+arTopMenu[langID][6]+'.gif" name="btn_'+arTopMenu[langID][6]+'" border="0"></a></td>');
	document.writeln('					<td><a href="javascript:changeLanguage(\''+arTopMenu[langID][5]+'\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_'+arTopMenu[langID][7]+'\',\'\',\''+imagePath+menuImagePath+'btn_'+arTopMenu[langID][7]+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_'+arTopMenu[langID][7]+'.gif" name="btn_'+arTopMenu[langID][7]+'" border="0"></a></td>');
//	document.writeln('					<td><a href="javascript:changeLanguage(\''+arTopMenu[langID][5]+'\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_'+arTopMenu[langID][7]+'\',\'\',\''+imagePath+menuImagePath+'btn_'+arTopMenu[langID][7]+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_'+arTopMenu[langID][7]+'.gif" name="btn_'+arTopMenu[langID][7]+'" alt="Coming Soon" border="0"></a></td>');
	document.writeln('					<td rowspan=3><img src="'+imagePath+menuImagePath+'btn_language_right.gif" border="0"></td>');
	document.writeln('				</tr>');
	document.writeln('				<tr valign=top>');
	document.writeln('					<td rowspan=2><img src="'+imagePath+menuImagePath+'logo_right.gif" border="0"></td>');
	document.writeln('					<td><img src="'+imagePath+menuImagePath+'logo_right01.gif" border="0"></td>');
	document.writeln('					<td><img src="'+imagePath+menuImagePath+'logo_right02.gif" border="0"></td>');
	document.writeln('				</tr>');
	document.writeln('				<tr valign=top>');
	document.writeln('					<td colspan=2><img src="'+imagePath+menuImagePath+'logo_right03.gif" border="0"></td>');
	document.writeln('				</tr>');
	document.writeln('				</table>');
	document.writeln('			</td>');
	document.writeln('		</tr>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td rowspan=2>');
	document.writeln('				<table border=0 cellpadding=0 cellspacing=0>');
	document.writeln('				<tr valign=top>');
	document.writeln('					<td>');
	document.writeln('						<table border=0 cellpadding=0 cellspacing=0>');

	for(var i in menuObj){
		if(menuObj[i]){
			if(menuObj[i].navigationMenu){
				if (selectedId==menuObj[i].id){
					var pic = menuObj[i].picPath.replace(menuImageType, menuImageOver+menuImageType);
					var outAction = "";
					var overAction = "";
				}else{
					var pic = menuObj[i].picPath;
					var outAction = " onMouseOut=\"outLeftMenu('"+menuObj[i].picNo+"');\"";
					var overAction = " onMouseOver=\"overLeftMenu('"+menuObj[i].picNo+"');\" ";
				}
				document.writeln("<tr valign=top><td><a href='"+menuObj[i].url+"'"+ outAction + overAction + menuObj[i].popup +"><img name='"+menuObj[i].picNo+"' id='"+menuObj[i].picNo+"' src='" + pic + "' border=0></a></td></tr>");

			}
			if (selectedId==menuObj[i].id && selectedSubId>=0){
				for(var i in subMenuObj){
					if(subMenuObj[i]){
						if(subMenuObj[i].menuID==selectedId){
							if (selectedSubId==subMenuObj[i].id){
								var pic = subMenuObj[i].picPath.replace(menuImageType, menuImageOver+menuImageType);
								var outAction = "";
								var overAction = "";
							}else{
								var pic = subMenuObj[i].picPath;
								var outAction = " onMouseOut=\"outLeftMenu('"+subMenuObj[i].picNo+"');\"";
								var overAction = " onMouseOver=\"overLeftMenu('"+subMenuObj[i].picNo+"');\" ";
							}
							document.writeln("<tr><td><a href='"+subMenuObj[i].url+"'"+ outAction + overAction + subMenuObj[i].popup +"><img name='"+subMenuObj[i].picNo+"' id='"+subMenuObj[i].picNo+"' src='" + pic +  "' border=0></a></td></tr>");
						}
					}
				}
				if (!(selectedId==4||selectedId==8||selectedId==9))
				{
					document.writeln('	<tr valign=top>');
					document.writeln('		<td><img src="'+imagePath+menuImagePath+'right_sub_nav_btn.gif" border="0"></td>');
					document.writeln('	</tr>');
				}
			}
			document.writeln('	<tr valign=top>');
			document.writeln('		<td><img src="'+imagePath+menuImagePath+'right_nav_btn.gif" border="0"></td>');
			document.writeln('	</tr>');
		}
	}
	
	document.writeln('						</table>');
	document.writeln('					</td>');
	document.writeln('				</tr>');
	document.writeln('				</table>');
	document.writeln('			</td>');
	document.writeln('			<td background="'+imagePath+menuImagePath+'spacer.gif"><img src="'+imagePath+menuImagePath+'nav_btn_right.gif" border="0"></td>');
	document.writeln('		</tr>');
	document.writeln('		<tr valign=top>');
	document.writeln('			<td background="'+imagePath+menuImagePath+'spacer.gif"><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="18" height="1"></td>');
	document.writeln('		</tr>');
	document.writeln('		</table>');
	document.writeln('		<!-- End of Right Menu -->');
	document.writeln('	</td>');
	document.writeln('</tr>');
	document.writeln('<tr>');
	document.writeln('	<td><script>getTopBotton()</script></td>');
	document.writeln('</tr>');
}

//function for setting the top button
function setTopLayerPosition(resizeFlag){
	if(topButton=='Y'){
		if (document.all && document.all["footer_layer"]!=null)
		{
	//		footerY = getDim(document.images.leftMenuLineBottom).y;
			moveTopDivs(document.all["footer_layer"].style, getDim(document.images.backtotopspacer).y, getDim(document.images.backtotopspacer).x)
			if (getDim(document.images.backtotopspacer).y > footerY)
			{
				if (resizeFlag)
				{document.all["footer_layer"].style.visibility = "visible"}
			}
		}
		if (document.layers && document.layers["footer_layer"])
		{
	//		footerY = document.images["leftMenuLineBottom"].y;
			moveTopDivs(document.layers["footer_layer"], document.images["backtotopspacer"].y, document.images["backtotopspacer"].x);
			if (document.images["backtotopspacer"].y > footerY)
			{
				if (resizeFlag)
				{document.layers["footer_layer"].visibility = "show"}
			}
		}
		if (!document.all && document.getElementById && document.getElementById("footer_layer")!=null)
		{
	//		footerY = document.images["leftMenuLineBottom"].y;
			moveTopDivs(document.getElementById("footer_layer").style, document.images["backtotopspacer"].y, document.images["backtotopspacer"].x);
			if (document.images["backtotopspacer"].y > footerY)
			{
				if (resizeFlag)
				{document.getElementById("footer_layer").style.visibility = "visible"}
			}
		}
	}
}

//function for generating the layer for top button
function genfooterLayer(){
	var altText='Top';
	
	if(langID!=1) altText='';

	if (document.layers)
		{document.writeln('<layer name=footer_layer top=0 left=0 width=26 height=26 visibility="hide">');}
	else
		{document.writeln('<div id="footer_layer" style="position:absolute; left:0; top:0; width:26; height:26; z-index:1; visibility: hidden"> ');}
	document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('<tr valign=top>');
	document.writeln('	<td><a href="#top"><img src="'+imagePath+menuImagePath+'btn_top.gif" alt="'+altText+'" border="0" name="backtotopfoot"></a></p></td>');
	document.writeln('</tr>');
	document.writeln('</table>');
	if (document.layers)
		{document.writeln('</layer>');}
	else
		{document.writeln('</div>');}			
}

//function for generating the footer
function getFooter(){
document.writeln('<!-- Footer -->');
document.writeln('<tr valign=top>');
document.writeln('	<td>');
document.writeln('		<table border=0 cellpadding=0 cellspacing=0>');
document.writeln('		<tr valign=top>');
document.writeln('			<td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="1" height="5"></td>');
document.writeln('		</tr>');
document.writeln('		<tr valign=top>');
document.writeln('			<td><img src="'+imagePath+menuImagePath+'bottom_line.gif" border="0"></td>');
document.writeln('		</tr>');
document.writeln('		<tr valign=bottom>');
//document.writeln('			<td width="598" height="46"><img src="'+imagePath+menuImagePath+'copyright.gif" border="0"></td>');
if(langID==1)
{
	document.writeln('			<td width="598" height="40" class="copyright">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&copy; 2011 KAM HING INTERNATIONAL HOLDINGS LIMITED. All Rights Reserved.</td>');
}
else if(langID==2)
{
	document.writeln('			<td width="598" height="40" class="copyright">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&copy; 2011 繟砍瓣悔北Τそ&nbsp;&nbsp;帝舦┮Τ</td>');
}
else
{
	document.writeln('			<td width="598" height="40" class="copyright">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&copy; 2011 锦兴国际控股有限公司&nbsp;&nbsp;著作权所有</td>');
}
document.writeln('		</tr>');
document.writeln('		<tr valign=top>');
document.writeln('			<td><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="1" height="6"></td>');
document.writeln('		</tr>');
document.writeln('		</table>');
document.writeln('	</td>');
document.writeln('	<td>');
document.writeln('		<table border=0 cellpadding=0 cellspacing=0>');
document.writeln('		<tr valign=top>');
document.writeln('			<td colspan=3><img src="'+imagePath+menuImagePath+'nav_btn_bottom_01.gif" border="0"></td>');
document.writeln('			<td rowspan=3><img src="'+imagePath+menuImagePath+'spacer.gif" border="0" width="3" height="1"></td>');
document.writeln('		</tr>');
document.writeln('		<tr valign=top>');
document.writeln('			<td colspan=3><img src="'+imagePath+menuImagePath+'nav_btn_bottom_02.gif" border="0"></td>');
document.writeln('		</tr>');
document.writeln('		<tr valign=top>');
document.writeln('			<td><img src="'+imagePath+menuImagePath+'nav_btn_bottom_03.gif" border="0"></td>');
document.writeln('			<td><a href="'+langPath+'sitemap/index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_sitemap\',\'\',\''+imagePath+menuImagePath+'btn_sitemap'+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_sitemap.gif" name="btn_sitemap" border="0"></a></td>');
document.writeln('			<td><a href="'+langPath+'disclaimer/index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_disclaimer\',\'\',\''+imagePath+menuImagePath+'btn_disclaimer'+menuImageOver+'.gif\',1)"><img src="'+imagePath+menuImagePath+'btn_disclaimer.gif" name="btn_disclaimer" border="0"></a></td>');
document.writeln('		</tr>');
document.writeln('		</table>');
document.writeln('	</td>');
document.writeln('</tr>');
document.writeln('<!-- End of Footer -->');
document.writeln('</table>');
}

function getSiteMap(){
	var bulletPath1;
	var bulletPath2;

	bulletPath1='<img src="'+locationPath+'/images/bullet_1.gif" border=0>';
	bulletPath2='<img src="'+locationPath+'/images/bullet_2.gif" border=0>';

	document.writeln('<table border=0 cellspacing=0 cellpadding=3 width=100%>');
	for(var i=1;i<x;i++){
		if(menuObj[i]){
//			if(menuObj[i].sitemap=="Y"){
			if(menuObj[i].sitemap){
				document.write('<tr valign=top><td nowrap>'+bulletPath1+'&nbsp;</td><td width=100%><a href="'+menuObj[i].url+'"'+menuObj[i].popup+'>'+getCaption('menuObj', i)+'</a></td>');
//				document.write('	<li><a href="'+menuObj[i].url+'">'+getCaption('menuObj', i)+'</a>');
//				if(menuObj[i].hasChild=="Y"){
				if(menuObj[i].hasChild){
					document.writeln('	<tr valign=top><td nowrap>&nbsp;</td><td width=100%><table border=0 cellspacing=0 cellpaddding=3 width=100%>');
					for(var j=1;j<y;j++){
						if (subMenuObj[j].menuID==i)
							document.write('	<tr valign=top><td nowrap>'+bulletPath2+'&nbsp;</td><td width=100%><a href="'+subMenuObj[j].url+'" '+subMenuObj[j].popup+'>'+getCaption('subMenuObj', j)+'</a></td></tr>');
//							document.write('	<li><a href="'+subMenuObj[j].url+'">'+getCaption('subMenuObj', j)+'</a></li>');
					}
					document.writeln('	</table></td></tr>');
				}else{
				document.writeln('</tr>');
				}
			}
		}
	}
	document.writeln('</table>');
}

function getTemplateHead(){
	getTopMenu();
	getTopic();
}

function getTemplateFooter(){
	getRightMenu();
	getFooter();
}

function openwindow(address,id,title,w,h){
//if(isText) address="ht"+"tp://"+graphicPath+langPath;
var blnScrollResize = "no";
//h=h+40; //show the caption and close window button
//if (w>400){w=400;blnScrollResize="yes"}
//if (h>400){h=400;blnScrollResize="yes"}


window.open(address+"popuppic.htm?id=" + id,title,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+blnScrollResize+",resizable="+blnScrollResize+",pageXOffset=300,pageYOffset=500,top=80,left=150,width="+ w + ",height=" + h);
}


//function for displaying the image, caption and alt text
function getPopupData(){
sourceUrl = document.location.search;
sid = sourceUrl.substring(sourceUrl.indexOf('=')+1, sourceUrl.length);

switch(sid){

	case "1":
	m_pic="/images/ph_4_jersey.gif";
	break;

	case "2":
	m_pic="/images/ph_4_pique.gif";
	break;
	
	case "3":
	m_pic="/images/ph_4_rib.gif";
	break;
	
	case "4":
	m_pic="/images/ph_4_interlock.gif";
	break;

	case "5":
	m_pic="/images/ph_4_elastic_fabrics.gif";
	break;
	
	case "6":
	m_pic="/images/ph_4_fleece.gif";
	break;
	
	case "7":
	m_pic="/images/ph_4_terry.gif";
	break;
	
	case "8":
	m_pic="/images/ph_4_modal.gif";
	break;
	
	case "9":
	m_pic="/images/ph_4_lyocel.gif";
	break;
	
	case "10":
	m_pic="/images/ph_4_soya.gif";
	break;
	
	case "11":
	m_pic="/images/ph_4_bamboo.gif";
	break;
	
	case "12":
	m_pic="/images/ph_4_silk.gif";
	break;
	
	case "13":
	m_pic="/images/ph_4_yarn1.gif";
	break;
	
	case "14":
	m_pic="/images/ph_4_yarn2.gif";
	break;
	
	case "15":
	m_pic="/images/ph_4_yarn3.gif";
	break;
	
	case "16":
	m_pic="/images/ph_4_yarn4.gif";
	break;
	
	case "17":
	m_pic="/images/ph_4_garment1.gif";
	break;
	
	case "18":
	m_pic="/images/ph_4_garment2.gif";
	break;
	
	case "19":
	m_pic="/images/ph_4_garment3.gif";
	break;
	
	case "20":
	m_pic="/images/ph_4_garment4.gif";
	break;
	
	//case "21":
	//m_pic="/images/ph_4_cottonstretol.gif";
	//break;
	
	//case "22":
	//m_pic="/images/ph_4_ottoman.gif";
	//break;
	
	//case "23":
	//m_pic="/images/ph_4_stripe.gif";
	//break;
	
	//case "24":
	//m_pic="/images/ph_4_drop.gif";
	//break;
	
	//case "25":
	//m_pic="/images/ph_4_plated.gif";
	//break;
	
	//case "26":
	//m_pic="/images/ph_4_slub.gif";
	//break;
	
	//case "27":
	//m_pic="/images/ph_4_pima.gif";
	//break;
	
	//case "28":
	//m_pic="/images/ph_4_OE.gif";
	//break;
	
	//case "29":
	//m_pic="/images/ph_4_modal.gif";
	//break;
	
	//case "30":
	//m_pic="/images/ph_4_tencel.gif";
	//break;
	
	//case "31":
	//m_pic="/images/ph_4_cottonwool.gif";
	//break;
	
	//case "32":
	//m_pic="/images/ph_4_soy.gif";
	//break;	

	//case "33":
	//m_pic="/images/ph_4_ramie.gif";
	//break;
	
	//case "ph_4_wrinkle":
	//m_pic="/images/ph_4_wrinkle.gif";
	//break;
	
	//case "ph_4_cottonsilk":
	//m_pic="/images/ph_4_cottonsilk.gif";
	//break;
	
	//case "cert":
	//m_pic="/images/ph_5_4a_sc_pop.gif";
	//break;
	
	//case "certe":
	//m_pic="/images/ph_5_4a_en_pop.gif";
	//break;
	
	case "cert1":
	m_pic="/images/ISO9001-2008(CN)_pop.jpg";
	break;
	
	case "cert2":
	m_pic="/images/ISO14001(CN)_pop.jpg";
	break;
	
	case "certe1":
	m_pic="/images/ISO9001-2008(EN)_pop.jpg";
	break;
	
	case "certe2":
	m_pic="/images/ISO14001(EN)_pop.jpg";
	break;
	
	default:
	m_pic="";
	}
}
