if (self.parent.frames.length != 0)
  {
	self.parent.location.replace(document.location.href);
  }
  
  
function show_window(window_url)
{
	var width = 650,
		height = 560;
	var left = Math.round((screen.width-width)/2),
		top = Math.round((screen.height-height)/2)-30
	var window_param =	'ontop=yes,status=no,menubar=no,toolbar=no,'+
						'directories=no,resizable=yes,scrollbars=yes,location=no,'+
						'width='+width+',height='+height+','+
						'left='+left+',top='+top;
	var window_name = 'win_'+Math.floor( Math.random()*1000);
	var win = window.open(window_url, window_name, window_param);
	win.focus();
	return false;
}

function auth()
{
  if(document.frm1.n1.value=='') {alert('Пожалуйста, укажите логин'); return false;}
	if(document.frm1.p1.value=='') {alert('Пожалуйста, укажите пароль'); return false;}
	
  return true;
}

function crypt()
{
  document.frm1.s1.value = md5(document.frm1.p1.value);
  document.frm1.p1.value = '';
}
