	uAgent = navigator.userAgent.toUpperCase();
	if (uAgent.indexOf("WIN") < 0){ location.href = "./index0.htm"; }
	if (!document.getElementById){ location.href = "./index0.htm"; }

	brow = navigator.userAgent;
	if (!document.all && !brow.match(/Firefox/i)) { scrollbars.visible = false;}
	function ns_scrollbars() {
		if (!document.all && !brow.match(/Firefox/i)) { scrollbars.visible = true; }
	}

	var h = 0;
	var w = 0;
	var i = 0;
	var flg;

	topImage = new Array();
	for(i=0; i<=24; i++){ topImage[i] = new Image(); }
	topImage[0].src = "topimg/base00.gif";
	topImage[1].src = "topimg/on1.gif"; topImage[5].src = "topimg/off1.gif";
	topImage[2].src = "topimg/on2.gif"; topImage[6].src = "topimg/off2.gif";
	topImage[3].src = "topimg/on3.gif"; topImage[7].src = "topimg/off3.gif";
	topImage[4].src = "topimg/on4.gif"; topImage[8].src = "topimg/off4.gif";
	topImage[9].src = "topimg/kao00.gif"; topImage[10].src = "topimg/kaob00.gif";
	topImage[11].src = "topimg/winkerr.gif"; topImage[12].src = "topimg/winkerl.gif";
	topImage[13].src = "topimg/lightr.gif"; topImage[14].src = "topimg/lightl.gif";
	topImage[15].src = "topimg/bgimg2.jpg";

	topImage[16].src = "image/idstit.gif";
	topImage[17].src = "topimg/car1.gif";
	topImage[18].src = "topimg/car2.gif";
	topImage[19].src = "topimg/car3.gif";
	topImage[20].src = "topimg/car4.gif";
	topImage[21].src = "topimg/car5.gif";

	topImage[22].src = "topimg/bgviw.gif";
	topImage[23].src = "topimg/kumo1.gif";
	topImage[24].src = "topimg/plane1.gif";

	var scrwid = screen.width;
	var winwid;

	function setting() {
	    if(document.all || brow.match(/Firefox/i)){
		document.body.style.overflow = "hidden";

		document.getElementById('menu_vew').style.visibility = "hidden";
		if (uAgent.indexOf("MSIE 7") >= 0){ document.getElementById('menu_vew').style.top = "-535px"; }
		else if (uAgent.indexOf("MSIE 6") >= 0){ document.getElementById('menu_vew').style.top = "-536px"; }
		else if (uAgent.indexOf("MSIE 8") >= 0){ document.getElementById('menu_vew').style.top = "-536px"; }
		else if (uAgent.indexOf("FIREFOX") >= 0){ document.getElementById('menu_vew').style.top = "-556px"; }
		else { document.getElementById('menu_vew').style.top = "-545px"; }
		document.getElementById('menu_vew').style.left = "227px";

		winwid = getBrowserWidth();

		document.getElementById('kumoimg1').style.left = "" + (winwid / 2 - 450) + "px";
		document.getElementById('kumoimg2').style.left = "" + (winwid / 2 - 600) + "px";
		document.getElementById('kumoimg3').style.left = "" + (winwid / 2 - 420) + "px";
		document.getElementById('kumoimg4').style.left = "" + (winwid / 2 + 245) + "px";

		block1 = carimg1.style;
		block2 = carimg2.style;
		block3 = carimg3.style;
		block4 = carimg4.style;
		block5 = carimg5.style;
		// block6 = kumoimg1.style;
		block7 = planeimg1.style;

		block1.scrx = 150;
		block2.scrx = 750;
		block3.scrx = -305;
		block4.scrx = 500;
		block5.scrx = 50;
		// block6.scrx = 100;

		move_leftA();
		move_leftB();
		move_rightA();
		move_rightB();
		move_rightC();
		// move_kumo();
		plane_set();
	    }
	}

	// IE、FFでウィンドウのインナーサイズ取得する関数
	function getBrowserWidth() {
		if (window.innerWidth) { return window.innerWidth; }	// FF
		else if (document.documentElement && document.documentElement.clientWidth != 0) { return document.documentElement.clientWidth; }	// IE
		else if (document.body) { return document.body.clientWidth; }	// IE
		return 0;
	}

	function plane_set() {
		// density=100;
		// zoom=10;
		zoom=1;
		zflag=0;
		sp=250;
		// document.all.planeimg1.filters(0).Opacity=density;
		document.planeImg1.width=zoom;
		document.planeImg1.height=zoom;
		// 中心から+362
		block7.scrx = Math.round(scrwid/2) + 362;
		block7.scry = 310;
		block7.left = block7.scrx;
		block7.top = block7.scry;
		// plane_fadein();
		plane_move();
	}

	/*
	function plane_fadein() {
		if (density <= 100) {
			document.all.planeimg1.filters(0).Opacity=density;
			density++;
			if (density == 20){ plane_move(); }
			setTimeout("plane_fadein()", 100);
		} else { }
	}
	*/

	function plane_move() {
		if (block7.scrx >= -110 && block7.scry >= -53) {
			zflag++;
			if (zflag >= 2) {
				document.planeImg1.width=zoom;
				document.planeImg1.height=zoom;
				zoom++;
				zflag = 0;
			}
			block7.scrx -= 1;
			block7.left = block7.scrx;
			block7.scry -= 1;
			block7.top = block7.scry;

			if(sp > 15){ sp -= 1; }
			setTimeout("plane_move()", sp);
		} else { setTimeout("plane_set()", 10000); }
	}

	function move_leftA() {
		if (block1.scrx >= -400) {
			block1.scrx -= 1;
			block1.left = block1.scrx;
			setTimeout("move_leftA()", 30);
		} else {
			block1.scrx = scrwid;
			move_leftA();
		}
	}

	function move_leftB() {
		if (block2.scrx >= -250) {
			block2.scrx -= 1;
			block2.left = block2.scrx;
			setTimeout("move_leftB()", 5);
		} else {
			block2.scrx = scrwid;
			move_leftB();
		}
	}

	function move_rightA() {
		if (block3.scrx <= scrwid) {
			block3.scrx += 1;
			block3.left = block3.scrx;
			setTimeout("move_rightA()", 20);
		} else {
			block3.scrx = -400;
			move_rightA();
		}
	}

	function move_rightB() {
		if (block4.scrx <= scrwid) {
			block4.scrx += 1;
			block4.left = block4.scrx;
			setTimeout("move_rightB()", 20);
		} else {
			block4.scrx = -400;
			move_rightB();
		}
	}

	function move_rightC() {
		if (block5.scrx <= scrwid) {
			block5.scrx += 1;
			block5.left = block5.scrx;
			setTimeout("move_rightC()", 5);
		} else {
			block5.scrx = -250;
			move_rightC();
		}
	}

	/*
	function move_kumo() {
		if (block6.scrx >= -89) {
			block6.scrx -= 1;
			block6.left = block6.scrx;
			setTimeout("move_kumo()", 2000);
		} else {
			block6.scrx = scrwid;
			move_kumo();
		}
	}
	*/

	function bg_viw() {
		var ic = 0;
		var scrw = screen.width;
		document.write("<DIV CLASS='back' ID='bgviw'><NOBR>");
		while(ic <= scrw){
			document.write("<IMG src='topimg/bgviw.gif' width='152' height='53' border='0'>");
			ic = ic + 152;
		}
		document.write("</NOBR></DIV>");
	}


	var timerid = 0;
	var lightflg = 0;

	function imgOn(s,e){
		for(i=s; i<=e; i++){ document.images['linkImg' + i].src = topImage[i].src; }
		if(s == 1 && e == 1 && !timerid){ timerid = setTimeout("lighton()",300); }
		if(s == 2){
			document.getElementById('kao1').style.visibility = "visible";
			document.getElementById('kao2').style.visibility = "visible";
			document.getElementById('winkl').style.visibility = "visible";
		}
		if(s == 3){
			document.getElementById('kao1').style.visibility = "visible";
			document.getElementById('kao2').style.visibility = "visible";
			document.getElementById('winkr').style.visibility = "visible";
		}
		if(s == 4){
			document.getElementById('winkr').style.visibility = "visible";
			document.getElementById('winkl').style.visibility = "visible";
		}
	}

	function imgOff(s,e){
		for(i=s; i<=e; i++){ document.images['linkImg' + i].src = topImage[i + 4].src; }
		document.getElementById('kao1').style.visibility = "hidden";
		document.getElementById('kao2').style.visibility = "hidden";
		document.getElementById('winkr').style.visibility = "hidden";
		document.getElementById('winkl').style.visibility = "hidden";
	}

	function lighton(){
	    if(lightflg < 4){
		lightflg++;
		if(document.getElementById('lightr').style.visibility == "visible"){
			document.getElementById('lightr').style.visibility = "hidden";
			document.getElementById('lightl').style.visibility = "hidden";
		}else{
			document.getElementById('lightr').style.visibility = "visible";
			document.getElementById('lightl').style.visibility = "visible";
		}
		setTimeout("lighton()",300);
	    } else {
		lightflg = 0;
		timerid = 0;
	    }
	}

	var timerID;
	function menu_vew(a){
		if(a==1) {
			document.getElementById('menu_vew').style.visibility = "visible";
			clearTimeout(timerID);
		}
		else if(a==-1) {
			timerID = setTimeout("menu_hide()", 500);
		}
	}
	function menu_hide(){ document.getElementById('menu_vew').style.visibility = "hidden"; }
	window.document.onclick = menu_hide;
