function toOpen(Link)
{
  if (typeof(aTime)=="number"){clearTimeout(aTime)}
  aTime=setTimeout("awin=window.open('"+Link+"');while(true){if(typeof(awin)=='object'){awin.window.blur();break}}",5000)
}
/* Modified by Eric 20050114 已经有不闪动的更新版本了
function toOpenTcp(Link,w,h)
{
  intx=(screen.width-788)/2;inty=(screen.height-450)/2;
  if (typeof(aTime)=="number"){clearTimeout(aTime)}
  aTime=setTimeout("awin=window.open('"+Link+"','','toolbar=no,height="+h+",width="+w+",left='+intx+',top='+inty+',status=no,scrollbars=no,resizable=no');while(true){if(typeof(awin)=='object'){awin.window.blur();break}}",5000)
}

function toOpenTcp(Link,w,h){
  if (typeof(aTime)=="number"){clearTimeout(aTime)}
  aTime=setTimeout("PopupBack('"+Link+"',"+w+","+h+")",5000)
}
*/
function toOpenTcp(Link,w,h)
{
  intx=(screen.width-788)/2;inty=(screen.height-450)/2;
  if (typeof(aTime)=="number"){clearTimeout(aTime)}
  //aTime=setTimeout("awin=window.open('"+Link+"','','toolbar=no,height="+h+",width="+w+",left='+intx+',top='+inty+',status=no,scrollbars=no,resizable=no')",0)
  aTime=setTimeout("awin=window.open('"+Link+"','','toolbar=no,height="+h+",width="+w+",left='+intx+',top='+inty+',status=no,scrollbars=no,resizable=no');while(true){if(typeof(awin)=='object'){awin.window.blur();break}}",5000) 
}


function PopupBack(Link,w,h){
  var maxH=screen.height+100
  var intx, inty
  intx=(screen.width-w)/2;inty=(screen.height-h)/2
  child=window.open("about:blank","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width="+w+",height="+h+",top="+maxH+",left=0")
  child.document.write("<html><body scroll=no style='margin:0; border:none'><iframe margin=0 marginheight=0 hspace=0 space=0 frameborder=0 scrolling=no width=100% height=100% src='"+Link+"'>正在读取页面<\/iframe></body><\/html>")
  if(child){
    child.blur()
  }
  child.moveTo(intx,inty)
}

function ReadMain(ArticleID,Folder)
{
  window.open("Http://bbs1.jrj.com.cn/JrjBBS3/ReadMain.asp?ArticleID="+ArticleID+"&Folder="+Folder,"","height=500,width=626,status=yes,scrollbars =yes,toolbar=no,menubar=no,location=no,resizable=yes,top=40,left=100");
}

function OpenTrade()
{
  x=screen.width/2-75+180;y=screen.height/2-108;
  openWindow('http://www.jrj.com.cn/tradenotice.htm','','scrollbars=no,left='+x+',top='+y+',resizable=no,width=150,height=216');
}

function openWindow(theURL,winName,features)
{
  new_window = window.open(theURL,winName,features);
  new_window.focus();
}

function todo(ls)
{
  window.open("http://quote.jrj.com.cn/htmdata/switch.asp?code="+ls,"jrjminhello","height=250,width=270,status=no,toolbar=no,menubar=no,location=no,resizable=no");
  return false;
}
function QuoteClick()
{
  if (document.symbol_entry.symbol.value=='')
  document.symbol_entry.symbol.value='000001'
  lcSelect = document.symbol_entry.menu1.options[document.symbol_entry.menu1.selectedIndex].value;
  if (lcSelect=='10'){window.open("http://quote.jrj.com.cn/htmdata/price.asp?code="+escape(document.symbol_entry.symbol.value),'',"height=271,width=504,status=no,toolbar=no,menubar=no,location=no,resizable=no","replace");
    return false;
  }
  if (lcSelect=='11'){
    window.open("http://quote.jrj.com.cn/htmdata/gif.asp?code="+escape(document.symbol_entry.symbol.value),'',"height=290,width=434,status=no,toolbar=no,menubar=no,location=no,resizable=no","replace");
    return false;
  }
  if (lcSelect=='12'){
    window.open("http://quote.jrj.com.cn/htmdata/kline.asp?code="+escape(document.symbol_entry.symbol.value),'',"height=290,width=434,status=no,toolbar=no,menubar=no,location=no,resizable=no","replace");
    return false;
  }
  if (lcSelect=='13'){
		window.open("http://share.jrj.com.cn/cominfo/gsgg.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='14'){
		window.open("http://share.jrj.com.cn/cominfo/ggxw.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='15'){
		window.open("http://share.jrj.com.cn/cominfo/ggpl.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
    }
  if (lcSelect=='16'){
		window.open("http://share.jrj.com.cn/cominfo/gsgk.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='17'){
		window.open("http://share.jrj.com.cn/cominfo/gbjg.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='18'){
		window.open("http://share.jrj.com.cn/cominfo/mgsy.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='19'){
		window.open("http://share.jrj.com.cn/cominfo/fhsp.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='20'){
		window.open("http://share.jrj.com.cn/cominfo/sdgd.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='21'){
		window.open("http://share.jrj.com.cn/cominfo/jbcwsj.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='22'){
		window.open("http://share.jrj.com.cn/cominfo/cwbl.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='23'){
		window.open("http://share.jrj.com.cn/cominfo/zcfzb.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='24'){
		window.open("http://share.jrj.com.cn/cominfo/glgs.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='25'){
		window.open("http://share.jrj.com.cn/cominfo/ggry.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='26'){
		window.open("http://share.jrj.com.cn/cominfo/zqbg.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='261'){
		window.open("http://share.jrj.com.cn/cominfo/jdbg.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='27'){
		window.open("http://share.jrj.com.cn/cominfo/ndbg.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='28'){
		window.open("http://share.jrj.com.cn/cominfo/gszc.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='29'){
		window.open("http://share.jrj.com.cn/cominfo/pgggs.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='30'){
		window.open("http://share.jrj.com.cn/cominfo/ssggs.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='31'){
		window.open("http://share.jrj.com.cn/cominfo/jjcc.asp?or_gpdm=" + escape(document.symbol_entry.symbol.value));
		return false;
	}
  if (lcSelect=='51'){
		window.open("http://sms.jrj.com.cn/jrjsms/MySMS/Stock.asp");
		return false;
	}
  if (lcSelect=='52'){
		window.open("http://web1.jrj.com.cn/Myhome/mystock/ShowMore.asp");
		return false;
	}
  if (lcSelect=='53'){
		window.open("http://web1.jrj.com.cn/Myhome/account/ShowMore.asp");
		return false;
	}
}

function review(filename)
{
  loca="http://finance.jrj.com.cn/makedp/reviewFile/"+filename+".htm"
  window.open(loca,"review","height=175,width=380,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");
  return false;
}

function QuoteClicknew()
{
  if (document.symbol_entrynew.symbol22.value=='')
  document.symbol_entrynew.symbol22.value='000001'
  lcSelect = document.symbol_entrynew.menu1.options[document.symbol_entrynew.menu1.selectedIndex].value;
  if (lcSelect=='10'){window.open("http://quote.jrj.com.cn/htmdata/price.asp?code="+escape(document.symbol_entrynew.symbol22.value),'',"height=271,width=504,status=no,toolbar=no,menubar=no,location=no,resizable=no","replace");
    return false;
  }
  if (lcSelect=='11'){
    window.open("http://quote.jrj.com.cn/htmdata/gif.asp?code="+escape(document.symbol_entrynew.symbol22.value),'',"height=290,width=434,status=no,toolbar=no,menubar=no,location=no,resizable=no","replace");
    return false;
  }
  if (lcSelect=='12'){
    window.open("http://quote.jrj.com.cn/htmdata/kline.asp?code="+escape(document.symbol_entrynew.symbol22.value),'',"height=290,width=434,status=no,toolbar=no,menubar=no,location=no,resizable=no","replace");
    return false;
  }
  if (lcSelect=='13'){
		window.open("http://share.jrj.com.cn/cominfo/gsgg.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='14'){
		window.open("http://share.jrj.com.cn/cominfo/ggxw.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='15'){
		window.open("http://share.jrj.com.cn/cominfo/ggpl.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
    }
  if (lcSelect=='16'){
		window.open("http://share.jrj.com.cn/cominfo/gsgk.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='17'){
		window.open("http://share.jrj.com.cn/cominfo/gbjg.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='18'){
		window.open("http://share.jrj.com.cn/cominfo/mgsy.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='19'){
		window.open("http://share.jrj.com.cn/cominfo/fhsp.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='20'){
		window.open("http://share.jrj.com.cn/cominfo/sdgd.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='21'){
		window.open("http://share.jrj.com.cn/cominfo/jbcwsj.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='22'){
		window.open("http://share.jrj.com.cn/cominfo/cwbl.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='23'){
		window.open("http://share.jrj.com.cn/cominfo/zcfzb.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='24'){
		window.open("http://share.jrj.com.cn/cominfo/glgs.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='25'){
		window.open("http://share.jrj.com.cn/cominfo/ggry.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='26'){
		window.open("http://share.jrj.com.cn/cominfo/zqbg.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='261'){
		window.open("http://share.jrj.com.cn/cominfo/jdbg.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='27'){
		window.open("http://share.jrj.com.cn/cominfo/ndbg.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='28'){
		window.open("http://share.jrj.com.cn/cominfo/gszc.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='29'){
		window.open("http://share.jrj.com.cn/cominfo/pgggs.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='30'){
		window.open("http://share.jrj.com.cn/cominfo/ssggs.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
  if (lcSelect=='31'){
		window.open("http://share.jrj.com.cn/cominfo/jjcc.asp?or_gpdm=" + escape(document.symbol_entrynew.symbol22.value));
		return false;
	}
}

function toMain()
{
  land.action='http://user.jrj.com.cn/user/check.asp'
  land.submit()
  land.action=''
}

function todoX(x)
{
  lcusername=document.land.Username.value
  lcpassword=document.land.Password.value
  if (lcusername=="" || lcpassword==""){window.alert("用户名和密码不能为空！");land.menu1.options[0].selected=true;return false}
  TmpValue=land.menu1.options[land.menu1.selectedIndex].value
  switch (TmpValue)
  {
    case "1":
     x=screen.width/2-330;y=screen.height/2-280;window.open ('http://person.jrj.com.cn/mystock/newZxg.asp?Show=0&UserName='+lcusername+'&PassWord='+lcpassword,'newWindow','toolbar=no,height=510,width=671,left='+x+',top='+y+',status=no,scrollbars=yes,resizable=no')
     land.menu1.options[0].selected=true
     return false
    case "2":
      land.action='http://user.jrj.com.cn/Custom/Login.asp'
      break
    case "3":
      land.action='http://web1.jrj.com.cn/Myhome/Login.asp'
      break
    case "4":
      land.action='http://web.jrj.com.cn/everyday/Login.asp'
      break
    case "5":
      land.action='http://finance.jrj.com.cn/quickgunman/seeStocknew.asp'
      break
    case "6":
      land.action='http://web1.jrj.com.cn/dxzw2/login.asp'
      break
    case "7":
      land.action='http://web1.jrj.com.cn/Myhome/login.asp?type=3'
      break
    case "8":
      land.action='http://web1.jrj.com.cn/Myhome/login.asp?type=4'
      break  
    case "9":
      land.action='http://web1.jrj.com.cn/Myhome/login.asp?type=5'
      break
    case "10":
      land.action='http://finance.jrj.com.cn/Matrix/login.asp'
      break    
    case "11":
      land.action='http://web1.jrj.com.cn/mastiff/login.asp'
      break  
    case "12":
      land.action='http://user.jrj.com.cn/Jrjref/login/login.asp'
      break          
  }
  if (land.action!='')
  {
    land.submit()
    land.action=''
    land.menu1.options[0].selected=true
  }
  else
  {
    if (x==2)
    {
      window.alert("请选择栏目登陆")
      return false
    }
  }
}

function KeyDown()
{
  if (window.event.keyCode==13)
  {
    todoX(2)
  }
}

function qbcheckform(theForm)
{
		if(theForm.word.value=="")
		{
		  window.alert("关键字不能为空")
		  theForm.word.focus()
		  return false
		}
		if (theForm.word.value=="输入关键字")
		{
		  alert("请输入内容！")
		  theForm.word.focus()
		  return false
		}
		else
		{
		  theForm.submit
		}
}