﻿function showQuote(sType, sLang){
	if (navigator.appName == 'Microsoft Internet Explorer')
	{
		if (sType == "D")
			iFrameQuote.location = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-DLSS.html?STOCKCODE='+sType;
//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/dquote.asp?symbol=0440';
		else if (sType == "C")
			iFrameQuote.location = 'http://dynchart.etnet.com.hk/Mevas/ChartEngine/quote_chart_'+sLang+'.html?stockCode=0440&lang='+sLang;
//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/chart.asp?symbol=0440';
		else if (sType == "F")
			iFrameQuote.location = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-ci-main.html?STOCKCODE=440';
			//'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/fundamental/fund.asp?symbol=0440';
	}
	else
	{	
		if (sType == "D")
			iFrameQuote.src = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-DLSS.html?STOCKCODE='+sType;
//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/dquote.asp?symbol=0440';
		else if (sType == "C")
			iFrameQuote.src = 'http://dynchart.etnet.com.hk/Mevas/ChartEngine/quote_chart_'+sLang+'.html?stockCode=0440&lang='+sLang;
//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/chart.asp?symbol=0440';
		else if (sType == "F")
			iFrameQuote.src = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-ci-main.html?STOCKCODE=440';
			//'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/fundamental/fund.asp?symbol=0440';
	}
}

function getRadioValue(r){
   var idx = 0;
   for (var i=0; i<r.length; i++){
      if (r[i].checked == true){
         idx = i;
         break;
      }
   }
   return r[idx].value;
}

function stockQuote(strType, strStockCode){
	
	if (strStockCode != ""){
		if (navigator.appName == 'Microsoft Internet Explorer')
		{
				if (sType == "D")
					iFrameQuote.location = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-DLSS.html?STOCKCODE='+strStockCode;
		//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/dquote.asp?symbol='+strStockCode;
				else if (sType == "C")
					iFrameQuote.location ='http://dynchart.etnet.com.hk/Mevas/ChartEngine/quote_chart.jsp?stockCode='+strStockCode +'&lang='+sLang;
		//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/chart.asp?symbol='+strStockCode;
				else if (sType == "F")
					iFrameQuote.location = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-ci-main.html?STOCKCODE='+strStockCode;
		
					//iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/fundamental/fund.asp?symbol='+strStockCode;
		}
		else
		{
				if (sType == "D")
					iFrameQuote.src = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-DLSS.html?STOCKCODE='+strStockCode;
		//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/dquote.asp?symbol='+strStockCode;
				else if (sType == "C")
					iFrameQuote.src  ='http://dynchart.etnet.com.hk/Mevas/ChartEngine/quote_chart.jsp?stockCode='+strStockCode +'&lang='+sLang;
		//			iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/quote/chart.asp?symbol='+strStockCode;
				else if (sType == "F")
					iFrameQuote.src = 'http://gateway.etnet.com.hk/Mevas/'+sLang+'/public-ci-main.html?STOCKCODE='+strStockCode;
		}
					//iFrameQuote.location = 'http://www.aastocks.com/pkages/web/mevasbk/'+sLang+'/fundamental/fund.asp?symbol='+strStockCode;
	}else{
		alert("Please input Stock Code!");
	}
}