var gwdshare = gwdshare || { version: "1.0", udata: "type=tools&amp;amp;uid=GWD-800716", pageFilter: "", jsLoaded: false };
        (function () {
            function async_load() {
                var s = document.createElement('script');
                s.type = 'text/javascript';
                s.async = true;
                s.src = '//static.gridsumdissector.com/zheng_fen_xiang/scripts/gwdshareasync.min.js';
                var x = document.getElementsByTagName('script'), y = x[x.length - 1];
                y.parentNode.appendChild(s);
            }
            if (!gwdshare.jsLoaded) {
                if (window.attachEvent) window.attachEvent('onload', async_load);
                else window.addEventListener('load', async_load, false);
                gwdshare.jsLoaded = true;
            }
        })();
$(document).ready(function(){
    $("#zoom img").each(function(){     //
//        var width = 600;
//        var height = 600;
//        var image = $(this);
//           if(image.width()>600 && image.width()<1000){
//            image.width('70%');
//            image.height('70%');
//           }else if(image.width()>1000)
//          {
//            image.width('50%');
//            image.height('50%');

//           }else if (image.width()<=410)
//           {
//             image.width('70%');
//             image.height('70%');
//           }else{
//             image.width('80%');
//             image.height('80%');

//           }

    var image = $(this);
    if (document.documentElement.clientWidth < 350)
    {
        image.width('100%');
         image.height('100%');
     }else if(image.width()>600 && image.width()<1000){
            image.width('70%');
   image.height('70%');

     }else if(image.width()>1000)
          {
            image.width('50%');
   image.height('50%');

        }

    });
});

function validata(){

var keywords = $("#qt").val();
      var regu="^[\u4e00-\u9fa5_a-zA-Z0-9/,/;]+$";
      var re = new RegExp(regu); 
      if(keywords=="" || keywords=="请输入关键字" ){
      	alert("请输入检索关键字");
      	return false;
      }
	  return true;
}



        window.onload=function()
        {
            var str = Math.round(Math.random()*10000); // 定义变量
            var oText = document.getElementById('token');
            oText.value=str; // 给文本框赋值并显示
        }
$(function () {		
	//搜索地址以及热搜索词获取范围
	//jsonp 跨域
	getHotWord("http://sousuo.ndrc.gov.cn/","jsonp","bm04000007","");
});

function getHotWord(url,type,siteCode,database){
	$.ajax({  
	     type : "post",  
	     async:false,  
	     url : "http://so.kaipuyun.cn/hotword?type="+type+"&siteCode="+siteCode+"&database="+database,  
	     dataType : "jsonp",  
	     jsonp: "callbackparam",//服务端用于接收callback调用的function名的参数  
	     jsonpCallback:"success_jsonpCallback",//callback的function名称  
	     success : function(data){
	    	 var html = "";
	    	 if(data.response=="true"){
	    		 var hotword = data.hotword.split(",");
	    		 for(var i=1;i<4;i++){
	    			 html += "<a target='_blank' style='font-size: 12px;padding:0px 5px;' href='"+url+"s?q=1&database="+database+"&siteCode="+siteCode+"&qt="+encodeURIComponent(hotword[i])+"'>" + hotword[i] + "</a>";
	    		 }
	    	 }else{
	    		 html += data.msg;
	    	 }
	    	 $("#hotword").html(html);
	    	 
	     }
	 });
}


document.writeln('<div id="header" class=""  ><!-- header -->');
document.writeln('					<ul class="toptools clearfix">');
document.writeln('						<li class="left ">');
document.writeln('							<a href="/">返回主站首页</a>&nbsp;&nbsp;&nbsp;');
document.writeln('						</li>');
document.writeln('						<li class="right">');
document.writeln('									<!--<a  href="http://e.t.qq.com/fagaiwei"  target=_blank>国家发改委腾讯微博</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;--><a  href="http://weibo.com/gjfgw"  target=_blank>国家发改委新浪微博</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="http://www.ndrc.gov.cn/jsfb/rss/" target="_blank">RSS订阅</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;');
document.writeln('<span style="position:relative;display:inline-block;height:16px;vertical-align:-4px;_padding-top:6px;">');
document.writeln('    <div id="gwdShare_win_3_24" style="height:16px;width:50px;">');
document.writeln('		<div id="gwdShare_con_3_24" style="display:none">');
document.writeln('            <div id="gwdshare" class="gwdshare_t gwds_tools_24 get-codes-gwdshare">');
document.writeln('                <a class="gwds_people" style="margin:2px 3px 0px 1px;"></a>');
document.writeln('                <a class="gwds_tsina" style="margin:2px 3px 0px 3px;"></a>');
document.writeln('                <a class="gwds_tqq" style="margin:2px 3px 0px 3px;"></a>');
document.writeln('                <a class="gwds_weixin" style="margin:2px 3px 0px 3px;"></a>');
document.writeln('            </div>');
document.writeln('		</div>');
document.writeln('    </div>');
document.writeln('</span>');


document.writeln('						</li>');


document.writeln('					</ul>');
document.writeln('');
document.writeln('					<ul class="top2 screen_width clearfix">');
document.writeln('						<li class="left clearfix">');
document.writeln('							<img class="logo1b" src="/images/logo1.png" title="中华人民共和国国家发展和改革委员会" />');
document.writeln('						</li>');
document.writeln('						<li class="right ">');
document.writeln('							<ul class="search2 "  >');
document.writeln('								<li><form onsubmit="return validata()" action="http://sousuo.ndrc.gov.cn/s?siteCode=bm04000007" method="post" target="_blank"><input name="token" type="hidden" id="token" /><input id="qt" name="qt" type="text" class="input_2a" onFocus="this.className=\'input_2b\';javascript:if(this.value == \'请输入关键字\'){this.value = \'\';}" onBlur="this.className=\'input_2a\';javascript:if(this.value == \'\'){this.value = \'请输入关键字\';}" value="请输入关键字" style="width:200px" /><INPUT type="submit" class="btn_search2" value="&nbsp;" title="检索" /></form></li>');
document.writeln('								<li><span class="color1">热门搜索：</span><div id="hotword" class="divcss5-left"></div></li>');
document.writeln('							</ul>');
document.writeln('						</li>');
document.writeln('					</ul>');
document.writeln('');
document.writeln('');
document.writeln('			</div><!-- /header -->');