﻿//document.write("<center>");
document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0' bgcolor='#ffffff'>");
document.write("<tr><td height='5px'>");
document.write("<table width='100%'  height='5px' cellpadding='0' cellspacing='0' border='0'>");
document.write("<tr><td width='5px' height='5px'><img src='/eng/image/hp_header_left_corner.gif' width='5px' height='5px' border='0'></td><td height='5px' width='100%'></td><td width='5px' height='5px'><img src='/eng/image/hp_header_right_corner.gif' width='5px' height='5px' border='0'></td></tr>");
document.write("</table>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("<table width='100%' height='93px' cellpadding='0' cellspacing='0' border='0'>");
document.write("<tr>");
document.write("<td width='15px'>&nbsp;</td>");
document.write("<td width='210px' align='left'><div style='width:160px; height:84px; overflow:hidden;'><a href='http://www.hkex.com.hk/eng/index.htm'><img src='/eng/image/hkex_logo.gif' width='210px' height='130px' alt='Logo-HKEx' title='Logo-HKEx' border='0'></a></div></td>");
var ClickCountWS = 0;
var ClickCountSQS = 0;

function searchOnClickWS(el){
	if ( ClickCountWS == 0 && el.value == el.getAttribute('defVal') ) { el.value = ''; }
	ClickCountWS = 1;
	$(el).css({'color' : '#000000'});
}

function searchOnClickSQS(el){
	if ( ClickCountSQS == 0 && el.value == el.getAttribute('defVal') ) { el.value = ''; }
	ClickCountSQS = 1;
	$(el).css({'color' : '#000000'});
}

function KeyDownHandler(event) {
	if ( event.keyCode == 13 ) {
		var obj = ( event.target ) ? event.target : event.srcElement;
		if ( obj ) {
			if ( obj.id == 'wsTextField' ){
				wsSubmit();
			}else if ( obj.id == 'sqsTextField' ){
				sqsSubmit();
			}
		}
	}
}

function wsSubmit(){
	var q = document.getElementById('wsTextField').value;
	q = encodeURIComponent(q);
	window.location = "http://search.hkex.com.hk/eng/results.aspx?k=" + q + "&s=All%20Sections";
}

function sqsSubmit(){
	if (document.getElementsByName("StockQuote")[0].checked == true){
		if (isNaN(document.getElementById('sqsTextField').value)){
			alert("Please input a digit value");
		}else{
			window.location = "/eng/invest/company/quote_page_e.asp?WidCoID="+document.getElementById('sqsTextField').value+"&WidCoAbbName=&Month=1&langcode=e"
		}
	}else{
		window.location = "/eng/invest/company/quote_page_e.asp?WidCoID=&WidCoAbbName="+escape(document.getElementById('sqsTextField').value)+"&Month=1&langcode=e"
	}
}

document.write("<td width='565px' align='left'>");
document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0'>");
document.write("<tr><td width='250px' align='left'>");
document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0' class='hkex-header'>");
document.write("<tr><td width='20px'>&nbsp;</td><td align='left'><b>Website Search</b></td></tr>");
document.write("<tr><td width='20px'>&nbsp;</td><td align='left'><input type='text' id=wsTextField size='30' defVal='Search' value='Search' onfocus='searchOnClickWS(this);' onKeyDown='KeyDownHandler(event);'></>&nbsp;<img src='/eng/image/hp_header_search_icon.gif' onclick='wsSubmit()' alt='Search' title='Search' style='cursor:pointer;' width='22px' height='22px' border='0'></td></tr>");
document.write("<tr><td colspan='2' align='right'><a href='http://search.hkex.com.hk/eng/advanced.aspx'>Advanced Search</a></td></tr>");
document.write("</table>");
document.write("</td>");
document.write("<td style='border-right:1px solid #D3D3D3'>&nbsp;&nbsp;&nbsp;</td>");
document.write("<td>&nbsp;&nbsp;&nbsp;</td>");
document.write("<td>");
document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0' class='hkex-header'>");
document.write("<tr><td align='left'><b>Stock Quote Search</b></td></tr>");
document.write("<tr><td align='left'><input type='text' id=sqsTextField size='30' defVal='Stock Code' value='Stock Code' onfocus='searchOnClickSQS(this);' onKeyDown='KeyDownHandler(event);'>&nbsp;<img src='/eng/image/hp_header_search_icon.gif' onclick='sqsSubmit()' alt='Search' title='Search' style='cursor:pointer;' width='22px' height='22px' border='0'></td></tr>");
document.write("<tr><td align='left'><input type='radio' name='StockQuote' value='code' checked/>Stock Code&nbsp;<input type='radio' name='StockQuote' value='company'/>Company Name</td></tr>");
document.write("</table>");
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("</td>");

document.write("<td width='190px'>");
document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0' class='hkex-header'>");
document.write("<tr><td align='right'><a href='/eng/hkws/RSS/rss.htm' title='RSS Feeds'><img src='/image/rss.gif' width='14' height='14' border='0' align= 'bottom'/></a>&nbsp;|&nbsp;ENG&nbsp;&nbsp;|&nbsp;&nbsp;<a href='javascript:route(\"eng\",\"chi\")' style='font-family: PMingLiu; font-size:11px;'>繁體</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='javascript:route(\"eng\",\"sim\")' style='font-family:PMingLiu; font-size:11px;'>簡体</a></td></tr>");
document.write("<tr><td align='right'>&nbsp;</td></tr>");
document.write("<tr><td align='right'><a href='/eng/global/contact.htm'>Contact</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/eng/global/faqhkex.htm'>FAQ</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/eng/global/sitemap/sitemap.htm'>Site Map</a></td></tr>");
document.write("</table>");
document.write("</td>");

document.write("<td>&nbsp;&nbsp;</td>");
document.write("</tr>");
document.write("</table>");
document.write("</td></tr>");



document.write("<tr><td width='100%'  class='hkex-header-menu'>");
document.write("<ul id='nav-one' class='nav-one'>");
document.write("<li class='nav' style='width:150px;'>");
document.write("<a id='isc' href='/eng/invest/isc.htm'>Investment<br/>Service Centre</a>");
document.write("<ul class='nav-isc'>");
document.write("<a href='/eng/invest/company/profilemenu_page_e.asp'>Company/Securities Profile</a>");
document.write("<a href='/eng/invest/company/top_rise_page_e.asp?curHtml=s_gain'>Today's Top 20 (Delayed)</a>");
document.write("<a href='/eng/invest/company/quotemenu_page_e.asp'>Today's Stock Quote (Delayed)</a>");
document.write("<a href='/eng/invest/company/intramenu_page_e.asp'>Intraday Stock Price Graph (Delayed)</a>");
document.write("<a href='/eng/invest/company/pricemenu_page_e.asp'>Historical Stock Price Graph</a>");
document.write("<a href='/eng/ddp/ddp_index.asp'>Futures and Options Prices and Charts<br>(Delayed)</a>");
document.write("<a href='/eng/market/sec_tradinfo/stockcode/stockcode.htm'>List of Securities</a>");
document.write("<a href='/eng/csm/homepage.asp?LangCode=en' target='_blank'>China Stock Markets Web</a>");
document.write("<a href='http://www.hkexnews.hk/' target='_blank'>HKExnews</a>");
document.write("<a href='https://www.hkex.com.hk/eng/invest/user/servmenu_page_e.asp'>Investor Profile Maintenance</a>");
document.write("<a href='https://www.hkex.com.hk/eng/invest/user/portfolio_page_e.asp'>News Alerts and Portfolio Valuation</a>");
document.write("<a href='/eng/invest/user/faq_page_e.asp'>About Investment Service Centre</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class='nav' style='width:100px;'>");
document.write("<a id='lm' href='/eng/listing/listing.htm'>Listing<br/>Matters</a>");
document.write("<ul class='nav-lm'>");
document.write("<a href='/eng/listing/listhk/listing_in_hong_kong.htm'>Why List in Hong Kong</a>");
document.write("<a href='/eng/listing/listevent/EventsCal.htm'>Event Calendar</a>");
document.write("<a href='/eng/listing/listreq_pro/ListReq.htm'>Listing Requirements and Procedures</a>");
document.write("<a href='/eng/listing/edp/index.htm'>Electronic Disclosure</a>");
document.write("<a href='/eng/listing/listcomrpt/LC.htm'>Listing Committee</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class='nav' style='width:122px;'>");
document.write("<a id='pns' href='/eng/prod/product.htm'>Products &<br/>Services</a>");
document.write("<ul class='nav-pns'>");
document.write("<a href='/eng/prod/secprod/CMProducts.htm'>Securities Products</a>");
document.write("<a href='/eng/prod/drprod/DMProducts.htm'>Derivatives Products</a>");
document.write("<a href='/eng/prod/clr/ClearingService.htm'>Clearing Services</a>");
document.write("<a href='/eng/prod/dataprod/dataprod.htm'>Data Products</a>");
document.write("<a href='/eng/prod/issuersev/issuersev.htm'>Issuer Services</a>");
document.write("<a href='/eng/prod/hosting/hostingservices.htm'>Hosting Services</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class='nav' style='width:124px;'>");
document.write("<a id='mo' href='/eng/market/market.htm'>Market<br/>Operations</a>");
document.write("<ul class='nav-mo'>");
document.write("<a href='/eng/market/hkex_part/EPIndex.htm'>Exchange and Clearing House Participants</a>");
document.write("<a href='/eng/market/partcir/Partindex.htm'>Participant Circulars</a>");
document.write("<a href='/eng/market/sec_tradinfra/CMTradInfra.htm'>Securities Trading Infrastructure</a>");
document.write("<a href='/eng/market/sec_tradinfo/CMTradInfo.htm'>Securities Trading Information</a>");
document.write("<a href='/eng/market/dv_tradinfra/DMTradInfra.htm'>Derivatives Trading Infrastructure</a>");
document.write("<a href='/eng/market/dv_tradfinfo/DMTradInfo.htm'>Derivatives Trading Information</a>");
document.write("<a href='/eng/market/clr/Clearing.htm'>Clearing</a>");
document.write("<a href='/eng/market/rm/RM_IndexPage.htm'>Risk Management</a>");
document.write("<a href='/eng/market/typhoons/trading_arrangements_during_typhoon_and_black_rainstorm.htm'>Trading Arrangements During Typhoons<br/> and Black Rainstorm</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class='nav-right' style='width:126px;'>");
document.write("<a id='rnr' href='/eng/rulesreg/regulatory.htm'>Rules &<br/>Regulations</a>");
document.write("<ul class='nav-rnr'>");
document.write("<a href='/eng/rulesreg/regintro/introreg.htm'>Introduction to Regulatory Framework</a>");
document.write("<a href='/eng/rulesreg/traderules/tradingrule_disclaimer.htm'>Trading Rules</a>");
document.write("<a href='/eng/rulesreg/clearrules/clearinghouserules_disclaimer.htm'>Clearing House Rules</a>");
document.write("<a href='/eng/rulesreg/listrules/rule_disclaimer.htm'>Rules and Guidance on Listing Matters</a>");
document.write("<a href='/eng/rulesreg/regdoc/regdoc.htm'>Other Documents Related to<br/> the Regulatory Framework</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class='nav-right' style='width:127px;'>");
document.write("<a id='snr' href='/eng/stat/statistics.htm'>Statistics &<br/>Research</a>");
document.write("<ul class='nav-snr'>");
document.write("<a href='/eng/stat/statrpt/statrpt.htm'>Statistics Reports</a>");
document.write("<a href='/eng/stat/epstat/epstat_page.htm'>Participant Statistics</a>");
document.write("<a href='/eng/stat/smstat/securitiesMarket.htm'>Securities Market Statistics</a>");
document.write("<a href='/eng/stat/dmstat/derivativesMarket.htm'>Derivatives Market Statistics</a>");
document.write("<a href='/eng/stat/clearstat/ccassstat_page.htm'>Clearing Statistics</a>");
document.write("<a href='/eng/stat/research/research.htm'>Research Reports</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class='nav-right' style='width:141px;'>");
document.write("<a id='nnc' href='/eng/newsconsul/newsconsul.htm'>News &<br/>Consultations</a>");
document.write("<ul class='nav-nnc'>");
document.write("<a href='/eng/newsconsul/hkexnews/news.htm'>News Releases</a>");
document.write("<a href='/eng/newsconsul/speech/speech.htm'>Speeches</a>");
document.write("<a href='/eng/newsconsul/newsltr/newsletter.htm'>Exchange Newsletters</a>");
document.write("<a href='/eng/newsconsul/blog/blog.htm'>Charles Li Direct</a>");
document.write("<a href='/eng/newsconsul/submissions/index.htm'>Submissions by HKEx</a>");
document.write("<a href='/eng/newsconsul/mktconsul/marketconsultation.htm'>Market Consultations</a>");
document.write("<a href='/eng/newsconsul/Tnotices/rfp.htm'>Tender Notices</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class='nav-right' style='width:90px;'>");
document.write("<a id='ah' href='/eng/exchange/exchange.htm'>About<br/>HKEx</a>");
document.write("<ul class='nav-ah'>");
document.write("<a href='/eng/exchange/corpinfo/corpinfo.htm'>Corporate Information</a>");
document.write("<a href='/eng/exchange/org/org.htm'>Organisation</a>");
document.write("<a href='/eng/exchange/invest/ir.htm'>Investor Relations</a>");
document.write("<a href='/eng/exchange/invest/realtime.htm'>Real Time Share Price</a>");
document.write("<a href='/eng/exchange/corpgov/corporate_governance.htm'>Corporate Governance</a>");
document.write("<a href='/eng/exchange/csr/csr.htm'>Corporate Social Responsibility</a>");
document.write("<a href='/eng/exchange/visit/index.htm'>Visit HKEx</a>");
document.write("<a href='/eng/exchange/job_opp/job.htm'>Job Opportunities</a>");
document.write("</ul>");
document.write("</li>");
document.write("</ul>");
document.write("</td></tr>");
document.write("<tr><td class='lhnav-footer'>&nbsp;</td></tr>");

url_level2 = ( url_level2 ) ? url_level2.toLowerCase() : "";

switch(url_level2)
{
case "invest":
	document.getElementById('isc').style.background='#0D3558';
	break;
case "listing":
	document.getElementById('lm').style.background='#0D3558';
	break;
case "prod":
	document.getElementById('pns').style.background='#0D3558';
	break;
case "market":
	document.getElementById('mo').style.background='#0D3558';
	break;
case "rulesreg":
	document.getElementById('rnr').style.background='#0D3558';
	break;
case "stat":
	document.getElementById('snr').style.background='#0D3558';
	break;
case "newsconsul":
	document.getElementById('nnc').style.background='#0D3558';
	break;
case "exchange":
	document.getElementById('ah').style.background='#0D3558';
	break;
default:

};
document.write("</table>");
