// JavaScript Document

function showLogin()
{
	if(document.getElementById('login') != null)
	{
		var login = document.getElementById('login');
		var loginBtn = document.getElementById('login-btn');
		
		if(login.style.display == '')
		{
			login.style.display = 'block';
			loginBtn.style.background = '#19456D';
		}
		else
		{
			login.style.display = '';
			loginBtn.style.background = '';
		}
	}
}

function showProfile()
{
	if(document.getElementById('profile') != null)
	{
		var profile = document.getElementById('profile');
		var profileBtn = document.getElementById('profile-btn');
		
		if(profile.style.display == '')
		{
			profile.style.display = 'block';
			profileBtn.style.background = '#19456D';
		}
		else
		{
			profile.style.display = '';
			profileBtn.style.background = '';
		}
	}
}

function closeMessage ()
{
	if(document.getElementById('accountMessage') != null)
	{
		var msg = document.getElementById('accountMessage');
		
		msg.innerHTML = '';
		msg.removeAttribute('id');
	}
}

window.onload = function()
{
	for(var i = 0, l = document.getElementsByTagName('input').length; i < l; i++)
	{
		if(document.getElementsByTagName('input').item(i).type == 'text')
		{
			document.getElementsByTagName('input').item(i).setAttribute('autocomplete', 'off');
		};
	};
};

