	var g_element = window.document.all;
        
	function webSearch()
	{
		
		var keyword=document.getElementById("searchStr").value;
		if (document.getElementById("searchStr").value == "")
			document.getElementById("searchStr").value="请输入关键字"
		else
			open('http://search.cmbchina.com/cgi-bin/wstsearch?tn=wst&ch_id=0&query='+keyword,'cmbwebsearch','');
	}
//Open  New Window
	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 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 yktapply()
{
 	open('https://www.nj1.cmbchina.com/script/yktapply.htm','yktapply','menubar=no,toolbar=no,location=no,directories=no,scrollbars=yes,status=yes,resizable=yes,width=430,height=255');
}

// 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 GetFocus()
	{
	  document.getElementById("TextBox1").focus();
	}
	
function scrollAdv(url,param)
{
 open(url,'cmbscrolladv',param);
}

//-->
//去掉空格
function Trim(str){
 if(str.charAt(0) == " "){
  str = str.slice(1);
  str = Trim(str); 
 }
 return str;
}

//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);
}
//Set cookies
function setCookie(name, value) {
   expiryday=new Date();
   expiryday.setTime(expiryday.getTime()+30*30*24*60*60*1*1000);
   //保存设置三十个月
   document.cookie = name + "=" + escape(value)
   + "; expires=" + expiryday.toGMTString() + "; domain=cmbchina.com; path=/";
}
function getCookie(Name) {
   var search = Name + "="
   if (document.cookie.length > 0) { // if there are any cookies
      offset = document.cookie.indexOf(search) 
      if (offset != -1) { // if cookie exists 
         offset += search.length 
         end = document.cookie.indexOf(";", offset) 
         if (end == -1) 
            end = document.cookie.length
         return unescape(document.cookie.substring(offset, end))
      } 
   }
   return 0;
}
//Credit Card Promotion Query
  function CCProm()
	 {	open("http://ccclub.cmbchina.com/CreditCardProm/CustomerQuery.aspx",'','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=yes,width=634,height=450,top=100,left=40');
	  }
	  
	  function gettime(str)
 { var a=window.showModalDialog("/cmb2005web/cmbaspxbin/cmbreview/1.aspx",1,"dialogWidth=320px;dialogHeight=275px;scroll=no;status=no"); 
	if(a!=null)
		{document.getElementById(str).innerText=a;} }
		
function openScenery(url,w,h)
{
	var wleft = (window.screen.width-w)/2;
	var wtop = (window.screen.height-h)/2;
	open(url,'','menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=yes,width='+w+',height='+h+',top='+wtop+',left='+wleft);
}

//电话银行优惠商户
function getCBShop(pname)
{
	var cbshop_type=document.getElementById("ccShopTypeDropDownList").options[document.getElementById("ccShopTypeDropDownList").selectedIndex].value;
	var cbshop_keyword=document.getElementById("keywordTextBox").value;
 	open('/cmb95555/cmbaspxbin/cbshop/'+pname+'.aspx?type='+cbshop_type+'&&keyword='+cbshop_keyword,'cbshop','menubar=yes,toolbar=yes,location=yes,directories=yes,status=no,resizable=yes,scrollbars=yes,width=800,height=610,top=50,left=10');
}

//ICS 
	var icsWnd = null;
	var switchWnd = null;
	function fLoginICS(){
		var nWinLeft = (screen.width-600)/2;
		var nWinTop = (screen.height-400)/2;
		if ( icsWnd != null )
			icsWnd.close();
		icsWnd = window.open('https://forum.cmbchina.com/cmu/icslogin.aspx?from=B&logincmu=0', 'icslogin', 'width=600,height=400,status=yes,left='+nWinLeft+',top='+nWinTop);
	}
//singlesFundquery
	 function SingleFundQuery()
	{
		
		var keyword=document.getElementById("fundIDTextBox").value;
		if (document.getElementById("fundIDTextBox").value == "")
			document.getElementById("fundIDTextBox").value="请输入基金代码"
		else
			open('http://fund.cmbchina.com/CmbFund/FundAspxBin/main/SingleFundBaseInfo.aspx?channel=JJZL&&fundid='+keyword,'SingleFundQuery','');
	}
	function popprintwin(url)
	{
		open(url,'','menubar=no,toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=yes,width=620,height=500,top=40,left=40');
	}
	function popprintwin2(url)
	{
		open(url,'','menubar=no,toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=yes,width=788,height=500,top=40,left=40');
	}
	
	 function FundFilterWnd(investType,bnhbl,zzcjz)
      {        
            open('http://fund.cmbchina.com/CmbFund/FundAspxBin/common/FundFilterResult.aspx?investType='+investType+'&bnhbl='+bnhbl+'&zzcjz='+zzcjz);    
      }