/**
 *
 * @copyright 2003 iWorks Marcin Pietrzak
 * @link http://www.iworks.pl/
 * @author Marcin Pietrzak <marcin.pietrzak@iworks.pl>
 *
 * @version $Revision: 1.2 $
 * @file $RCSfile: print.js,v $
 * @date $Date: 2004/02/04 11:23:09 $
 *
 */

function printPage(navi, dir, id, path) {
	opt = 'dependent, height=500, width=770, location=0, menubar=0, resizable=1, status=0, titlebar=0, toolbar=0, scrollbars=1';
	url = 'index.pl?style=print' + '&navi=' + navi;
	if (dir) url += '?dir=' + dir;
	if (id) url += '?id=' + id;
	if (path) url += '?path=' + path;
	window.open(url, 'print', opt);
	return;
}

if (window.name == 'print') {
	if (window.location.href) {
		window.opener.location.href = window.location.href;
		window.opener.focus();
		window.close();
	}
}
