﻿function displayStockQuote(){
	document.write('<form name="f_stockquote">');
	if (v_tf_langcode ==""){
	document.write('<table border="1" bordercolor="#e2eff6" cellspacing="0" cellpadding="0" width="110"><tr><td bgcolor="#e2eff6" class="emidfont"><strong><center>Stock Quote</center></strong></td></tr>');
	} else {
	document.write('<table border="1" bordercolor="#e2eff6" cellspacing="0" cellpadding="0" width="110"><tr><td bgcolor="#e2eff6" class="csmallfont"><strong><center>股票報價</center></strong></td></tr>');
	}	
	document.write('<tr><td><table border="0" cellspacing="0" cellpadding="0" width="110" bgcolor="aliceblue">');
	if (v_tf_langcode == "") {
	document.write('<tr>');
	document.write('<td class="esmallfont" width=3>&nbsp;</td>');
	document.write('<td class="esmallfont" colspan=3><font color="#004e61">Please enter the stock code:</strong></font>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="esmallfont" width=3>&nbsp;</td>');
	document.write('<td class="esmallfont"><input type="text" name="t_stockquote" size="5" maxlength="5" onKeyPress="pressStockQuote_e(window.event)"></td>');
	document.write('<td align="right"><a href="javascript:goQuote_e()"><img border="0" name="search" src="/public_images/bt_go_e.gif"></a></td>');
	document.write('</td>');
	document.write('<td class="esmallfont" width=3>&nbsp;</td>');
	document.write('</tr>');
	} else {
	document.write('<tr>');
	document.write('<td class="csmallfont" width=3>&nbsp;</td>');
	document.write('<td class="csmallfont" colspan=3><font color="#004e61"><strong>請輸入股票編號:</strong></font>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="csmallfont" width=3>&nbsp;</td>');
	document.write('<td class="csmallfont"><input type="text" name="t_stockquote" size="5" maxlength="5" onKeyPress="pressStockQuote_c(window.event)"></td>');
	document.write('<td align="right"><a href="javascript:goQuote_c()"><img border="0" name="search" src="/public_images/bu_search_c.gif"></a></td>');
	document.write('</td>');
	document.write('<td class="csmallfont" width=3>&nbsp;</td>');
	document.write('</tr>');
	}
	
	document.write('</table></td></td></table>');            
	document.write('</form>');            
}

function pressStockQuote_e(e){
	if (e.keyCode == 13){
		window.event.returnValue=false;
		goQuote_e('');
	}
}

function goQuote_e(){
	var sStockCode = document.f_stockquote.t_stockquote.value;
	if (v_tf_left_cur_item == "delayquote")
		{
		if (navigator.appName == 'Microsoft Internet Explorer')
			iFrameQuote.location = 'http://gateway.etnet.com.hk/Mevas/eng/public-DLSS.html?STOCKCODE='+sStockCode;
		else
			iFrameQuote.src = 'http://gateway.etnet.com.hk/Mevas/eng/public-DLSS.html?STOCKCODE='+sStockCode;	
		//iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/eng/quote/dquote.asp?symbol='+sStockCode;
		}
	else
	location = "/public/u/usecurities_delayquote_e.html?sStockCode=" + sStockCode;	
}

function pressStockQuote_c(e){
	if (e.keyCode == 13){
		window.event.returnValue=false;
		goQuote_c('');
	}
}

function goQuote_c(){
	var sStockCode = document.f_stockquote.t_stockquote.value;
	if (v_tf_left_cur_item == "delayquote")
		{
		if (navigator.appName == 'Microsoft Internet Explorer')
			iFrameQuote.location = 'http://gateway.etnet.com.hk/Mevas/big5/public-DLSS.html?STOCKCODE='+sStockCode;
		else
			iFrameQuote.src = 'http://gateway.etnet.com.hk/Mevas/big5/public-DLSS.html?STOCKCODE='+sStockCode;
		}
//	iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/chi/quote/dquote.asp?symbol='+sStockCode;
	else
	location = "/public/u/usecurities_delayquote_c.html?sStockCode=" + sStockCode;	
}