<!--
function randomBackground(){
	var whichBG= Math.floor(Math.random()*6);
	var bg=new Array(6);
  bg[0]="bg_home1.jpg";
  bg[1]="bg_home2.jpg";
  bg[2]="bg_home3.jpg";
  bg[3]="bg_home4.jpg";
  bg[4]="bg_home5.jpg";
  bg[5]="bg_home6.jpg";
  document.write('<td valign="top" bgcolor="#FFFFFF" background=images/'+bg[whichBG]+'>');
}

function changeLang (lang) {
	var full_url = parent.location.href
	var q_index = full_url.indexOf("#")
	if (q_index==-1) {
		q_index = full_url.length
	}
	var front_part = full_url.substring (full_url, q_index);
	var dot_index  = full_url.indexOf(".", q_index-5);
	var query_part = full_url.substring (q_index, full_url.length);

	if (lang=="EN") {
		new_front_part = front_part.substring(0, parseInt(dot_index)-2) + "" + front_part.substring(parseInt(dot_index), front_part.length)
	} else {
		new_front_part = front_part.substring(0, parseInt(dot_index)) + "_c" + front_part.substring(parseInt(dot_index), front_part.length)
	}

	if (query_part=="") {
		new_full_url = new_front_part
	} else {
		new_full_url = new_front_part + query_part
	}
	parent.location.href=new_full_url
}
function  popupWIN(openpage,width,height){
	var title = 'HKSQUASH';
	big_pop=window.open(openpage,title,"width="+width+",height="+height+",resizable=no,scrollbars=yes,menubar=no,fullscreen=no");
	big_pop.moveTo(((screen.width-width)/2),((screen.height-height)/2)-20);
	big_pop.focus();
}
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 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 displayHeader(){
	document.write('<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">');
	document.write('  <tr>');
	document.write('    <td width="165"><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('      <tr>');
	document.write('        <td><img name="left01" src="images/left01.jpg" width="165" height="148" border="0" alt=""></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td><img name="left02" src="images/left02.jpg" width="165" height="29" border="0" alt=""></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td><img name="left03" src="images/left03.jpg" width="165" height="497" border="0" alt=""></td>');
	document.write('      </tr>');
	document.write('    </table></td>');
	document.write('    <td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('      <tr>');
	document.write('        <td><img src="images/main_r1_c2.jpg" alt="" name="main_r1_c2" width="735" height="148" border="0" usemap="#main_r1_c2Map"></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('          <tr>');
	document.write('            <td><a href="home.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav01\',\'\',\'images/nav01_f2.jpg\',1);"><img name="nav01" src="images/nav01.jpg" width="62" height="29" border="0" alt=""></a></td>');
	document.write('            <td><a href="news.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav02\',\'\',\'images/nav02_f2.jpg\',1);"><img name="nav02" src="images/nav02.jpg" width="59" height="29" border="0" alt=""></a></td>');
	document.write('            <td><a href="tournament.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav03\',\'\',\'images/nav03_f2.jpg\',1);"><img name="nav03" src="images/nav03.jpg" width="125" height="29" border="0" alt=""></a></td>');
	document.write('            <td><a href="participating.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav04\',\'\',\'images/nav04_f2.jpg\',1);"><img name="nav04" src="images/nav04.jpg" width="153" height="29" border="0" alt=""></a></td>');
	document.write('            <td><a href="draw.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav05\',\'\',\'images/nav05_f2.jpg\',1);"><img name="nav05" src="images/nav05.jpg" width="125" height="29" border="0" alt=""></a></td>');
	document.write('            <td><a href="gallery.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav06\',\'\',\'images/nav06_f2.jpg\',1);"><img name="nav06" src="images/nav06.jpg" width="66" height="29" border="0" alt=""></a></td>');
	document.write('            <td><a href="download.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav07\',\'\',\'images/nav07_f2.jpg\',1);"><img name="nav07" src="images/nav07.jpg" width="84" height="29" border="0" alt=""></a></td>');
	document.write('            <td><a href="link.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav08\',\'\',\'images/nav08_f2.jpg\',1);"><img name="nav08" src="images/nav08.jpg" width="59" height="29" border="0" alt=""></a></td>');
	document.write('            <td><img src="images/main_r2_c11.jpg" width="2" height="29" border="0" alt=""></td>');
	document.write('          </tr>');
	document.write('        </table></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td bgcolor="#333333"><img src="images/spacer.gif" width="2" height="2"></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td>');

}

function displayHeader_c(){
	document.write('<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">');
	document.write('  <tr>');
	document.write('    <td width="165"><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('      <tr>');
	document.write('        <td><img name="left01" src="images/left01.jpg" width="165" height="148" border="0" alt=""></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td><img name="left02" src="images/left02.jpg" width="165" height="29" border="0" alt=""></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td><img name="left03" src="images/left03.jpg" width="165" height="497" border="0" alt=""></td>');
	document.write('      </tr>');
	document.write('    </table></td>');
	document.write('    <td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('      <tr>');
	document.write('        <td><img src="images/main_r1_c2.jpg" alt="" name="main_r1_c2" width="735" height="148" border="0" usemap="#main_r1_c2Map"></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('          <tr>');
	document.write('            <td><a href="home_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav01\',\'\',\'images/nav01_c_f2.jpg\',1);"><img name="nav01" src="images/nav01_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><a href="news_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav02\',\'\',\'images/nav02_c_f2.jpg\',1);"><img name="nav02" src="images/nav02_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><a href="tournament_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav03\',\'\',\'images/nav03_c_f2.jpg\',1);"><img name="nav03" src="images/nav03_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><a href="participating_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav04\',\'\',\'images/nav04_c_f2.jpg\',1);"><img name="nav04" src="images/nav04_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><a href="draw_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav05\',\'\',\'images/nav05_c_f2.jpg\',1);"><img name="nav05" src="images/nav05_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><a href="gallery_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav06\',\'\',\'images/nav06_c_f2.jpg\',1);"><img name="nav06" src="images/nav06_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><a href="download_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav07\',\'\',\'images/nav07_c_f2.jpg\',1);"><img name="nav07" src="images/nav07_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><a href="link_c.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav08\',\'\',\'images/nav08_c_f2.jpg\',1);"><img name="nav08" src="images/nav08_c.jpg" border="0" alt=""></a></td>');
	document.write('            <td><img src="images/main_r2_c11.jpg" width="2" height="29" border="0" alt=""></td>');
	document.write('          </tr>');
	document.write('        </table></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td bgcolor="#333333"><img src="images/spacer.gif" width="2" height="2"></td>');
	document.write('      </tr>');
	document.write('      <tr>');
	document.write('        <td>');

}

function displayFooter(){
	document.write('        </td>');
	document.write('      </tr>');
	document.write('    </table></td>');
	document.write('  </tr>');
	document.write('  <tr>');
	document.write('    <td><img name="top01" src="images/top01.jpg" width="165" height="82" border="0" alt=""></td>');
	document.write('    <td align=center width=735 height=82 background="images/bg_sponsor.jpg">');
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="676" height="76" id="sponsor" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="sponsor.swf" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="quality" value="autohigh" />');
	document.write('<param name="bgcolor" value="#d0e8db" />');
	document.write('<embed src="sponsor.swf" menu="false" quality="autohigh" bgcolor="#d0e8db" width="676" height="76" name="sponsor" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>	');
	document.write('</td>');
	document.write('  </tr>');
	document.write('</table>');
	document.write('<map name="main_r1_c2Map">');
	document.write('  <area shape="rect" coords="653,9,719,28" href="#">');
	document.write('  <area shape="rect" coords="581,9,647,28" href="javascript:changeLang(\'TC\')">');
	document.write('</map>');
}

function displayFooter_c(){
	document.write('        </td>');
	document.write('      </tr>');
	document.write('    </table></td>');
	document.write('  </tr>');
	document.write('  <tr>');
	document.write('    <td><img name="top01" src="images/top01.jpg" width="165" height="82" border="0" alt=""></td>');
	document.write('    <td align=center width=735 height=82 background="images/bg_sponsor.jpg">');
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="676" height="76" id="sponsor" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="sponsor.swf" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="quality" value="autohigh" />');
	document.write('<param name="bgcolor" value="#d0e8db" />');
	document.write('<embed src="sponsor.swf" menu="false" quality="autohigh" bgcolor="#d0e8db" width="676" height="76" name="sponsor" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>	');
	document.write('</td>');
	document.write('  </tr>');
	document.write('</table>');
	document.write('<map name="main_r1_c2Map">');
	document.write('  <area shape="rect" coords="653,9,719,28" href="javascript:changeLang(\'EN\')">');
	document.write('  <area shape="rect" coords="581,9,647,28" href="#">');
	document.write('</map>');
}
//-->