function clean(a){
	if (a.name=="logu"||a.name=="bm"){
		a.value="";
	};
	if (a.name=="passv"){
		var b=a.nextSibling;
		a.style.display = "none";
		b.style.display = "inline";
		b.focus();
	};
}

function openLog(){
	if(!document.getElementById('bordl')){
		FirstLog();
	}
	document.getElementById('login').style.display = "block";
}

function closeLog(){
	document.getElementById('login').style.display = "none";
}

function FirstLog(){
document.getElementById('login').innerHTML = '<div id="bordl"><a href="#" onClick="closeLog(); return false"><img src="/images/close.png" width="11" height="11" alt="Закрыть" class="clo" border="0" /></a><h2>Авторизация: </h2><hr /><form action="/adm/check.php" method="post"><table id="lopas" width="200px" border="0" cellspacing="8" cellpadding="0"><tr><td align="right"><label onclick="this.nextSibling.focus()">Логин:</label></td><td><input type="text" name="logu"  value="Логин" size="8" onfocus="clean(this)" /></td></tr><tr><td align="right"><label>Пароль:</label></td><td><input type="text" name="passv" value="Пароль" size="8" style="display: inline;" onfocus="clean(this)" /><input type="password" name="prass" value="" size="8" style="display: none;" /></td></tr></table><div align="center"><input type="submit" value="Вход" class="butp" />&nbsp;&nbsp;&nbsp;<input type="reset" value="Закрыть" class="butp" onclick="javascript:closeLog(); return false" /></div></form><hr /><p><a href="/adm/pa.php">Забыли пароль?</a></p><p><a href="/adm/reg.php">Регистрация нового пользователя</a></p></div>';
}