';
str += '
密 码 ';
str += '';
str += ' ';
str += '';
str += ' 记住我的身份 ';
str += ' 选中将保持登录状态1个月, 公用电脑建议勿勾选。 ';
str += ' ';
str += ' ';
str += '';
str += '
';
str += ' ';
str += '找回密码 登录帮助 ';
str += ' ';
str += '';
str += '';
str += '';
_I($('con01-1'), str);
if (this.refreshmystock != null) {
clearInterval(this.refreshmystock);
this.refreshmystock == null;
}
return true;
}
;var getcookielist = Util.getCookie("SINA_PORTFOLIO");
if (getcookielist == "nocookie" && S_Finance.constant.Loginzixuangu == null) {
S_Finance.constant.Loginzixuangu = 1;
var func = "S_Finance.constant.ProcessLoginSina();";
var url = "http://vip.stock.finance.sina.com.cn/portfolio/set_cookie.php?func=" + func;
S_Finance.constant.load_data_script(unescape(url), "loginscript");
return true;
}
if (getcookielist == "") {
var arr1 = new Array();
arr1[0] = "nocookie";
} else if (getcookielist.indexOf(",") != -1) {
var arr1 = getcookielist.split(",");
} else if (getcookielist.indexOf("%2C") != -1) {
var arr1 = getcookielist.split("%2C");
} else {
var arr1 = new Array();
arr1[0] = getcookielist;
}
var arrlen = (arr1.length > 15) ? 15 : arr1.length;
for (var i = 0; i < arrlen; i++) {
this.want_arr[arrlen - 1 - i] = arr1[i];
}
var _length = this.want_arr.length;
var hot_list_arr = this.hot_stock_list.split(",");
for (var i = 0; i < hot_list_arr.length; i++) {
if (this.want_arr.length > 16) {
break;
}
if (hot_list_arr[i] == fullcode) {
continue;
} else if (getcookielist.indexOf(hot_list_arr[i]) != -1) {
continue;
} else {
this.want_arr.push(hot_list_arr[i]);
}
}
for (var i = 0; i < this.want_arr.length; i++) {
if (this.want_arr[i] != "") {
this.want_list += "s_" + this.want_arr[i] + ",";
}
}
myurl = "http://hq.cn101.bai188.com/func=S_Finance.upconstants.setVSDisp('con01-1','" + this.want_list + "'," + _length + ");&list=" + this.want_list;
S_Finance.constant.load_data_script(unescape(myurl), "msdata");
if (this.refreshmystock == null) {
this.refreshmystock = setInterval(this.procMyStock._Bind(this), 10 * 1000);
}
return true;
},
v_stock_chop: function(str) {
var len = str.length;
if (str == "" || len < 1) {
return "";
}
var newstr = str.substring(0, len - 1);
return newstr;
},
v_stock_chopStock: function(str) {
var len = str.length;
if (str == "" || len < 1) {
return "";
}
var stockList = str.split(",");
var newstr = "";
if (stockList.length < 12) {
return str;
} else {
for (var cnt = 0; cnt < 12; cnt++) {
newstr += stockList[cnt] + ",";
}
return this.v_stock_chop(newstr);
}
},
v_stock_set: function(cookieStr) {
document.cookie = "FINA_V_S_2=" + cookieStr + "; path=/; expires=THU 31-Dec-30 12:00:00 GMT; domain=finance.sina.com.cn";
},
v_stock_get: function() {
var cookieString = new String(document.cookie);
var cookieString1 = "FINA_V_S_2=";
var beginPosition = cookieString.indexOf(cookieString1);
cookieString1 = cookieString.substring(beginPosition + cookieString1.length);
cookieString = cookieString1.indexOf(";");
if (cookieString != -1) {
cookieString = cookieString1.substring(0, cookieString);
cookieString1 = cookieString;
}
return cookieString1;
},
fina_vstock_proc: function(thisStock) {
var cookieString = new String(document.cookie);
var cookieString1 = "FINA_V_S_2=";
var beginPosition = cookieString.indexOf(cookieString1);
var cnt;
var t;
var stockList;
if (thisStock == "" || thisStock.length < 6) {
return;
}
if (beginPosition == -1) {
this.v_stock_set(thisStock);
return;
} else {
cookieString1 = cookieString.substring(beginPosition + cookieString1.length);
cookieString = cookieString1.indexOf(";");
if (cookieString != -1) {
cookieString = cookieString1.substring(0, cookieString);
cookieString1 = cookieString;
}
stockList = cookieString1.split(",");
for (cnt = 0; cnt < stockList.length; cnt++) {
if (stockList[cnt] == thisStock) {
if (stockList.length > 1 && cnt != 0) {
for (t = cnt; t > 0; ) {
stockList[t] = stockList[--t];
}
stockList[0] = thisStock;
cookieString = "";
for (t = 0; t < stockList.length; t++) {
cookieString += stockList[t] + ",";
}
this.v_stock_set(this.v_stock_chop(cookieString));
}
return;
}
}
cookieString = thisStock + "," + cookieString1;
this.v_stock_set(this.v_stock_chopStock(cookieString));
return;
}
},
v_stock_clear: function() {
document.cookie = "FINA_V_S_2=; path=/; expires=THU 31-Dec-2003 12:00:00 GMT; domain=finance.sina.com.cn";
}
};
S_Finance.upconstants = {
itemTickettime: null,
servertime: null,
meigu_sy: null,
meigu_jzc: null,
relative_stock_list: null,
relative_stock: function() {
try {
eval("var temp_rela = relative_stocks_" + fullcode + ";");
var num = 0;
var stock_list = "";
for (var icode in temp_rela) {
num++;
stock_list += "s_" + icode + ",";
if (num >= 6)
break;
}
if (num > 0) {
S_Finance.upconstants.relative_stock_list = stock_list.substr(0, stock_list.length - 1);
}
} catch (e) {
if (AppConf.Debug)
alert(e.name);
}
},
_changepic: function(param) {
var temprandom = 0;
switch (param) {
case "fenshi":
temprandom = S_Finance.constant._getCurrtime();
break;
case "mink5":
temprandom = S_Finance.constant._getCurrtime(5 * 60 * 1000);
break;
case "mink15":
temprandom = S_Finance.constant._getCurrtime(15 * 60 * 1000);
break;
case "mink30":
temprandom = S_Finance.constant._getCurrtime(30 * 60 * 1000);
break;
default:
temprandom = S_Finance.constant._getCurrtime(60 * 60 * 1000);
break;
}
var innerhtmlstr = "";
if (param == "fenshi") {
$("chart").src = 'http://image2.sinajs.cn/newchart/min/n/' + fullcode + '.gif?' + temprandom;
$("chart_flash").style.display = "none";
$("chart").style.display = "block";
} else if (param == "flash") {
var so = new SWFObject("http://www.sinaimg.cn/cj/realstock/css/gupiao_1.0.0.swf","sotester","545","300","7","#FFffff");
so.addVariable("codename", fullcode);
so.addParam("wmode", "Opaque");
so.addVariable("url", "http://www.sinaimg.cn/cj/realstock/css/newdraw_1.0.0.swf");
so.write("chart_flash");
$("chart").style.display = "none";
$("chart_flash").style.display = "block";
} else if (param == "flash_historyline") {
var so = new SWFObject("http://www.sinaimg.cn/cj/realstock/css/historyline.swf","sotester","545","300","7","#FFffff");
so.addVariable("codename", fullcode);
so.addParam("wmode", "Opaque");
so.addVariable("url", "http://www.sinaimg.cn/cj/realstock/css/historyline.swf");
so.write("chart_flash");
$("chart").style.display = "none";
$("chart_flash").style.display = "block";
} else {
$("chart").src = 'http://image2.sinajs.cn/newchart/' + param + '/n/' + fullcode + '.gif?' + temprandom;
$("chart_flash").style.display = "none";
$("chart").style.display = "block";
}
return;
},
setVSDisp: function(tagname, stockstr, _length) {
var maxlen = 15;
var dispstr = '名称 价格(元) 涨跌幅 ';
tempmaxlen = (_length >= maxlen ? maxlen : maxlen - 1);
if (tagname == "con01-0") {
tempmaxlen++;
}
var arr1 = stockstr.split(",");
for (var i = 0; i < tempmaxlen; i++) {
if (arr1[i] != "" && arr1[i] != 'undefined' && arr1[i] != undefined) {
eval("oneval = hq_str_" + arr1[i]);
if (oneval != "" || oneval.length != 0) {
var dispAry = S_Finance.upconstants.getNPI(oneval);
if (dispAry.length > 0) {
if (i == _length) {
if (tagname == "con01-1") {
dispstr += "我的自选股>> ";
}
dispstr += "以下为热门股票 ";
}
dispstr += "" + dispAry[0] + " " + dispAry[1] + " " + dispAry[2] + " ";
}
}
} else {
continue;
}
}
if (tagname == "con01-1" && _length >= maxlen - 1) {
dispstr += "我的自选股>> ";
}
dispstr += "
";
_I($(tagname), dispstr);
return true;
},
getNPI: function(src) {
var retAry = new Array();
if (src == "" || src.length <= 0) {
return retAry;
}
var incdec, cl;
var tpAry = src.split(",");
if (tpAry.length > 4) {
retAry[0] = tpAry[0];
retAry[1] = "--";
retAry[2] = "--";
if (tpAry[1] != 0) {
retAry[1] = tpAry[1];
incdec = parseFloat(tpAry[3]).toFixed(AppConf.veracitynum);
retAry[2] = S_Finance.constant.addColor(incdec, 1);
}
}
return retAry;
},
buildLines: function(datary, flag, hunhe) {
var lines = "";
var tpstr;
var linetd = "";
var linetdrt = ' ';
for (i = 0; i < datary.length; i++) {
if (datary[i] && datary[i].length > 0) {
tpstr = " ";
if (flag == 1 && i == hunhe) {
tpstr = " ";
}
if (i == (datary.length - 1) && i > 5) {
linetd = '';
linetdrt = ' ';
}
tpstr += linetd;
if (flag == 1) {
if (i >= hunhe) {
tpstr += (i + 1 - hunhe);
} else {
tpstr += (i + 1);
}
} else {
tpstr += i;
}
tpstr += " " + linetd + "" + datary[i][1] + " " + linetdrt + datary[i][2] + "";
if (flag == 1) {
tpstr += linetdrt + S_Finance.constant.addColor(datary[i][3], 1) + "";
} else {
tpstr += linetdrt + " ";
}
lines += tpstr;
}
}
return lines;
},
setIncDisp: function() {
var diststr;
var whole_list = new Array();
var l = 0;
dispstr = '";
_I($('con07-1'), dispstr);
},
setIndDisp: function() {
var dispstr;
dispstr = '";
_I($('con07-2'), dispstr);
},
_uppic_chart: function() {
var newurl = $('chart').src;
var newurlpre = newurl.split("?");
newurl = newurlpre[0] + "?" + S_Finance.constant._getCurrtime();
$('chart').src = newurl;
this._cycle_chart();
},
_cycle_chart: function() {
if ((S_Finance.constant._ifTradeTime(S_Finance.upconstants.servertime) == 1 || S_Finance.constant._ifTradeTime(S_Finance.upconstants.servertime) == 3) && AppConf._isUppage == 1) {
setTimeout(S_Finance.upconstants._uppic_chart._Bind(this), AppConf.Interval_Uppic);
}
;
},
_updata: function() {
if (AppConf._isUppage == 1) {
var theurl = "http://hq.cn101.bai188.com/format=js&func=S_Finance.upconstants.setData();&list=" + fullcode + ",s_sz399106,s_sh000001,s_sz399001,s_sh000300," + S_Finance.upconstants.relative_stock_list;
S_Finance.constant.load_data_script(theurl, "datascript");
}
},
setData: function() {
this.itemTickettime = $("itemTickettime").innerHTML;
eval("this.hq_str_symbol = hq_str_" + fullcode);
if (this.hq_str_symbol != null && this.hq_str_symbol != undefined && this.hq_str_symbol != "undefined" && this.hq_str_symbol != "") {
this.chgedary = new Array();
this.chgedarylen = 0;
this.cacheidx = 0;
this.setValue(this.hq_str_symbol);
this.initflag = 1;
setTimeout(this.resetStyle._Bind(this), AppConf.Interval_1s);
} else {
setTimeout(this._updata._Bind(this), AppConf.Interval_AginReq);
return true;
}
;if (!S_Finance.constant.browserDetect() != "ie5") {
if (S_Finance.constant._ifTradeTime() == 1 || S_Finance.constant._ifTradeTime() == 3) {
setTimeout(this._updata._Bind(this), AppConf.Interval_Updata);
}
}
;this.setFlash = function(tid) {
var _tidColor = $(tid).style.color;
setTimeout(function() {
$(tid).style.color = "#000000";
}, 400);
setTimeout(function() {
$(tid).style.color = _tidColor;
}, 600);
setTimeout(function() {
$(tid).style.color = "#000000";
}, 800);
setTimeout(function() {
$(tid).style.color = _tidColor;
}, 1000);
}
;
if (this.itemTickettime != $("itemTickettime").innerHTML) {
$("itemCurrent").style.fontFamily = "Arial Rounded MT Bold";
$("itemCurrent").style.fontSize = "26px";
$("itemcurrprice").style.fontFamily = "Arial";
$("itemcurrprice").style.fontSize = "11px";
$("itemDiffpercent").style.fontFamily = "Arial";
$("itemDiffpercent").style.fontSize = "11px";
this.setFlash("itemCurrent");
this.setFlash("itemcurrprice");
this.setFlash("itemDiffpercent");
}
;return true;
},
setSHSZ: function() {
var idxary;
if (hq_str_s_sh000001 != null && hq_str_s_sh000001 != undefined && hq_str_s_sh000001 != "undefined" && hq_str_s_sh000001 != "") {
idxary = this.getIdxData(hq_str_s_sh000001);
this.setIdxShow(idxary, 'sh000001');
}
if (hq_str_s_sz399001 != null && hq_str_s_sz399001 != undefined && hq_str_s_sz399001 != "undefined" && hq_str_s_sz399001 != "") {
idxary = this.getIdxData(hq_str_s_sz399001);
var idxary2 = this.getIdxData(hq_str_s_sz399106);
idxary[3] = idxary2[3];
this.setIdxShow(idxary, 'sz399001');
}
if (hq_str_s_sh000300 != null && hq_str_s_sh000300 != undefined && hq_str_s_sh000300 != "undefined" && hq_str_s_sh000300 != "") {
idxary = this.getIdxData(hq_str_s_sh000300);
this.setIdxShow(idxary, 'sh000300');
}
},
setRelativeStock: function() {
if (S_Finance.upconstants.relative_stock_list == null)
S_Finance.upconstants.relative_stock();
try {
var temp1 = S_Finance.upconstants.relative_stock_list.split(",");
var temp1length = temp1.length;
var idxary, s_code, temp_var, str;
var classcolor = "";
var str = '同时被关注: 帮助 ';
for (var i = 0; i < temp1length; i++) {
eval("temp_var = hq_str_" + temp1[i]);
idxary = this.getIdxData(temp_var);
if (idxary[2] > 0)
classcolor = "incolor";
else if (idxary[2] < 0)
classcolor = "decolor";
str += "" + '' + idxary[0] + " (" + idxary[1] + " " + idxary[2] + "% ) ";
if (i == 2)
str += "";
}
$("relative_stocks_list").innerHTML = str;
$("relative_stocks_list").className = "Ctr-02";
} catch (e) {}
},
_objClassname: function(objid, tempnum) {
if (tempnum > 0) {
$(objid).className = "incolor";
} else if (tempnum < 0) {
$(objid).className = "decolor";
} else
$(objid).className = "";
},
setValue: function(data) {
var dataContent = data;
if (dataContent) {
dataContent.replace("\r", "");
dataContent.replace("\n", "");
var dataArray = dataContent.split(",");
var arrayLen = dataArray.length;
}
if (S_Finance.upconstants.servertime == dataArray[30] + ":" + dataArray[31]) {
return true;
}
;S_Finance.upconstants.servertime = dataArray[30] + ":" + dataArray[31];
S_Finance.upconstants.setSHSZ();
S_Finance.upconstants.setRelativeStock();
if (arrayLen > 25) {
if (S_Finance.constant._ifTradeTime(S_Finance.upconstants.servertime) != 1 && S_Finance.constant._ifTradeTime(S_Finance.upconstants.servertime) != 3) {
_I($('itemtradepro'), AppConf.Prom_Trade_close);
} else if (S_Finance.constant._ifTradeTime(S_Finance.upconstants.servertime) == 1) {
_I($('itemtradepro'), '刷新 ');
} else if (S_Finance.constant._ifTradeTime(S_Finance.upconstants.servertime) == 3) {
_I($('itemtradepro'), AppConf.Prom_Trade_Noon_close);
} else {
_I($('itemtradepro'), '');
}
var tpstr;
if (fullcode.substring(0, 2) == "sh") {
this.setDisp('itemMarket', "上海", 0);
this.setDisp('itemMarket2', "上海", 0);
} else if (fullcode.substring(0, 2) == "sz") {
this.setDisp('itemMarket', "深圳", 0);
this.setDisp('itemMarket2', "深圳", 0);
}
tpstr = fullcode.substring(2, 8);
if (S_Finance.constant._ifTradeTime() != -1 && dataArray[3] * 1000 == 0 && S_Finance.constant._formatTimetoInt(dataArray[31]) > 93000) {
this.setDisp('itemCurrent', '停牌 ', 0);
this.setDisp('itemCurrent2', "停牌", 0);
} else {
this.setDisp('itemCurrent', parseFloat(dataArray[3]).toFixed(AppConf.veracitynum), 0);
this.setDisp('itemCurrent2', parseFloat(dataArray[3]).toFixed(AppConf.veracitynum), 0);
}
tpstr = "";
var currprice = '';
if (dataArray[2] != 0 && dataArray[3] != 0) {
currprice = parseFloat((dataArray[3] * 1000 - dataArray[2] * 1000) / 1000).toFixed(AppConf.veracitynum);
var tempnum = parseFloat((dataArray[3] * 1000 - dataArray[2] * 1000) / (10 * dataArray[2])).toFixed(AppConf.veracitynum);
this._objClassname("itemDiffpercent", tempnum);
tpstr = tempnum + "%";
S_Finance.constant.setTheSameColor("itemCurrent", "itemDiffpercent");
S_Finance.constant.setTheSameColor("itemCurrent2", "itemDiffpercent");
S_Finance.constant.setTheSameColor("itemcurrprice", "itemDiffpercent");
}
this.setDisp('itemcurrprice', currprice, 0);
this.setDisp('itemDiffpercent', tpstr, 0);
this.setDisp('itemDiffpercent2', tpstr, 1);
tpstr = dataArray[30] + " " + dataArray[31];
this.setDisp('itemTickettime', tpstr, 0);
this.setDisp('itemPrevious', parseFloat(dataArray[2]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemPrevious2', parseFloat(dataArray[2]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemOpen', parseFloat(dataArray[1]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemOpen2', parseFloat(dataArray[1]).toFixed(AppConf.veracitynum), 1);
this._objClassname("itemOpen2", dataArray[1] - dataArray[2]);
tpstr = "--";
if (dataArray[2] != 0 && dataArray[3] != 0) {
tpstr = parseFloat((dataArray[3] * 1000 - dataArray[2] * 1000) / 1000).toFixed(AppConf.veracitynum);
}
;try {
if (null == S_Finance.upconstants.meigu_sy) {
S_Finance.upconstants.meigu_sy = $("cwjk_qnm_mgsy").innerHTML.trim() * 1;
}
} catch (er) {
if (null == S_Finance.upconstants.meigu_sy) {
var temps = $("cwjk_mgsy").innerHTML.trim();
S_Finance.upconstants.meigu_sy = temps.substr(0, temps.length - 1) * 1;
}
}
if (null == S_Finance.upconstants.meigu_jzc) {
var temps = $("cwjk_mgjzc").innerHTML.trim();
S_Finance.upconstants.meigu_jzc = temps.substr(0, temps.length - 1) * 1;
}
if (S_Finance.upconstants.meigu_sy <= 0)
tpstr = 0;
else
tpstr = (parseFloat(dataArray[3]) / S_Finance.upconstants.meigu_sy).toFixed(AppConf.veracitynum);
this.setDisp('pe_ratio_lyr', tpstr, 1);
if (S_Finance.upconstants.meigu_jzc <= 0)
tpstr = 0;
else
tpstr = (parseFloat(dataArray[3]) / S_Finance.upconstants.meigu_jzc).toFixed(AppConf.veracitynum);
this.setDisp('pa_ratio', tpstr, 1);
this.setDisp('itemDiffamount', tpstr, 1);
this.setDisp('itemLow', parseFloat(dataArray[5]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemLow2', parseFloat(dataArray[5]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemHigh', parseFloat(dataArray[4]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemHigh2', parseFloat(dataArray[4]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemVolume', parseFloat(dataArray[8] / 100).toFixed(0), 1);
this.setDisp('itemVolume2', parseFloat(dataArray[8] / 100).toFixed(0), 1);
this.updateDetail(dataArray[8], dataArray[3], dataArray[31], dataArray[6], dataArray[7]);
this.setDisp('itemAmount', parseFloat(dataArray[9] / 10000).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemBid', parseFloat(dataArray[6]).toFixed(AppConf.veracitynum), 1);
this.setDisp('itemSell', parseFloat(dataArray[7]).toFixed(AppConf.veracitynum), 1);
this._objClassname("itemLow2", dataArray[5] - dataArray[2]);
this._objClassname("itemHigh2", dataArray[4] - dataArray[2]);
tpstr = "--";
var bidV = parseInt(dataArray[10]) + parseInt(dataArray[12]) + parseInt(dataArray[14]) + parseInt(dataArray[16]) + parseInt(dataArray[18]);
var askV = parseInt(dataArray[20]) + parseInt(dataArray[22]) + parseInt(dataArray[24]) + parseInt(dataArray[26]) + parseInt(dataArray[28]);
if ((bidV + askV) != 0) {
tpstr = parseFloat((bidV - askV) * 100 / (bidV + askV)).toFixed(AppConf.veracitynum) + "%";
}
if (bidV > askV) {
$('itemRatio').className = "incolor";
$('bidaskdiff').className = "incolor";
} else if (bidV < askV) {
$('itemRatio').className = "decolor";
$('bidaskdiff').className = "decolor";
} else {
$('itemRatio').className = "";
$('bidaskdiff').className = "";
}
this.setDisp('itemRatio', tpstr, 0);
this.setDisp('bidaskdiff', (parseFloat(bidV - askV) / 100).toFixed(0), 0);
this.setDisp('bidp1', parseFloat(dataArray[11]).toFixed(AppConf.veracitynum), 0);
this.setDisp('bidp2', parseFloat(dataArray[13]).toFixed(AppConf.veracitynum), 0);
this.setDisp('bidp3', parseFloat(dataArray[15]).toFixed(AppConf.veracitynum), 0);
this.setDisp('bidp4', parseFloat(dataArray[17]).toFixed(AppConf.veracitynum), 0);
this.setDisp('bidp5', parseFloat(dataArray[19]).toFixed(AppConf.veracitynum), 0);
this.setDisp('bida1', parseFloat(dataArray[10] / 100).toFixed(0), 0);
this.setDisp('bida2', parseFloat(dataArray[12] / 100).toFixed(0), 0);
this.setDisp('bida3', parseFloat(dataArray[14] / 100).toFixed(0), 0);
this.setDisp('bida4', parseFloat(dataArray[16] / 100).toFixed(0), 0);
this.setDisp('bida5', parseFloat(dataArray[18] / 100).toFixed(0), 0);
this.setDisp('sellp1', parseFloat(dataArray[21]).toFixed(AppConf.veracitynum), 0);
this.setDisp('sellp2', parseFloat(dataArray[23]).toFixed(AppConf.veracitynum), 0);
this.setDisp('sellp3', parseFloat(dataArray[25]).toFixed(AppConf.veracitynum), 0);
this.setDisp('sellp4', parseFloat(dataArray[27]).toFixed(AppConf.veracitynum), 0);
this.setDisp('sellp5', parseFloat(dataArray[29]).toFixed(AppConf.veracitynum), 0);
this.setDisp('sella1', parseFloat(dataArray[20] / 100).toFixed(0), 0);
this.setDisp('sella2', parseFloat(dataArray[22] / 100).toFixed(0), 0);
this.setDisp('sella3', parseFloat(dataArray[24] / 100).toFixed(0), 0);
this.setDisp('sella4', parseFloat(dataArray[26] / 100).toFixed(0), 0);
this.setDisp('sella5', parseFloat(dataArray[28] / 100).toFixed(0), 0);
var range = ((parseFloat(dataArray[4]) - parseFloat(dataArray[5])) * 100 / parseFloat(dataArray[2])).toFixed(AppConf.veracitynum);
this.setDisp('Range', range + "%", 1);
if (parseInt(lastfive) != 0) {
var tmary = dataArray[31].split(":");
if (tmary.length == 3) {
currtime1 = tmary[0];
currtime2 = tmary[1];
}
if (parseInt(currtime1) <= 11) {
difftime = ((parseInt(currtime1) - 9) * 60) + (parseInt(currtime2) - 30);
} else {
difftime = ((parseInt(currtime1) - 9) * 60) + (parseInt(currtime2) - 30) - 90;
}
var lrate = ((parseInt(dataArray[8]) / (parseFloat(lastfive) * parseInt(difftime) * 100))).toFixed(AppConf.veracitynum);
this.setDisp('amountRate', lrate, 1);
}
if (parseInt(flag) == 1) {
if (parseInt(totalcapital) != 0) {
var totalmart = (parseFloat(dataArray[3]) * parseFloat(totalcapital) / 10000).toFixed(AppConf.veracitynum);
this.setDisp('totalMart', totalmart, 0);
this.setDisp('totalMart2', totalmart, 0);
}
if (parseInt(currcapital) != 0) {
var currmart = (parseFloat(dataArray[3]) * parseFloat(currcapital) / 10000).toFixed(AppConf.veracitynum);
this.setDisp('currMart', currmart, 0);
}
if (parseInt(currcapital) != 0) {
var ltaresult = (parseFloat(dataArray[8]) / (parseFloat(currcapital) * 100)).toFixed(AppConf.veracitynum);
this.setDisp('tradeRatio', ltaresult + "%", 1);
}
} else if (parseInt(flag) == 2) {
if (parseInt(totalcapital) != 0) {
var totalmart = ((parseFloat(dataArray[3]) * parseFloat(totalcapital) / 10000)).toFixed(AppConf.veracitynum);
this.setDisp('totalMart', totalmart, 1);
this.setDisp('totalMart2', totalmart, 1);
}
if (parseInt(curracapital) != 0 && parseInt(currbcapital) != 0 && parseInt(currbLast) != 0 && parseInt(exchangerate) != 0) {
var currmart = (((parseFloat(dataArray[3]) * parseFloat(curracapital) + parseFloat(currbcapital) * parseFloat(currbLast) * parseFloat(exchangerate) / 100) / 10000)).toFixed(AppConf.veracitynum);
this.setDisp('currMart', currmart, 1);
}
if (parseInt(curracapital) != 0) {
var ltaresult = (parseFloat(dataArray[8]) / (parseFloat(curracapital) * 100)).toFixed(AppConf.veracitynum);
this.setDisp('tradeRatio', ltaresult + "%", 1);
}
} else if (parseInt(flag) == 3) {
if (parseInt(totalcapital) != 0 && parseInt(curraLast) != 0) {
var totalmart = ((parseFloat(curraLast) * parseFloat(totalcapital) / 10000)).toFixed(AppConf.veracitynum);
this.setDisp('totalMart', totalmart, 1);
this.setDisp('totalMart2', totalmart, 1);
}
if (parseInt(curracapital) != 0 && parseInt(currbcapital) != 0 && parseInt(curraLast) != 0) {
var currmart = (((parseFloat(curraLast) * parseFloat(curracapital) + parseFloat(currbcapital) * parseFloat(dataArray[3]) * parseFloat(exchangerate) / 100) / 10000)).toFixed(AppConf.veracitynum);
this.setDisp('currMart', currmart, 1);
}
if (parseInt(currbcapital) != 0) {
var ltaresult = (parseFloat(dataArray[8]) / (parseFloat(currbcapital) * 100)).toFixed(AppConf.veracitynum);
this.setDisp('tradeRatio', ltaresult + "%", 1);
}
}
}
},
updateDetail: function(volume, price, time, buy, sell) {
if (this.lastvol >= volume) {
return true;
}
if (!$("con05-0")) {
return true;
}
var newitem;
var buysellflag;
if (price <= this.lastbuy) {
buysellflag = "DOWN";
} else if (price >= this.lastsell) {
buysellflag = "UP";
} else {
buysellflag = "-";
}
this.lastbuy = buy;
this.lastsell = sell;
if (this.initflag == 1) {
newitem = new Array(time,volume - this.lastvol,price,buysellflag);
} else {
newitem = new Array(time,"-",price,buysellflag);
}
this.lastvol = volume;
detailcache.unshift(newitem);
this.setDetailDisp(detailcache);
return true;
},
setDetailDisp: function(detary) {
_I($("con06-0"), this.buildDetailDisp(detary));
},
setDetailDisp1: function(detary) {
detailcache = detary;
_I($("con06-0"), this.buildDetailDisp(detary));
},
buildDetailDisp: function(detary) {
var dispstr = '";
dispstr += "成交明细>>
";
return dispstr;
},
resetStyle: function() {
var obj;
for (var i = 0; i < this.chgedary.length; i++) {
obj = $(this.chgedary[i]);
if (obj && obj.style) {
obj.style.color = "";
}
}
},
setDisp: function(theobj, theval, flagval) {
if (!$(theobj)) {
return;
}
if (flagval != 0) {
var _tidColor = $(theobj).style.color;
$(theobj).style.color = "red";
setTimeout(function() {
$(theobj).style.color = _tidColor;
}, 1000);
}
_I($(theobj), theval);
},
getIdxData: function(datastr) {
var idat = new Array();
var odat = new Array();
idat = datastr.split(",");
odat[0] = idat[0];
odat[1] = idat[1];
odat[2] = idat[3];
odat[3] = parseFloat(idat[5] / 10000).toFixed(AppConf.veracitynum);
return odat;
},
setIdxShow: function(datary, symbol) {
var showstr = "" + datary[0].trim() + " " + datary[1] + " ";
if (datary[2] > 0) {
showstr += "" + datary[2] + "% ";
} else if (datary[2] < 0) {
showstr += "" + datary[2] + "% ";
} else {
showstr += datary[2] + "%";
}
showstr += " " + datary[3] + "亿元";
_I($("idx" + symbol), showstr);
},
buildDisp: function(valary, flag) {
if (valary && valary.length > 0) {
var i, dispstr, morecontent;
switch (flag) {
case 0:
dispstr = "