function killErrors(){return true;}
window.onerror = killErrors;
function $id(o){return document.getElementById(o)}
function GETmain(n){
}
function link123a(n){
document.writeln("");
}
function OP(url){
var url = url.replace("++","");
$id("link123").href = url;
$id("link123").click();
}
//---手机菜单和字体适配--------------------
function getMore(o){ //手机更多菜单
if($id(o).style.display=="")
{$id(o).style.display="none";$id(o+'BT').className="img1";}
else
{$id(o).style.display="";$id(o+'BT').className="img2";}
}
function setSize(){
var webFont=document.documentElement.clientWidth/20;
if(webFont<26){document.documentElement.style.fontSize =webFont + 'px';}else{document.documentElement.style.fontSize = '26px';}
}
//---股票查询----------------------------
function Click(MenuName,MenuCode,textName,Tweb){
var GoTo=true
var strP=/^\d+$/;
if(!strP.test(MenuCode)){
alert('请在左边文本框,输入六位股票代码!\n\n例如:600000');$id(textName).focus();
GoTo=false;
} else if(MenuCode.length!=6){
alert('请在左边文本框,输入六位股票代码!\n\n例如:600000');$id(textName).focus();
GoTo=false;
}
if(GoTo==true){
var gpURL= "/" + MenuCode
if(MenuName!=""){gpURL="/" + MenuName + "/" + MenuCode}
if(GoTo==true && Tweb==0){window.location.href=gpURL;}
if(GoTo==true && Tweb==1){window.open(gpURL);}
}
}
function getGPHQ(gpid){
$id("B5S5").innerHTML +="" ;
}
function ShowTags(id,num,count){
ClearTagClasss(id,count);
$id("tagname_" + id + num).className = "tagf";
$id(id + num).className = "huilvShow";
}
function ClearTagClasss(id,count){
for(i=1;i<=count;i++)
{
$id("tagname_" + id + i).className = "tagn";
$id(id + i).className = "huilvHidden";
}
}
function S(o){$id(o).style.display="block";}
function H(o){$id(o).style.display="none";}
function openGO(str){window.open(str)}//新窗打开
function AddFavorite(sURL, sTitle) {
try {
window.external.addFavorite(sURL, sTitle);
} catch (e) {
try {
window.sidebar.addPanel(sTitle, sURL, "");
} catch (e) {
alert("加入收藏失败,请使用Ctrl+D进行添加");
}
}
}
function toDesktop(){
alert("第一步:下载文件\n第二步:将下载的文件保存到桌面\n\n开始下载");
window.open('/file/url2.asp');
}
function erWeiMaAPP(o){
$id(o).innerHTML='扫码下载APP
'
$id(o).style.display="block";
}
function erWeiMa(o){
$id(o).innerHTML='打开移动页面
'
$id("ifrimgurl"+o).src="/file/url.asp?url="+window.location.href
$id(o).style.display="block";
}
function Mpage(n){ //手动控制PC或M
var now = new Date();
var time = now.getTime();
time += 3600 * 1000;
now.setTime(time);
document.cookie ='mPage=' + n + '; expires=' + now.toUTCString() + '; path=/';
location.reload()
}
function gbgg(){if($id("topAA"))$id("topAA").style.display="none";if($id("AA1"))$id("AA1").style.display="none";if($id("DLhtml"))$id("DLhtml").style.display="none";}
function openqq(){
window.open('tencent://message/?uin=5997597&Site=www.kanguba.com&Menu=yes');
}
//---个股搜索框----------------------------
function getList(divID){
if(/msie/i.test(navigator.userAgent)){//ie
document.getElementById(divID).onpropertychange=function(){getGPList(divID);};
document.getElementById(divID).onclick=function(){getGPList(divID);};
document.getElementById(divID).onblur=function(){DIVnone(divID);};
}else{
document.getElementById(divID).addEventListener("input",function(){getGPList(divID);},true);
document.getElementById(divID).addEventListener("click",function(){getGPList(divID);},true);
document.getElementById(divID).addEventListener("blur",function(){DIVnone(divID);},true);
}
}
function getGPList(divID){
if(document.getElementById(divID+"msg")){
document.getElementById(divID+"msg").style.display="block";
document.getElementById(divID+"ifr").src = "/file/js/gplist.asp?divID="+divID+"&k="+document.getElementById(divID).value;
}else{
var div1 = document.createElement("div");
div1.setAttribute("id",divID+"msg");
div1.setAttribute("style","display:block;position:absolute;text-align:left;color:#000000;background-color:#FFF;border:1px solid #666666;width:200px;z-index:100;filter:alpha(opacity:98); opacity:0.98; -moz-opacity:0.98;-khtml-opacity: 0.95;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);");
document.getElementById(divID).parentNode.appendChild(div1);
var ifr = document.createElement("iframe");
ifr.src = "/file/js/gplist.asp?divID="+divID+"&k="+document.getElementById(divID).value;
ifr.setAttribute("style","display:none");
ifr.setAttribute("id",divID+"ifr");
document.getElementsByTagName("head")[0].appendChild(ifr);
}
}
function DIVnone(divID){
setTimeout(function(){document.getElementById(divID+"msg").style.display='none'},288);
}
//---全球股票行情----------------------------
function quanqiu(num,hqid){
var imgSite="http://image.si"+"najs.cn/newchart/";var imgsrc="";
if(hqid=="s_sh000001")imgsrc=imgSite + "hollow/small/nsh000001.gif";
if(hqid=="s_sz399001")imgsrc=imgSite + "hollow/small/nsz399001.gif";
if(hqid=="s_sz399006")imgsrc=imgSite + "hollow/small/nsz399006.gif";
if(hqid=="rt_hkHSI")imgsrc=imgSite + "hk_stock/min_hollow/HSI.gif";
if(hqid=="gb_dji")imgsrc=imgSite + "usstock/min_idx_py/dji.gif";
if(hqid=="gb_ixic")imgsrc=imgSite + "usstock/min_idx_py/ixic.gif";
if(hqid=="gb_inx")imgsrc=imgSite + "usstock/min_idx_py/inx.gif";
if(hqid=="b_NKY")imgsrc=imgSite + "futures/forex/min5_m_hollow/NIXI.gif";
if(hqid=="b_UKX")imgsrc=imgSite + "futures/forex/min5_m_hollow/FT100.gif";
if(hqid=="b_DAX")imgsrc=imgSite + "futures/forex/min5_m_hollow/DAX.gif";
if(hqid=="b_CAC")imgsrc=imgSite + "futures/forex/min5_m_hollow/CAC.gif";
if(hqid=="hf_CL")imgsrc=imgSite + "futures/global/mins_hollow/CL.gif";
if(hqid=="hf_GC")imgsrc=imgSite + "futures/global/mins_hollow/GC.gif";
if(hqid=="hf_SI")imgsrc=imgSite + "futures/global/mins_hollow/SI.gif";
if(hqid=="USDCNY")imgsrc=imgSite + "futures/forex/min30_hollow/USDCNY.gif";
for (i=1; i<19; i++){
spanNAME = "hqimg" + i;
if (i == num){
$id(spanNAME).className = "hIMG";
if(imgsrc!=""){$id(spanNAME).innerHTML = "";}
else{$id(spanNAME).innerHTML = "该指数没有行情走势图。";}
}
else{if($id(spanNAME))$id(spanNAME).className = "sIMG";}
}
}
function GETquanqiu(){
$id("GETQuanQiuhtml").innerHTML ="" ;
}
function bd_www1(){
//document.writeln(""); //580*90
}
function bd_www2(){
//document.writeln(""); //160*600
}
function bd_www3(){
//document.writeln(""); //375*90
}
function bd_m1(){
//document.writeln(""); //20:6
}
function bd_m2(){
var node=document.createElement("script");
node.type="text/javascript"
node.src = "//g1.ge"+"guw.c"+"om/production/r_m_lin/static/nb_ln.js"; //移动-单
//document.getElementById("bd_m2").appendChild(node);
}
function PC_bd_top(){ //PC顶部
//document.writeln("
"); //375*90 //document.writeln(" | "); //580*90 //document.writeln(" |