var easing = function(t, b, c, d) { 
  return c * t / d + b; 
};
function start(id){

if(jQuery.browser.msie && parseInt(jQuery.browser.version) == 6){
//document.getElementById(id).style.filter = "alpha(opacity=100)";
document.getElementById(id).style.display = "block"; 
return;
}else if(jQuery.browser.msie && parseInt(jQuery.browser.version) == 7){
//document.getElementById(id).style.filter = "alpha(opacity=100)"; 
document.getElementById(id).style.display = "block";
return;
}else if(jQuery.browser.msie && parseInt(jQuery.browser.version) == 8){
//document.getElementById(id).style.filter = "alpha(opacity=100)"; 
document.getElementById(id).style.display = "block";
return;
}

document.getElementById(id).style.filter = "alpha(opacity=0)"; 
document.getElementById(id).style.MozOpacity = 0;
document.getElementById(id).style.opacity = 0;

var now = ((new Date()) * 1);
var b = 0; // 最初の値
var c = 100; // 変動する値
var d = 0.2; // 何秒かけてアニメーションするか
var wait = 0;
var motion = (function() {
var t = (((new Date()) * 1) - now) / 1000;
var value = easing(t, b, c, d);

document.getElementById(id).style.filter = 'alpha(opacity=' + Math.round(value) + ')';
document.getElementById(id).style.MozOpacity = '' + Math.round(value)/100+'';
document.getElementById(id).style.opacity = '' +Math.round(value)/100+''; 
  
  if (value < c) return setTimeout(arguments.callee, wait); 
})();

 }
function viewJudouMenu(){	hideAllMenu('judou_menu');document.getElementById('judou_menu').style.display = 'block';start('judou_menu');}
function hideJudouMenu(){	document.getElementById('judou_menu').style.display = 'none';}
function viewAboutMenu(){	hideAllMenu('about_menu');document.getElementById('about_menu').style.display = 'block';start('about_menu');}
function hideAboutMenu(){	document.getElementById('about_menu').style.display = 'none';}
function viewSchoolMenu(){	hideAllMenu('school_menu');document.getElementById('school_menu').style.display = 'block';start('school_menu');}
function hideSchoolMenu(){	document.getElementById('school_menu').style.display = 'none';}
function hideAllMenu(id){
	if(id!='judou_menu')hideJudouMenu();
	if(id!='about_menu')hideAboutMenu();
	if(id!='school_menu')hideSchoolMenu();
}
