$(function (){
	CheckUserBox();
	CheckRegBox();
	CheckScoreBox();

	WindowHeight(0);setTimeout("WindowHeight(0)",500);
});

// 检测表单
function CheckForm(){
	for (var i=1; i<=5; i++){
		if ($id('isScore'+ i).checked){
			if ($id('score'+ i +'Name').value==""){
				alert('积分'+ i +'的积分名称不能为空.');$id('score'+ i +'Name').focus();return false;
			}
		}
	}
}


// 检测是否开启会员系统框
function CheckUserBox(){
	if ($id("isUserSys1").checked){
		$id("userBox").style.display="";
	}else{
		$id("userBox").style.display="none";
	}
	WindowHeight(0);
}

// 检测是否开启会员注册框
function CheckRegBox(){
	if ($id("isReg1").checked){
		$(".regBoxClass").css("display","");
	}else{
		$(".regBoxClass").css("display","none");
	}
	WindowHeight(0);
}


// 检测积分框
function CheckScoreBox(){
	if ($id("isScore1").checked){
		$(".score1Class").css("display","");
	}else{
		$(".score1Class").css("display","none");
	}
	if ($id("isScore2").checked){
		$(".score2Class").css("display","");
	}else{
		$(".score2Class").css("display","none");
	}
	if ($id("isScore3").checked){
		$(".score3Class").css("display","");
	}else{
		$(".score3Class").css("display","none");
	}
	if ($id("isScore4").checked){
		$(".score4Class").css("display","");
	}else{
		$(".score4Class").css("display","none");
	}
	if ($id("isScore5").checked){
		$(".score5Class").css("display","");
	}else{
		$(".score5Class").css("display","none");
	}
	WindowHeight(0);
}