function checkPass (pass) {
	pass=pass.value;
	if (pass=='') return false;
	if (pass.length<6) {
		document.getElementById('PCC').innerHTML = 'Пароль должен состоять минимум из 6-ти символов';
		document.getElementById('pass').style.backgroundColor='#faa';
	} else {
		document.getElementById('PCC').innerHTML = '';
		document.getElementById('pass').style.backgroundColor='white';
	}
}

function checkConfirm (conf) {
	pass=document.getElementById('pass').value;
	conf=conf.value;
	if (conf.length<1){return false;}
	if (pass!=conf) {
		document.getElementById('CPCC').innerHTML = 'Пароль и его подтверждение не совпадают.';
		document.getElementById('confirm').style.backgroundColor='#faa';
	} else {
		document.getElementById('CPCC').innerHTML = '';
		document.getElementById('confirm').style.backgroundColor='white';
	}
}
function checkCorrect(f) {return true;}

function forDone(flag) {	f = document.forms['zd'];	f.doGo.disabled = flag;}

function checkYear (inp) {
	y= parseInt(inp.value);
 	md=new Date;
	if (y<1878||y>md.getFullYear()||isNaN(y))
	{
		inp.style.backgroundColor='#faa';
	} else {
		inp.style.backgroundColor='white';
	}
}

function checkDay(inp) {
	d= parseInt(inp.value);
 	
	if (d<1||d>31||isNaN(d))
	{
		inp.style.backgroundColor='#faa';
	} else {
		inp.style.backgroundColor='white';
	}
}

function checkExp(inp) {
	e= parseInt(inp.value);
 	
	if (e<0||e>80||isNaN(e))
	{
		inp.style.backgroundColor='#faa';
	} else {
		inp.style.backgroundColor='white';
	}
}

var timeout=null;
function doTime() {
	if (timeout) clearTimeout(timeout);
        timeout = setTimeout(CheckNick, 1000);
}