<!doctypehtml PUBLIC "-//IETF//DTD HTML//EN"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>
   Access Manager for Web Login
  </title><script language=JavaScript>//URL of the reverse proxy server
	//alert("none");

	//error message
	var errorString = "";

	var language=getParameterByName("language");

    function getParameterByName(name) {
					name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
					var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
					results = regex.exec(location.search);
					return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
	}

	var url=location.host + location.pathname + location.search;
		var link="";
		// Redirect for BIP scheduled for 3/9/15
		if (url.indexOf("bip.ct.gov") != -1 )
		{
			//link = "/bip";
                     //link = "https://bip.ct.gov/bip";	
			link = "https://"+location.host+"/bip/LoginServlet?ACTION=LOGIN&PAGE_ID=SELOG";

		     // BIP Maintenance page redirect
		 //    link = 'https://'+ location.host + '/bip_maintenance.html';
		}

		if (url.indexOf("samextwbsprda.ct.gov") != -1 )
		{
			link = "/AHCT/LandingPageCTHIX";
		}

		if (url.indexOf("samextwbsprdb.ct.gov") != -1 )
		{
			link = "/AHCT/LandingPageCTHIX";
		}
		// Redirect for Connect scheduled for 3/3
		if (url.indexOf("www.connect.ct.gov") != -1 )
		{
			link = "https://www.connect.ct.gov/access/jsp/access/Home.jsp";
			//link = "/access/jsp/access/Home.jsp";
			//link = "/access/";
		}

		else if (url.indexOf("connect.ct.gov") != -1 )
		{
			link = "https://connect.ct.gov/access/jsp/access/Home.jsp";
			//link = "/access/jsp/access/Home.jsp";
			//link = "/access/";
		}

		
		if (url.indexOf("accesshealthct.com") != -1 )
		{
			link = "/AHCT/LandingPageCTHIX";
		}
		else if (url.indexOf("www.accesshealthct.com") != -1 )
		{
			link = "/AHCT/LandingPageCTHIX";
		}

		// PMP redirect for 08/21/15 go-live, RFS #79285
		if (url.indexOf("pmp.accesshealthct.com") != -1 )
		{
			link = "/pmp/main/home_input";
		}

	    if (url.indexOf("m.accesshealthct.com") != -1 )
        {
          link = "/AHCT_Web/index.html";
        }
		
		var public_login_box1 = "none";
		var splitvalue = public_login_box1.split('/')[3];

		var accsplit = splitvalue.substring(0,6);

		if (accsplit=="access")
			{
			//var public_login_box1 = "https://"+public_login_box1.split('/')[2];
			var loginredirect = public_login_box1.split('?')[0];
			var loginredirect2 = loginredirect +"?"+ public_login_box1.split('?')[1];
			//var public_login_box2 = public_login_box1+"/access"+"?error="+errorString+"&lang="+language;
			var public_login_box2 = loginredirect2+"?error="+errorString+"&lang="+language;
        	}
        	else if (splitvalue=="AHCT")
        	{
			var public_login_box1 = "https://"+public_login_box1.split('/')[2];
			var public_login_box2 = public_login_box1+"/AHCT/UserLogin.action"+"?error="+errorString+"&lang="+language;
        	}

		else if (splitvalue.substring(0,13)=="ahctmobileapi")
        	{
			var public_login_box1 = "https://"+public_login_box1.split('/')[2];
			var public_login_box2 = public_login_box1+"/ahctmobileapi"+"?error="+errorString+"&lang="+language;
        	}
		
		// BIP scheduled for 3/9/15
              else if (splitvalue=="bip")
              {
                        var public_login_box1 = "https://"+public_login_box1.split('/')[2];
                        var public_login_box2 = public_login_box1+"/bip/"+"?error="+errorString+"&lang="+language;
              }

		// PMP changes for 08/21/15 go-live, RFS #79285
		else if (splitvalue=="pmp")
		{
			var public_login_box1 = "https://"+public_login_box1.split('/')[2];
			var public_login_box2 = public_login_box1+"/pmp/main/home_input"+"?error="+errorString+"&lang="+language;
		}</script><body onload="if (errorString!=null && errorString != '') {location.href=public_login_box2} else {location.href=link} "bgcolor=#FFFFFF text=#000000><br><br><br><script language=JavaScript>var warningString = "<B>WARNING:</B> To maintain your login session, make sure that your browser is configured to accept Cookies.";
document.cookie = 'acceptsCookies=yes';
if(document.cookie == ''){
document.write(warningString);
}
else{
document.cookie = 'acceptsCookies=yes; expires=Fri, 13-Apr-1970 00:00:00 GMT';
// Uncomment the following line for JavaScript redirection
// document.cookie = 'ISAMOriginalURL=' + encodeURIComponent(window.location) + "; Path=/;";
}</script><noscript><b> WARNING: </b> To maintain your login session, make sure that <br> your browser is configured to accept Cookies.</noscript><br>