//-----------------------------------------------------------------------------------------------
//авторизация
//-----------------------------------------------------------------------------------------------


function fremme(){
	remme = document.getElementById('remme');
	remmeimg = document.getElementById('remmeimg');
	remmeimg.src=(!remme.checked)?'/i/chked.gif':'/i/unchked.gif';
}
function fremmeimg(){
	remme = document.getElementById('remme');
	remmeimg = document.getElementById('remmeimg');
	if (remme.checked) {
		remme.checked=false;
		remmeimg.src='/i/unchked.gif';
	}else{
		remme.checked=true;
		remmeimg.src='/i/chked.gif';
	}
}
function checkAuth(f){
	if (f.u_login.value=='логин' || f.u_login.value=='' || f.u_password.value==''){
		alert('Введите, пожалуйста, логин и пароль.')
		return false;
	}
}
//setTimeout(function(){document.forms['login_enter'].u_login.focus();},1)

//-----------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------

function popup(href, title, width, height)
{
	this_top = (screen.height - height) / 2;
	this_left = (screen.width - width) / 2;
	xx = open(href, title, 'toolbar=0, Scrollbars=1, menubar=0, directories=0, status=0, resizable=1, width=' + width + ', height=' + height + ', top=' + this_top + ', left=' + this_left);
	xx.focus();
	return false;
}

//-----------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------

function imagePopup(imageUrl,title, imageW, imageH)
{
	x3 = imageW;
	y3 = imageH;
	x4 = (screen.width < 2000) ? (screen.width / 2 - (x3 / 2)) : (screen.width / 4 - (x3 / 2));
	y4 = screen.height / 2 - (y3 / 2);
	mywin = window.open('', 'big', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=' + x3 + ',height=' + y3 + ',top=' + y4 + ',left=' + x4 + '');
	mywin.document.open();

	if(navigator.appName == "Microsoft Internet Explorer")
	{
		mywin.window.resizeTo(x3 + 10, y3 + 25);
	}

	mywin.document.write("<title>"+title+"</title><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 onblur='window.close();'><a href='javascript:window.close()'><img src='" + imageUrl + "' border=0></a></body>");
	mywin.document.close;
	mywin.focus();

	return false;
}