function resizeFlash(rozmiar)
{	
	var oddzial = $('oddzialy');
	var animacja = new FSite2.Animation(oddzial.style,'height',FSite2.Anim.linear,{time:0.4,start:last_offset,end:rozmiar},{template:'#px',precision:1});
	//var animacja = new FSite2.Animation(oddzial.style,'height',FSite2.Anim.test,{start: last_offset,end: rozmiar,time: 1},{template : '#px'});
	last_offset = rozmiar;
}

function showInfo(ID)
{
	var oddzial = $('one_oddzial');
	ajax({
		url : '/ajax.php',
		success : function() {
			eval('var json = '+this.httpRequest.responseText);
			oddzial.innerHTML = json.html;
			
			setTimeout(function()
			{
				FSite2.extendForm(document.body,params.slider_scroll);
			
				if(FSite2.galleries.FSite2_gallery == undefined)
					FSite2.extendForm(document.body,params.galery);
				else
				{
					FSite2.galleries.FSite2_gallery.photos = new Array();
					FSite2.extendForm(document.body,params.galery);
				}
			},100);
				
			mapa($('mapa'));
			
			GoogleMap.UstawTarget(json.zoom,json.dl,json.sz);	
		},
		method:'post',
		params : {
		id : ID
		}
	});
}


function OddzialyFlash()
{
	if($('oddzialy') != undefined)
	{
		swfobject.embedSWF("/static/swf/prefixMapa.swf", "oddzialy", "659", "270", "8.0.0","", {databasePath:"/database.php"},{wmode:"transparent",salign:"lt"},{});
	}
}

function BannerPromocyjnyBig()
{
	if($('promocja_big_swf') != undefined)
		swfobject.embedSWF("/static/swf/rotatorL.swf", "promocja_big_swf", "656", "200", "8.0.0","", {databasePath:"/banerBig.php"},{wmode:"transparent"},{});
}

function TopFlash()
{
	if($('flash') != undefined)
		swfobject.embedSWF("/static/swf/prefixTop.swf", "flash", "100%", "410", "8.0.0","", {databasePath:"/slideshow.php"},{wmode:"transparent"},{});
}

function BannerPromocyjnySmall()
{
	//var rand = (Math.random() * 1000000000000000000).toString();
	if($('promocja_swf') != undefined)
		swfobject.embedSWF("/static/swf/rotatorS.swf", "promocja_swf", "240", "172", "8.0.0","", {databasePath:"/baner.php"},{wmode:"transparent"},{});
}

function SearchFlash() { 
	if($('flash_search') != undefined) {
		swfobject.embedSWF("/static/swf/wyszukiwarka.swf", "flash_search", "660", "550", "8.0.0","", {databasePath:"/database.xml"},{wmode:"transparent"},{});
	}
}
function Flash()
{
	OddzialyFlash();
	TopFlash();
	BannerPromocyjnySmall();
	BannerPromocyjnyBig();
	SearchFlash();
}
