function hh(){const main_div = document.getElementById("myschoolsevents_calendar");const topd = document.createElement("div");topd.id = "mse_topd";topd.style.display = "flex";topd.style.margin = "20px 0";topd.style.flexWrap = "nowrap";topd.style.justifyContent = "space-evenly";main_div.append(topd);const bckbd = document.createElement("div");bckbd.id = "mse_bckbd";bckbd.setAttribute("data_fwd_m","");bckbd.setAttribute("onMouseOver","this.style.backgroundColor='#6c757d'");bckbd.setAttribute("onMouseOut","this.style.backgroundColor='#ffffff'");bckbd.setAttribute("data_fwd_y","2025");bckbd.setAttribute("onclick","bck(this)");bckbd.style.order = "1";bckbd.style.visibility = "hidden";bckbd.style.border = "1px solid #000000";bckbd.style.fontSize = "18px";bckbd.style.cursor = "pointer";bckbd.style.borderRadius = "6px";bckbd.style.padding = "6px 16px";bckbd.innerHTML = "<";const mtitled = document.createElement("div");mtitled.id = "mse_mtitled";mtitled.style.order = "2";mtitled.style.fontSize = "28px";mtitled.style.fontWeight = "800";mtitled.innerHTML = "April 2025";const fwdbd = document.createElement("div");fwdbd.id = "mse_fwdbd";fwdbd.setAttribute("data_fwd_m","3");fwdbd.setAttribute("data_fwd_y","2025");fwdbd.setAttribute("onclick","fwd(this)");fwdbd.setAttribute("onMouseOver","this.style.backgroundColor='#6c757d'");fwdbd.setAttribute("onMouseOut","this.style.backgroundColor='#ffffff'");fwdbd.style.order = "3";fwdbd.style.border = "1px solid #000000";fwdbd.style.borderRadius = "6px";fwdbd.style.cursor = "pointer";fwdbd.style.fontSize = "18px";fwdbd.style.padding = "6px 16px";fwdbd.innerHTML = ">";const topdf = document.getElementById("mse_topd");topdf.append(bckbd);topdf.append(mtitled);topdf.append(fwdbd);const cald = document.createElement("div");cald.id = "cald";cald.style.display = "flex";cald.style.width = "100%";cald.style.margin = "10px 0";cald.style.flexWrap = "nowrap";cald.style.justifyContent = "space-evenly";main_div.append(cald);const calda = document.getElementById("cald");var dtweek = document.createElement("div");dtweek.style.order = "1";dtweek.style.border = "1px solid #000000";dtweek.style.fontSize = "16px";dtweek.style.padding = "0 12px";dtweek.style.backgroundColor = "#DCDEE0";dtweek.style.width = "100%";dtweek.style.margin = "0 0.3em";dtweek.style.flexShrink = "5";dtweek.style.textAlign = "center";dtweek.style.overflow = "hidden";dtweek.style.textOverflow = "ellipsis";dtweek.innerHTML = "Monday";calda.append(dtweek);var dtweek = document.createElement("div");dtweek.style.order = "1";dtweek.style.border = "1px solid #000000";dtweek.style.fontSize = "16px";dtweek.style.padding = "0 12px";dtweek.style.backgroundColor = "#DCDEE0";dtweek.style.width = "100%";dtweek.style.margin = "0 0.3em";dtweek.style.flexShrink = "5";dtweek.style.textAlign = "center";dtweek.style.overflow = "hidden";dtweek.style.textOverflow = "ellipsis";dtweek.innerHTML = "Tuesday";calda.append(dtweek);var dtweek = document.createElement("div");dtweek.style.order = "1";dtweek.style.border = "1px solid #000000";dtweek.style.fontSize = "16px";dtweek.style.padding = "0 12px";dtweek.style.backgroundColor = "#DCDEE0";dtweek.style.width = "100%";dtweek.style.margin = "0 0.3em";dtweek.style.flexShrink = "5";dtweek.style.textAlign = "center";dtweek.style.overflow = "hidden";dtweek.style.textOverflow = "ellipsis";dtweek.innerHTML = "Wednesday";calda.append(dtweek);var dtweek = document.createElement("div");dtweek.style.order = "1";dtweek.style.border = "1px solid #000000";dtweek.style.fontSize = "16px";dtweek.style.padding = "0 12px";dtweek.style.backgroundColor = "#DCDEE0";dtweek.style.width = "100%";dtweek.style.margin = "0 0.3em";dtweek.style.flexShrink = "5";dtweek.style.textAlign = "center";dtweek.style.overflow = "hidden";dtweek.style.textOverflow = "ellipsis";dtweek.innerHTML = "Thursday";calda.append(dtweek);var dtweek = document.createElement("div");dtweek.style.order = "1";dtweek.style.border = "1px solid #000000";dtweek.style.fontSize = "16px";dtweek.style.padding = "0 12px";dtweek.style.backgroundColor = "#DCDEE0";dtweek.style.width = "100%";dtweek.style.margin = "0 0.3em";dtweek.style.flexShrink = "5";dtweek.style.textAlign = "center";dtweek.style.overflow = "hidden";dtweek.style.textOverflow = "ellipsis";dtweek.innerHTML = "Friday";calda.append(dtweek);var dtweek = document.createElement("div");dtweek.style.order = "1";dtweek.style.border = "1px solid #000000";dtweek.style.fontSize = "16px";dtweek.style.padding = "0 12px";dtweek.style.backgroundColor = "#DCDEE0";dtweek.style.width = "100%";dtweek.style.margin = "0 0.3em";dtweek.style.flexShrink = "5";dtweek.style.textAlign = "center";dtweek.style.overflow = "hidden";dtweek.style.textOverflow = "ellipsis";dtweek.innerHTML = "Saturday";calda.append(dtweek);var dtweek = document.createElement("div");dtweek.style.order = "1";dtweek.style.border = "1px solid #000000";dtweek.style.fontSize = "16px";dtweek.style.padding = "0 12px";dtweek.style.backgroundColor = "#DCDEE0";dtweek.style.width = "100%";dtweek.style.margin = "0 0.3em";dtweek.style.flexShrink = "5";dtweek.style.textAlign = "center";dtweek.style.overflow = "hidden";dtweek.style.textOverflow = "ellipsis";dtweek.innerHTML = "Sunday";calda.append(dtweek);var main_cal = document.createElement("div");main_cal.id = "main_cal";main_div.append(main_cal);var main_cal_div = document.getElementById("main_cal");var calblcks = document.createElement("div");calblcks.id = "calblcks0";calblcks.style.display = "flex";calblcks.style.margin = "10px 0";calblcks.style.width = "100%";calblcks.style.textAlign = "center";calblcks.style.overflow = "hidden";calblcks.style.textOverflow = "ellipsis";calblcks.style.minHeight = "75px";calblcks.style.justifyContent = "space-evenly";main_cal_div.append(calblcks);var calblckr = document.getElementById("calblcks0");var dtcb = document.createElement("div");dtcb.id = "dtcb00";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "";dtcb.style.backgroundColor = "#f8f9fa";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb01";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "01";dtcb.style.backgroundColor = "#f8f9fa";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb02";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "02";dtcb.style.backgroundColor = "#f8f9fa";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb03";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "03";dtcb.style.backgroundColor = "#EDF4FF";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb04";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "04";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb05";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "05";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb06";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "06";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var calblcks = document.createElement("div");calblcks.id = "calblcks1";calblcks.style.display = "flex";calblcks.style.margin = "10px 0";calblcks.style.width = "100%";calblcks.style.textAlign = "center";calblcks.style.overflow = "hidden";calblcks.style.textOverflow = "ellipsis";calblcks.style.minHeight = "75px";calblcks.style.justifyContent = "space-evenly";main_cal_div.append(calblcks);var calblckr = document.getElementById("calblcks1");var dtcb = document.createElement("div");dtcb.id = "dtcb10";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "07";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb11";dtcb.style.order = "1";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "08";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb12";dtcb.style.order = "2";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "09";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb13";dtcb.style.order = "3";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "10";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb14";dtcb.style.order = "4";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "11";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb15";dtcb.style.order = "5";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "12";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb16";dtcb.style.order = "6";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "13";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var calblcks = document.createElement("div");calblcks.id = "calblcks2";calblcks.style.display = "flex";calblcks.style.margin = "10px 0";calblcks.style.width = "100%";calblcks.style.textAlign = "center";calblcks.style.overflow = "hidden";calblcks.style.textOverflow = "ellipsis";calblcks.style.minHeight = "75px";calblcks.style.justifyContent = "space-evenly";main_cal_div.append(calblcks);var calblckr = document.getElementById("calblcks2");var dtcb = document.createElement("div");dtcb.id = "dtcb20";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "14";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb21";dtcb.style.order = "2";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "15";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb22";dtcb.style.order = "4";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "16";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb23";dtcb.style.order = "6";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "17";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb24";dtcb.style.order = "8";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "18";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb25";dtcb.style.order = "10";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "19";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb26";dtcb.style.order = "12";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "20";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var calblcks = document.createElement("div");calblcks.id = "calblcks3";calblcks.style.display = "flex";calblcks.style.margin = "10px 0";calblcks.style.width = "100%";calblcks.style.textAlign = "center";calblcks.style.overflow = "hidden";calblcks.style.textOverflow = "ellipsis";calblcks.style.minHeight = "75px";calblcks.style.justifyContent = "space-evenly";main_cal_div.append(calblcks);var calblckr = document.getElementById("calblcks3");var dtcb = document.createElement("div");dtcb.id = "dtcb30";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "21";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb31";dtcb.style.order = "3";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "22";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb32";dtcb.style.order = "6";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "23";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb33";dtcb.style.order = "9";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "24";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb34";dtcb.style.order = "12";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "25";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb35";dtcb.style.order = "15";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "26";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb36";dtcb.style.order = "18";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "27";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var calblcks = document.createElement("div");calblcks.id = "calblcks4";calblcks.style.display = "flex";calblcks.style.margin = "10px 0";calblcks.style.width = "100%";calblcks.style.textAlign = "center";calblcks.style.overflow = "hidden";calblcks.style.textOverflow = "ellipsis";calblcks.style.minHeight = "75px";calblcks.style.justifyContent = "space-evenly";main_cal_div.append(calblcks);var calblckr = document.getElementById("calblcks4");var dtcb = document.createElement("div");dtcb.id = "dtcb40";dtcb.style.order = "0";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "28";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb41";dtcb.style.order = "4";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "29";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb42";dtcb.style.order = "8";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "30";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb43";dtcb.style.order = "12";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb44";dtcb.style.order = "16";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb45";dtcb.style.order = "20";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);var dtcb = document.createElement("div");dtcb.id = "dtcb46";dtcb.style.order = "24";dtcb.style.border = "1px solid #000000";dtcb.style.fontSize = "16px";dtcb.style.width = "100%";dtcb.style.margin = "0 0.3em";dtcb.innerHTML = "";dtcb.style.backgroundColor = "#ffffff";calblckr.append(dtcb);const footd = document.createElement("div");footd.id = "footd";footd.style.margin = "15px 8px";footd.style.textAlign = "right";footd.style.fontSize = "10px";footd.style.float = "right";footd.innerHTML = "Powered by My School's Events";main_div.append(footd);const foots = document.createElement("div");foots.id = "foots";foots.style.margin = "15px 8px";foots.style.textAlign = "right";foots.style.fontSize = "10px";foots.style.float = "left";foots.innerHTML = "Sign up here to receive email notifications";main_div.append(foots);};function crd_click(e){myscclose_ev();const evtget = new XMLHttpRequest();evtget.onload = function() {var resp = JSON.parse(this.response);var dt = new Date(resp.expire);var cardinfo = document.createElement("div");cardinfo.id = "eventinfo";cardinfo.style.position = "absolute";cardinfo.style.borderRadius = "5px";cardinfo.style.boxShadow = "2px 3px 7px #c5c5c5";cardinfo.style.margin = "auto";cardinfo.style.top = "30%";cardinfo.style.width = "100%";cardinfo.style.maxWidth = "500px";var spans = "";if(resp.reception==true){spans+="Reception"}if(resp.y1==true){spans+="Y1"}if(resp.y2==true){spans+="Y2"}if(resp.y3==true){spans+="Y3"}if(resp.y4==true){spans+="Y4"}if(resp.y5==true){spans+="Y5"}if(resp.y6==true){spans+="Y6"}cardinfo.innerHTML="
"+resp.card_title+"
"+resp.card_details+"
"+resp.card_notes+"
Year:"+spans+"
Date: "+dt.getDate()+"/"+(dt.getMonth() + 1)+"/"+dt.getFullYear()+"
X
";let main_div = document.getElementById("mse_topd");main_div.append(cardinfo);};evtget.open("GET", "https://myschoolsevents.com/api/v1/calevent/"+e.id, true); evtget.setRequestHeader("Content-type", "application/x-www-form-urlencoded");evtget.send();};function myscclose_ev(){if(document.getElementById("eventinfo") != null){document.getElementById("eventinfo").remove();};};function bck(e){myscclose_ev();var m = parseInt(e.getAttribute("data_bck_m"));var nm = 0;var y = parseInt(e.getAttribute("data_bck_y"));if(m < 11){ nm = m;}if(m == 11){ nm = m;};const ajbck = new XMLHttpRequest();ajbck.onload = function() { var resp = JSON.parse(this.response); if(resp.back_month == true){ document.getElementById("mse_bckbd").style.visibility = "visible"; }else{ document.getElementById("mse_bckbd").style.visibility = "hidden"; }document.getElementById("mse_mtitled").innerText = resp.calin.month + " " + resp.calin.year; if(resp.calin.month_num == 0){ document.getElementById("mse_bckbd").setAttribute("data_bck_m", 11); document.getElementById("mse_bckbd").setAttribute("data_bck_y", (resp.calin.year - 1)); document.getElementById("mse_fwdbd").setAttribute("data_fwd_m", (resp.calin.month_num)); }else if(resp.calin.month_num == 11){ document.getElementById("mse_bckbd").setAttribute("data_bck_m", (resp.calin.month_num - 1)); document.getElementById("mse_bckbd").setAttribute("data_bck_y", (resp.calin.year)); document.getElementById("mse_fwdbd").setAttribute("data_fwd_m", resp.calin.month_num); document.getElementById("mse_fwdbd").setAttribute("data_fwd_y", resp.calin.year); }else{ document.getElementById("mse_bckbd").setAttribute("data_bck_m", (resp.calin.month_num - 1)); document.getElementById("mse_bckbd").setAttribute("data_bck_y", (resp.calin.year)); document.getElementById("mse_fwdbd").setAttribute("data_fwd_m", resp.calin.month_num); }document.getElementById("main_cal").innerHTML = ""; fill_cal(resp.calrows, resp.calbs, e.id);};ajbck.open("POST", "https://myschoolsevents.com/api/v1/calnav/bck", true); ajbck.setRequestHeader("Content-type", "application/x-www-form-urlencoded");ajbck.send("m=" + nm + "&y=" + y + "&tok=aUNy1wYHC3D51zf");};function fwd(e){myscclose_ev();var m = parseInt(e.getAttribute("data_fwd_m"));var nm = 0;var y = parseInt(e.getAttribute("data_fwd_y"));if(m < 11){nm = m + 1;}if(m == 11){ nm = 0;y += 1;}const ajfwd = new XMLHttpRequest();ajfwd.onload = function() { var resp = JSON.parse(this.response); if(resp.back_month == true){ document.getElementById("mse_bckbd").style.visibility = "visible"; }else{ document.getElementById("mse_bckbd").style.visibility = "hidden"; } document.getElementById("mse_mtitled").innerText = resp.calin.month + " " + resp.calin.year; document.getElementById("mse_fwdbd").setAttribute("data_fwd_m", resp.calin.month_num); document.getElementById("mse_fwdbd").setAttribute("data_fwd_y", resp.calin.year); if(resp.calin.month_num == 0){ document.getElementById("mse_bckbd").setAttribute("data_bck_m", 11); document.getElementById("mse_bckbd").setAttribute("data_bck_y", (resp.calin.year - 1)); }else{ document.getElementById("mse_bckbd").setAttribute("data_bck_m", (resp.calin.month_num - 1)); document.getElementById("mse_bckbd").setAttribute("data_bck_y", (resp.calin.year)); }document.getElementById("main_cal").innerHTML = "";fill_cal(resp.calrows, resp.calbs);};ajfwd.open("POST", "https://myschoolsevents.com/api/v1/calnav/fwd", true); ajfwd.setRequestHeader("Content-type", "application/x-www-form-urlencoded");ajfwd.send("m=" + nm + "&y=" + y + "&tok=aUNy1wYHC3D51zf");};function fill_cal(rows, inf){myscclose_ev();var main_cal_div = document.getElementById("main_cal");for(var i=0;i {hh()});