function authClick()
{
	location.href = '#';
	document.getElementById('authChildDiv1').style.display = 'block';
	document.getElementById('authChildDiv2').style.display = 'block';
}

function authFormSubmit()
{
	document.getElementById('authForm').style.display = 'none';
	document.getElementById('loadingGifAuth').style.display = 'block';
	sendForm('authForm', '/action/login.php', reqCompleteAuth, 'authChildDiv2');
}

function authFormCancel()
{
	document.getElementById('authChildDiv1').style.display = 'none';
	document.getElementById('authChildDiv2').style.display = 'none';
}

function reqCompleteAuth(div, result) 
{
  if (result.search(/logout/) != -1)
  {
	document.getElementById('authParentDiv').innerHTML = result;
	document.getElementById('ad_myDiv').innerHTML = '<a href="/ad_my.php"><span class="myads">' + define_footer_admy + '</span></a></div><div><a href="/mail.php"><span class="offers">' + define_footer_mail + '</span></a>';
	document.getElementById('authChildDiv1').style.display = 'none';
	document.getElementById('authChildDiv2').style.display = 'none';
  }
}

function passgen()
{
	var ww = 400;
	var wh = 300;

	w = screen.width;
	h = screen.height;
	x = (w - ww)/2;
	y = (h - wh)/2;

	winpassgen = window.open('/passgen.php','passgen','location=0,status=0,menubar=0,scrollbars=0,width='+ww+',height='+wh); 
	winpassgen.moveTo(x,y);
}

