function BrowserCheckNDS () {
  var b = navigator.appName
  if (b=="Netscape") this.b = "ns"
  else if (b=="Microsoft Internet Explorer") this.b = "ie"
  else this.b = b
  this.version = navigator.appVersion
  this.v = parseInt(this.version)
  this.ns = (this.b=="ns" && this.v>=4)
  this.ns4 = (this.b=="ns" && this.v==4)
  this.ie = (this.b=="ie" && this.v>=4)
  this.ie4 = (this.version.indexOf('MSIE 4')>0)
  this.ie5 = (this.version.indexOf('MSIE 5')>0)
  this.min = (this.ns||this.ie)
  this.win = (navigator.appVersion.indexOf("Win",0) != -1)
  this.mac = (navigator.appVersion.indexOf("Mac",0) != -1)
  this._flash_currentver = 10; // for future version
  this._checkflashinstalled = BrowserCheckFlashInstalledNDS;
  this.flash7 = this._checkflashinstalled(7);
  this.flash6 = this._checkflashinstalled(6);
  this.flash5 = this._checkflashinstalled(5);
  this.flash4 = this._checkflashinstalled(4);
  this.checkString = "browserVer="+navigator.appName + "/"+ navigator.appVersion+"&flashVer="+this.flash6+":"+this.flash5;
}
function BrowserCheckFlashInstalledNDS (version) {
  if (this.mac && this.ie4) return true;
  flashinstalled = 'false';
  if (this.ie && this.win) {
    var str = "";
    for(var i=version; i<=this._flash_currentver; i++) {
      str += 'IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.' + version + '\"))';
      if(i!=this._flash_currentver) str += " Or ";
    }
    document.writeln('<script language=\"VBscript\">');
    document.writeln('on error resume next');
    document.writeln('flashinstalled = ' + str);
    document.writeln('<\/script>');
  } else {
    for (var i=0; i<navigator.plugins.length; i++)
    if (navigator.plugins[i].name == 'Shockwave Flash') {
      var desc = navigator.plugins["Shockwave Flash"].description;
      if (eval(desc.charAt(desc.indexOf("Flash",0)+"Flash ".length)) >= version) flashinstalled  = 'true';
    }
  }
  return eval(flashinstalled);
}

is = new BrowserCheckNDS();
if (is.flash7){
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
  document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
  document.write('  width="145" height="145"><param Name="movie" value="http://touch-ds.jp/banner/small.swf"><param name="menu"');
  document.write('  value="false"><param name="quality" value="high"><param name="wmode" value="transparent"><embed');
  document.write('  src="http://touch-ds.jp/banner/small.swf" quality="high" menu="false" width="145" height="145" wmode="transparent"');
  document.write('  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>');
} else {
  document.write('<a href="http://touch-ds.jp/"><img src="http://touch-ds.jp/banner/small.gif" width="145" height="145" border="0" align="bottom"></a>');
}