(function(){

//获取对象
var $ = 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 "";
};

//设置cookie
this.setAdCookie = function(N,V,Q){
	var L=new Date();
	var z=new Date(L.getTime()+Q*1000);
	document.cookie=N+"="+escape(V)+";path=/;domain=kgedu.net;expires="+z.toGMTString()+";";
};

//构造函数
init2012 = function(){
  try{
        document.write('\
      <style type="text/css">\
        body{background:url(/images/60/2012ChunJiebg.jpg) repeat-x top center;padding-top:0;margin-top:0;}\
        .topAD{background:#fff;}\
      </style>\
      <div id="2012TopBar" style="clear:both;width:990px;height:50px;margin:0 auto;padding:0;overflow:hidden;position:relative;">\
       <div id="2012Btncls" style="width:40px;height:18px;padding:0;margin:0;position:absolute;right:80px;bottom:3px;cursor:pointer;display:block;background:url(/images/60/60bg_cls2.jpg) no-repeat;z-index:2;" title="关闭背景"></div>\
      </div>\
      <div id="2012TopBlank" style="clear:both;height:0;line-height:0;font-size:0;overflow:hidden;display:none;"></div>\
    ');

      $("2012Btncls").onclick = function(){
		document.body.style.background = "#fff";
		$("2012TopBar").style.display = "none";
		$("2012TopBlank").style.display = "block";
	    setAdCookie("2012chunjieBgCookie",0,24);};
  }catch(e){}
}
//var cookie = getAdCookie("2012chunjieBgCookie");
// cookie = cookie==""?1:cookie;
// var dt =new Date();
// dt=<% = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") %>; 
// var dt1=new Date("Jan 22 2012");
//var dt2=new Date("Feb 2 2012");
//if(dt>=dt1&&dt<dt2)
//{init2012();}
 
// if(cookie==1){ 
// pthis.init(); 
// }
// else{ 
// pthis.init(); 
// }

})();
