function checkFlash(fname, height, width)
{
  with (navigator) if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) document.write(''+
  '<scr'+'ipt language="VBScript">\nOn error resume next\n'+
  'MM_dir = IsObject(CreateObject("SWCtl.SWCtl.1"))\n'+
  'MM_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n</scr'+'ipt>');

  plgIn = 'Shockwave Flash'
  var gotFlash=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    gotFlash=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (window.MM_flash!=null) gotFlash=window.MM_flash;
  }

  if (!gotFlash) {
    document.writeln('<img src="images/'+fname+'.jpg" width="'+width+'" height="'+height+'" border="0" usemap="#'+fname+'">');
  } else {
    document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+width+'" height="'+height+'"><param name=movie value="images/'+fname+'.swf"><param name=quality value=high><param name=menu value=false><embed src="images/'+fname+'.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" menu=false></embed></object>');
  }
}
