function showPrintButton() {
	var wrapper = document.createElement('div');
	wrapper.className = 'noprint';
	var button = document.createElement('input');
	button.type='button';
	button.value='Напечатать';
	button.className='terminal-button-light';
	button.onclick=function(){window.print()};
	if (button.captureEvents) button.captureEvents(Event.CLICK);
	
	var buttonDownload = document.createElement('input');
	buttonDownload.type='button';
	buttonDownload.value='Сохранить';
	buttonDownload.className='terminal-button-light';
	buttonDownload.onclick=function(){top.location=window.opener.downloadUrl};
	if (button.captureEvents) button.captureEvents(Event.CLICK);
	
	var separator = document.createElement('div');
	separator.className="separator";
	
	wrapper.appendChild(separator);
	wrapper.appendChild(button);
	wrapper.appendChild(buttonDownload);

	var body = document.getElementsByTagName('body')[0];
	body.insertBefore(wrapper, body.children[0]);
}

window.onload = showPrintButton;
