var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) {  // 使用可能なバージョンが検出された場合
	var adRotateRes = null;
	var adRotate = new Array();
	adRotate[0] = "swf/tn-sanso.swf?clickTAG=http://www.gasreview.co.jp/tracking/log.php?http://www.tn-sanso.co.jp/jp/";
	adRotate[1] = "swf/airwater.swf?clickTAG=http://www.gasreview.co.jp/tracking/log.php?http://www.awi.co.jp/";
	adRotate[2] = "swf/iwatani.swf?clickTAG=http://www.gasreview.co.jp/tracking/log.php?http://www.iwatani.co.jp/";
	n = Math.floor(Math.random()*adRotate.length);
	adRotateRes = adRotate[n];
    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="250" height="60"'
    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
    + '<param name="movie" value="'+adRotateRes
	+ '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'
    + '<embed src="'+adRotateRes
	+ '" quality="high" bgcolor="#ffffff" '
    + 'width="250" height="60" name="ad1-2" align="middle"'
    + 'play="true"'
    + 'loop="false"'
    + 'quality="high"'
    + 'allowScriptAccess="sameDomain"'
    + 'type="application/x-shockwave-flash"'
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);   // Flash ムービーの埋め込み
  } else {  // Flash が古すぎるか、プラグインを検出できません
	var alternateContent = null;
	var jumpURL = new Array();
	var imgURL  = new Array();
	jumpURL[0] = "http://www.tn-sanso.co.jp/jp/index.html";
	jumpURL[1] = "http://www.awi.co.jp/";
	jumpURL[2] = "http://www.iwatani.co.jp/";
	imgURL[0]  = "swf/tn-sanso.gif";
	imgURL[1]  = "swf/airwater.gif";
	imgURL[2]  = "swf/i-logo.gif";

	n = Math.floor(Math.random()*jumpURL.length);
	alternateContent = '<a href="'+jumpURL[n]+'" target="_blank">'
	+ '<img src="'+imgURL[n]+'" width="250" height="60" border="0" /></a>';
    document.write(alternateContent);  // Flash 以外のコンテンツを挿入する
}

