//# detect.js
//# last update: 2003.09.15
//# including: flash detection AND popupscript called from the flashmovie

//#tested with #
//# PC:
//# IE 5.5
//# NC 4.7
//# Mac:
//# IE 5

//start popupscript:

function imgWindow(moviewidth,movieheight,imageName) { //öffnet ein externes Fenster
	if (navigator.platform == "MacPPC") {
		width = moviewidth - 8;
		height = movieheight - 40;
	} else {
		width = moviewidth;
		height = movieheight;
	}
	var top = ((screen.height-(movieheight+36))/2+40);
	mainWindow = window.open("showimage.html?imageSRC="+imageName,"popWin","width=" + width + ",height=" + height + ",left=" + ((screen.width-(moviewidth+10))/2) + ",top=" + top + ",menubar=0,status=0,toolbar=0,location=0,scrollbars=0,resizable=0");
}



// start flashdetection script:
//declare variables used in the html-page
var version;
var moviewidth;
var movieheight;
var moviename;
var noflashcontent;
var play;
var loop;
var menu;
var quality;
var transparent;
var color;
var altImage;

//flash detection variables
var MM_flash2 = false;
var MM_flash3 = false;
var MM_flash4 = false;
var MM_flash5 = false;
var MM_flash6 = false;
var MM_flash7 = false;
var MM_Flashcounter = 7;
var installedFlash = 0;
var hasRightVersion = false;
var jscript = 1.0;

var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

jscript = 1.1;

if(isIE && isWin){
document.write('<SC'+'RIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('MM_flash2 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
document.write('MM_flash3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
document.write('MM_flash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
document.write('MM_flash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
document.write('MM_flash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
document.write('MM_flash7 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
document.write('</SC'+'RIPT\> \n');
}

//function detectFlash, called from the html-page
function detectFlash(mustbeFlash){
		
	if (navigator.plugins){
		if (navigator.plugins["Shockwave Flash 2.0"]
		|| navigator.plugins["Shockwave Flash"]){

		var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
		var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
		var flashDetect = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));

		MM_flash2 = flashDetect == 2;
		MM_flash3 = flashDetect == 3;
		MM_flash4 = flashDetect == 4;
		MM_flash5 = flashDetect == 5;
		MM_flash6 = flashDetect == 6;
		MM_flash7 = flashDetect == 7;
		}
	}

	for (var i = 2; i <= MM_Flashcounter; i++) {
		if (eval("MM_flash" + i) == true) installedFlash = i;
	}

	if(navigator.userAgent.indexOf("WebTV") != -1) installedFlash = 2;
	if (installedFlash >= mustbeFlash) {
		hasRightVersion = true;
		}	
	}

// writing the embeding-code
function writeFlashembedCode(section,lang) {
	var oeTags = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
		+ 'WIDTH="' + moviewidth + '" HEIGHT="' + movieheight + ' "'
		+ 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">\n'
		+ '<PARAM NAME="MOVIE" VALUE="' + moviename +'">\n'
		+ '<PARAM NAME="WMODE" VALUE="transparent">\n'
		+ '<PARAM NAME="PLAY" VALUE="'+ play + '">\n'
		+ '<PARAM NAME="LOOP" VALUE="'+ loop + '">\n'
		+ '<PARAM NAME="bgcolor" VALUE="' + color + '">\n'
		+ '<PARAM NAME="QUALITY" VALUE="'+ quality + '">\n'
		+ '<PARAM NAME="MENU" VALUE="'+ menu + '">\n'
		+ '<EMBED SRC="' + moviename +'" '
		+ 'WIDTH="' + moviewidth + '" HEIGHT="' + movieheight + ' "'
		+ 'QUALITY="'+ quality + ' "'
		+ 'bgcolor="' + color + ' "'
		+ 'TYPE="application/x-shockwave-flash "'
		+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>';
		document.write(oeTags);
}

// writing the noflash-content code

function writeAlternateCode(lang,imgURL,altText) {
	alternateContent = '<map name="any">'
		+ '<area alt="Hamburg" shape="poly" coords="204,71,201,75,199,78,196,78,195,80,194,82,196,84,199,86,203,89,204,89,206,87,207,87,208,89,210,89,212,86,211,77,208,70" href="?sp_bundesland=Hamburg&action=search">'
		+ '<area alt="Bremen" shape="poly" coords="153,100,161,100,164,102,168,102,169,104,169,108,168,110,162,110,158,106" href="?sp_bundesland=Bremen&action=search">'
		+ '<area alt="Schleswig-Holstein" shape="poly" coords="192,80,179,63,168,61,165,56,164,51,167,49,169,51,170,47,167,46,163,45,163,42,166,38,166,36,162,38,157,37,157,31,165,30,168,27,170,26,158,10,158,2,161,0,169,0,183,8,189,4,201,9,204,11,204,24,200,28,203,27,209,27,209,32,214,28,227,36,233,33,239,33,240,42,234,49,229,49,228,52,232,57,231,65,230,69,235,75,234,81,226,88,224,91,213,87,212,79,211,74,208,68,202,70,197,76" href="?sp_bundesland=Schleswig-Holstein&action=search">'
		+ '<area alt="Bayern" shape="poly" coords="272,266,279,270,284,280,297,294,293,304,297,308,300,316,304,322,308,326,315,327,321,336,328,340,333,349,339,350,345,356,350,363,347,374,342,374,338,372,335,378,334,384,331,386,328,389,317,393,310,400,311,403,316,409,318,414,319,418,316,420,315,422,319,423,322,427,322,433,318,438,314,436,310,431,310,427,305,426,301,429,296,425,288,424,287,428,264,434,251,443,240,444,236,437,227,434,218,434,218,439,210,450,208,447,210,442,205,444,204,438,186,434,193,428,203,427,208,426,208,423,207,400,204,383,210,378,213,374,212,368,218,368,218,351,211,339,205,329,207,318,201,318,196,308,189,304,183,301,176,300,177,306,178,309,168,310,170,301,165,291,166,282,174,282,176,280,180,284,185,284,186,276,193,274,194,266,198,265,206,257,213,263,227,277,231,277,230,268,240,270,246,273,248,272,248,261,251,260,253,264,268,268" href="?sp_bundesland=Bayern&action=search">'
		+ '<area alt="Mecklenburg-Vorpommern" shape="poly" coords="226,91,247,107,258,110,256,106,255,102,260,99,268,96,276,92,280,92,288,96,296,97,309,102,313,98,318,98,329,88,338,87,339,85,346,86,346,89,350,93,352,93,355,91,358,91,350,68,336,64,337,58,332,46,328,44,324,45,321,48,308,36,308,31,305,28,298,27,288,26,285,30,276,41,274,44,275,48,272,49,272,45,270,44,264,44,262,46,256,48,256,52,252,58,248,58,240,54,234,59,231,70,236,75,236,80,230,88" href="?sp_bundesland=Mecklenburg-Vorpommern&action=search">'
		+ '<area alt="Niedersachsen" shape="poly" coords="160,62,176,64,182,69,194,85,201,90,206,91,212,90,214,90,238,105,254,112,255,114,249,118,232,120,229,126,233,134,236,150,236,164,225,171,220,181,224,192,222,196,216,195,204,200,194,205,191,209,192,213,188,212,189,209,193,196,186,191,182,192,183,180,168,153,173,150,174,143,167,141,164,144,161,146,159,140,158,139,151,140,143,141,146,156,145,161,130,165,133,145,129,144,122,144,117,141,109,148,102,153,98,152,98,144,95,142,88,140,86,136,88,129,98,129,100,124,99,120,106,108,106,99,110,91,99,87,110,70,132,67,141,76,149,74,156,60" href="?sp_bundesland=Niedersachsen&action=search">'
		+ '<area alt="Berlin-Brandenburg" shape="poly" coords="258,103,262,108,261,113,260,113,267,118,281,120,283,124,282,130,282,136,279,139,284,142,285,148,285,157,282,163,288,167,299,170,313,175,319,181,318,188,317,193,322,199,320,203,329,204,345,206,350,198,374,195,375,189,369,182,370,178,372,174,372,157,367,152,364,144,368,140,362,130,351,122,348,120,357,106,359,93,355,96,351,97,346,95,344,91,341,88,336,90,329,91,322,98,315,101,310,105,300,103,280,97,272,96" href="?sp_bundesland=Berlin-Brandenburg&action=search">'
		+ '<area alt="Sachsen" shape="poly" coords="376,198,356,200,350,202,351,208,348,209,326,208,316,207,316,200,314,194,311,193,304,193,298,195,292,196,285,198,282,199,282,219,288,224,295,227,300,232,298,236,293,240,287,242,283,245,285,248,284,253,276,257,274,261,275,266,280,269,284,274,286,277,288,277,290,269,295,266,299,266,305,264,307,263,311,264,316,261,315,258,319,258,328,250,331,254,332,247,346,246,349,242,356,242,360,236,364,232,359,225,367,229,372,237,376,241,385,220,384,202" href="?sp_bundesland=Sachsen&action=search">'
		+ '<area alt="Sachsen-Anhalt" shape="poly" coords="258,115,266,120,274,122,280,122,280,128,278,136,278,141,282,143,281,148,282,156,280,161,282,166,292,172,302,173,310,178,314,180,316,187,313,190,303,190,282,197,279,203,279,221,284,225,286,228,284,232,281,232,276,230,272,230,254,221,254,213,248,207,237,205,234,195,226,192,223,182,227,173,236,169,240,163,240,149,237,144,239,139,230,126,244,119,256,119" href="?sp_bundesland=Sachsen-Anhalt&action=search">'
		+ '<area alt="Th&uuml;ringen" shape="poly" coords="203,208,211,204,216,198,225,199,226,194,232,197,234,204,238,208,246,208,250,211,252,217,253,222,259,226,272,232,281,234,284,234,288,227,292,227,296,232,295,236,287,239,282,242,282,247,283,250,274,256,271,264,254,263,255,258,246,258,245,272,240,268,228,266,227,269,228,274,215,260,207,256,205,251,200,249,206,232,213,221" href="?sp_bundesland=Thueringen&action=search">'
		+ '<area alt="Hessen" shape="poly" coords="181,194,187,196,188,198,186,204,185,210,186,214,194,214,194,209,199,208,208,220,206,227,198,248,199,252,202,252,204,255,202,258,197,263,195,263,191,264,190,274,185,276,182,282,173,278,166,280,164,286,166,312,160,320,157,316,152,313,152,310,149,316,143,310,148,302,138,284,126,287,123,285,126,278,133,272,130,258,134,258,134,248,134,239,141,238,148,232,149,223,156,224,154,212,153,211,156,208,165,208,164,202,169,202,174,204" href="?sp_bundesland=Hessen&action=search">'
		+ '<area alt="Nordrhein-Westfalen" shape="poly" coords="97,154,106,154,118,147,118,144,124,147,129,147,129,153,127,156,129,159,129,162,125,163,126,166,130,168,132,166,146,165,151,160,148,153,145,146,148,142,155,142,156,148,164,149,170,144,170,146,165,153,167,160,173,174,179,182,180,191,172,201,166,200,160,202,161,204,154,206,148,212,153,215,155,218,154,220,148,221,146,228,143,234,136,236,134,237,133,244,123,233,122,234,82,258,80,261,70,260,62,254,60,251,65,248,54,238,54,234,57,225,52,221,60,214,58,210,64,200,61,186,55,178,57,173,72,176,87,170,82,162,85,161" href="?sp_bundesland=Nordrhein-Westfalen&action=search">'
		+ '<area alt="Rheinland-Pfalz" shape="poly" coords="68,264,61,268,57,276,56,285,62,288,66,293,69,296,68,303,67,308,76,311,89,306,99,309,103,316,105,327,104,335,106,338,109,342,113,343,121,342,128,346,133,347,135,347,143,326,142,318,140,311,141,305,142,299,140,296,140,288,137,286,131,287,124,291,120,288,118,284,122,282,124,280,124,274,132,271,128,262,128,256,134,256,132,249,126,241,123,236,81,262" href="?sp_bundesland=Rheinland-Pfalz&action=search">'
		+ '<area alt="Saarland" shape="poly" coords="63,311,68,314,73,319,74,327,78,333,81,334,84,331,86,336,88,338,91,336,93,336,100,338,102,337,102,334,103,322,98,310,86,308,76,313" href="?sp_bundesland=Saarland&action=search">'
		+ '<area alt="Baden-W&uuml;rttemberg" shape="poly" coords="136,349,146,326,144,318,142,313,148,318,152,318,151,314,158,323,164,323,168,314,179,312,181,306,178,302,182,302,193,309,196,320,204,322,202,331,210,347,216,352,215,362,215,365,210,365,208,374,201,380,200,389,205,401,205,418,205,424,191,426,184,432,182,433,162,424,158,426,156,382,156,424,151,418,146,416,140,419,141,427,139,430,134,428,132,427,129,428,120,430,112,428,104,419,106,406,106,397,114,376,124,360" href="?sp_bundesland=Baden-Wuerttemberg&action=search">'
		+ '</map>'
		+ '<img src="fileadmin/template_rz/main/images/landkarte.gif" width="392" height="453" border="0" usemap="#any">';
	document.write(alternateContent);
}
