var xhttp = new XMLHttpRequest(); function showParish(ID) { xhttp.abort(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { sections=this.responseText.split("!CC!") document.getElementById("cd-Parish-Info").innerHTML=sections[1]; } }; xhttp.open("POST", "https://catholicdirectory.org/snippets/directory/sectionsforweb/1-allparishes.asp", true); xhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); xhttp.send("PageAction=GetContent&PublicationsSectionID=1023&GroupID="+ID+"&Preview=preview"); } function showPastoralAreaOLD(ID) { xhttp.abort(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { sections=this.responseText.split("!CC!") document.title=sections[0]+" - Portsmouth Diocese, Catholic Diocese of Portsmouth"; document.getElementById("CD_PastoralAreas").innerHTML=sections[2]; //showMassTimes(sections[3]); } }; xhttp.open("POST", "https://catholicdirectory.org/snippets/directory/pastoral-area.asp", true); xhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); xhttp.send("PageAction=GetContent&PublicationsSectionID=1023&Pastoral-Area="+ID+"&Preview=preview"); } function showPastoralAreaOld2(ID) { xhttp.abort(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { //sections=this.responseText.split("!CC!") //document.title=sections[0]+" - Portsmouth Diocese, Catholic Diocese of Portsmouth"; //document.getElementById("CD_PastoralAreas").innerHTML=sections[2]; //showMassTimes(sections[3]); document.getElementById("CD_PastoralAreas").innerHTML="
"; if(!document.getElementById("Calendarjavascriptfile")) { var script = document.createElement("script"); script.src = "js/"+url+".js"; script.id=url+"-javascriptfile"; // append and execute script document.documentElement.firstChild.appendChild(script); } eval(this.responseText); } }; xhttp.open("POST", "https://catholicdirectory.org/snippets/directory/calendar.asp", true); xhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); xhttp.send("Pastoral-Area="+ID+"&DisplayMode=noBox&dayView=List&BackgroundColour=No&MaxRowsPerDay=6"); } function showPastoralArea(ID) { document.getElementById("CD_PastoralAreas").innerHTML=""; if(!document.getElementById("Calendarjavascriptfile")) { var script = document.createElement("script"); script.src = "https://catholicdirectory.org/snippets/directory/calendar.asp?Pastoral-Area="+ID+"&DisplayMode=noBox&dayView=List&BackgroundColour=No&MaxRowsPerDay=6"; script.id="Calendarjavascriptfile"; document.documentElement.firstChild.appendChild(script); } showCalendar(); } function showMassTimes(str) { MassTimes=str.split("!CC_sep_CC!") for(i=0;i>MassTimes.length;i++) { //document.getElementById("CD_PastoralAreas").innerHTML=str; MassSections=MassTimes[i].split("!") document.getElementById("CD_PastoralAreas").innerHTML="test"; document.getElementById("CD_PastoralAreas").innerHTML=str; //DayOfWeek&!"&Frequency&"!"&DateTimestart&"!"&DateTimeEnd&"!"&RS2("Building")&", "&RS2("Town")&"!"&Category&"!"&RS("ID")&"!"&RS("GroupName")&","&RS("AreaServed") var M=document.createElement("div"); M.classList.add(MassSections[5]); M.classList.add("G"+MassSections[6]); M.title=MassSections[5]+': '+MassSections[2]+MassSections[3]+" - "+MassSections[4]+" - "+MassSections[7]; DayOfWeek=MassSections[0]; Frequency=MassSections[1]; var iframe = document.getElementById('cd-Pastoral-Area-Calendar'); var innerDoc = iframe.contentDocument || iframe.contentWindow.document; days=innerDoc.getElementsByClassName("d"+DayOfWeek) for(j=0;j