/* JavaScript - flash_objekt.js - LBBW - brandperfection.de v1.0 - 3.09.2008 - copyright 2008 */
/* Allgemeines Flash-Bannerscript - Flash v7 */



/* Notwendige Variablen:
   var myURL = '?id=1'; 			//Ziel-URL (Bsp.: 'http://www.LBBW.de' oder '/meineseite.html')
   var myGif = '/imperia/md/content/lbbwde/banner.gif';  		//alternatives Bild
   var myFlash = '/imperia/md/content/lbbwde/banner.swf'; 	// SWF-Datei
   var myTarget = ''; 				//optionaler Target (Bsp.: '_blank' oder '')
*/

if(myWidth==false)var myWidth = '190'; 
if(myHeight==false)var myHeight = '110';
if(myGifWidth==false)var myGifWidth = myWidth; 
if(myGifHeight==false)var myGifHeight = myHeight;



function bp_flashobj(myFlash,myGif, myURL,myTarget,myParameter, myWidth,myHeight,myGifWidth,myGifHeight, alternativesHTML){
	if (ShockMode) {
		flashobj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="banner" width="'+myWidth+'" height="'+myHeight+'">';
		flashobj+= '<param name="movie" value="'+myFlash+'?clickTag='+myURL+'&target='+myTarget+'&'+myParameter+'" />';
		flashobj+= '<param name="wmode" value="opaque" />';
		flashobj+= '<param name="Autostart" value="true" />';
		flashobj+= '<param name="Quality" value="high" />';	
		flashobj+= '<param name="allowScriptAccess" value="always" />';
		flashobj+= '<embed wmode="opaque" src="'+myFlash+'?clickTag='+myURL+'&target='+myTarget+'&'+myParameter+'" swLiveConnect="TRUE" width="'+myWidth+'" height="'+myHeight+'" type="application/x-shockwave-flash" pluginspage="' + document.protocol + '//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" allowScriptAccess="always"><\/embed>';
		flashobj+= '<\/object>';
	} else {
		flashobj = "";
		if(myGif!="")flashobj += '<a href="'+myURL+'" target="'+myTarget+'"><img src="'+myGif+'" border="0" width="'+myGifWidth+'" height="'+myGifHeight+'" alt="Hier klicken!" galleryimg="no" /><\/a>';
		if(alternativesHTML!=""){flashobj += alternativesHTML;}
	}
	document.write(flashobj);
}

//Flasherkennung 
var ShockMode = 0;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin&& parseInt(plugin.description.substring(plugin.description.indexOf(".")-2)) >= 8){ShockMode = 1;}
else if ((navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0)&& (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0))
{
	document.write('<scr' + 'ipt language="VBScript"> \n');
	document.write('on error resume next \n');
	document.write('ShockMode = (Isobject(Createobject("ShockwaveFlash.ShockwaveFlash.7")))\n');
	document.write('<\/scr' + 'ipt>\n');
}
//
