(function(){
var pthis = this;
//获取对象
this.$ = function(id){if(document.getElementById){return eval('document.getElementById("'+id+'")')}else{return eval('document.all.'+id)}};

//获取cookie
this.getAdCookie = function(N){
	var c=document.cookie.split("; ");
	for(var i=0;i<c.length;i++){var d=c[i].split("=");if(d[0]==N)return unescape(d[1]);}
	return "";
};
//构造函数
this.init = function(){
  try{
    document.write('\
      <style type="text/css">\
        body{background:url(ad/dcde.jpg) no-repeat center top}\
      </style>\
      <div onclick= "window.open(\'http://www.0797sf.com/thread-16871-1.html\', \'_blank\')" id="newyear_bar" style="width:966px;height:90px;overflow:hidden;position:relative;margin:0 auto;cursor:pointer;">\
	  <div style="margin-right:50px;"></div>\
        <div id="newyear_bar_close" style="width:43px;height:17px;padding:0;margin:0;position:absolute;right:0;bottom:0;cursor:pointer;display:block;background:url(ad/newyear_close.gif) no-repeat;z-index:2;" title="关闭背景"></div>\
      </div>\
    ');
    var tmpImg = document.createElement("img");
    tmpImg.src="/ad/newyear_close.gif";
    pthis.$("newyear_bar_close").onmouseover = function(){pthis.$("newyear_bar_close").style.background = "url(ad/newyear_close_w.gif) no-repeat";};
    pthis.$("newyear_bar_close").onmouseout = function(){pthis.$("newyear_bar_close").style.background = "url(ad/newyear_close.gif) no-repeat";};
    pthis.$("newyear_bar_close").onclick = function(){
		document.body.style.background = "none";
		pthis.$("newyear_bar").style.display = "none";
	};
  }catch(e){}
}

 var cookie = pthis.getAdCookie("60yearBgCookie");
 cookie = cookie==""?1:cookie;
 if(cookie==1){pthis.init();}

})();
