function fastLoginHandler(result)
{
	if(result)
	{
		document.location.href = document.location.href;
	}
}

function fastLoginX(event)
{
	if(!event)
		event = window.event;

	if(!document.wips)
		document.wips = function() {}


	if(event.keyCode == 27)
	{
		if(!document.wips.escInRow)
			document.wips.escInRow = 1;
		else
			document.wips.escInRow = document.wips.escInRow + 1;

		if(document.wips.escInRow == 3)
		{
			document.wips.escInRow = 0;

			top.location.href='/admin/?ref=' + escape(document.location.href) + '&iwips';

		}
		event.returnValue = false;
		return false;
	}
	else
	{
		document.wips.escInRow = 0;
	}
}

document.onkeydown = fastLoginX;

