flgtoyota="0";
flgnissan="0";
flghonda="0";
flgmazda="0";
flgjaguar="0";
flgsubaru="0";

flgaero="0";
flgdmd="0";
flglight="0";
flglamp="0";
flgother="0";

aa = "";

//見出しのon
function menu(mgif, place){

if (place=="toyota") { aa = flgtoyota; }
if (place=="nissan") { aa = flgnissan; }
if (place=="honda") { aa = flghonda; }
if (place=="mazda") { aa = flgmazda; }
if (place=="jaguar") { aa = flgjaguar; }
if (place=="subaru") { aa = flgsubaru; }

if (place=="aero") { aa = flgaero; }
if (place=="dmd") { aa = flgdmd; }
if (place=="light") { aa = flglight; }
if (place=="lamp") { aa = flglamp; }
if (place=="other") { aa = flgother; }

cc = "id"+place;
	if ( aa == "0" ) {
	document.images[cc].src =mgif;
	}
}

//見出しのoff
function menuf(mgif, place){

if (place=="toyota") { aa = flgtoyota; }
if (place=="nissan") { aa = flgnissan; }
if (place=="honda") { aa = flghonda; }
if (place=="mazda") { aa = flgmazda }
if (place=="jaguar") { aa = flgjaguar; }
if (place=="subaru") { aa = flgsubaru; }

if (place=="aero") { aa = flgaero; }
if (place=="dmd") { aa = flgdmd; }
if (place=="light") { aa = flglight; }
if (place=="lamp") { aa = flglamp; }
if (place=="other") { aa = flgother; }

cc = "id"+place;
	if ( aa == "0" ) {
	document.images[cc].src =mgif;
	}
}


//プルダウンメニューのonoff

function sw(place){

if (place=="toyota") { aa = flgtoyota; }
if (place=="nissan") { aa = flgnissan }
if (place=="honda") { aa = flghonda; }
if (place=="mazda") { aa = flgmazda; }
if (place=="jaguar") { aa = flgjaguar; }
if (place=="subaru") { aa = flgsubaru; }

if (place=="aero") { aa = flgaero; }
if (place=="dmd") { aa = flgdmd; }
if (place=="light") { aa = flglight; }
if (place=="lamp") { aa = flglamp; }
if (place=="other") { aa = flgother; }




if ( aa == "0" ) {
	if (place=="aero") { flgaero = "1"; }
	if (place=="dmd") { flgdmd = "1"; }
	if (place=="light") { flglight = "1"; }
	if (place=="lamp") { flglamp = "1"; }
	if (place=="other") { flgother = "1"; }

	if (place=="toyota") { flgtoyota ="1"; }
	if (place=="nissan") { flgnissan ="1"; }
	if (place=="honda") { flghonda ="1"; }
	if (place=="mazda") { flgmazda ="1"; }
	if (place=="jaguar") { flgjaguar ="1"; }
	if (place=="subaru") { flgsubaru ="1"; }

cc = "id"+place;
	if ( aa == "0" ) {
	bimg    = "img/b_" +place+ "_on.gif";
	document.images[cc].src =bimg;
	}

	basyo=place;
	document.getElementById(basyo).style.visibility='visible';
	document.getElementById(basyo).style.position='static';
	document.getElementById(basyo).style.left='0px';
	document.getElementById(basyo).style.top='0px';
}

else {
	if (place=="toyota") { flgtoyota ="0"; }
	if (place=="nissan") { flgnissan ="0"; }
	if (place=="honda") { flghonda ="0"; }
	if (place=="mazda") { flgmazda ="0"; }
	if (place=="jaguar") { flgjaguar ="0"; }
	if (place=="subaru") { flgsubaru ="0"; }

	if (place=="aero") { flgaero = "0"; }
	if (place=="dmd") { flgdmd = "0"; }
	if (place=="light") { flglight = "0"; }
	if (place=="lamp") { flglamp = "0"; }
	if (place=="other") { flgother = "0"; }
	basyo   = place;
	basyo2 = "id"+ place;
	bimg    = "img/b_" +place+ "_off.gif";
	document.images[basyo2].src =bimg;
	document.getElementById(basyo).style.visibility='hidden';
	document.getElementById(basyo).style.position='absolute';

	}
}

//プルダウンメニューのoff
function moff(place){
	basyo   = place;
	basyo2 = "id"+ place;
	bimg    = "img/b_" +place+ "_off.gif";
	document.images[basyo2].src =bimg;
	document.getElementById(basyo).style.visibility='hidden';
	document.getElementById(basyo).style.position='absolute';
}

//プルダウンメニューのon
function mon(place){
	basyo=place;
	document.getElementById(basyo).style.visibility='visible';
	document.getElementById(basyo).style.position='relative';
	document.getElementById(basyo).style.left='0px';
	document.getElementById(basyo).style.top='0px';
}

function getOSType() {
    var uAgent  = navigator.userAgent.toUpperCase();
    if (uAgent.indexOf("MAC") >= 0) return "MacOS";
    if (uAgent.indexOf("WIN") >= 0) return "Windows";
    if (uAgent.indexOf("X11") >= 0) return "UNIX";
}


function sk(place,iro){
	document.images[place].src =iro;
}

function toi(){
return openwin3('toi.html',450,550 );
}

function toi2(){
return openwin3('../new/neworder.html',550,590 );
}

function openwin(url,wd,ht) {
 crwind = window.open(url, '_photo','width='+wd+',height='+ht+',left=20,top=20,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
 crwind.focus();
}

function openwin2(url,ht) {
var crwind2;
 crwind2 = window.open(url, 'photo','height='+ht+',width=480,left=20,top=20,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
 crwind2.focus();
}

function openwin3(url,wd,ht) {
 crwind = window.open(url, '_photo','width='+wd+',height='+ht+',left=20,top=20,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=yes');
 crwind.focus();
}

function plink(fl) {
fl2 = "../popup/new"+ fl + ".php" ;
return openwin2(fl2,570);
}

function mklink(fl) {
fl2 = "../mk/item"+ fl + ".php" ;
return openwin2(fl2,570);
}

function wclose(url) {
window.close();
var op;
op=window.open(url,'win3','status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes,directories=yes,width=780,height=600');
op.focus();
}

function irekae(pic,place) {
document.images[place].src =pic;
}

function cgurl(add) {
window.opener.location.href =add;
}

function pull(flg) {

if (flg == 'gt') document.getElementById('mnbman').style.visibility='hidden',document.getElementById('mngt').style.visibility='visible';

else if (flg == 'bm')  document.getElementById('mnbman').style.visibility='visible',document.getElementById('mngt').style.visibility='hidden';

else document.getElementById('mnbman').style.visibility='hidden',document.getElementById('mngt').style.visibility='hidden';
}

function pu2(flg2) {

//alert("flg2=" +flg2);

if (flg2 == 'aero') document.getElementById('mndmd').style.visibility='hidden',document.getElementById('mnaero').style.visibility='visible', document.getElementById('mnlwp').style.visibility='hidden', document.getElementById('mnlamp').style.visibility='hidden';

else if (flg2 == 'dmd')  document.getElementById('mndmd').style.visibility='visible', document.getElementById('mnaero').style.visibility='hidden', document.getElementById('mnlwp').style.visibility='hidden', document.getElementById('mnlamp').style.visibility='hidden';

else if (flg2 == 'lwp')  document.getElementById('mnlwp').style.visibility='visible', document.getElementById('mnaero').style.visibility='hidden', document.getElementById('mndmd').style.visibility='hidden', document.getElementById('mnlamp').style.visibility='hidden';

else if (flg2 == 'lamp')  document.getElementById('mnlamp').style.visibility='visible', document.getElementById('mnaero').style.visibility='hidden', document.getElementById('mndmd').style.visibility='hidden', document.getElementById('mnlwp').style.visibility='hidden';

else document.getElementById('mnaero').style.visibility='hidden', document.getElementById('mndmd').style.visibility='hidden', document.getElementById('mnlwp').style.visibility='hidden', document.getElementById('mnlamp').style.visibility='hidden';
}

function pu3(flg3) {

//alert("flg3=" +flg3);

if (flg3 == 'toyota') document.getElementById('mntoy').style.visibility='visible', document.getElementById('mnnis').style.visibility='hidden',document.getElementById('mnhon').style.visibility='hidden', document.getElementById('mnmaz').style.visibility='hidden';

else if (flg3 == 'nissan')  document.getElementById('mnnis').style.visibility='visible', document.getElementById('mnhon').style.visibility='hidden', document.getElementById('mnmaz').style.visibility='hidden', document.getElementById('mntoy').style.visibility='hidden';

else if (flg3 == 'honda')  document.getElementById('mnhon').style.visibility='visible', document.getElementById('mnnis').style.visibility='hidden', document.getElementById('mnmaz').style.visibility='hidden', document.getElementById('mntoy').style.visibility='hidden';

else if (flg3 == 'mazda')  document.getElementById('mnmaz').style.visibility='visible', document.getElementById('mnnis').style.visibility='hidden', document.getElementById('mnhon').style.visibility='hidden', document.getElementById('mntoy').style.visibility='hidden';

else document.getElementById('mntoy').style.visibility='hidden', document.getElementById('mnnis').style.visibility='hidden', document.getElementById('mnhon').style.visibility='hidden', document.getElementById('mnmaz').style.visibility='hidden';
}

//TOP点滅

function tp(flg,pl){
	if (flg == '1') { document.images[pl].src ="../img/ya.gif";}
	else { document.images[pl].src ="../img/ya_off.gif";}
}

function myNoMenu(){           // IEの右クリック禁止
  event.cancelBubble = true
  event.returnValue = false;
  return false;
}
function myEventN6(myEvent){  // NN6のクリック時
   if(myEvent.button == 2){   //   右クリックか?
      alert("右クリックは禁止しています");
   }
}
function myEventIE(){         // IEのクリック時
   if(event.button == 2){     //   右クリックか?
      myNoMenu();
      alert("右クリックは禁止しています");
   }
}
function myEventNN(myEvent){  // NN4のクリック時
   if(myEvent.which == 3){    //   右クリックか?
      alert("右クリックは禁止しています");
      return false;
   }
}
if(document.getElementById){     // DOM対応?
   if (window.addEventListener){ // NN6?
      window.addEventListener("mousedown",myEventN6,true);
   }
}
if(document.all){      // IE4以上?
   document.oncontextmenu = myNoMenu;
   document.onmousedown = myEventIE ;
}
if(document.layers){   // NN4?
   document.captureEvents(Event.MOUSEDOWN);
   document.onmousedown = myEventNN ;
}



function ckop(remText) {
a = remText.indexOf ("▼", 0);
if ( a >= 0 ) { alert("オプションを選択してからカートに入れて下さい"); return false;}
}


//＿＿ブラウザの判別テスト用（実際には使ってない）
function brow(){

var ua = navigator.userAgent;

if (ua.match(/Opera[\/\s](\d\.\d+)/)) {
	alert ("Opera " + RegExp.$1);
}
else if (ua.match(/MSIE (\d\.\d+)/)) {
	alert("Internet Explorer " + RegExp.$1);
}
else if (ua.match(/Mozilla\/(4\.[5678]\d?)/)) {
	document.write("Netscape Communicator " + RegExp.$1);
}
else if (ua.match(/Netscape6?\/([\.\d]+)/)) {
	alert("Netscape " + RegExp.$1);
}
else if (ua.match(/Safari\/([\.\d]+)/)) {
	alert("Safari " + RegExp.$1);
}
else if (ua.match(/Gecko/)) {
	if (ua.match(/(Firebird|Firefox)\/([\.\d]+)/)) {
		alert("Mozilla " + RegExp.$1 + " " + RegExp.$2);
	}
	else if (ua.match(/Thunderbird\/([\.\d]+)/)) {
		alert("Mozilla Thunderbird " + RegExp.$1);
	}
	else if (ua.match(/rv:([\.\d]+)/)) {
		alert("Mozilla " + RegExp.$1);
	}
	else {
		alert("Mozilla");
	}
}
else {
	alert("N/A");
}
}
//＿＿


box="";
fd="";
imgpt="";

function nextimg(fd,imgpt){

a=document.images['pt'].src;

if (fd=='s') box="2006/s_";
else if (fd=='wt') box="2009/wt_";
else if (fd=='wh') box="2009/wh_";
else if (fd=='fd6s') box="2009/fd6s_";
else if (fd=='fd7i') box="2009/fd7i_";
else if (fd=='r67fj') box="2009/r67fj_";
else if (fd=='fd4u') box="2009/fd4u_";
else if (fd=='fd4hg') box="2009/fd4hg_";
else if (fd=='r34ok') box="2009/r34ok_";
else if (fd=='exo') box="2009/exo_";
else if (fd=='fdly') box="2009/fdly_";
else if (fd=='fdlbu') box="2009/fdlbu_";
else if (fd=='r2ap') box="2009/r2ap_";
else if (fd=='bc03') box="2009/bc03_";
else if (fd=='ueo') box="2008/ueo_";
else if (fd=='mh6') box="2008/mh6_";
else if (fd=='mh3') box="2008/mh3_";
else if (fd=='mk6') box="2008/mk6_";
else if (fd=='ns7') box="2008/ns7_";
else if (fd=='usa') box="2007/usa_";
else if (fd=='fuji2') box="2007/fuji2_";
else if (fd=='ap') box="2007/ap_";
else if (fd=='r5e') box="2007/r5e_";
else if (fd=='r4sg') box="2007/r4sg_";
else if (fd=='r3s') box="2007/r3s_";
else if (fd=='r2f') box="2007/r2f_";
else if (fd=='f') box="2006/f_";
else if (fd=='u') box="2006/u_";
else if (fd=='e') box="2006/e_";
else if (fd=='sz') box="2006/sz_";
else if (fd=='f2') box="2006/f2_";
else if (fd=='09') box="2006/09_";
else if (fd=='ot') box="2006/ot_";
else if (fd=='05m') box="2005/05m_";
else if (fd=='05e') box="2005/05e_";
else if (fd=='05u') box="2005/05u_";
else if (fd=='04') box="2004/04_";
else if (fd=='03') box="2003/03_";
else if (fd=='98') box="gt/98_";
else if (fd=="97") box="gt/97_";

var ua = navigator.userAgent;

if (ua.match(/Opera[\/\s](\d\.\d+)/)) {
//	alert ("Opera " + RegExp.$1);
return next(box,imgpt);
}
else if (ua.match(/MSIE (\d\.\d+)/)) {
//	alert("Internet Explorer " + RegExp.$1);

document.images['pt'].filters.revealTrans.apply();
document.images['pt'].src = box + imgpt + ".jpg";
document.images['pt'].filters.revealTrans.play();
//box="";
}

else if (ua.match(/Mozilla\/(4\.[5678]\d?)/)) {
//	document.write("Netscape Communicator " + RegExp.$1);
return next(box,imgpt);
}
else if (ua.match(/Netscape6?\/([\.\d]+)/)) {
//	alert("Netscape " + RegExp.$1);
return next(box,imgpt);
}
else if (ua.match(/Safari\/([\.\d]+)/)) {
//	alert("Safari " + RegExp.$1);
return next(box,imgpt);
}
else if (ua.match(/Gecko/)) {
	if (ua.match(/(Firebird|Firefox)\/([\.\d]+)/)) {
//		alert("Mozilla " + RegExp.$1 + " " + RegExp.$2);

return next(box,imgpt);
	}
	else if (ua.match(/Thunderbird\/([\.\d]+)/)) {
//		alert("Mozilla Thunderbird " + RegExp.$1);
return next(box,imgpt);
	}
	else if (ua.match(/rv:([\.\d]+)/)) {
//		alert("Mozilla " + RegExp.$1);
return next(box,imgpt);
	}
	else {
//		alert("Mozilla");
return next(box,imgpt);
	}
}
else {
//	alert("N/A");
return next(box,imgpt);
}
}

function next(box,imgpt){
document.images['pt'].src = box + imgpt + ".jpg";
}

///▽/////////////////////////////
var sw0=0;
function swusa() {
	if (sw0 != 1) document.getElementById('usa').style.display='inline', sw0 = 1,
document.images['p00'].src = 'img/s_r2.gif';
	else document.getElementById('usa').style.display='none', sw0= 0,
document.images['p00'].src = 'img/s_w.gif';
}

var sw1=0;
function swfj() {
	if (sw1 != 1) document.getElementById('fuji').style.display='inline', sw1 = 1,
document.images['p01'].src = 'img/s_r2.gif';
	else document.getElementById('fuji').style.display='none', sw1= 0,
document.images['p01'].src = 'img/s_w.gif';
}

var sw2=0;
function swsz() {
	if (sw2 != 1) document.getElementById('suzuka').style.display='inline', sw2 = 1,
document.images['p02'].src = 'img/s_r2.gif';
	else document.getElementById('suzuka').style.display='none', sw2= 0,
document.images['p02'].src = 'img/s_w.gif';
}

var sw3=0;
function swsugo() {
	if (sw3 != 1) document.getElementById('sugo').style.display='inline', sw3 = 1,
document.images['p03'].src = 'img/s_r2.gif';
	else document.getElementById('sugo').style.display='none', sw3= 0,
document.images['p03'].src = 'img/s_w.gif';
}

var sw4=0;
function sweb() {
	if (sw4 != 1) document.getElementById('ebisu').style.display='inline', sw4 = 1,
document.images['p04'].src = 'img/s_r2.gif';
	else document.getElementById('ebisu').style.display='none', sw4= 0,
document.images['p04'].src = 'img/s_w.gif';
}

var sw5=0;
function swauto() {
	if (sw5 != 1) document.getElementById('auto').style.display='inline', sw5 = 1,
document.images['p05'].src = 'img/s_r2.gif';
	else document.getElementById('auto').style.display='none', sw5= 0,
document.images['p05'].src = 'img/s_w.gif';
}

var sw6=0;
function swf2() {
	if (sw6 != 1) document.getElementById('fj2').style.display='inline', sw6 = 1,
document.images['p06'].src = "img/s_r2.gif";
	else document.getElementById('fj2').style.display='none', sw6= 0,
document.images['p06'].src = "img/s_w.gif";
}
///△/////////////////////////////


function chFrame(jumpURL) {
 mvFrame.location.href = jumpURL; 
}

function cl(pic){
p='m'+pic;
fg=pic;
	document.images[p].src = 'menu/0'+pic + 'mv_on.jpg';
	//今画像はいくつあるか　sに数（初期値）を入れる
	var s=8;
	var n=1;

	while(n<=s){
	pic=n;
	p='m'+n;
	if(fg!=n)	document.images[p].src = 'menu/0'+pic + 'mv_off.jpg';
	n=n+1;}
}

///▽/////////////////////////////

var sw00=0;
var sw01=0;
var sw02=0;
var sw03=0;
var sw04=0;

function swstm(nm) {
b=nm;
d='img/s_r2.gif';
e='img/s_w.gif';

if(b=='ueo') {c='pm00';
	if (sw00 != 1) document.getElementById(b).style.display='inline', sw00 = 1, f=d;
	else document.getElementById(b).style.display='none', sw00 = 0, f=e;}

if(b=='ns') {c='pm01';
	if (sw01 != 1) document.getElementById(b).style.display='inline', sw01 = 1, f=d;
	else document.getElementById(b).style.display='none', sw01 = 0, f=e;}

if(b=='mk') {c='pm02';
	if (sw02 != 1) document.getElementById(b).style.display='inline', sw02 = 1, f=d;
	else document.getElementById(b).style.display='none', sw02 = 0, f=e;}

if(b=='mh') {c='pm03';
	if (sw03 != 1) document.getElementById(b).style.display='inline', sw03 = 1, f=d;
	else document.getElementById(b).style.display='none', sw03 = 0, f=e;}

if(b=='ly') {c='pm04';
	if (sw04 != 1) document.getElementById(b).style.display='inline', sw04 = 1, f=d;
	else document.getElementById(b).style.display='none', sw04 = 0, f=e;}

return san(f,c);
}

function san(f){
document.images[c].src = f;
}

///△/////////////////////////////

