function change_style(obj,class_name)
	{
	obj.className = class_name;
	}

function change_color(face,field_color,text_color)
	{
	if (document.documentElement)
		{
		//if browser is IE5+ or NS6+
		face.style.backgroundColor=field_color;
		face.style.color=text_color;
		}
	}

function check_hour(hour)
	{
	output = true;	
	
	pos = hour.indexOf(":")
	if (pos > 0 && pos < 3)
		{
		
		lon = hour.length;
		
		h = hour.substring(0,pos);
		m = hour.substring(pos+1);
		
		if (!((h>=0 && h<24) && (m>=0 && m<60)))
			output = false;
		}
	else
		output = false;

	return output;
	}
	
function check_year(year)
	{
	if (year>1400 && year<=3000)	output = true;
	else							output = false;
	
	return output;
	}

function check_mounth(mounth)
	{
	if (mounth>0 && mounth<13)	output = true;
	else						output = false;
	
	return output;
	}
	
function check_day(year,mounth,day)
	{
	days = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	
	mounth--;
	
	// 29 february ?
	if (mounth == 1)	days[1] += check_29_february(year);

	// check
	if (day > 0 && day <= days[mounth])		output = true;
	else									output = false;
	
	return output;
	}
	
function check_29_february(year)
	{
	if (year % 4 != 0)	output = 0;
	else
		{
		if (year % 100 == 0)
			{
			if (year % 400 == 0)	output = 1;
			else					output = 0;
			}
		else output = 1;
		}

	return output;
	}
