//get directory name
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var fullpath = location.href;
var startIndex = fullpath.lastIndexOf("/")+1;
var shortenString = fullpath.substring(0, startIndex-1);
var directoryName = shortenString.substring(shortenString.lastIndexOf("/")+1, shortenString.length);

//start to write to the page
document.write('<div id="Layer1" style="position:absolute; left:0px; top:0px; height:204px; z-index:1">');
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="204">');

if (document.getElementById('activities_tit')!=null)
{ document.write('<param name="movie" value="../flash/menu_' + directoryName + '.swf?menuNo=5">'); }
else if (document.getElementById('attract_tit')!=null)
{ document.write('<param name="movie" value="../flash/menu_' + directoryName + '.swf?menuNo=4">'); }
else if (document.getElementById('event_tit')!=null)
{ document.write('<param name="movie" value="../flash/menu_' + directoryName + '.swf?menuNo=3">'); }
else
{ document.write('<param name="movie" value="../flash/menu_' + directoryName + '.swf">'); }

document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('<embed src="../flash/menu_' + directoryName + '.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="204"></embed>');
document.write('</object>');
document.write('</div>');
document.write('<table width="800"  border="0" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td bgcolor="E3E3E3"><img src="../images/share/spacer.gif" width="100%" height="1"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><table width="100%" border="0" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td width="180"><img src="../images/share/spacer.gif" width="180" height="18"></td>');
document.write('<td width="60" align="center"><a href="../front/front.html" class="txtfooterc">主頁</a></td>');
document.write('<td width="1"><img src="../images/share/img_grey_vline.gif" width="1" height="10"></td>');
document.write('<td width="80" align="center"><a href="../other/otherlink.html" class="txtfooterc">其他連結</a></td>');
document.write('<td width="1"><img src="../images/share/img_grey_vline.gif" width="1" height="10"></td>');
document.write('<td width="80" align="center"><a href="../contact/contactus.aspx" class="txtfooterc">聯絡我們</a></td>');
document.write('<td width="1"><img src="../images/share/img_grey_vline.gif" width="1" height="10"></td>');
document.write('<td width="100" align="center"><a href="#" onClick="MM_openBrWindow(\'../other/tos.html\',\'\',\'scrollbars=no,width=500,height=470\')" class="txtfooterc">使用條款</a></td>');
document.write('<td width="200" class="txtfooter"><img src="../images/share/spacer.gif" width="200" height="18"></td>');
document.write('</tr>');
document.write('</table></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td>');
document.write('<table width="100%" height="76"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FF9900">');
document.write('<tr>');
document.write('<td width="180" align="center"><img src="../images/share/img_footer_logo.gif" width="117" height="50"></td>');
document.write('<td><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td class="txtcontent1"><strong>馬來西亞旅遊促進局 (香港分局)</strong></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td class="txtcontent1">香港灣仔告士打道47-50號 馬來西亞大廈地下</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td class="txtcontent1">電話: (852) 2528 5810/11   傳真: (852) 2865 4610</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td class="txtcontent1">查詢: <a href="mailto:mtpb.hongkong@tourismmalaysia.com.hk" class="txtcontent1">mtpb.hongkong@tourismmalaysia.com.hk</a></td>');
document.write('</tr>');
document.write('</table></td>');
document.write('</tr>');
document.write('</table>');
document.write('</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="right"><table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr class="txtfooter">');
document.write('<td>Copyright 2005-2008. All rights reserved. Tourism Malaysia. </td>');
document.write('<td><img src="../images/share/spacer.gif" width="10" height="1"></td>');
document.write('<td><a href="http://www.pacim.com" class="txtfooter" target="_blank">Powered by Pacificlink iMedia Limited</a></td>');
document.write('</tr>');
document.write('</table></td>');
document.write('</tr>');
document.write('</table>');
