// JavaScript Document
/*
	大众书网 周晖，用于检测CPU占用
*/
var debug_array = new Array();

function show_hide_div(n){
	el = document.getElementById(n);
	if(typeof(el) == "undefined") return;
	if((debug_array[n] == "") || (typeof(debug_array[n]) == "undefined")){
		debug_array[n] = el.innerHTML;
		el.innerHTML = "";
	}else{
		el.innerHTML = debug_array[n];
		debug_array[n] = "";
	}
}

function show_hide_ad(){
	show_hide_div("placeholder_banner_index_across_one");
	show_hide_div("placeholder_banner_index_across_two");
	show_hide_div("placeholder_banner_index_across_three");
	show_hide_div("placeholder_banner_index_across_four");
	show_hide_div("placeholder_banner_index_across_four_right");
	show_hide_div("placeholder_banner_index_across_five");
	show_hide_div("adHome6");
	show_hide_div("ad_top");
	show_hide_div("ad_top_2");
}

function show_hide_header(){
	show_hide_div("header");
}
	
function debug() {
	if(event.altKey && event.ctrlKey){
  		if(event.keyCode == 69) show_hide_ad();
  		if(event.keyCode == 68) show_hide_header();
	}
}
document.onkeydown = debug;
