function checkNetscape()
{
var plug = 0;

	if(navigator.appName == "Netscape")
	{
		for(i=0;i<navigator.plugins.length;i++)
		{
			if (navigator.plugins[i].description.indexOf("Flash") >= 0 )
			{ 
				plug = 1
				break;
			}
		}
	}
	else if (((navigator.userAgent) && (navigator.userAgent.indexOf("MSIE")>=0)) && (navigator.userAgent.indexOf("Win")>=0))
	{
		ShockMode = 0;

	    document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	    document.write('on error resume next \n');
	    document.write('ShockMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	    document.write("</SCRIPT>");
                  
		if(ShockMode)
		{
			plug  = 1;
		}
	}
	else if ((navigator.userAgent.indexOf("MSIE")>=0) && ((navigator.appVersion.indexOf("Macintosh")>=0) || (navigator.appVersion.indexOf("68K")>=0)))
	{
		plug = 2;	
	}
	
	return plug;
}

function embeddFlash ( nameflash, widthflash, heightflash )
{
	document.write ( '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID=Banner WIDTH="' + widthflash + '" HEIGHT="' + heightflash + '">' );
	document.write ( '<PARAM NAME=movie VALUE="' + nameflash + '"> ' );
	document.write ( '<PARAM NAME=quality VALUE=high> ' );
	document.write ( '<PARAM NAME=bgcolor VALUE=#ffffff> ' );
	document.write ( '<EMBED src="' + nameflash + '" quality=high bgcolor=#ffffff  WIDTH="' + widthflash + '" HEIGHT="' + heightflash + '" TYPE="application/x-shockwave-flash"></EMBED>' );
	document.write ( '</OBJECT>' );
}

function embeddGIF ( namegif )
{
	document.write ( '<img src="' + namegif + '" alt="" border="0"></a>' );
}

function checkFlash ( nameflash, namegif, widthflash, heightflash )
{
var ShockMode = 0;
var ver		 = 0;
var plug	 = 0;

	ver = parseInt( navigator.appVersion.substring( 0,1 ) );
	
	if( ver > 2 )  plug = checkNetscape();
	
	// HTML-Embedding Flash oder Alternativ-Gif
	if ( plug == 1 )
	{
		embeddFlash ( nameflash, widthflash, heightflash );
	}
	else if (plug == 2)
	{
		embeddFlash ( nameflash );
	}
	else
	{
		embeddGIF ( namegif );
	}
}

