function section_warning_show () {
var el = document.querySelector(".section-warning .spoiler .expand-link");
el.parentNode.removeChild(el);
el = document.querySelector(".section-warning .spoiler .content");
var scrollHeight = el.scrollHeight;
el.style.height = scrollHeight + "px";
el.style["margin-bottom"] = 0;
el = document.querySelector(".section-warning");
el.style["padding-bottom"] = 0;
// el.classList.add("show");
// var sectionHeight = element.scrollHeight;
}
var slideNo = 0;
function changeSlide (el) {
var changeTo = el.dataset.i;
console.log(slideNo + " => " + changeTo);
if (slideNo !== changeTo) {
var topEl = document.querySelector(".section-weeks > .content > .top");
var sliderEl = document.querySelector(".section-weeks > .slider");
var bottomEl = document.querySelector(".section-weeks > .content > .bottom");
topEl.children[slideNo].classList.remove("active");
sliderEl.children[slideNo].classList.remove("active");
bottomEl.children[slideNo].classList.remove("active");
topEl.children[changeTo].classList.add("active");
sliderEl.children[changeTo].classList.add("active");
bottomEl.children[changeTo].classList.add("active");
slideNo = changeTo;
}
}
window.addEventListener("scroll", function() {
var doc = document.documentElement;
var left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
sessionStorage.scrollTop = top;
});