/*
 * MAYNE FLASH BANNER
 *	If browser is Safari or Flash is not detected
 * a static image will be used
 * 
 * To use, call displayBanner() where needed
 */
 
var detect = navigator.userAgent.toLowerCase();
//alert(detect);
function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function displayBanner(flashpath,altimagepath,width,height,title)
{
	if(title=="Trident")
	{
	var url1 ='<a href="../../en/Trident2008/" title="Trident">'
	var url2 ='</a>'
	}
	else
	{
	var url1 =''
	var url2 =''
	}
	if(checkIt('safari')) {
	//alert('safari')
	//alert(detectFlash(6))
	
	if(detectFlash(6))
	{
	//alert('ok')
	document.write(url1+'<div id="flashJSmovie"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+width+'" height="'+height+'" title="'+title+'">');
    document.write('<param name="movie" value="'+flashpath+'" />');
    document.write('<param name="quality" value="high" />');
    document.write('<param name="wmode" value="transparent" />');
    document.write('<param name="menu" value="false">');
    document.write('<embed src="'+flashpath+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"  title="'+title+'" wmode="transparent"></embed>');
    document.write('</object></div>'+url2);
	}
	else
	{
	document.write(url1 +'<div id="flashJSimage"><img src="'+altimagepath+'" width="'+width+'" height="'+height+'" alt="'+title+'" border="0" style="display:block;" /></div>'+url2);	
	}
	/*	
	document.write(url1+'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+width+'" height="'+height+'" title="'+title+'" >');
    document.write('<param name="movie" value="'+flashpath+'" />');
    document.write('<param name="quality" value="high" />');
    document.write('<param name="wmode" value="transparent" />');
    document.write('<param name="menu" value="false">');
    document.write('<embed src="'+flashpath+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"  title="'+title+'" wmode="transparent"></embed>');
    document.write('</object>'+url2);
    
	}
	/*
	else
	alert('fail')
	document.write(url1 +'<img src="'+altimagepath+'" width="'+width+'" height="'+height+'" alt="'+title+'" border="0" style="display:block;" />'+url2);
	}
	*/
	} else {
		var bannerFlash = new FlashObject(flashpath,"bannerflash",width,height,6,"#FFFFFF");
		bannerFlash.addParam("wmode", "transparent");
		bannerFlash.addParam("quality", "high");
		bannerFlash.altTxt = url1+'<div id="flashJSimage"><img src="'+altimagepath+'" width="'+width+'" height="'+height+'" alt="'+title+'" border="0"  style="display:block;" /></div>'+url2;
		bannerFlash.write();
	}
}
