function Login(){

	if(document.getElementById('LoginForm').ProfileEmail.value == '' || document.getElementById('LoginForm').ProfileEmail.value == 'E-post'){
	
		alert('Ange din epostadress');
		return;
	
	}


	if(document.getElementById('LoginForm').ProfilePwd.value == '' || document.getElementById('LoginForm').ProfilePwd.value == 'Lösen'){
	
		alert('Ange ditt lösenord');
		return;
	
	}
	
	document.getElementById('LoginForm').submit();
	

}

function Logout(){

	if(confirm('Logga ut?')) self.location='/?_Logout=1';

}


function OpenPopup(Url,Width,Height){

    var EnsureNoCache = Math.floor(Math.random() * 1000)
	
	document.getElementById('Action').src = 'About:blank';
	document.getElementById('Action').style.height = '200px';
	document.getElementById('Action').src = Url + '&EnsureNoCache=' + EnsureNoCache;
    document.getElementById('Popup').style.display = 'block';
    
    self.location = '#Session';

}