//******************************************************************************
// YAYA@S[Xgev[g
// N/Ig[N
//******************************************************************************

//******************************************************************************
//N OnFirstBoot
//******************************************************************************

OnFirstBoot
{
	//---- ϐ̏
	username         = "uv"
	teachusername    = 0	// [U[op

	//---- VanishJEgāA^̏񂩔ۂ𔻒肷
	if reference[0] == 0
	{
		//---- قƂɏ߂Ă̋N
		"\0\s[0]vԂH߂܂āH\e"
	}
	else
	{
		//---- ăCXg[̏N
		""
		--
		if reference[0] == 1
		{
			//vanishPȂ˂Ȃ
			"\0\s[0]܂܂ˁB"
		}

		if reference[0] > 1 && reference[0] < 10
		{
			"\0\s[0]d\w5d\w5[B\e"
		}

		if reference[0] >= 100
		{
			//肷̗
			"\0\s[0]d\w5d\w5\e"
		}

		else
		{
						"\0\s[0]d\w5d\w5\e"
		}
		--
		"\1\n\nd\w5d\e"
	}
}


//******************************************************************************
//ʏ̋N OnBoot
//******************************************************************************

OnBoot
{
	//---- ܂õT[tBX\
	"\0\s[0]\1\s[10]"
	--
	//---- NԂmFĂω
	_timeslot = GetTimeSlot
	
	case _timeslot{
	when ""
	{
		"\0\s[5]%(username)AInBInB\e"
	}
	when ""
	{
		"\0\s[5]тłB\e"

	}
	when ""
	{
		"\0\s[5]ɂ́A%(username)B\e"
	}
	when ""
	{
		"\0\s[5]낯B\e"
	}
	others
	{
		//ȊO̎Ԃ̏ꍇ

	"\u\s[10]\0\s[4]ف[B\e"
	}
	}//casȅI
}

//------------------------------------------------------------------------------
////Ȃǂςɒׂ֐
//------------------------------------------------------------------------------
GetTimeSlot
{
	case hour{
	when 22,23,0,1,2,3 {'['}
	when 4,5,6,7,8,9,10,11 {''}
	when 12,13 {''}
	when 14,15,16,17 {''}
	when 18,19,20,21 {''}
	}//casȅI
}


//******************************************************************************
//I OnClose
//******************************************************************************

OnClose
{
	"\1\s[10]"
	--
	//̕ɂ\eȂłˁI
	_timeslot = GetTimeSlot
	if _timeslot == ""
	{
		//---- ɏI
		"\0\s[4]`"
		
		"\0\s[1]΂΂A%(username)B"
	}
	elseif _timeslot == "" || _timeslot == ""
	{
		//---- /ɏI
		"\0\s[2]܂ˁB"
	}
	elseif _timeslot == ""
	{
		"\0\s[5]܂ˁA%(username)B"
		
		"\0\s[4]܂ˁB"
	}
	else
	{
		//---- /[ɏI
		"\0\s[7]₷݁B"
	}
	--
	"\w9\w9\-\e"
}


//******************************************************************************
//ŏ̕A OnWindowStateRestore
//******************************************************************************

OnWindowStateRestore
{
	"\0\s[0]Aq`B\e"
}
