// # Version: $RCSfile: print.js,v $$Revision: 1.5 $$Date: 2006/05/30 16:15:17 $

// @param print: if true include the print.css stylesheet
/** calls the printversion of the page */
function printpopup() {
	if (location.href.indexOf('?') > -1) { 
		return popup(location.href + '&amp;print=true','printpopup');
	}
	else {
		return popup(location.href + '?print=true','printpopup');
	}
}

function printpopup_popup() {
	if (location.href.indexOf('?') > -1) { 
		loc = location.href;
		loc = loc.replace(/\?/g,"?printpopup=true&");
		//return popup(loc , 588, -1, -1, -1, false, 'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
		window.open(loc,'printpopup','width=520,height=500,left=100,top=100,scrollbars=yes,resizable=1')
	}
	else {
		//return popup(location.href + '?printpopup=true', 588, -1, -1, -1, false, 'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
		window.open(location.href + '?printpopup=true','printpopup','width=520,height=300,left=100,top=100,scrollbars=yes,resizable=0')
	}
}

var s = location.search;
var h = location.hash;
if ((s.indexOf('print=true') > -1) || (h.indexOf('print=true') > -1)){
	document.write('<link rel="stylesheet" href="/bmf/include/css/print.css"/>');
}
if ((s.indexOf('printpopup=true') > -1) || (h.indexOf('printpopup=true') > -1)){
	document.write('<link rel="stylesheet" href="/bmf/include/css/print.css"/>');
}