var naviImgA = new Image();
var naviImgNA = new Image();

function preloadNaviImg()
{
	naviImgNA.src = docRoot + 'img/grey.gif';
	naviImgA.src = docRoot + 'img/yellow.gif';
}

function changeNaviImg(imgNr, imgOver)
{
	if (document.images)
	{
		document.images['naviImg' + imgNr].src = eval('naviImg' + ((imgOver) ? 'A' : 'NA')).src;
	}
}

function showImpressum()
{
	var newWin = window.open(docRoot + 'impressum.html', '_self');
	newWin.focus();
}

var flashVersion = function()
{
	var flashPlugIn = 0;
	
	if (document.all && navigator.userAgent.toLowerCase().indexOf('win') != -1 && !window.opera)
	{
		with(document)
		{
			write('<script type="text/vbscript">\n');
			write('Function flashActX(version)\n');
			write('\tOn Error Resume Next\n');
			write('\t\n');
			write('\tDim FlashObj\n');
			write('\tFlashObj = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & version))\n');
			write('\tflashActX = FlashObj\n');
			write('End Function\n');
			write('\n\n');
			write('</script>\n');
		}
		
		for (var i = 3; i <= 7; i++)
		{
			flashPlugIn = (typeof(flashActX(i)) == 'undefined') ? flashPlugIn : i;
		}
	}
	else if (navigator.plugins && navigator.plugins['Shockwave Flash'])
	{
		var str = navigator.plugins['Shockwave Flash'].description.split(' ');
		
		for (var i = 0; i < str.length; i++)
		{
			if (!isNaN(parseInt(str[i])))
			{
				flashPlugIn = parseInt(str[i]);
				break;
			}
		}
	}
	
	return flashPlugIn;
}

function writeFlashStr(movieRoot, movieFile, movieWidth, movieHeight)
{
	flashStr = '';
	
	if (flashVersion < 4)
	{
		flashStr = '<img src="' + docRoot + 'img/trans.gif" width="' + movieWidth + '" height="' + movieHeight + '" alt="" border="0">';
	}
	else
	{
		if (document.layers)
		{
			flashStr = '<embed src="' + movieRoot + 'loader.swf?url=' + movieRoot + movieFile + '" width="' + movieWidth + '" height="' + movieHeight + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
		}
		else
		{
			flashStr = '<object type="application/x-shockwave-flash" data="' + movieRoot + 'loader.swf?url=' + movieRoot + movieFile + '" width="' + movieWidth + '" height="' + movieHeight + '"><param name="movie" value="' + movieRoot + 'loader.swf?url=' + movieRoot + movieFile + '"></object>';
		}
	}
	
	document.write(flashStr);
}

