function logon()
{
	var func = function(data)
	{
		if(data=="success")
		{
			document.location = "/profile/";
		}
		else
		{
			switch (data)
			{
				case "notfind":
				{
					alert("This user does not exist, check the login and password.");
					break;
				}
				case "noneactive":
				{
					alert("This user is not Activate. Check your Email and activate this acount.");
					break;
				}
			}
		}
	}

	request( "main/login/" , "Username=" + get("Username").value + "&Password=" + get("Password").value, func );
}

function logout()
{
	document.location = "/main/logout/";
}

function ShowLoginForm()
{
	if(get("LoginForm").style.visibility=="hidden")	get("LoginForm").style.visibility="visible";
	else get("LoginForm").style.visibility="hidden";

}
