﻿var a = new String("<html>\
			<head>\
			<title>Хеликс</title> \
			<link rel='stylesheet' href='/css/d.css'> \
			<link rel='stylesheet' href='/css/c.css'> \
			</head> \
			<body> \
			<form action=''> \
			<table> \
			<tr><td>");
		
	var b = new String("</td></tr> \
			</table> \
			<script language='JavaScript'> \
			function load() { \
				window.print(); window.close(); \
			} \
			<\/script> \
			</form> \
			</body> \
			</html>");
	
	function launchWnd() {
	
		var wnd = null;
		var call = '<table width="100%"  border="0" cellpadding="5" cellspacing="0"><tr><td width="70"><img src="/i/logo_small.gif" /></td><td valign="middle"><p style="font-size: 14pt;">Лабораторная служба "Хеликс"</p></td></tr></table> \
					'+document.getElementById('call').outerHTML;
		
		try{
			wnd = popup("", "wnd", 640, 480);
			
			if (wnd) {
				wnd.focus();
			} else {
				alert('Отключите опцию блокирования Java Script в настройках браузера.');
				return;
			}
				
			wnd.document.body.innerHTML = '';
			wnd.document.open();
			wnd.document.write(a+call+tbarr[cTab]+b);
			wnd.document.close();
			
			var lp = new Object();
			lp['p'] = window;
			wnd.launchParameters = lp;
			wnd.load();	
		} catch (ex) {
			if(wnd) wnd.close();
		}
	}
	
	<!--
	var isW;
		isW=(document&&document.body.clientWidth&&document.body.clientWidth>=895&&document.getElementById);
	//-->
	
	function printCenterInfo(){
		launchWnd();
		return;
	}
	
	var fW = null;
	
	function showCenterFoto(f){
	
		var fWs = new String("<html>\
			<head>\
			<title>Фотографии Хеликс</title> \
			</head> \
			<body> \
			<form action=''> \
			<table width='100%' height='100%'> \
			<tr><td valign='middle' align='center'> \
			<img id='foto' src='' alt='' /> \
			</td></tr> \
			</table> \
			</form> \
			</body> \
			</html>");

		try{
			if (fW && ! fW.closed) {
				fW.focus();
			} else {
				fW = popup("", "wnd", 690, 530);
				fW.document.body.innerHTML = '';
				fW.document.open();
				fW.document.write(fWs);
				fW.document.close();			
			}
			fW.document.getElementById('foto').src = '/i/f/'+f+'-640.jpg';			
		} catch (ex) {
			if(fW) fW.close();
		}		
		
		
	}