Laser Medicine

'; } targetElm.innerHTML = targetHTML; var currentProduct = ''; function showProduct(idx) { var carousel = jQuery('.owl-carousel').data('owl.carousel'); carousel.to(idx); currentProduct = targetArray[idx]; var product3D = document.getElementById('product-3d'); product3D.src = 'https://lysistech.com/3d/?productID=' + currentProduct.ID + '&lang=' + 'en'; } jQuery(document).ready(function($) { var owl = $('.owl-carousel'); owl.owlCarousel({ nav: false, dots: false, loop:true, margin:20, items:3, lazyLoad:true, center:true, mouseDrag:false}); var catSelector = document.getElementById('cat-selector'); var topSelector = document.getElementById('dyn-margin-top'); var prodViewer = document.getElementById('product-3d'); function calcProdViewerHeight() { var subtractHeight = parseFloat(topSelector.style.marginTop) + topSelector.clientHeight + catSelector.clientHeight; var podViewerHeight = (window.innerHeight - subtractHeight) +'px'; prodViewer.style.minHeight = podViewerHeight; } calcProdViewerHeight(); window.addEventListener('resize', function(event) { calcProdViewerHeight(); }); showProduct(currentIDX); }); window.onmessage = function(e) { if (e.data == 'moreInfo') { var optionToPreselect = jQuery('.productSelectionInForm option[value="' + currentProduct.code + '"]'); if (optionToPreselect) optionToPreselect.prop('selected', true); jQuery('#exampleModalCenter').modal('toggle'); } if (e.data == 'scrollToTable') { jQuery('html, body').animate({ scrollTop: jQuery("#tableProd").offset().top }, 2000); } };