var pluginVer = 0;
var requiredVer= 7;

var isWinIE = false;

var altcode = new String('<p>会場スケッチはMacromedia Flash Player 7以降がインストールされているコンピュータでお楽しみください。</p>');
var sharedcode = new String();

var sharedcode = '<param name="allowScriptAccess" value="sameDomain">';
sharedcode += '<param name="movie" value="sketch.swf">';
sharedcode += '<param name="quality" value="high">';
sharedcode += '<param name="salign" value="TL">';
sharedcode += '<param name="bgcolor" value="#ffffff">';
sharedcode += altcode;
sharedcode += '</object>';


/*@cc_on @if (@_win32 || @_win16) isWinIE = true; @end @*/
if(isWinIE){
	document.writeln('<script type="text/vbscript">');
	document.writeln('On Error Resume Next');
	document.writeln('pluginVer=Left(Hex(Int(CreateObject("ShockwaveFlash.ShockwaveFlash").FlashVersion)),1)');
	document.writeln('</s' + 'cript>');
}else if(navigator.mimeTypes["application/x-shockwave-flash"]){
	var plugin = navigator.mimeTypes["application/x-shockwave-flash"];
	if(plugin){
		pluginVer = parseInt(plugin.enabledPlugin.description.substring(plugin.enabledPlugin.description.indexOf(".") -1));
	}
}

function putSketch(){
	if (pluginVer >= requiredVer){
		document.write('<object type="application/x-shockwave-flash" data="sketch.swf" width="706" height="600" id="sketch">');
		document.write(sharedcode);
	}else if(isWinIE){
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="706" height="600" id="sketch">');
		document.write(sharedcode);
	}else{
		document.write(altcode);
	}
}

