/*** funkce volana z flashe pro zastaveni animace ***/
function animace_off()
{
//	alert('z');
//    Intro.hide();
	setTimeout ( "Intro.hide()", 50 );
}
/*** funkce volana z flashe pro vypnuti intra ***/
function thisMovie(movieName) {
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    return (isIE) ? window[movieName] : document[movieName];
}


var Intro = {
	getContent: function()
	{
    	var s = '<object id="intro" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
			+ 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
			+ 'width="565" height="280" id="banner ilayer_v2" align="middle">'
			+ '<param name="allowScriptAccess" value="sameDomain" />'
			+ '<param name="movie" value="/img/ilayer.swf" />'
			+ '<param name="quality" value="high" />'
			+ '<param name="bgcolor" value="#ffffff" />'
			+ '<embed name="intro" src="/img/ilayer.swf" quality="high" bgcolor="#ffffff" '
			+ 'width="565" height="280" name="banner ilayer_v2" align="middle" allowScriptAccess="sameDomain" '
			+ 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
			+ '</object>';
	    return s;
	}
	, show: function()
	{
	    if ( window.playFlash == false )
		{
			return false;
		}
		document.getElementById('flash2Content').style.display = "none";
		//$$('select').invoke( 'setStyle', { visibility: "hidden" } );
		document.getElementById('host_intro').innerHTML = Intro.getContent();
		document.getElementById('host_intro').style.display = 'block';
		document.getElementById('intro').style.display = "block";
		//document.getElementById('body').style.height = "100%";
		//document.getElementById('body').style.overflow = "hidden";
	}
	, hide: function()
	{
		//Set_Cookie('hide_intro','1','30', '/', '', '' );
		var a1 = thisMovie( "intro" );
		if ( a1 != undefined && a1.stop_anim != undefined )
		{
			a1.stop();
		}
		document.getElementById('intro').style.display = "none";
		document.getElementById('host_intro').style.display = "none";
		//document.getElementById('body').style.overflow = "auto";
		document.getElementById('flash2Content').style.display = "block";
		var sh = new SWFObject( "/img/homepage.swf", "main", "559", "296", "7" );
		sh.write("flash2Content");		
		//$$('select').invoke( 'setStyle', { visibility: "visible" } );
	}
}

/*
Event.observe( window, 'load'
	,
	function()
	{
//		Event.observe( 'introLinkPlay', 'click', function() { return Intro.show(); } );
		//if ( Get_Cookie('hide_intro') != 1 )
		{
			Intro.show();
		}
	}
);
*/
