function BrowserCheck(){

	this.NavName = navigator.appName;
	this.NavAnt = navigator.userAgent;
	this.NavVer = navigator.appVersion;
	this.NavPlug = navigator.plugins;
	this.NavVsub = navigator.vendorSub;
	this.NavVerI = parseInt(this.NavVer);
	this.NavVerF = parseFloat(this.NavVer);
	
	this.NN = (this.NavName == "Netscape")
	this.NN4 = (this.NavAnt.indexOf("Mozilla/4") != -1);
	this.NN6 = (this.NavAnt.indexOf("Netscape6/") != -1);
	this.NN7 = (this.NavAnt.indexOf("Netscape/7") != -1);
		
	this.IE = (this.NavName == "Microsoft Internet Explorer");
	this.IE3 = (this.NavAnt.indexOf('MSIE 3')>0);
	this.IE45 = (this.NavVer.indexOf('MSIE 4.5')>0);
	this.IE401 = (this.NavVer.indexOf('MSIE 4.01')>0);
	this.IE4 = (this.NavVer.indexOf('MSIE 4')>0);
	this.IE51 = (this.NavAnt.indexOf('MSIE 5.1')>0);
	this.IE52 = (this.NavAnt.indexOf('MSIE 5.2')>0);
	this.IE5 = (this.NavVer.indexOf('MSIE 5')>0);		
	this.IE6 = (this.NavVer.indexOf('MSIE 6')>0);

	this.GEK = (this.NavAnt.indexOf("Gecko") != -1);
	this.SAF = (this.NavAnt.indexOf("Safari",0) != -1);
	this.CAB = (this.NavAnt.indexOf("iCab",0) != -1);
	this.OPE = (this.NavAnt.indexOf("Opera",0) != -1);

	this.Win = (this.NavAnt.indexOf("Win",0) != -1);
	this.XP = (this.NavAnt.match(/NT 5\.1|XP/));
	this.ME = (this.NavAnt.match(/4\.90|ME/));
	this.TK = (this.NavAnt.match(/NT 5\.0|2000/));
	this.NT = (this.NavAnt.match(/NT 5\.0|WinNT/));

	this.Mac = (this.NavAnt.indexOf("Mac",0) != -1);
	this.M68k = (this.NavAnt.indexOf("68k",0)!=-1);

	this.Uix = (this.NavAnt.indexOf("X11",0) != -1);
	this.EGB = (this.NavAnt.indexOf("Planetweb",0) != -1);

}

var flash_version = 8;
var FlashInstalled = false;
var checkB = new BrowserCheck();
if(checkB.OPE && navigator.plugins["Shockwave Flash"]){
	var FlashInstalled = false;
}else if(checkB.Win && checkB.IE){
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('Function VBGetSwfVer(i)\n');
	document.write('on error resume next\n');
	document.write('Dim swControl, swVersion\n');
	document.write('swVersion = 0\n');
	document.write('set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
	document.write('if (IsObject(swControl)) then\n');
	document.write('  swVersion = swControl.GetVariable("$version")\n');
	document.write('end if\n');
	document.write('VBGetSwfVer = swVersion\n');
	document.write('End Function\n');
	document.write('</SCR' + 'IPT\> \n');
	var mjVer = 0;
	for (i=15;i>0;i--) {	
		versionStr = VBGetSwfVer(i);
		if (versionStr != 0){
			mjVer = i;
			break;
		}
	}
	if(mjVer >= flash_version){
		var FlashInstalled = true;
	}
	if(checkB.IE4){
		var FlashInstalled = false;
	}
}else if(checkB.Mac && checkB.IE){
	if(!checkB.IE4 && navigator.plugins["Shockwave Flash"]){
		var sp = navigator.plugins["Shockwave Flash"].description.indexOf("Flash");
		var ep = navigator.plugins["Shockwave Flash"].description.lastIndexOf(" ");
		var aver = parseFloat(navigator.plugins["Shockwave Flash"].description.substring(sp+6,ep));
		if(aver >= flash_version){
			var FlashInstalled = true;
		}
	}
}else if(checkB.NN && navigator.plugins["Shockwave Flash"]){
	var sp = navigator.plugins["Shockwave Flash"].description.indexOf("Flash");
	var ep = navigator.plugins["Shockwave Flash"].description.lastIndexOf(" ");
	var aver = parseFloat(navigator.plugins["Shockwave Flash"].description.substring(sp+6,ep));
	if(aver >= flash_version){
		var FlashInstalled = true;
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function top_swf(){
	if(FlashInstalled){
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="795" height="237" id="main" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="main.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="main.swf" quality="high" bgcolor="#ffffff" width="795" height="237" name="main" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
	}else{
		document.write('<img src="images/noflash.jpg" alt="より安全に､より快適に。目指すのは､お客様本位のエレベーターです。" />');
	}
}




