var Win = (navigator.appVersion.indexOf("Win") != -1);
var Mac = (navigator.userAgent.indexOf("Mac",0) != -1);
var MSIE = (navigator.userAgent.indexOf("MSIE") != -1);
var NN = (navigator.appName.indexOf("Netscape",0) != -1); // NN and Mozilla
var NN6orL = (navigator.userAgent.indexOf("Netscape") != -1); // 6.0 or later
var Mozilla = (navigator.userAgent.indexOf("Mozilla") != -1); // NN and Mozilla
var Opera = (navigator.userAgent.indexOf("Opera") != -1);
var swflash = "application/x-shockwave-flash";
var navimt = navigator.mimeTypes;
var fpVer = 8;
var plugin = (navimt && navimt[swflash]) ? navimt[swflash].enabledPlugin : 0;
var startMovie = false;

if(plugin){
	var nnswflash = navigator.plugins["Shockwave Flash"].description.split(" ");
	for(var i = 0; i < nnswflash.length; ++i){
		if(isNaN(parseInt(nnswflash[i]))) continue;
		var yourFpVer = nnswflash[i];
	}
	startMovie = yourFpVer >= fpVer;
}else if(navigator.userAgent && MSIE && Win){
	document.write('<scr' + 'ipt language=\"VBScript"\ type=\"text/vbscript\"\> \n');
	document.write('on error resume next \n');
	document.write('startMovie = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & fpVer)))\n');
	document.write('</scr' + 'ipt\> \n');
}
function SetPromotion(){
	if(startMovie){
		document.write('<object id="' + gnr.objid + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + gnr.width + '" height="' + gnr.height + '" alt="*">');
		document.write('<param name="movie" value="' + gnr.objname + '" />');
		document.write('<param name="play" value="true" />');
		document.write('<param name="loop" value="true" />');
		document.write('<param name="menu" value="' + gnr.menu + '" />');
		document.write('<param name="quality" value="' + gnr.quality + '" />');
		document.write('<param name="bgcolor" value="' + gnr.bgcolor + '" />');
		document.write('<param name="salign" value="' + gnr.salign + '" />');
		document.write('<param name="scale" value="' + gnr.scale + '" />');
		document.write('<param name="wmode" value="opaque" />');
		document.write('<embed');
		document.write(' src="' + gnr.objname + '"');
		document.write(' loop="false"');
		document.write(' menu="' + gnr.menu + '"');
		document.write(' quality="' + gnr.quality + '"');
		document.write(' scale="' + gnr.scale + '"');
		document.write(' salign="' + gnr.salign + '"');
		document.write(' bgcolor="' + gnr.bgcolor + '"');
		document.write(' width="' + gnr.width + '"');
		document.write(' height="' + gnr.height + '"');
		document.write(' name="' + gnr.objid + '"');
		document.write(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"');
		document.write('></embed>');
		document.write('</object>');
		document.close();
	}else{
		document.write('<img src="/hirai/images/1.jpg" width="' + gnr.width + '" height="' + gnr.height + '" border="0" alt="平井堅オフィシャルウェブサイト" />');
		document.close();
	}
}

