[javascript]代码库
var g=function(o){
return document.getElementById(o)
}
,
w=g("wrap"),f=g("footer"),b=document.body,
host=window.location.host.split("."),n=host[0],
s={
"1":"winter","2":"winter","3":"spring","4":"spring","5":"spring","6":"summer","7":"summer","8":"summer","9":"autumn","10":"autumn","11":"autumn","12":"winter"
}
[(new Date(nowtime*1000)).getMonth()+1],
h=document.documentElement.clientHeight||b.clientHeight,
a=function(){},
set=function(){
if(h>=690){
w.style.paddingTop=Math.ceil((h-570)/2)+"px";
f.className="footer pa"
}
else{
w.style.paddingTop="60px";
f.className="footer"
};
}
,
int=function(){
if(host.length==4){
if(n=="app"||n=="game"){
n=host[1]
}
else{
n=host[0]+"."+host[1]
}
};
g("return").href="http://"+n+".qq.com/?ADTAG=IED.InnerCop.gameWeb.errPage";
g("i404").src="http://ossweb-img.qq.com/images/game/404/season-"+s+".jpg";
b.className=s;
set();
b.style.display="block";
a("resize",function(){
h=document.documentElement.clientHeight||b.clientHeight;
set();
});
};
if(window.attachEvent){
a=function(e,f){
window.attachEvent("on"+e,f)
}
}
else{
a=function(e,f){
window.addEventListener(e,f,false)
}
};
if(typeof(pgvMain)=="function"){
pgvMain()
};
int();