if (typeof(WMode) == "undefined" || WMode == "" || WMode == null) {
	WMode = "Window";
}
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="flashbanner" width="' + width + '" height="'+ height +'">'
	+ '<param name="movie" value="' + fbannerurl + '"><param name="quality" value="high"><param name="scale" value="exactfit"><param name="wmode" value="' + WMode + '"><param name="allowScriptAccess" value="always">'
	+ '<embed src="' + fbannerurl + '" menu="false" name="flashbanner" quality="high" width="' + width +'" height="' + height + '" wmode="' + WMode + '"  type="application/x-shockwave-flash" allowScriptAccess="always"></embed>'
	+ '</object>';
if (document.layers) 
{ 
  origWidth = innerWidth;
  origHeight = innerHeight; 
}
function reDo()
{
  if (innerWidth != origWidth || innerHeight != origHeight)
  location.reload();  
}
if (document.layers) onresize = reDo;
function movieobject(flashbanner)
{
  if (navigator.appName.indexOf ("Microsoft") !=-1) 
  {
    return window[flashbanner]
  }
  else
  {
    return document[flashbanner]  
  }
}
function detectFlash()
{
  var flash = null;
  if (navigator.plugins && navigator.plugins.length)
  {
    x = navigator.plugins["Shockwave Flash"];
    if (x) {
      y = navigator.plugins["Shockwave Flash"].description;
      if (y) {
        flash = y.replace(/.* ([0-9]+)\..*/,"$1");
      }
    }
  } else {
    document.write('<script language="VBScript">\n');
    document.write('flash4 = null\n');
    document.write('flash5 = null\n');
    document.write('flash6 = null\n');
	document.write('flash7 = null\n');
	document.write('flash8 = null\n');
	document.write('flash9 = null\n');
    document.write('On Error Resume Next\n');
    document.write('  flash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
    document.write('On Error Resume Next\n');
    document.write('  flash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
    document.write('On Error Resume Next\n');
    document.write('  flash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	document.write('On Error Resume Next\n');
    document.write('  flash7 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
	document.write('On Error Resume Next\n');
	document.write('  flash8 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")))\n');
	document.write('On Error Resume Next\n');
	document.write('  flash9 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9")))\n');
    document.write('</script>\n');
    if (flash4) { flash="4" }
    if (flash5) { flash="5" }
    if (flash6) { flash="6" }
	if (flash7) { flash="7" }
	if (flash8) { flash="8" }
	if (flash9) { flash="9" }
  } 
  if (flash >= ShockMode) 
  {
    document.write(oeTags);
  } 
  else if (!((navigator.userAgent.indexOf("Mac") !=-1) || (navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)))
  {
    document.write('<a href="' + alinkurl + '"><img src="' + abannerurl + '" width="' + width + '" height="' + height + '" alt="' + alttext + '" /></a>');
  }
}
detectFlash();