function changeTab( id, number, max ){

	for ( i=1 ; i<=max ; i++ ) {

		if ( number == i ) {
			document.getElementById(id+'_tab_'+i).className = 'on';
			document.getElementById(id+'_content_'+i).style.display = 'block';
		} else {
			document.getElementById(id+'_tab_'+i).className = '';
			document.getElementById(id+'_content_'+i).style.display = 'none';
		}

	}

}


function logoutConfirm() {
	if( window.confirm ('ログアウトします。よろしいですか？') ) {
		location.href = "/admin_logout";
	}
}

window.onload=function(){
	if (document.getElementById("googlemap")) {
		var map;
		var markers = new Array(1);
		map = new GMap2(document.getElementById("googlemap"));
		map.setCenter(new GLatLng(36.565805669999435,139.91599559783936),15);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GOverviewMapControl());
		map.setMapType(G_NORMAL_MAP);

		var icon = new GIcon();
		icon.image = "/i/map/adc.gif";
		icon.iconSize = new GSize(30, 30);
		icon.iconAnchor = new GPoint(15, 30);

		var marker = null;
		var n_markers = 0;
		marker = new GMarker(new GPoint(139.91581857204437,36.56614173668223), icon);
		markers[n_markers] = marker;
		n_markers++;

		map.addOverlay(marker);
	}
}

$(function(){
	$("ul.case li div.contents").css("display","none");
	$("ul.case li.case1 div.contents").css("display","block");
	$("ul.case h3").click(function(){
	    if($("+div.contents",this).css("display")=="none"){
	        $("div.contents").fadeOut("normal");
	        $("+div.contents",this).fadeIn("normal");
	    }
	});
	$("ul.case li h3").hover(
		function() {
			$(this).css({opacity: "0.6"});
		},
		function() {
			$(this).css({opacity: "1.0"});
		}
	);
});

