document.write( '
' + '
 
' + '
' ); var patientCal_gift_scriptSource_ee4c413d0a884a358ed767bd9dcded35 = ' \ var patientCal_gift_body_overflow_ee4c413d0a884a358ed767bd9dcded35 = (window.getComputedStyle) ? window.getComputedStyle(document.getElementsByTagName("body")[0]).overflow : document.getElementsByTagName("body")[0].currentStyle.overflow; \ if (window.postMessage) { \ var patientCal_gift_message_function_ee4c413d0a884a358ed767bd9dcded35 = function(event) { \ var patientCal_gift_host_ee4c413d0a884a358ed767bd9dcded35 = "https://"; \ if (event.origin.replace("https://","http://") != (patientCal_gift_host_ee4c413d0a884a358ed767bd9dcded35 + "theneuromuscularstudio.clinicsense.com").replace("https://","http://")) return; \ \ if (event.data == "patientCal_gift:showFrame") { \ \ var patientCal_gift_parameters_ee4c413d0a884a358ed767bd9dcded35 = patientCal_gift_getParameters_ee4c413d0a884a358ed767bd9dcded35(); \ var patientCal_gift_frame_ee4c413d0a884a358ed767bd9dcded35 = document.getElementsByClassName("patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35")[0]; \ var patientCal_gift_body_ee4c413d0a884a358ed767bd9dcded35 = document.getElementsByTagName("body")[0]; \ patientCal_gift_body_ee4c413d0a884a358ed767bd9dcded35.style.overflow = "hidden"; \ patientCal_gift_frame_ee4c413d0a884a358ed767bd9dcded35.style.display="block"; \ patientCal_gift_resizeFrame_ee4c413d0a884a358ed767bd9dcded35(patientCal_gift_parameters_ee4c413d0a884a358ed767bd9dcded35); \ event.source.postMessage(\'animateIn:\' + patientCal_gift_toJSON_ee4c413d0a884a358ed767bd9dcded35(patientCal_gift_parameters_ee4c413d0a884a358ed767bd9dcded35), event.origin); \ } \ if (event.data == "patientCal_gift:hideFrame") { \ var patientCal_gift_frame_ee4c413d0a884a358ed767bd9dcded35 = document.getElementsByClassName("patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35")[0]; \ var patientCal_gift_parameters_ee4c413d0a884a358ed767bd9dcded35 = patientCal_gift_getParameters_ee4c413d0a884a358ed767bd9dcded35(); \ \ document.getElementsByTagName("body")[0].style.overflow = patientCal_gift_body_overflow_ee4c413d0a884a358ed767bd9dcded35; \ event.source.postMessage(\'animateOut:\' + patientCal_gift_toJSON_ee4c413d0a884a358ed767bd9dcded35(patientCal_gift_parameters_ee4c413d0a884a358ed767bd9dcded35), event.origin); \ } \ if (event.data == "patientCal_gift:hideAnimationFinished") { \ var patientCal_gift_frame_ee4c413d0a884a358ed767bd9dcded35 = document.getElementsByClassName("patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35")[0]; \ patientCal_gift_frame_ee4c413d0a884a358ed767bd9dcded35.style.display="none"; \ } \ }; \ if (window.addEventListener) { \ window.addEventListener("message", patientCal_gift_message_function_ee4c413d0a884a358ed767bd9dcded35, false); \ window.addEventListener("resize", function(event) { patientCal_gift_resizeFrame_ee4c413d0a884a358ed767bd9dcded35(patientCal_gift_getParameters_ee4c413d0a884a358ed767bd9dcded35()); document.getElementsByClassName("patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35")[0].contentWindow.postMessage(\'resize:\' + patientCal_gift_toJSON_ee4c413d0a884a358ed767bd9dcded35(patientCal_gift_getParameters_ee4c413d0a884a358ed767bd9dcded35()), \'\' + \'https://\' + \'theneuromuscularstudio.clinicsense.com\'); }, false); \ } else if (window.attachEvent) { \ window.attachEvent("onmessage", patientCal_gift_message_function_ee4c413d0a884a358ed767bd9dcded35); \ } \ } \ '; function patientCal_gift_getParameters_ee4c413d0a884a358ed767bd9dcded35() { document.getElementsByTagName("body")[0].style.overflow = "hidden"; var frame = document.getElementsByClassName("patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35")[0]; var button = document.getElementsByClassName("patient-cal-gift-button_ee4c413d0a884a358ed767bd9dcded35")[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_gift_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_gift_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_gift_body_overflow_ee4c413d0a884a358ed767bd9dcded35; return { "browserWidth":browserWidth, "browserHeight":browserHeight, "xScroll":xScroll, "yScroll":yScroll, "xButton":xButton, "yButton":yButton, "pageWidth":pageWidth, "pageHeight":pageHeight }; }; function patientCal_gift_resizeFrame_ee4c413d0a884a358ed767bd9dcded35(parameters) { var frame = document.getElementsByClassName("patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35")[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_gift_button_click_ee4c413d0a884a358ed767bd9dcded35 = function(host) { var host = "https://"; if (screen.width <=480 || window.innerWidth <= 480) { window.open('' + host + 'theneuromuscularstudio.clinicsense.com/gift/'); } else { try { document.getElementsByClassName("patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35")[0].contentWindow.postMessage('clicked:{"size":10}', '' + host + 'theneuromuscularstudio.clinicsense.com'); } catch(err) { window.open('' + host + 'theneuromuscularstudio.clinicsense.com/gift/'); } } } function patientCal_gift_initScript_ee4c413d0a884a358ed767bd9dcded35() { if ( document.readyState !== 'complete' ) { setTimeout(patientCal_gift_initScript_ee4c413d0a884a358ed767bd9dcded35, 500); return; } var script_element = document.getElementById('patient-cal-gift-script_ee4c413d0a884a358ed767bd9dcded35'); if (typeof(script_element) != 'undefined' && script_element != null) { } else { var scriptTag = document.createElement('script'); scriptTag.type = "text/javascript"; document.getElementsByTagName('body')[0].appendChild(scriptTag); scriptTag.text = patientCal_gift_scriptSource_ee4c413d0a884a358ed767bd9dcded35; } } patientCal_gift_initScript_ee4c413d0a884a358ed767bd9dcded35(); function patientCal_gift_toJSON_ee4c413d0a884a358ed767bd9dcded35(parameters) { var json = []; for (var key in parameters) { json.push('"' + key + '":' + parameters[key]); } return '{' + json.join() + '}'; }; function patientCal_gift_initFrame_ee4c413d0a884a358ed767bd9dcded35() { if ( document.readyState !== 'complete' ) { setTimeout(patientCal_gift_initFrame_ee4c413d0a884a358ed767bd9dcded35, 500); return; } // Create the iframe only if one doesn't already exist. We can use the same frame with each button var frame_element = document.getElementsByClassName('patient-cal-gift-frame_ee4c413d0a884a358ed767bd9dcded35')[0]; if (typeof(frame_element) != 'undefined' && frame_element != null) { } else { var patientCal_gift_host_ee4c413d0a884a358ed767bd9dcded35 = 'https://'; var frameDiv = document.createElement('div'); frameDiv.innerHTML = ''; document.getElementsByTagName('body')[0].appendChild(frameDiv); } } patientCal_gift_initFrame_ee4c413d0a884a358ed767bd9dcded35();