var logo_alt="Hong Kong Public Libraries\r\nLeisure and Cultural Services Department";
var temp_lev_div  = lev_div;
if (temp_lev_div=="")
{	
	temp_lev_div = "english/";
}
var tsbl = 'Search hkpl.gov.hk';
function onf(ele) {
  if( ele.value == tsbl )
          ele.value = '';
  ele.className='searchon';
}
function onb(ele) {
  if (ele.value == '') {
          ele.value = tsbl;
          ele.className='searchout';
  }
}
function inittsb() {
  document.getElementById('tsb').value = tsbl;
  document.getElementById('tsb').className = 'searchout';
}
function cctsb() {
	if(document.getElementById('tsb').value == tsbl)
		document.getElementById('tsb').value = '';
}
if (window.attachEvent) // Microsoft
{
  window.attachEvent('onload', inittsb);
}
function mouseon(ele) {
  ele.className='spso mag';
}
function mouseout(ele) {
  ele.className='sps mag';
}
function clf_hd(){
document.write('<table width="760" border="0" cellspacing="0" cellpadding="0" background="'+temp_lev_div+'images/clf/bkgdtexture.gif">'+
	'<form name="searchform" action="'+temp_lev_div+'search/search.php" method="get">'+
	    '<input type="hidden" name="s2" value="HKPL">'+
      '<input type="hidden" name="so" value="0">'+
      '<input type="hidden" name="a" value="10">'+
      '<input type="hidden" name="oa" value="1">'+
      '<input type="hidden" name="fta" value="1">'+
      '<input type="hidden" name="start" value="1">'+     
                '<tr> '+
                  '<td><img src="'+temp_lev_div+'images/clf/logo.gif" alt="'+logo_alt+'"> </td>'+
                  '<td rowspan="2" valign="bottom" align="right" width="1"> '+
                    '<table border="0" cellspacing="0" cellpadding="0" width="270">'+
                      '<tr align="right"> '+
                        '<td colspan="2"> '+
                          '<table border="0" cellspacing="0" cellpadding="0">'+
                            '<tr> '+                              
                              '<td align="right"><a href="http://www.brandhk.gov.hk/brandhk/eindex.htm" target="_blank"><img name="BrandHK" src="'+temp_lev_div+'images/clf/brandhk.gif" border="0" alt="Brand Hong Kong - Asia\'s world city"></a></td>'+
                            '</tr>'+
                          '</table>'+
                        '</td>'+
                      '</tr>'+
                      '<tr> '+
                        '<td width="166" align="right" valign="bottom"><div class="sbox">'+
                          '<input autocomplete="off" type="text" id="tsb" name="p" value="'+tsbl+'" class="searchout" onfocus="onf(this)" onblur="onb(this)">'+'<a href="javascript:cctsb();document.searchform.submit();"><img name="mainbar81" class="sps mag" src="'+temp_lev_div+'images/general/spacer.gif" alt="Search" onmouseover="mouseon(this)" onmouseout="mouseout(this)"/></a></div>'+
                          '</td>'+
                        '<td valign="bottom" align="right" width="110"> '+
                          '<table width="110" border="0" cellspacing="0" cellpadding="0">'+
                            '<tr valign="top"> '+                            
                              '<td><img src="'+temp_lev_div+'images/general/spacer.gif" width="10"/><img class="sps spl" src="'+temp_lev_div+'images/general/spacer.gif" valign="bottom"/><a href="'+temp_lev_div+'sitemap/sitemap.html" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar91\',\'\',\''+temp_lev_div+'images/clf/mainbar9_f2.gif\',1)" ><img name="mainbar91" src="'+temp_lev_div+'images/clf/mainbar9.gif" border="0" alt="Site map"></a></td>'+
                              '<td><a href="'+temp_lev_div+'contactus/contactus.html" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar101\',\'\',\''+temp_lev_div+'images/clf/mainbar10_f2.gif\',1)" ><img name="mainbar101" src="'+temp_lev_div+'images/clf/mainbar10.gif" border="0" alt="Contact us"></a></td>'+
                            '</tr>'+
                          '</table>'+
                        '</td>'+
                      '</tr>'+
                    '</table>'+
                  '</td>'+
                '</tr>'+
                '<tr> '+
                  '<td> '+
                    '<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
                      '<tr valign="top"> '+
                        '<td width="1"><a href="http://www.gov.hk/en/residents/" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar1\',\'\',\''+temp_lev_div+'images/clf/mainbar1_f2.gif\',1)" target="_blank" ><img name="mainbar1" src="'+temp_lev_div+'images/clf/mainbar1.gif" border="0" alt="GovHK"></a></td>'+
						
						//text only
						'<td width="1"><a href="javascript:chglang(\'entxt\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar41\',\'\',\''+temp_lev_div+'images/clf/mainbar2_f2.gif\',1)" ><img name="mainbar41" src="'+temp_lev_div+'images/clf/mainbar2.gif" border="0" alt="Text only"></a></td>'+
						//sc_chi
						'<td width="1"><a href="javascript:chglang(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar42\',\'\',\''+temp_lev_div+'images/clf/mainbar3_f2.gif\',1)" ><img name="mainbar42" src="'+temp_lev_div+'images/clf/mainbar3.gif" border="0" alt="Traditional chinese"></a></td>'+
						//eng
						'<td width="1"><a href="javascript:chglang(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar4\',\'\',\''+temp_lev_div+'images/clf/mainbar4_f2.gif\',1)" ><img name="mainbar4" src="'+temp_lev_div+'images/clf/mainbar4.gif" border="0" alt="Simplified chinese"></a></td>'+                    
                        
						'<td><img name="mainbar5" src="'+temp_lev_div+'images/clf/mainbar5.gif" border="0" alt="image"></td>'+
                      '</tr>'+
                    '</table>'+
                  '</td>'+
                '</tr>'+
                '<tr> '+
                  '<td colspan="2" bgcolor="#CC3333"><img src="'+temp_lev_div+'images/general/spacer.gif" width="1" height="2"></td>'+
                '</tr>'+
		'</form>'+
              '</table>');
}            


function clf_footer(){
	document.write('<font face="Arial, Helvetica, sans-serif, Taipei" size="-1"><b>2005 <img src="'+temp_lev_div+'images/clf/copy.gif" alt="copyright logo" align="absmiddle"> | <a href="'+temp_lev_div+'notices/notices.html">Important notices</a> | <a href="http://www.lcsd.gov.hk/en/info_pdo.php">Privacy Policy</a><b></font>');

}

function txt_clf_footer(){

	document.write('<p>[<a href="http://www.gov.hk/en/residents/" target="_blank">GovHK</a>] [<a href="http://www.brandhk.gov.hk/brandhk/eindex.htm" target="_blank">Brand Hong Kong</a>]</p><hr>'+
			'<p><b>2005 copyright | <a href="'+temp_lev_div+'notices/notices.html">Important notice</a> | <a href="http://www.lcsd.gov.hk/en/info_pdo.php">Privacy Policy</a></b></p>');
}

function print_clf_header(lev1)
{
	document.write('<table width="600" border="0" cellspacing="0" cellpadding="0">' +
					'<tr valign="top"> '+
					'<td><img src="'+lev1+'english/images/print/top_print.gif" alt="'+logo_alt+'" usemap="#Map" border="0"></td>' +
					'</tr>' +
					'<tr valign="top"> ' +
					'<td> ' +
					'<map name="Map"> ' +
					'<area shape="rect" coords="1,64,51,86" href="javascript:chglang(\'tc\')" alt="ÁcÅéª©">' +
					'<area shape="rect" coords="52,64,102,86" href="javascript:chglang(\'sc\')" alt="Â²Åéª©">' +
					'<area shape="rect" coords="104,64,154,86" href="javascript:chglang(\'en\')" alt="ENGLISH">' +
					'</map>' +
					'&nbsp;</td>' +
					'</tr>' +
					'</table>');
}

function print_clf_footer(lev1,lev2)
{
	document.write('<b>2005 <img src="'+lev1+'english/images/clf/copy.gif" alt="copyright logo" align="absmiddle"> | <a href="'+lev2+'notices/notices.html">Important notice</a> | <a href="http://www.lcsd.gov.hk/en/info_pdo.php">Privacy Policy</a></b>');
}

