function map0_click(area){
	document.getElementById("divarea_map0").style.display = "none";
	document.getElementById("divarea_map" + area).style.display = "block";
}
function to_map0(area){
	document.getElementById("divarea_map" + area).style.display = "none";
	document.getElementById("divarea_map0").style.display = "block";
}
function map0_mouseOut(area){
	document.getElementById("map").src = "../common/images/national.gif";
}
function map0_mouseOver(area){
	switch(area){
		case 1:
			src = "../common/images/hokkaidou_touhoku.gif";
			break;
		case 2:
			src = "../common/images/kantou.gif";
			break;
		case 3:
			src = "../common/images/hokuriku_koushinetsu.gif";
			break;
		case 4:
			src = "../common/images/toukai.gif";
			break;
		case 5:
			src = "../common/images/kinki.gif";
			break;
		case 6:
			src = "../common/images/chugoku_shikoku.gif";
			break;
		case 7:
			src = "../common/images/kyusyu_okinawa.gif";
			break;
		case 8:
			src = "../common/images/oversea.gif";
			break;
		default:
			src = "../common/images/national.gif";
			break;
	}
	document.getElementById("map").src = src;
}


function pref_mouseOut(area){
	for(i = 0; i < 10; i++){
		obj = document.getElementById("p" + area + "_" + i);
		if(obj != null){
			obj.style.fontWeight = "normal";
			obj.style.fontSize = "12px";
			obj.style.color = "white";
		}
	}
}
function pref_mouseOver(area){
	for(i = 0; i < 10; i++){
		obj = document.getElementById("p" + area + "_" + i);
		if(obj != null){
			obj.style.fontWeight = "bold";
			obj.style.fontSize = "14px";
			obj.style.color = "yellow";
		}
	}
}
function pref_click(area){
	valObj = document.getElementById("p" + area + "stat");
	if(valObj.value > 0){
		//選択＞選択解除
		valObj.value = 0;
		img_base = "../common/basic/";
	} else{
		//未選択＞選択
		valObj.value = 1;
		img_base = "../common/select/";
	}
	for(i = 0; i < 10; i++){
		obj = document.getElementById("p" + area + "_" + i);
		if(obj != null){
			img = "url(" + img_base + "pref" + area + "_" + i + ".gif)";
			obj.style.backgroundImage = img;
		}
	}

}
function pref_init(){
	var area;
	for(area = 1; area < 48; area++){
		valObj = document.getElementById("p" + area + "stat");
		if(valObj.value > 0){
			img_base = "../common/select/";
		} else{
			img_base = "../common/basic/";
		}
		for(i = 0; i < 4; i++){	//max4parts
			obj = document.getElementById("p" + area + "_" + i);
			if(obj != null){
				img = "url(" + img_base + "pref" + area + "_" + i + ".gif)";
				obj.style.backgroundImage = img;
			}
		}
	}
}
function show_icon_info(){
	window.open("/28/user/p/help/icon_info.html", "_blank", "height=465,width=625,titlebar=no,status=no");

}
function map_submit(form_id){
	for(i = 1; i < 48; i++){
		val = document.getElementById('p' + i + 'stat').value;
		if(val > 0){
			break;
		}
	}
	val = document.getElementById('p99stat').value;
	if(val > 0){
		i = 0;
	}
	val = document.getElementById('crs_name');
	if(val != null && val.value.length >= 3){
		i = 0;
	}
	val = document.getElementById('s_crs_name');
	if(val != null && val.value.length >= 3){
		i = 0;
	}
	if(i >= 48){
		alert('都道府県を選択、もしくはコース名を3文字以上入力してから検索してください。');
	} else{
		document.getElementById(form_id).submit();
	}
}

