// 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('Please Note: You are now leaving a Boehringer Ingelheim Pharmaceuticals, Inc. site. Boehringer Ingelheim Pharmaceuticals, Inc. has not reviewed the contents of all the pages and sites that may be linked to this site. Boehringer Ingelheim Pharmaceuticals, Inc. is not responsible and disclaims any liability for the content of any other page or site or for any viruses or similar harmful programs that may be present on such pages or sites. Linking to any other page or site is at your own risk.'); if (confirmLeave==true) { window.open(newURL); } else { //return false; } }