a = location.pathname.indexOf("apsmer") + 7;
b = location.pathname.indexOf(".htm");
filename = location.pathname.substring(a,b);
lang = filename.substring(filename.length-2, filename.length);
filename = filename.substring(0, filename.length-2)
/*
document.write('<br>' + filename + '<br>');
document.write('<br>' + lang + '<br>');
document.write(location.pathname + "<br>");
document.write(a + " " + b);
*/
HTMLstring = '<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor=#0033CC>';



HTMLstring += '<table cellpadding="0" cellspacing="0" width=' + table_width + ' border="0">';
HTMLstring += '<tr valign=top>';
HTMLstring += '<td width=135><img src="images/logo_apsmer_top.gif"></td>';


HTMLstring += '<td width=20><img src="images/blank.gif" width=20 height=1></td><td width=' + mainTDwidth + '><img src="images/blank.gif"></td><td width=32><img src="images/blank.gif"></td>';
HTMLstring += '</tr>';
HTMLstring += '<tr valign=top>';
HTMLstring += '<td background="images/bg_leftmenu.gif">';

spacer = '<br><img src="images/blank.gif" height=5><br>';
leftmenuArray = new Array("special","sweet_memories","home","conference","background","speaker","committee","register","accommo","program","rundown","workshop","enquiry");
if (lang == '_e') {
	lefttitleArray = new Array("Special Note","Sweet Memories","Home","conference","Background","Speaker","Committee","Registration","Accommodation","Programme","Paper Session","Workshop","Enquiries");
} else {
	lefttitleArray = new Array("特訊","美好回憶","首頁","簡介","背景","主題演講嘉賓","委員會","註冊費用","住宿安排","程序","論文發表","工作坊","查詢");
}

HTMLstring += '<a href="conference' + lang + '.htm"><img src="images/logo_apsmer_bottom.gif" border=0></a>' + spacer;


for (i=0; i < leftmenuArray.length; i++) {
	if (filename == leftmenuArray[i]) {
		HTMLstring += '<img src="images/leftmenu_' + leftmenuArray[i] + lang + '_up.gif" alt="' + lefttitleArray[i] + '">' + spacer;
	} else {
		HTMLstring += '<a href="' + leftmenuArray[i] + lang + '.htm"  ><img src="images/leftmenu_' + leftmenuArray[i] + lang + '.gif" border=0 alt="' + lefttitleArray[i] + '"></a>' + spacer;
	}
}


HTMLstring += '<br><img src="images/blank.gif" width=24 height=1>';
	if (lang == '_c') {
		HTMLstring += '<a href="' + filename + '_e.htm"><img src="images/lang_c2e.gif" border=0 alt="English Version | 英文版"></a>' + spacer;
	} else if (lang == '_e'){
		HTMLstring += '<a href="' + filename + '_c.htm"><img src="images/lang_e2c.gif" border=0 alt="Chinese Version"></a>' + spacer;
	} else {
		HTMLstring += '[Language Error]';
	}

HTMLstring += '</td><td bgcolor=#FFFFFF><img src="images/blank.gif"></td><td bgcolor=#FFFFFF>';
HTMLstring += '<table cellpadding=0 cellspacing=0 border=0 width=' + mainTDwidth + '><tr><td></td><td align=right>';

randomPhoto = Math.round(Math.random() * 10 / 2);
if (randomPhoto == 0) {
	randomPhoto = 5;
}
//document.write(randomPhoto);

if (filename == 'conference') {
	HTMLstring += '<img src="images/blank.gif" height=17>';
} else {
	HTMLstring += '<img src="images/title0_' + scrH + '_' + randomPhoto + '.jpg" height=17>';
}
HTMLstring += '</td></tr><tr valign=top><td>';



if (filename == 'conference') {
	if (scrH == '864') {
		HTMLstring += '<img src="images/blank.gif" height=35><br>';
	}
	HTMLstring += '<img src="images/title_conference' + lang + '_' + scrH + '_1.jpg" alt="The 4th Asia-Pacific Symposium on Music Education Research\n[Theme] Curriculum Innovation in Music\n   [Date] July 9-12, 2003\n[Venue] The Hong Kong Institute of Education,\n              10 Lo Ping Road, Tai Po, Hong Kong"></td><td><img src="images/title_conference_' + scrH + '_2.jpg">';
	HTMLstring += '</td></tr><tr><td colspan=2>';
	HTMLstring += '<img src="images/title_conference_' + scrH + '_3.jpg">';
} else {
	HTMLstring += '<img src="images/title1' + lang + '_' + scrH + '.gif" alt="The 4th Asia-Pacific Symposium on Music Education Research\n[Theme] Curriculum Innovation in Music\n   [Date] July 9-12, 2003\n[Venue] The Hong Kong Institute of Education,\n              10 Lo Ping Road, Tai Po, Hong Kong"></td><td><A HREF="http://discoverhongkong.com" TARGET="_blank"><img src="images/title2' + lang + '_' + scrH + '_' + randomPhoto + '.jpg" alt="Have a Hong Kong Tour!" border=0></a>';
}
HTMLstring += '</td></tr></table>';

document.write(HTMLstring);
