function AddFavorite(b, a) { try { window.external.addFavorite(b, a) } catch (c) { try { window.sidebar.addPanel(a, b, "") } catch (c) { alert("加入收藏失败，请使用Ctrl+D进行添加") } } } function SetHome(c, d) { try { c.style.behavior = "url(#default#homepage)"; c.setHomePage(d) } catch (b) { if (window.netscape) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect") } catch (b) { alert("此操作被浏览器拒绝！请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'") } var a = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); a.setCharPref("browser.startup.homepage", d) } } } function TrimWhiteSpace(a) { a = a.replace(/(^\s*)|(\s*$)/g, ""); return a } function createHttpRequest() { var c = false; if (window.ActiveXObject) { var a = ["Microsoft.XMLHTTP", "MSXML.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.7.0", "Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP"]; for (var b = 0; b < a.length; b++) { try { c = new ActiveXObject(a[b]); if (c) { break } } catch (d) { } } } if (window.window.XMLHttpRequest) { c = new XMLHttpRequest(); if (c.overrideMimeType) { c.overrideMimeType("text/xml") } } return c } function setInnerHtml(b, a) { if (document.getElementById(b)) { document.getElementById(b).innerHTML = a } } function changeTab(b, e, d) { for (var c = 0; c < d; c++) { if (document.getElementById(b + "_content_" + c)) { document.getElementById(b + "_content_" + c).style.display = "none" } if (document.getElementById(b + "_img_" + c)) { document.getElementById(b + "_img_" + c).style.display = "none" } if (document.getElementById(b + "_" + c)) { var a = document.getElementById(b + "_" + c).className; if (a.indexOf("H") != -1) { a = a.substring(0, a.length - 1) } document.getElementById(b + "_" + c).className = a } } if (document.getElementById(b + "_img_" + e)) { document.getElementById(b + "_img_" + e).style.display = "block" } if (document.getElementById(b + "_content_" + e)) { document.getElementById(b + "_content_" + e).style.display = "block" } if (document.getElementById(b + "_" + e)) { document.getElementById(b + "_" + e).className = document.getElementById(b + "_" + e).className + "H" } } function changeForexImg(a, f, d, b, e) { for (var c = 0; c < d; c++) { if (document.getElementById(a + "_" + c)) { document.getElementById(a + "_" + c).className = "menu" } } if (document.getElementById(a + "_" + f)) { document.getElementById(a + "_" + f).className = "menuH" } document.getElementById("SelectHQ").value = b; var g = b.split(","); document.getElementById(a).src = "http://www.stockstar.com/gifchartse/png/" + g[0] + g[1] + ".png"; document.getElementById(a).alt = e } function doFormSubmit(a) { document.getElementById(a).submit() } function changerankling(c) { for (var b = 0; b < 8; b++) { var a = document.getElementById("rank81link_" + b).href; a = a.substring(0, a.length - 2); a += c; document.getElementById("rank81link_" + b).href = a } } function changeRaderTip(a) { setInnerHtml("radertext", "※" + a + "．") } function changeSearch(a, b) { document.getElementById("ajaxinput").value = a; document.getElementById("toptarget").value = b; document.getElementById("righttarget").value = "index"; document.getElementById("ajaxinput2").value = "代码/简称/拼音" } function yellowpagesubmit() { document.getElementById("frmyellowpage").action = document.getElementById("yellowpagelist").value; document.getElementById("frmyellowpage").submit() } function stock120_submit(e) { if ((e.quote120_phone2.value != "") && (e.quote120_phone2.value.length < 8)) { alert("请正确输入您的联系电话号码。如：13888888888或者021-88888888"); e.quote120_phone2.focus(); return false } else { if (e.quote120_phone2.value != "") { var f = /^[1][358]\d{9}$/; var d = /^([0][^0]\d{1,2}[\-]{0,1}){0,1}[1-9]\d{6,7}$/; if (!((f.test(e.quote120_phone2.value)) || (d.test(e.quote120_phone2.value)))) { alert("请正确输入您的联系电话号码。如：13888888888或者021-88888888"); e.quote120_phone2.focus(); return false } } else { alert("联系电话不能空。"); e.quote120_phone2.focus(); return false } } if ((e.quote120_phone1.value != "") && (e.quote120_phone1.value.length < 5)) { alert("请正确输入股票代码。"); e.quote120_phone1.focus(); return false } else { if (e.quote120_phone1.value != "") { var h = /^\d{6}$/; if (!h.test(e.quote120_phone1.value)) { alert("请正确输入股票代码。"); e.quote120_phone1.focus(); return false } } else { alert("股票代码不能空。"); e.quote120_phone1.focus(); return false } } var a = e.quote120_phone1.value; var c = e.quote120_phone2.value; var g = "quote=" + a + "&mobile=" + c; var b = "http://info.stockstar.com/svideo/sendUserIndex.ashx"; document.domain = "stockstar.com"; document.getElementById("iframeProxy").contentWindow.upGgzd(b, g); return false } function post_ac() { alert("提交成功。") } function post_fa() { alert("提交失败。") } function chkForm() { if (document.getElementById("toptarget").value == "bar") { document.getElementById("topFormSearch").action = encodeURI("http://bar.stockstar.com/s/all.aspx?sn=" + (document.getElementById("ajaxinput").value)); document.getElementById("topFormSearch").submit(); document.getElementById("topFormSearch").action = "http://quote.stockstar.com/stock/exdir.aspx" } else { document.getElementById("topFormSearch").submit(); document.getElementById("topFormSearch").action = "http://quote.stockstar.com/stock/exdir.aspx" } } function layer_show(b, a) { if (a == "show") { if (document.getElementById("ajaxinput").value != "代码/简称/拼音") { document.getElementById(b).style.display = "none" } else { document.getElementById(b).style.display = "block" } } else { if (a == "hide") { document.getElementById(b).style.display = "none" } } } function getCookie(b) { var a = document.cookie.match(new RegExp("(^| )" + b + "=([^;]*)(;|$)")); if (a != null) { return unescape(a[2]) } return null } function setColor(d) { var b = getCookie("globalquotecolor"); if (b != null && TrimWhiteSpace(b) == "cn") { var a = document.getElementById(d).getElementsByTagName("span"); for (var c = 0; c < a.length; c++) { if (a[c].className == "font_color_green") { a[c].className = "font_color_red" } else { if (a[c].className == "font_color_red") { a[c].className = "font_color_green" } } } } } function setTopColor(d) { var b = getCookie("globalquotecolor"); if (b != null && TrimWhiteSpace(b) == "cn") { var a = document.getElementById(d).getElementsByTagName("span"); for (var c = 6; c < a.length; c++) { if (a[c].className == "q2 font_color_green") { a[c].className = "q2 font_color_red" } else { if (a[c].className == "q2 font_color_red") { a[c].className = "q2 font_color_green" } } } } } function insertAfter(c, a) { var b = a.parentNode; if (b.lastChild == a) { b.appendChild(c) } else { b.insertBefore(c, a.nextSibling) } } function addLoad(a) { var b = window.onload; if (typeof window.onload != "function") { window.onload = a } else { window.onload = function() { b(); a() } } } marqueeInterval = new Array(); marqueeId = 0; function marqueeMain(a) { initMarquee(a, "li", "mBox", 15, 4000) } function initMarquee(j, f, e, b, k) { if (!document.getElementById) { return false } if (!document.getElementById(j)) { return false } var c = document.getElementById(j); var h = document.getElementById(j).getElementsByTagName(f); c.style.display = "none"; marqueeContent = new Array(); for (var d = 0; d < h.length; d++) { marqueeContent[d] = h[d].innerHTML } var g = marqueeContent[0]; var l = document.createElement("div"); var a = document.createElement("div"); l.id = e; l.style.overflow = "hidden"; l.style.height = b + "px"; l.appendChild(a); a.innerHTML = g; insertAfter(l, c); marqueeId++; marqueeInterval[0] = setInterval("startMarquee(" + b + ",'" + e + "')", k) } function startMarquee(a, b) { var f = marqueeContent[marqueeId]; var e = document.getElementById(b); var d = e; marqueeId++; if (marqueeId >= marqueeContent.length) { marqueeId = 0 } if (e.childNodes.length == 1) { var c = document.createElement("DIV"); c.innerHTML = f; e.appendChild(c) } else { e.childNodes[0].innerHTML = f; e.appendChild(d.childNodes[0]); e.scrollTop = 0 } clearInterval(marqueeInterval[1]); marqueeInterval[1] = setInterval("scrollMarquee(" + a + ",'" + b + "')", 10) } function scrollMarquee(a, b) { var c = document.getElementById(b); c.scrollTop++; if (c.scrollTop % a == a) { clearInterval(marqueeInterval[1]) } } function changeMenuYRSC(a) { for (var b = 0; b < 3; b++) { if (b == a) { document.getElementById("indexYRSC_zc").className = "zcmenu" + (b + 1); document.getElementById("indexYRSC_text_" + b).style.display = "" } else { document.getElementById("indexYRSC_text_" + b).style.display = "none" } } } function Marquee() { this.ID = document.getElementById(arguments[0]); if (!this.ID) { alert('您要设置的"' + arguments[0] + '"初始化错误\r\n请检查标签ID设置是否正确!'); this.ID = -1; return } this.Direction = this.Width = this.Height = this.DelayTime = this.WaitTime = this.CTL = this.StartID = this.Stop = this.MouseOver = 0; this.Step = 1; this.Timer = 30; this.DirectionArray = { top: 0, up: 0, bottom: 1, down: 1, left: 2, right: 3 }; if (typeof arguments[1] == "number" || typeof arguments[1] == "string") { this.Direction = arguments[1] } if (typeof arguments[2] == "number") { this.Step = arguments[2] } if (typeof arguments[3] == "number") { this.Width = arguments[3] } if (typeof arguments[4] == "number") { this.Height = arguments[4] } if (typeof arguments[5] == "number") { this.Timer = arguments[5] } if (typeof arguments[6] == "number") { this.DelayTime = arguments[6] } if (typeof arguments[7] == "number") { this.WaitTime = arguments[7] } if (typeof arguments[8] == "number") { this.ScrollStep = arguments[8] } this.ID.style.overflow = this.ID.style.overflowX = this.ID.style.overflowY = "hidden"; this.ID.noWrap = true; this.IsNotOpera = (navigator.userAgent.toLowerCase().indexOf("opera") == -1); if (arguments.length >= 7) { this.Start() } } Marquee.prototype.Start = function() { if (this.ID == -1) { return } if (this.WaitTime < 800) { this.WaitTime = 800 } if (this.Timer < 20) { this.Timer = 20 } if (this.Width == 0) { this.Width = parseInt(this.ID.style.width) } if (this.Height == 0) { this.Height = parseInt(this.ID.style.height) } if (typeof this.Direction == "string") { this.Direction = this.DirectionArray[this.Direction.toString().toLowerCase()] } this.HalfWidth = Math.round(this.Width / 2); this.HalfHeight = Math.round(this.Height / 2); this.BakStep = this.Step; this.ID.style.width = this.Width + "px"; this.ID.style.height = this.Height + "px"; if (typeof this.ScrollStep != "number") { this.ScrollStep = this.Direction > 1 ? this.Width : this.Height } var d = "<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;display:inline;'><tr><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td></tr></table>"; var b = "<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;'><tr><td>MSCLASS_TEMP_HTML</td></tr><tr><td>MSCLASS_TEMP_HTML</td></tr></table>"; var e = this; e.tempHTML = e.ID.innerHTML; if (e.Direction <= 1) { e.ID.innerHTML = b.replace(/MSCLASS_TEMP_HTML/g, e.ID.innerHTML) } else { if (e.ScrollStep == 0 && e.DelayTime == 0) { e.ID.innerHTML += e.ID.innerHTML } else { e.ID.innerHTML = d.replace(/MSCLASS_TEMP_HTML/g, e.ID.innerHTML) } } var f = this.Timer; var a = this.DelayTime; var c = this.WaitTime; e.StartID = function() { e.Scroll() }; e.Continue = function() { if (e.MouseOver == 1) { setTimeout(e.Continue, a) } else { clearInterval(e.TimerID); e.CTL = e.Stop = 0; e.TimerID = setInterval(e.StartID, f) } }; e.Pause = function() { e.Stop = 1; clearInterval(e.TimerID); setTimeout(e.Continue, a) }; e.Begin = function() { e.ClientScroll = e.Direction > 1 ? e.ID.scrollWidth / 2 : e.ID.scrollHeight / 2; if ((e.Direction <= 1 && e.ClientScroll <= e.Height + e.Step) || (e.Direction > 1 && e.ClientScroll <= e.Width + e.Step)) { e.ID.innerHTML = e.tempHTML; delete (e.tempHTML); return } delete (e.tempHTML); e.TimerID = setInterval(e.StartID, f); if (e.ScrollStep < 0) { return } e.ID.onmousemove = function(g) { if (e.ScrollStep == 0 && e.Direction > 1) { var g = g || window.event; if (window.event) { if (e.IsNotOpera) { e.EventLeft = g.srcElement.id == e.ID.id ? g.offsetX - e.ID.scrollLeft : g.srcElement.offsetLeft - e.ID.scrollLeft + g.offsetX } else { e.ScrollStep = null; return } } else { e.EventLeft = g.layerX - e.ID.scrollLeft } e.Direction = e.EventLeft > e.HalfWidth ? 3 : 2; e.AbsCenter = Math.abs(e.HalfWidth - e.EventLeft); e.Step = Math.round(e.AbsCenter * (e.BakStep * 2) / e.HalfWidth) } }; e.ID.onmouseover = function() { if (e.ScrollStep == 0) { return } e.MouseOver = 1; clearInterval(e.TimerID) }; e.ID.onmouseout = function() { if (e.ScrollStep == 0) { if (e.Step == 0) { e.Step = 1 } return } e.MouseOver = 0; if (e.Stop == 0) { clearInterval(e.TimerID); e.TimerID = setInterval(e.StartID, f) } } }; setTimeout(e.Begin, c) }; Marquee.prototype.Scroll = function() { switch (this.Direction) { case 0: this.CTL += this.Step; if (this.CTL >= this.ScrollStep && this.DelayTime > 0) { this.ID.scrollTop += this.ScrollStep + this.Step - this.CTL; this.Pause(); return } else { if (this.ID.scrollTop >= this.ClientScroll) { this.ID.scrollTop -= this.ClientScroll } this.ID.scrollTop += this.Step } break; case 1: this.CTL += this.Step; if (this.CTL >= this.ScrollStep && this.DelayTime > 0) { this.ID.scrollTop -= this.ScrollStep + this.Step - this.CTL; this.Pause(); return } else { if (this.ID.scrollTop <= 0) { this.ID.scrollTop += this.ClientScroll } this.ID.scrollTop -= this.Step } break; case 2: this.CTL += this.Step; if (this.CTL >= this.ScrollStep && this.DelayTime > 0) { this.ID.scrollLeft += this.ScrollStep + this.Step - this.CTL; this.Pause(); return } else { if (this.ID.scrollLeft >= this.ClientScroll) { this.ID.scrollLeft -= this.ClientScroll } this.ID.scrollLeft += this.Step } break; case 3: this.CTL += this.Step; if (this.CTL >= this.ScrollStep && this.DelayTime > 0) { this.ID.scrollLeft -= this.ScrollStep + this.Step - this.CTL; this.Pause(); return } else { if (this.ID.scrollLeft <= 0) { this.ID.scrollLeft += this.ClientScroll } this.ID.scrollLeft -= this.Step } break } }; function initAd() { document.getElementById("meter_720_70").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='680' height='70' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|banner1&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|banner1&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|banner1&db=stockstar' width='680' height='70' border='0'></a></noscript></iframe>"; document.getElementById("meter_270_70").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='270' height='70' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|right_button1&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|right_button1&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|right_button1&db=stockstar' width='270' height='70' border='0'></a></noscript></iframe>"; document.getElementById("meter_310_60").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='270' height='60' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|left_button1&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|left_button1&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|left_button1&db=stockstar' width='270' height='60' border='0'></a></noscript></iframe>"; document.getElementById("meter_270_60_1").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='270' height='60' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|left_button2&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|left_button2&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|left_button2&db=stockstar' width='270' height='60' border='0'></a></noscript></iframe>"; document.getElementById("meter_270_200_1").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='270' height='200' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|large_button1&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|large_button1&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|large_button1&db=stockstar' width='270' height='200' border='0'></a></noscript></iframe>"; document.getElementById("meter_270_60_2").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='270' height='60' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|right_button3&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|right_button3&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|right_button3&db=stockstar' width='270' height='60' border='0'></a></noscript></iframe>"; document.getElementById("meter_720_60_2").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='680' height='60' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|banner2&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|banner2&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|banner2&db=stockstar' width='680' height='60' border='0'></a></noscript></iframe>"; document.getElementById("meter_275_60_3").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='270' height='60' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|right_button4&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|right_button4&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|right_button4&db=stockstar' width='270' height='60' border='0'></a></noscript></iframe>"; document.getElementById("meter_720_60_3").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='680' height='60' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|banner3&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|banner3&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|banner3&db=stockstar' width='680' height='60' border='0'></a></noscript></iframe>"; document.getElementById("meter_275_245").innerHTML = "<iframe marginheight='0' marginwidth='0' frameborder='0' width='270' height='200' scrolling='no' src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|large_button2&db=stockstar&border=0&local=yes'><noscript><a href='http://allyes.stockstar.com/main/adfclick?user=AllyesNetwork|index|large_button2&db=stockstar'><img src='http://allyes.stockstar.com/main/adfshow?user=AllyesNetwork|index|large_button2&db=stockstar' width='270' height='200' border='0'></a></noscript></iframe>"; if (ad275_150 != "") { document.getElementById("meter_310_170").innerHTML = ad275_150 }; }
