	function test(){
		alert("已经引入staticNews.js");
	}
	
	function getTradeCorpList(tradecode,tradename)
	{
	  document.getElementById("tradecode").value = tradecode;
	  document.getElementById("tradename").value = tradename;
	  document.tradesearch.submit();
	}
	
	
	function getHint(smd){
		if(smd == "corpname")
	        return "请输入目标公司名称";
	    else if(smd == "product")
	        return "请输入产品名称";
	    else if(smd == "stock")
	        return "请输入股票代码";
	    else if(smd == "trade")
	        return "请输入产业名称";
	    else if(smd == "district")
	        return "请输入地区名称";
	    else
			return "";
	}
	
	function onFastSearch(){
	  if(document.fastSearch.keyword.value == null || document.fastSearch.keyword.value == ""
	  	 || document.fastSearch.keyword.value == "请输入目标公司名称"
	     || document.fastSearch.keyword.value == "请输入产品名称"
	     || document.fastSearch.keyword.value == "请输入股票代码"
	     || document.fastSearch.keyword.value == "请输入产业名称"
	     || document.fastSearch.keyword.value == "请输入地区名称"){
	      alert("请输入关键字！");
	      return false;
	  }else{
	     if(document.fastSearch.cmd.value == "stock"){
	        var partrn=/^[A-Za-z0-9]+$/;
	        if (!partrn.test(document.fastSearch.keyword.value)) {
	            alert("股票代码必须由数字和字母组成");
	            document.fastSearch.keyword.focus();
	            return false;
	        }
	     }else if(document.fastSearch.cmd.value == "corpname"){
	     	return inputError(document.fastSearch.keyword.value);
	     }
	  }
	}
	
	function inputError(inputValue){
		if(isContain(inputValue)){
			alert("不能仅输入"+inputValue+"！");
			return false;
		}
		return true;
	}
	
	function onKeywordFocus(fld){
		var smd = fld.form["cmd"].value;
		var hint = getHint(smd);
		if(fld.value == hint){
			fld.value = "";
		}
	}
	
	function onKeywordBlur(fld){
		var smd = fld.form["cmd"].value;
		
		var hint = getHint(smd);
		if(!fld.value){
			fld.value = hint;
		}
	}
	
	function isContain(szSrc){
	    var bResult = false;
	    if(szSrc == "有限责任公司"
	    || szSrc == "有限"
	    || szSrc == "有限责"
	    || szSrc == "有限责任"
	    || szSrc == "责任"
	    || szSrc == "限责任"
	    || szSrc == "任公司"
	    || szSrc == "责任公司"
	    || szSrc == "公司"
	    || szSrc == "有限公"
	    || szSrc == "有限公司")
	    {
	        bResult = true;
	    }
	    return bResult;
	}
	
	// 以下为非公司搜索的方法
	function getFromUrl(){
		var szUrl = window.location.href;
		document.headform.fromURL.value = szUrl;
	}
	
	function doLogin(){	
		getFromUrl();
		document.headform.action = "/login.do?cmd=preLogin";
	
		var window_width = 510;
		var window_height = 333;
		var window_top = (screen.availHeight - window_height) /2;
		var window_left = (screen.availWidth -window_width)/2;
	
		var window_dimensions = "top =" +window_top+ ",left = " +window_left+ ",height=" + window_height + ",width=" + window_width + ",scrollbars=no,resizable=no";
	
		loginWin = window.open('',"loginWin",window_dimensions);
		document.headform.target="loginWin";
		document.headform.submit();
		loginWin.focus();
	}
	function doLogout(){
		getFromUrl();
		document.headform.action = "/logout.do";
		document.headform.submit();
	}
	function changeLocale(locale){
		var szUrl = window.location.href;
		document.localeform.fromURL.value = szUrl;
		document.localeform.locale.value = locale;
		document.localeform.submit();
	}
		
	function gotodest(dest){
	    window.location.href = dest;
	}
	function gotodest2(url){
		var openWin=window.open(url);
		openWin.focus();
	}
	function openWin(url){
		var win_width = 500;
		var win_height =530;
		var win_top = (screen.availHeight - win_height) /2;
		var win_left = (screen.availWidth -win_width)/2;
		var win_dimensions = "top =" +win_top+ ",left = " +win_left+ ",height=" + win_height + ",width=" + win_width + ",scrollbars=no" + ",resizable=1";
		window.open(url,"loginWin",win_dimensions);
	}
	
