function check_validity(strpassword)
{
	var Key1 = 0;
	var Key2 = 0;
	var MonthKey = 0;
	var YearKey = 0;
	var LevelKey = 0;
	var curMonth = 0;
	var curYear = 0;

	var strTemp = new String();
	strTemp = strpassword;
	if (strTemp.length != 14) return 0;

	var datDate = new Date();
	curMonth = datDate.getMonth();
	curYear = datDate.getFullYear();
	
	
	Key1 = strTemp.charCodeAt(7);
	Key2 = strTemp.charCodeAt(8);
	YearKey = Key1 + Key2 - 207;
	if (YearKey < 5 || YearKey > 7) return 0;

	YearKey = YearKey + 2000;
	//alert(YearKey);
	if (YearKey < curYear) return 0;

	Key1 = strTemp.charCodeAt(2);
	Key2 = strTemp.charCodeAt(3);
	MonthKey = Key1 + Key2 - 212;
	if (MonthKey < 1 || MonthKey > 12) 
	{
		if (MonthKey < curMonth) return 0;
	}
	//alert(MonthKey);
	
		
	Key1 = strTemp.charCodeAt(12);
	Key2 = strTemp.charCodeAt(13);
	LevelKey = Key1 + Key2 - 212;
	if (LevelKey  < 1 || LevelKey > 3) return 0;
	//alert(LevelKey);
	return LevelKey;
}
