var rubriken = new Array("engine", "repository", "impressum");var anzahl_bilder = 10;var media_URL = "media/";var start_flash = "start.swf";var start_image = "start.gif";var kopf_flash = "kopf.swf";var kopf_images_URL = "kopf_bilder/bild_";var kopf_images_suffix = ".jpg";var logo_flash = "logo.swf";var logo_image = "logo.gif";// Dialog anzeigen: entweder Flash oder Imagevar required_version = 5;var flash_intalliert = false, flash_version = 0;var ActiveX_aktiv = false;var write_flash = false;// auf Flash pruefenfunction checkFlash(){	var is_IE = (navigator.appVersion.indexOf("MSIE") != -1);	var is_Win = (navigator.appVersion.indexOf("Windows") != -1);	var is_IE_4_Mac = (is_IE && !is_Win && navigator.appVersion.substr((navigator.appVersion.indexOf("MSIE") + 5),1) < 5);		if (is_IE && is_Win){		writeVBScript();	} else {		if (! is_IE_4_Mac && (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])){			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";			var flash_description = navigator.plugins["Shockwave Flash" + isVersion2].description;			flash_version = parseInt(flash_description.charAt(flash_description.indexOf(".") - 1));			flash_intalliert = true;		}		ActiveX_aktiv = true;	}		write_flash = flash_intalliert && flash_version >= required_version && ! is_IE_4_Mac;}function zeigeStart(){	var breite = 641, hoehe = 350;	if (write_flash){		writeFlash(start_flash, breite, hoehe);	} else {		writeImage(start_image, breite, hoehe);	}	}function zeigeKopf(){	var breite = 539, hoehe = 89;	if (write_flash){		writeFlash(kopf_flash, breite, hoehe);	} else {		var zufall = Math.floor(Math.random() * anzahl_bilder);		if (zufall < 10){ zufall = "0" + zufall; }		writeImage(kopf_images_URL + zufall + kopf_images_suffix, breite, hoehe);	}	}function zeigeLogo(){	var breite = 235, hoehe = 89;	if (write_flash){		writeFlash(logo_flash, breite, hoehe);	} else {		writeImage(logo_image, breite, hoehe);	}	}function writeFlash(datei, breite, hoehe){	var pfad = getPfad() + media_URL;	document.writeln("<OBJECT width='" + breite + "' height='" + hoehe + "' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0'>");	document.writeln("<PARAM name='quality' value='best'>");	document.writeln("<PARAM name='base' value='.'>");	document.writeln("<PARAM name='movie' value='"+ pfad + datei + "?anzahl=" + anzahl_bilder + "'>");	document.writeln("<EMBED src='" + pfad + datei + "?anzahl=" + anzahl_bilder + "' width='" + breite + "' height='" + hoehe + "' quality='best' base='.' type='application/x-shockwave-flash'>");	document.writeln("</OBJECT>");}function writeImage(datei, breite, hoehe){	var pfad = getPfad() + media_URL;	document.writeln("<IMG src='" + pfad + datei + "' width='" + breite + "' height='" + hoehe + "' border='0' alt=''>");}function writeVBScript(){	document.writeln('<SCR' + 'IPT language="VBScript">');	document.writeln('   On Error Resume Next');	document.writeln('   ActiveX_aktiv = IsObject(CreateObject("Microsoft.ActiveXPlugin.1"))');	document.writeln('   Private i, x');	document.writeln('   flash_intalliert = False');	document.writeln('   For i = ' + required_version + ' To 1 Step -1');	document.writeln('      Set x = CreateObject("ShockwaveFlash.ShockwaveFlash." & i)');	document.writeln('      flash_intalliert = IsObject(x)');	document.writeln('      If flash_intalliert Then');	document.writeln('          flash_version = CStr(i)');	document.writeln('          Exit For');	document.writeln('      End If');	document.writeln('   Next');	document.writeln('</SCR' + 'IPT>');}function getPfad(){	var pfad = self.location.href.toString();	for (var id = 0; id < rubriken.length; id++){		if (pfad.indexOf(rubriken[id]) != -1){ return pfad.slice(0, pfad.indexOf(rubriken[id])); }	}	return pfad.slice(0, pfad.lastIndexOf("/") + 1);}
