var selectedSection;
var subSection;
var secondSubSection;
var exLevel;
var langID;
var langPath;
var locationPath;
var revisionDate;
var imagePath;
var	topButton;
var	backPage;
var	nextPage;
var	EngOnly;
var	vspace;
var isText;
var filePath='';
var folderPath='';
var textOnlyPath;
var graphicPath;
var isGICSearch=false;
var gbPreURL = "ht"+"tp://sc.info.gov.hk/TuniS/";
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->



/*
//Java Script variable for global use
if(location.href.toString().indexOf('test.cedd.gov.hk')!=-1){
	locationPath='ht'+'tp://test.cedd.gov.hk/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='sc.info.gov.hk/gb/';
	textOnlyPath="test.cedd.gov.hk/cgi-bin/cedd/TextOnly.pl"
}else if(location.href.toString().indexOf('ceddinternet')!=-1){
	locationPath='ht'+'tp://cintranet.cedd.hksarg/ceddinternet/ceddinternet/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='sc.info.gov.hk/gb/';
	textOnlyPath="www.cedd.gov.hk/cgi-bin/cedd/TextOnly.pl"
}else if(location.href.toString().indexOf('www.cedd.gov.hk')!=-1){
	locationPath='ht'+'tp://www.cedd.gov.hk/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='sc.info.gov.hk/gb/';
	textOnlyPath="www.cedd.gov.hk/cgi-bin/cedd/TextOnly.pl"
}else if(location.href.toString().indexOf('se.cgi')!=-1){
	locationPath='ht'+'tp://www.cedd.gov.hk/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='sc.info.gov.hk/gb/';
	textOnlyPath="www.cedd.gov.hk/cgi-bin/cedd/TextOnly.pl"
	isGICSearch=true;
}else{
	locationPath='ht'+'tp://cedd-demo.ai-sol.com/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='sc.info.gov.hk/gb/';
	textOnlyPath="cedd-demo.ai-sol.com/cgi-bin/cedd/TextOnly.pl"
}
*/
if(location.href.toString().indexOf('www0.cms.new.cedd.gov.hk')!=-1){
	locationPath='ht'+'tp://www0.cms.new.cedd.gov.hk/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='www0.cms.new.cedd.gov.hk/gb/';
	textOnlyPath="www0.cms.new.cedd.gov.hk/cgi-bin/cedd/TextOnly.pl"
}else if(location.href.toString().indexOf('www.cms.new.cedd.gov.hk')!=-1){
	locationPath='ht'+'tp://www.cms.new.cedd.gov.hk/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='www.cms.new.cedd.gov.hk/gb/';
	textOnlyPath="www.cms.new.cedd.gov.hk/cgi-bin/cedd/TextOnly.pl"
}else if(location.href.toString().indexOf('cedd-demo.ai-sol.com')!=-1){
	gbPreURL = "ht"+"tp://203.194.194.248:443/TuniS/";
	locationPath='ht'+'tp://cedd-demo.ai-sol.com/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='cedd-demo.ai-sol.com/gb/';
	textOnlyPath="cedd-demo.ai-sol.com/cgi-bin/cedd/TextOnly.pl"
}else if(location.href.toString().indexOf('cintranet.cedd.hksarg')!=-1){
	locationPath='ht'+'tp://cintranet.cedd.hksarg/ceddinternet/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='sc.info.gov.hk/gb/';
	textOnlyPath="cintranet.cedd.hksarg/ceddinternet/cgi-bin/cedd/TextOnly.pl"
}else{
	locationPath='ht'+'tp://www.cedd.gov.hk/';
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='sc.info.gov.hk/gb/';
	textOnlyPath="www.cedd.gov.hk/cgi-bin/ceddnew/cedd/TextOnly.pl"
}
/*
if (location.href.toString().indexOf('TuniS')!=-1){
	locationPath= gbPreURL+locationPath.substring(7,locationPath.length);
	graphicPath=locationPath.substring(7,locationPath.length);
	gb_urlPath='';
	textOnlyPath=locationPath.substring(7,locationPath.length)+"/cgi-bin/cedd/TextOnly.pl"
}*/

//change the locationPath for text only version
if(location.href.toString().indexOf('TextOnly.pl')!=-1|| location.search.toString().indexOf('isText=true')!=-1){
	isText=true;
	locationPath="ht"+"tp://"+textOnlyPath+"?search=";
}else{
	isText=false;
}

//function for getting the parameter from the path
function QueryString(key)
{
	var value = null;
	for (var i=0;i<QueryString.keys.length;i++)
	{
		if (QueryString.keys[i]==key)
		{
			value = QueryString.values[i];
			break;
		}
	}
	return value;
}
QueryString.keys = new Array();
QueryString.values = new Array();

function QueryString_Parse()
{
	var query = window.location.search.substring(1);
	var pairs = query.split("&");

	for (var i=0;i<pairs.length;i++)
	{
		var pos = pairs[i].indexOf('=');
		if (pos >= 0)
		{
			var argname = pairs[i].substring(0,pos);
			var value = pairs[i].substring(pos+1);
			QueryString.keys[QueryString.keys.length] = argname;
			QueryString.values[QueryString.values.length] = value;
		}
	}
}
QueryString_Parse();

//function for text only version to get the real path of the HTML file
function updatePath(oldFilePath)
{
	var arFilePath = new Array();
	arFilePath = oldFilePath.split("/");
	var arFilePathTemp = new Array();
	for (i in arFilePath)
	{
	   if (arFilePath[i] != "..")
	   {arFilePathTemp.push(arFilePath[i]);}
	   else
	   {arFilePathTemp.pop();}
	}
	var newFilePath = "";
	return newFilePath = arFilePathTemp.join("/");
}

//set the lang path and lang ID

if(isText)
{
	if(location.search.toString().indexOf('search=')!=-1)
	{
		filePath=updatePath(QueryString("search"))
		folderPath=filePath.substring(0,filePath.lastIndexOf("/")+1)
	}

	if(filePath.search('eng/')!=-1 || location.search.toString().indexOf('lang=eng')!=-1 || location.search.toString().indexOf('mode=229')!=-1 || location.href.toString().indexOf('mode=253')!=-1){
		langPath = 'eng/';
		langID=1;
		vspace=0;
	}else{
		langPath = 'tc/';
		langID=2;
		vspace=3;
	}
}else{
	if(document.URL.toString().search('/eng/')!=-1 || location.search.toString().indexOf('lang=eng')!=-1 || location.search.toString().indexOf('mode=229')!=-1 || location.href.toString().indexOf('mode=253')!=-1){
		langPath = 'eng/';
		langID=1;
		vspace=0;
	}else{
		langPath = 'tc/';
		langID=2;
		vspace=3;
	}
}

//change the location path and image path for Simplified Chinese version
if(document.URL.toString().search('/gb/')!=-1){
	imagePath = locationPath+'gb/';
	locationPath='ht'+'tp://'+gb_urlPath+locationPath.substring(7, locationPath.length);
}else{
	imagePath = locationPath+langPath;
}

//function for mouse over effect on left menu
function overTopMenu(obj)
{
        if (document.images){
				eval("document.images." + obj + ".src = '"+imagePath+"images/" + obj + "_f2.gif'");
        }
}

//function for mouse out effect on left menu
function outTopMenu(obj)
{
        if (document.images){
				eval("document.images." + obj + ".src = '"+imagePath+"images/" + obj + ".gif'");
        }
}

//function for switching image
function simg(obj,src)
{
        if (document.images){
                obj.src = src;
        }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  if(isText) theURL="ht"+"tp://"+graphicPath+updatePath(folderPath+theURL);
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  var tempPath = "";
  if(isText) {tempPath=locationPath+folderPath;}
  eval(targ+".location='"+tempPath+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//function for external link
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,width=700,height=500')");
	if ( nw.focus != null)
	{nw.focus();}
}

//function for document. e.g. doc, pdf
function documentPopUp(url){
	if(isText) url="ht"+"tp://"+graphicPath+updatePath(folderPath+url);
	eval("nw = window.open(url, 'document','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 for pdf which have Simplified Chinese version
function documentPopUpGb(url){
	if(isText) url="ht"+"tp://"+graphicPath+updatePath(folderPath+url);
	if(url.toString().search('.pdf') != -1){
		url = url.replace('doc/', 'doc_gb/');
	}

	eval("nw = window.open(url, 'document','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 for switching language
function changeLanguage(switchLang){
	var locationPage;
	var currentPath=document.URL.toString();
	var slash="/";
	var tempSwitchLang=switchLang;
	var switchTc="/tc/";
	var ready = true;

	//use for special case
	//Major Project
	if(location.href.toString().search('search.*cgi')!=-1){
	//if(location.search.toString().indexOf('isText=true')!=-1&&location.href.toString().indexOf('/cgi-bin/se.cgi')==-1){
		if(secondSubSection!="" && secondSubSection>0){
			currentPath=SecondSubSection[langID][selectedSection][subSection][secondSubSection];
		}else if(subSection!="" && subSection>0){
			currentPath=SubSection[langID][selectedSection][subSection];
		}else{
			currentPath=MainSection[langID][selectedSection];
		}
	}

	if(isText){
		currentPath=currentPath.replace(location.search,"?search="+filePath)
		slash="=";
		switchTc="=tc/";
		tempSwitchLang="="+switchLang.substring(1,switchLang.length);
	}

	if(isGICSearch){
		currentPath=document.URL.toString();
		slash="=";
		switchTc="=tc/";
		tempSwitchLang="="+switchLang.substring(1,switchLang.length);
	}

	if(switchLang=='/text/'){
		if(isText){
			//locationPage=currentPath.replace(textOnlyPath+"?search=",graphicPath);
			locationPage=currentPath.replace(textOnlyPath,"");
			locationPage=locationPage.replace("?search=",graphicPath);
		}else{
			locationPage=currentPath.replace(graphicPath,textOnlyPath+"?search=")
			if(isGICSearch){
				if(langID==1){
					alert("Search function for text only version is not available")
				}else{
					alert("本網站並沒有提供純文字版本的搜尋功能")
				}
				ready=false
			}
		}
	}else if(switchLang=='/gb/'){
		locationPage=currentPath.substring(7, currentPath.length);
		if(langID==1){
			locationPage='ht'+'tp://'+gb_urlPath+locationPage.replace(slash+langPath, switchTc);
		}else{
			locationPage='ht'+'tp://'+gb_urlPath+locationPage;
		}
	}else{
		if(currentPath.search('/gb/')!=-1){
			locationPage=currentPath.replace(gb_urlPath, "");
			locationPage=locationPage.replace(slash+langPath, tempSwitchLang);
		}else{
			locationPage=currentPath.replace(slash+langPath, tempSwitchLang);
		}
	}

//	alert(locationPage);
	if (ready){
		document.location=locationPage;
	}
}

//function for generating the top menu
function getTopMenu(){

	if(langID==1){
		var extarSpacer = '<td background="'+imagePath+'images/mainbar5.gif" bgcolor="#FAFAEB"><img name="mainbar5" src="'+imagePath+'images/spacer.gif" border="0" height=1 width=145 alt=""></td>';
	}else{
		var extarSpacer = '<td background="'+imagePath+'images/mainbar5.gif" bgcolor="#FAFAEB"><img name="mainbar5" src="'+imagePath+'images/spacer.gif" border="0" height=1 width=155 alt=""></td>';
	}

	var gicSearchForm;

	gicSearchForm='<form name="frmSearch" action="'+arClfTopMenu[langID][1]+'" method="get">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="mode" type="hidden" value="'+arClfTopMenu[langID][2]+'">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="lmode" type="hidden" value="1">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="pq" type="hidden" value="">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="pg" type="hidden" value="">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="pn" type="hidden" value="0">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="qm" type="hidden" value="0">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="la" type="hidden" value="1">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="de" type="hidden" value="0">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="so" type="hidden" value="0">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="nu" type="hidden" value="10">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="ca" type="hidden" value="0">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="ta" type="hidden" value="all">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="fu" type="hidden" value="">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="fd" type="hidden" value="">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="ma" type="hidden" value="100">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="ft_1" type="hidden" value="alltype">\n';
	gicSearchForm=gicSearchForm+'<INPUT name="gr_1" type="hidden" value="'+arClfTopMenu[langID][23]+'">\n';

	//graphic version
	if(!isText){
		document.writeln('	<tr>');
		document.writeln('	<td colspan="2">');
		document.writeln('		<table width="778" border="0" cellpadding="0" cellspacing="0" background="'+locationPath+'/images/bg.gif">');
		document.writeln(gicSearchForm);
		document.writeln('		<tr align="left" valign="top">');
		document.writeln('			<td colspan="6" class="sidebar" background="'+imagePath+'images/bkgdtexture.gif" bgcolor="#FAFAEB"><a href="'+locationPath+'index.htm"><img src="'+imagePath+'images/branding.gif" border=0 alt="'+arClfTopMenu[langID][3]+'"></a></td>');
		document.writeln('			<td rowspan="2" valign="bottom" background="'+imagePath+'images/bkgdtexture.gif" align=center><input type="text" name="qu" size="'+arClfTopMenu[langID][4]+'" class="search"></td>');
		document.writeln('			<td background="'+imagePath+'images/bkgdtexture.gif" bgcolor="#FAFAEB">&nbsp;</td>');
		//document.writeln('			<td background="'+imagePath+'images/bkgdtexture.gif" colspan="2" valign="bottom" align=right bgcolor="#FAFAEB"><a href="'+arClfTopMenu[langID][5]+'" target="_top"><img name="BrandHK" src="'+imagePath+'images/brandhk.gif" border="0" alt="'+arClfTopMenu[langID][6]+'"></a></td>');

		document.writeln('			<td background="'+imagePath+'images/bkgdtexture.gif" colspan="2" valign="bottom" align=right bgcolor="#FAFAEB"></td>');
		document.writeln('			<div id="Layer1" style="position:absolute; width:190px; height:60px; z-index:1; left: 600px; "><a href="'+arClfTopMenu[langID][5]+'" target="_top"><img src="'+imagePath+'images/brandhk.gif " border="0" alt="'+arClfTopMenu[langID][6]+'"></a>  </div>');

		document.writeln('		</tr>');
		document.writeln('		<tr align="left" valign="top">');
		document.writeln('			<td background="'+locationPath+langPath+'images/bkgdtexture.gif"><a href="'+arClfTopMenu[langID][24]+'" onMouseOut="outTopMenu(\'mainbar1\')" onMouseOver="overTopMenu(\'mainbar1\')"><img name="mainbar1" src="'+imagePath+'images/mainbar1.gif" border="0" alt="'+arClfTopMenu[langID][7]+'"></a></td>');
		document.writeln('			<td align="left" valign="top"><a href="javascript:changeLanguage(\''+arClfTopMenu[langID][9]+'\')" onMouseOut="outTopMenu(\'mainbar2\')" onMouseOver="overTopMenu(\'mainbar2\')"><img name="mainbar2" src="'+imagePath+'images/mainbar2.gif" border="0" alt="'+arClfTopMenu[langID][10]+'"></a></td>');
		document.writeln('			<td align="left" valign="top"><a href="javascript:changeLanguage(\''+arClfTopMenu[langID][12]+'\')" onMouseOut="outTopMenu(\'mainbar3\')" onMouseOver="overTopMenu(\'mainbar3\')"><img name="mainbar3" src="'+imagePath+'images/mainbar3.gif" border="0" alt="'+arClfTopMenu[langID][13]+'"></a></td>');
		document.writeln('			<td align="left" valign="top"><a href="javascript:changeLanguage(\''+arClfTopMenu[langID][15]+'\')" onMouseOut="outTopMenu(\'mainbar4\')" onMouseOver="overTopMenu(\'mainbar4\')"><img name="mainbar4" src="'+imagePath+'images/mainbar4.gif" border="0" alt="'+arClfTopMenu[langID][16]+'"></a></td>');
		document.writeln(extarSpacer);
	//	document.writeln('			<td background="'+imagePath+'images/mainbar5.gif" bgcolor="#FAFAEB"><img name="mainbar5" src="'+imagePath+'images/spacer.gif" border="0" height=1 width=64 alt=""></td>');
		document.writeln('			<td background="'+imagePath+'images/bkgdtexture.gif"><a href="javascript:document.frmSearch.submit();" onMouseOut="outTopMenu(\'mainbar6\')" onMouseOver="overTopMenu(\'mainbar6\')"><img name="mainbar6" src="'+imagePath+'images/mainbar6.gif" border="0" alt="'+arClfTopMenu[langID][17]+'"></a></td>');
		document.writeln('			<td background="'+imagePath+'images/bkgdtexture.gif"><a href="javascript:document.frmSearch.submit();" onMouseOut="outTopMenu(\'mainbar8\')" onMouseOver="overTopMenu(\'mainbar8\')"><img name="mainbar8" src="'+imagePath+'images/mainbar8.gif" border="0" alt="'+arClfTopMenu[langID][17]+'"></a></td>');
		document.writeln('			<td background="'+imagePath+'images/bkgdtexture.gif"><a href="'+locationPath+langPath+'sitemap/index.htm" onMouseOut="outTopMenu(\'mainbar9\')" onMouseOver="overTopMenu(\'mainbar9\')"><img name="mainbar9" src="'+imagePath+'images/mainbar9.gif" border="0" alt="'+arClfTopMenu[langID][18]+'"></a></td>');
		document.writeln('			<td background="'+imagePath+'images/bkgdtexture.gif" bgcolor="#FAFAEB"><a href="'+locationPath+langPath+'contact/index.htm" onMouseOut="outTopMenu(\'mainbar10\')" onMouseOver="overTopMenu(\'mainbar10\')"><img name="mainbar10" src="'+imagePath+'images/mainbar10.gif" border="0" alt="'+arClfTopMenu[langID][19]+'"></a></td>');
		document.writeln('		</tr>');
		document.writeln('		<tr align="left" valign="top" bgcolor="#BB3333">');
		document.writeln('			<td height=2 colspan="10"><img src="'+imagePath+'images/reddot.gif" width="778" height="2" alt="" border=0></td>');
		document.writeln('		</tr>');
		document.writeln('		</form>');
		document.writeln('		</table>');
		document.writeln('		</td>');
		document.writeln('	</tr>');
		document.writeln('	<tr>');
		document.writeln('		<td colspan=2><img src="'+imagePath+'images/main_img.jpg" alt="" border="0"></td>');
		document.writeln('	</tr>');
	}else{
	//text only version
		document.writeln('<tr valign=top>');
		document.writeln('<td>');
		document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.writeln('<tr>');
		document.writeln('	<td colspan="3"><p><span class="Heading"><b>'+arClfTopMenu[langID][20]+'</b></span></p>');
		document.writeln('</td></tr>');
		document.writeln('<tr>');
		document.writeln('	<td colspan="3">&nbsp;');
		document.writeln('</td>');
		document.writeln('</tr>');
		document.writeln(gicSearchForm);
		document.writeln('<tr valign="middle">');
		document.writeln('	<td colspan=3>');
		document.writeln('			[ <a href="http://www.info.gov.hk/">'+arClfTopMenu[langID][7]+'</a> ]&nbsp;');
		document.writeln('			[ <a href="javascript:changeLanguage(\''+arClfTopMenu[langID][9]+'\')">'+arClfTopMenu[langID][21]+'</a> ]&nbsp;');
		document.writeln('			[ <a href="javascript:changeLanguage(\''+arClfTopMenu[langID][12]+'\')">'+arClfTopMenu[langID][13]+'</a> ]&nbsp;');
		document.writeln('			[ <a href="javascript:changeLanguage(\''+arClfTopMenu[langID][15]+'\')">'+arClfTopMenu[langID][16]+'</a> ]&nbsp;');
		document.writeln('			&nbsp;[&nbsp;<a href="javascript:document.frmSearch.submit();">'+arClfTopMenu[langID][17]+'</a>&nbsp;]&nbsp;');
		document.writeln('			<input type="text" size="9" name="qu">&nbsp;');
		document.writeln('			[ <a href="'+locationPath+langPath+'sitemap/index.htm">'+arClfTopMenu[langID][18]+'</a> ]');
		document.writeln('			 [ <a href="'+locationPath+langPath+'contact/index.htm">'+arClfTopMenu[langID][19]+'</a> ] ');
		document.writeln('	</td>');
		document.writeln('</tr>');
		document.writeln('		</form>');
		document.writeln('<tr>');
		document.writeln('	<td colspan="3"><hr></td>');
		document.writeln('</tr>');
		document.writeln('<tr>');
		document.writeln('	<td colspan="3">[ <a href="javascript:history.back();">'+arClfTopMenu[langID][22]+'</a> ]</td>');
		document.writeln('</tr>');
		document.writeln('<tr>');
		document.writeln('	<td colspan="3"><hr></td>');
		document.writeln('</tr>');
		document.writeln('</table>');
		document.writeln('</td>');
		document.writeln('</tr>');
	}
}

//function for generating the left menu
function getLeftMenu(){
	var isOver='';
	var iconNo = '';
	var mainOrder = 0;
	var hkssAlt='Hong Kong Slope Safety';
	var hkssLink='http://hkss.cedd.gov.hk/hkss/index.htm';
	var hkssTextLink='http://hkss.cedd.gov.hk/hkss/index.htm';
	var fivedayLink=locationPath+langPath+'fiveday/5day.htm';

	if(langID==2){hkssAlt='香港斜波安全';}
	if(langID==2){fivedayLink=locationPath+langPath+'fiveday/5day.htm';}

	//graphic version
	if(!isText){
		document.writeln('	<td rowspan=2 valign="top" width="153" background="'+imagePath+'images/left_bg.gif">');
		document.writeln('	<table border="0" cellpadding="0" cellspacing="0">');
		for (var i in MainSectionOrder[langID]){
			mainOrder=MainSectionOrder[langID][i];
			if(parseInt(mainOrder) < 100){
				iconNo = parseInt(mainOrder) + 1;
				(selectedSection==mainOrder)?isOver='-over':isOver='';
				document.writeln('	<tr>');
				document.writeln('		<td><a href="'+MainSection[langID][mainOrder]+'" onmouseover="simg(document.t'+iconNo+', \''+imagePath+'images/menu/topic'+iconNo+'-over.gif\')" onmouseout="simg(document.t'+iconNo+', \''+imagePath+'images/menu/topic'+iconNo+isOver+'.gif\')"><img src="'+imagePath+'images/menu/topic'+iconNo+isOver+'.gif" alt="'+MainTitle[langID][mainOrder]+'" name="t'+iconNo+'" border="0"></a></td>');
				document.writeln('	</tr>');
			}
		}


		document.writeln('	<tr>');
		document.writeln('		<td align=center background="'+imagePath+'images/left_1.gif"><img src="'+imagePath+'images/spacer.gif" alt="" border="0" width=1 height=15><br><a href="'+fivedayLink+'"><img src="'+imagePath+'images/5day_icon.jpg" alt="5 Days" border="0" align=center></td>');

//		document.writeln('		<td align=center background="'+imagePath+'images/left_1.gif"><img // src="'+imagePath+'images/spacer.gif" alt="" border="0" width=1 height=15><br><a href="javascript:externalLink// (\''+fivedayLink+'\');"><img src="'+imagePath+'images/5day_icon.jpg" alt="5 Days" border="0" align=center></td>');

		document.writeln('	</tr>');






		document.writeln('	<tr>');
		document.writeln('		<td align=center background="'+imagePath+'images/left_1.gif"><img src="'+imagePath+'images/spacer.gif" alt="" border="0" width=1 height=15><br><a href="javascript:externalLink(\''+hkssLink+'\');"><img src="'+imagePath+'images/hkss.gif" alt="'+hkssAlt+'" border="0" align=center></a></td>');
		document.writeln('	</tr>');
		/*document.writeln('	<tr>');
		document.writeln('		<td><img src="'+imagePath+'images/left_1.gif" alt="" border="0"></td>');
		document.writeln('	</tr>');*/
		document.writeln('	</table>');
		document.writeln('	</td>');
	}else{
	//text only version
		document.writeln('	<td valign=top>');
		document.writeln('	<table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.writeln('	<tr>');
		document.writeln('	<td>');
		for (var i in MainSectionOrder[langID]){
			mainOrder=MainSectionOrder[langID][i];
			if(parseInt(mainOrder) < 100){
				document.writeln('[ <a href="'+MainSection[langID][mainOrder]+'">'+MainTitle[langID][mainOrder]+'</a> ]');
			}
		}
		document.writeln('<a href="javascript:externalLink(\''+hkssTextLink+'\');">'+hkssAlt+'</a>');
		document.writeln('	</td>');
		document.writeln('	</tr>');
		document.writeln('	<tr>');
		document.writeln('	<td><hr>');
		document.writeln('	</td>');
		document.writeln('	</tr>');
		document.writeln('	</table>');
		document.writeln('	</td>');
		document.writeln('	</tr>');
		document.writeln('	<tr>');
	}
	mainOrder = 0;
}

//function for generating the path indicator
function getPath(){
	var strBuffer='<a href="'+MainSection[langID][0]+'" class="pathLink">'+MainTitle[langID][0]+'</a>';
	if(subSection>0){
		if(selectedSection>0) strBuffer+=' > <a href="'+MainSection[langID][selectedSection]+'" class="pathLink">'+MainTitle[langID][selectedSection]+'</a>';
	}else{
		if(exLevel){
			if(selectedSection>0) strBuffer+=' > <a href="'+MainSection[langID][selectedSection]+'" class="pathLink">'+MainTitle[langID][selectedSection]+'</a>';
		}else{
			if(selectedSection>0) strBuffer+=' > '+MainTitle[langID][selectedSection];
		}
	}
	if(secondSubSection>0){
		if(subSection>0) strBuffer+=' > <a href="'+SubSection[langID][selectedSection][subSection]+'" class="pathLink">'+SubSectionTitle[langID][selectedSection][subSection]+'</a>';
	}else{
		if(exLevel){
			if(subSection>0) strBuffer+=' > <a href="'+SubSection[langID][selectedSection][subSection]+'" class="pathLink">'+SubSectionTitle[langID][selectedSection][subSection]+'</a>';
		}else{
			if(subSection>0) strBuffer+=' > '+SubSectionTitle[langID][selectedSection][subSection];
		}

	}
	if(secondSubSection>0){
		if(exLevel){
			strBuffer+=' > <a href="'+SecondSubSection[langID][selectedSection][subSection][secondSubSection]+'" class="pathLink">'+SecondSubSectionTitle[langID][selectedSection][subSection][secondSubSection]+'</a>';
		}else{
			strBuffer+=' > '+SecondSubSectionTitle[langID][selectedSection][subSection][secondSubSection];
		}
	}

	if(exLevel){
		strBuffer+=' > '+exLevel;
	}

	//graphic version only
	if(!isText){
		document.writeln('<table border=0 cellpadding=0 cellspacing=0 background="'+imagePath+'images/spacer.gif">');
		document.writeln('<tr valign=top>');
		document.writeln('<td width=20><img src="'+imagePath+'images/spacer.gif" alt="" border="0" width=20 height=1></td>');
		document.writeln('<td class="path">'+strBuffer+'</td>');
		document.writeln('</tr>');
		document.writeln('<tr><td colspan=2><img src="'+imagePath+'images/spacer.gif" alt="" border="0" width=1 height=10></td></tr>');
		document.writeln('</table>');
	}
}

//function for generating the topic image
function getTopic(){
	var altText = '';
	var imgPath = '';
	altText = MainTitle[langID][selectedSection];

	if(!isText){
		document.write('<img src="'+imagePath+'images/header/heading_'+(selectedSection+1)+'.gif" alt="'+altText+'" border="0">');
	}else{
		document.writeln('<p class="title">'+altText+'</p>');
	}
}

//function for generating the top button
function getButton(num){
	var altText='Top';
	if(langID!=1) altText='頁首';
	if(!isText){
		document.writeln('<p align=right><a href="#"><img src="'+imagePath+'images/btn_top.gif" alt="'+altText+'" border="0" hspace=2></a></p>');
	}else{
		document.writeln('<p align=right><a href="#">'+altText+'</a></p>');
	}

	/*if(backPage!='' || nextPage!=''){
		document.writeln('<p><table border=0 cellspacing=0 cellpadding=0 width=100%><tr valign=top>');

		if(backPage!='')
			document.writeln('<td><a href="'+backPage+'"><img src="../images/btn_back.gif" alt="" border="0"></a></td>');
		if(nextPage!='')
			document.writeln('<td align=right><a href="'+nextPage+'"><img src="../images/btn_next.gif" alt="" border="0"></a></td>');

		document.writeln('</tr></table>');
	}*/
}

//function for generating the the text below
function otherLangOnly(){
	var TextStr='<p>We only provide <a href="javascript:changeLanguage(\'/tc/\');" class="text_link">Chinese Version</a>.</p>';
	if(langID==2) TextStr='<p>我們只提供<a href="javascript:changeLanguage(\'/eng/\');" class="text_link">英文版本</a>。</p>';
	document.writeln(TextStr);
}

//function for generating the the text for downloading acrobat reader
function getAcrobat(){
	var StrText='To view or download the following document, please download <a class="text_link" href="javascript:externalLink(\'http://www.adobe.com/prodindex/acrobat/readstep.html\');">Acrobat Reader</a>.';
	if(langID==2) StrText='如想觀看以上文件，請下載<a class="text_link" href="javascript:externalLink(\'http://www.adobe.com/prodindex/acrobat/readstep.html\');">Acrobat Reader</a> 。';
	var StrImg='<img src="'+locationPath+'images/acrobat.gif" border=0 align=top alt="Acrobat Reader">';
	if(isText) StrImg='Acrobat Reader';

	document.writeln('<p><table border=0 cellspacing=0 cellpadding=2 width=100%>');
	document.writeln('<tr valign=top><td width=1%><a href="javascript:externalLink(\'http://www.adobe.com/prodindex/acrobat/readstep.html\');">'+StrImg+'</a></td>');
	document.writeln('<td class="maincontent" width=99%>'+StrText+'</td></tr>');
	document.writeln('</table>');
}

var resizeFlag;
var footerY = 600;

function moveDivs(layerObj, inObj){
	layerObj.top  = inObj;
}

function moveTopDivs(layerObj, inObjTop, inObjLeft){
	layerObj.top  = inObjTop;
	layerObj.left  = inObjLeft;
}

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"}
			}
		}
	}
}

if(!isText){
	onresize=setTopLayerPosition;
}

//function for generating the layer for top button
function genfooterLayer(){
	var altText='Top';

	if(langID!=1) altText='頁首';

	if(!isText){
		if (document.layers)
			{document.writeln('<layer name=footer_layer top=0 left=0 width=26 height=26 visibility="hide">');}
		else
			{document.writeln('<div id="footer_layer" style="position:absolute; left:0; top:0; width:26; height:26; z-index:1; visibility: hidden"> ');}
		document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.writeln('<tr valign=top>');
		document.writeln('	<td><a href="#top"><img src="'+imagePath+'images/btn_top.gif" alt="'+altText+'" border="0" name="backtotopfoot"></a></p></td>');
		document.writeln('</tr>');
		document.writeln('</table>');
		if (document.layers)
			{document.writeln('</layer>');}
		else
			{document.writeln('</div>');}
	}
}

//function for generating the footer
function getFooter(){
	var altText='Top';
	if(langID!=1) altText='頁首';
	var copyYear='2004';
	var noticesLink=locationPath+langPath+'notices/index.htm';
	var noticeText='Important notices';
	var revisionText='Last Review Date: ';
	if (revisionDate==''||revisionDate=='MM/DD/YYYY') revisionDate='07/01/2004';
	//Connie
	if (document.lastModified>='01/01/2005') revisionDate=document.lastModified;
	//end connie
	if (langID==2){
		noticeText='重要告示';
		revisionText='覆檢日期： ';
	}
	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()+'日';
	//generate the topic image to the buffer variable
	if(!isText){
		document.writeln('<p>');
		document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
		if(topButton=='Y')
			document.writeln('	<tr valign=top><td colspan=2 align=right><img src="'+imagePath+'images/spacer.gif" name="backtotopspacer" width=38 height=20></td></tr>');
		document.writeln('	<tr>');
		document.writeln('		<td><img src="'+imagePath+'images/spacer.gif" alt="" border="0" width=5 height=1></td>');
		document.writeln('		<td valign="top" align="center"> ');
		document.writeln('		<table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.writeln('		<tr bgcolor="#FFFFFF">');
		document.writeln('			<td colspan="2"><img src="'+imagePath+'images/botdot.jpg" alt="" width="628" height="3" border=0></td>');
		document.writeln('		</tr>');
		document.writeln('		<tr bgcolor="#FFFFFF">');
		document.writeln('			<td height="15" bgcolor="#FFFFFF" class="footer"><b>'+copyYear+'</b> <img src="'+imagePath+'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>');
		document.writeln('		</table>');
		document.writeln('		</td>');
		document.writeln('	</tr>');
		document.writeln('</table><br>');
	}else{
		document.writeln('	</td>');
		document.writeln('	</tr>');
		document.writeln('	<tr>');
		document.writeln('	<td>');
		document.writeln('<p><table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.writeln('<tr>');
		document.writeln('	<td colspan=2><hr></td>');
		document.writeln('</tr>');
		document.writeln('<tr>');
		document.writeln('	<td>[ <a href="#">'+altText+'</a> ]</td>');
		document.writeln('</tr>');
		document.writeln('<tr>');
		document.writeln('	<td colspan=2><hr></td>');
		document.writeln('</tr>');
		document.writeln('<tr>');
		document.writeln('	<td>Copyright 2004 | <a href="'+noticesLink+'">'+noticeText+'</a><br></td>');
		document.writeln('	<td align="right">'+revisionText+showDate+'</td>');
		document.writeln('</tr>');
		document.writeln('</table></p>');
	}
}

//function for generating the sitemap
function getSiteMap(){
	var mainOrder = 0;
	var subOrder = 0;
	var secondSubOrder = 0;
	var LineBroken='<br>';
	var bullet1='<img src="'+locationPath+langPath+'images/bullet_1.gif" alt="*" vspace='+vspace+' border="0" hspace=3>';
	var bullet2='<img src="'+locationPath+langPath+'images/bullet_2.gif" alt="*" vspace='+vspace+' border="0" hspace=3>';
	var bullet3='<img src="'+locationPath+langPath+'images/bullet_3.gif" alt="*" vspace='+vspace+' border="0" hspace=3>';
	if(isText){
		bullet1="*";
		bullet2="*";
		bullet3="*";
	}
	document.write('<table border=0 cellspacing=0 cellpadding=0 width=100%>');
	for(var i in MainSectionOrder[langID]){
		mainOrder=MainSectionOrder[langID][i];
		if (MainTitle[langID][mainOrder] != ''){
			checkLinkLang(MainSection[langID][mainOrder]);
			document.writeln('<tr valign=top><td width=1%>'+bullet1+'</td>');
			document.writeln('<td class="maincontent" width=99%><a href="'+MainSection[langID][mainOrder]+'" class="text_link">'+MainTitle[langID][mainOrder]+'</a>'+EngOnly);
			if((SubSectionTitle[langID][mainOrder] != null) && (SubSectionTitle[langID][mainOrder].length > 0)){
				document.write(LineBroken+LineBroken+'<table border=0 cellspacing=0 cellpadding=0 width=100%>');
				for(var j in SubSectionOrder[langID][mainOrder]){
					subOrder=SubSectionOrder[langID][mainOrder][j];
					if (SubSectionTitle[langID][mainOrder][subOrder] != ''){
						checkLinkLang(SubSection[langID][mainOrder][subOrder]);
						document.writeln('<tr valign=top><td width=1%>'+bullet2+'</td>');
						document.writeln('<td class="maincontent" width=99%><a href="'+SubSection[langID][mainOrder][subOrder]+'" class="text_link">'+SubSectionTitle[langID][mainOrder][subOrder]+'</a>'+EngOnly);
						if((SecondSubSectionTitle[langID][mainOrder][subOrder] != null) && (SecondSubSectionTitle[langID][mainOrder][subOrder].length > 0)){
							document.write(LineBroken+LineBroken+'<table border=0 cellspacing=0 cellpadding=0 width=100%>');
								for(var k in SecondSubSectionOrder[langID][mainOrder][subOrder]){
									secondSubOrder=SecondSubSectionOrder[langID][mainOrder][subOrder][k];
									if (SecondSubSectionTitle[langID][mainOrder][subOrder][secondSubOrder] != ''){
										checkLinkLang(SecondSubSection[langID][mainOrder][subOrder][secondSubOrder]);
										document.writeln('<tr valign=top><td width=1%>'+bullet3+'</td>');
										document.writeln('<td class="maincontent" width=99%><a href="'+SecondSubSection[langID][mainOrder][subOrder][secondSubOrder]+'" class="text_link">'+SecondSubSectionTitle[langID][mainOrder][subOrder][secondSubOrder]+'</a>'+EngOnly);
										if((SecondSubSectionTitle[langID][mainOrder][subOrder][secondSubOrder+1] != null) && (SecondSubSectionTitle[langID][mainOrder][subOrder][secondSubOrder+1].length > 0)){
											document.writeln(LineBroken+LineBroken+'</td></tr>');
										}else{
											document.writeln('</td></tr>');
										}
									}
								}
							document.write('</table>');
						}
						if((SecondSubSectionTitle[langID][mainOrder][subOrder] != null) && (SecondSubSectionTitle[langID][mainOrder][subOrder].length > 0)){
							document.write(LineBroken);
						}else{
							document.write(LineBroken+LineBroken);
						}
						document.writeln('</td></tr>');
					}
				}
				document.write('</table>');
			}else{
				if((SubSectionTitle[langID][mainOrder] != null) && (SubSectionTitle[langID][mainOrder].length > 0)){
					document.write(LineBroken);
				}else{
					document.write(LineBroken+LineBroken);
				}
			}
			document.writeln('</td></tr>');
		}
		mainOrder = 0;
		subOrder = 0;
		secondSubOrder = 0;
	}

	document.write('</table>');
}

//function for generating the sub-section list. Up to level 3 only
function getSectionList(){
	var sectionOrder=0;
	var strSectionOrder='';
	var strBuffer='';
 	var textLink='';
	var bullet1='<img src="'+locationPath+langPath+'images/bullet_1.gif" alt="*" border="0" vspace='+vspace+' hspace=3 align=absMiddle>';
	if(isText) bullet1='*';
	if(selectedSection>0) strBuffer+='['+selectedSection+']';
	if(subSection>0) strBuffer+='['+subSection+']';
	if(subSection>0){
		textLink='SecondSubSection['+langID+']'+strBuffer;
		strSectionOrder='SecondSubSectionOrder['+langID+']'+strBuffer;
		strBuffer='SecondSubSectionTitle['+langID+']'+strBuffer;
	}else{
		textLink='SubSection['+langID+']'+strBuffer;
		strSectionOrder='SubSectionOrder['+langID+']'+strBuffer;
		strBuffer='SubSectionTitle['+langID+']'+strBuffer;
	}
	var count = eval(strSectionOrder+".length");

	if(count != 0){
		document.write('<table border=0 cellspacing=0 cellpadding=0 width=100%>');
		for(var j in eval(strSectionOrder)){
			sectionOrder=eval(strSectionOrder+"["+j+"]")
			if (eval(strBuffer+"["+sectionOrder+"]") != ""){
				checkLinkLang(eval(textLink+"["+sectionOrder+"]"));
				document.writeln('<tr valign=top><td width=1%>'+bullet1+'</td>');
				document.writeln('<td class="maincontent" width=99%><a href="'+eval(textLink+"["+sectionOrder+"]")+'" class="text_link">'+eval(strBuffer+"["+sectionOrder+"]")+'</a>'+EngOnly+'<br><br></td></tr>');
			}
		}
		document.write('</table>');
	}
	sectionOrder=0
}

function checkLinkLang(inputLink){
	if((eval(inputLink.search('/eng/')!=-1))&&(eval(inputLink.search('javascript:')==-1))&&(langID!=1)){
		EngOnly='&nbsp;<img src="'+locationPath+langPath+'images/btn_tc_eng.gif" align=absMiddle border=0 alt="只有英文版">';
		if(isText) EngOnly='&nbsp;只有英文版';
		vspace=3;
	}else{
		EngOnly='';
		vspace=0;
	}
}

//function for index page
function textOnlyLink(textLang){
	var tempLocation = 'ht'+'tp://'+textOnlyPath+'?search=';
	var tempGbUrl = gbPreURL;

	if(textLang=='eng'){
		tempLocation=tempLocation+'eng/about/welcome/index.htm';
	}else if(textLang=='tc'){
		tempLocation=tempLocation+'tc/about/welcome/index.htm';
	}else if(textLang=='gb'){
		tempLocation=tempLocation+'tc/about/welcome/index.htm';
		tempLocation=gbPreURL+tempLocation.substring(7,tempLocation.length);
	}
	location=tempLocation;
}

//function for index page
function graphicLink(graphicLang){
	var tempLocation = 'ht'+'tp://'+graphicPath;

	if(graphicLang=='eng'){
		tempLocation=tempLocation+'eng/index.htm';
		//openWin('popup', 'popup_eng.htm', 50,10,180,200)
	}else if(graphicLang=='tc'){
		tempLocation=tempLocation+'tc/index.htm';
          //                      openWin('popup', 'popup_tc.htm', 50,10,180,200)
	}else if(graphicLang=='gb'){
		tempLocation=gbPreURL+tempLocation.replace('ht'+'tp://','')+'tc/index.htm';
        //                       openWin('popup', 'popup_tc.htm', 50,10,180,200)
		//tempLocation=tempLocation.substring(0,7)+gb_urlPath+tempLocation.substring(7,tempLocation.length);
	}
	location=tempLocation;

}

function openWin(name, url, top, left, width, height, resize, scroll, menu)
{
	args = 'top=' + top +
			'screenX=' + top +
			',left=' + left +
			'screenY=' + left +
			',width=' + width +
			',height=' + height +
			',resizable=' + resize +
			',scrollbars=' + scroll +
			',menubar=' + menu;
	newWin = window.open(url, name, args)
}

//function for setting the CSS for different browser and language
function checkStyle(){
	var cssLevel = "";
	var cssExtension = ".css"
	var cssLang = "";
	/*if(secondSubSection!="" && secondSubSection>0){
		cssLevel="../../../../";
	}else if(subSection!="" && subSection>0){
		cssLevel="../../../";
	}else if(selectedSection!="" && selectedSection>0){
		cssLevel="../../";
	}else{
		cssLevel="ht"+"tp://"+graphicPath;
	}

	if(location.href.toString().indexOf('/cgi-bin/')!=-1){
		cssLevel="ht"+"tp://"+graphicPath;
	}*/
	cssLevel="ht"+"tp://"+graphicPath;

	if(isText){
		cssExtension = "_text.css"
	}

	if(langID==2) {cssLang = "_tc";}

	if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4)) {
		document.writeln('<link href="'+cssLevel+'css/style_nt'+cssLang+cssExtension+'" rel="STYLESHEET" type="text/css">');
	}else{
		document.writeln('<link href="'+cssLevel+'css/style'+cssLang+cssExtension+'" rel="STYLESHEET" type="text/css">');
	}
}

/*checkStyle();*/
//document.writeln('	<div id="Layer1" style="position:absolute; width:761px; height:65px; z-index:1; left: 0; top: 0;"><img src="'+imagePath+'images/branding.jpg" width="761" height="65"></div>');
//document.writeln('	<div id="Layer2" style="position:absolute; width:66px; height:184px; z-index:2; left: 100px; top: 65px;"><img src="'+imagePath+'images/lantern.gif" width="66" height="184"></div>');