function blgBackground() {
  now = new Date(), hour = now.getHours();
  if(hour<3){
	var time= "n";
  }
  else if(hour<10){
	var time= "m";
  }
  else if(hour<14){
	var time= "j";
  }
  else if(hour<18){
	var time= "a";
  }
  else if(hour<22){
	var time= "s";
  }
  else {
	var time= "n";
  }
  if (screen.width <= 1024) {
	var bgRes = 1024;
  }
  else if (screen.width >1024 & screen.width <=1280) {
	var bgRes = 1280;
  }
  else if (screen.width >1280 & screen.width <=1600) {
	var bgRes = 1600;
  }
  else {
	var bgRes = 1920;
  }
  document.write("<style>.blog { background: #000 url('http://blog.wanglingjie.net/wp-content/themes/wlingjie/imgs/blgbg_" + time + "_" + bgRes + ".jpg') repeat-y ; }</style>")
}

function blgIdxPos() {
	var blgIdxH= parseInt(screen.width*0.666) - 300;
	document.write("<div class='blgIdx' style='height: " + blgIdxH + "px;'>");
}

function blgContainerPos() {
	var blgContainerH= parseInt(screen.width*0.666) - 332;
	document.write("<div id='blgContainer' style='height: " + blgContainerH + "px;'>");
}

function blgAhvContainerPos() {
	var blgAhvContainerH= parseInt(screen.width*0.666) - 332;
	document.write("<div class='blgAhvContainer' style='height: " + blgAhvContainerH + "px;'>");
}

function blgSidebarPos() {
	var barH= parseInt(screen.width*0.666) - 398;
	document.write("<div class='bar' style='height: " + barH + "px;'>");
}

function blgFooterPos() {
	var fotPos= parseInt(screen.width*0.666)-40;
	var fotWidth= screen.width*0.1 + 988;
	document.write("<div class='fot' style='top: " + fotPos +"px; width: " + fotWidth + "px;'>");
}

function blgBottomlinePos() {
	var bottomlinePos= parseInt(screen.width*0.666) + 4;
	document.write("<div class='bottomline' style='top: " + bottomlinePos +"px;'></div>");
}

function bioBackground() {
	if (screen.width <= 1024) {
	  var bgRes = 1024;
	}
	else if (screen.width >1024 & screen.width <=1280) {
	  var bgRes = 1280;
	}
	else if (screen.width >1280 & screen.width <=1600) {
	  var bgRes = 1600;
	}
	else {
	  var bgRes = 1920;
	}
	document.write("<style>.bio { background: #000 url('bio_" + bgRes + ".jpg') repeat-y; }</style>");
}

function bioFooter() {
	var fotPos= parseInt(screen.width*0.5625)-44;
    document.write("<div class='biofot' style='top: " + fotPos +"px; width: 310px;'>");
}