window.onload = init;

function init()
{
	// get the application id
	var app_id = 1;
	if (document.getElementById('appid'))
	{
		app_id = document.getElementById('appid').value;
	}
	
	// make sure cookies are enabled
	var cookie_enabled = (navigator.cookieEnabled) ? true : false;
	if (!cookie_enabled)
	{
		window.location.href = "/failed_check.php?reason=1&a="+app_id;
	}
	
	// set the focus on the user name
	document.getElementById('username').focus();
} // end function init()