function InstitutionLogin()
{
	$strLogin=$('#BKLogin').val();
	$strPassword=$('#BKPassword').val();
	
	$.ajax
	({	
		type: "POST",
		url: "ajax_php/institution_login_ajax.php",
		data: 'Action=LoginInstitution&Login='+$strLogin+'&Password='+$strPassword, 
		success: function(strMessage)
		{
			if (strMessage==true)
				window.location.reload();
			else if (strMessage==false)
				$('#InstLoginMsgBox').html('Login lub hasło niepoprawne.<br/> Proszę spróbować ponownie');
			else if (strMessage=='-1')
				$('#InstLoginMsgBox').html('Konto instytucji nieaktywne.<br/>Proszę poczekać na aktywację konta');	
		}	
	});
}
/**************************************************************************************************************************/
function InstLogOut()
{
	$.ajax
	({	
		type: "POST",
		url: "ajax_php/institution_login_ajax.php",
		data: 'Action=LogoutInstitution', 
		success: function(strMessage)
		{
			if (strMessage==true)
				window.location.reload();
		}	
	});
}
