");
//alert(aUrl);
//if(Modernizr.canvas){
if(hasCanvas){
document.write("");
document.write("");
var funcName = 'U01FutOpenH';
var strTitle = '買方前五大';
var strKind = '1';
if(strKind=='3'){
funcName = 'U03Fut4Json';
strTitle = '買權';
document.write("");
}else if(strKind=='2'){
funcName = 'U02FutFut3MktH';
strTitle = '';
document.write("");
}else if(strKind=='4'){
funcName = 'U04FutCho3MktH';
strTitle = '';
document.write("");
}else{
document.write("");
}
$(document).ready(function(){
var oCommonChart = new CommonChart(30, 'selectDiv', '1', 0);
if(strKind=='2' || strKind=='4'){
console.log(oCommonChart.getData(funcName, '1'));//U02FutFut3MktH
$("#trade").change(function(){
var selectedVal = $( "#trade option:selected" ).index();
oCommonChart.changeData(selectedVal);
});
}else{
console.log(oCommonChart.getData(funcName, '1', 1, 1, strTitle));
$("#month").change(function(){
var xxx = $( "#FutTrans option:selected" ).val();
console.log($(this).val());
//console.log($(this).val()+', '+xxx);
var mm = parseInt($(this).val());
var subTitle = $( "#FutTrans option:selected" ).text();
if(strKind=='3'){
subTitle = $( "#bsMark option:selected" ).text();
}
console.log(oCommonChart.getData(funcName, '1', mm, parseInt(xxx), subTitle));
});
$("#FutTrans").change(function(){
var xxx = $( "#month option:selected" ).val();
//console.log($(this).val());
console.log(xxx+', '+$( "#FutTrans option:selected" ).text());
var mm = parseInt(xxx);
var subTitle = $( "#FutTrans option:selected" ).text();
if(strKind=='3'){
subTitle = $( "#bsMark option:selected" ).text();
}
console.log(oCommonChart.getData(funcName, '1', mm, parseInt($(this).val()), subTitle));
});
if(strKind=='3'){
$("#bsMark").change(function(){//買賣權參數 (1-買權 2-賣權)
var xxx = $( "#month option:selected" ).val();
//console.log($(this).val());
console.log(xxx+', '+$( "#FutTrans option:selected" ).text());
var mm = parseInt(xxx);
console.log(oCommonChart.getData(funcName, '1', mm, parseInt($(this).val()), $( "#bsMark option:selected" ).text()));
});
}
}
$("select#code").change(function(){
window.location.href = "u01.jsp?kind=1&code="+$(this).val();
});
});
}
//-->