function PopWin2(url,page,x,y,z){
	eval("nw = window.open(url, page,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,pageXOffset=0,pageYOffset=0,top=0,left=" + z + ",width=" + x + ",height=" + y + "')");
	if ( nw.focus != null)
	{nw.focus();}
}

function PopWin(url,page,x,y,z,fish){
	abc = '';
	content = '<title></title><body bgcolor="white"><table border="0" cellspacing="0" cellpadding="0" width="100%" height="560"><tr valign=middle align=center><td><center><a href="javascript:top.window.close();"><img src="' + url + '" border=0 alt="Close Image Window"></a></center></td></tr><tr><td align=center><font color="#3CA6DD">'+fish+'</font></td></tr></table></body></html>';
	eval("nw = window.open(abc, page,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,pageXOffset=0,pageYOffset=0,top=0,left=" + z + ",width=" + x + ",height=" + y + "')");
	nw.focus();
	nw.document.write(content);
	nw.document.close();
}


/*************************** MouseOver & MouseOut Function **************************************/
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.01
  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 && d.getElementById) x=d.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 over(imgname, filname){
	if (document.images)
		{imgname.src = filname;}
}

function out(imgname, filname){
	if (document.images)
		{imgname.src = filname;}
}
/*************************** MouseOver & MouseOut Function Finish **************************************/
/****************************** Common Variable Declaration Start ***************************************/
var Selected_ID;
var locationPath;
var graphicPath;
var langID;
var langPath;
var istext;
var important;
/****************************** Common Variable Declaration Finsih *************************************/
/****************************** Common Setting when Page Load Start **********************************/
//Set LangID
//alert ('start set langid');
if(document.URL.toString().search('/text/')!=-1 || location.search.toString().indexOf('lang=text')!=-1){
/*
	langPath = 'text/';
	langID=4;
*/
	istext=true;
	if(document.URL.toString().search('/text/tc/')!=-1 || location.search.toString().indexOf('lang=text')!=-1){
		langPath = 'text/tc/';
		langID=4;
	}else if(document.URL.toString().search('/text/en/')!=-1 || location.search.toString().indexOf('lang=text')!=-1){
		langPath = 'text/en/';
		langID=5;
	}else{
		langPath = 'text/sc/';
		langID=6;
	} 
//	alert(langID);

}else{
	istext=false;
	if(document.URL.toString().search('/en/')!=-1 || location.search.toString().indexOf('lang=en')!=-1){
		langPath = 'en/';
		langID=2;
	}else if(document.URL.toString().search('/tc/')!=-1 || location.search.toString().indexOf('lang=tc')!=-1){
		langPath = 'tc/';
		langID=1;
	}else{
		langPath = 'sc/';
		langID=3;
	}
}
//alert (istext);
//Set Location Path
/*
locationPath = getAbsPath();
graphicPath = locationPath + 'images/'+langPath;
alert (locationPath);

function getAbsPath() {
	var s_path = location.href.toString();
	var a_vp = s_path.split('/');
	if (a_vp.length > 3) s_path = a_vp[0] + '//' + a_vp[2] + '/' + a_vp[3] + '/';
	return s_path;
}*/

locationPath = getAbsPath();
//alert (locationPath);
if (document.URL.toString().search('westcom')!=-1){
	graphicPath = locationPath +langPath + 'images/';
} else {
//	graphicPath = locationPath  + 'images/';
	graphicPath = locationPath +langPath + 'images/';
}
//alert (locationPath);
//graphicPath = locationPath  + 'images/';
function getAbsPath() {
	var s_path = location.href.toString();
	var a_vp = s_path.split('/');
//alert (a_vp);
//	if (a_vp.length > 3) s_path = a_vp[0] + '//' + a_vp[2] + '/' ;
if (document.URL.toString().search('westcom')!=-1){
	if (a_vp.length > 3) s_path = a_vp[0] + '//' + a_vp[2] + '/' + a_vp[3] + '/';
} else {
	if (a_vp.length > 3) s_path = a_vp[0] + '//' + a_vp[2] + '/' ;
}
//	alert (a_vp[3]);
	return s_path;
}

var language;
var footer;
if ((langID == 1)||(langID == 4)) {
	language = '叫匡拒粂ē:';
	footer = '舦┮Τ ぃ眔锣更 &copy; 2005 寒笰礛臔瞶竝';
	textlanguage = 'ゅ';
	engversion = '璣ゅ';
	scversion = '虏砰いゅ';
	chiversion = '瓜钩';
	indexpage = '寒笰礛臔瞶竝纔借緄辰初璸购';
	important = '璶ボ';
	revdate = '璹ら戳20102る1ら';
} else if ((langID == 2)||(langID == 5)){
	language = 'Please select language:';
	footer = 'Copyright &copy; 2005 All Right Reserved.  AFCD';
	textlanguage = 'text only';
	chiversion = 'Traditional Chinese';
	scversion = 'Simplified Chinese';
	engversion = 'Graphic Version';
	indexpage ='AFCD Accredited Fish Farm Scheme';
	important = 'Important notices';
	revdate = 'Last revision date: 1 February 2010';
} else if ((langID == 3)||(langID == 6)){
	language = '请选择语言:'
	footer = '版权所有 不得转载 &copy; 2005 渔农自然护理署';
	textlanguage = '纯文字';
	engversion = '英文版';
	chiversion = '繁体中文版';
	scversion = '图像版';
	indexpage = '渔农自然护理署优质养鱼场计划';
	important = '重要告示';
	revdate = '修订日期：2010年2月1日';
} else {
	language = 'Please select language:';
	footer = 'Copy Right &copy; 2005';
	textlanguage = 'text only';
	chiversion = 'Traditional Chinese';
	scversion = 'Simplified Chinese';
	engversion = 'Graphic Version';
	indexpage ='AFCD Accredited Fish Farm Scheme';
	important = 'Important notices';
}
//alert (language);

/****************************** Common Setting when Page Load Finish ********************************/

function langSwitch(lang) {
	var goPath;
	var pagePath=document.location.pathname;
	var temptemp;
	temptemp=document.location.toString();
	if (langID ==1){
		temptemp=temptemp.indexOf('/tc');
	} else if (langID == 2){
		temptemp=temptemp.indexOf('/en');
	} else if (langID == 3){
		temptemp=temptemp.indexOf('/sc');
	} else if (langID == 4){
		temptemp=temptemp.indexOf('/text/tc');
	} else if (langID == 5){
		temptemp=temptemp.indexOf('/text/en');
	} else if (langID == 6){
		temptemp=temptemp.indexOf('/text/sc');
	} else {
		temptemp=temptemp.indexOf('/en');
		//alert('langswitchOther');
	}
	var tempPath=window.location;
	var tempLocationPath;
	tempPath = tempPath.toString();
	if (istext){
		txttempLocationPath = document.location.toString().substring(0, temptemp+6);
		//tempLocationPath=tempLocationPath+'text/';
		//alert ('tempLocationPath='+tempLocationPath);
	}
	tempLocationPath = document.location.toString().substring(0, temptemp+1);
	if (lang=='en') { //change to English version
		//goPath=tempLocationPath+'en/'+tempPath.substring(temptemp+4, tempPath.length);
		//goPath=tempLocationPath+'en/index.html';
		if (istext){
			if (langID==5){
				goPath=tempLocationPath+'en/'+tempPath.substring(temptemp+9, tempPath.length);
			}else{
				goPath=txttempLocationPath+'en/'+tempPath.substring(temptemp+9, tempPath.length);
			}
			//goPath=tempLocationPath+'tc/'+tempPath.substring(temptemp+9, tempPath.length);
			//goPath=txttempLocationPath+'en/index.html';
		}else{
			goPath=tempLocationPath+'en/'+tempPath.substring(temptemp+4, tempPath.length);
			//goPath=tempLocationPath+'en/index.html';
		}
	}
	if (lang=='tc') { //change to traditional chinese version
		if (istext){
			if (langID==4){
				goPath=tempLocationPath+'tc/'+tempPath.substring(temptemp+9, tempPath.length);
			}else{
				goPath=txttempLocationPath+'tc/'+tempPath.substring(temptemp+9, tempPath.length);
			}
		}else{
			goPath=tempLocationPath+'tc/'+tempPath.substring(temptemp+4, tempPath.length);
		}
	}
	if (lang=='sc') { //change to simplified chinese version
		//goPath=tempLocationPath+'sc/'+tempPath.substring(temptemp+4, tempPath.length);
		//goPath=tempLocationPath+'sc/index.html';
		if (istext){
			if (langID==6){
				goPath=tempLocationPath+'sc/'+tempPath.substring(temptemp+9, tempPath.length);
			}else{
				goPath=txttempLocationPath+'sc/'+tempPath.substring(temptemp+9, tempPath.length);
				goPath=txttempLocationPath+'sc/'+tempPath.substring(temptemp+9, tempPath.length);
			}
		}else{
			goPath=tempLocationPath+'sc/'+tempPath.substring(temptemp+4, tempPath.length);
		}
	}
	if (lang=='text') { //
		goPath=tempLocationPath+'text/'+langPath+tempPath.substring(temptemp+4, tempPath.length);
	}
	document.location=goPath;
}

function getSiteMap(){
	document.writeln('<table cellpadding="2" cellspacing="3" width="100%" border="0">');
		for (var i=0; i< MainSection[1].length; i++){
			document.writeln('<tr><td><img src="'+locationPath+'images/title/dot_select_11.gif" border="0"></td><td width="100%"><a href="'+MainSection[1][i]+'">'+MainTitle[langID][i]+'</a></td></tr>');
			if (SubSection[1][i].length > 1){
				document.writeln('<tr><td>&nbsp;</td><td><table cellpadding="2" cellspacing="3" width="100%" border="0">');
				for (var j=1; j<SubSection[1][i].length; j++){
					//alert (j);
					document.writeln('<tr><td><img src="'+locationPath+'images/title/dot_select_sec_11.gif" border="0"></td><td width="100%"><a href="'+SubSection[1][i][j]+'">'+SubSectionTitle[langID][i][j]+'</a></td></tr>');
					if (SecondSubSection[1][i][j].length >1){
						document.writeln('<tr><td>&nbsp;</td><td><table cellpadding="2" cellspacing="3" width="100%" border="0">');
						for (var k=1; k<SecondSubSection[1][i][j].length; k++){
							document.writeln('<tr><td><img src="'+locationPath+'images/title/dot_select_thir_11.gif" border="0"></td><td width="100%"><a href="'+SecondSubSection[1][i][j][k]+'">'+SecondSubSectionTitle[langID][i][j][k]+'</a></td></tr>');
						}
						document.writeln('</table></td></tr>');
					}
				}
				document.writeln('</table></td></tr>');
			}
		}
	document.writeln('</table>');
}

function externalLink(url)
{eval("nw = window.open(url, 'external','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0')");
	if ( nw.focus != null)
	{nw.focus();}
}

function getTopMenu(){
	//alert ('top menu');
	if (Selected_ID ==999){
		document.writeln('<body>');
//		document.writeln('<body  onLoad="PopWin2(\'popup_news.html\',\'News\', \'250\',\'300\',\'0\');">');
	}
	document.writeln('<table width="100%" border="0">');
	document.writeln('	<tr>');
	document.writeln('		<td>');
	document.writeln('			<table width="779" border="0" cellpadding="0" cellspacing="0">');
	document.writeln('				<tr><td>');
	document.writeln('					<table width=100% border=0 cellpadding=0 cellspacing=0>');
	document.writeln('						<tr>');
	if (!istext){
	//----------------Graphic Version--------------------
	document.writeln('						<td width=10><img src='+locationPath+'images/left_pix_01.gif width=10 height=86></td>');
	document.writeln('						<td width=719><table width=100% border=0 cellpadding=0 cellspacing=0>');
	document.writeln('							<tr>');
	document.writeln('							<td width=23% rowspan=2><a href="'+locationPath+langPath+'index.html"><img src='+graphicPath+'name.gif width=164 height=86 border="0"></a></td>');
	document.writeln('							<td width=77%><map name="afcd_logo"><area alt="afcd" shape="circle" coords="82,37,24" href="http://www.afcd.gov.hk"></map><div align=right><img src='+locationPath+'/images/logo.gif border="0" usemap="#afcd_logo"></div></td>');
	document.writeln('							</tr>');
	document.writeln('							<tr>');
	document.writeln('							<td valign=top><div align=right class=lang><img src='+locationPath+'images/language-arrow.gif width=11 height=11 align=absmiddle> <img src='+locationPath+'images/spacer.gif width=5 height=12>'+language+'<img src='+locationPath+'images/spacer.gif width=3 height=12>');

	var tclink=('<a href="javascript:langSwitch(\'tc\')" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'Image56\',\'\',\''+locationPath+'images/btn_lang_tc_over.gif\',1)><img src='+locationPath+'images/btn_lang_tc.gif name=Image56 width=20 height=14 border=0 align=absmiddle></a><img src='+locationPath+'images/lang_line_02.gif width=1 height=17 align=absmiddle>');
	var enlink=('<a href="javascript:langSwitch(\'en\')" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'Image53\',\'\',\''+locationPath+'images/btn_lang_en_over.gif\',1)><img src='+locationPath+'images/btn_lang_en.gif name=Image53 width=44 height=14 border=0 align=absmiddle></a><img src='+locationPath+'images/lang_line_01.gif width=1 height=14 align=absmiddle>');
	var sclink=('<a href="javascript:langSwitch(\'sc\')" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'Image57\',\'\',\''+locationPath+'images/btn_lang_sc_over.gif\',1)><img src='+locationPath+'images/btn_lang_sc.gif name=Image57 width=20 height=14 border=0 align=absmiddle></a><img src='+locationPath+'images/lang_line_01.gif width=1 height=14 align=absmiddle><img src='+locationPath+'images/spacer.gif width=3 height=12>');
	var textlink=('<a href="javascript:langSwitch(\'text\')" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'Image58\',\'\',\''+graphicPath+'btn_lang_text_over.gif\',1)><img src='+graphicPath+'btn_lang_text.gif name=Image58 height=14 border=0 align=absmiddle></a><!-- <img src='+locationPath+'images/lang_line_01.gif width=1 height=14 align=absmiddle> --><img src='+locationPath+'images/spacer.gif width=3 height=12>');
	//textlanguage='<a href="javascript:langSwitch(\'text\')">'+textlanguage+'</a>';

	if (langID==1){
		tclink='<img src='+locationPath+'images/btn_lang_tc.gif name=Image56 width=20 height=14 border=0 align=absmiddle><img src='+locationPath+'images/lang_line_02.gif width=1 height=17 align=absmiddle>';
	}else if (langID==2){
		enlink='<img src='+locationPath+'images/btn_lang_en.gif name=Image53 width=44 height=14 border=0 align=absmiddle><img src='+locationPath+'images/lang_line_01.gif width=1 height=14 align=absmiddle>';
	}else{
		sclink='<img src='+locationPath+'images/btn_lang_sc.gif name=Image57 width=20 height=14 border=0 align=absmiddle><img src='+locationPath+'images/lang_line_01.gif width=1 height=14 align=absmiddle>';
	}

/*
	var tclink='<img src='+locationPath+'images/btn_lang_tc.gif name=Image56 width=20 height=14 border=0 align=absmiddle><img src='+locationPath+'images/lang_line_02.gif width=1 height=17 align=absmiddle>';
	var enlink='<img src='+locationPath+'images/btn_lang_en.gif name=Image53 width=44 height=14 border=0 align=absmiddle><img src='+locationPath+'images/lang_line_01.gif width=1 height=14 align=absmiddle>';
	var sclink='<img src='+locationPath+'images/btn_lang_sc.gif name=Image57 width=20 height=14 border=0 align=absmiddle>';
*/

//	alert(tclink+enlink+sclink);
	document.writeln(enlink+tclink+sclink+textlink);
/*
	document.writeln('							<a href="javascript:langSwitch(\'en\')" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'Image53\',\'\',\''+locationPath+'images/btn_lang_en_over.gif\',1)><img src='+locationPath+'images/btn_lang_en.gif name=Image53 width=44 height=14 border=0 align=absmiddle></a><img src='+locationPath+'images/lang_line_01.gif width=1 height=14 align=absmiddle>');
	document.writeln('							<a href="javascript:langSwitch(\'tc\')" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'Image56\',\'\',\''+locationPath+'images/btn_lang_tc_over.gif\',1)><img src='+locationPath+'images/btn_lang_tc.gif name=Image56 width=20 height=14 border=0 align=absmiddle></a><img src='+locationPath+'images/lang_line_02.gif width=1 height=17 align=absmiddle>');
	document.writeln('							<a href="javascript:langSwitch(\'sc\')" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'Image57\',\'\',\''+locationPath+'images/btn_lang_sc_over.gif\',1)><img src='+locationPath+'images/btn_lang_sc.gif name=Image57 width=20 height=14 border=0 align=absmiddle></a></div></td>');
*/
	document.writeln('							</div></td></tr>');
	document.writeln('						</table></td>');
	document.writeln('						<td width=20><img src='+locationPath+'images/spacer.gif width=20 height=1></td>');
	document.writeln('						<td width=30 valign=bottom bgcolor=#F0F0F0>&nbsp;</td>');
	document.writeln('						</tr>');
	document.writeln('						<tr>');
	document.writeln('						<td colspan=2><table cellpadding="0" cellspacing="0" border="0"><tr><td>');
	if (langID == 2){
		document.writeln('<img src='+locationPath+'images/nav_pix_01.gif width=22 height=40></td>');
	}else{
		document.writeln('<img src='+locationPath+'images/nav_pix_01.gif width=32 height=40></td>');
	}
	for (var i=0; i< MainSection[1].length; i++){
		if (i != 11 && i !=12){
//		if (i != 98){
			if (Selected_ID == i ){
				document.writeln('<td><img src='+graphicPath+'btn_nav_'+i+'_over.gif name="menu_'+i+'" border="0" title="'+MainTitle[langID][i]+'" alt="'+MainTitle[langID][i]+'"></td>');
			} else {
//			alert('<td><a href="'+MainSection[1][i]+'" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'menu_'+i+'\',\'\',\''+graphicPath+'btn_nav_'+i+'_over.gif\',1)><img src='+graphicPath+'btn_nav_'+i+'.gif name="menu_'+i+'" border="0" title="'+MainTitle[langID][i]+'" alt="'+MainTitle[langID][i]+'"></a></td>');
				document.writeln('<td><a href="'+MainSection[1][i]+'" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'menu_'+i+'\',\'\',\''+graphicPath+'btn_nav_'+i+'_over.gif\',1)><img src='+graphicPath+'btn_nav_'+i+'.gif name="menu_'+i+'" border="0" title="'+MainTitle[langID][i]+'" alt="'+MainTitle[langID][i]+'"></a></td>');
/*can remove this condition after all hyperlink ready launch
				if (langID!=2){
					document.writeln('<td><a href="'+MainSection[1][i]+'" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'menu_'+i+'\',\'\',\''+graphicPath+'btn_nav_'+i+'_over.gif\',1)><img src='+graphicPath+'btn_nav_'+i+'.gif name="menu_'+i+'" border="0" title="'+MainTitle[langID][i]+'" alt="'+MainTitle[langID][i]+'"></a></td>');
				} else {
					document.writeln('<td><a href="#" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'menu_'+i+'\',\'\',\''+graphicPath+'btn_nav_'+i+'_over.gif\',1)><img src='+graphicPath+'btn_nav_'+i+'.gif name="menu_'+i+'" border="0" title="'+MainTitle[langID][i]+'" alt="'+MainTitle[langID][i]+'"></a></td>');
				}
can remove this condition after all hyperlink ready launch*/
//			}
			}
		}
	}
	document.writeln('				 		<td><img src='+graphicPath+'nav_pix_02.gif width=18 height=40></td></tr></table>');
	document.writeln('						<td width=20><img src='+locationPath+'images/spacer.gif width=20 height=1></td>');
	document.writeln('						<td width=30 valign=bottom bgcolor=#F0F0F0><img src='+locationPath+'images/spacer.gif width=30 height=1></td>');
	document.writeln('						</tr>');
	document.writeln('					</table>');
	document.writeln('				</td></tr>');
	document.writeln('				<tr><td>');
	document.writeln('				<table wdith=100% border="0" cellpadding="0" cellspacing="0"><tr>');
	if ((Selected_ID !=99) && (Selected_ID !=11) && (Selected_ID !=999) && (Selected_ID !=12)){
		document.writeln('			<td><img src="'+locationPath+'/images/left_inside_02.gif" width="10" height="105" border="0"></td>');
		document.writeln('			<td><img src="'+graphicPath+'banner1'+banner[1][Selected_ID]+'.gif" width="210" height="105"><img src="'+locationPath+'images/banner2'+banner[1][Selected_ID]+'.gif" width="150" height="105"><img src="'+locationPath+'images/banner3'+banner[1][Selected_ID]+'.gif" width="180" height="105"><img src="'+locationPath+'images/banner4'+banner[1][Selected_ID]+'.gif" width="180" height="105"></td>');
		document.writeln('			<td width="20"><img src="'+locationPath+'images/spacer.gif" width="20" height="1"></td><td width="30" valign="bottom" bgcolor="#F0F0F0"><img src="'+locationPath+'images/spacer.gif" width="30" height="1" border="0"></td></tr></table>');
		document.writeln('			<table wdith=100% border="0" cellpadding="0" cellspacing="0"><tr><td valign="bottom" bgcolor="#0C9FD9" width="10%"><img src="'+locationPath+'images/spacer.gif" width="10" height="1"></td><td>');
		document.writeln('				<table width="720" border="0" cellpadding="0" cellspacing="0"><tr><td width="20"><img src="'+locationPath+'images/spacer.gif" width="20" height="12"></td><td width="700">');
		document.writeln('					<table width="700"  border="0" cellpadding="0" cellspacing="0"><tr>');
		document.writeln('						<td width="700"><span class="text"><img src="'+locationPath+'images/spacer.gif" width="100%" height="13"></span><img src="'+graphicPath+'hd_'+Selected_ID+'.gif" ><img src="'+locationPath+'images/line_bg.gif" width="700" height="2"></td>');
		document.writeln('					</tr></table>');
		document.writeln('					<table width="700"  border="0" cellpadding="0" cellspacing="0"><tr><td>');
		document.writeln('					</td></tr>');
		document.writeln('					<tr><td background="'+locationPath+'images/bg_'+Selected_ID+'.jpg" >');
	}else if (Selected_ID == 999){
		document.writeln('			<td width="10"><img src="'+locationPath+'images/left_pix_02.gif" width="10" height="260"></td><td><!-- <img src="'+graphicPath+'main_vis_01.gif" width="180" height="260"><img src="'+locationPath+'/images/main_vis_02.gif" width="180" height="260"><img src="../images/main_vis_03.gif" width="180" height="260"><img src="../images/main_vis_04.gif" width="180" height="260"> --><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="716" height="200" id="intro_tc" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="images/intro.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="images/intro.swf" quality="high" bgcolor="#ffffff" width="716" height="200" name="intro_tc" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></td><td width="24"><img src="'+locationPath+'/images/spacer.gif" width="24" height="1"></td><td width="30" valign="bottom" align=right bgcolor="#F0F0F0">&nbsp;</td></tr>');
		document.writeln('			<tr><td><img src="../images/left_pix_03.gif" width="10" height="46"></td><td align="center"><a href="index2.html" onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'enter\',\'\',\'images/btn_enter_over.gif\',1)><img src="images/btn_enter.gif" border="0" name="enter"></a></td><td width="20"><img src="../images/spacer.gif" width="20" height="1"></td><td width="30" valign="bottom" align=right bgcolor="#F0F0F0">&nbsp;</td></tr></table>');
//		document.writeln('			<table wdith=100% border="0" cellpadding="0" cellspacing="0"><tr><td valign="bottom" bgcolor="#0C9FD9" width="10%">&nbsp;</td><td>');
//		document.writeln('				<table width="720" border="1" cellpadding="0" cellspacing="0"><tr><td width="20"><img src="'+locationPath+'images/spacer.gif" width="20" height="12"></td><td width="700">');
//		document.writeln('					<table width="700"  border="0" cellpadding="0" cellspacing="0"><tr><td>');
//		document.writeln('					</td></tr>');
//		document.writeln('					<tr><td >');
	}else{
		document.writeln('			<td width="10"><img src="'+locationPath+'images/left_pix_02.gif" width="10" height="260" border="0"></td><td><img src="'+graphicPath+'main_vis_01.gif" width="180" height="260"><img src="'+locationPath+'/images/main_vis_02.gif" width="180" height="260"><img src="../images/main_vis_03.gif" width="180" height="260"><img src="../images/main_vis_04.gif" width="180" height="260"></td><td width="20"><img src="'+locationPath+'/images/spacer.gif" width="20" height="1"></td><td width="30" valign="bottom" align=right bgcolor="#F0F0F0">&nbsp;</td></tr>');
		document.writeln('			<tr><!-- <td><img src="../images/left_pix_03.gif" width="10" height="46"></td> --><td colspan="2"><img src="../images/loop_pix.gif" width="730" height="46"></td><td width="20"><img src="../images/spacer.gif" width="20" height="1"></td><td width="30" valign="bottom" align=right bgcolor="#F0F0F0">&nbsp;</td></tr></table>');
		document.writeln('			<table wdith=100% border="0" cellpadding="0" cellspacing="0"><tr><td valign="bottom" bgcolor="#0C9FD9" width="10">&nbsp;</td><td>');
		document.writeln('				<table width="720" border="0" cellpadding="0" cellspacing="0"><tr><td width="20"><img src="'+locationPath+'images/spacer.gif" width="20" height="12"></td><td width="700">');
		if (Selected_ID ==11){
			document.writeln('					<table width="700"  border="0" cellpadding="0" cellspacing="0"><tr>');
			document.writeln('						<td width="700"><span class="text"><img src="'+locationPath+'images/spacer.gif" width="100%" height="13"></span><img src="'+graphicPath+'hd_'+Selected_ID+'.gif" ><img src="'+locationPath+'images/line_bg.gif" width="700" height="2"></td>');
			document.writeln('					</tr></table>');
		}
		document.writeln('					<table width="700"  border="0" cellpadding="0" cellspacing="0"><tr><td>');
		document.writeln('					</td></tr>');
		document.writeln('					<tr><td >');
	//----------------Graphic Version--------------------
	}
	}else{
	//alert ('text version');
	//---------------- Text Version start--------------------
	document.writeln('					<td><table width="100%"  border="0" cellpadding="0" cellspacing="0"><tr><td>');
	document.writeln('					<table width="100%"  border="0" cellpadding="0" cellspacing="0"><tr><td>');
	var tclink=('<a href="javascript:langSwitch(\'tc\')")>'+chiversion+'</a> | ');
	var enlink=('<a href="javascript:langSwitch(\'en\')")>' + engversion + '</a> | ');
	var sclink=('<a href="javascript:langSwitch(\'sc\')")>' + scversion + '</a>');
	document.writeln('<a href="'+locationPath+langPath+'index.html">'+indexpage+'</a> | '+enlink+tclink+sclink);
	document.writeln('					</td></tr><tr><td>&nbsp;</td></tr><tr><td>');
	switch(langID){
		case 4:
		templangid = 1;
		break
		case 5:
		templangid = 2;
		break
		case 6:
		templangid = 3;
		break
		default:
		templangid=langID;
	}
		for (var i=0; i< MainSection[1].length; i++){
			//if ((langID == 1) || (langID == 3)){
			//if (langID == 4){
				/*
				if (langID ==4){
					templangid = 1
				}
				*/
				if (i == 6){
					document.writeln('<br>');
				}
				if (Selected_ID ==i){
					document.writeln(MainTitle[templangid][i]);
				}else{
					document.writeln(' <a href="'+MainSection[1][i]+'">'+MainTitle[templangid][i]+'</a>');
					/*if ((langID ==2)||(langID==5)){//FOR ENGLISH VERSION NOT YET LANUCH
						document.writeln(' <a href="#">'+MainTitle[templangid][i]+'</a>');
					}else{
						document.writeln(' <a href="'+MainSection[1][i]+'">'+MainTitle[templangid][i]+'</a>');
					}*/
				}
				if (i !=12){
					document.writeln(' | ');
				}
			/*
			} else {
				if (i == 4){
					document.writeln('<br>');
				}
				//document.writeln(' <a href="'+MainSection[1][i]+'">'+MainTitle[templangid][i]+'</a>');
				document.writeln(' <a href="#">'+MainTitle[templangid][i]+'</a>');
				if (i !=11){
					document.writeln(' | ');
				}
			}
			*/
		}
	document.writeln('					</td></tr></table>');
	document.writeln('					</td></tr><tr><td><hr width="100%"></td></tr><tr><td><b>'+MainTitle[templangid][Selected_ID]+'</b></td></tr><tr><td>');
	document.writeln('					<table width="700"  border="0" cellpadding="0" cellspacing="0"><tr><td>');
	//alert  ('ok');
	//---------------- Text Version end--------------------
	}
}

function getFooter(){
	if (Selected_ID != 999){
	document.writeln('					</td></tr>');
	document.writeln('				</table>');
	document.writeln('				</td>');
	document.writeln('				</tr>');
		if (istext){
		document.writeln('				<tr><td><hr width="100%"></td></tr>');
		}
	document.writeln('				</table>');
	document.writeln('				</td>');
	document.writeln('				<td width="20">');
		if (!istext){
		document.writeln('				<img src="'+locationPath+'images/spacer.gif" width="20" height="1" border="0">');
		}
	document.writeln('				</td>');
		if (!istext){
			document.writeln('				<td width="30" valign="bottom" bgcolor="#F0F0F0"><img src="'+locationPath+'images/spacer.gif" width="30" height="1" border="0">');
		}else{
			document.writeln('				<td width="30" valign="bottom">');
		}
	document.writeln('				</td>');
	document.writeln('				</tr>');
	document.writeln('			</table>');
	}
	document.writeln('			</td></tr>');
	document.writeln('			<tr><td>');
	document.writeln('			<table width=100% border=0 cellpadding=0 cellspacing=0>');
	document.writeln('			<tr>');
	if (!istext){
		document.writeln('          <td valign=bottom bgcolor=#0C9FD9 width=10><img src='+locationPath+'images/left_pix_low.gif width=10 height=9></td>');
	}else{
		document.writeln('          <td valign=bottom width=10></td>');
	}
	document.writeln('		  	<td>');
	document.writeln('		  	<table width=100%>');
	document.writeln('            <tr>');
	document.writeln('              <td>&nbsp;</td>');
	document.writeln('              <td><span class=text>');
	if (!istext){
	document.writeln('				<img src='+locationPath+'images/spacer.gif width=100% height=15></span><img src='+locationPath+'images/dot_gray_low.gif width=100% height=6><span class=text><img src='+locationPath+'images/spacer.gif width=100% height=5></span>');
	}
	document.writeln('              </td>');
	document.writeln('              </tr>');
	document.writeln('            <tr>');
	document.writeln('              <td>&nbsp;</td>');
	document.writeln('              <td><table width=100% border=0 cellpadding=0 cellspacing=0>');
	document.writeln('                <tr>');
	document.writeln('                  <td width=72%><p class=footer>');
		for (var i=0; i< MainSection[1].length; i++){
		if (i != 12){
			var templangID;
			if (langID == 4){
				templangID = 1
			}else if (langID == 6){
				templangID = 3
			}else if (langID==5){
				templangID = 2;
			}else{
				templangID = langID;
			}
			//if ((langID == 1) || (langID == 3) || (langID == 4) || (langID == 6)){
				if ((langID != 2) && (langID != 5)){
					if (i == 6){
						//alert('newline'+langID);
						document.writeln('<br>');
					}
				}
				document.writeln(' <a href="'+MainSection[1][i]+'">'+MainTitle[templangID][i]+'</a>');
				/*can remove this condition after all hyperlink ready launch
				if (langID == 1){
					document.writeln(' <a href="'+MainSection[1][i]+'">'+MainTitle[langID][i]+'</a>');
				}else{
					document.writeln(' <a href="#">'+MainTitle[langID][i]+'</a>');
				}
				can remove this condition after all hyperlink ready launch*/
				if (i !=11){
					document.writeln(' | ');
				}
			/*} else {
				if (i == 4){
					document.writeln('<br>');
				}
				//document.writeln(' <a href="'+MainSection[1][i]+'">'+MainTitle[langID][i]+'</a>');
				document.writeln(' <a href="#">'+MainTitle[templangID][i]+'</a>');
				if (i !=11){
					document.writeln(' | ');
				}
			}*/
		}
		}
	document.writeln('                  </p><p class=copyright>'+footer+' | <a href="'+MainSection[1][12]+'">'+MainTitle[templangID][12]+'</a><br></p></td>');
	document.writeln('                  <td width=28% valign=top><div align=right><span class=lang>'+revdate+'</span><br><br>');
	if (!istext){document.writeln('                  <img src=images/logo_01.gif >');}
	document.writeln('                  </div></td>');
	document.writeln('                </tr>');
	document.writeln('                <tr>');
	document.writeln('                  <td colspan="2">&nbsp;</td>');
	document.writeln('                  </tr>');
	document.writeln('              </table></td>');
	document.writeln('              </tr>');
	document.writeln('		  </table>');
	document.writeln('		  ');
	document.writeln('		  </td>');
	if (!istext){
		document.writeln('		  <td width=20><img src='+locationPath+'images/spacer.gif width=20 height=1></td>');
		document.writeln('		  <td width=30 valign=bottom bgcolor=#F0F0F0><img src='+locationPath+'images/right_pix_low.gif width=29 height=9></td>');
	}else{
		document.writeln('		  <td width=20></td>');
		document.writeln('		  <td width=30 valign=bottom></td>');
	}
	document.writeln('		</tr>');
	document.writeln('		</table>');
	document.writeln('	</td></tr>');
	document.writeln('</table>');
	document.writeln('</td>');
	document.writeln('</tr>');
	document.writeln('</table>');
}
