var flashinstalled = 0;
var flashversion = 0;
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
{
	for (var version=2; version<=7; ++version)
	{
		try
		{
			var obj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + version);
			flashinstalled = 2;
			flashversion = version;
		}
		catch(e)
		{
		}
	}
}

var parts = document.location.pathname.match(/^\/(.*)[_\/?](.*)$/);
var section = parts ? parts[1] : '';
var section_all = document.location.pathname;

var sections = Array("", "episode", "cast", "authors", "about", "forum", "jokes", "modya");
var links = Array("/", "/episode_next", "/cast_overview", "/authors_submit", "/about_overview", "/forum", "/jokes_daily", "/modya_tut");
if (flashinstalled == 2 && flashversion >= 7)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="730" height="36" id="nav11" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="/flash/nav12.swf?'+section+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="/flash/nav12.swf?'+section+'" quality="high" bgcolor="#ffffff" width="730" height="36" name="nav11" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
else
{
	for(var i=0; i<sections.length; ++i)
	{
		document.write('<a href="' + links[i] + '" border="0" ><img src="/images/hmenu_' + (i+1) + '_' + ((section==sections[i])?'on':'off') + '.gif" border="0"/></a>');
	}
	document.write('<br style="clear:both;"/>');
}
