<!doctypehtml PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><title>
   Hut Link Login
  </title><meta content=width=device-width,initial-scale=1.0 name=viewport><script>var hutenvironment = "";
	  var site = "";
	  var uramEnv = "";
	  var franchiseeCheck = "";
		var str = '';
		var myURL = new String(document.location); //Site Url
		//var myURL = "https://inthutlink.yum.com/PHApps/FranchiseeDashboard/index#/ ";
		//var myURL = "https://phmms.yum.com ";
		var brand = "Yum"; //default brand setting
		var portalUrlMappings = {"pizzahut.yum.com" : "Pizza_Hut","hutlink.yum.com" : "Pizza_Hut","hutops.yum.com" : "Pizza_Hut","hutconnect.yum.com" : "Pizza_Hut","phmms.yum.com" : "Pizza_Hut","ssologin.yum.com":"Sso_Login"}; //Url to Site Mappings
		var portalEnviromentUrlMappings = {"qa" : "qa", "int" : "int", "uat" : "uat", "stage" : "qa"}; //Environment prefixes
		var hdPhoneNbr = '';
		//Authentication failed
		getEnviromentURLs();
		//Function to pull specific css rule from css by name 
		function getStyle(ruleName) {
			var rules = document.styleSheets[0].rules || document.styleSheets[0].cssRules
			ruleName = ruleName.toUpperCase();
			if (rules == null){
				rules = "";
			}
			for(var x=0;x<rules.length;x++) {
				if(rules[x].selectorText.toUpperCase() == ruleName){
					break;
				} 
			}
			return rules[x];
		}
		
		//Function to display login failure thru css edit
		function loginError(){
			var errorStyle = document.getElementById("error");
			errorStyle.style.display = 'block';
			//errorStyle.style.removeProperty("visibility");
			//errorStyle.style.removeAttribute("visibility");
		}
		
		//Display brand error message
		function brandLoginMessage()
		{
			 if (brand == "Pizza_Hut") {
			  hdPhoneNbr = '<ul><li><span class="errorMSG">ARLs: Pizza Hut Corporate/Franchise, call 1-877-498-6986</span></li><li><span class="errorMSG">Restaurant Employees: Pizza Hut Corporate/Franchise, call 1-800-835-3379, option 2</span></li></ul>';
			 } else {
			  hdPhoneNbr = '<br><ul><li><span class="errorMSG">Restaurant Employees: Pizza Hut Corporate/Franchise, call 1-800-835-3379, option 2</span></li></ul>';	
			 }
			 
			 document.getElementById('brand_error').innerHTML = hdPhoneNbr;
		}
		
		//Function to display cookie warning thru css edit
		function noCookiesError(){
			var cookieStyle = getStyle('p.cookieWarning');
			cookieStyle.style.removeProperty("visibility");
			cookieStyle.style.removeProperty("display");
		}
		
		//Function to inject proper css dependent on url
		function injectCSS(url){
			//document.write('<link id="branding" rel="stylesheet" type="text/css" href="'+url+'">');
			document.write('<link id="branding" rel="stylesheet" type="text/css" href=\"'+url+'\">');
		}
		
		//Function to set brand, update Page Title, and identify which css url to inject. 
		function setBrand(){
			var i;
			if(myURL.search("pkmslogout")>0){
				var newUrl = myURL.replace("pkmslogout","");
				document.location.replace(newUrl);
			}
			for (i in portalUrlMappings){
				if(myURL.search(i)>0){
				brand = portalUrlMappings[i];
				break;
				}
				//inject CSS is after the loop so the page can fall back to Yum just in case no brand is found
			}
			if(myURL.search("FranchiseeDashboard")>0){
				franchiseeCheck=true;
			}
			if(myURL.search("hutops")>0){
				site="hutops";
			}
			//document.title = brand.replace("_", " ") + " " + document.title;
			injectCSS("/phlogin/css/bootstrap.min.css");
			injectCSS("/phlogin/css/bootstrap-responsive.min.css");
			injectCSS("/phlogin/css/style.css");
			injectCSS("/phlogin/css/font.css");
			//setPageIcon(brand);
		}
		
		
		//Function for inner Text
		function setInnerHTMLText(){
		var i;
			for (i in portalUrlMappings){
				if(myURL.search(i)>0){
				brand = portalUrlMappings[i];
				break;
				}
				//inject CSS is after the loop so the page can fall back to Yum just in case no brand is found
			}
			if (site == 'hutops'){
				var loginCls = document.getElementById('banner')
				loginCls.setAttribute('class','hutops-login-banner');
			}	
			if (brand == 'Pizza_Hut'){
				uramEnv=hutenvironment;
				if(uramEnv == "int"){
					uramEnv="dev";
				}
				if(franchiseeCheck){
					var reqAccess = document.getElementById("RFA");
					reqAccess.href="https://iam"+uramEnv+".yum.com/uram/login";
				}
				var forgotpwdlink = document.getElementById("forgotPassword");
					forgotpwdlink.href="https://iam"+uramEnv+".yum.com/selfservice/quicklinksus/" ;
			    var links = document.getElementById("pizzHutLinks");
				links.style.display = "block";
				document.getElementById("phiErrTxt").innerHTML='Passwords are case sensitive.  Please check your Caps lock key.  If you have forgotten your username/password please use the /"Reset Password/" link.';
			}
			
		}
		// end of inner text.
		//Function to set environment prefix
		/* function injectEnvironmentTag(myEnvironment, myURLElement){
			
			var url = myURLElement.href.replace('/.*?:\/\//g', "");
			//if(myEnvironment=="int" ){
				//if(myURLElement.href.search("rfa.yum.com") > -1){
					//myURLElement.href = "/images/RFA_DNE.html"
				//}
				//else{
				//	myURLElement.href = url.replace('https://', "https://" + myEnvironment);	
				//}
			//}
			//else{			
				myURLElement.href = url.replace('https://', "https://" + myEnvironment);		
			//}
		}*/
		
		//Function to pull each url on the page and add environment prefix
		/*function pullURLsToAdjust(myEnvironment){
			//for pizzahut rightside div links
			var pizzHutLinks = document.getElementById('pizzHutLinks').getElementsByTagName("a");
			var i;
			for(var i = 0; i < pizzHutLinks.length;i++){
				injectEnvironmentTag(myEnvironment, pizzHutLinks[i]);
			}
		}*/
		function getEnviromentURLs(){
			var environment = "";  //default to production
			var i; 
			for(i in portalEnviromentUrlMappings){
				if(myURL.search(i)>0){
					environment = portalEnviromentUrlMappings[i];
				}
			}
			hutenvironment=environment;
			//	document.write('<script type="text/javascript" src="https://qahutlink.yum.com/images/js/cookie_code.js"/>');
			//document.write("<script type=\"text/JavaScript\" src=\""+myURL+"/phlogin/js/jquery-2.2.4.min.js\"></"+"script>");	
			//document.write("<script type=\"text/JavaScript\" src=\""+myURL+"/phlogin/js/bootstrap.min.js\"></"+"script>");
			//document.write("<script type=\"text/JavaScript\" src=\""+myURL+"/phlogin/js/main.js\"></"+"script>");	
			document.write("<script type=\"text/JavaScript\" src=\"/phlogin/js/jquery-2.2.4.min.js\"></"+"script>");	
			document.write("<script type=\"text/JavaScript\" src=\"/phlogin/js/bootstrap.min.js\"></"+"script>");
			document.write("<script type=\"text/JavaScript\" src=\"/phlogin/js/main.js\"></"+"script>");					
		}
		//Function that adds environment prefix
		function adjustEnviromentURLs(){
			var environment = "";  //default to production
			var i; 
			for(i in portalEnviromentUrlMappings){
				if(myURL.search(i)>0){
					environment = portalEnviromentUrlMappings[i];
				}
			}
			
			if(environment.length >0){
				//pullURLsToAdjust(environment);
			}
		}
	
		
	// cookie code
	
	function createCookie(name, value, expires, path, domain) {
  var cookie = name + "=" + escape(value) + ";";
 
  if (expires) {
    // If it's a date
    if(expires instanceof Date) {
      // If it isn't a valid date
      if (isNaN(expires.getTime()))
       expires = new Date();
    }
    else
      expires = new Date(new Date().getTime() + parseInt(expires) * 1000 * 60 * 60 * 24);
 
    cookie += "expires=" + expires.toGMTString() + ";";
  }
  else{
  var date = new Date();
  date.setTime(date.getTime() + (60*60*1000));
  cookie += "expires=" + date.toGMTString() + ";";
  }
  if (path)
    cookie += "path=" + path + ";";
  if (domain)
    cookie += "domain=" + domain + ";";
 
  document.cookie = cookie;
}

function getCookie(name) {
 var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function deleteCookie(name, path, domain) {
  // If the cookie exists
  if (getCookie(name))
    createCookie(name, "", -1, path, domain);
}

// end of cookie code



function forgotPasswordAction(){
	var userVal=document.getElementById('username').value;
	
	if(userVal=="" ){
		var divOne = document.getElementById('usererror');
		divOne.style.visibility = 'visible';
	}else{
	var url = "https://iamselfcare"+env+".yum.com/SelfCare/forgotpassword?id="+userVal+"&&lang=en_US";
	var win = window.open(url, '_blank');
	win.focus();
	//window.location.href = "https://iamselfcare"+env+".yum.com/SelfCare/forgotpassword?id="+userVal+"&&lang=en_US";
	}
	
}
		setBrand();</script><body onload=setInnerHTMLText();><div class=modal id=myModal><div class=modal-content><div class=modal-header><span class=close> × </span><h2>Error Occurred</h2></div><div style="text-align: center;"class=modal-body><br><br><span> <img alt=Image id=errorspan src=/phlogin/img/Error_Icon.png> </span><h4>Oops! Something went wrong. <br> Please close this browser and try login again..!</h4></div></div></div><div class=container-fluid><div class="row-fluid main-section"><div class="span8 visible-desktop"><div class=login-banner id=banner></div></div><div class=span4><div class=visible-phone><div class="mob-login-banner baner-mobile"><img alt=Image id=imageid src=/phlogin/img/hutlink-logo-mobile.svg></div></div><div class=login-section><div class="portlet-login login"><div class="control-group input-text-wrapper"><h1>Hello!</h1><form action=/pkmslogin.form id=frm method=POST name=frm><label>USER NAME:</label><div class=user-name><input aria-labelledby=Username aria-required=true id=username name=username placeholder=Username tabindex=1><ul style=display:none;><li class=usererror id=usererror><p class=errorMSG>UserName is required**</p></ul></div><label>PASSWORD:</label><div class=pass-word><input aria-labelledby=Password aria-required=true id=password name=password placeholder=Password tabindex=2 type=password></div><div id=TBError style=margin-top:1px;display:none;color:red><p>Incorrect UserID/Password Combination</div><div id=error style=clear:both;display:none;><p style="color: #ed1c24!important;"class=errorMSG>Incorrect UserID/Password Combination<p class=errorReminder id=phiErrTxt>Passwords are case sensitive. Please check your Caps lock key. If you have forgotten your username/password please use the "Forgot your Username/Password" link.</p><input name=login-form-type type=hidden value=pwd></div><div class=button-holder><button class="btn btn-primary"name=submit1 onclick=this.disabled=true;this.form.submit(); onmousedown=tbcGetUserName();>Log In</button></div></form></div></div></div></div></div><div style="color: #ed1c24!important;clear:both;"id=brand_error></div><div class="row-fluid Login-footer-info"><div class=span4><div class=login-main-container><h3>How to Log In</h3><ul><li>Use your Yum!-issued or Learning Zone ID and password.</ul></div></div><div class=span4><div class=login-main-container><h3>Request Access</h3><p>Click below to complete a request for access. A request will be submitted to your organization for approval.</p><a class=requestLink href=https://portalrfa.yum.com/yumRFA/RequestForAccess.jsp id=RFA target=_blank> Request Access </a></div></div><div class=span4><div class=login-main-container><h3>Trouble Logging In?</h3><p>If you have forgotten your password and/or username, or want to reset your security questions, <a class=login-contact-info href=https://iam.yum.com/selfservice/quicklinksus/ id=forgotPassword target=_blank> click here </a> .</div></div></div></div><div class="container-fluid footer-login"><div class=row-fluid><div id=footer><div class=footer-main-container><div class=span12><div class=footer-content><p>By accessing this website on a mobile device you agree to the following (do not access the website if you do not agree): You may not access this website or its content unless you are authorized in writing or by electronic agreement by Yum to do so, and unless you also are a current employee or contractor of (i) Yum, (ii) a commonly owned affiliate of Yum (KFC, Pizza Hut, Taco Bell and The Habit Burger Grill, each a "Brand"), (iii) a franchisee or licensee of a Brand, or (iv) an approved supplier or agency or consultant of Yum or a Brand. Use is limited solely to Yum system business purposes, and your use is limited further to only those portions of the website you are specifically authorized in writing to use. You may not download, capture or save (even on a temporary basis) any materials available on this website to a mobile device or transmit any content via a mobile device. Any unauthorized use of this website or content is strictly prohibited and may lead to loss of access, as well as to possible criminal and civil prosecution. This website and all content is the property of (or used by license by) Yum, and may be monitored by Yum (users should have no expectation of privacy). All usage must be in accordance with Yum policies regarding internet and content usage and security as posted by Yum from time to time.</div></div></div><div class=row-fluid><div class=footer-secondary-container><div class=span7><div class=copy-right>Copyright © 2020 Pizza Hut. All Rights Reserved.</div></div></div></div></div></div></div><script>// Get the modal
var modal = document.getElementById('myModal');

// Get the button that opens the modal
var btn = document.getElementById("myBtn");

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks the button, open the modal 
function errorPop() {
    modal.style.display = "block";
}

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
    modal.style.display = "none";
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}

function quitBox(cmd)
{   
    if (cmd=='quit')
    {
        open(location, '_self').close();
		
    }   
    return false;   
}

function windowClose() {
window.open('','_parent','');
window.close();
}</script><script>if (str.indexOf("Authentication failed") >= 0 || str.indexOf("DPWWA1104I") >= 0 ){
		if(str.indexOf("Name mismatch") >= 0){
			//alert( "Please close your current browser and try to login again..!");
			errorPop();
		}else{
		brandLoginMessage();
		loginError();
		}
	  
	} else {
	var username;
	createCookie("username", "noUserN0");
	}
		
	adjustEnviromentURLs();</script>