(function(){var _scripts=document.getElementsByTagName("script");var _params=_scripts[_scripts.length-1].innerHTML;var _config=new Object();_config.picName=GetQueryString("pic",_params)||"c21f969b5f03d33d43e04f8f136e7682";_config.isShow=GetQueryString("show",_params)||"1";_config.showDefault=GetQueryString("sdft",_params)||"1";_config.isMobile=GetQueryString("mb",_params)||"0";_config.startDate=GetQueryString("sdate",_params)||"2017-01-20";_config.endDate=GetQueryString("edate",_params)||"2017-02-12";_config.divId=GetQueryString("divid",_params)||"hbAdsNewYear";_config.dir="newyear";if(_config.isShow!="1"){return false}var _today=new Date();var _startDate=new Date(_config.startDate);var _endDate=new Date(_config.endDate);if(_today>_startDate&&_today<_endDate){if(_config.showDefault=="1"){_config.picName="c21f969b5f03d33d43e04f8f136e7682"}var _oDiv=document.createElement("div");_oDiv.id=_config.divId;_oDiv.style.zIndex="10000";_oDiv.style.top="0px";_oDiv.style.width="100%";_oDiv.style.overflow="hidden";_oDiv.style.textAlign="center";var _img=document.createElement("img");if(_config.isMobile=="1"){_oDiv.style.position="absolute";_oDiv.style.height="100%";_oDiv.style.backgroundColor="rgba(20,20,20,0.5)";_img.style.margin="20vh auto";_img.style.width="90%";_img.src="http://www.baidujx.com/libraries/"+_config.dir+"/m/"+_config.picName+".jpg"}else{_oDiv.style.margin="auto";_oDiv.style.position="relative";_img.style.width="100%";_img.src="http://www.baidujx.com/libraries/"+_config.dir+"/"+_config.picName+".jpg"}_oDiv.appendChild(_img);var _body=document.body;document.body.insertBefore(_oDiv,_body.childNodes[0]);if(_config.isMobile=="1"){var _elem=document.getElementById(_config.divId);setTimeout(function(){fadeOut(_elem,100,0)},4000)}else{setTimeout(function(){var _upTimer=setInterval(function(){var _h=document.getElementById(_config.divId).offsetHeight;_h--;if(_h<0){clearInterval(_upTimer)}document.getElementById(_config.divId).style.height=_h+"px"},3)},5000)}}else{return false}function fadeOut(ele,speed,opacity){ele.style.filter="alpha(opacity:"+(opacity)+")";ele.style.opacity=(opacity)/100;var val=100;(function(){val-=5;if(val>=opacity){setTimeout(arguments.callee,speed)}if(val<0){ele.style.display="none"}})()}function GetQueryString(name,pstr){var reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)");var r=pstr.match(reg);if(r!=null){return unescape(r[2])}return null}})();