{"id":22,"date":"2016-05-15T00:24:05","date_gmt":"2016-05-15T05:24:05","guid":{"rendered":"http:\/\/www.shackleislandchurchofchrist.org\/?page_id=22"},"modified":"2026-01-24T23:37:43","modified_gmt":"2026-01-25T05:37:43","slug":"home-2","status":"publish","type":"page","link":"https:\/\/www.shackleislandchurchofchrist.org\/","title":{"rendered":"Home"},"content":{"rendered":"<p id=\"special_event_id\"><\/p>\n<script src=\"wp-includes\/js\/ServerDate.js\"><\/script>\r\n<script>\r\n\r\nasync function loadPage(url) {\r\n    const response = await fetch(url);\r\n    const data = await response.text();\r\n    return data;\r\n}\r\n\r\nxmlhttp=new XMLHttpRequest();\r\nxmlhttp.open(\"GET\", \"\/webcam\/WebcamSchedule\/WebcamSchedule.json\", false);\r\nxmlhttp.send();\r\nvar text = xmlhttp.responseText;\r\n\r\nvar livestreamtext = \"until next live stream event.\";\r\nvar buffertime_in_minutes = 4;\r\nvar buffertime = buffertime_in_minutes * (1000*60);\r\n\r\nvar alldata = JSON.parse(text);\r\nvar special_event_html = alldata[\"special_event\"];\r\nvar streamevents = alldata[\"events\"];\r\n\t\r\nvar count = 0;\r\n\r\n\r\nif(window.attachEvent) {\r\n    window.attachEvent('onload', myOnLoadFunction);\r\n} else {\r\n    if(window.onload) {\r\n        var curronload = window.onload;\r\n        var newonload = function(evt) {\r\n            curronload(evt);\r\n            myOnLoadFunction(evt);\r\n        };\r\n        window.onload = newonload;\r\n    } else {\r\n        window.onload = myOnLoadFunction;\r\n    }\r\n}\r\n\r\n\r\n\r\nfunction pad(num, size)\r\n{\r\n    var s = \"000000000\" + num;\r\n    return s.substr(s.length-size);\r\n}\r\n\r\nfunction notzero(num, suffix, txt)\r\n{\r\n\r\n  if ((txt === \"\") && (num == 0)) return \"\";\r\n  var ss = \"<b>\" + num + \"<\/b>\" + \" \" + suffix;\r\n  if (num != 1) ss += \"s\";\r\n  ss += \" \";\r\n  return ss;\r\n}\r\n\r\nvar Central_to_UTC_Offset;\r\n\r\nfunction Get_Central_UTC_Offset()\r\n{\r\n  if (Central_to_UTC_Offset === undefined)\r\n  {\r\n    let xhr = new XMLHttpRequest();\r\n    xhr.open('GET', '\/webcam\/Central_UTC_Offset.php', false);\r\n    try \r\n    {\r\n      xhr.send();\r\n      if (xhr.status != 200) \r\n      { \r\n        Central_to_UTC_Offset = -new Date().getTimezoneOffset()*60;\r\n      } \r\n      else \r\n      {\r\n        Central_to_UTC_Offset = parseInt(xhr.response);\r\n      }\r\n    } \r\n    catch(err) \r\n    { \r\n      alert(\"Time sync failed\"); \r\n    }\r\n  }\r\n  return Central_to_UTC_Offset;\r\n}\r\n\r\nfunction myOnLoadFunction()\r\n{\r\n  var d = ServerDate;\r\n  var daytime = d.getUTCDay() * (1000 * 60 * 60 * 24) + d.getUTCHours() * (1000 * 60 * 60) + d.getUTCMinutes() * (1000 * 60) + d.getUTCSeconds() * 1000;\r\n  daytime = daytime + Get_Central_UTC_Offset()*1000;\r\n  var txt=\"\";\r\n  var distance=8 * (1000 * 60 * 60 * 24);\r\n  var nextindex=0;\r\n\r\n  var timer_element = document.getElementById(\"streaminfo_id\");\r\n  var link_element = document.getElementById(\"link_id\");\r\n  if (special_event_html)\r\n  {\r\n  \tvar special_event_element = document.getElementById(\"special_event_id\");\r\n\tspecial_event_element.innerHTML = special_event_html;\r\n  }\r\n\r\n\r\n  for(var ii = 0; ii < streamevents.length; ii++)\r\n  {\r\n    var obj = streamevents[ii];\r\n    if (obj.Active)\r\n    {\r\n      var hourmin = obj.StartTime.split(\":\");\r\n      var obj_daytime = Number(obj.DayOfWeek) * (1000 * 60 * 60 * 24) + Number(hourmin[0]) * (1000 * 60 * 60) + Number(hourmin[1]) * (1000 * 60);\r\n      var hourmin = obj.EndTime.split(\":\");\r\n      var obj_daytime_end = Number(obj.DayOfWeek) * (1000 * 60 * 60 * 24) + Number(hourmin[0]) * (1000 * 60 * 60) + Number(hourmin[1]) * (1000 * 60);\r\n\/\/      var obj_daytime_end = obj_daytime + Number(obj.DurationInMinutes)*(1000*60);\r\n      var obj_diff_start = obj_daytime - daytime;\r\n      var obj_diff_end = obj_daytime_end - daytime;\r\n      if (((obj_diff_start - buffertime) < 0) && (obj_diff_end > 0))\r\n      {\r\n    \t  \/\/ currently in event\r\n          var filename = d.getFullYear() + '-' + pad(d.getMonth() + 1,2) + '-' + pad(d.getDate(),2) + '_' + obj.Prefix;\r\n          document.getElementById(\"streaminfo_id\").style.display = \"none\";\r\n          link_element.style.display = \"block\";\r\n          link_element.href = \"https:\/\/www.shackleislandchurchofChrist.org\/webcam\/\" + filename + \"\/index.html\";\r\n          setTimeout(myOnLoadFunction, 1000*30);\r\n          return;\r\n\r\n      }\r\n      if (obj_diff_start < 0) obj_diff_start += 7 * (1000 * 60 * 60 * 24);\r\n      if (obj_diff_start < distance)\r\n      {\r\n    \t  distance = obj_diff_start;\r\n          nextindex = ii;\r\n      }\r\n      txt = txt + obj_daytime + \"   \" + obj_diff_start + \"<br>\";\r\n    }\r\n  }\r\n\r\n  var cd_days = Math.floor(distance \/ (1000 * 60 * 60 * 24));\r\n  var cd_hours = Math.floor((distance % (1000 * 60 * 60 * 24)) \/ (1000 * 60 * 60));\r\n  var cd_minutes = Math.floor((distance % (1000 * 60 * 60)) \/ (1000 * 60));\r\n  var cd_seconds = Math.floor((distance % (1000 * 60)) \/ 1000);\r\n\r\n  link_element.style.display = \"none\";\r\n\r\n  txt = notzero(cd_days, \"day\", \"\");\r\n  txt += notzero(cd_hours, \"hour\", txt);\r\n  txt += notzero(cd_minutes, \"minute\", txt);\r\n  if (distance > 10*(1000*60))\r\n  {\r\n    txt += livestreamtext;\r\n    timer_element.innerHTML = txt;\r\n    timer_element.style.display = \"block\";\r\n    if (distance > 11*(1000*60))\r\n    {\r\n       if (cd_seconds > 5) interval = cd_seconds*1000;\r\n       else interval = 1000*60;\r\n    }\r\n    else interval = 1000;\r\n    setTimeout(myOnLoadFunction, interval);\r\n  }\r\n  else\r\n  {\r\n    txt += notzero(cd_seconds, \"second\", \"true\");\r\n    txt += livestreamtext;\r\n    txt += \"<br>(Link to stream will appear <b>\" + buffertime_in_minutes + \"<\/b> minutes before event)\";\r\n    timer_element.innerHTML = txt;\r\n    timer_element.style.display = \"block\";\r\n\r\n    setTimeout(myOnLoadFunction, 1000);\r\n  }\r\n}\r\n<\/script>\r\n\n<p id=\"streaminfo_id\" style=\"display: block; text-align: center;\">\n<p><a id=\"link_id\" style=\"display: none; text-align: center; font-size: large; background-color: powderblue; font-weight: bold;\" href=\"tmp\" data-darkreader-inline-bgcolor=\"\">***LIVE NOW! Click Here to watch!***<\/a><\/p>\n<p>Shackle Island currently meets for Sunday morning class at 9:30a.m., Sunday morning worship services at 10:30 a.m., Sunday evening class at 6:00 p.m., and for Wednesday night class at 6:00 p.m.<\/p>\n<p>To access the live streams (and archives of past streams), click <a href=\"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/sermons\/\">HERE.<\/a><\/p>\n<p>Please check out the <a href=\"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/mission-work\/\">Mission Work<\/a> page to keep updated on the many active works supported by the congregation at Shackle Island.<\/p>\n<header class=\"entry-header\"><\/header>\n<p>We welcome visitors!<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>***LIVE NOW! Click Here to watch!*** Shackle Island currently meets for Sunday morning class at 9:30a.m., Sunday morning worship services at 10:30 a.m., Sunday evening class at 6:00 p.m., and &#8230; <span class=\"more\"><a class=\"more-link\" href=\"https:\/\/www.shackleislandchurchofchrist.org\/\">[Read more&#8230;]<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["entry","page","publish","author-wpuser","post-22"],"_links":{"self":[{"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/pages\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":113,"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/pages\/22\/revisions"}],"predecessor-version":[{"id":5709,"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/pages\/22\/revisions\/5709"}],"wp:attachment":[{"href":"https:\/\/www.shackleislandchurchofchrist.org\/index.php\/wp-json\/wp\/v2\/media?parent=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}