function opwin(picname,pictext,thishref,winup,winleft)

	{

	if (!winup)	winup=0;

	if (!winleft) winleft=0;

	

	win= window.open(thishref,'page_id','width=800,height=600,resizable=yes,scrollbars=no,location=no,status=no')

	o = win.document

	o.writeln('<html>')

	o.writeln('<head>')

	o.writeln('<title>::: '+pictext+' :::</title>')



	o.writeln('<script language=\'javascript\' type=\'text/javascript\'>') 

	o.writeln('var arrTemp=self.location.href.split(\'?\');') 

	o.writeln('var picUrl = (arrTemp.length>0)?arrTemp[1]:\'\';') 

	o.writeln('var NS = (navigator.appName==\'Netscape\')?true:false;') 

	o.writeln('function FitPic(winup,winleft) {')

		

	o.writeln('if (winleft<1) winleft = (screen.width - document.images[0].width) / 2 ;')

	o.writeln('if (winup<1) winup = (screen.height - document.images[0].height) / 2 ;')

	

	o.writeln('if(winleft<0) winleft=0;')

	o.writeln('if(winup<0) winup=0;')	

	o.writeln('iWidth = document.images[0].width;')

	o.writeln('iHeight = document.images[0].height;')

	

	o.writeln('window.moveTo(winleft,winup);')

	o.writeln('self.resizeTo(iWidth + 17, iHeight + 57);')



	o.writeln('};')

	o.writeln('</script>')



	o.writeln('</head>')

	o.writeln('<body onload=\'FitPic('+winup+','+winleft+');\' style=\'padding:0;margin:0;\'>')



	o.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="height:100%;">')

	o.writeln('<tr>')

	o.writeln('<td align="center" valign="middle">')

	o.writeln('<img src="'+picname+'" alt="'+pictext+'" >')

	o.writeln('</td>')

	o.writeln('</tr>')

	o.writeln('</table>')



	o.writeln('</body>')

	o.writeln('</html>')



	o.close()

	win.focus()

	

	}

	

	/*

	o.writeln('var winleft = (screen.width - document.images[0].width) / 2 ;')

	o.writeln('var winup = (screen.height - document.images[0].height) / 2;')

	o.writeln('var winup=0;')	

	

	*/

	

	// Открытие версии для печати

function print_vers(text,title,pathcss,footinfo)

{

	win= window.open('','','width=800,height=1200,resizable=yes,scrollbars=yes,toolbar=no,menubar=yes')
	o = win.document
	o.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">')
	o.writeln('<html>')
	o.writeln('<head>')
	o.writeln('<title>::'+title+'::</title>')
	o.writeln('<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">')
	o.writeln('<link rel="stylesheet" type="text/css" href="'+pathcss+'">')
	o.writeln('</head>')
	o.writeln('<body>')
	o.writeln('<table width=100% border=0 cellspacing=0 cellpadding=0 style=height:90%>')
	o.writeln('<tr><td align="left" valign="top" style="padding:10px 10px 10px 20px;">')
	o.writeln(text)
	o.writeln(footinfo)
	o.writeln('</td></tr>')
	o.writeln('</table>')
	o.writeln('</body>')
	o.writeln('</html>')
	o.close()
	win.focus()
}

function printMapRus(img) {
	text='<div><h1>Карта проезда</h1><div style="padding: 10px 0 0 0;"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr class="cellpunktir2"><td style="height:10px;"></td></tr></table></div><div class="content"><img alt="Карта проезда к отелю" src="'+img+'"></div><div style="padding: 10px 0 0 0;"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr class="cellpunktir2"><td style="height:10px;"></td></tr></table></div>';
	print_vers(text,"Проезд - версия для печати","/DESIGN/MG/main.css","Московская горка :: Как нас найти :: Версия для печати");
}

function printMapEng(img) {
	text='<div><h1>How Get</h1><div style="padding: 10px 0 0 0;"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr class="cellpunktir2"><td style="height:10px;"></td></tr></table></div><div class="content"><img alt="Map" src="'+img+'"></div><div style="padding: 10px 0 0 0;"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr class="cellpunktir2"><td style="height:10px;"></td></tr></table></div>';
	print_vers(text,"How Get - The Print Version","/DESIGN/MG/main.css","Moskovskaya Gorka Hotel :: How Get :: The Print Version");
}