function pwChange(){
	document.getElementById("pw").diabled=false;
}

function BlockOpen(block){
		if(document.getElementById(block).style.display=="block"){
			document.getElementById(block).style.display="none";
		}else{
			document.getElementById(block).style.display="block";
		}
}
function BlockClose(block){
	document.getElementById(block).style.display="none";
}

onload = function() {
	if(document.getElementById('timetable')){
		for(i=1;i<=6;i++){
			if (document.getElementById('week0'+i+'_a')) {
				if(document.getElementById('week0'+i+'_a').className=="this"){
					document.getElementById('week0'+i+'_table').style.display="block";
				}else{
					document.getElementById('week0'+i+'_table').style.display="none";
				}
			}
		}
	}
}

function WeekChange(block){

	for(i=1;i<=6;i++){
	document.getElementById('week0'+i+'_a').className="nothis";
	document.getElementById('week0'+i+'_table').style.display="none";
	}

	document.getElementById('week0'+block+'_a').className="this";
	document.getElementById('week0'+block+'_table').style.display="block";

	return false;

}

function lightBox(block){
	
	closeLayer();
	
	$("#glayLayer").show();
		
	$("#lightBox_"+block).show();
	$("#lightBox_"+block).css({
		marginTop:"-"+$("#lightBox_"+block).height()/2+"px" , 
		marginLeft:"-"+$("#lightBox_"+block).width()/2+"px" 
	})
	return false;	
	
}
function closeLayer() {

    $('#glayLayer').hide();
	
	if(document.getElementById('lightBox_login')){
		$('#lightBox_login').hide();
	}
	if(document.getElementById('lightBox_forgot')){
		$('#lightBox_forgot').hide();
	}
	if(document.getElementById('lightBox_remind')){
		$('#lightBox_remind').hide();
	}

}
if($.browser.msie && $.browser.version<7){
        $(window).scroll(function(){
            $("#glayLayer").get(0).style.setExpression("top","$(document).scrollTop()+'px'")
			if(document.getElementById('lightBox_login')){
            	$("#lightBox_login").get(0).style.setExpression("top","($(document).scrollTop()+$(window).height()/2)+'px'")
			}
			if(document.getElementById('lightBox_forgot')){
            	$("#lightBox_forgot").get(0).style.setExpression("top","($(document).scrollTop()+$(window).height()/2)+'px'")
			}
			if(document.getElementById('lightBox_remind')){
            	$("#lightBox_remind").get(0).style.setExpression("top","($(document).scrollTop()+$(window).height()/2)+'px'")
			}
        })
}

//確認アラート
function confirmSubmit(formid,msg) {
	if(!window.confirm(msg)){
			return;
	}
	//送信処理
}


/* pngFix
----------------------------------------------- */
//document.getElementById("gn01").onMouseOver = document.write("");

$(document).ready(function(){

$('li#gn01').mouseover(function(){  $(this).addClass("this"); });
$('li#gn01').mouseout(function(){ $(this).removeClass("this"); });
$('li#gn02').mouseover(function(){  $(this).addClass("this"); });
$('li#gn02').mouseout(function(){ $(this).removeClass("this"); });
$('li#gn03').mouseover(function(){  $(this).addClass("this"); });
$('li#gn03').mouseout(function(){ $(this).removeClass("this"); });
$('li#gn04').mouseover(function(){  $(this).addClass("this"); });
$('li#gn04').mouseout(function(){ $(this).removeClass("this"); });
$('li#gn05').mouseover(function(){  $(this).addClass("this"); });
$('li#gn05').mouseout(function(){ $(this).removeClass("this"); });
$('li#gn06').mouseover(function(){  $(this).addClass("this"); });
$('li#gn06').mouseout(function(){ $(this).removeClass("this"); });
$('li#gn07').mouseover(function(){  $(this).addClass("this"); });
$('li#gn07').mouseout(function(){ $(this).removeClass("this"); });
$('li#gn08').mouseover(function(){  $(this).addClass("this"); });
$('li#gn08').mouseout(function(){ $(this).removeClass("this"); });

$("#head").append("<div id=\"contents_head\">");
$("h1").wrap("<div id=\"h1_1\">");
$("h1").wrap("<div id=\"h1_2\">");


if(document.getElementById('nextmonth')){
	$("h2").wrap("<div class=\"h2_icon\">");
}

if(document.getElementById('about')){
	$(".cat").wrap("<div class=\"cat_body\">");
	$(".cat").wrap("<div class=\"cat_head\">");
	$(".cat").wrap("<div class=\"cat_foot\">");
}

if(document.getElementById('lightBox_login')){
    $("form :image","#lightBox_login").hover(
        function(){ $(this).attr("src","../common/btn_lightBox_login_on.gif") },
        function(){ $(this).attr("src","../common/btn_lightBox_login.gif") }
    );
}

$(document).pngFix();

});


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function swfobj(this_w,this_h,this_n){
	AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', this_w,
			'height', this_h,
			'src', 'swf/'+this_n,
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'transparent',
			'devicefont', 'false',
			'id', this_n,
			'bgcolor', '#ffffff',
			'name', this_n,
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', 'swf/'+this_n,
			'salign', ''
	); //end AC code
}
