document.write(
'' +
'
' +
''
);
var patientCal_scriptSource_8ed1f0b3ca8a4f1ab2792b5cbba984ed = ' \
var patientCal_body_overflow_8ed1f0b3ca8a4f1ab2792b5cbba984ed = (window.getComputedStyle) ? window.getComputedStyle(document.getElementsByTagName("body")[0]).overflow : document.getElementsByTagName("body")[0].currentStyle.overflow; \
if (window.postMessage) { \
var patientCal_message_function_8ed1f0b3ca8a4f1ab2792b5cbba984ed = function(event) { \
var patientCal_host_8ed1f0b3ca8a4f1ab2792b5cbba984ed = "https://"; \
if (event.origin.replace("https://","http://") != (patientCal_host_8ed1f0b3ca8a4f1ab2792b5cbba984ed + "wecaremassageandwellness.clinicsense.com").replace("https://","http://")) return; \
\
if (event.data == "patientCalBook:showFrame") { \
\
var patientCal_parameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed = patientCal_getParameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed(); \
var patientCal_frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed = document.getElementsByClassName("patient-cal-book-frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[0]; \
var patientCal_body_8ed1f0b3ca8a4f1ab2792b5cbba984ed = document.getElementsByTagName("body")[0]; \
patientCal_body_8ed1f0b3ca8a4f1ab2792b5cbba984ed.style.overflow = "hidden"; \
patientCal_frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed.style.display="block"; \
patientCal_resizeFrame_8ed1f0b3ca8a4f1ab2792b5cbba984ed(patientCal_parameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed); \
event.source.postMessage(\'animateIn:\' + patientCal_toJSON_8ed1f0b3ca8a4f1ab2792b5cbba984ed(patientCal_parameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed), event.origin); \
} \
if (event.data == "patientCalBook:hideFrame") { \
var patientCal_frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed = document.getElementsByClassName("patient-cal-book-frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[0]; \
var patientCal_parameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed = patientCal_getParameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed(); \
\
document.getElementsByTagName("body")[0].style.overflow = patientCal_body_overflow_8ed1f0b3ca8a4f1ab2792b5cbba984ed; \
event.source.postMessage(\'animateOut:\' + patientCal_toJSON_8ed1f0b3ca8a4f1ab2792b5cbba984ed(patientCal_parameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed), event.origin); \
} \
if (event.data == "patientCalBook:hideAnimationFinished") { \
var patientCal_frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed = document.getElementsByClassName("patient-cal-book-frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[0]; \
patientCal_frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed.style.display="none"; \
} \
if (event.data == "patientCalBook:appointmentSaved") { \
document.dispatchEvent(new patientCal_CustomEvent_8ed1f0b3ca8a4f1ab2792b5cbba984ed("clinicsense.booker.appointmentSaved")); \
} \
}; \
if (window.addEventListener) { \
window.addEventListener("message", patientCal_message_function_8ed1f0b3ca8a4f1ab2792b5cbba984ed, false); \
window.addEventListener("resize", function(event) { patientCal_resizeFrame_8ed1f0b3ca8a4f1ab2792b5cbba984ed(patientCal_getParameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed()); document.getElementsByClassName("patient-cal-book-frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[0].contentWindow.postMessage(\'resize:\' + patientCal_toJSON_8ed1f0b3ca8a4f1ab2792b5cbba984ed(patientCal_getParameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed()), \'\' + \'https://\' + \'wecaremassageandwellness.clinicsense.com\'); }, false); \
} else if (window.attachEvent) { \
window.attachEvent("onmessage", patientCal_message_function); \
} \
} \
';
function patientCal_getParameters_8ed1f0b3ca8a4f1ab2792b5cbba984ed() {
document.getElementsByTagName("body")[0].style.overflow = "hidden";
var frame = document.getElementsByClassName("patient-cal-book-frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[0];
var button = document.getElementsByClassName("patient-cal-book-now-button_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[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_8ed1f0b3ca8a4f1ab2792b5cbba984ed;
return {
"browserWidth":browserWidth,
"browserHeight":browserHeight,
"xScroll":xScroll,
"yScroll":yScroll,
"xButton":xButton,
"yButton":yButton,
"pageWidth":pageWidth,
"pageHeight":pageHeight
};
};
function patientCal_resizeFrame_8ed1f0b3ca8a4f1ab2792b5cbba984ed(parameters) {
var frame = document.getElementsByClassName("patient-cal-book-frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[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_8ed1f0b3ca8a4f1ab2792b5cbba984ed = function(host) {
var host = 'https://';
if (screen.width <=480 || window.innerWidth <= 480) {
window.open('' + host + 'wecaremassageandwellness.clinicsense.com/book/');
} else {
try {
document.getElementsByClassName("patient-cal-book-frame_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[0].contentWindow.postMessage('clicked:{"size":10}', '' + host + 'wecaremassageandwellness.clinicsense.com');
} catch(err) {
window.open('' + host + 'wecaremassageandwellness.clinicsense.com/book/');
}
}
}
function patientCal_initScript_8ed1f0b3ca8a4f1ab2792b5cbba984ed() {
if ( document.readyState !== 'complete' ) {
setTimeout(patientCal_initScript_8ed1f0b3ca8a4f1ab2792b5cbba984ed, 500);
return;
}
var patientCal_script_element = document.getElementById('patient-cal-script_8ed1f0b3ca8a4f1ab2792b5cbba984ed');
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_8ed1f0b3ca8a4f1ab2792b5cbba984ed
}
}
patientCal_initScript_8ed1f0b3ca8a4f1ab2792b5cbba984ed();
function patientCal_toJSON_8ed1f0b3ca8a4f1ab2792b5cbba984ed(parameters) {
var json = [];
for (var key in parameters) {
json.push('"' + key + '":' + parameters[key]);
}
return '{' + json.join() + '}';
};
function patientCal_initFrame_8ed1f0b3ca8a4f1ab2792b5cbba984ed() {
if ( document.readyState !== 'complete' ) {
setTimeout(patientCal_initFrame_8ed1f0b3ca8a4f1ab2792b5cbba984ed, 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_8ed1f0b3ca8a4f1ab2792b5cbba984ed")[0];
if (typeof(patientCal_frame_element) != 'undefined' && patientCal_frame_element != null) {
} else {
var patientCal_host_8ed1f0b3ca8a4f1ab2792b5cbba984ed = 'https://';
var patientCal_frameDiv = document.createElement('div');
patientCal_frameDiv.innerHTML = '';
document.getElementsByTagName('body')[0].appendChild(patientCal_frameDiv);
}
}
patientCal_initFrame_8ed1f0b3ca8a4f1ab2792b5cbba984ed();
function patientCal_CustomEvent_8ed1f0b3ca8a4f1ab2792b5cbba984ed( 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;
}