// swf info
var swfReqVer  = [6,0,0,0];
var swfId      = 'topFlash';
var swfSrc     = 'top.swf';
var swfBGColor = '#fff';
var swfWidth   = 968;
var swfHeight  = 265;

// file name of change images
var images = [];
images.push('common/img/image_a.jpg');
images.push('common/img/image_b.jpg');
images.push('common/img/image_c.jpg');
images.push('common/img/image_d.jpg');
images.push('common/img/image_f.jpg');

var hasFlashPlugin = DetectFlashVer(swfReqVer[0], swfReqVer[1], swfReqVer[2]);
// hasFlashPlugin = false; // comment out

if (hasFlashPlugin) {
	// check of Flash ver
	write_object_embed_tag(
		swfId, swfWidth, swfHeight, // ID
		'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
		'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ swfReqVer[0] +','+ swfReqVer[1] +','+ swfReqVer[2] +','+ swfReqVer[3] +'',
		'application/x-shockwave-flash',
		'http://www.macromedia.com/go/getflashplayer/',
		{
			src     : swfSrc,
			quality : 'high',
			bgcolor : swfBGColor,
			width   : swfWidth,
			height  : swfHeight,
			name : swfId,
			menu : 'false',
			align : 'middle',
			allowScriptAccess: 'sameDomain',
			type : 'application/x-shockwave-flash',
			pluginspage:'http://www.macromedia.com/go/getflashplayer'
		}
	);
} else {
	// can not check of Flash ver
	var img = images[Math.floor(Math.random() * images.length)];
	document.write("<img src='" + img + "'>");
}
