//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=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/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=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/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://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/index_c.htm\'><img src=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/image/hkex_logo.gif\' width=\'210px\' height=\'130px\' alt=\'香港交易所商标\' title=\'香港交易所商标\' 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://sc.hkex.com.hk/TuniS/search.hkex.com.hk/chi/results_c.aspx?k=" + q + "&s=%E6%89%80%E6%9C%89%E7%B6%B2%E9%A0%81";
}

function sqsSubmit() {
	var redirectPage = isLangSC() ? "http:" + "//" + "sc.hkex.com.hk/gb/www.hkex.com.hk/chi/gb_redirect.htm" : "/chi/big5_redirect.htm";
	if (document.getElementsByName("StockQuote")[0].checked == true){
		if (isNaN(document.getElementById('sqsTextField').value)){
			alert("请输入数字");
		}else{
			window.location = redirectPage + "?WidCoID="+document.getElementById('sqsTextField').value+"&WidCoAbbName="
		}		
	}else{
		window.location = redirectPage + "?WidCoID=&WidCoAbbName="+document.getElementById('sqsTextField').value
	}	
}

document.write("<td width=\'565px\' align=\'left\'>");
document.write("<table width=\'100%\' cellpadding=\'0\' cellspacing=\'0\' border=\'0\'>");
document.write("<tr><td width=\'255px\' align=\'left\'>");
document.write("<table width=\'100%\' cellpadding=\'0\' cellspacing=\'0\' border=\'0\' class=\'hkex-header_c\'>");
document.write("<tr><td width=\'20px\'>&nbsp;</td><td align=\'left\'><b>网站搜寻</b></td></tr>");
document.write("<tr><td width=\'20px\'>&nbsp;</td><td align=\'left\'><input type=\'text\' id=wsTextField size=\'32\' defVal=\'搜寻\' value=\'搜寻\' onfocus=\'searchOnClickWS(this);\' onKeyDown=\'KeyDownHandler(event);\'>&nbsp;<img src=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/image/hp_header_search_icon.gif\' onclick=\'wsSubmit()\' alt=\'搜寻\' title=\'搜寻\' style=\'cursor:pointer;\' width=\'22px\' height=\'22px\' border=\'0\'></td></tr>");
document.write("<tr><td colspan=\'2\' align=\'right\'><a href=\'http://sc.hkex.com.hk/TuniS/search.hkex.com.hk/chi/advanced_c.aspx\'>进阶搜寻</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_c\'>");
document.write("<tr><td align=\'left\'><b>股价搜寻</b></td></tr>");
document.write("<tr><td align=\'left\'><input type=\'text\' id=sqsTextField size=\'32\' defVal=\'代号\' value=\'代号\' onfocus=\'searchOnClickSQS(this);\' onKeyDown=\'KeyDownHandler(event);\'>&nbsp;<img src=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/image/hp_header_search_icon.gif\' onclick=\'sqsSubmit()\' alt=\'搜寻\' title=\'搜寻\' 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/>代号&nbsp;<input type=\'radio\' name=\'StockQuote\' value=\'company\'/>上市公司名称</td></tr>");
document.write("</table>");
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("</td>");


document.write("<td width=\'200px\'>");
document.write("<table width=\'100%\' cellpadding=\'0\' cellspacing=\'0\' border=\'0\' class=\'hkex-header_c\'>");
document.write("<tr><td align=\'right\' style=\'font-family: Verdana; font-size:11px; letter-spacing: 0em;\'>");

if ( isLangSC() ) {
	document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/hkws/RSS/rss_c.htm\' title=\'RSS频道\'><img src=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/image/rss.gif\' width=\'14\' height=\'14\' border=\'0\' align= \'bottom\'/></a>&nbsp;|&nbsp;");
	document.write("<a href=\'javascript:route(\"sim\",\"eng\")\'>ENG</a>&nbsp;&nbsp;|&nbsp;&nbsp;");
	document.write("<a href=\'javascript:route(\"sim\",\"chi\")\' style=\'font-family:PMingLiu; font-size:11px;\'>繁体</a>&nbsp;&nbsp;|&nbsp;&nbsp;");
	document.write("<span style=\'font-family: PMingLiu; font-size:11px;\'>简体</span></td></tr>");	
} else if ( isLangTC() ) {
	document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/hkws/RSS/rss_c.htm\' title=\'RSS频道\'><img src=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/image/rss.gif\' width=\'14\' height=\'14\' border=\'0\' align= \'bottom\'/></a>&nbsp;|&nbsp;");
	document.write("<a href=\'javascript:route(\"chi\",\"eng\")\'>ENG</a>&nbsp;&nbsp;|&nbsp;&nbsp;");
	document.write("<span style=\'font-family: PMingLiu; font-size:11px;\'>繁体</span>&nbsp;&nbsp;|&nbsp;&nbsp;");
	document.write("<a href=\'javascript:route(\"chi\",\"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=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/global/contact_c.htm\'>联络</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/global/faqhkex_c.htm\'>常问问题</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/global/sitemap/sitemap_c.htm\'>网站地图</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_c-one\' class=\'nav_c-one\'>");
document.write("<li class=\'nav_c\' style=\'width:124px;\'>");
document.write("<a id=\'isc\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/isc_c.htm\'>投资服务中心</a>");
document.write("<ul class=\'nav_c-isc\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/company/profilemenu_page_c.asp\'>公司/证券资料</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/company/top_rise_page_c.asp?curHtml=s_gain\'>今日二十大 (延时数据)</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/company/quotemenu_page_c.asp\'>今日股价 (延时数据)</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/company/intramenu_page_c.asp\'>即日股价图 (延时数据)</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/company/pricemenu_page_c.asp\'>股价走势图</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/ddp/ddp_index_c.asp\'>期货及期权之价格及图表<br/>(延时数据)</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/sec_tradinfo/stockcode/stockcode_c.htm\'>证券名单</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/csm/homepage.asp?LangCode=tc\' target=\'_blank\'>中国证券市场网页</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkexnews.hk/index_c.htm\' target=\'_blank\'>「披露易」</a>");
document.write("<a href=\'https://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/user/servmenu_page_c.asp\'>投资者户口管理</a>");
document.write("<a href=\'https://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/user/portfolio_page_c.asp\'>讯息提示及投资组合估值</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/invest/user/faq_page_c.asp\'>有关投资服务中心</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class=\'nav_c\' style=\'width:94px;\'>");
document.write("<a id=\'lm\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/listing/listing_c.htm\'>上市事宜</a>");
document.write("<ul class=\'nav_c-lm\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/listing/listhk/listing_in_hong_kong_c.htm\'>为何在香港上市</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/listing/listevent/EventsCal_c.htm\'>有关活动</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/listing/listreq_pro/ListReq_c.htm\'>上市规定及程序</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/listing/edp/index_c.htm\'>「披露易」计划</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/listing/listcomrpt/LC_c.htm\'>上市委员会</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class=\'nav_c\' style=\'width:107px;\'>");
document.write("<a id=\'pns\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/prod/product_c.htm\'>产品及服务</a>");
document.write("<ul class=\'nav_c-pns\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/prod/secprod/CMProducts_c.htm\'>证券产品</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/prod/drprod/DMProducts_c.htm\'>衍生产品</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/prod/clr/ClearingService_c.htm\'>结算服务</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/prod/dataprod/dataprod_c.htm\'>数据产品</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/prod/issuersev/issuersev_c.htm\'>为上市公司而设的服务</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/prod/hosting/hostingservices_c.htm\'>设备托管服务</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class=\'nav_c\' style=\'width:93px;\'>");
document.write("<a id=\'mo\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/market_c.htm\'>市场运作</a>");
document.write("<ul class=\'nav_c-mo\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/hkex_part/EPIndex_c.htm\'>交易及结算所参与者</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/partcir/Partindex_c.htm\'>参与者通告</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/sec_tradinfra/CMTradInfra_c.htm\'>证券交易运作</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/sec_tradinfo/CMTradInfo_c.htm\'>证券交易资料</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/dv_tradinfra/DMTradInfra_c.htm\'>衍生产品交易运作</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/dv_tradfinfo/dmtradinfo_c.htm\'>衍生产品交易资料</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/clr/Clearing_c.htm\'>结算</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/rm/RM_IndexPage_c.htm\'>风险管理</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/market/typhoons/trading_arrangements_during_typhoon_and_black_rainstorm_c.htm\'>台风及黑色暴雨期间的交易安排</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class=\'nav_c-right\' style=\'width:107px;\'>");
document.write("<a id=\'rnr\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/rulesreg/regulatory_c.htm\'>规则与监管</a>");
document.write("<ul class=\'nav_c-rnr\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/rulesreg/regintro/introreg_c.htm\'>监管架构序言</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/rulesreg/traderules/tradingrule_disclaimer_c.htm\'>交易规则</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/rulesreg/clearrules/clearinghouserules_disclaimer_c.htm\'>结算所规则</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/rulesreg/listrules/rule_disclaimer_c.htm\'>上市规则与指引</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/rulesreg/regdoc/regdoc_c.htm\'>其他有关监管架构之文件</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class=\'nav_c-right\' style=\'width:139px;\'>");
document.write("<a id=\'snr\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/stat/statistics_c.htm\'>统计数据及研究</a>");
document.write("<ul class=\'nav_c-snr\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/stat/statrpt/statrpt_c.htm\'>统计报告</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/stat/epstat/epstat_page_c.htm\'>参与者统计数据</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/stat/smstat/securitiesMarket_c.htm\'>证券市场统计数据</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/stat/dmstat/derivativesMarket_c.htm\'>衍生产品市场统计数据</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/stat/clearstat/ccassstat_page_c.htm\'>结算服务统计数据</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/stat/research/research_c.htm\'>资料研究</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class=\'nav_c-right\' style=\'width:174px;\'>");
document.write("<a id=\'nnc\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/newsconsul_c.htm\'>新闻资料及市场谘询</a>");
document.write("<ul class=\'nav_c-nnc\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/hkexnews/news_c.htm\'>新闻稿</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/speech/speech_c.htm\'>讲辞</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/newsltr/newsletter_c.htm\'>香港交易所集团刊物 《交易所》</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/blog/blog_c.htm\'>小加网志</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/submissions/index_c.htm\'>香港交易所提交的意见回应</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/mktconsul/marketconsultation_c.htm\'>市场谘询</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/newsconsul/Tnotices/rfp_c.htm\'>招标启事</a>");
document.write("</ul>");
document.write("</li>");
document.write("<li class=\'nav_c-right\' style=\'width:142px;\'>");
document.write("<a id=\'ah\' href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/exchange_c.htm\'>香港交易所资料</a>");
document.write("<ul class=\'nav_c-ah\'>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/corpinfo/corpinfo_c.htm\'>公司资料</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/org/org_c.htm\'>组织</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/invest/ir_c.htm\'>投资者关系</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/invest/realtime_c.htm\'>股票实时价格</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/corpgov/corporate_governance_c.htm\'>企业管治</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/csr/csr_c.htm\'>企业社会责任</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/visit/index_c.htm\'>参观交易所</a>");
document.write("<a href=\'http://sc.hkex.com.hk/TuniS/www.hkex.com.hk/chi/exchange/job_opp/job_c.htm\'>招聘栏</a>");
document.write("</ul>");
document.write("</li>");
document.write("</ul>");
document.write("</td></tr>");
document.write("<tr><td class=\'lhnav_c-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>");
