function viewPhoto(url, title)
{
 	win=window.open(url, 'win', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=100,height=100');
	win.document.open();
	win.document.write('<html><head><title>'+title+'</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></head><body style="margin:0; padding:0px;" onLoad="self.resizeTo(document.images.photo.width+40,document.images.photo.height+80); self.moveTo((screen.width-document.images.photo.width)/2, (screen.height-document.images.photo.height)/2); focus();">');
	win.document.write('<table width=100% height=100%><tr><td valign=middle align=center>');
	win.document.write('<img name="photo" src="'+url+'">');
	win.document.write('</td></tr></table>');
	win.document.write('</body></html>');
	win.document.close();
}

function loadBG(page)
{
	var pic = "";
	switch (page)
	{
		case 1:	pic = "bg_about.jpg"; break;
		case 2:	pic = "bg_objects.jpg"; break;
		case 3:	pic = "bg_news.jpg"; break;
		case 4:	pic = "bg_publ.jpg"; break;
		case 5:	pic = "bg_partners.jpg"; break;
		case 6:	pic = "bg_contacts.jpg"; break;
		default: pic = "bg_about.jpg"; break;
	}
	var mt = document.getElementById("main_table1");
	mt.style.background = "transparent url(../images/"+ pic + ") no-repeat left bottom";
}
