function toggleSubMenu(menuId)
{
	var menuElement=$('menu' + menuId);
	var menuItem=$('item' + menuId);
	if (menuElement.style.display == 'none')
	{
		FSite2.showElement(menuElement);
		FSite2.setElementClass(menuItem, 'selected');
	}
	else
	{
		FSite2.hideElement(menuElement);
		FSite2.unsetElementClass(menuItem, 'selected');
	}
	return false;
}
function showGalleryPhoto(photoNo)
{
	gal.showPhoto(photoNo);
}
function initialize()
{
	var flash = $('flash_main');
	if (flash)
	{
		var so = new SWFObject('/top.swf', 'top', '100%', 326, 8, '#ffffff');
		so.addParam('menu', false);
		so.addParam('wmode', 'transparent');
		so.addParam('scale', 'noscale');
		so.addVariable('path', '/top.xml');
		so.write('flash_main');
	}
	FSite2.extendForm(document.body, {checkboxChecked: '/img/checkbox_checked.gif', checkboxUnchecked: '/img/checkbox_unchecked.gif' });
}
function initMap()
{
	var i;
	for (i = 0; i < window.maps.length; i++)
	{
		var map = new google.maps.Map2(document.getElementById("google_map"));
		map.setCenter(new GLatLng(window.maps[i].coords[0], window.maps[i].coords[1]), 14);
		var customUI = map.getDefaultUI();
		customUI.controls.largemapcontrol3d = true;
		customUI.controls.menumaptypecontrol = true;
		customUI.controls.scalecontrol = true;
		customUI.controls.smallzoomcontrol3d = true;
		customUI.controls.maptypecontrol = false;
		customUI.zoom.scrollwheel = false;
		map.setUI(customUI);
		var baseIcon = new GIcon(G_DEFAULT_ICON);
		baseIcon.image = "/img/mg_systemy.png";
		baseIcon.shadow = undefined;
		baseIcon.iconSize = new GSize(70, 39);
/*		baseIcon.shadowSize = new GSize(50, 50);*/
		baseIcon.iconAnchor = new GPoint(40, 45);
		baseIcon.infoWindowAnchor = new GPoint(32, 43);
		baseIcon.imageMap = [0, 0, 50, 0, 50, 50, 0, 50];
		markerOptions = { icon: baseIcon };
		var o = new GMarker(new GLatLng(window.maps[i].coords[0], window.maps[i].coords[1]), markerOptions);
		o.description = window.maps[i].desc;
		GEvent.addListener(o, "click", function() {
			o.openInfoWindowHtml(this.description);
		});
		map.addOverlay(o);
	}
}

