
//PopWin2('../index/popTerm.htm','popTerm',300,150,0);

function PopWin2(url,page,x,y,z){
	eval("nw = window.open(url, page,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,pageXOffset=0,pageYOffset=0,top=0,left="+z+",width=" + x + ",height=" + y + "')");
	if ( nw.focus != null)
	{nw.focus();}
}

function set_cookie (name, value) {
         var argv = set_cookie.arguments;
         var argc = set_cookie.arguments.length;
         var expires = (argc > 2) ? argv[2] : null;
         var path = (argc > 3) ? argv[3] : null;
         var domain = (argc > 4) ? argv[4] : null;
         var secure = (argc > 5) ? argv[5] : false;
         document.cookie = name + "=" + escape (value) +
         ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
         ((path == null) ? "" : ("; path=" + path)) +
         ((domain == null) ? "" : ("; domain=" + domain)) +
         ((secure == true) ? "; secure" : "");
}

function get_cookie(name) {
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen) {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg) {
	offset=j;
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) endstr = document.cookie.length;
	return unescape (document.cookie.substring(offset, endstr));
      }
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break;
   }
   return 1;
}

function pop_up (url){
	pop_url = window.open (url);
}

function del_cookie(name) {
	var expdate = new Date ();
	expdate.setTime (expdate.getTime()-1);
	set_cookie (name, "", expdate)
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
//  alert('Query Variable ' + variable + ' not found');
}

var q = getQueryVariable("s");
if (q == 1)
	set_cookie( 'InfoGovHK', '1', null, "/");
if (q == 2)
	set_cookie( 'InfoGovHK', '2', null, "/");
//else
//	set_cookie( 'InfoGovHK', '1', null, "/");

//function check(){

if(!(window.location.href.indexOf('?') != -1 )){ 
document.cookie = "cookieName=cookiealue";
var cookiesenable = document.cookie.indexOf("cookieName") ;
if(cookiesenable== -1){
//alert("Cookies disabled");
	str = document.URL.toString();
	str = str + "?s=1";
	document.location = str;
}
else
{
//alert("Cookies enabled");
	var favorite = get_cookie('InfoGovHK');
	str = document.URL.toString();
	str = str + "?s=" + favorite;
	document.location = str;
}
}

var leftMenu = new Array()
	leftMenu[1] = "btn_home";
	leftMenu[2] = "btn_welcome";
	leftMenu[3] = "btn_terms";
	leftMenu[4] = "btn_membership";
	leftMenu[5] = "btn_meeting";
	leftMenu[6] = "btn_bri";
	leftMenu[7] = "btn_news";
	leftMenu[8] = "btn_multimedia";
	leftMenu[9] = "btn_links";
	leftMenu[10] = "btn_contact";
	leftMenu[11] = "btn_sub";
	leftMenu[12] = "btn_her";
	leftMenu[13] = "btn_kai";
	leftMenu[14] = "btn_CHarM";
	leftMenu[15] = "btn_hunghom";
	leftMenu[16] = "btn_Principles";
	//leftMenu[17] = "btn_Gist";
	leftMenu[18] = "btn_Hope";
	leftMenu[19] = "btn_eInfo";
	leftMenu[20] = "btn_cur";
	
var leftMenuLink = new Array()
	leftMenuLink[1] = "../index/index.html?s=" + q;
	leftMenuLink[2] = "welcome_message.html?s=" + q;
	leftMenuLink[3] = "terms_of_reference.html?s=" + q;
	leftMenuLink[4] = "membership.html?s=" + q;
	leftMenuLink[5] = "meetings.html?s=" + q;
	leftMenuLink[6] = "briefings.html?s=" + q;	
	leftMenuLink[7] = "news.html?s=" + q;
	leftMenuLink[8] = "multimedia_gallery.html?s=" + q;
	leftMenuLink[9] = "links.html?s=" + q;
	leftMenuLink[10] = "contactus.html?s=" + q;
	leftMenuLink[11] = "subcom.html?s=" + q;
	leftMenuLink[12] = "her.html?s=" + q;
	leftMenuLink[13] = "javascript:pop_up ('http://www.pland.gov.hk/pland_en/p_study/prog_s/sek_09/website_chib5_eng/english/index.html');";
	leftMenuLink[14] = "charm.html?s=" + q;
	leftMenuLink[15] = "javascript:pop_up ('http://www.pland.gov.hk/pland_en/p_study/prog_s/hungHomSite/site/index.htm');";
	leftMenuLink[16] = "subcom_2_principles.html?s=" + q;
	//leftMenuLink[17] = "gist.html?s=" + q;
	leftMenuLink[18] = "doc/hope/introduction_eng/intro.html";
	leftMenuLink[19] = "javascript:pop_up ('../../eInfo/disclaimer_eng.htm');";
	leftMenuLink[20] = "../../hec/eng/index.html?s=" + q;
	
var leftMenuText = new Array()
	leftMenuText[1] = "Home";
	leftMenuText[2] = "Welcome Message";
	leftMenuText[3] = "Terms of Reference";
	leftMenuText[4] = "Membership";
	leftMenuText[5] = "Meetings";
	leftMenuText[6] = "Briefings";
	leftMenuText[7] = "News";
	leftMenuText[8] = "Multimedia Gallery";
	leftMenuText[9] = "Links";
	leftMenuText[10] = "Contact Us";
	leftMenuText[11] = "Sub-committees";
	leftMenuText[12] = "&quot;HER&quot;";
	leftMenuText[13] = "Kai Tak Planning Review";
	leftMenuText[14] = "&quot;CHarM&quot;";
	leftMenuText[15] = "Hung Hom District Study";
	leftMenuText[16] = "Harbour Planning Principles & Guidelines";
	//leftMenuText[17] = "Gist of TPB Harbour-front Planning Applications";
	leftMenuText[18] = "HOPE Harbourfront-enhancement Out of Public Engagement";
	leftMenuText[19] = "Harbour e-Info";
	leftMenuText[20] = "Current Activities (with effect from 9/2007)";

function gourl(i){
var currPath = window.location.href;
var toPath = currPath;
if (currPath.indexOf("?")!=-1){
	tempPos = currPath.indexOf("?");
	currPath = currPath.substring(0,tempPos);
}

	if (i == 1){
	toPath = currPath + '?s=2';
	set_cookie( 'InfoGovHK', '2', null, "/");
	document.location = toPath;
	}
	else{
	toPath = currPath + '?s=1';
	set_cookie( 'InfoGovHK', '1', null, "/");
	document.location = toPath;
	}
}

function leftmenu(){

if (bilang){
	document.write('' +
//		'<img src="images/main_image.gif" width=165 height=93><br>' +
		'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="165" height="93"><param name=movie value="images/main_image.swf"><param name=quality value=high><embed src="images/main_image.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="165" height="93"></embed></object><br>' +
         '<a href="javascript:switchLang(1);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image1\',\'\',\'images/btn_tc_h.gif\',1)" target="_top"><img src="images/btn_tc_n.gif" width=44 height=20 border="0" name="Image1" alt="Traditional Chinese"></a><img src="images/btn_line.gif" width="4" height="20"><a href="javascript:switchLang(2);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image2\',\'\',\'images/btn_sc_h.gif\',1)" target="_top"><img src="images/btn_sc_n.gif" width=44 height=20 border="0" name="Image2" alt="Simplified Chinese"></a><a href="contactus.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image3\',\'\',\'images/btn_contactus_h.gif\',1)"><img src="images/btn_contactus_n.gif" width=33 height=20 border="0" name="Image3" alt="Contact Us"></a>' +
		'')
}
else
{
	document.write('' +
//		'<img src="images/main_image.gif" width=165 height=93><br>' +
		'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="165" height="93"><param name=movie value="images/main_image.swf"><param name=quality value=high><embed src="images/main_image.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="165" height="93"></embed></object><br>' +
         '<a href="javascript:alert(\'Traditional Chinese Version is not available at the moment.\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image1\',\'\',\'images/btn_tc_h.gif\',1)" target="_top"><img src="images/btn_tc_n.gif" width=44 height=20 border="0" name="Image1" alt="Traditional Chinese"></a><img src="images/btn_line.gif" width="4" height="20"><a href="javascript:alert(\'Simplified Chinese Version is not available at the moment.\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image2\',\'\',\'images/btn_sc_h.gif\',1)" target="_top"><img src="images/btn_sc_n.gif" width=44 height=20 border="0" name="Image2" alt="Simplified Chinese"></a><a href="contactus.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image3\',\'\',\'images/btn_contactus_h.gif\',1)"><img src="images/btn_contactus_n.gif" width=33 height=20 border="0" name="Image3" alt="Contact Us"></a>' +
		'')
}

if (q == 1){
//alert('sound on')
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="40" height="20"><param name=movie value="images/btn_sound_on.swf"><param name=quality value=high><embed src="images/btn_sound_on.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="40" height="20"></embed></object><br>')
}
else{
//alert('sound off')
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="40" height="20"><param name=movie value="images/btn_sound_off.swf"><param name=quality value=high><embed src="images/btn_sound_off.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="40" height="20"></embed></object><br>')
}

		for ( var i in leftMenu )
		{
				if (i == left){
					if ((i != 11) && (i != 6)){
						document.write('' +
							'<a href="' + leftMenuLink[i] + '"><img src="images/' + leftMenu[i] + '_h.gif" border="0" name="' + leftMenu[i] + '" alt="' + leftMenuText[i] + '"></a><br>' +
							'')
					}else if(i == 11){
						document.write('' +
							'<a href="' + leftMenuLink[i] + '" onMouseOver="MM_showHideLayers(\'Layer1\',\'\',\'show\',1);" onMouseOut="MM_showHideLayers(\'Layer1\',\'\',\'hidden\',1);"><img src="images/' + leftMenu[i] + '_h.gif" border="0" name="' + leftMenu[i] + '" alt="' + leftMenuText[i] + '"></a><br>' +
							'')
					}else if(i == 6){
						document.write('' +
							'<a href="' + leftMenuLink[i] + '" onMouseOver="MM_showHideLayers(\'Layer2\',\'\',\'show\',2);" onMouseOut="MM_showHideLayers(\'Layer2\',\'\',\'hidden\',2);"><img src="images/' + leftMenu[i] + '_h.gif" border="0" name="' + leftMenu[i] + '" alt="' + leftMenuText[i] + '"></a><br>' +
							'')
					}
				}
				else
				{
					if ((i != 11) && (i != 6)){
						document.write('' +
								'<a href="' + leftMenuLink[i] + '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'' + leftMenu[i] + '\',\'\',\'images/' + leftMenu[i] + '_h.gif\',1)"><img src="images/' + leftMenu[i] + '_n.gif" border="0" name="' + leftMenu[i] + '" alt="' + leftMenuText[i] + '"></a><br>' +
							'')
					}else if(i == 11){
						document.write('' +
								'<a href="' + leftMenuLink[i] + '" onMouseOut="MM_swapImgRestore();MM_showHideLayers(\'Layer1\',\'\',\'hidden\',1);" onMouseOver="MM_swapImage(\'' + leftMenu[i] + '\',\'\',\'images/' + leftMenu[i] + '_h.gif\',1);MM_showHideLayers(\'Layer1\',\'\',\'show\',1);"><img src="images/' + leftMenu[i] + '_n.gif" border="0" name="' + leftMenu[i] + '" alt="' + leftMenuText[i] + '"></a><br>' +
							'')
					}else if(i == 6){
						document.write('' +
								'<a href="' + leftMenuLink[i] + '" onMouseOut="MM_swapImgRestore();MM_showHideLayers(\'Layer2\',\'\',\'hidden\',2);" onMouseOver="MM_swapImage(\'' + leftMenu[i] + '\',\'\',\'images/' + leftMenu[i] + '_h.gif\',1);MM_showHideLayers(\'Layer2\',\'\',\'show\',2);"><img src="images/' + leftMenu[i] + '_n.gif" border="0" name="' + leftMenu[i] + '" alt="' + leftMenuText[i] + '"></a><br>' +
							'')
					}
				}	
		}
	document.write('' +	
        '<img src="images/btn_bottom.gif" width=165 height=16>' +
		'')
}

function index_flash(){
if (q == 1){
//alert('sound on')
document.write('<a href="javascript:switchLang(1);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image1\',\'\',\'images/btn_tc_h.gif\',1)" target="_top"><img src="images/btn_tc_n.gif" width=59 height=27 border="0" name="Image1" alt="Traditional Chinese""></a><a href="javascript:switchLang(2);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image2\',\'\',\'images/btn_sc_h.gif\',1)" target="_top"><img src="images/btn_sc_n.gif" width=56 height=27 border="0" name="Image2" alt="Simplified Chinese"></a><img src="images/btn_eng_h.gif" width=59 height=27 alt="English"><a href="../content_page/contactus.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image3\',\'\',\'images/btn_contactus_h.gif\',1)"><img src="images/btn_contactus_n.gif" width=35 height=27 border="0" name="Image3" alt="Contact Us"></a><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="39" height="27"><param name=movie value="images/btn_index_sound_on.swf"><param name=quality value=high><embed src="images/btn_index_sound_on.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="39" height="27"></embed></object>')
}
else{
//alert('sound off')
document.write('<a href="javascript:switchLang(1);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image1\',\'\',\'images/btn_tc_h.gif\',1)" target="_top"><img src="images/btn_tc_n.gif" width=59 height=27 border="0" name="Image1" alt="Traditional Chinese""></a><a href="javascript:switchLang(2);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image2\',\'\',\'images/btn_sc_h.gif\',1)" target="_top"><img src="images/btn_sc_n.gif" width=56 height=27 border="0" name="Image2" alt="Simplified Chinese"></a><img src="images/btn_eng_h.gif" width=59 height=27 alt="English"><a href="../content_page/contactus.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image3\',\'\',\'images/btn_contactus_h.gif\',1)"><img src="images/btn_contactus_n.gif" width=35 height=27 border="0" name="Image3" alt="Contact Us"></a><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="39" height="27"><param name=movie value="images/btn_index_sound_off.swf"><param name=quality value=high><embed src="images/btn_index_sound_off.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="39" height="27"></embed></object>')
}
}

var titleMenu = new Array()
	titleMenu[1] = "hd_home";
	titleMenu[2] = "hd_welcome";
	titleMenu[3] = "hd_terms";
	titleMenu[4] = "hd_membership";
	titleMenu[5] = "hd_meetings";
	titleMenu[6] = "hd_briefings";
	titleMenu[7] = "hd_news";
	titleMenu[8] = "hd_multimedia";
	titleMenu[9] = "hd_links";
	titleMenu[10] = "hd_contact";
	titleMenu[11] = "hd_sub";
	titleMenu[12] = "hd_her";
	titleMenu[14] = "hd_CHarM";
	//titleMenu[17] = "hd_Gist";

var titleMenuText = new Array()
	titleMenuText[1] = "Home";
	titleMenuText[2] = "Welcome Message";
	titleMenuText[3] = "Terms of Reference";
	titleMenuText[4] = "Membership";
	titleMenuText[5] = "Meetings";
	titleMenuText[6] = "Briefings";
	titleMenuText[7] = "News";
	titleMenuText[8] = "Multimedia Gallery";
	titleMenuText[9] = "Links";
	titleMenuText[10] = "Contact Us";
	titleMenuText[11] = "Sub-committees";
	titleMenuText[12] = "Harbour-front Enhancement Review - Wan Chai, Causeway Bay and Adjoining Areas (&quot;HER&quot;)";
	titleMenuText[14] = "Central Harbourfront and Me (&quot;CHarM&quot;) - A Central Ferry Piers and Adjoining Area Enhancement Review";
	//titleMenuText[17] = "Gist of TPB Harbour-front Planning Applications";
	
function titlemenu(){

	var j = left;

	if (left==11){
		if (left_sub==1){
		document.write('' +
			'<img src="images/hd_sub_01.gif" alt="Sub-committee on South East Kowloon Development Review" border="0">' +
			'')
		}
		else if (left_sub==2){
		document.write('' +
			'<img src="images/hd_sub_02.gif" alt="Sub-committee on Harbour Plan Review" border="0">' +
			'')
		}
		else if (left_sub==3){
		document.write('' +
			'<img src="images/hd_sub_03.gif" alt="Sub-committee on Wan Chai Development Phase II Review" border="0">' +
			'')
		}
		else if (left_sub==11){
		document.write('' +
			'<img src="images/hd_sub_01_01.gif" alt="Sub-committee on South East Kowloon Development Review - Terms of Reference" border="0">' +
			'')
		}
		else if (left_sub==21){
		document.write('' +
			'<img src="images/hd_sub_02_01.gif" alt="Sub-committee on Harbour Plan Review - Terms of Reference" border="0">' +
			'')
		}
		else if (left_sub==31){
		document.write('' +
			'<img src="images/hd_sub_03_01.gif" alt="Sub-committee on Wan Chai Development Phase II Review - Terms of Reference" border="0">' +
			'')
		}
		else if (left_sub==12){
		document.write('' +
			'<img src="images/hd_sub_01_02.gif" alt="Sub-committee on South East Kowloon Development Review - Membership" border="0">' +
			'')
		}
		else if (left_sub==22){
		document.write('' +
			'<img src="images/hd_sub_02_02.gif" alt="Sub-committee on Harbour Plan Review - Membership" border="0">' +
			'')
		}
		else if (left_sub==32){
		document.write('' +
			'<img src="images/hd_sub_03_02.gif" alt="Sub-committee on Wan Chai Development Phase II Review - Membership" border="0">' +
			'')
		}
		else if (left_sub==13){
		document.write('' +
			'<img src="images/hd_sub_01_03.gif" alt="Sub-committee on South East Kowloon Development Review - Meetings" border="0">' +
			'')
		}
		else if (left_sub==23){
		document.write('' +
			'<img src="images/hd_sub_02_03.gif" alt="Sub-committee on Harbour Plan Review - Meetings" border="0">' +
			'')
		}
		else if (left_sub==33){
		document.write('' +
			'<img src="images/hd_sub_03_03.gif" alt="Sub-committee on Wan Chai Development Phase II Review - Meetings" border="0">' +
			'')
		}
		else if (left_sub==24){
		document.write('' +
			'<img src="images/hd_sub_02_04.gif" alt="Sub-committee on Harbour Plan Review - Harbour Planning Principles & Guidelines" border="0">' +
			'')
		}
		else{
			document.write('' +
			'<img src="images/' + titleMenu[j] + '.gif" alt="' + titleMenuText[j] + '" border="0">' +
			'')
		}
	}
	else{
	document.write('' +
		'<img src="images/' + titleMenu[j] + '.gif" alt="' + titleMenuText[j] + '" border="0">' +
		'')
	}

}

/*
function get_searchbox() {
	document.write('	<tr> ');
	document.write('		<td width="10" align="left" valign="top" height="27"></td>');
	document.write('		<td width="758" align="left" valign="top" height="27" background="../../hec/eng/images/index/search_box_bg.gif"><img src="../../hec/eng/images/index/btn_bar_bg.gif" width="530" height=27><img src="../../hec/eng/images/index/search_txt.gif" width="43" height="27"><input type="text" name="query" id="query" class="searchbox" onkeypress="checksubmit()"><a href="javascript:submitsearch()" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'btn_search\',\'\',\'../../hec/eng/images/index/btn_search_o.gif\',1)"><img src="../../hec/eng/images/index/btn_search.gif" width="39" height="27" border="0" id="btn_search" name="btn_search"></a></td>');
	document.write('		<td width="11" align="left" valign="top" height="27" background="../../hec/eng/images/index/spacer.gif"></td>');
	document.write('	</tr>');
}
*/

function get_searchbox() {
	document.write('	<tr> ');
	document.write('<form name="searchform" action="http://search.gov.hk/search.html" method="get" onsubmit="submitsearch()">');
	document.write('		<td width="10" align="left" valign="top" height="27"></td>');
	document.write('		<td width="758" align="left" valign="top" height="27" background="../../hec/eng/images/index/search_box_bg.gif"><img src="../../hec/eng/images/index/btn_bar_bg.gif" width="530" height=27>');
	document.write('<input type="hidden" name="tpl_id" value="harbour" />');
	document.write('<input type="hidden" name="gp0" value="harbourfront_home" />');
	document.write('<input type="hidden" name="gp1" value="harbourfront_home" />');
	document.write('<input type="hidden" name="web" value="this" />');
	document.write('<input type="hidden" name="ui_lang" value="" />');
	document.write('<input type="hidden" name="ui_charset" value="" />');
	document.write('<img src="../../hec/eng/images/index/search_txt.gif" width="43" height="27"><input type="text" name="query" id="query" class="searchbox"><a href="#" onclick="submitsearch();document.searchform.submit()" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'btn_search\',\'\',\'../../hec/eng/images/index/btn_search_o.gif\',1)"><img src="../../hec/eng/images/index/btn_search.gif" width="39" height="27" border="0" id="btn_search" name="btn_search"></a></td>');
	document.write('		<td width="11" align="left" valign="top" height="27" background="../../hec/eng/images/index/spacer.gif"></td>');
	document.write('</form>');
	document.write('	</tr>');
}

function checksubmit() {
	if (window.event && window.event.keyCode == 13)	{
		submitsearch();
	}
}

function submitsearch() {
	if (location.href.indexOf("/gb/")>0) {
		document.searchform.action = ""+"ht"+"tp://sc.info.gov.hk/TuniS/search.gov.hk/search.html";
	}
	if (location.href.indexOf("/eng/")>0) {
		document.searchform.ui_lang.value = "en";
		document.searchform.ui_charset.value = "iso-8859-1";
	}
	if (location.href.indexOf("/tc/")>0) {
		document.searchform.ui_lang.value = "zh-hk";
		document.searchform.ui_charset.value = "big5";
	}
}