var maxVerze = 15;
var vrVerze = 0;
var agent = navigator.userAgent.toLowerCase();
if(navigator.plugins != null && navigator.plugins.length > 0){
var plugin = navigator.plugins['Shockwave Flash'];
if(typeof plugin == 'object'){
for(i=3; i<= maxVerze; i++){
if(plugin.description.indexOf(i+'.') != -1){
vrVerze = i;
}
}
}
} else if(document.all && agent.indexOf('win') != -1 && agent.indexOf('16bit') == -1){
document.write('<'+'script language="VBScript"'+'> \n');
document.write('set FlashObj = Nothing \n');
document.write('on error resume next \n');
document.write('For i = '+maxVerze+' to 3 step -1 \n');
document.write('set FlashObj = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n');
document.write('If (Not(FlashObj is Nothing)) Then \n');
document.write('vrVerze = i \n');
document.write('Exit For \n');
document.write('End If \n');
document.write('Next \n');
document.write('<'+'\/script'+'> \n');
}else if(agent.indexOf('webtv/2.5') != -1){ // what?!
vrVerze = 3;
}else if(agent.indexOf('webtv') != -1){
vrVerze = 2;
}else{
vrVerze = -1;
}
function setBanner(version, name, width, height, bgcolor, quality, menu, noflash, flashvars){
flashvars = flashvars!=null ? flashvars : '';
if(vrVerze >= version){
var swf = '<div id="slogan">';
swf += '<object';
swf += ' width="'+width+'"';
swf += ' height="'+height+'"';
swf += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
swf += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+',0,0,0">';
swf += '<param name="movie" value="'+name+'?'+flashvars+'" />';
swf += '<param name="FlashVars" value="'+flashvars+'" />'
swf += '<param name="quality" value="'+quality+'" />';
swf += '<param name="menu" value="'+menu+'" />';
swf += '<param name="bgcolor" value="'+bgcolor+'" />';
swf += '<embed src="'+name+'?'+flashvars+'"';
swf += ' Flashvars="'+flashvars+'"';
swf += ' width="'+width+'"';
swf += ' height="'+height+'"';
swf += ' quality="'+quality+'"';
swf += ' menu="'+menu+'"';
swf += ' bgcolor="'+bgcolor+'"';
swf += ' type="application/x-shockwave-flash"';
swf += ' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
swf += '<\/embed>';
swf += '<\/object>';
swf += '<\/div>';
document.write(swf);
}else{
document.write(noflash);
}
}