function winmailLogin() {
	if (document.getElementById("f_user").value == "") {
		alert("请输入登录名！！");
		document.getElementById("f_user").focus();
		return false;
	}
	if (document.getElementById("f_pass").value == "") {
		alert("请输入登录密码！！");
		document.getElementById("f_pass")
		return false;
	}
	document.forms["winmailLoginForm"].submit();
}

if (typeof SFT == "undefined") {
	SFT = function() {
	};
}
// 登录相关
SFT.login = function(form, returnStatus) {
	var success = false;
	SFT.Transport.fetchJsonObj({
				url		: "/sft/ajax/PortletIndex!login.action",
				method	: "POST",
				content	: buildFormParams(form),
				async	: false,
				onLoad	: function(jsonObj) {
					if (jsonObj.success) {
						if ((typeof returnStatus) != "undefined" && returnStatus == true) {
							success = jsonObj.success;
						} else {
							//登录成功后刷新登录板块
							// fatch(form.ajaxUrl, "", form.blockId);
							var jumpto=form.elements["jumpto"];
							if(jumpto&&jumpto.value!=""){
								if (window.parent && window.parent.document) {
									window.parent.document.location.href=jumpto.value;
								} else {
									window.document.location.href=jumpto.value;
								}
							}else{
								//登录成功后刷新整个页面
								if (window.parent && window.parent.document) {
									window.parent.document.location.reload();
								} else {
									window.document.location.reload();
								}
							}
						}
					} else {
						alert(jsonObj.customMsg);
						form.reset();
					}
				}
			});
	return success;
};
SFT.register = function(form) {
	//点击注册按钮后刷新改变浏览器页面
	if (window.parent && window.parent.document) {
		window.parent.document.location.href = "/sft/widget/html/System/m_process/am_c1/fp_/files/ynbyportlet/jsp/register.jsp/58/1239/26/_/_/_/1/0.html";
	} else {
		window.document.location.href = "/sft/widget/html/System/m_process/am_c1/fp_/files/ynbyportlet/jsp/register.jsp/58/1239/26/_/_/_/1/0.html";
	}
};
SFT.logout = function(form) {
	SFT.Transport.fetchJsonObj({
				url		: "/sft/ajax/PortletIndex!logout.action",
				method	: "POST",
				content	: buildFormParams(form),
				async	: false,
				onLoad	: function(jsonObj) {
					if (jsonObj.success) {
						//注销成功后刷新登录板块
						// fatch(form.ajaxUrl, "", form.blockId);

						//注销成功后刷新整个页面
						if (window.parent && window.parent.document) {
							window.parent.document.location.reload();
						} else {
							window.document.location.reload();
						}
					} else {
						alert(jsonObj.customMsg);
						form.reset();
					}
				}
			});
};
///白药今日股市

String.prototype.trim = function () {
	return this.replace(/(^[|??]*)|([|??]*$)/g, "");
};
if (typeof $ == "undefined") {
	$ = function (id) {
		return document.getElementById(id);
	};
}
if (typeof $C == "undefined") {
	$C = function (t) {
		return document.createElement(t);
	};
}
if (typeof $T == "undefined") {
	$T = function (t) {
		return document.createTextNode(t);
	};
}
if (typeof _A == "undefined") {
	_A = function (t, c) {
		t.appendChild(c);
	};
}
if (typeof _I == "undefined") {
	_I = function (t, c) {
		t.innerHTML = c;
	};
}
if (typeof S_Finance == "undefined") {
	S_Finance = {};
}
var Class = {create:function () {
	return function () {
		this.Init.apply(this, arguments);
	};
}};
if (typeof Util == "undefined") {
	Util = {};
}
Util.AddEvent = function (el, name, cb, useCapture) {
	if (el.addEventListener) {
		el.addEventListener(name, cb, useCapture);
	} else {
		if (el.attachEvent) {
			el.attachEvent("on" + name, cb);
		}
	}
};
Util.DeleteEvent = function (el, name, cb, useCapture) {
	if (el.detachEvent) {
		el.detachEvent(name, cb, useCapture);
	} else {
		if (el.removeEventListener) {
			el.removeEventListener("on" + name, cb);
		}
	}
};
Util.getCookie = function (name) {
	var cookieString = new String(document.cookie);
	var cookieString1 = name + "=";
	var beginPosition = cookieString.indexOf(cookieString1);
	if (beginPosition == -1) {
		return "nocookie";
	}
	cookieString1 = cookieString.substring(beginPosition + cookieString1.length);
	cookieString = cookieString1.indexOf(";");
	if (cookieString != -1) {
		cookieString = cookieString1.substring(0, cookieString);
		cookieString1 = cookieString;
	}
	return cookieString1;
};
Function.prototype._Bind = function () {
	var __m = this, object = arguments[0], args = new Array();
	for (var i = 1; i < arguments.length; i++) {
		args.push(arguments[i]);
	}
	return function () {
		var c_args = [];
		for (var k = 0; k < arguments.length; k++) {
			c_args.push(arguments[k]);
		}
		return __m.apply(object, c_args.concat(args));
	};
};
Function.prototype._BindForEvent = function () {
	var __m = this, object = arguments[0], args = new Array();
	for (var i = 1; i < arguments.length; i++) {
		args.push(arguments[i]);
	}
	return function (event) {
		return __m.apply(object, [(event || window.event)].concat(args));
	};
};
var AppConf = {Interval_Uppage:12 * 60 * 1000, Interval_Uppic:60 * 1000, Interval_Updata:5 * 1000, Interval_1s:1 * 1000, Interval_AginReq:500, veracitynum:2, cmnt_list_num:6, _isUppage:1, Refreshnew_cjyw:"\u5237\u65b0\u8d22\u7ecf\u8981\u95fb", Refreshnew_cptc:"\u5237\u65b0\u64cd\u76d8\u5957\u9910", Refreshnew_bklg:"\u5237\u65b0\u535a\u5ba2\u8bba\u80a1", Refreshnew_ggzx:"\u5237\u65b0\u4e2a\u80a1\u8d44\u8baf", Refreshnew_hyzx:"\u5237\u65b0\u884c\u4e1a\u8d44\u8baf", Prom_Trade_close:"\u63d0\u793a:\u4ea4\u6613\u7ed3\u675f", Prom_Trade_Noon_close:"\u63d0\u793a:\u5348\u4f11\u505c\u76d8", Debug:false};
S_Finance.constant = {LoginSina:null, Loginzixuangu:null, browserDetect:function () {
	var sUA = navigator.userAgent.toLowerCase();
	var sIE = sUA.indexOf("msie");
	var sOpera = sUA.indexOf("opera");
	var sMoz = sUA.indexOf("gecko");
	if (sOpera != -1) {
		return "opera";
	}
	if (sIE != -1) {
		nIeVer = parseFloat(sUA.substr(sIE + 5));
		if (nIeVer >= 6) {
			return "ie6";
		} else {
			if (nIeVer >= 5.5) {
				return "ie55";
			} else {
				if (nIeVer >= 5) {
					return "ie5";
				}
			}
		}
	}
	if (sMoz != -1) {
		return "moz";
	}
	return "other";
}, chklogin:function () {
	var userid = $("userid").value;
	var pwd = $("pwd").value;
	var rflag = $("rflag").value;
	_I($("con01-1"), "<p>&nbsp;&nbsp;<img width='16' height='20' src='http://www.sinaimg.cn/cj/money/images/progress0.gif' />\u767b\u5f55\u4e2d...</p>");
	var func = "S_Finance.constant.ProcessLoginSina();";
	var url = "http://vip.stock.finance.sina.com.cn/portfolio/login_nc.php?func=" + func + "&userid=" + userid + "&pwd=" + pwd + "&rflag=" + rflag + "&rn=" + (new Date()).getTime();
	S_Finance.constant.load_data_script(unescape(url), "loginscript");
	return true;
}, ProcessLoginSina:function () {
	S_Finance.constant.LoginSina = 1;
	var vist_stock = new S_Finance.v_stock();
	vist_stock.procMyStock();
}, add2portfolio:function () {
	var url = "http://vip.stock.finance.sina.com.cn/portfolio/qjia.php?symbol=" + fullcode + "&ru=" + window.location.href;
	window.location.href = url;
}, refeshbutt:function (con0n, index01) {
	var con0n1 = S_Finance.constant._formatnum(con0n);
	if ("03" == con0n && "0" == index01) {
		S_Finance.constant.reInitGGZXList();
	} else {
		_I($("con" + con0n1 + index01), news_str);
	}
}, reInitGGZXList:function () {
	if (typeof news_str != "undefined") {
		var subchild, achild, achildDate;
		var dateget;
		var achildDateArr, achildDateDay, achildDateTime;
		var ret = [];
		var damemonDIV = $C("DIV");
		damemonDIV.id = "ggzxDIV1";
		damemonDIV.innerHTML = news_str;
		var ggzxlist = damemonDIV.childNodes;
		var string_ggzx = "";
		for (var i = 0; i < ggzxlist.length; i++) {
			if (ggzxlist[i].nodeType == 1) {
				subchild = ggzxlist[i].childNodes;
				achild = subchild[0].childNodes;
				ret[1] = achild[0].innerHTML;
				ret[2] = achild[0].href;
				achildDate = subchild[1].innerHTML;
				achildDate = achildDate.substring(1, achildDate.length - 1);
				var pattern = /^(\d{4})(-)(\d{2})(-)(\d{2}( )(\d{2})(:)(\d{2}))$/;
				var pattern1 = /^(\d{4})(-)(\d{2})(-)(\d{2}( )(\d{2})(:)(\d{2})(:)(\d{2}))$/;
				if (achildDate.match(pattern)) {
				} else {
					if (achildDate.match(pattern1)) {
						achildDate = achildDate.substr(0, 16);
					} else {
						achildDate = "2009-02-19 14:10";
					}
				}
				string_ggzx += "<li><span class=\"link\"><a href=\"" + ret[2] + "\" target=\"_blank\">" + ret[1] + "</a></span><span class=\"data\">(" + achildDate + ")</span></li>";
			}
		}
		_I($("con030"), string_ggzx);
	}
}, _getVeracitynum:function (str1) {
	var num1 = 2;
	var sz200 = str1.indexOf("sz200");
	var sh900 = str1.indexOf("sh900");
	if (sz200 != -1 || sh900 != -1) {
		num1 = 3;
	}
	return num1;
}, _getCurrtime:function (time1) {
	var curtime = new Date();
	var kk = curtime.getTime();
	if (time1 > 0) {
		kk = parseFloat(kk / time1).toFixed(0);
	}
	return kk;
}, _formatTimetoInt:function (timestr) {
	var time_arr = timestr.split(":");
	return time_arr[0] * 10000 + time_arr[1] * 100 + time_arr[2] * 1;
}, _formatnum:function (intnum) {
	if (intnum < 10) {
		return "0" + intnum;
	} else {
		return intnum;
	}
}, _ifTradeTime:function (timestr) {
	if (timestr != null && timestr != undefined && timestr != "undefined" && timestr != "") {
		var temtime = timestr.split(":");
		var dat = temtime[0];
		var temdat = dat.split("-");
		var y = temdat[0];
		var m = temdat[1];
		var d = temdat[2];
		var ho = temtime[1];
		var mi = temtime[2];
		var se = temtime[3];
		var alltime = new Date(y, (m - 1), d, ho, mi, se, 0);
		var we = alltime.getDay();
	} else {
		var alltime = new Date();
		var ho = alltime.getHours();
		var mi = alltime.getMinutes();
		var we = alltime.getDay();
	}
	if (we < 1 || we > 5) {
		return -1;
	}
	if (ho < 9 || (ho == 9 && mi < 15)) {
		return 0;
	}
	if (ho > 15 || (ho == 15 && mi > 1)) {
		return 2;
	}
	if (((ho == 12 && mi > 1) || (ho == 11 && mi > 30)) && (we >= 1 || we <= 5)) {
		return 3;
	}
	return 1;
}, load_data_script:function (url, idname) {
	var obj = $(idname);
	if (obj) {
		obj.parentNode.removeChild(obj);
	}
	var newscript = $C("script");
	newscript.type = "text/javascript";
	newscript.src = url;
	newscript.id = idname;
	_A(document.body, newscript);
}, setTheSameColor:function (objid2, objid1) {
	$(objid2).className = $(objid1).className;
}, addColor:function (num, flag) {
	var cl;
	var ret;
	var pctflag = "";
	if (flag == 1) {
		pctflag = "%";
	}
	ret = num;
	if (num > 0) {
		ret = "<font class='incolor'>" + num + pctflag + "</font>";
	} else {
		if (num < 0) {
			ret = "<font class='decolor'>" + num + pctflag + "</font>";
		}
	}
	return ret;
}, checkiask:function () {
	if (document._searchiask.iaskorik.value == "\u8bf7\u8f93\u5173\u952e\u8bcd" || document._searchiask.iaskorik.value == "") {
		document._searchiask.iaskorik.value = "\u8bf7\u8f93\u5173\u952e\u8bcd";
		document._searchiask.iaskorik.className = "iaskRedTxt";
		document._searchiask.iaskorik.style.border = "1px #f00 solid";
		return false;
	} else {
		window.open("http://www.iask.com/n?t=" + document._searchiask.t.value + "&k=" + document._searchiask.iaskorik.value);
	}
	return false;
}, sens:function () {
	document._searchiask.t.value = "keyword";
}, sezt:function () {
	document._searchiask.t.value = "subject";
}, _suggest:function (fn) {
	if (fn.q.value == "" || fn.q.value == "\u4ee3\u7801/\u540d\u79f0/\u62fc\u97f3") {
		fn.q.value = "\u4ee3\u7801/\u540d\u79f0/\u62fc\u97f3";
		fn.q.focus();
		return false;
	}
	var locadr = fn.locadr.value;
	if (locadr != "") {
		window.location.href = locadr;
	} else {
		fn.symbol.value = fn.q.value;
		fn.submit();
	}
	return false;
}, _goto:function (url) {
	window.location.href = url;
}};
S_Finance.Nav = Class.create();
S_Finance.Nav.prototype = {Init:function (el) {
	this._top();
	this._left();
	this._cent();
}, _top:function () {
	for (var i = 1; i <= 15; i++) {
		var param = "nav" + S_Finance.constant._formatnum(i);
		param = new S_Finance.Nav.NavTop($(param));
	}
}, _left:function () {
	for (var i = 0; i <= 16; i++) {
		var param = "navlf" + S_Finance.constant._formatnum(i);
		param = new S_Finance.Nav.NavLf($(param), i);
	}
}, _cent:function () {
	var mtotal = [2, 4, 4, 4, 5, 5, 2, 3];
	for (var i = 1; i <= 8; i++) {
		for (var j = 0; j < mtotal[i - 1]; j++) {
			var param = "m" + S_Finance.constant._formatnum(i) + j;
			var param = new S_Finance.Nav.NavCent(i, j, mtotal[i - 1]);
		}
	}
}};
S_Finance.Nav.NavTop = Class.create();
S_Finance.Nav.NavTop.prototype = {theOne:null, Init:function (el) {
	this.theOne = el;
	Util.AddEvent(el, "mouseover", this.chgBgImgOn._Bind(this));
	Util.AddEvent(el, "mouseout", this.chgBgImgOff._Bind(this));
}, chgBgImgOn:function () {
	var img = "http://www.sinaimg.cn/cj/realstock/image2/finance_in_ws_002.gif";
	this.theOne.style.backgroundImage = "url(" + img + ")";
}, chgBgImgOff:function () {
	var img = "";
	this.theOne.style.backgroundImage = "url(" + img + ")";
}};
S_Finance.Nav.NavLf = Class.create();
S_Finance.Nav.NavLf.prototype = {theOne:null, itemId:null, itemobj:null, itemImg:null, Init:function (el, itemId) {
	this.theOne = el;
	this.itemId = itemId;
	this.itemobj = "item" + itemId;
	this.itemImg = "tImg" + itemId;
	Util.AddEvent(el, "click", this.ChangeItem._Bind(this));
}, ChangeItem:function () {
	if ($(this.itemobj).style.display == "block") {
		this.HideItem();
	} else {
		if ($(this.itemobj).style.display == "none") {
			this.ShowItem();
		}
	}
}, ShowItem:function () {
	$(this.itemImg).src = "http://www.sinaimg.cn/cj/realstock/image2/finance_in_ws_010.gif";
	$(this.itemobj).style.display = "block";
}, HideItem:function () {
	$(this.itemImg).src = "http://www.sinaimg.cn/cj/realstock/image2/finance_in_ws_012.gif";
	$(this.itemobj).style.display = "none";
}};
S_Finance.Nav.NavCent = Class.create();
S_Finance.Nav.NavCent.prototype = {index01:null, org_con0n:null, con0n:null, theCon:null, theM:null, total:null, Init:function (con0n, index01, total) {
	this.org_con0n = con0n;
	this.con0n = S_Finance.constant._formatnum(con0n);
	this.index01 = index01;
	this.total = total;
	this.theCon = "con" + this.con0n + "-";
	this.theM = "m" + this.con0n + "-";
	if ((this.org_con0n == 2 || this.org_con0n == 3) && this.index01 == 0) {
		Util.AddEvent($(this.theM + "butt"), "click", this._refreshbutt._Bind(this));
	}
	Util.AddEvent($(this.theM + this.index01), "click", this._menu._Bind(this));
}, _menu:function () {
	for (var i = 0; i < this.total; i++) {
		if ($(this.theCon + i) && $(this.theM + i)) {
			$(this.theCon + i).style.display = "none";
			$(this.theM + i).className = "Menu" + this.con0n + "Off";
		}
	}
	$(this.theCon + this.index01).style.display = "block";
	$(this.theM + this.index01).className = "Menu" + this.con0n + "On";
	if (this.org_con0n == 2) {
		if ($(this.theM + "butt")) {
			switch (this.index01) {
			  case 0:
				$(this.theM + "butt").style.display = "block";
				$(this.theM + "butt").title = AppConf.Refreshnew_cjyw;
				Util.AddEvent($(this.theM + "butt"), "click", this._refreshbutt._Bind(this));
				break;
			  case 1:
				$(this.theM + "butt").style.display = "block";
				$(this.theM + "butt").title = AppConf.Refreshnew_cptc;
				Util.AddEvent($(this.theM + "butt"), "click", this._refreshbutt._Bind(this));
				break;
			  case 2:
				$(this.theM + "butt").style.display = "block";
				$(this.theM + "butt").title = AppConf.Refreshnew_bklg;
				Util.AddEvent($(this.theM + "butt"), "click", this._refreshbutt._Bind(this));
				break;
			  default:
				$(this.theM + "butt").title = "";
				$(this.theM + "butt").style.display = "none";
				break;
			}
		}
	} else {
		if (this.org_con0n == 3) {
			if ($(this.theM + "butt")) {
				switch (this.index01) {
				  case 0:
					$(this.theM + "butt").style.display = "block";
					$(this.theM + "butt").title = AppConf.Refreshnew_ggzx;
					Util.AddEvent($(this.theM + "butt"), "click", this._refreshbutt._Bind(this));
					break;
				  case 1:
					$(this.theM + "butt").style.display = "block";
					$(this.theM + "butt").title = AppConf.Refreshnew_hyzx;
					Util.AddEvent($(this.theM + "butt"), "click", this._refreshbutt._Bind(this));
					break;
				  default:
					$(this.theM + "butt").title = "";
					$(this.theM + "butt").style.display = "none";
					break;
				}
			}
		} else {
			if (this.org_con0n == 6) {
				switch (this.index01) {
				  case 1:
					S_Finance.constant.load_data_script("http://vip.stock.finance.sina.com.cn/quotes_service/view/cn_price_list.php?symbol=" + fullcode + "&func=S_Finance.upconstants.buildDisp(price_statist_list,0);", "pricesrc");
					break;
				  case 2:
					S_Finance.constant.load_data_script("http://vip.stock.finance.sina.com.cn/quotes_service/view/vML_DataList.php?symbol=" + fullcode + "&asc=j&num=10&func=S_Finance.upconstants.minuteBuild();", "minsrc");
					break;
				  case 3:
					var temprandom = S_Finance.constant._getCurrtime();
					try {
						$("ish000001pic").src = "http://image2.sinajs.cn/newchart/small/ish000001.gif?" + temprandom;
						$("isz399001pic").src = "http://image2.sinajs.cn/newchart/small/isz399001.gif?" + temprandom;
					}
					catch (er) {
					}
					break;
				  case 4:
					S_Finance.constant.load_data_script("http://vip.stock.finance.sina.com.cn/quotes_service/view/CN_BillList.php?sort=ticktime&page=1&num=11&symbol=" + fullcode + "&func=S_Finance.upconstants.buildDisp(bill_detail_list,2);", "billsrc");
					break;
				  default:
					break;
				}
			} else {
				if (this.org_con0n == 7) {
					switch (this.index01) {
					  case 1:
						S_Finance.constant.load_data_script("http://biz.finance.sina.com.cn/stock/up_down_js.php?limit_up=6&limit_down=6&func=S_Finance.upconstants.setIncDisp();", "incscript");
						break;
					}
				}
			}
		}
	}
}, _refreshbutt:function () {
	var type = 13;
	var code = "";
	if (this.org_con0n == 2) {
		switch (this.index01) {
		  case 0:
			type = 13;
			break;
		  case 1:
			type = 14;
			break;
		  case 2:
			type = 15;
			break;
		}
	} else {
		if (this.org_con0n == 3) {
			switch (this.index01) {
			  case 0:
				type = 7;
				code = fullcode;
				break;
			  case 1:
				type = 5;
				code = fullcode;
				break;
			}
		}
	}
	S_Finance.constant.load_data_script("http://biz.finance.sina.com.cn/news/n4nc.php?type=" + type + "&code=" + code + "&func=S_Finance.constant.refeshbutt(" + this.org_con0n + "," + this.index01 + ");&dpc=1", "conm00");
}};
S_Finance.comment = Class.create();
S_Finance.comment.prototype = {comment_html:null, Init:function () {
	var len, v4_user, num, c_content_end, c_content_full;
	if (CmsgList != null) {
		(CmsgList.length >= AppConf.cmnt_list_num) ? len = AppConf.cmnt_list_num : len = CmsgList.length;
		this.comment_html = "";
		for (var i = 0; i < len; i++) {
			if (trim(CmsgList[i].m_user) == "") {
				v4_user = "\u65b0\u6d6a\u7528\u6237";
			} else {
				v4_user = CmsgList[i].m_user;
			}
			num = CmsgList[i].m_content.indexOf("\u3010\u539f\u8d34\u3011");
			if (num == -1) {
				c_content_end = CmsgList[i].m_content;
			} else {
				c_content_end = CmsgList[i].m_content.substr(0, num);
			}
			c_content_full = c_content_end;
			if (c_content_end.length > 24) {
				c_content_end = c_content_end.substr(0, 20) + "\u2026\u2026";
			}
			this.comment_html += "<li><span class='link'>" + v4_user + " \u8bc4\u8bba:<a href='http://comment.finance.sina.com.cn/comment/comment4.html?channel=" + cmnt_channel + "&newsid=" + cmnt_newsid + "&style=" + cmnt_group + "' title='" + c_content_full + "' target='_blank'>" + c_content_end + "</a></span><span class='data'>" + CmsgList[i].m_datetime + "</span></li>";
		}
	}
	_I($("comment_list"), this.comment_html);
	_I($("totalcomment"), Count.c_count);
}};
S_Finance.v_stock = Class.create();
S_Finance.v_stock.prototype = {hot_stock_list:null, v_s_list:null, want_list:null, want_arr:null, maxlen_vstock:null, dispAry:null, refreshmystock:null, refreshlateststock:null, Init:function () {
	if (typeof corr_future[0] == "undefined") {
		this.maxlen_vstock = 18;
	} else {
		this.maxlen_vstock = 16;
	}
	this.hot_stock_list = this.getHotStockA();
	this.want_list = "";
	this.want_arr = new Array();
	this.v_s_list = "";
	this.dispAry = new Array();
	this.fina_vstock_proc(fullcode);
}, getHotStockA:function () {
	var hotStockStr = hotstock_daily_a;
	var hotstockstrbycomma = "";
	for (var i = 0; i < hotStockStr.length; i++) {
		if (i > this.maxlen_vstock) {
			break;
		}
		hotstockstrbycomma += hotstock_daily_a[i][0] + ",";
	}
	hotstockstrbycomma += "sh000001";
	return hotstockstrbycomma;
}, procVisitedStock:function () {
	this.want_list = "";
	this.want_arr = new Array();
	var myurl;
	var getcookielist = Util.getCookie("FINA_V_S_2");
	var arr1 = (getcookielist == "" ? (new Array()) : getcookielist.split(","));
	for (var i = 0; i < arr1.length; i++) {
		if (arr1[i] == fullcode || arr1[i] == "sh000001" || arr1[i] == "sz399001" || arr1[i] == "sh000300") {
			continue;
		} else {
			this.want_arr.push(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 > this.maxlen_vstock) {
			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] + ",";
		}
	}
	var stock_want_list = this.want_list;
	if (typeof (corr_future) != "undefined") {
		var corr_future_len = corr_future.length;
		if (corr_future_len > 0) {
			for (var i = 0; i < corr_future_len; i++) {
				if ("GC" == corr_future[i] || "CL" == corr_future[i]) {
					this.want_list += "hf_" + corr_future[i] + ",";
				} else {
					this.want_list += corr_future[i] + ",";
				}
			}
		}
	}
	var random_rn = Math.round(Math.random() * 2147483648);
	myurl = "http://hq.sinajs.cn/rn=" + random_rn + "&func=S_Finance.upconstants.setVSDisp('con01-0','" + stock_want_list + "'," + _length + ");&list=" + this.want_list;
	S_Finance.constant.load_data_script(unescape(myurl), "vsdata");
	if (this.refreshlateststock == null) {
		this.refreshlateststock = setInterval(this.procVisitedStock._Bind(this), 30 * 1000);
	}
	return true;
}, procMyStock:function () {
	this.want_list = "";
	this.want_arr = new Array();
	var myurl;
	var is_login_sina = Util.getCookie("SINA_FINANCE");
	if (is_login_sina == "nocookie" || is_login_sina == "") {
		var msg = "";
		if (S_Finance.constant.LoginSina == 1) {
			msg = reterr;
		}
		var str = "<div id=\"login_input\">";
		str += "<div id=\"inputHead\">";
		str += "\t<div>";
		str += "\t\t<span>\u8bf7\u60a8\u5148\u767b\u5f55\u4ee5\u67e5\u770b\u81ea\u9009\u80a1</span>";
		str += "\t</div>";
		str += "</div>";
		str += "<label>&nbsp;</label>";
		str += "<div id=\"inputBody\">";
		str += "<div id=\"msg\">" + msg + "</div>";
		str += "<ul id=\"nameAndPwd\">";
		str += "\t<li>\u767b\u5f55\u540d <input id=\"userid\" name=\"userid\" value=\"\" type=\"text\" class=\"loginInput\" /></li>";
		str += "\t<li>\u5bc6\u3000\u7801 <input id=\"pwd\" name=\"pwd\" value=\"\" type=\"password\" class=\"loginInput\" /></li>";
		str += "</ul>";
		str += "<label>&nbsp;</label>";
		str += "<dl class=\"rememberId\">";
		str += "\t<dt><input id=\"rflag\" name=\"rflag\" value=\"y\" type=\"checkbox\" /><label style=\"border: 0pt none ; margin: 0pt; display: inline;font-size: 12px; cursor: pointer; font-weight:bold;\" for=\"rflag\">\u8bb0\u4f4f\u6211\u7684\u8eab\u4efd</label></dt>";
		str += "\t<dd>\u9009\u4e2d\u5c06\u4fdd\u6301\u767b\u5f55\u72b6\u60011\u4e2a\u6708\uff0c<br />\u516c\u7528\u7535\u8111\u5efa\u8bae\u52ff\u52fe\u9009\u3002</dd>";
		str += "</dl>";
		str += "<label>&nbsp;</label>";
		str += "<ul id=\"loginButton\">";
		str += "\t<li><input name=\"sumbit\" value=\"\u767b\u5f55\" type=\"submit\" onclick=\"S_Finance.constant.chklogin();\" /></li>";
		str += "\t<li><input name=\"reg\" value=\"\u6ce8\u518c\" type=\"button\" onclick=\"window.open('http://unipro.sina.com.cn/cgi-bin/new_regist0.cgi?url1=&url2=http://vip.stock.finance.sina.com.cn/portfolio/login.php&id1=1&id2=0&entry=finance&mcheck=0c8f96085c799229f74e7ccc4a59f7bb', '_blank');\"></li>";
		str += "</ul>";
		str += "<div class=\"clearer\"></div>";
		str += "<label>&nbsp;</label>";
		str += "<span id=\"helplinks\"><a href=\"http://login.sina.com.cn/getpass.html\" target=\"_blank\">\u627e\u56de\u5bc6\u7801</a>\u3000<a href=\"http://unipro.sina.com.cn/help.html\" target=\"_blank\">\u767b\u5f55\u5e2e\u52a9</a></span>";
		str += "<label>&nbsp;</label>";
		str += "<div id=\"access\"><a href=\"http://vip.stock.finance.sina.com.cn/portfolio/main.php\" target=\"_blank\">\u6211\u7684\u81ea\u9009\u80a1</a></div>";
		str += "</div>";
		str += "</div>";
		_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] + ",";
		}
	}
	var random_rn = Math.round(Math.random() * 2147483648);
	myurl = "http://hq.sinajs.cn/rn=" + random_rn + "&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) {
	if (typeof corr_future[0] == "undefined") {
		var maxlen = 18;
		tempmaxlen = (_length >= maxlen ? maxlen : maxlen - 1);
		if (tagname == "con01-1") {
			tempmaxlen--;
		}
	} else {
		var maxlen = 16;
		tempmaxlen = (_length >= maxlen ? maxlen : maxlen - 1);
		if (tagname == "con01-1") {
			tempmaxlen++;
		}
	}
	var dispstr = "<table cellspacing=\"0\" class=\"LTabBlk01\" ><tr><th class=\"LTabBlk01ThName\">\u540d\u79f0</th><th class=\"LTabBlk01ThValue\">\u4ef7\u683c(\u5143)</th><th class=\"LTabBlk01ThZdf\">\u6da8\u8dcc\u5e45</th></tr>";
	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 += "<tr><td colspan='3' style='text-align:center'><a href='http://vip.stock.finance.sina.com.cn/portfolio/main.php' target='_blank'>\u6211\u7684\u81ea\u9009\u80a1&gt;&gt;</a></td></tr>";
						}
						dispstr += "<tr><td colspan=\"3\"><center><font color=\"#FF0000\">\u4ee5\u4e0b\u4e3a\u70ed\u95e8\u80a1\u7968</font></center></td></tr>";
					}
					dispstr += "<tr><td  style='text-align:left;padding-left:3px;'><a href='http://finance.sina.com.cn/realstock/company/" + arr1[i].substr(2, 8) + "/nc.shtml' target='_self'>" + dispAry[0] + "</a></td><td style='text-align:right;'>" + dispAry[1] + "</td><td width='50' style='text-align:right;padding-right:2px;'>" + dispAry[2] + "</td></tr>";
				}
			}
		} else {
			continue;
		}
	}
	if (tagname == "con01-1" && _length >= maxlen - 1) {
		dispstr += "<tr><td colspan='3' style='text-align:center'><a href='http://vip.stock.finance.sina.com.cn/portfolio/main.php' target='_blank'>\u6211\u7684\u81ea\u9009\u80a1&gt;&gt;</a></td></tr>";
	}
	dispstr += "</table>";
	if (tagname == "con01-0") {
		dispstr += S_Finance.upconstants.genCorrFuture();
	}
	_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;
}, genCorrFuture:function () {
	var future_str = "";
	var urlpost = "";
	if (typeof (corr_future) != "undefined") {
		var corr_future_len = corr_future.length;
		if (corr_future_len > 0) {
			future_str = "<table cellspacing=\"0\" class=\"LTabBlk01\" ><tr><td colspan=\"3\"><center><font color=\"#FF0000\">\u76f8\u5173\u671f\u8d27\u884c\u60c5</font></center></td></tr>";
			for (var i = 0; i < corr_future_len; i++) {
				if ("GC" == corr_future[i] || "CL" == corr_future[i]) {
					urlpost = "_hf";
					eval("future_one = hq_str_hf_" + corr_future[i]);
					var last_idx = 0;
					var yes_idx = 7;
					if ("GC" == corr_future[i]) {
						var name = "\u9ec4\u91d1";
					} else {
						if ("CL" == corr_future[i]) {
							var name = "\u539f\u6cb9";
						}
					}
					var hf_flag = true;
				} else {
					urlpost = "";
					eval("future_one = hq_str_" + corr_future[i]);
					var last_idx = 8;
					var yes_idx = 10;
					var name = "";
					var hf_flag = false;
				}
				if (future_one != "" && future_one.length > 0) {
					var retAry = new Array();
					var incdec, cl;
					var tpAry = future_one.split(",");
					if (tpAry.length > 11) {
						retAry[0] = "" == name ? tpAry[0] : name;
						retAry[1] = "--";
						retAry[2] = "--";
						if (tpAry[last_idx] != 0) {
							retAry[1] = hf_flag ? parseFloat(tpAry[last_idx]).toFixed(AppConf.veracitynum) : tpAry[last_idx];
							var range = (tpAry[last_idx] - tpAry[yes_idx]) / tpAry[yes_idx] * 100;
							incdec = parseFloat(range).toFixed(AppConf.veracitynum);
							retAry[2] = S_Finance.constant.addColor(incdec, 1);
						}
						future_str += "<tr><td  style='text-align:left;padding-left:3px; width:62px;'><a href='http://finance.sina.com.cn/money/future/quote" + urlpost + ".html?" + corr_future[i] + "' target='_blank'>" + retAry[0] + "</a></td><td style='text-align:right;'>" + retAry[1] + "</td><td style='text-align:right;padding-right:2px;width:50px;'>" + retAry[2] + "</td></tr>";
					}
				}
			}
			future_str += "</table>";
		}
	}
	return future_str;
}, buildLines:function (datary, flag, hunhe) {
	var lines = "";
	var tpstr;
	var linetd = "<td>";
	var linetdrt = "<td style=\"text-align:right\">";
	for (i = 0; i < datary.length; i++) {
		if (datary[i] && datary[i].length > 0) {
			tpstr = "<tr>";
			if (flag == 1 && i == hunhe) {
				tpstr = "<tr class='tr_dashed'>";
			}
			if (i == (datary.length - 1) && i > 5) {
				linetd = "<td class=\"NoLine\">";
				linetdrt = "<td class=\"NoLine\" style=\"text-align:right\">";
			}
			tpstr += linetd;
			if (flag == 1) {
				if (i >= hunhe) {
					tpstr += (i + 1 - hunhe);
				} else {
					tpstr += (i + 1);
				}
			} else {
				tpstr += i;
			}
			tpstr += "</td>" + linetd + "<a href='/realstock/company/" + datary[i][0] + "/nc.shtml' target='_self'>" + datary[i][1] + "</a></td>" + linetdrt + datary[i][2] + "</td>";
			if (flag == 1) {
				tpstr += linetdrt + S_Finance.constant.addColor(datary[i][3], 1) + "</td>";
			} else {
				tpstr += linetdrt + "</td></tr>";
			}
			lines += tpstr;
		}
	}
	return lines;
}, setIncDisp:function () {
	var diststr;
	var whole_list = new Array();
	var l = 0;
	dispstr = "<table cellspacing=\"0\" class=\"Menu05B\"><tr><th>\u6392\u540d</th><th>\u540d\u79f0</th><th>\u4ef7\u683c(\u5143)</th><th>\u6da8\u8dcc\u5e45</th></tr>";
	if (up5_list && up5_list.length > 0) {
		for (i = 0; i < up5_list.length; i++) {
			whole_list[l++] = up5_list[i];
		}
	}
	if (down5_list && down5_list.length > 0) {
		for (i = 0; i < down5_list.length; i++) {
			whole_list[l++] = down5_list[i];
		}
	}
	dispstr += S_Finance.upconstants.buildLines(whole_list, 1, up5_list.length);
	dispstr += "</table>";
	_I($("con07-1"), dispstr);
}, setIndDisp:function () {
	var dispstr;
	dispstr = "<table cellspacing=\"0\" class=\"Menu05B\" cellpadding=\"0\"><tr><th>\u6392\u540d</th><th>\u540d\u79f0</th><th>\u4ef7\u683c(\u5143)</th><th>\u6da8\u8dcc\u5e45</th></tr>";
	if (industry_up_list && industry_up_list.length > 0) {
		dispstr += S_Finance.upconstants.buildLines(industry_up_list, 1);
	}
	dispstr += "</table>";
	_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 () {
	setTimeout(S_Finance.upconstants._uppic_chart._Bind(this), AppConf.Interval_Uppic);
}, _updata:function () {
	if (AppConf._isUppage == 1) {
		var random_rn = Math.round(Math.random() * 2147483648);
		var theurl = "http://hq.sinajs.cn/rn=" + random_rn + "&format=js&func=S_Finance.upconstants.setData();&list=" + fullcode + ",s_sz399106,s_sh000001,s_sz399001,s_sh000300,gb_dji,r_5001," + 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") {
		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";
		$("itemcurrprice").style.marginRight = "8px";
		$("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", "\u4e0a\u8bc1");
	}
	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", "\u6df1\u8bc1");
	}
	if (hq_str_r_5001 != null && hq_str_r_5001 != undefined && hq_str_r_5001 != "undefined" && hq_str_r_5001 != "") {
		idxary = this.getIdxDataGlobal(hq_str_r_5001, "hk");
		this.setIdxShowGlobal(idxary, "hk");
	}
	if (hq_str_gb_dji != null && hq_str_gb_dji != undefined && hq_str_gb_dji != "undefined" && hq_str_gb_dji != "") {
		idxary = this.getIdxDataGlobal(hq_str_gb_dji, "us");
		this.setIdxShowGlobal(idxary, "us");
	}
}, 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 = "<table><tr><td rowspan=\"2\"><span class=\"incolor\">\u540c\u65f6\u88ab\u5173\u6ce8\uff1a</span><br /><a onclick=\"stockTips.generateDiv(500,95,'relative_stocks_list');\" href=\"javascript:void(0);\" style=\"background:url(http://www.sinaimg.cn/cj/realstock/image2/finance_hz_020.gif) no-repeat;padding-left:15px;\">\u5e2e\u52a9</a></td>";
		for (var i = 0; i < temp1length; i++) {
			eval("temp_var = hq_str_" + temp1[i]);
			idxary = this.getIdxData(temp_var);
			if (idxary[0] == "") {
				idxary[0] = temp1[i].substr(2, 8);
				idxary[1] = "--";
				idxary[2] = "--";
			} else {
				if (idxary[2] > 0) {
					classcolor = "incolor";
				} else {
					if (idxary[2] < 0) {
						classcolor = "decolor";
					}
				}
			}
			str += "<td>" + "<a href=\"http://finance.sina.com.cn/realstock/company/" + temp1[i].substr(2, 8) + "/nc.shtml\">" + idxary[0] + "</a>(<span class='" + classcolor + "'>" + idxary[1] + "&nbsp;" + idxary[2] + "%</span>)&nbsp;&nbsp;</td>";
			if (i == 2) {
				str += "</tr><tr>";
			}
		}
		$("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"), "<a href=\"javascript:window.location.reload();\" title=\"\u82e5\u975e\u884c\u60c5\u65f6\u95f4\u957f\u65f6\u95f4\u4e0d\u53d8\uff0c\u5219\u65e0\u9700\u70b9\u51fb\u6b64\u6309\u94ae\uff0c\u9875\u9762\u4f1a\u81ea\u52a8\u66f4\u65b0\u6570\u636e\" style=\"text-decoration:none;\">\u5237\u65b0</a>");
			} 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", "\u4e0a\u6d77", 0);
			this.setDisp("itemMarket2", "\u4e0a\u6d77", 0);
		} else {
			if (fullcode.substring(0, 2) == "sz") {
				this.setDisp("itemMarket", "\u6df1\u5733", 0);
				this.setDisp("itemMarket2", "\u6df1\u5733", 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", "<a href=\"http://biz.finance.sina.com.cn/stock/company/notice.php?kind=daily&symbol=" + fullcode.substring(2, 8) + "\" target=\"_self\" style=\"font-size:23px;color:#FF0000\">\u505c\u724c</a>", 0);
			this.setDisp("itemCurrent2", "\u505c\u724c", 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);
			tempnum = tempnum > 0 ? "+" + tempnum : tempnum;
			this._objClassname("itemDiffpercent", tempnum);
			tpstr = tempnum + "%";
			S_Finance.constant.setTheSameColor("itemCurrent", "itemDiffpercent");
			S_Finance.constant.setTheSameColor("itemCurrent2", "itemDiffpercent");
			S_Finance.constant.setTheSameColor("itemcurrprice", "itemDiffpercent");
		}
		currprice = currprice > 0 ? "+" + currprice : currprice;
		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);
		}
		if (null == S_Finance.upconstants.meigu_sy) {
			try {
				S_Finance.upconstants.meigu_sy = $("cwjk_qnm_mgsy").innerHTML.trim() * 1;
			}
			catch (er) {
				try {
					var temps = $("cwjk_mgsy").innerHTML.trim();
					S_Finance.upconstants.meigu_sy = temps.substr(0, temps.length - 1) * 1;
				}
				catch (er) {
				}
			}
		}
		if (null == S_Finance.upconstants.meigu_jzc) {
			try {
				temps = $("cwjk_mgjzc").innerHTML.trim();
				S_Finance.upconstants.meigu_jzc = temps.substr(0, temps.length - 1) * 1;
			}
			catch (er) {
			}
		}
		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 = parseInt(tmary[0], 10);
				currtime2 = parseInt(tmary[1], 10);
			}
			if (currtime1 <= 11) {
				difftime = ((currtime1 - 9) * 60) + (currtime2 - 30);
			} else {
				difftime = ((currtime1 - 9) * 60) + (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) {
					var currmart = ((parseFloat(dataArray[3]) * parseFloat(curracapital)) / 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) {
						var totalmart = ((parseFloat(dataArray[3]) * parseFloat(totalcapital) / 10000)).toFixed(AppConf.veracitynum);
						this.setDisp("totalMart", totalmart, 1);
						this.setDisp("totalMart2", totalmart, 1);
					}
					if (parseInt(currbcapital) != 0 && parseFloat(exchangerate) != 0) {
						var currmart = (((parseFloat(currbcapital) * parseFloat(dataArray[3]) * parseFloat(exchangerate)) / 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);
					}
				}
			}
		}
		if (isNaN(totalmart)) {
		} else {
			if (S_Finance.upconstants.meigu_sy <= 0) {
				tpstr = 0;
			} else {
				tpstr = (parseFloat(totalmart) / S_Finance.upconstants.meigu_sy).toFixed(AppConf.veracitynum);
			}
			this.setDisp("pe_ratio_lyr", tpstr, 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 = "<table cellspacing=\"0\" class=\"Menu05B\"><tr><th class=\"Menu05Bth1\">\u65f6\u95f4</th><th class=\"Menu05Bth2\">\u6210\u4ea4\u4ef7(\u5143)</th><th class=\"Menu05Bth3\">\u6210\u4ea4\u91cf(\u624b)</th><th class=\"Menu05Bth4\">\u6027\u8d28</th></tr>";
	var minlen = detary.length > 10 ? 10 : detary.length;
	var amnt;
	for (var i = 0; i < minlen; i++) {
		if (detary[i][1] != "-") {
			amnt = parseFloat(detary[i][1] / 100).toFixed(0);
		} else {
			amnt = "-";
		}
		if (detary[i][3] == "UP") {
			detary[i][3] = "<span class=\"fRed01\">\u4e70\u76d8</span>";
		} else {
			if (detary[i][3] == "DOWN") {
				detary[i][3] = "<span class=\"fGreen01\">\u5356\u76d8</span>";
			} else {
				if (detary[i][3] == "EQUAL") {
					detary[i][3] = "\u4e2d\u6027\u76d8";
				}
			}
		}
		dispstr += "<tr><td>" + detary[i][0] + "</td><td style='text-align:right;padding-right:8px;'>" + parseFloat(detary[i][2]).toFixed(AppConf.veracitynum) + "</td><td style='text-align:right;padding-right:8px;'>" + amnt + "</td><td>" + detary[i][3] + "</td></tr>";
	}
	dispstr += "</table>";
	dispstr += "<p><a href='http://vip.stock.finance.sina.com.cn/quotes_service/view/vMS_tradedetail.php?symbol=" + fullcode + "' target='_blank'>\u6210\u4ea4\u660e\u7ec6&gt;&gt;</a></p>";
	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;
}, getIdxDataGlobal:function (datastr, flag) {
	var idat = new Array();
	var odat = new Array();
	idat = datastr.split(",");
	odat[0] = idat[0];
	odat[1] = idat[1];
	if ("us" == flag) {
		odat[2] = idat[2] > 0 ? "+" + idat[2] : idat[2];
	} else {
		if ("hk" == flag) {
			odat[2] = idat[3] > 0 ? "+" + idat[3] : idat[3];
		}
	}
	return odat;
}, setIdxShow:function (datary, symbol, name) {
	var dianwei = Math.floor(datary[1]);
	var showstr = "<a href='http://finance.sina.com.cn/realstock/company/" + symbol + "/nc.shtml' target='_self'>" + name + "</a>&nbsp;&nbsp;";
	if (datary[2] > 0) {
		showstr += "<font class='incolor'>" + dianwei + "</font>&nbsp;&nbsp;";
		showstr += "<font class='incolor'>+" + datary[2] + "%</font>";
	} else {
		if (datary[2] < 0) {
			showstr += "<font class='decolor'>" + dianwei + "</font>&nbsp;&nbsp;";
			showstr += "<font class='decolor'>" + datary[2] + "%</font>";
		} else {
			showstr += datary[2] + "%";
		}
	}
	showstr += "&nbsp;&nbsp;" + datary[3] + "\u4ebf\u5143";
	_I($("idx" + symbol), showstr);
}, setIdxShowGlobal:function (datary, flag) {
	if ("hk" == flag) {
		var url = "http://finance.sina.com.cn/stock/hkstock/quote.html?code=HSI";
		var name = "\u6052\u6307";
		var symbol = "hkhsi";
	} else {
		if ("us" == flag) {
			var url = "http://finance.sina.com.cn/stock/usstock/US100_DJI.shtml";
			var name = "\u9053\u6307";
			var symbol = "usdji";
		}
	}
	var dianwei = Math.floor(datary[1]);
	var showstr = "<a href='" + url + "' target='_self'>" + name + "</a>&nbsp;&nbsp;";
	if (datary[2] > 0) {
		showstr += "<font class='decolor'>" + dianwei + "</font>&nbsp;&nbsp;";
		showstr += "<font class='decolor'>" + datary[2] + "%</font>";
	} else {
		if (datary[2] < 0) {
			showstr += "<font class='incolor'>" + dianwei + "</font>&nbsp;&nbsp;";
			showstr += "<font class='incolor'>" + datary[2] + "%</font>";
		} else {
			showstr += datary[2] + "%";
		}
	}
	_I($("idx" + symbol), showstr);
}, minuteBuild:function () {
	var tradeTable = $C("TABLE");
	tradeTable.className = "Menu05B";
	tradeTable.cellSpacing = "0";
	var tradeTr = tradeTable.insertRow(0);
	var tradeTh1 = $C("TH");
	tradeTh1.className = "Menu05Bth1";
	tradeTh1.innerHTML = "\u65f6\u95f4";
	var tradeTh2 = $C("TH");
	tradeTh2.className = "Menu05Bth2";
	tradeTh2.innerHTML = "\u6210\u4ea4\u4ef7(\u5143)";
	var tradeTh3 = $C("TH");
	tradeTh3.className = "Menu05Bth3";
	tradeTh3.innerHTML = "\u6210\u4ea4\u91cf(\u80a1)";
	_A(tradeTable.rows[0], tradeTh1);
	_A(tradeTable.rows[0], tradeTh2);
	_A(tradeTable.rows[0], tradeTh3);
	if (typeof minute_data_list != "undefined") {
		var loopNum = minute_data_list.length > 10 ? 10 : minute_data_list.length;
		for (var i = 0; i < loopNum; i++) {
			var loopTr = tradeTable.insertRow(-1);
			var loopTd1 = loopTr.insertCell(-1);
			loopTd1.innerHTML = minute_data_list[i][0];
			var loopTd2 = loopTr.insertCell(-1);
			loopTd2.style.textAlign = "right";
			loopTd2.style.paddingRight = "12px";
			loopTd2.innerHTML = minute_data_list[i][1];
			var loopTd3 = loopTr.insertCell(-1);
			loopTd3.style.textAlign = "right";
			loopTd3.style.paddingRight = "12px";
			loopTd3.innerHTML = minute_data_list[i][2];
		}
	}
	var tradeObj = $("con06-2");
	tradeObj.innerHTML = "";
	_A(tradeObj, tradeTable);
}, buildDisp:function (valary, flag) {
	if (valary && valary.length > 0) {
		var i, dispstr, morecontent;
		switch (flag) {
		  case 0:
			dispstr = "<table cellspacing='0' class='Menu05B'><tr><th class='Menu05Bth1'>\u6210\u4ea4\u4ef7(\u5143)</th><th class='Menu05Bth2'>\u6210\u4ea4\u91cf(\u80a1)</th><th class='Menu05Bth3'>\u5360\u6bd4(%)</th></tr>";
			morecontent = "\u5206\u4ef7\u8868";
			break;
		  case 1:
			dispstr = "<table cellspacing='0' class='Menu05B'><tr><th class='Menu05Bth1'>\u65f6\u95f4</th><th class='Menu05Bth2'>\u6210\u4ea4\u4ef7(\u5143)</th><th class='Menu05Bth3'>\u6210\u4ea4\u91cf(\u80a1)</th></tr>";
			break;
		  case 2:
			dispstr = "<table cellspacing='0' class='Menu05B'><tr><th class='Menu05Bth1'>\u65f6\u95f4</th><th class='Menu05Bth2'>\u6210\u4ea4\u91cf(\u80a1)</th><th class='Menu05Bth3'>\u6210\u4ea4\u4ef7(\u5143)</th><th class='Menu05Bth4'>\u6027\u8d28</th></tr>";
			morecontent = "\u5927\u5355\u8ffd\u8e2a";
			break;
		  default:
			dispstr = "<table cellspacing='0' class='Menu05B'>";
			break;
		}
		var minlen = valary.length > 10 ? 10 : valary.length;
		for (var i = 0; i < minlen; i++) {
			dispstr += "<tr><td>" + valary[i][0] + "</td><td style='text-align:right;padding-right:12px;'>" + valary[i][1] + "</td><td style='text-align:right;padding-right:12px;'>" + valary[i][2] + "</td>";
			if (flag == 2) {
				if (valary[i][3] == "UP") {
					valary[i][3] = "<font class='incolor'>\u4e70\u76d8</font>";
				} else {
					if (valary[i][3] == "DOWN") {
						valary[i][3] = "<font class='decolor'>\u5356\u76d8</font>";
					} else {
						valary[i][3] = "\u4e2d\u6027\u76d8";
					}
				}
				dispstr += "<td>" + valary[i][3] + "</td>";
			}
			dispstr += "</tr>";
		}
		dispstr += "</table>";
		var infoWin = new Array("con06-1", "con06-2", "con06-4");
		var moreurls = new Array("http://vip.stock.finance.sina.com.cn/quotes_service/view/cn_price.php?symbol=" + fullcode, "", "http://vip.stock.finance.sina.com.cn/quotes_service/view/cn_bill.php?volume=40000&type=0&symbol=" + fullcode);
		if (moreurls[flag] != "") {
			dispstr += "<p><a href='" + moreurls[flag] + "' target='_blank'>" + morecontent + "&gt;&gt;</a></p>";
		}
		_I($(infoWin[flag]), dispstr);
	}
	return true;
}};
S_Finance.Uppage = Class.create();
S_Finance.Uppage.prototype = {oldtime:null, settimeid1:null, diyici:null, Vist_stock:null, Init:function () {
	this.oldtime = S_Finance.constant._getCurrtime();
	this.diyici = 1;
	AppConf.veracitynum = S_Finance.constant._getVeracitynum(window.location.href);
	var bijiaoyiurl = "http://vip.stock.finance.sina.com.cn/quotes_service/view/CN_TransList.php?symbol=" + fullcode + "&num=11&func=S_Finance.upconstants.setDetailDisp1(trade_item_list);";
	S_Finance.constant.load_data_script(bijiaoyiurl, "tradescript");
	this.Vist_stock = new S_Finance.v_stock();
	this.Vist_stock.procVisitedStock();
	this.Vist_stock.procMyStock();
}, _stopUppage:function () {
	AppConf._isUppage = 0;
}, _up_Page:function () {
	AppConf._isUppage = 1;
	var curtim1 = S_Finance.constant._getCurrtime();
	var difren = curtim1 - this.oldtime;
	this.oldtime = curtim1;
	if (this.settimeid1 != null && this.settimeid1 != "") {
		clearTimeout(this.settimeid1);
	}
	if (this.diyici == 1 || difren >= AppConf.Interval_Uppage) {
		S_Finance.upconstants._uppic_chart();
		S_Finance.upconstants._updata();
		this.diyici = 0;
	}
}};
function GetOffsetPos(element) {
	var posTop = 0, posLeft = 0;
	do {
		posTop += element.offsetTop || 0;
		posLeft += element.offsetLeft || 0;
		element = element.offsetParent;
	} while (element);
	return [posLeft, posTop];
}
var stockTips = {generateDiv:function (tipWidth, tipHeight, objName) {
	var tempX = GetOffsetPos($(objName))[0] + 20;
	var tempY = GetOffsetPos($(objName))[1] + 50;
	var objHead = stockTips.generateHeadAndFoot("tipHead", tipWidth);
	var objFoot = stockTips.generateHeadAndFoot("tipFoot", tipWidth);
	var objBody = $C("DIV");
	objBody.className = "tipBody";
	objBody.style.width = tipWidth + "px";
	var objContent = $C("DIV");
	objContent.className = "content";
	objContent.style.height = tipHeight + "px";
	var arrow = $C("DIV");
	arrow.className = "arrowUp";
	arrow.style.left = (tipWidth - 25) / 2 + "px";
	arrow.style.top = "-19px";
	objContent.appendChild(arrow);
	var closeButton = $C("DIV");
	closeButton.className = "close";
	var tempLeft = tipWidth - 25;
	closeButton.style.left = tempLeft + "px";
	closeButton.style.top = "0px";
	closeButton.onmouseover = function () {
		closeButton.className = "closeOver";
	};
	closeButton.onmouseout = function () {
		closeButton.className = "close";
	};
	closeButton.onclick = function () {
		closeButton.onmouseover = "";
		closeButton.onmouseout = "";
		document.body.removeChild(obj);
	};
	objContent.appendChild(closeButton);
	var textContainer = $C("DIV");
	textContainer.innerHTML = "\u80a1\u7968\u4e4b\u95f4\u7684\u76f8\u5173\u6027\u53ef\u4ee5\u8868\u73b0\u4e3a\u884c\u4e1a\u76f8\u5173\u3001\u5730\u57df\u76f8\u5173\u3001\u540c\u7cfb\u76f8\u5173\u3001\u80a1\u4e1c\u76f8\u5173\u7b49\uff0c\u800c\u884c\u4e1a\u3001\u5730\u57df\u3001\u7cfb\u522b\u7b49\u53ea\u4e0d\u8fc7\u662f\u80a1\u7968\u82e5\u5e72\u5c5e\u6027\u4e2d\u7684\u4e00\u79cd\u5c5e\u6027\u800c\u5df2\uff0c\u8fd9\u79cd\u57fa\u4e8e\u5355\u4e00\u5c5e\u6027\u7684\u76f8\u5173\u6027\u4e0d\u80fd\u6ee1\u8db3\u4e0d\u540c\u7528\u6237\u7684\u4e0d\u540c\u9700\u8981\u3002<br /><br />\u65b0\u6d6a\u8d22\u7ecf\u5728\u6b64\u7ed9\u51fa\u4e0e\u8be5\u80a1\u7968\u76f8\u5173\u7684\u5176\u4ed6\u80a1\u7968\uff0c\u5e76\u7ed9\u51fa\u94fe\u63a5\uff0c\u4f7f\u5f97\u7528\u6237\u5728\u6d4f\u89c8\u5b8c\u8be5\u652f\u80a1\u7968\u540e\uff0c\u53ef\u4ee5\u7ed5\u8fc7\u8bb8\u591a\u9875\u9762\u8df3\u8f6c\uff0c\u76f4\u63a5\u8fdb\u5165\u4e0b\u4e00\u652f\u5173\u6ce8\u7684\u80a1\u7968\uff0c\u65b9\u4fbf\u7528\u6237\u4f7f\u7528\u3002";
	objContent.appendChild(textContainer);
	objBody.appendChild(objContent);
	var obj = $C("DIV");
	obj.className = "tips";
	obj.appendChild(objHead);
	obj.appendChild(objBody);
	obj.appendChild(objFoot);
	obj.style.left = tempX + "px";
	obj.style.top = tempY + "px";
	document.body.appendChild(obj);
}, generateHeadAndFoot:function (headOrFoot, theWidth) {
	var obj = $C("DIV");
	obj.className = headOrFoot;
	var tempWidth = theWidth - 14;
	var objLeft = $C("DIV");
	objLeft.className = "Left";
	var objCenter = $C("DIV");
	objCenter.className = "Center";
	objCenter.style.width = tempWidth + "px";
	var objRight = $C("DIV");
	objRight.className = "Right";
	obj.appendChild(objLeft);
	obj.appendChild(objCenter);
	obj.appendChild(objRight);
	return obj;
}};
S_Finance.placeList = {hotStockList:function () {
	var updownTable = $C("TABLE");
	updownTable.cellSpacing = "0";
	updownTable.className = "Menu05B";
	var updownTr = updownTable.insertRow(0);
	var updownTh1 = $C("TH");
	updownTh1.innerHTML = "\u6392\u540d";
	var updownTh2 = $C("TH");
	updownTh2.innerHTML = "\u540d\u79f0";
	var updownTh3 = $C("TH");
	updownTh3.innerHTML = "\u5173\u6ce8\u5ea6";
	var updownTh4 = $C("TH");
	updownTh4.innerHTML = "\u8d8b\u52bf";
	_A(updownTable.rows[0], updownTh1);
	_A(updownTable.rows[0], updownTh2);
	_A(updownTable.rows[0], updownTh3);
	_A(updownTable.rows[0], updownTh4);
	for (var i = 0; i < hotstock_daily_a.length; i++) {
		if (i >= 12) {
			break;
		}
		var loopTr = updownTable.insertRow(-1);
		var loopTd1 = loopTr.insertCell(-1);
		loopTd1.innerHTML = i + 1;
		var loopTd2 = loopTr.insertCell(-1);
		var loopTdA = $C("A");
		loopTdA.href = "/realstock/company/" + hotstock_daily_a[i][0] + "/nc.shtml";
		loopTdA.target = "_self";
		loopTdA.innerHTML = hotstock_daily_a[i][1];
		_A(loopTd2, loopTdA);
		var loopTd3 = loopTr.insertCell(-1);
		loopTd3.innerHTML = hotstock_daily_a[i][2];
		var loopTd4 = loopTr.insertCell(-1);
		loopTd4.innerHTML = S_Finance.placeList.getVaryArrow(hotstock_daily_a[i][3]);
	}
	$("con07-0").innerHTML = "";
	_A($("con07-0"), updownTable);
}, getVaryArrow:function (num) {
	if (num > 0) {
		return "<span class=\"incolor\">\u2191</span>";
	} else {
		if (num < 0) {
			return "<span class=\"decolor\">\u2193</span>";
		} else {
			return "-";
		}
	}
}};
S_Finance.App = Class.create();
S_Finance.App.prototype = {UpAll:null, Init:function (fullcode) {
	var nav = new S_Finance.Nav();
	S_Finance.upconstants.relative_stock();
	this.UpAll = new S_Finance.Uppage();
	this.UpAll._up_Page();
	S_Finance.placeList.hotStockList();
	S_Finance.constant.load_data_script("http://biz.finance.sina.com.cn/stock/industry_up_js.php?limit=12&func=S_Finance.upconstants.setIndDisp();", "indscript");
}};

