

//onMouseOver Color
var onc = "#000000";
//onMouseOut Color
var offc = "#FFFFFF";
//onClick Color
var clc = "#666666";

var menu_01 = "#ED0F64";
var menu_02 = "#ED1B23";
var menu_03 = "#F15A21";
var menu_04 = "#FFF200";
var menu_05 = "#FFC509";
var menu_06 = "#F9A01A";
var menu_07 = "#78C7A0";
var menu_08 = "#00A650";
var menu_09 = "#00AEEF";
var menu_10 = "#00ACCC";
var menu_11 = "#0083CA";
var menu_12 = "#2E3092";
var menu_13 = "#AB499B";
var menu_14 = "#602D91";
var menu_15 = "#221E1F";

//スタイルからカラー取得変数
var fColor;
//選択判定用変数
var ccf=0;
var clIdx = "";

//menu

function onMouseColor(menu){
	
/*if(ccf == 1 && clIdx == id) {  return; }*/

	fColor = document.getElementById(menu).style.background;	
	document.getElementById(menu).style.background = eval(menu);
}

function outMouseColor(id){
	
if(ccf == 1 && clIdx == id) {  return; }

	document.getElementById(id).style.background = fColor;
}

function exMenu(menu) {
	
	/*fColor = document.getElementById(id).style.backgroundColor;	*/
	document.getElementById(menu).style.background = eval(menu);
	ccf=1;
	
	clIdx = menu;
	
	/*allOff();
	ttMenu = document.getElementById(menu+"_sub").style;
	
	if (ttMenu.display == 'none') {

		ttMenu.display = "block";

	}else{
		ttMenu.display = "none";
	}
	
	allcoloroff();
	document.getElementById(menu).style.color = clc;
	ccf=1;*/
}

function allOff() {

tMenu = document.getElementById("menu0_sub").style;
tMenu.display = "none";

tMenu = document.getElementById("menu1_sub").style;
tMenu.display = "none";

tMenu = document.getElementById("menu2_sub").style;
tMenu.display = "none";

tMenu = document.getElementById("menu3_sub").style;
tMenu.display = "none";

}

function allcoloroff(){
document.getElementById('menu_01').style.background = offc;
document.getElementById('menu_02').style.background = offc;
document.getElementById('menu_03').style.background = offc;
document.getElementById('menu_04').style.background = offc;
document.getElementById('menu_05').style.background = offc;
document.getElementById('menu_06').style.background = offc;
document.getElementById('menu_07').style.background = offc;
document.getElementById('menu_08').style.background = offc;
document.getElementById('menu_09').style.background = offc;
document.getElementById('menu_10').style.background = offc;
document.getElementById('menu_11').style.background = offc;
document.getElementById('menu_12').style.background = offc;
document.getElementById('menu_13').style.background = offc;
document.getElementById('menu_14').style.background = offc;
document.getElementById('menu_15').style.background = offc;
}



//categori

var ccf2=0;
var clIdx2 = "";

function onMouseColor2(id){
	
if(ccf2 == 1 && clIdx2 == id) {  return; }

	fColor = document.getElementById(id).style.color;	
	document.getElementById(id).style.color = onc;
}

function outMouseColor2(id){
	
if(ccf2 == 1 && clIdx2 == id) {  return; }

	document.getElementById(id).style.color = fColor;
}


function exMenu2(menu) {
	clIdx2 = menu;
	
	allcoloroff2();
	document.getElementById(menu).style.color = clc;
	ccf2=1;
}

function allcoloroff2(){
document.getElementById("menu_sub0").style.color = offc;
document.getElementById("menu_sub1").style.color = offc;
document.getElementById("menu_sub2").style.color = offc;
document.getElementById("menu_sub3").style.color = offc;
}


////コントロールボタン
//var ccf3=0;
//var clIdx3 = "";
//function onMouseCtr(id){
//	
//if(ccf3 == 1 && clIdx3 == id) {  return; }
//
//	fColor = document.getElementById(id).style.color;	
//	document.getElementById(id).style.color = onc;
//}
//
//function outMouseCtr(id){
//	
//if(ccf3 == 1 && clIdx3 == id) {  return; }
//
//	document.getElementById(id).style.color = fColor;
//}
//
//
//function exMenuCtr(id) {
//	clIdx3 = id;
//	
//	allcoloroff3();
//	document.getElementById(id).style.color = clc;
//	ccf3=1;
//}
//
//function allcoloroff3(){
//document.getElementById("ctr0").style.color = offc;
//document.getElementById("ctr1").style.color = offc;
//document.getElementById("ctr2").style.color = offc;
//document.getElementById("ctr3").style.color = offc;
//}
//
////再生以外のボタン クリック時にリセット
//function exMenuCtr_pre(id) {
//	clIdx3 = id;
//	allcoloroff3();
//	ccf3=0;
//}


//new_コントロールボタン(３つ画像var)

if (document.images) {

	// 設定開始

	// 画像1
	var img1on = new Image();
	img1on.src = "../images/pre_on.gif"; // ポイント時の画像
	var img1off = new Image();
	img1off.src = "../images/pre_off.gif"; // 通常の画像

	// 画像2
	var img2on = new Image();
	img2on.src = "../images/for_on.gif";
	var img2off = new Image();
	img2off.src = "../images/for_off.gif";

	// 画像3
	var img3on = new Image();
	img3on.src = "../images/stop.gif";
	var img3off = new Image();
	img3off.src = "../images/start.gif";
	
	var test=0;　// ON or OFF 識別変数

	// 設定終了

}

// ポイント時の処理
function On(name) {
	if (document.images) {
		document.images[name].src = eval(name + 'on.src');
	}
}

// 放した時の処理
function Off(name) {
	if (document.images) {
		document.images[name].src = eval(name + 'off.src');
	}
}

function Click(name) {
	if('img1' == name) {
	slideObj.prevSlide()
	document.images['img3'].src = eval('img3on.src');
	test=1;
	}
	else{
	slideObj.nextSlide()
	document.images['img3'].src = eval('img3on.src');
	test=1;
	}
}


// 一時停止とスタートボタンの動作

function On_s(name) {
		document.images[name].src = eval(name + 'on.src');
}

function Off_s(name) {
	
		if(test == 1) {  return; }
		document.images[name].src = eval(name + 'off.src');
}

function Click_s(name) {
	if(test == 0) {
		document.images[name].src = eval(name + 'on.src');
		test=1;
		slideObj.stopSlide()
	}
	else {
		document.images[name].src = eval(name + 'off.src');
		test=0;
		slideObj.startSlide()
	}
}


