function selheader(){
var simg1 = new Image();
var simg2 = new Image();
var simg3 = new Image();
var simg4 = new Image();
var simg5 = new Image();
simg1 = "../common/images/header1.gif";
simg2 = "../common/images/header2.gif";
simg3 = "../common/images/header3.gif";
simg4 = "../common/images/header4.gif";
simg5 = "../common/images/header5.gif";
}
//Header ランダム数　送信
function send()
{
	str = eval(rNumber);
	jpURL = "./product/index.html?"+str;
	//alert(str);
	location.href = jpURL;
}


function hdrandom(){
	rNumber=0;
var iValue;
var img1 = new Image();
var img2 = new Image();
var img3 = new Image();
var img4 = new Image();
var img5 = new Image();
img1 = "./top_img/toprogo1.gif";
img2 = "./top_img/toprogo2.gif";
img3 = "./top_img/toprogo3.gif";	
img4 = "./top_img/toprogo4.gif";	
img5 = "./top_img/toprogo5.gif";

	iValue = Math.random() * 5;
	rNumber = Math.ceil(iValue);
	if(rNumber==0) rNumber++;
	document.theader.src=eval("img" + rNumber);
}

function topPload(){
	//トップページ用メニュー
img_url= [["./common/menu1img/01_product_on.gif","./common/menu1img/01_product_off.gif"],
	["./common/menu1img/02_graphic_on.gif","./common/menu1img/02_graphic_off.gif"],
	["./common/menu1img/03_space_on.gif","./common/menu1img/03_space_off.gif"],
	["./common/menu1img/04_prototype_on.gif","./common/menu1img/04_prototype_off.gif"],
	["./common/menu1img/05_news_on.gif","./common/menu1img/05_news_off.gif"],
	["./common/menu1img/06_profile_on.gif","./common/menu1img/06_profile_off.gif"],
	["./common/menu1img/07_media_on.gif","./common/menu1img/07_media_off.gif"],
	["./common/menu1img/08_contact_on.gif","./common/menu1img/08_contact_off.gif"]];

img_url2= [
	["./top_img/maru_product.jpg","./top_img/maru_black.gif"],
	["./top_img/maru_graphic.jpg","./top_img/maru_black.gif"],
	["./top_img/maru_space.jpg","./top_img/maru_black.gif"],
	["./top_img/maru_prototype.jpg","./top_img/maru_black.gif"],
	//["./top_img/m5.gif","./top_img/m0.gif"],
	//["./top_img/m6.gif","./top_img/m0.gif"],
	//["./top_img/m7.gif","./top_img/m0.gif"],
	//["./top_img/m8.gif","./top_img/m0.gif"]
	];

	flag = new Array;
for (i=0; i<=7; i++){
	flag[i]=0;
	}

}

function topSwap(nm){
	fl=flag[nm];
	document["Img"+nm].src = img_url[nm][fl];
	if(nm<=3){
	document["topImg"].src = img_url2[nm][fl];
	}
	//nm排他的論理和（逆）
	flag[nm] ^= 1;
	//トップイメージ
	
}


function Pload(){
	//中ページ　第１階層メニュー
img_url= [["../../common/menu1img/01_product_on.gif","../../common/menu1img/01_product_off.gif"],
	["../../common/menu1img/02_graphic_on.gif","../../common/menu1img/02_graphic_off.gif"],
	["../../common/menu1img/03_space_on.gif","../../common/menu1img/03_space_off.gif"],
	["../../common/menu1img/04_prototype_on.gif","../../common/menu1img/04_prototype_off.gif"],
	["../../common/menu1img/05_news_on.gif","../../common/menu1img/05_news_off.gif"],
	["../../common/menu1img/06_profile_on.gif","../../common/menu1img/06_profile_off.gif"],
	["../../common/menu1img/07_media_on.gif","../../common/menu1img/07_media_off.gif"],
	["../../common/menu1img/08_contact_on.gif","../../common/menu1img/08_contact_off.gif"]];

	flag = new Array;
for (i=0; i<=7; i++){
	flag[i]=0;
	}

}

function Swap(nm){
	fl=flag[nm];
	document["Img"+nm].src = img_url[nm][fl];
	//nm排他的論理和（逆）
	flag[nm] ^= 1;
}

function Pload_g(){
	//Graphicメニュー
subImg= [["../../common/menu2img/graphic/01_on.gif","../../common/menu2img/graphic/01_off.gif"],
	["../../common/menu2img/graphic/02_on.gif","../../common/menu2img/graphic/02_off.gif"],
	["../../common/menu2img/graphic/03_on.gif","../../common/menu2img/graphic/03_off.gif"],
	["../../common/menu2img/graphic/05_on.gif","../../common/menu2img/graphic/05_off.gif"],
	["../../common/menu2img/graphic/06_on.gif","../../common/menu2img/graphic/06_off.gif"],
	["../../common/menu2img/graphic/07_on.gif","../../common/menu2img/graphic/07_off.gif"],
	["../../common/menu2img/graphic/08_on.gif","../../common/menu2img/graphic/08_off.gif"],
	["../../common/menu2img/graphic/10_on.gif","../../common/menu2img/graphic/10_off.gif"]];

	flag_sub = new Array;
for (x=0; x<=9; x++){
	flag_sub[x]=0;
	}
}

function Pload_s(){
	//Spaceメニュー
subImg= [["../../common/menu2img/space/01_on.gif","../../common/menu2img/space/01_off.gif"]];

	flag_sub = new Array;
for (x=0; x<=0; x++){
	flag_sub[x]=0;
	}
}



function Pload_prod(){
	//Productメニュー
subImg= [["../../common/menu2img/product/01_on.gif","../../common/menu2img/product/01_off.gif"],
	["../../common/menu2img/product/02_on.gif","../../common/menu2img/product/02_off.gif"],
	["../../common/menu2img/product/03_on.gif","../../common/menu2img/product/03_off.gif"]];

	flag_sub = new Array;
for (x=0; x<=2; x++){
	flag_sub[x]=0;
	}
}

function Pload_prot(){
	//prototypeメニュー
sub4Img= [["../../common/menu2img/prototype/01_on.gif","../../common/menu2img/prototype/01_off.gif"],
	["../../common/menu2img/prototype/02_on.gif","../../common/menu2img/prototype/02_off.gif"],
	["../../common/menu2img/prototype/03_on.gif","../../common/menu2img/prototype/03_off.gif"],
	["../../common/menu2img/prototype/04_on.gif","../../common/menu2img/prototype/04_off.gif"],
	["../../common/menu2img/prototype/05_on.gif","../../common/menu2img/prototype/05_off.gif"],
	["../../common/menu2img/prototype/06_on.gif","../../common/menu2img/prototype/06_off.gif"],
	["../../common/menu2img/prototype/07_on.gif","../../common/menu2img/prototype/07_off.gif"],
	["../../common/menu2img/prototype/08_on.gif","../../common/menu2img/prototype/08_off.gif"],
	["../../common/menu2img/prototype/09_on.gif","../../common/menu2img/prototype/09_off.gif"],
	["../../common/menu2img/prototype/10_on.gif","../../common/menu2img/prototype/10_off.gif"],
	["../../common/menu2img/prototype/11_on.gif","../../common/menu2img/prototype/11_off.gif"],
	["../../common/menu2img/prototype/12_on.gif","../../common/menu2img/prototype/12_off.gif"],
	["../../common/menu2img/prototype/13_on.gif","../../common/menu2img/prototype/13_off.gif"],
	["../../common/menu2img/prototype/14_on.gif","../../common/menu2img/prototype/14_off.gif"],
	["../../common/menu2img/prototype/15_on.gif","../../common/menu2img/prototype/15_off.gif"],
	["../../common/menu2img/prototype/16_on.gif","../../common/menu2img/prototype/16_off.gif"],
	["../../common/menu2img/prototype/17_on.gif","../../common/menu2img/prototype/17_off.gif"],
	["../../common/menu2img/prototype/18_on.gif","../../common/menu2img/prototype/18_off.gif"],
	["../../common/menu2img/prototype/19_on.gif","../../common/menu2img/prototype/19_off.gif"],
	["../../common/menu2img/prototype/20_on.gif","../../common/menu2img/prototype/20_off.gif"]];

	flag_sub4 = new Array;
for (x=0; x<=19; x++){
	flag_sub4[x]=0;
	}
}

function subSwap4(nms){
	fs4=flag_sub4[nms];
	document["sub4Img"+nms].src = sub4Img[nms][fs4];
	//nm排他的論理和（逆）
	flag_sub4[nms] ^= 1;
}


function subSwap(nms){
	fs=flag_sub[nms];
	document["subImg"+nms].src = subImg[nms][fs];
	//nm排他的論理和（逆）
	flag_sub[nms] ^= 1;
}

//画像OPEN
function Openview(url){
	var wo;
	wo = window.open(url,"photoviewer","width=600,height=600,status=no,directories=no,menubar=no,toolbar=no,resizable=no,scrollbars=no");
	wo.focus();
}

//100%DesignTokyo2007用　画像OPEN
function Openview_dt2007(url){
	var wo;
	wo = window.open(url,"dt2007","width=980,height=600,status=no,directories=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes");
	wo.focus();
}
