// //删除元素覆盖样式
// window.addEventListener("load",function(){
// 	var b=document.getElementById('top_title');
// 	b.style.display="none";
// 	document.getElementById("content").style.margin="0";
// 	document.getElementById("content").style.padding="0";
// 	document.getElementById("content").style.width="100%";
// 	document.getElementById("top_menu_under").style.height="10px";
// 	document.getElementById("globalWrapper").style.padding="0";
// });
//滚动监听
window.onscroll = function() {
  	var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
  	if(scrollTop>=300){
      document.getElementById("topButton").style.display='block';
    }
    else{
      document.getElementById("topButton").style.display='none';
    }
  	// if(scrollTop>=450){
  	// 	var box=document.getElementsByClassName("menuLi");
  	// 	for(var i=0;i<box.length;i++){
  	// 		box[i].style.color="#EE587B";
  	// 		box[i].style.backgroundColor="rgb(235,235,235)";
  	// 	}
  	// 	box[0].style.backgroundColor="#EE587B";
  	// 	box[0].style.color="white";
  	// }
  	// if(scrollTop>=700){
  	// 	var box=document.getElementsByClassName("menuLi");
  	// 	for(var i=0;i<box.length;i++){
  	// 		box[i].style.color="#EE587B";
  	// 		box[i].style.backgroundColor="rgb(235,235,235)";
  	// 	}
  	// 	box[1].style.backgroundColor="#EE587B";
  	// 	box[1].style.color="white";
  	// }
  	// if(scrollTop>=1000){
  	// 	var box=document.getElementsByClassName("menuLi");
  	// 	for(var i=0;i<box.length;i++){
  	// 		box[i].style.color="#EE587B";
  	// 		box[i].style.backgroundColor="rgb(235,235,235)";
  	// 	}
  	// 	box[2].style.backgroundColor="#EE587B";
  	// 	box[2].style.color="white";
  	// }
  	// if(scrollTop>=1300){
  	// 	var box=document.getElementsByClassName("menuLi");
  	// 	for(var i=0;i<box.length;i++){
  	// 		box[i].style.color="#EE587B";
  	// 		box[i].style.backgroundColor="rgb(235,235,235)";
  	// 	}
  	// 	box[3].style.backgroundColor="#EE587B";
  	// 	box[3].style.color="white";
  	// }
  	// if(scrollTop>=1700){
  	// 	var box=document.getElementsByClassName("menuLi");
  	// 	for(var i=0;i<box.length;i++){
  	// 		box[i].style.color="#EE587B";
  	// 		box[i].style.backgroundColor="rgb(235,235,235)";
  	// 	}
  	// 	box[4].style.backgroundColor="#EE587B";
  	// 	box[4].style.color="white";
  	// }
}
//滚动控制
function scrollMove(){
        var scrollInterval;
        function animate(to = 0, time = 300){
        	window.clearInterval(scrollInterval);
            var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop || 0;
            var step = (scrollTop - to) / 100;
            scrollInterval = window.setInterval(function(){
                window.scrollTo(0, scrollTop - step);
                scrollTop -= step;
                //console.log(scrollTop);
                if((step <= 0 && scrollTop >= to) || (step > 0 && scrollTop <= to)){
                    window.scrollTo(0, to);
                    window.clearInterval(scrollInterval);
                }
            }, time / 100);
        }
        return animate;
}
var scrollM=scrollMove();

function scrollControl(n){
	scrollM(n,200);
}

var acc = document.getElementsByClassName("articalButton");
    var i;
    for (i = 0; i < acc.length; i++) {
      acc[i].onclick = function() {
        this.classList.toggle("active");
        var panel = this.nextElementSibling;
        if (panel.style.maxHeight){
          panel.style.maxHeight = null;
        } else {
          panel.style.maxHeight = panel.scrollHeight + "px";
        } 
      }
    }