
	var g_element = window.document.all;
	function OpenSub (name)
	{
		if (g_element[name].style.display == "none")
		{
			g_element[name].style.display = "";
			g_element[name+"_img"].src = "../../images/t_minus.gif";
		}
		else
		{
			g_element[name].style.display = "none";
			g_element[name+"_img"].src = "../../images/t_add.gif";
		}
	}
	
	function WMzybDownload()
	{
 		open('http://99.1.101.64/personalbank/pb50/wa/index.htm','WMzyb','menubar=no,toolbar=no,location=no,directories=no,status=yes,resizable=no,scrollbars=no,width=580,height=360,top=60,left=100');
	}

	function WMAzybInstall()
	{
		open('http://wma.cmbchina.com/cmbinvestcenter/wmazyb/wmzybinstall.htm','wmzybinstall','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=yes,width=590,height=400,top=60,left=80');
	}

    function OpenNewsWnd(newsid)
          {
           open('/cmbinvestcenter/InvestAspxBin/forex/ForexDetailDisplay.aspx?curNewsID='+newsid,'新闻详细内容','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=100,left=40');    
          }
      function OpenForexWnd(newsid)
          {
           open('/cmbinvestcenter/InvestAspxBin/forex/Info_Display.aspx?curNewsID='+newsid,'新闻详细内容','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=100,left=40');    
          }
     function OpenForexCmbDbWnd(newsid)
          {
           open('/cmbinvestcenter/InvestAspxBin/forex/Info_Display.aspx?srcInfo=cmbdb&curNewsID='+newsid,'新闻详细内容','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=100,left=40');    
          }
    function OpenReutersNewsWnd(newsid)
          {
           open('/cmbinvestcenter/InvestAspxBin/forex/ForexDetailDisplay.aspx?curNewsID='+newsid,'新闻详细内容','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=100,left=40');    
          }
    function OpenCmbDbNewsWnd(newsid)
          {
           open('/cmbinvestcenter/InvestAspxBin/forex/ForexDetailDisplay.aspx?curNewsID='+newsid,'新闻详细内容','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=100,left=40');    
          }
    function OpenSJXRNewsWnd(newsid)
          {
           open('/cmbinvestcenter/InvestAspxBin/forex/ForexDetailDisplay.aspx?provider=SJXR&&curNewsID='+newsid,'新闻详细内容','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=100,left=40');    
          }
	function popupwin(url,l,t,w,h)
	{
		open(url,'','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width='+w+',height='+h+',top='+l+',left='+t);
	}
	
	function popprintwin(url)
	{
		open(url,'','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=620,height=500,top=40,left=40');
	}
	
    function FundFilterWnd()
      {
           open('/cmbInvestCenter/InvestAspxBin/fund/FundFilterResult.aspx?investType='+document.FundMain.investType.options[document.FundMain.investType.selectedIndex].value+'&bnhbl='+document.FundMain.bnhbl.options[document.FundMain.bnhbl.selectedIndex].value+'&zzcjz='+document.FundMain.zzcjz.options[document.FundMain.zzcjz.selectedIndex].value,'基金筛选结果','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=490,height=400,top=50,left=40');    
      }
	function openCont(URL)
	{
 		open(URL,'','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=100,left=40');
	}
	function openVIPInfo(URL)
	{
 		open(URL,'','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=600,height=500,top=30,left=40');
	}
	function openSub(table,guid)
        {
        open('fundYWDetail_display.aspx?flag=0&&channel='+table+'&&GUID='+guid,'YWDetail','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,width=640,height=400,top=80,left=40');
        window.event.returnValue=false;
         }
        
   	function leaveMessage()
	{
		open('http://www.cmbchina.com/cmb2005web/cmbaspxbin/common/cmbcustomer.aspx','cmbjibao','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=yes,width=634,height=450,top=100,left=40');
	}
 
 	function cmbrate(url,w,h)
		{
 			open(url,'cmbrate','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=yes,width='+w+',height='+h+',top=50,left=50');
		}
        
	function webSearch()
	{
		
		var keyword=document.getElementById("searchStr").value;
		if (document.getElementById("searchStr").value == "")
			document.getElementById("searchStr").value="请输入关键字"
		else
			open('http://218.17.246.170/cgi-bin/wstsearch?tn=wst&ch_id=0&query='+keyword,'cmbwebsearch','');
	}

   // 个股查询输入股票代码错误提示
function errorAlert()
 { 
       var curStockIdName=document.getElementById("stockIDTextBox").value  
      if (curStockIdName=="")
      { 
         alert("请输入股票代码!") 
         document.getElementById("stockIDTextBox").focus() 
         window.event.returnValue = false; 
         return
      }
      else
      {
      if ((curStockIdName.length!=6)&(!isNaN(curStockIdName)))
         {
         alert("股票代码有误，请重新输入!") 
         document.getElementById("stockIDTextBox").focus() 
         window.event.returnValue = false; 
         return
         }
       }
    } 
    // 添加股票代码为空提示
function Alert_Empty()
 { 
      var curStockIdName=document.MyStockModify.stockidTextBox.value  
      if (curStockIdName=="")
      { 
         alert("请输入股票代码!") 
         document.MyStockModify.stockidTextBox.focus() 
         window.event.returnValue = false; 
         return
      }
    } 
    //删除股票代码前提示
function confirmDelete(code) 
{
    if (confirm("\r\n您确实要删除吗？\r\n代码："+code)) {
       window.event.returnValue = true;
    }
    else
    {
	  window.event.returnValue = false;
	}
}
    //删除收藏标题前提示
function confirmDeleteInfo(title) 
{
    if (confirm("\r\n您确实要删除此条信息吗？\r\n标题："+title+"")) {
       window.event.returnValue = true;
    }
     else
    {
	  window.event.returnValue = false;
	}
}
// Industry Category tree
<!--
	var divInnerHtml = "";
	function change(){
		if(!document.all)
			return
		if (event.srcElement.id=="folder") {
			var srcIndex = event.srcElement.sourceIndex
			var nested = document.all[srcIndex+2]
			if (nested.style.display=="none") {
				nested.style.display='block'
				event.srcElement.src = "../../images/open.gif";
			}
			else {
				nested.style.display="none"
				event.srcElement.src = "../../images/fold.gif";
			}
		}
	}
	function BuildTree(){
		BuildTree('_blank');
	}
	function BuildTree(target){
		var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		xmlHttp.Open("GET","GetXmlTree.aspx",false);
		xmlHttp.Send();
		var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
		var respondXml = xmlHttp.responseText;
		xmlDom.async = false;
		xmlDom.loadXML(respondXml);
		var nodes = xmlDom.documentElement.childNodes;
		divInnerHtml += "<ul>";
		for(var i=0; i<nodes.length;i++){
			BuildTreeNode(nodes.item(i),target);
		}
		divInnerHtml += "</ul>";
		HylbTreeDiv.innerHTML = divInnerHtml;
	}
	function BuildTreeNode(node,target){
		if(node.hasChildNodes())
		{
			
			divInnerHtml += "<li id=\"foldheader\" >";
			divInnerHtml += "<img id=\"folder\" src=\"../../images/fold.gif\">";
			
			divInnerHtml += "<a class='content' target='";
			divInnerHtml += target;
			divInnerHtml +="' href=\"";
			divInnerHtml += node.getAttribute("url");
			divInnerHtml += "\">";
			divInnerHtml += node.getAttribute("name");
			divInnerHtml += "</a>";	
			divInnerHtml += "<ul id=\"foldinglist\" style=\"DISPLAY:none\">";
			var childNodes = node.childNodes;
			for(var j=0; j<childNodes.length;j++)
			{
				BuildTreeNode(childNodes.item(j),target);
			}
			divInnerHtml += "</ul>";
			divInnerHtml += "</li>";
			
		}
		else
		{
			divInnerHtml += "<li id=\"leaf\">";
			divInnerHtml += "<img id=\"list\" src=\"../../images/list.gif\">";
			divInnerHtml += "<a class='content' target='";
			divInnerHtml += target;
			divInnerHtml += "' href=\"";
			divInnerHtml += node.getAttribute("url");
			divInnerHtml += "\">";
			divInnerHtml += node.getAttribute("name");
			divInnerHtml += "</a>";	
			divInnerHtml += "</li>";
		}
	}
	
	document.onclick=change
	
	//获取焦点
	
	function GetFocus()
	{
	  document.getElementById("TextBox1").focus();
	}
	  // 基金代码为空提示
function Alert_Empty_Fund()
 { 
      var curFundId=document.getElementById("fundIDText").value  
      if (curFundId=="")
      { 
         alert("请输入基金代码!") 
         document.getElementById("fundIDText").focus() 
         window.event.returnValue = false; 
         return
      }
      else
      {
      if ((curFundId.length!=6)&(!isNaN(curFundId)))
         {
         alert("基金代码有误，请重新输入!") 
         document.getElementById("fundIDText").focus() ;
         window.event.returnValue = false; 
         return
         }
       }
    } 
    // 债券代码为空提示
function Alert_Empty_Bond()
 { 
      var curBondId=document.getElementById("bondIDTextBox").value  
      if (curBondId=="")
      { 
         alert("请输入债券代码!") 
         document.getElementById("bondIDTextBox").focus() 
         window.event.returnValue = false; 
         return
      }
      else
      {
      if ((curBondId.length<6)||(curBondId.length>7))
         {
         alert("债券代码有误，请重新输入!") 
         document.getElementById("bondIDTextBox").focus() ;
         window.event.returnValue = false; 
         return
         }
       }
    } 
	//flash
function showresult1()
{
window.open(" ../../webpages/know_cmbwealth/dhhz.htm ","null"," width=510, height=380, status=yes, toolbar=no, location=no, scrollbars=no, menubar=no,status=0");
}

function scrollAdv(url,param)
{
 open(url,'cmbscrolladv',param);
}

//-->
//去掉空格
function Trim(str){
 if(str.charAt(0) == " "){
  str = str.slice(1);
  str = Trim(str); 
 }
 return str;
}
//===================日期/时间选择
function ChooseDateTime(obj)
{
	var retVal = window.showModalDialog("/cmbInvestCenter/InvestAspxBin/service/calendarWin.aspx?type=dateTime&date="+obj.value ,null, "dialogHeight:250px;dialogWidth:285px;scroll:no;status:no;help:no");
	if(retVal != null && retVal != "")
	{
		obj.value = retVal;
	}
	//window.event.returnValue = false;
}
function ChooseDate(obj)
{
	var retVal = window.showModalDialog("/cmbInvestCenter/InvestAspxBin/service/calendarWin.aspx?type=date&date="+obj.value ,null, "dialogHeight:250px;dialogWidth:285px;scroll:no;status:no;help:no");
	if(retVal != null && retVal != "")
	{
		obj.value = retVal;
	}
	//window.event.returnValue = false;
}
//open new page of dropdownlist
function opennew(selectname){
	var myindex=selectname.selectedIndex;
	if (myindex == 0){return;}
	window.open(selectname.options[myindex].value,null,"",true);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}