function testJScript(){
    if(document.getElementById("jsMessage"))    
	{
        $('#jsMessage').css("display", "none");
        return true;
    }
    return false;
}

function testFlash(){
    version = swfobject.getFlashPlayerVersion();
    if (version['major'] < 9)
	{
        $('#loginContent').css("display", "none");
        $('#flashMessage').css("display", "block");
        return false;
    }
    return true;
}

function testBrowser(){
    if(jQuery.browser.opera == true)
	{
        $('#browserMessage').css("display", "block");
        return false;
    }
    return true;
}

function testCookies(){
    if(document.cookie != "")
	{
		return true;
	}
    else{
		$('#cookiesMessage').css("display", "block");
   		return false;
	}

    
}

YAHOO.util.Event.onDOMReady(function()
{ 
	if(testJScript() && testFlash() && testBrowser() && testCookies())  {
	    $('#loginContent').css({display: "block"});
	}
	
	focus();

});



function focus()
{
    var loginBox = document.getElementById('loginid');
    var loginSelect = document.getElementById('loginid_select');
    var passwordBox = document.getElementById('password');
    var emailBox = document.getElementById('email');

    try
    {
        // might be on password page
        if (emailBox)
        {
          emailBox.focus();

        }
        
        // focus on login box if nothing is in it
        else if (loginBox)
        {
            loginBox.focus();
                
        }
        
        else if (passwordBox)
        {
            passwordBox.focus();
        
        }

     } catch (e)
     {
     }


}
    