/*************************** 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 **************************************/


/**************************** Variable Declaration Section *************************************************/
var selectedSection;
var selectedSubSection;
var selectedSecondSubSection;
var subPath;
var locationPath;
var slocationPath;
var graphicPath;
var langID;
var graphicLang;
var langNum;
var langPath;
var topButton;
var backButton;
var printPage;
var last_modified_txt;
var copyright_txt;
var printTxt;
var footerY = 600;
var menu='Y';

/**************************** Variable Declaration Section Finish ******************************************/


/**************************** Language / Server Path declaration ******************************************/
if(document.URL.toString().search('/en/')!=-1 || location.search.toString().indexOf('lang=en')!=-1){
	langPath = 'en/';
	graphicLang='en/';
	langID=1;
//	document.write ('<meta http-equiv="Content-Type" content="text/html; charset=big5">\n');
//	if (document.URL.toString().search('/beta/')!=-1) {
//		document.write ('<link href="http://www.wetlandpark.com/beta/common/en.css" rel="stylesheet" type="text/css">\n');
//	} else {
		document.write ('<link href="/common/en.css" rel="stylesheet" type="text/css">\n');
//	}
	last_modified_txt='Last Update: ';
	copyright_txt='Copyright&copy; 2009 Hong Kong Wetland Park. All rights reserved.<br>Best viewed with Internet Explorer 5.0 and Netscape 4.7 or above with 800 X 600 resolution.';
	printTxt = 'Printer-friendly Version';
}else if((document.URL.toString().search('/tc/')!=-1 && document.URL.toString().search('/gb/')==-1) || location.search.toString().indexOf('lang=tc')!=-1){
	langPath = 'tc/';
	graphicLang='tc/';
	langID=2;
//	document.write ('<meta http-equiv="Content-Type" content="text/html; charset=big5">\n');
//	if (document.URL.toString().search('/beta/')!=-1) {
//		document.write ('<link href="http://www.wetlandpark.com/beta/common/tc.css" rel="stylesheet" type="text/css">\n');
//	} else {
		document.write ('<link href="/common/tc.css" rel="stylesheet" type="text/css">\n');
//	}
//	document.write ('<link href="/common/tc.css" rel="stylesheet" type="text/css">\n');
	last_modified_txt='³Ì«á§ó·s¡J';
	copyright_txt='ª©Åv©Ò¦³&copy; 2009 ­»´äÀã¦a¤½¶é<br>½Ð¥H800x600¸Ñ¹³«×¤ÎInternet Explorer 5.0 / Netscape 4.7 ¥H¤Wª©¥»ÂsÄý¥H¹F¦Ü³Ì¨Î®ÄªG¡C';
	printTxt = 'Printer-friendly Version';
}else{
	//alert (location.href.toString().search('booking'));
	langPath = 'tc/';
	graphicLang='sc/';
	langID=2;
	langNum=3;
//	document.write ('<meta http-equiv="Content-Type" content="text/html; charset=big5">');
//	if (document.URL.toString().search('/beta/')!=-1) {
//		document.write ('<link href="http://www.wetlandpark.com/beta/common/tc.css" rel="stylesheet" type="text/css">\n');
//	} else {
		document.write ('<link href="/common/tc.css" rel="stylesheet" type="text/css">\n');
//	}
//	document.write ('<link href="/common/tc.css" rel="stylesheet" type="text/css">\n');
	last_modified_txt='³Ì«á§ó·s¡J';
	copyright_txt='ª©Åv©Ò¦³&copy; 2009 ­»´äÀã¦a¤½¶é<br>½Ð¥H800x600¸Ñ¹³«×¤ÎInternet Explorer 5.0 / Netscape 4.7 ¥H¤Wª©¥»ÂsÄý¥H¹F¦Ü³Ì¨Î®ÄªG¡C';
	printTxt = 'Printer-friendly Version';
}

//if(location.href.toString().search('westcomzivo')!=-1){
//	if(location.href.toString().search('/gb/')!=-1)
//	{
//		subPath="ht"+"tp://common.westcomzivo.com/gb/wetland.westcomzivo.com/";
//	}
//	else
//	{
//		subPath="ht"+"tp://wetland.westcomzivo.com/";
//	}
//}
if(location.href.toString().search('wetlandpark.com')!=-1){
	if((location.href.toString().search('/gb/')!=-1) || ((langID==2) && (langNum==3) && (location.href.toString().search('booking')!=-1)))
	{
		subPath="ht"+"tp://sc.afcd.gov.hk/gb/www.wetlandpark.com/";
	}
	else
	{
		subPath="ht"+"tp://www.wetlandpark.com/";
	}
}

if(location.href.toString().search('beta.wetlandpark.com')!=-1){
	if((location.href.toString().search('/gb/')!=-1) || ((langID==2) && (langNum==3) && (location.href.toString().search('booking')!=-1)))
	{
		subPath="ht"+"tp://sc.afcd.gov.hk/gb/beta.wetlandpark.com/";
	}
	else
	{
		subPath="ht"+"tp://beta.wetlandpark.com/";
	}
}

if(location.href.toString().search('revamp')!=-1){
	if((location.href.toString().search('/gb/')!=-1) || ((langID==2) && (langNum==3) && (location.href.toString().search('booking')!=-1)))
	{
		subPath="ht"+"tp://sc.afcd.gov.hk/gb/beta.wetlandpark.com/revamp/";
	}
	else
	{
		subPath="ht"+"tp://beta.wetlandpark.com/revamp/";
	}
}

if(location.href.toString().search('202.67.195.185')!=-1){
	if(location.href.toString().search('/gb/')!=-1)
	{
		subPath="ht"+"tp://sc.afcd.gov.hk/gb/202.67.195.185/";
	}
	else
	{
		subPath="ht"+"tp://202.67.195.185/";
	}
}

//by ITMD
if(location.href.toString().search('localhost')!=-1)
{
	if ((langID==2) && (langNum==3) && (location.href.toString().search('booking')!=-1))
	{
		subPath="ht"+"tp://sc.afcd.gov.hk/gb/localhot/"
	}
	else
	{
		subPath="ht"+"tp://localhost/";
	}	
}

//by NS
//if(location.href.toString().search('test.wetlandpark.com')!=-1)
if(location.href.toString().search('wetland.netsoft.net')!=-1)
{
	if ((langID==2) && (langNum==3) && (location.href.toString().search('booking')!=-1))
	{
		subPath="ht"+"tp://sc.afcd.gov.hk/gb/wetland.netsoft.net/"
	}
	else
	{
//		subPath="ht"+"tp://test.wetlandpark.com/";
		subPath="ht"+"tp://wetland.netsoft.net/";
	}	
}

//locationPath = getAbsPath() + langPath;
//alert (getAbsPath());
//locationPath = getAbsPath() + langPath;
locationPath = subPath + langPath;

if ((langID==2) && (langNum==3)) {
	var LPath = 'sc/';
}
else if ((langID==2) && (langNum!=3)) {
	var LPath = 'tc/';
}
else {
	var LPath = 'en/';
}

if (location.href.toString().search('www.wetlandpark.com')!=-1) {
	slocationPath = "ht" + "tps://www.wetlandpark.com/" + LPath;
}
else if (location.href.toString().search('revamp')!=-1) {
	slocationPath = "ht" + "tps://beta.wetlandpark.com/revamp/" + LPath;
}
else if (location.href.toString().search('beta.wetlandpark.com')!=-1) {
	slocationPath = "ht" + "tps://beta.wetlandpark.com/" + LPath;
}
else {
	slocationPath = subPath + LPath;
}
//alert (locationPath);
//graphicPath = locationPath + 'images/';
//graphicPath = getAbsPath() + graphicLang + 'images/';
//By ITMD
if (location.href.toString().search('https://www.wetlandpark')!=-1)
{
	graphicPath = "ht" + "tps://www.wetlandpark.com/" + graphicLang + 'images/';
}
else if (location.href.toString().search('http://beta.wetlandpark.com/revamp')!=-1)
{
	graphicPath = "ht" + "tp://beta.wetlandpark.com/revamp/" + graphicLang + 'images/';
}
else if (location.href.toString().search('https://beta.wetlandpark.com/revamp')!=-1)
{
	graphicPath = "ht" + "tps://beta.wetlandpark.com/revamp/" + graphicLang + 'images/';
}
else if (location.href.toString().search('https://beta.wetlandpark')!=-1)
{
	graphicPath = "ht" + "tps://beta.wetlandpark.com/" + graphicLang + 'images/';
}
else if (location.href.toString().search('localhost')!=-1)
{
	graphicPath = "ht" + "tp://localhost/" + graphicLang + 'images/';
}
else if (location.href.toString().search('202.57.255.82/wetlandpark/www/')!=-1)
{
	graphicPath = "ht" + "tp://202.57.255.82/wetlandpark/www/" + graphicLang + "images/";
}
else if (location.href.toString().search('test.wetlandpark.com')!=-1)
{
	graphicPath = "ht" + "tp://test.wetlandpark.com/" + graphicLang + "images/";
}
else if (location.href.toString().search('wetland.netsoft.net')!=-1)
{
	graphicPath = "ht" + "tp://wetland.netsoft.net/" + graphicLang + "images/";
}
else
{
	graphicPath = subPath + graphicLang + 'images/';
}

if(selectedSection >=10){
	var tempSection=selectedSection;
}else{
	var tempSection="0"+selectedSection;
}
if(selectedSubSection >=10){
	var tempSubSection=selectedSubSection;
}else{
	var tempSubSection="0"+selectedSubSection;
}
if(selectedSecondSubSection >=10){
	var tempSecondSubSection=selectedSecondSubSection;
}else{
	var tempSecondSubSection="0"+selectedSecondSubSection;
}

var copyYear='2007';
//var noticesLink=locationPath+langPath+'notices/index.htm';
var noticeText='Important notices';
var revisionText='Last revision date:';	
var reviewText='Last review date:';	
if (revisionDate==''||revisionDate=='MM/DD/YYYY') revisionDate='02/06/2006';
if (reviewDate==''||reviewDate=='MM/DD/YYYY') reviewDate='02/06/2006';
if (langID==2){
	noticeText='­«­n§i¥Ü';
	revisionText='­×­q¤é´Á¡G ';	
	reviewText='ÂÐÀË¤é´Á¡G ';	
}
var monthArray=new Array();
monthArray[0]='January';
monthArray[1]='February';
monthArray[2]='March';
monthArray[3]='April';
monthArray[4]='May';
monthArray[5]='June';
monthArray[6]='July';
monthArray[7]='August';
monthArray[8]='September';
monthArray[9]='October';
monthArray[10]='November';
monthArray[11]='December';
var reDate=new Date(Date.parse(revisionDate))
var showDate=reDate.getDate()+' '+monthArray[reDate.getMonth()]+' '+reDate.getFullYear();
if (langID==2) showDate=reDate.getFullYear()+'¦~'+(reDate.getMonth()+1)+'¤ë'+reDate.getDate()+'¤é';

var reDate2=new Date(Date.parse(reviewDate))
var showDate2=reDate2.getDate()+' '+monthArray[reDate2.getMonth()]+' '+reDate2.getFullYear();
if (langID==2) showDate2=reDate2.getFullYear()+'¦~'+(reDate2.getMonth()+1)+'¤ë'+reDate2.getDate()+'¤é';

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 (a_vp.length > 3) s_path = a_vp[0] + '//' + a_vp[2] + '/' + a_vp[3] + '/';
//	alert (a_vp[3]);
	return s_path;
}

if(window.name=='PrintPage'){
	printPage=1;
}

if(location.href.toString().search('westcomzivo')!=-1){		//Setting kanhan Server
	gb_urlPath='common.westcomzivo.com/gb/';
}else{
	gb_urlPath='sc.afcd.gov.hk/gb/';
//	gb_urlPath='common.westcomzivo.com/gb/';
}


/**************************** Language / Server Path declaration Finish ***********************************/


/**************************** Common Function ************************************************************/
function langSwitch(lang) {
	var goPath;
	var pagePath=document.location.pathname;
	var temptemp;
	var currentPath=document.location.toString();
//	var currentPath=location.href.toString();
	var switchTc='/tc/';
	var switchSc='/sc/';
	var switchEn='/en/';
	temptemp=document.location.toString();
//	alert (temptemp +" / "+currentPath);
	if (langID ==1){
		temptemp=temptemp.indexOf('/en');
	} else if (langID == 2){
		temptemp=temptemp.indexOf('/tc');
	} else if (langNum == 3){
		temptemp=temptemp.indexOf('/sc');
	} else {
		temptemp=temptemp.indexOf('/en');
	}
	var tempPath=window.location;
	var tempLocationPath;
	tempPath = tempPath.toString();
	tempLocationPath = document.location.toString().substring(0, temptemp+1);
//	if (lang=='en') { //change to English version
//		goPath=tempLocationPath+'en/'+tempPath.substring(temptemp+4, tempPath.length);
//	}
//	if (lang=='tc') { //change to traditional chinese version
//		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);
//	}
	switch (lang){
		case 'sc':
//			currentPath='http://'+gb_urlPath+locationPath.substring(7, locationPath.length)+switchTc;
//			alert (currentPath);
//			alert (gb_urlPath);
			if (location.href.toString().search('booking')==-1) {
				currentPath=currentPath.replace('ht'+'tp://', 'ht'+'tp://'+gb_urlPath);
				currentPath=currentPath.replace(switchEn, switchTc);
			}
			else {
				currentPath=currentPath.replace(switchEn, switchSc);
				currentPath=currentPath.replace(switchTc, switchSc);
			}
//			alert (currentPath);
//			currentPath=currentPath.replace(switchEn, switchTc);
			break;
		case 'en':
			currentPath=currentPath.replace(switchTc, switchEn);
			currentPath=currentPath.replace(switchSc, switchEn);
			currentPath=currentPath.replace(gb_urlPath, "");
			break;
		case 'tc':
			currentPath=currentPath.replace(switchEn, switchTc);
			currentPath=currentPath.replace(switchSc, switchTc);
			currentPath=currentPath.replace(gb_urlPath, "");
			break;
		default:
	}


//	document.location=goPath;
//	alert (currentPath);
	document.location=currentPath;
}



function switchToTextonly() {
/*
	var currentPath=document.location.toString();

	if (langID ==1){
		currentPath = currentPath.replace("/en/", "/en/textonly/");
	} else if (langID == 2){
		currentPath = currentPath.replace("/tc/", "/tc/textonly/");
	} else if (langNum == 3){
		currentPath = currentPath.replace("/tc/", "/tc/textonly/");
	} else {
		currentPath = currentPath.replace("/en/", "/en/textonly/");
	}

	currentPath = currentPath.replace(".asp", ".html");
*/

	if (location.href.toString().search('revamp') != -1) {
		if (langID == 1) {
			document.location = "/revamp/en/textonly/index.html";
		} else if (langID == 2) {
			document.location = "/revamp/tc/textonly/index.html";
		} else if (langNum == 3) {
			document.location = "/revamp/tc/textonly/index.html";
		} else {
			document.location = "/revamp/en/textonly/index.html";
		}
	}
	else {
		if (langID == 1) {
			document.location = "/en/textonly/index.html";
		} else if (langID == 2) {
			document.location = "/tc/textonly/index.html";
		} else if (langNum == 3) {
			document.location = "/tc/textonly/index.html";
		} else {
			document.location = "/en/textonly/index.html";
		}
	}
}



function getLangBtn(){
	if (langID ==1){
		document.writeln('										<td><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)" ><img src="'+graphicPath+'btn_tc.gif" border="0" name="tc" alt="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;" title="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;"></a><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)" ><img src="'+graphicPath+'btn_sc.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"></a><img src="'+graphicPath+'btn_en_over.gif" border="0" name="en" alt="English Version" title="English Version"><a href="javascript:switchToTextonly()" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'textonly\',\'\',\''+graphicPath+'btn_textonly_en_over.gif\',1)" ><img src="'+graphicPath+'btn_textonly_en.gif" border="0" name="textonly" alt="Text only Version" title="Text only Version"></a><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	} else if (langID == 2 && langNum!=3){
		document.writeln('										<td><img src="'+graphicPath+'btn_tc_over.gif" border="0" name="tc" alt="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;" title="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;"><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)" ><img src="'+graphicPath+'btn_sc.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"></a><a href="javascript:langSwitch(\'en\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'en\',\'\',\''+graphicPath+'btn_en_over.gif\',1)" ><img src="'+graphicPath+'btn_en.gif" border="0" name="en" alt="English Version" title="English Version"></a><a href="javascript:switchToTextonly()" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'textonly\',\'\',\''+graphicPath+'btn_textonly_tc_over.gif\',1)" ><img src="'+graphicPath+'btn_textonly_tc.gif" border="0" name="textonly" alt="&#32020;&#25991;&#23383;&#29256;" title="&#32020;&#25991;&#23383;&#29256;"></a><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	} else if (langNum == 3){
		document.writeln('										<td><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)" ><img src="'+graphicPath+'btn_tc.gif" border="0" name="tc" alt="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;" title="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;"></a><img src="'+graphicPath+'btn_sc_over.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"><a href="javascript:langSwitch(\'en\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'en\',\'\',\''+graphicPath+'btn_en_over.gif\',1)" ><img src="'+graphicPath+'btn_en.gif" border="0" name="en" alt="English Version" title="English Version"></a><a href="javascript:switchToTextonly()" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'textonly\',\'\',\''+graphicPath+'btn_textonly_sc_over.gif\',1)" ><img src="'+graphicPath+'btn_textonly_sc.gif" border="0" name="textonly" alt="&#32020;&#25991;&#23383;&#29256;" title="&#32020;&#25991;&#23383;&#29256;"></a><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	} else {
		document.writeln('										<td><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)" ><img src="'+graphicPath+'btn_tc.gif" border="0" name="tc" alt="Traditional Chinese Version" title="Traditional Chinese Version"></a><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)" ><img src="'+graphicPath+'btn_sc.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"></a><img src="'+graphicPath+'btn_en_over.gif" border="0" name="en" alt="English Version" title="English Version"><a href="javascript:switchToTextonly()" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'textonly\',\'\',\''+graphicPath+'btn_textonly_en_over.gif\',1)" ><img src="'+graphicPath+'btn_textonly_en.gif" border="0" name="textonly" alt="Text only Version" title="Text only Version"></a><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	}
}

function getLangBtn2(){
	if (langID ==1){
		document.writeln('										<td><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)" ><img src="'+graphicPath+'btn_tc.gif" border="0" name="tc" alt="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;" title="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;"></a><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)" ><img src="'+graphicPath+'btn_sc.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"></a><img src="'+graphicPath+'btn_en_over.gif" border="0" name="en" alt="English Version" title="English Version"><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	} else if (langID == 2 && langNum!=3){
		document.writeln('										<td><img src="'+graphicPath+'btn_tc_over.gif" border="0" name="tc" alt="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;" title="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;"><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)" ><img src="'+graphicPath+'btn_sc.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"></a><a href="javascript:langSwitch(\'en\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'en\',\'\',\''+graphicPath+'btn_en_over.gif\',1)" ><img src="'+graphicPath+'btn_en.gif" border="0" name="en" alt="English Version" title="English Version"></a><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	} else if (langNum == 3){
		document.writeln('										<td><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)" ><img src="'+graphicPath+'btn_tc.gif" border="0" name="tc" alt="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;" title="&#32321;&#39636;&#20013;&#25991;&#29256;&#26412;"></a><img src="'+graphicPath+'btn_sc_over.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"><a href="javascript:langSwitch(\'en\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'en\',\'\',\''+graphicPath+'btn_en_over.gif\',1)" ><img src="'+graphicPath+'btn_en.gif" border="0" name="en" alt="English Version" title="English Version"></a><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	} else {
		document.writeln('										<td><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)" ><img src="'+graphicPath+'btn_tc.gif" border="0" name="tc" alt="Traditional Chinese Version" title="Traditional Chinese Version"></a><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)" ><img src="'+graphicPath+'btn_sc.gif" border="0" name="sc" alt="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;" title="&#31616;&#20307;&#20013;&#25991;&#29256;&#26412;"></a><img src="'+graphicPath+'btn_en_over.gif" border="0" name="en" alt="English Version" title="English Version"><img src="'+graphicPath+'btn_en_over.gif" border="0" name="en" alt="English Version" title="English Version"><img src="'+graphicPath+'spacer.gif" width="7" height="1" border="0"></td>');
	}
}

function genPrintButton(){
	if(printPage!=1){
		if(langID==1){ var altText='Printer-friendly Version'; }else{ var altText='¤Íµ½¦C¦L'; }
		document.writeln('	<a href="javascript:PrintDocument();" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'print\',\'\',\''+graphicPath+'btn_printer_vers_over.gif\',1)"><img src="'+graphicPath+'btn_printer_vers.gif" border=0 align=top alt="'+altText+'" name="print"></a>');
	}
}

//function for Print Function
function PrintDocument(){
	window.open(document.URL,'PrintPage','top=10,left=10,height=500,width=570,scrollbars=1');
}

function getTitle(){
	
	if (langID == 1){
		var title='<title>Hong Kong Wetland Park';
	} else if (langID == 2 && langNum!=3){
		var title='<title>­»´äÀã¦a¤½¶é';
	} else if (langNum == 3) {
		if (location.href.toString().search('booking')!=-1) {
			
			var title='<title>Ïã¸ÛÊªµØ¹«Ô°';
		//	alert (title);
		}
		else {
			var title='<title>­»´äÀã¦a¤½¶é';
		}
	}
	if (selectedSection !=''){
		if (location.href.toString().search('booking')!=-1 && langNum==3) {
			var LID = langNum;
		}
		else {
			var LID = langID;
		}
		title += ' - ' + MainTitle[LID][selectedSection];
		if (selectedSubSection !=''){
			if (!(selectedSection == 5 && selectedSubSection == 2)){
				title += ' - ' + SubSectionTitle[LID][selectedSection][selectedSubSection];
			}
			if (selectedSecondSubSection != ''){
				//alert  (selectedSection  );
				//alert (selectedSubSection );
				//alert (selectedSecondSubSection);
				if ((!(selectedSection == 5 && selectedSubSection == 2 && selectedSecondSubSection == 5 && langID != 1)) && (!(selectedSection == 4 && selectedSubSection == 3 && selectedSecondSubSection == 1))){
					title += ' - ' + SecondSubSectionTitle[LID][selectedSection][selectedSubSection][selectedSecondSubSection];
				}
			}
		}
	}
	title += '</title>';
	document.writeln(title);
}

function getPrintTitle(){
	if (langID == 1){
		var title='Hong Kong Wetland Park';
	} else if (langID == 2){
		var title='­»´äÀã¦a¤½¶é';
	} else if (langID == 3) {
		var title='­»´äÀã¦a¤½¶é';
	}
	if (selectedSection !=''){
		title += ' - ' + MainTitle[langID][selectedSection];
		if (selectedSubSection !=''){
			title += ' - ' + SubSectionTitle[langID][selectedSection][selectedSubSection];
//			if (selectedSecondSubSection != ''){
//				title += ' - ' + SecondSubSectionTitle[langID][selectedSection][selectedSubSection][selectedSecondSubSection];
//			}
		}
	}
	document.writeln(title);
}

function getheaderHTML(){

	if (location.href.toString().search('booking')!=-1 && langNum==3) {
		var LID = langNum;
	}
	else {
		var LID = langID;
	}
	document.writeln('<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.writeln('	<tr valign="top"><td align="center">');
if(printPage!=1){
	
	document.writeln('		<table cellpadding="0" cellspacing="0" width="778" border="0">');
	document.writeln('			<tr valign="top">');
	document.writeln('				<td>');
	document.writeln('					<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.writeln('						<tr>');
	document.writeln('							<td width="185"><a href="../index.asp"><img src="'+graphicPath+'logo_afcd.gif" border="0" alt="Hong Kong Wetland Park" title="Hong Kong Wetland Park"></a></td>');
	document.writeln('							<td width="212"><img src="'+graphicPath+'ins_top_bird.gif" border="0" alt="" title="Image"></td>');
	document.writeln('							<td align="right" background="'+graphicPath+'ins_top_bg.gif">');
	document.writeln('								<table width="300" border="0" cellspacing="0" cellpadding="0" height="81">');
	document.writeln('									<tr align="right" valign="top">');
//	if (selectedSection == 4 &&selectedSubSection==3 && selectedSecondSubSection ==1){
//		getLangBtn2();
//	} else {
		getLangBtn();
//	}
	document.writeln('									</tr>');
	document.writeln('									<tr align="right" valign="bottom">');
	if (selectedSection == 9){
		document.writeln('										<td valign="bottom"><img src="'+graphicPath+'ins_top_btn_start.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][9] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'faq\',\'\',\''+graphicPath+'btn_faq_over.gif\',1)" ><img src="'+graphicPath+'btn_faq_over.gif" border="0" name="faq" alt="' + MainTitle[LID][9] + '" title="' + MainTitle[LID][9] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][14] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'links\',\'\',\''+graphicPath+'btn_links_over.gif\',1)" ><img src="'+graphicPath+'btn_links.gif" border="0" name="links" alt="' + MainTitle[LID][14] + '" title="' + MainTitle[LID][14] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][12] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sitemap\',\'\',\''+graphicPath+'btn_site_map_over.gif\',1)" ><img src="'+graphicPath+'btn_site_map.gif" border="0" name="sitemap" alt="' + MainTitle[LID][12] + '" title="' + MainTitle[LID][12] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][8] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'contactus\',\'\',\''+graphicPath+'btn_contact_us_over.gif\',1)" ><img src="'+graphicPath+'btn_contact_us.gif" border="0" name="contactus" alt="' + MainTitle[LID][8] + '" title="' + MainTitle[LID][8] + '"></a><img src="'+graphicPath+'ins_top_btn_end.gif" border="0" alt="-" title="-"></td>');
	} else if (selectedSection == 14){
		document.writeln('										<td valign="bottom"><img src="'+graphicPath+'ins_top_btn_start.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][9] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'faq\',\'\',\''+graphicPath+'btn_faq_over.gif\',1)" ><img src="'+graphicPath+'btn_faq.gif" border="0" name="faq" alt="' + MainTitle[LID][9] + '" title="' + MainTitle[LID][9] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][14] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'links\',\'\',\''+graphicPath+'btn_links_over.gif\',1)" ><img src="'+graphicPath+'btn_links_over.gif" border="0" name="links" alt="' + MainTitle[LID][14] + '" title="' + MainTitle[LID][14] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][12] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sitemap\',\'\',\''+graphicPath+'btn_site_map_over.gif\',1)" ><img src="'+graphicPath+'btn_site_map.gif" border="0" name="sitemap" alt="' + MainTitle[LID][12] + '" title="' + MainTitle[LID][12] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][8] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'contactus\',\'\',\''+graphicPath+'btn_contact_us_over.gif\',1)" ><img src="'+graphicPath+'btn_contact_us.gif" border="0" name="contactus" alt="' + MainTitle[LID][8] + '" title="' + MainTitle[LID][8] + '"></a><img src="'+graphicPath+'ins_top_btn_end.gif" border="0" alt="-" title="-"></td>');
	} else if (selectedSection == 12){
		document.writeln('										<td valign="bottom"><img src="'+graphicPath+'ins_top_btn_start.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][9] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'faq\',\'\',\''+graphicPath+'btn_faq_over.gif\',1)" ><img src="'+graphicPath+'btn_faq.gif" border="0" name="faq" alt="' + MainTitle[LID][9] + '" title="' + MainTitle[LID][9] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][14] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'links\',\'\',\''+graphicPath+'btn_links_over.gif\',1)" ><img src="'+graphicPath+'btn_links.gif" border="0" name="links" alt="' + MainTitle[LID][14] + '" title="' + MainTitle[LID][14] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][12] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sitemap\',\'\',\''+graphicPath+'btn_site_map_over.gif\',1)" ><img src="'+graphicPath+'btn_site_map_over.gif" border="0" name="sitemap" alt="' + MainTitle[LID][12] + '" title="' + MainTitle[LID][12] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][8] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'contactus\',\'\',\''+graphicPath+'btn_contact_us_over.gif\',1)" ><img src="'+graphicPath+'btn_contact_us.gif" border="0" name="contactus" alt="' + MainTitle[LID][8] + '" title="' + MainTitle[LID][8] + '"></a><img src="'+graphicPath+'ins_top_btn_end.gif" border="0" alt="-" title="-"></td>');
	} else if (selectedSection == 8){
		document.writeln('										<td valign="bottom"><img src="'+graphicPath+'ins_top_btn_start.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][9] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'faq\',\'\',\''+graphicPath+'btn_faq_over.gif\',1)" ><img src="'+graphicPath+'btn_faq.gif" border="0" name="faq" alt="' + MainTitle[LID][9] + '" title="' + MainTitle[LID][9] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][14] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'links\',\'\',\''+graphicPath+'btn_links_over.gif\',1)" ><img src="'+graphicPath+'btn_links.gif" border="0" name="links" alt="' + MainTitle[LID][14] + '" title="' + MainTitle[LID][14] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][12] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sitemap\',\'\',\''+graphicPath+'btn_site_map_over.gif\',1)" ><img src="'+graphicPath+'btn_site_map.gif" border="0" name="sitemap" alt="' + MainTitle[LID][12] + '" title="' + MainTitle[LID][12] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][8] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'contactus\',\'\',\''+graphicPath+'btn_contact_us_over.gif\',1)" ><img src="'+graphicPath+'btn_contact_us_over.gif" border="0" name="contactus" alt="' + MainTitle[LID][8] + '" title="' + MainTitle[LID][8] + '"></a><img src="'+graphicPath+'ins_top_btn_end.gif" border="0" alt="-" title="-"></td>');
	} else {
		document.writeln('										<td valign="bottom"><img src="'+graphicPath+'ins_top_btn_start.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][9] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'faq\',\'\',\''+graphicPath+'btn_faq_over.gif\',1)" ><img src="'+graphicPath+'btn_faq.gif" border="0" name="faq" alt="' + MainTitle[LID][9] + '" title="' + MainTitle[LID][9] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][14] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'links\',\'\',\''+graphicPath+'btn_links_over.gif\',1)" ><img src="'+graphicPath+'btn_links.gif" border="0" name="links" alt="' + MainTitle[LID][14] + '" title="' + MainTitle[LID][14] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][12] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'sitemap\',\'\',\''+graphicPath+'btn_site_map_over.gif\',1)" ><img src="'+graphicPath+'btn_site_map.gif" border="0" name="sitemap" alt="' + MainTitle[LID][12] + '" title="' + MainTitle[LID][12] + '"></a><img src="'+graphicPath+'ins_top_btn_divider.gif" border="0" alt="-" title="-"><a href="'+ MainSection[1][8] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'contactus\',\'\',\''+graphicPath+'btn_contact_us_over.gif\',1)" ><img src="'+graphicPath+'btn_contact_us.gif" border="0" name="contactus" alt="' + MainTitle[LID][8] + '" title="' + MainTitle[LID][8] + '"></a><img src="'+graphicPath+'ins_top_btn_end.gif" border="0" alt="-" title="-"></td>');
	}
	document.writeln('									</tr>');
	document.writeln('								</table>');
	document.writeln('							</td>');
	document.writeln('						</tr>');
	document.writeln('					</table>');
	document.writeln('				</td>');
	document.writeln('			</tr>');
	document.writeln('			<tr valign="top">');
	document.writeln('				<td>');
	document.writeln('					<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.writeln('						<tr valign="top">');
//	document.writeln('							<td><img src="'+graphicPath+'ins_main_visual_1.jpg" border="0" alt="" title="Image"></td>');
//	document.writeln('							<td background="'+graphicPath+'ins_main_visual_2.jpg">');
//	getTopMenu();
//	document.writeln('							</td>');
//	document.writeln('							<td><img src="'+graphicPath+'ins_main_visual_3.jpg" border="0" alt="" title="Image"></td>');
	document.writeln('							<td><img src="'+graphicPath+'ins_main_visual_1.jpg" border="0" alt="" title="Image"></td>');
	document.writeln('							<td width="100%" background="'+graphicPath+'ins_main_visual_2+3.jpg">');
	getTopMenu();
	document.writeln('							</td>');
//	document.writeln('							<td><img src="'+graphicPath+'ins_main_visual_3.jpg" border="0" alt="" title="Image"></td>');
	document.writeln('						</tr>');
	document.writeln('					</table>');
	document.writeln('				</td>');
	document.writeln('			</tr>');
	document.writeln('			<tr valign="top">');
	document.writeln('				<td>');
	document.writeln('					<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.writeln('						<tr>');
	document.writeln('							<td width=176><img src="'+graphicPath+'ins_main_mangrove.jpg" border="0" alt="" title="Image"></td>');
	document.writeln('							<td width=21><img src="'+graphicPath+'hd_left1.gif" border="0" alt="" title="Image"></td>');
	document.writeln('							<td width=546><img src="'+graphicPath+'hd_sec_'+tempSection+'.gif" border="0" alt="'+MainTitle[LID][selectedSection]+'" title="'+MainTitle[LID][selectedSection]+'" name="sectionHeader"></td>');
	document.writeln('							<td width=35><img src="'+graphicPath+'hd_right1.gif" border="0" alt="-" title="-"></td>');
	document.writeln('						</tr>');
	document.writeln('					</table>');
	document.writeln('				</td>');
	document.writeln('			</tr>');
	document.writeln('			<tr valign="top">');
	document.writeln('				<td>');

if (menu != 'N'){
	
	document.writeln('					<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.writeln('						<tr valign="top">');
	document.writeln('							<td width="176" bgcolor="#FFFFFF" background="'+graphicPath+'nav_bg.gif">');
	document.writeln('								<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.writeln('									<tr valign="top"><td><img src="'+graphicPath+'nav_start.gif" border="0" alt="" title="Image"></td></tr>');
	getLeftMenu();
	document.writeln('								</table>');
	document.writeln('							</td>');
	document.writeln('							<td bgcolor="#FFFFFF" background="'+graphicPath+'ins_content_space_left.gif" width="21"><img src="'+graphicPath+'hd_left2.gif" border="0" alt="" title="Image"></td>');
	document.writeln('							<td bgcolor="#FFFFFF" width="546" height="100%">');
	document.writeln('								<table cellpadding="0" cellspacing="0" width="546" border="0" height="100%">');
	if (selectedSubSection !=''){
		document.writeln('									<tr valign="top"><td><img src="'+graphicPath+'hd_sec'+tempSection+'_'+tempSubSection+'.gif" border="0" alt="'+SubSectionTitle[LID][selectedSection][selectedSubSection]+'" title="'+SubSectionTitle[LID][selectedSection][selectedSubSection]+'" name="subSectionHeader"></td></tr>');
	} else {
		document.writeln('									<tr valign="top"><td><img src="'+graphicPath+'hd_sec.gif" border="0" alt="" title="Image" name="subSectionHeader"></td></tr>');
	}
	document.writeln('									<tr valign="top"><td><img src="'+graphicPath+'spacer.gif" width="1" height="12" border="0"></td></tr>');
	document.writeln('									<tr valign="top">');
	document.writeln('										<td width="100%" height="100%">');
	
}
	
}


//Print or not
if(printPage==1){
	document.writeln('								<table cellpadding="5" cellspacing="0" width="556" border="0" height="100%" bgcolor="#FFFFFF"><tr><td>');
	document.writeln('<p class="greyHeader">');
	getPrintTitle();
	document.writeln('</p>');
}

}

function getTopMenu(){
	if (location.href.toString().search('booking')!=-1 && langNum==3) {
		var LID = langNum;
	}
	else {
		var LID = langID;
	}

	document.writeln('								<table cellpadding="0" cellspacing="0" width="100%" border="0">');
	document.writeln('									<tr valign="top"><td><img src="'+graphicPath+'spacer.gif" width="1" height="20" border="0" alt="-" title="-"></td></tr>');
	for (var i=0; i<MainSection[1].length; i++){
		if (!(i == 8 || i == 9 || i == 10 || i == 11 || i == 12 || i == 13 || i == 14 || i == 15 || i == 16 || i == 17 || i == 18)) {
			if(i >=10){
				var bg=i;
			}else{
				var bg="0"+i;
			}
			(selectedSection==i)?isOver='_over':isOver='';
			document.writeln('									<tr valign="top"><td><a href="'+ MainSection[1][i] +'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'topMenu'+bg+'\',\'\',\''+graphicPath+'nav_'+bg+'_over.gif\',1)" ><img src="'+graphicPath+'nav_'+bg+isOver+'.gif" border="0" alt="'+MainTitle[LID][i]+'" title="'+MainTitle[LID][i]+'" name="topMenu'+bg+'"></a></td></tr>');
		}
	}
	document.writeln('								</table>');
}

function getLeftMenu(){
	if (location.href.toString().search('booking')!=-1 && langNum==3) {
		var LID = langNum;
	}
	else {
		var LID = langID;
	}

	if (SubSection[1][selectedSection].length>0){
		for (var i=1; i < SubSection[1][selectedSection].length; i++){
			if(i >=10){
				var bg=i;
			}else{
				var bg="0"+i;
			}
			(selectedSubSection==i)?isOver='_over':isOver='';
//			if (!(selectedSection ==6 &&  i ==6)){
				document.writeln('									<tr valign="top"><td><a href="'+SubSection[1][selectedSection][i]+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'leftMenu'+i+'\',\'\',\''+graphicPath+'nav_sec'+tempSection+'_'+bg+'_over.gif\',1)"><img src="'+graphicPath+'nav_sec'+tempSection+'_'+bg+isOver+'.gif" border="0" alt="'+SubSectionTitle[LID][selectedSection][i]+'" title="'+SubSectionTitle[LID][selectedSection][i]+'" name="leftMenu'+i+'"></a></td></tr>');
//			}
			if (selectedSubSection==i && SecondSubSection[1][selectedSection][selectedSubSection].length>0){
				document.writeln('									<tr valign="top">');
				document.writeln('										<td>');
				document.writeln('											<table width="170" border="0" cellpadding="0" cellspacing="0">');
				document.writeln('												<tr valign="top">');
				document.writeln('													<td width="35"><img src="'+graphicPath+'spacer.gif" width="35" height="1" border="0" alt="-" title="-"></td>');
				document.writeln('                          							<td width="135">');
				document.writeln('														<table width="100%" border="0" cellpadding="2" cellspacing="0">');
				for (var j=1; j<SecondSubSection[1][selectedSection][selectedSubSection].length; j++){
					(selectedSecondSubSection==j)?isOver='_over':isOver='';
					document.writeln('															<tr valign="top">');
					document.writeln('																<td width="7"><img src="'+graphicPath+'nav_dot.gif" vspace="4" border="0" alt="*" title="*"></td>');
					document.writeln('																<td class="leftMenu'+isOver+'"><a href="'+ SecondSubSection[1][selectedSection][i][j] +'">'+ SecondSubSectionTitle[LID][selectedSection][i][j] +'</a></td>');
					document.writeln('															</tr>');
				}
				document.writeln('														</table>');
				document.writeln('													</td>');
				document.writeln('												</tr>');
				document.writeln('											</table>');
				document.writeln('										</td>');
				document.writeln('									</tr>');
			}
		}
	}
}

function init(){
	setTopLayerPosition(true);
//	alert ("hi");
	if(printPage==1){
		window.print();
	}
}

function moveTopDivs(layerObj, inObjTop, inObjLeft){
	layerObj.top  = inObjTop;
	layerObj.left  = inObjLeft;
//	alert (layerObj.top);
//	alert (layerObj.left);
} 

function getDim(el){
	for (var lx=0,ly=0;el!=null;
		lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent);
	return {x:lx,y:ly}
}

//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"}
			}
		}
	}
}

onresize=setTopLayerPosition;
//********
function getfooterHTML(last_modified) {

if (last_modified == null) {
	last_modified_txt = '';
}
else {
	last_modified_txt=last_modified_txt+last_modified;
}

if (location.href.toString().search('booking')!=-1 && langNum==3) {
	var LID = langNum;
}
else {
	var LID = langID;
}


if(printPage==1){
	document.writeln('</td></tr>');
}
if(printPage!=1){
	if (menu != 'N'){
		document.writeln('										</td>');
		document.writeln('									</tr>');
		getFooter();
		document.writeln('					</table>');
	} else {
		document.writeln('		<table width="748" border="0" cellspacing="0" cellpadding="0">');
		document.writeln('			<tr><td><img src="'+graphicPath+'footer_gra2.gif" border="0" alt="" title="Image"></td></tr>');
		document.writeln('			<tr align="center">');
		document.writeln('				<td>');
		document.writeln('					<table width="748" border="0" cellspacing="0" cellpadding="0">');
		document.writeln('						<tr align="center"><td colspan="2" class="footer"><a href="'+MainSection[1][10]+'" class="footer">'+MainTitle[LID][10]+'</a> | <a href="'+MainSection[1][11]+'" class="footer">'+MainTitle[LID][11]+'</a> | <a href="'+MainSection[1][13]+'" class="footer">'+MainTitle[LID][13]+'</a></td></tr>');
		document.writeln('						<tr><td colspan="2"><img src="'+graphicPath+'footer_dotline.gif" width=748 height=13 border="0" alt="..." title="..."></td></tr>');
		document.writeln('						<tr><td align="left" valign="top" class="footer">'+last_modified_txt+'</td><td align="right" class="footer">'+copyright_txt+'</td></tr>');
		document.writeln('					</table>');
		document.writeln('				</td>');
		document.writeln('			</tr>');
		document.writeln('		</table>');
	}

	document.writeln('				</td>');
	document.writeln('			</tr>');
	document.writeln('		</table>');
}

	document.writeln('	</td></tr>');
	document.writeln('</table>');
}

//function for generating the layer for top button
function genfooterLayer(){

if (location.href.toString().search('booking')!=-1 && langNum==3) {
	var LID = langNum;
}
else {
	var LID = langID;
}

	var altText='Top';
	
	if(langID!=1) altText='­¶­º';
	

	if (document.layers)
		{document.writeln('<layer name=footer_layer top=0 left=0 width=273 height=21 visibility="hide">');}
	else
		{document.writeln('<div id="footer_layer" style="position:absolute; left:0; top:0; width:273; height:21; z-index:1; visibility: hidden"> ');}
	document.writeln('										<table width="273" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('											<tr align="right"><td><a href="#top" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'backtotopfoot\',\'\',\''+graphicPath+'btn_top_over.gif\',1)"><img src="'+graphicPath+'btn_top.gif" border="0" alt="'+altText+'" title="'+altText+'" name="backtotopfoot"></a></td></tr>');
	document.writeln('										</table>');
	if (document.layers)
		{document.writeln('</layer>');}
	else
		{document.writeln('</div>');}		
		
}

//function for generating the footer
function getFooter(){
if (location.href.toString().search('booking')!=-1 && langNum==3) {
	var LID = langNum;
}
else {
	var LID = langID;
}
	if (LID == 3) copyright_txt='°æÈ¨ËùÓÐc 2009 Ïã¸ÛÊªµØ¹«Ô°<br>ÇëÒÔ800x600½âÏñ¶È¼°Internet Explorer 5.0 / Netscape 4.7 ÒÔÉÏ°æ±¾ä¯ÀÀÒÔ´ïÖÁ×î¼ÑÐ§¹û¡£';
	var altText='Top';
	if(LID==2) altText='­¶­º';
	if(LID==3) altText=''
	
	var altBack='Back';
	if(LID==2) altBack='¦^¤W­¶';
	if(LID==3) altBack='';
	
	//generate the topic image to the buffer variable
/*		
		document.writeln('			<td height="15" bgcolor="#FFFFFF" class="footer"><b>'+copyYear+'</b> <img src="'+locationPath+'/images/copy.gif" alt="" width="12" height="11"> | <b><a href="'+noticesLink+'" class="footer">'+noticeText+'</a></b></td>');
		document.writeln('			<td height="15" align="right" bgcolor="#FFFFFF" class="footer">'+revisionText+showDate+'</td>');
*/		
		
	document.writeln('								<tr valign=top><td><img src="'+graphicPath+'spacer.gif" border="0" width="1" height="20" alt="-" title="-"></td></tr>');

	document.writeln('								<tr valign="top"><td><table cellpadding="0" cellspacing="0" width="100%" border="0"><tr valign=top>');
	if (backButton=='Y'){
		document.writeln('								<td align="left" width="273"><a href="javascript:window.history.back()" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'back\',\'\',\''+graphicPath+'btn_back_over.gif\',1)"><img src="'+graphicPath+'btn_back.gif" border="0" alt="'+altBack+'" title="'+altBack+'" name="back"></a></td>');
	} else{
		document.writeln('								<td><img src="'+graphicPath+'spacer.gif" border="0" width="273" height="21"></td>');
	}
	
	if(topButton=='Y')
		document.writeln('								<td><img src="'+graphicPath+'spacer.gif" name="backtotopspacer" border="0" width="273" height="21"></td>');

	document.writeln('								</tr></table></td></tr>');
	

	document.writeln('								</table>');
	document.writeln('							</td>');
	document.writeln('							<td bgcolor="#FFFFFF" background="'+graphicPath+'ins_content_space_right.gif" width="35"><img src="'+graphicPath+'hd_right2.gif" border="0" alt="" title="Image"></td>');
	document.writeln('						</tr>');
	document.writeln('					</table>');
	document.writeln('				</td>');
	document.writeln('			</tr>');
	document.writeln('			<tr><td><img src="'+graphicPath+'footer_gra1.gif" border="0" alt="" title="Image"></td></tr>');
	document.writeln('			<tr align="center">');
	document.writeln('				<td>');
	document.writeln('					<table width="748" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('						<tr align="center"><td colspan="2" class="footer"><a href="'+MainSection[1][10]+'" class="footer">'+MainTitle[LID][10]+'</a> | <a href="'+MainSection[1][11]+'" class="footer">'+MainTitle[LID][11]+'</a> | <a href="'+MainSection[1][13]+'" class="footer">'+MainTitle[LID][13]+'</a></td></tr>');
	document.writeln('						<tr><td colspan="2"><img src="'+graphicPath+'footer_dotline.gif" width=748 height=13 border="0" alt="..." title="..."></td></tr>');
	document.writeln('						<tr><td align="left" valign="top" class="footer">'+last_modified_txt+'</td><td align="right" class="footer">'+copyright_txt+'</td></tr>');
		
}

//********
function PopLink(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,width=700,height=500')");
	if ( nw.focus != null)
	{nw.focus();}
}

function PopTour(url, name, height)
{
	name = window.open(url, name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0,width=365,height='+height+'');
	if ( name.focus != null)
	{name.focus();}
}

function PopWin(url,x,y) {
  eval("nw = window.open(url,'content1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,pageXOffset=100,pageYOffset=100,top=0,left=0,width=" + x + ",height=" + y + "')");
  if ( nw.focus != null){
    nw.focus();
  }
}

function PopWin_normal(url) {
  newwindow = window.open(url);
  if (window.focus) {newwindow.focus()}
    return false;
}
		
function getSiteMap() {
	document.writeln('<table cellpadding="5" cellspacing="0" width="100%" border="0">');
	for (var i=0; i<MainSection[1].length; i++){
	if (i<15 && i != 4){
		document.writeln('	<tr valign="top"><td colspan="3"><a href="'+MainSection[1][i]+'">'+MainTitle[langID][i]+'</a></td></tr>');
		if (SubSection[1][i].length >0){
			for (var j=1; j<SubSection[1][i].length; j++){

				if (!((i ==6 && j ==6)||(i == 3 && j == 9)||(i == 3 && j ==9))){

					document.writeln('	<tr valign="top">');
					document.writeln('		<td nowrap><li></td>');
					document.writeln('		<td width="100%" colspan="2"><a href="'+SubSection[1][i][j]+'">'+SubSectionTitle[langID][i][j]+'</a></td>');
					document.writeln('	</tr>');
					if (SecondSubSection[1][i][j].length > 0){
						for (var k=1; k<SecondSubSection[1][i][j].length; k++){
							document.writeln('	<tr>');
							document.writeln('		<td>&nbsp;</td>');
							document.writeln('		<td nowrap>- </td>');
							document.writeln('		<td width="100%"><a href="'+SecondSubSection[1][i][j][k]+'">'+SecondSubSectionTitle[langID][i][j][k]+'</a></td>');
							document.writeln('	</tr>');
						}
					}

				}

			}
		}
	}
	}
	document.writeln('</table>');
}




//___________________________________________________________________________________________//
//-------------- Start - jumpMenu -------------------------------------//
/*
<select onChange="jumpMenu('parent',this,0)">
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
</select>
*/
function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-------------- End - jumpMenu -------------------------------------//


//___________________________________________________________________________________________//
function goToURL(url){
	location.href=url;
}


//___________________________________________________________________________________________//
/*
String.prototype.trim=trim;
function trim() {
	return this.replace(/^\s+|\s+$/g, "");
}
str = "       this is a sample     ";
alert(str.trim());
*/
function trim(str) {
	return str.replace(/^\s+|\s+$/g, "");
}


//___________________________________________________________________________________________//
function IsNumber(sText)
{
	alert('sfsfddsf');
   // var ValidChars = "-0123456789";
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
   hyphenCount = 0 ;
   
   if(sText.charAt(0) == "-" && Trim(sText).length == 1){
   	  return false;
   }
 
	for (i = 0; i < sText.length && IsNumber == true; i++) 
	{ 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
		if (Char == "-") {
			hyphenCount++;
		}
		if (hyphenCount > 1) {
			IsNumber = false;
		}
	}
   return IsNumber;   
 }

//___________________________________________________________________________________________//
function IsNumberOrLetter(sText)
{
   // var ValidChars = "-0123456789";
   var ValidChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
   var IsNumberOrLetter=true;
   var Char;
   hyphenCount = 0 ;
   
   if(sText.charAt(0) == "-" && Trim(sText).length == 1){
   	  return false;
   }
 
	for (i = 0; i < sText.length && IsNumberOrLetter == true; i++) 
	{ 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) {
			IsNumberOrLetter = false;
		}
		/*
		if (Char == "-") {
			hyphenCount++;
		}
		if (hyphenCount > 1) {
			IsNumber = false;
		}
		*/		
	}
   return IsNumberOrLetter;   
 }

 
 //___________________________________________________________________________________________//
 //___________________________________________________________________________________________//
function IsLogin(sText)
{
   var ValidChars = "-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
   var isOK=true;
   var Char;
   
   // if( (sText.charAt(0) == "-" || sText.charAt(0) == "_") || Trim(sText).length <= 1){
   if( sText.length < 1){
   	  return false;
   }
 
	for (i = 0; i < sText.length && isOK == true; i++) 
	{ 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) {
			isOK = false;
		}
	}
   return isOK;   
 }
 
  //___________________________________________________________________________________________//
function IsPassword(sText)
{
   var ErrorChars = "'\"";
   var isOK=true;
   var Char;
   
   if( Trim(sText).length < 8){
   	  return false;
   }
 
	for (i = 0; i < sText.length && isOK == true; i++) 
	{ 
		Char = sText.charAt(i); 
		if (ErrorChars.indexOf(Char) >= 1) {
			isOK = false;
		}	
	}
   return isOK;   
 }
 
 
//___________________________________________________________________________________________//
// only allow A-Z, a-z, 0-9
var PatternAlphaNumeric = /[^A-Za-z0-9]/

//Check Alpha Numeric formation
function isAlphaNumeric(value) {
	return checkPattern(value, PatternAlphaNumeric)
}

function checkPattern(value, pattern) {
	if(value.search(pattern) != -1)
		return false
	else
		return true
}



//___________________________________________________________________________________________//
//Check Data is valid
function isHKID(V) {
	var pattern = /[^A-Za-z0-9]/
	isOK = true ;
	
	if(V.search(pattern) != -1) {
		isOK = false ; }
		
	// if(V.length<7) {
	if(V.length<5) {
		isOK = false ; }

	return isOK ;
}



//___________________________________________________________________________________________//
//Check Data is valid
function isPhone(V) {
	var pattern = /[^0-9]/
	isOK = true ;
	
	if(V.search(pattern) != -1) {
		isOK = false ; }
		
	if(V.length<8) {
		isOK = false ; }

	return isOK ;
}



//___________________________________________________________________________________________//
//Check Data is valid
function isName(V) {
	var pattern = /[0-9]/
	isOK = true ;
	
	// alert( V.search(pattern) ) ; 
	
	// don't allow number
	if(V.search(pattern) == -1) {
	// if(V.search(pattern) >= 1) {
		isOK = false ; }
	else {
		isOK = true ; }
		
	// alert( V.search(pattern) ) ;
	// alert( 999 ) ;
	
	return isOK ;
	
	/*
	if(V.search(pattern) != -1) {
		isOK = true ; }
	else {
		isOK = false ; }

	return isOK ;
	*/
	
	/*
   var ValidChars = "0123456789";
   var isOK=true;
   var Char;

	for (i = 0; i < sText.length && isOK == true; i++) 
	{ 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) {
			isOK = false;
		}	
	}
   return isOK;   
	*/	
}

 
 
 
 
 
 
 
 
 
 
//___________________________________________________________________________________________//
// START : emailCheck
<!-- Begin
// function emailCheck (emailStr) {

// sunny.ho version at 2006-02-20
function isEmail (emailStr) {
	/* The following pattern is used to check if the entered e-mail address
	   fits the user@domain format.  It also is used to separate the username
	   from the domain. */
	var emailPat=/^(.+)@(.+)$/
	/* The following string represents the pattern for matching all special
	   characters.  We don't want to allow special characters in the address. 
	   These characters include ( ) < > @ , ; : \ " . [ ]    */
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	/* The following string represents the range of characters allowed in a 
	   username or domainname.  It really states which chars aren't allowed. */
	var validChars="\[^\\s" + specialChars + "\]"
	/* The following pattern applies if the "user" is a quoted string (in
	   which case, there are no rules about which characters are allowed
	   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
	   is a legal e-mail address. */
	var quotedUser="(\"[^\"]*\")"
	/* The following pattern applies for domains that are IP addresses,
	   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
	   e-mail address. NOTE: The square brackets are required. */
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	/* The following string represents an atom (basically a series of
	   non-special characters.) */
	var atom=validChars + '+'
	/* The following string represents one word in the typical username.
	   For example, in john.doe@somewhere.com, john and doe are words.
	   Basically, a word is either an atom or quoted string. */
	var word="(" + atom + "|" + quotedUser + ")"
	// The following pattern describes the structure of the user
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	/* The following pattern describes the structure of a normal symbolic
	   domain, as opposed to ipDomainPat, shown above. */
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	
	
	/* Finally, let's start trying to figure out if the supplied address is
	   valid. */
	
	/* Begin with the coarse pattern to simply break up user@domain into
	   different pieces that are easy to analyze. */
	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) {
	  /* Too many/few @'s or something; basically, this address doesn't
		 even fit the general mould of a valid e-mail address. */
		// alert("Email address seems incorrect (check @ and .)")
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]
	
	// See if "user" is valid 
	if (user.match(userPat)==null) {
		// user is not valid
		// alert("The email account name doesn't seem to be valid.")
		return false
	}
	
	/* if the e-mail address is at an IP address (as opposed to a symbolic
	   host name) make sure the IP address is valid. */
	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
		// this is an IP address
		  for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				// alert("Destination IP address is invalid!")
			return false
			}
		}
		return true
	}
	
	// Domain is symbolic name
	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
		// alert("The domain name of email address doesn't seem to be valid.")
		return false
	}
	
	/* domain name seems valid, but now make sure that it ends in a
	   three-letter word (like com, edu, gov) or a two-letter word,
	   representing country (uk, nl), and that there's a hostname preceding 
	   the domain or country. */
	
	/* Now we need to break up the domain to get a count of how many atoms
	   it consists of. */
	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || 
		domArr[domArr.length-1].length>3) {
	   // the address must end in a two letter or three letter word.
	   // alert("The email address must end in a three-letter domain, or two letter country.")
	   return false
	}
	
	// Make sure there's a host name preceding the domain.
	if (len<2) {
	   var errStr="This email address is missing a hostname!"
	   alert(errStr)
	   return false
	}
	
	// If we've gotten this far, everything's valid!
	return true;
}
//  End -->
// END : emailCheck
//___________________________________________________________________________________________//



//___________________________________________________________________________________________//
// This function accepts a string variable and verifies if it is a
// proper date or not. It validates format matching either
// mm-dd-yyyy or mm/dd/yyyy. Then it checks to make sure the month
// has the proper number of days, based on which month it is.
// The function returns true if a valid date, false if not.
function isDate(dateStr) {
	
	// var datePat = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
	var datePat = /^(\d{4})(\/|-)(\d{1,2})(\/|-)(\d{1,2})$/;
	
	var matchArray = dateStr.match(datePat); // is the format ok?
	
	if (matchArray == null) {
		// alert("Please enter date as either mm/dd/yyyy or mm-dd-yyyy.");
		alert("Please enter date as format of yyyy-mm-dd.");
		return false;
	}
	
	year = matchArray[1]; // p@rse date into variables
	month = matchArray[3];
	day = matchArray[5];
	
	var monthArr=new Array(12)
	monthArr[0]="January"
	monthArr[1]="February"
	monthArr[2]="March"
	monthArr[3]="April"
	monthArr[4]="May"
	monthArr[5]="June"
	monthArr[6]="July"
	monthArr[7]="August"
	monthArr[8]="September"
	monthArr[9]="October"
	monthArr[10]="November"
	monthArr[11]="December"
	
	if (month < 1 || month > 12) { // check month range
		alert("Month must be between 1 and 12.");
		return false;
	}
	
	if (day < 1 || day > 31) {
		alert("Day must be between 1 and 31.");
		return false;
	}
	
	if ((month==4 || month==6 || month==9 || month==11) && day==31) {
		// alert("Month "+month+" doesn't have 31 days!")
		alert(monthArr[month]+" doesn't have 31 days!")
		return false;
	}
	
	if (month == 2) { // check for february 29th
		var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
		if (day > 29 || (day==29 && !isleap)) {
			alert( monthArr[1] + " " + year + " doesn't have " + day + " days!");
			return false;
		}
	}

	return true; // date is valid
}
//___________________________________________________________________________________________//

function isPositive(V) {
	var pattern = /[^0-9]/
	isOK = true ;
	
	if(V.search(pattern) != -1) {
		isOK = false ; }

	return isOK ;
}

// by itmd

function getFormLang() {
	if(location.href.toString().search('/gb/')!=-1) {
		document.write ('<p>¥Ó½Ðªí®æ¡G<a href="../../sc/education/pe_booking.asp">ºô¤W¹w­qªA°È½Ð«ö³oùØ</a>');
	}
	else {
		document.write ('<p>¥Ó½Ðªí®æ¡G<a href="../../tc/education/pe_booking.asp">ºô¤W¹w­qªA°È½Ð«ö³oùØ</a>');
	}
}