(function()
{

var pthis = this;

//获取对象
this.$ = function(id){if(document.getElementById){return eval('document.getElementById("'+id+'")')}else{return eval('document.all.'+id)}};

//获取cookie
this.getTopBgCookie = 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 "";
};

//设置cookie
this.setTopBgCookie = function(N,V,Q){
	var L=new Date();
	var z=new Date(L.getTime()+Q*60000);

	//document.cookie=N+"="+escape(V)+";path=/;expires="+z.toGMTString()+";";
	document.cookie=N+"="+escape(V)+";path=/;domain=001cndc.com;expires="+z.toGMTString()+";";

};

//构造函数
this.init = function(){
  try{
    document.write('\
      <style type="text/css">\
        html{background:url(http://www.001cndc.com/zt/newyear_2010_none.jpg) repeat-x 0 0;}\
	body{background:url(http://www.001cndc.com/zt/newyear_2010_none.jpg) no-repeat 50% 0;padding-top:0;margin-top:0;}\
      </style>\
      <div id="CurrentBgTopBar" style="clear:both;width:970px;height:5px;margin:0 auto;padding:0;overflow:hidden;position:relative;">\
<!--<div id="Btncls" style="width:40px;height:18px;padding:0;margin:0;position:absolute;right:0;bottom:0;cursor:pointer;display:block;"></div>-->\
      </div>\
      <div id="CommonTopBlankSpacer" style="clear:both;height:5px;line-height:0;font-size:0;overflow:hidden;display:none;"></div>\
    ');

    pthis.$("Btncls").onclick = function(){
		document.documentElement.style.background = '#fff';
		document.body.style.background = "#fff";
		pthis.$("CurrentBgTopBar").style.display = "none";
		pthis.$("CommonTopBlankSpacer").style.display = "block";
	    	pthis.setTopBgCookie("jssetbg",0,1440);
	};
  }catch(e){}
}

 var cookie = pthis.getTopBgCookie("jssetbg");
 cookie = cookie==""?1:cookie;
 //if(cookie==1){pthis.init();}
 pthis.init();

})();