startdate="";
function BeforeChangeFont() {
	startdate=new Date();
//	iobj = document.getElementsByTagName('object');
//	for(var i=0;i<iobj.length;i++) {
//		alert(iobj[i].innerHTML);
//	}
}

function AfterChangeFont(startdate, type) {
	ulobj = document.getElementsByTagName('ul');
	for(var i=0;i<ulobj.length;i++) {
		initializetabcontent(ulobj[i].id);
	}

	endDate = new Date()
//	alert(startdate + "\n" + endDate);
	ifobj = document.getElementsByTagName('iframe');
	for(var i=0;i<ifobj.length;i++) {
		if (ifobj[i].src.search(/adc1.mingpao.com/) < 0 && ifobj[i].src.search(/video/) < 0 && ifobj[i].src.search(/docvote/i) < 0) {
			convertsrc = ifobj[i].src.toLowerCase();
			if (type == "繁體版")
				ifobj[i].src = convertsrc + "?simplified";
			else
				ifobj[i].src = convertsrc.replace(/\?simplified/, "");
		}
	}
}

document.writeln('<span id="convert_subject">');
document.writeln('<table width=950 border=0 cellspacing=0 cellpadding=0 align="center">');
document.writeln('<tr>');
document.writeln('<td><a href="'+str_BaseHref1+'" target="_top"><img src="'+str_BaseHref1+'image/mpfn_logo.gif" width="200" height="70" border="0" alt="明報財經網" /></a></td>');
document.writeln('<td align="right">');
document.writeln('<table border=0 cellspacing=0 cellpadding=2>');
document.writeln('<form>');
document.writeln('<tr align="center">');
document.writeln('<td><a href="mailto:piano@mingpao.com?Subject=讀者報料" target="_top"><img src="'+str_BaseHref1+'image/top_reader.gif" border="0" alt="讀者報料" align="absmiddle"></a></td>');
document.writeln('<td>|</td>');
document.writeln('<td><a href="http://property.mpfinance.com/cfm/pl4.cfm" target="_blank"><b>二手成交</b></a></td>');
document.writeln('<td>|</td>');
document.writeln('<td><a href="'+str_BaseHref1+'htm/Finance/Invest_investqa.htm" target="_top"><b>投資Q&A</b></a></td>');
document.writeln('<td>|</td>');
document.writeln('<td><a href="http://forum.mingpao.com/cfm/Forum1.cfm?OwnerID=2" target="_blank"><b>財經討論區</b></a></td>');
document.writeln('<td>|</td>');
document.writeln('<td>');
document.writeln('<select onchange="x=document.getElementById(\'windexurl\');x.href=this.options[this.selectedIndex].value;x.click();" name="windex">');
document.writeln('<option selected="selected">-環球市況-</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther2_asia.htm">亞洲股巿</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther2_china.htm">中國股巿</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther2_eur.htm">歐美股巿</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther2_forex.htm">外匯市況</option>');
document.writeln('</select><a href="" target="_top" id="windexurl"></a>');
document.writeln('</td>');
document.writeln('<td>|</td>');
document.writeln('<td>');
document.writeln('<select onchange="x=document.getElementById(\'top20url\');x.href=this.options[this.selectedIndex].value;x.click();" name="top20">');
document.writeln('<option selected="selected">-異動股輪-</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_stockmnc.htm">20大升幅股</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_stocklnc.htm">20大跌幅股</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_stockmtno.htm">20大活躍股</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_stockmvol.htm">20大成交股</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_warrantmnc.htm">20大升幅輪</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_warrantlnc.htm">20大跌幅輪</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_warrantmtno.htm">20大活躍輪</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Stock/QuoteOther1_warrantmvol.htm">20大成交輪</option>');
document.writeln('</select><a href="" target="_top" id="top20url"></a>');
document.writeln('</td>');
document.writeln('<td>|</td>');
document.writeln('<td>');
document.writeln('<select name="classify" onChange="x=document.getElementById(\'classifyurl\');x.href=this.options[this.selectedIndex].value;x.click();">');
document.writeln('<option selected>-分類資訊-</option>');
document.writeln('<option value="'+str_BaseHref1+'htm/Finance/RelatedLink/B001_1.htm">物業');
document.writeln('<option value="'+str_BaseHref1+'htm/Finance/RelatedLink/B002_1.htm">股票');
document.writeln('<option value="'+str_BaseHref1+'htm/Finance/RelatedLink/B003_1.htm">外匯');
document.writeln('<option value="'+str_BaseHref1+'htm/Finance/RelatedLink/B004_1.htm">基金');
document.writeln('<option value="'+str_BaseHref1+'htm/Finance/RelatedLink/B005_1.htm">保險');
document.writeln('<option value="'+str_BaseHref1+'htm/Finance/RelatedLink/B006_1.htm">債券');
document.writeln('<option value="'+str_BaseHref1+'htm/Finance/RelatedLink/B007_1.htm">衍生');
document.writeln('</select><a href="" target="_top" id="classifyurl"></a>');
document.writeln('</td>');
document.writeln('<td> |</td>');
document.writeln('<td>');
//document.writeln('<input type="button" value="繁體版" onClick="convert(0,\'_subject\')||convert(0,\'\')" name="button">繁體版');
document.writeln('<input type="button" value="簡體版" onClick="BeforeChangeFont();if (this.value==\'簡體版\') {this.value=\'繁體版\';convert(0,\'_subject\');} else {this.value=\'簡體版\';convert(1,\'_subject\')};AfterChangeFont(startdate, this.value);" name="ConvFontButton"><br>');
document.writeln('</td>');
//document.writeln('<td> |</td>');
//document.writeln('<td>字體大小：<a href="javascript:ts(\'body\',1)"><img src="'+str_BaseHref1+'image/plus.gif" alt="加大" width="13" height="13" border="0" /></a> | <a href="javascript:ts(\'body\',-1)"><img src="'+str_BaseHref1+'image/minus.gif" alt="縮小" width="13" height="13" border="0" /></a></td>');
document.writeln('</tr>');
document.writeln('</form>');
document.writeln('</table>');
document.writeln('<table border="0" cellspacing="0" cellpadding="3" bgcolor="#E8E8E8">');
document.writeln('<tr>');
document.writeln('<form action="'+str_BaseHref1+'htm/Stock/Quote1.htm" method="get" name="stockquote" id="stockquote" target="_top">');
document.writeln('<td><img src="'+str_BaseHref1+'image/icon_search.gif" align="absmiddle" hspace="3">搜尋器</td>');
document.writeln('<td><input type="text" name="stockid" size="4" />');
document.writeln('</td>');
document.writeln('<td><input type="submit" value="查詢股輪" />');
document.writeln('</td>');
document.writeln('<td>|</td>');
document.writeln('</form>');
document.writeln('<form action="'+str_ClubBaseHref1+'cfm/IC_Search.cfm" method="get" name="contentsearch" id="contentsearch" target="_blank">');
document.writeln('<td><input type="text" name="keyword" size="12"><input type="hidden" name="DocOwner" value="finance"></td>');
document.writeln('<td><acronym title="理財會會員專享"><input type="submit" value="文章搜尋"></acronym></td>');
document.writeln('<td>|</td>');
document.writeln('<td><a href="'+str_ClubBaseHref1+'cfm/IC_Search.cfm" target="_blank"><acronym title="理財會會員專享">[進階搜尋]</acronym></a></td>');
document.writeln('<td>|</td>');
document.writeln('<td><a href="'+str_BaseHref1+'htm/Finance/FundQuoteMain.htm" target="_top"><b>基金資料</b></a></td>');
document.writeln('<td>|</td>');
document.writeln('<td><a href="'+str_BaseHref2+'cfm/MPFQuote1.cfm" target="_top"><b>強積金資料</b></a></td>');
document.writeln('</tr>');
document.writeln('</form>');
document.writeln('</table>');
document.writeln('</tr>');
document.writeln('</table>');

