// GLOBAL JAVASCRIPT/JQUERY FUNCTIONS
// IPI show/hide
function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
}
// print the questions from the cookie
function printQuestions(elementId)
{
var s = "
"
var x = readCookie('micardisqkcookie');
if(x!='~')
{
var mySplitResult = x.split("~");
for(var i=mySplitResult.length-1; i>0 ;i--)
{
if(mySplitResult[i]!="")
{
var temp2 = removeComma((mySplitResult[i]));
while(isComma(temp2)==true)
{
temp2 = removeComma(temp2);
}
s = s + "- "+temp2+"
";
}
}
}
s = s+"
";
var oIframe = document.getElementById('ifrmPrint');
var oContent = document.getElementById('divP').innerHTML;
var oDoc = (oIframe.contentWindow || oIframe.contentDocument);
if (oDoc.document)
oDoc = oDoc.document;
oDoc.write("My Questions");
oDoc.write("");
oDoc.write(s + "");
oDoc.close();
}
// print just the questions from the question keeper
function printQK(elementId)
{
var printContent = document.getElementById(elementId);
var windowUrl = 'about:blank';
var windowName = 'Print' + new Date().getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
// font resizer
$(document).ready(function() {
fontResizer('11px','12px','13px');
});
// print page
function printWindow(){
bV = parseInt(navigator.appVersion)
if (bV >= 4) window.print()
}
// page scroll
$(document).ready(function() {
$('a[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)
}
// third party link open
function openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function goToOutside(site){
if(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 to 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."))
openBrWindow(site,'Micardis','toolbar=yes,menubar=no,scrollbars=yes,resizable=yes,width=770,height=500');
}
/*
function goOut(){
return 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 to the content of any other page 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.");
}
function disclaimer_links() {
var e = window.event;
var elements = (document.links) ? document.links : document.getElementsByTagName("a");
for (var i = 0; i < elements.length; ++i) {
if (elements[i].href && elements[i].href.search(/.fda.gov/) != -1) {
elements[i].onclick = function() { return goOut(); };
}
}
}
window.onload = disclaimer_links;
*/