// JAVASCRIPT FUNCTIONS // AUTOMATED SCROLLING $(document).ready(function(){ $('[href*=#]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']'); if ($target.length) { var targetOffset = $target.offset().top; $('html,body') .animate({scrollTop: targetOffset}, 900); return false; } } }); }); // rollovers function imgSwap(oImg) { var strOver = "_on"; // image to be used with mouse over var strOff = "_off"; // normal image var strImg = oImg.src; if (strImg.indexOf(strOver) != -1) { oImg.src = strImg.replace(strOver,strOff); } else { oImg.src = strImg.replace(strOff,strOver); } } // show legal warnings function toggleLegalDisplay(state) { var activeDiv = document.getElementById("footnoteDiv2"); if(state == "show") { activeDiv.style.display = "block"; } if(state == "hide") { activeDiv.style.display = "none"; } } //resize reimburement iframe// function getFrameHeight() { var mmframe = document.getElementById('mmframe'); var dataHeight = mmframe.contentWindow.getDataHeight(); mmframe.style.height = dataHeight; } function getReader(){ var confirmLeave = confirm('You have selected a link to a web site that exists outside of the MICARDIS Pro web site. Boehringer Ingelheim Pharmaceuticals, Inc. provides access to these sites as a service to MICARDIS Pro visitors, and is not responsible or liable for content and information presented within any external site.'); if (confirmLeave==true) { window.open("http://get.adobe.com/reader/"); } else { //return false; } } function openURL(newURL){ var confirmLeave = confirm('You have selected a link to a web site that exists outside of the MICARDIS Pro web site. Boehringer Ingelheim Pharmaceuticals, Inc. provides access to these sites as a service to MICARDIS Pro visitors, and is not responsible or liable for content and information presented within any external site.'); if (confirmLeave==true) { window.open(newURL); } else { //return false; } }