document.write(
'' +
'
' +
''
);
var patientCal_scriptSource_7a30054feddf4bcd888dc9ea1e7a6e46 = ' \
var patientCal_body_overflow_7a30054feddf4bcd888dc9ea1e7a6e46 = (window.getComputedStyle) ? window.getComputedStyle(document.getElementsByTagName("body")[0]).overflow : document.getElementsByTagName("body")[0].currentStyle.overflow; \
if (window.postMessage) { \
var patientCal_message_function_7a30054feddf4bcd888dc9ea1e7a6e46 = function(event) { \
var patientCal_host_7a30054feddf4bcd888dc9ea1e7a6e46 = "https://"; \
if (event.origin.replace("https://","http://") != (patientCal_host_7a30054feddf4bcd888dc9ea1e7a6e46 + "theneuromuscularstudio.clinicsense.com").replace("https://","http://")) return; \
\
if (event.data == "patientCalBook:showFrame") { \
\
var patientCal_parameters_7a30054feddf4bcd888dc9ea1e7a6e46 = patientCal_getParameters_7a30054feddf4bcd888dc9ea1e7a6e46(); \
var patientCal_frame_7a30054feddf4bcd888dc9ea1e7a6e46 = document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0]; \
var patientCal_body_7a30054feddf4bcd888dc9ea1e7a6e46 = document.getElementsByTagName("body")[0]; \
patientCal_body_7a30054feddf4bcd888dc9ea1e7a6e46.style.overflow = "hidden"; \
patientCal_frame_7a30054feddf4bcd888dc9ea1e7a6e46.style.display="block"; \
patientCal_resizeFrame_7a30054feddf4bcd888dc9ea1e7a6e46(patientCal_parameters_7a30054feddf4bcd888dc9ea1e7a6e46); \
event.source.postMessage(\'animateIn:\' + patientCal_toJSON_7a30054feddf4bcd888dc9ea1e7a6e46(patientCal_parameters_7a30054feddf4bcd888dc9ea1e7a6e46), event.origin); \
} \
if (event.data == "patientCalBook:hideFrame") { \
var patientCal_frame_7a30054feddf4bcd888dc9ea1e7a6e46 = document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0]; \
var patientCal_parameters_7a30054feddf4bcd888dc9ea1e7a6e46 = patientCal_getParameters_7a30054feddf4bcd888dc9ea1e7a6e46(); \
\
document.getElementsByTagName("body")[0].style.overflow = patientCal_body_overflow_7a30054feddf4bcd888dc9ea1e7a6e46; \
event.source.postMessage(\'animateOut:\' + patientCal_toJSON_7a30054feddf4bcd888dc9ea1e7a6e46(patientCal_parameters_7a30054feddf4bcd888dc9ea1e7a6e46), event.origin); \
} \
if (event.data == "patientCalBook:hideAnimationFinished") { \
var patientCal_frame_7a30054feddf4bcd888dc9ea1e7a6e46 = document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0]; \
patientCal_frame_7a30054feddf4bcd888dc9ea1e7a6e46.style.display="none"; \
} \
if (event.data == "patientCalBook:appointmentSaved") { \
document.dispatchEvent(new patientCal_CustomEvent_7a30054feddf4bcd888dc9ea1e7a6e46("clinicsense.booker.appointmentSaved")); \
} \
}; \
if (window.addEventListener) { \
window.addEventListener("message", patientCal_message_function_7a30054feddf4bcd888dc9ea1e7a6e46, false); \
window.addEventListener("resize", function(event) { patientCal_resizeFrame_7a30054feddf4bcd888dc9ea1e7a6e46(patientCal_getParameters_7a30054feddf4bcd888dc9ea1e7a6e46()); document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0].contentWindow.postMessage(\'resize:\' + patientCal_toJSON_7a30054feddf4bcd888dc9ea1e7a6e46(patientCal_getParameters_7a30054feddf4bcd888dc9ea1e7a6e46()), \'\' + \'https://\' + \'theneuromuscularstudio.clinicsense.com\'); }, false); \
} else if (window.attachEvent) { \
window.attachEvent("onmessage", patientCal_message_function); \
} \
} \
';
function patientCal_getParameters_7a30054feddf4bcd888dc9ea1e7a6e46() {
document.getElementsByTagName("body")[0].style.overflow = "hidden";
var frame = document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0];
var button = document.getElementsByClassName("patient-cal-book-now-button_7a30054feddf4bcd888dc9ea1e7a6e46")[0];
var browserWidth = 0, browserHeight = 0;
if( typeof( window.innerWidth ) == "number" ) {
browserWidth = window.innerWidth;
browserHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
browserWidth = document.documentElement.clientWidth;
browserHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
browserWidth = document.body.clientWidth;
browserHeight = document.body.clientHeight;
}
var pageWidth = Math.max(
Math.max(document.body.scrollWidth, document.documentElement.scrollWidth),
Math.max(document.body.offsetWidth, document.documentElement.offsetWidth),
Math.max(document.body.clientWidth, document.documentElement.clientWidth)
);
var pageHeight = Math.max(
Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
Math.max(document.body.clientHeight, document.documentElement.clientHeight)
);
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop) {
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
var patientCal_findPos = function(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
return [curleft,curtop];
};
var button_pos = patientCal_findPos(button);
var xButton = button_pos[0]+button.clientWidth/2;
var yButton = button_pos[1]+button.clientHeight/2;
document.getElementsByTagName("body")[0].style.overflow = patientCal_body_overflow_7a30054feddf4bcd888dc9ea1e7a6e46;
return {
"browserWidth":browserWidth,
"browserHeight":browserHeight,
"xScroll":xScroll,
"yScroll":yScroll,
"xButton":xButton,
"yButton":yButton,
"pageWidth":pageWidth,
"pageHeight":pageHeight
};
};
function patientCal_resizeFrame_7a30054feddf4bcd888dc9ea1e7a6e46(parameters) {
var frame = document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0];
var body = document.getElementsByTagName("body")[0];
frame.style.left = 0;
frame.style.right = 0;
frame.style.width = String((parameters.browserWidth < parameters.pageWidth) ? parameters.browserWidth : parameters.pageWidth) + 'px';
frame.style.height = String((parameters.browserHeight < parameters.pageHeight) ? parameters.browserHeight : parameters.pageHeight) + 'px';
frame.style.border = "0";
}
var patientCal_button_click_7a30054feddf4bcd888dc9ea1e7a6e46 = function(host) {
var host = 'https://';
if (screen.width <=480 || window.innerWidth <= 480) {
window.open('' + host + 'theneuromuscularstudio.clinicsense.com/book/');
} else {
try {
document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0].contentWindow.postMessage('clicked:{"size":10}', '' + host + 'theneuromuscularstudio.clinicsense.com');
} catch(err) {
window.open('' + host + 'theneuromuscularstudio.clinicsense.com/book/');
}
}
}
function patientCal_initScript_7a30054feddf4bcd888dc9ea1e7a6e46() {
if ( document.readyState !== 'complete' ) {
setTimeout(patientCal_initScript_7a30054feddf4bcd888dc9ea1e7a6e46, 500);
return;
}
var patientCal_script_element = document.getElementById('patient-cal-script_7a30054feddf4bcd888dc9ea1e7a6e46');
if (typeof(patientCal_script_element) != 'undefined' && patientCal_script_element != null) {
} else {
var patientCal_scriptTag = document.createElement('script');
patientCal_scriptTag.type = "text/javascript";
document.getElementsByTagName('body')[0].appendChild(patientCal_scriptTag);
patientCal_scriptTag.text = patientCal_scriptSource_7a30054feddf4bcd888dc9ea1e7a6e46
}
}
patientCal_initScript_7a30054feddf4bcd888dc9ea1e7a6e46();
function patientCal_toJSON_7a30054feddf4bcd888dc9ea1e7a6e46(parameters) {
var json = [];
for (var key in parameters) {
json.push('"' + key + '":' + parameters[key]);
}
return '{' + json.join() + '}';
};
function patientCal_initFrame_7a30054feddf4bcd888dc9ea1e7a6e46() {
if ( document.readyState !== 'complete' ) {
setTimeout(patientCal_initFrame_7a30054feddf4bcd888dc9ea1e7a6e46, 500);
return;
}
// Create the iframe only if one doesn't already exist. We can use the same frame with each button
var patientCal_frame_element = document.getElementsByClassName("patient-cal-book-frame_7a30054feddf4bcd888dc9ea1e7a6e46")[0];
if (typeof(patientCal_frame_element) != 'undefined' && patientCal_frame_element != null) {
} else {
var patientCal_host_7a30054feddf4bcd888dc9ea1e7a6e46 = 'https://';
var patientCal_frameDiv = document.createElement('div');
patientCal_frameDiv.innerHTML = '';
document.getElementsByTagName('body')[0].appendChild(patientCal_frameDiv);
}
}
patientCal_initFrame_7a30054feddf4bcd888dc9ea1e7a6e46();
function patientCal_CustomEvent_7a30054feddf4bcd888dc9ea1e7a6e46( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}