function printPage() {
	if (document.getElementById('content')) {
	  var printerWinOption="menubar=yes,toolbar=no,scrollbars=yes,resizable=yes,location=no,left=100,width=700,height=400,top=20,left=20";
 	  var printerWinHTML = document.getElementById('content').innerHTML;
	  var styleBlock = "";
	  if(document.getElementsByTagName('style')[0]) {
	   styleBlock = document.getElementsByTagName('style')[0].innerHTML;
	   }
	   var printerWin=window.open("","",printerWinOption);
       printerWin.document.open();
       printerWin.document.write('<html><head>');
	   	 printerWin.document.write('<link rel="stylesheet" type="text/css" href="/templatedata/imports/HTML/PPR/ppr/support/ppr.css">');
	     printerWin.document.write('<style>' + styleBlock + '</style>');
	     printerWin.document.write('</head><body>');
   	   printerWin.document.write('<form style="float:right"><input type="button" value="Print this page" onclick="window.print()"><input type="button" value="Close" onclick="window.close()" style="margin-left:12px"></form><img src="/ppr/images/logo.gif" alt="Guidant" width="129" height="81" style="margin-bottom:10px">');
	     printerWin.document.write(printerWinHTML);
       printerWin.document.write('</body></html>'); 
       printerWin.document.close(); 
       printerWin.focus(); 
	}
	else {
		window.print();
	}
}
function selMenu(choice) {
	var href = location.href;
	var snParm = href.indexOf('ppr')+4;
	var length2 = href.length;
	//alert(href);
	var postPPRtext = href.substring(snParm);
	var indexOfSlash = postPPRtext.indexOf('/');
	//alert(indexOfSlash);
	//return false;
	var prependDir = '../../';
	if(indexOfSlash == -1 ){//means we are at the home page.OR some page near the root.
		prependDir = '';
	}
	var root = choice[choice.selectedIndex].value;
	if (root.indexOf('/') != -1) {
		root = prependDir + root;	
		var path = "";
		if(root.indexOf('*') != -1) {
			path += root.substring(0,root.length-1) + "_surv.shtml?imd";
		}
		else {
			path += root + "_surv.shtml";
			//alert("Path: "+path);
		}
		location.href = path; 	
	}
	else {
		return false;
	}
}
// checking URL
function checkIMD() {	
	var url = location.href;
	if(url.indexOf('?imd') != -1) {
		popIMD();
	}
}
function popIMD() {
	var winIMD;
	var winLeft = (screen.width - 400) / 2;
	var winUp = (screen.height - 180) / 2;
	
	winIMD = window.open('../../imd.html','imdWin','menubar=0,scrollbars=0,resizable=0,locationbar=0,statusbar=0,left=' + winLeft + ',top=' + winUp + ',height=180,width=400');
	winIMD.focus();
}
function linkAlert(url) {
	if (confirm('You have just clicked on a link that will take you from the Boston Scientific website to another site.\n\nBoston Scientific does not review or monitor the content on the linked site and is not responsible for any communication or transactions you might have with them. Your use of the linked site is subject to the terms and conditions, including the privacy policy, of the linked site.')) {
	location.href=url;
	}
}

window.onload = checkIMD;
