
flash_versions = 20;

var flash = new Object();
flash.installed=false;
flash.version='0.0';

if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash.installed = true;
			break;
		}
	}
}

else if (window.ActiveXObject) {
	for (x = 2; x <= flash_versions; x++) {
		try {
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if(oFlash) {
				flash.installed = true;
				flash.version = x + '.0';
			}
		}
		catch(e) {}
	}
}

flash.ver = Array();
for(i = 4; i <= flash_versions; i++) {
	eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");
}	



function getlocation(flashname,width,height,lang){

	//Width and height fixed for BMAG homepage // stefan alcalde
	//width=788;
	//height=153;
	
	if (flash.ver[6])
	{
		document.write('<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ');
		document.write('codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ');
		document.write('WIDTH=\"'+width+'\" HEIGHT=\"'+height+'\" id=\"pxd\" ALIGN=\"\"> ');
		document.write('<param name=movie VALUE=\"'+flashname+'\" /> ');
		document.write('<param name=quality VALUE=high /> ');
		document.write('<param name=\"scale\" value=\"noscale\" /> ');
		document.write('<param name=\"wmode\" value=\"transparent\" /> ');
		document.write('<param=\"bgcolor\" value=\"#cccccc\" /> ');
		document.write('<EMBED src=\"'+flashname+'\" quality=\"high\" scale=\"noscale\" wmode=\"transparent\" '); 
		document.write('bgcolor=\"#cccccc\"  WIDTH=\"'+width+'\" HEIGHT=\"'+height+'\" NAME=\"pxd\" ALIGN=\"\" ');
		document.write('TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED> ');
		document.write('</OBJECT>');		
	}
	else
	{
		if (lang==1){
		text1="Das Standorttool kann leider nicht dargestellt werden!";
		text2="Sie benötigen eine aktuellere Version des Flash Players.";
		text3="Um das Bertelsmann Standorttool benutzen zu können, benötigen Sie einen Flash Player ab Version 6.0. Diesen können Sie sich kostenlos unter dem nachfolgenden Link herunterladen.";
		text4="Downlaod des aktuellen Flash Players.";
		}else{
		text1="Unfortunately, it is not possible to depict the location tool!";
		text2="You need to install a more current Flash Player version.";
		text3="In order to use the Bertelsmann Location Tool, please install a Flash Player of Version 6.0 or higher. To download the Flash Player free of charge, simply click on the following link.";
		text4="Download the most current Flash Player.";
		}
		document.write('<style>body{background-color:#fff}</style><div id="popup" class="bg_rtl"><h1>'+text1+'</h1><h2><strong>'+text2+'</strong></h2><p>'+text3+'</p><p><a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOX" target="_blank"><img src="../images/flashplayer.gif" alt="Get Flashplayer" border="0"></a>&nbsp;&nbsp;&nbsp;<a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOX" target="_blank">'+text4+'</a> </p></div>');
	}

}		
