Walk-Ins Welcome
No appointment necessary at our center
Save Your Spot
How Can We Help?
PATIENT SERVICES
COVID-19 SERVICES
TELECARE
EMPLOYER RESOURCES
PATIENT RESOURCES
ABOUT US
CALL US | (910) 304-0112
Don't wait to get the medical attention you need.
CALL US TODAY | (910) 304-0112
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Accept All
Cookie Settings
`;
}
// Function to check if the reviews placeholder is in the viewport
function isInViewport(element) {
const rect = element.getBoundingClientRect();
return rect.top <= window.innerHeight && rect.bottom >= 0;
}
// Function to load the deferred scripts
const loadDeferredScripts = () => {
// Prevent loading multiple times
if (scriptsLoaded) return;
scriptsLoaded = true;
const reviewsPlaceholder = document.getElementById('reviews-placeholder');
// Check if reviews-placeholder exists and if it's in the viewport
if (reviewsPlaceholder && isInViewport(reviewsPlaceholder)) {
loadReviews(); // Load the reviews widget if in viewport
}
// Only proceed if the map container is found
var mapContainer = document.getElementById("mymapSize");
if (mapContainer) {
var iframe = document.createElement('iframe');
iframe.src = mapContainer.getAttribute('data-src');
iframe.frameborder = "0";
iframe.allowfullscreen = true;
mapContainer.innerHTML = ''; // Clear existing content
mapContainer.appendChild(iframe); // Add the iframe
}
// Load AudioEye script
window.__AudioEyeSiteHash = "d0653017abc63c2eee0fca531bc4d5a2";
var audioEye = document.createElement("script");
audioEye.src = "https://wsmcdn.audioeye.com/aem.js";
audioEye.type = "text/javascript";
audioEye.setAttribute("async", "");
document.getElementsByTagName("body")[0].appendChild(audioEye);
// Load FontAwesome Stylesheets
var css1 = document.createElement("link");
css1.href = "https://afc-assets.cloudbackend.net/stat/cache/fonts/FontAwesome5-11-2/css/all.min.css";
css1.rel = "stylesheet";
css1.type = "text/css";
document.head.appendChild(css1);
var css2 = document.createElement("link");
css2.href = "https://afc-assets.cloudbackend.net/stat/cache/fonts/fontawesome5-15-1/css/all.min.css";
css2.rel = "stylesheet";
css2.type = "text/css";
document.head.appendChild(css2);
// Load Slick Carousel Styles
var slickCSS = document.createElement("link");
slickCSS.href = "https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css";
slickCSS.rel = "stylesheet";
slickCSS.type = "text/css";
document.getElementsByTagName('head')[0].appendChild(slickCSS);
var slickThemeCSS = document.createElement("link");
slickThemeCSS.href = "https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick-theme.css";
slickThemeCSS.rel = "stylesheet";
slickThemeCSS.type = "text/css";
document.getElementsByTagName("head")[0].appendChild(slickThemeCSS);
// Load EmbedSocial Script (only once)
const existingScript = document.querySelector('script[src="https://embedsocial.com/cdn/ht.js"]');
if (!existingScript) {
var embedScript = document.createElement("script");
embedScript.async = true;
embedScript.src = "https://embedsocial.com/cdn/ht.js";
document.getElementsByTagName("head")[0].appendChild(embedScript);
}
};
// Load deferred scripts after user interacts with the page
window.addEventListener("scroll", loadDeferredScripts, { once: true });
window.addEventListener("mousemove", loadDeferredScripts, { once: true });
window.addEventListener("touchstart", loadDeferredScripts, { once: true });