 var reWhitespace = /^\s+$/
 var bikky = document.cookie; 

document.writeln("<form name='goHCAHOWTOSERCH' action='http://www.firsthealth.com/HCB/HCAHowToSearch.html' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name='goEDHCA' action='http://www.firsthealth.com/HCB/HCADisclaimer.html' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name='goEDHCN' action='http://www.firsthealth.com/HCB/HCNDisclaimer.html' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name='goEDHC4' action='/HC4/HC4Disclaimer.html' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name='goEDHCR' action='/HCR/HCRDisclaimer.html' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name='goEDHMW' action='http://www.firsthealth.com/HCB/HMWDisclaimer.html' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name='goHEAM' action='/HEAM/HEAMDisclaimer.html' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name='goHCH' action='/HCH/HCHDisclaimerAndDirectory.pdf' target=\"myWindow\" method='get'>");
document.writeln("<input type=\"hidden\" name=\"FLAG\" value=\"TRUE\">");
document.writeln("</form>");

document.writeln("<form name=\"controlFormHelath\" method=\"POST\" action=\"/smfh/newsfeed.do\">");
document.writeln("<input type=\"hidden\" name=\"pageName\" value=\"HealthNewsFake\">");
document.writeln("<input type=\"hidden\" name=\"searchType\" value=\"\">");
document.writeln("<input type=\"hidden\" name=\"searchParam\" value=\"\">");
document.writeln("<input type=\"hidden\" name=\"searchDate\" value=\"\">");
document.writeln("<input type=\"hidden\" name=\"searchTopic\" value=\"\">");
document.writeln("<input type=\"hidden\" name=\"article\" value=\"0\">");
document.writeln("<input type=\"hidden\" name=\"isCurrent\" value=\"true\">");
document.writeln("</form>");

document.writeln("<form name=goHtmlAction action='/smfh/htmlAction.do' method=POST>");
document.writeln("<input type=hidden name=pageUrl value=''>");
document.writeln("<input type=hidden name=displayFlag value=''>");
document.writeln("<input type=hidden name=displayName value=''>");
document.writeln("<input type=hidden name=breadCrumbs value=''>");
document.writeln("<input type=hidden name=template value=''>");
document.writeln("</form>");

document.writeln("<form name=goHtmlMhbpAction action='/smfh/htmlAction.do' method=POST>");
document.writeln("<input type=hidden name=pageUrl value=''>");
document.writeln("<input type=hidden name=section value=''>");
document.writeln("<input type=hidden name=subsection value=''>");
document.writeln("<input type=hidden name=leftNavHighlight value=''>");
document.writeln("</form>");

document.writeln("<form name=gomemberEligibility action='/membereligibility/servlet/Controller'>");
document.writeln("<input type=hidden name=groupcode value=''>");
document.writeln("<input type=hidden name=portalId value=''>");
document.writeln("<input type=hidden name=pageID value=''>");
document.writeln("</form>");

document.writeln("<form name=goemailDirectory >");
document.writeln("<input type=hidden name=groupcode value=''>");
document.writeln("<input type=hidden name=portalId value=''>");
document.writeln("<input type=hidden name=pageID value=''>");
document.writeln("</form>");

document.writeln("<form name=goLostCard action='/afhmd/memberContactUs.jsp'>");
document.writeln("<input type=hidden name=groupcode value=''>");
document.writeln("<input type=hidden name=portalId value=''>");
document.writeln("<input type=hidden name=pageID value=''>");
document.writeln("</form>");

document.writeln("<form name=goMhbpContactUs action='/afhmd/mhbpContactUs.jsp'>");
document.writeln("<input type=hidden name=groupcode value=''>");
document.writeln("<input type=hidden name=portalId value=''>");
document.writeln("<input type=hidden name=pageID value=''>");
document.writeln("</form>");

document.writeln("<form name=goRegistration action='/smfh/goRegistration.do' method=POST>");
document.writeln("<input type=hidden name=groupCode value=''>");
document.writeln("<input type=hidden name=portalId value=''>");
document.writeln("<input type=hidden name=pageID value=''>");
document.writeln("</form>");
						
document.writeln("<form name=goELECDIR  method=POST>");
document.writeln("<input type=hidden name=FORM_NAME value=20>");
document.writeln("<input type=hidden name=INET_ID>");
document.writeln("<input type=hidden name=SESS_ID value=1>");
document.writeln("<input type=hidden name=ED15_CODE value=1>");
document.writeln("<input type=hidden name=CLIENT_NAME>");
document.writeln("<input type=hidden name=PAGE_ID>");
document.writeln("<input type=hidden name=PORTAL_ID>"); 
document.writeln("</form>");

document.writeln("<form name=goELECDENT target='myWindow' method=post>");
document.writeln("<input type=hidden name=pageId value='STARTPAGE'>");
document.writeln("<input type=hidden name=SESS_ID value=1>");
document.writeln("<input type=hidden name=ED15_CODE value=1>");
document.writeln("<input type=hidden name=NW_CODE value='GUARD'>");
document.writeln("<input type=hidden name=INET_ID>");
document.writeln("<input type=hidden name=CLIENT_NAME>");
document.writeln("<input type=hidden name=APP_NAME>");
document.writeln("</form>");

document.writeln("<form name=goELECPH  target='myWindow' method=post>");
document.writeln("<input type=hidden name=pageId value='STARTPAGE'>");
document.writeln("<input type=hidden name=SESS_ID value=1>");
document.writeln("<input type=hidden name=INET_ID>");
document.writeln("<input type=hidden name=NW_CODE value='GUARD'>");
document.writeln("<input type=hidden name=ED15_CODE value=1>");
document.writeln("<input type=hidden name=CLIENT_NAME>");
document.writeln("<input type=hidden name=APP_NAME>");
document.writeln("</form>");

document.writeln("<form name=goSmfhLogin action='/smfh/login.do' method=POST>");
document.writeln("<input type=hidden name=saveLogin value='Y'>");
document.writeln("<input type=hidden name=groupCode value=''>");
document.writeln("</form>");

document.writeln("<form name=goCareSupport action='/smfh/careSupport.do' method=POST>");
document.writeln("<input type=hidden name=actionType value=''>");
document.writeln("<input type=hidden name=groupCode value=''>");
document.writeln("</form>");

document.writeln("<form name=goELECDIRTEST  target='myWindow' method=POST>");
document.writeln("<input type=hidden name=FORM_NAME value=20>");
document.writeln("<input type=hidden name=INET_ID>");
document.writeln("<input type=hidden name=SESS_ID value=1>");
document.writeln("<input type=hidden name=ED15_CODE value=1>"); 
document.writeln("<input type=hidden name=CLIENT_NAME>");
document.writeln("</form>");

document.writeln("<form name=goCalcMhbpAction action='/smfh/htmlAction.do' method=POST>");
document.writeln("<input type=hidden name=disclaimerCode value=''>");
document.writeln("<input type=hidden name=pageUrl value=''>");
document.writeln("<input type=hidden name=section value=''>");
document.writeln("<input type=hidden name=subsection value=''>");
document.writeln("<input type=hidden name=leftNavHighlight value=''>");
document.writeln("</form>");

document.writeln("<form name=goHtmlProAction action='/smfh/htmlAction.do' method=POST>");
document.writeln("<input type=hidden name=pageUrl value=''>");
document.writeln("<input type=hidden name=section value=''>");

document.writeln("</form>");

document.writeln("<form name=goELECDIRTEMP action='/medicalEd/servlet/MedicalEdServlet' method=POST>");
document.writeln("<input type=hidden name=FORM_NAME value=20>");
document.writeln("<input type=hidden name=INET_ID>");
document.writeln("<input type=hidden name=SESS_ID value=1>");
document.writeln("<input type=hidden name=ED15_CODE value=1>");
document.writeln("<input type=hidden name=CLIENT_NAME>");
document.writeln("<input type=hidden name=PAGE_ID>");
document.writeln("<input type=hidden name=PORTAL_ID>"); 
document.writeln("</form>");

//Sridevi.Kalidindi: Form for the link of MOS and Provider Online LookUp in the smfh site
//document.writeln("<form name=mosForm action='http://webstage-firsthealth/default.asp' target=myWindow method=GET>");
document.writeln("<form name=mosForm action='http://www.coventrynational.com' target=myWindow method=GET>");
document.writeln("<input type=hidden name=cltid value=''>");
document.writeln("</form>");

document.writeln("<form name=providerForm target='_blank' method=POST >");
document.writeln("<input type=hidden name=groupCode value=sGroupCode >");
document.writeln("</form>");

//Sridevi.Kalidindi:End

document.writeln('<form name=goDIRMAKER  target="myWindow" method=POST>');
document.writeln('<input type=hidden name=FORM_NAME value="">');
document.writeln('<input type=hidden name=SESS_ID value="">');
document.writeln('<input type=hidden name=INET_ID>');
document.writeln('<input type=hidden name=ED15_CODE value="">');
document.writeln('<input type=hidden name=CLIENT_NAME>');
document.writeln('<input type=hidden name=CLIENT_CODE>');
document.writeln('</form>');

/*
//Healthwise Form to Point to Internal Healthwise homepage
document.writeln("<form name=goHtmlHwseAction action='/healthwise/servlet/Controller' method=GET>");
document.writeln("<form name=goHtmlHwseAction action='' method=GET>");
document.writeln("<input type=hidden name=groupCode value=''>");
document.writeln("<input type=hidden name=portalId value=''>");
document.writeln("<input type=hidden name=pageId value=''>");
document.writeln("</form>");
*/

/*
//Healthwise Form to Point to Internal Healthlwise Link
document.writeln("<form name=goHtmlHwseActionWithId action='/healthwise/servlet/Controller' method=POST>");
document.writeln("<form name=goHtmlHwseActionWithId action='' method=POST>");
document.writeln("<input type=hidden name=groupCode value=''>");
document.writeln("<input type=hidden name=portalId value=''>");
document.writeln("<input type=hidden name=pageId value=''>");
document.writeln("<input type=hidden name=HWID value=''>");
document.writeln("</form>");
*/

//Healthwise Form to Point to External Healthwise Link
document.writeln("<form name='frmGTHW' method=POST>");
document.writeln("<input type='hidden' name='f' value=''>");
document.writeln("</form>");

document.writeln("<form name=Secure method=POST>");
document.writeln("</form>");


/*Secure any URL*/

function secureURL(urlVal)
	{
		document.Secure.action = "https://" + sUrl + urlVal;
		document.Secure.submit();
	}


function fnDIRMAKER()
	{
      	openWindow1();
        document.goDIRMAKER.INET_ID.value=iInetId;
        document.goDIRMAKER.CLIENT_CODE.value=sGroupCode;
        document.goDIRMAKER.CLIENT_NAME.value=sClientName;
        document.goDIRMAKER.action = "http://"+sUrl+"/dirmaker/servlet/DMServlet";
        document.goDIRMAKER.submit();
        
	}


function fnELECDIRtest()
	{
		//alert(sUrl);
		openWindow1();
		document.goELECDIRTEST.INET_ID.value=iInetId;
		document.goELECDIRTEST.CLIENT_NAME.value=sClientName;
		document.goELECDIRTEST.action = "http://"+sUrl+"/medicalEd/servlet/MedicalEdServlet";
		document.goELECDIRTEST.submit();
	}
	function goCareSupport(actionTypeV)
	{
		document.goCareSupport.actionType.value = actionTypeV;
		document.goCareSupport.submit();
	}
		
	function goSmfhLogin()
	{
		alert("After you save your Login ID , we suggest that you bookmark this page for future use.");
		document.goSmfhLogin.groupCode.value=sGroupCode ;
		document.goSmfhLogin.submit();
	}
		
	function openWindow1(record){
	 
	 	
		var winWidth = 720;
        var winHeight =	540;
        var xOffset = (800-720-40)*(1/2);
    	var yOffset = (600-540)*(1/2);
    	    	
        myWindow=window.open('','myWindow','location=yes,menubar=yes,personalbar=yes,resizable=yes,height=\"'
        			+ winHeight+'\",width=\"'+winWidth 
        			+'\",scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,'
        			+ 'innerheight='+winHeight+
        			',innerWidth = '+winWidth+
        			',left=' + xOffset + 
                    ',screenX=' + xOffset + 
                    ',top=' + yOffset + 
                    ',screenY=' + yOffset);
        myWindow.focus();
 	}
 	
	function fnELECDIR()
	{
		if(sGroupCode.toUpperCase() == "HCB")
		{
			fnEDHCA();
		}
		else if (sGroupCode.toUpperCase() == "HMW")
		{
			fnEDHMW();
		}
		else if (sGroupCode.toUpperCase() == "HCN")
		{
			fnEDHCN();
		}
		else if (sGroupCode.toUpperCase() == "HC4")
		{
			fnEDHC4();
		}
		else if (sGroupCode.toUpperCase() == "HCR")
		{
			fnEDHCR();
		}
		else if (sGroupCode.toUpperCase() == "HEAM")
		{
			fnHEAM();
		}
		else if (sGroupCode.toUpperCase() == "HCH1")
		{
			fnHCH();
		}
		else
		{
      document.goELECDIR.INET_ID.value=iInetId;
			document.goELECDIR.CLIENT_NAME.value=sClientName;
			document.goELECDIR.PORTAL_ID.value=sPortalId;
			document.goELECDIR.PAGE_ID.value=sPageId;
			document.goELECDIR.action = "/medicalEd/servlet/MedicalEdServlet";
			document.goELECDIR.submit();
		}
	}
	
	//Sridevi Kalidindi:FC to IDX
  function fnProdLookUp()
  {
    var i;
    document.providerForm.groupCode.value=sGroupCode;
    
        if (sGroupCode.toUpperCase() == "CXC")		
	  {
			i='035';
	  } 
	  else if (sGroupCode.toUpperCase() == "MPE")		
	  {
			i='036';
	  } 
    	  else if (sGroupCode.toUpperCase() == "DCC")		
	  {
			i='037';
	  } 
	  else if (sGroupCode.toUpperCase() == "ONYX")		
	  {
			i='038'; 
	  } 
	  else if (sGroupCode.toUpperCase() == "PSI")		
	  {
			i='039'; 
	  }   
 		document.providerForm.action = "http://www.geoaccess.com/coventry/po/begin.asp?plancode="+i ;
    document.providerForm.submit();		       
  }	
	function smfhRegistration()
	{
		document.goRegistration.groupcode.value=sGroupCode;
		document.goRegistration.portalId.value=sPortalId;
		document.goRegistration.pageID.value=sPageId;
		document.goRegistration.submit();
	}
	function goemailDirectory(serverUrl)
	{
		document.goemailDirectory.groupcode.value=sGroupCode;
		document.goemailDirectory.portalId.value=sPortalId;
		document.goemailDirectory.pageID.value=sPageId;
		var gAction="https://" + serverUrl + "/afhmd/askMedicalDirector.jsp";
		
		document.goemailDirectory.action = gAction;
		//alert(document.goemailDirectory.action);
		document.goemailDirectory.submit();
	}
	function goLostCardRequest()
	{
		document.goLostCard.groupcode.value=sGroupCode;
		document.goLostCard.portalId.value=sPortalId;
		document.goLostCard.pageID.value=sPageId;
		document.goLostCard.submit();
	}
	function goMhbpContactUs()
	{
		document.goMhbpContactUs.groupcode.value=sGroupCode;
		document.goMhbpContactUs.portalId.value=sPortalId;
		document.goMhbpContactUs.pageID.value=sPageId;
		document.goMhbpContactUs.submit();
	}
	function gomemberEligibility()
	{   
		document.gomemberEligibility.groupcode.value=sGroupCode;
		document.gomemberEligibility.portalId.value=sPortalId;
		document.gomemberEligibility.pageID.value=sPageId;
		document.gomemberEligibility.submit();
	}
	function goHtmlActionWithBreadCrumbs(theUrl,theFlag,theName)
	{
		document.goHtmlAction.pageUrl.value = theUrl;
		document.goHtmlAction.displayFlag.value = theFlag;
		document.goHtmlAction.displayName.value = theName;
		document.goHtmlAction.breadCrumbs.value = sBreadCrumbs;
		document.goHtmlAction.submit();
	}
	
	function goHtmlActionWithBreadCrumbs(theUrl,theFlag,theName,template)
	{
		document.goHtmlAction.pageUrl.value = theUrl;
		document.goHtmlAction.displayFlag.value = theFlag;
		document.goHtmlAction.displayName.value = theName;
		document.goHtmlAction.breadCrumbs.value = sBreadCrumbs;
		document.goHtmlAction.template.value = template; 
		document.goHtmlAction.submit();
	}	
	
	function goPasswordAction(dk)
	{
		alert("Hello");
		dk.hboPassword.value = theHboPassword;
		dk.pageUrl.value = theUrl;
		dk.section.value = theSection;
		dk.subsection.value = theSubsection;
		dk.leftNavHighlight.value = theLeftNavHighlight;
		dk.method = "POST";
		dk.action ="http://phxws00-fhedev.firsthealth.com/smfh/htmlAction.do";
		dk.submit();
	}
	
	function goHtmlMhbpAction(theUrl,theSection,theSubsection,theLeftNavHighlight)
	
	{
		//alert( unescape(theUrl));
		//alert( unescape(theSection));
		//alert (unescape(theSubsection));
		//alert (unescape(theLeftNavHighlight));
		var strSubTest = "html"; 
		var cliamsURL  = "html";
		if ( ( theUrl !=  "" ) && ( theUrl.length > 0 ) )
		{
		    strSubTest = theUrl.substring( (theUrl.length-2),theUrl.length);
		}    
		
		if (strSubTest == "do")
		{
		    if (theUrl.length > 18 )
		    {
		        cliamsURL = theUrl.substring( (theUrl.length-18),theUrl.length);	
		    }	
		    	
		    if (cliamsURL == "PendedClaimInfo.do")
		    {
		    	mhbpNavigate(theUrl);
		    	return;
		    }
		    else if ( (theUrl == "mhEditProfile.do"))
		    {
		    	theUrl = "https://"+sUrl+"/smfh/"+theUrl;
		    	document.goHtmlMhbpAction.action = theUrl ; 
		    }	
		    else
		    { 		
		        document.goHtmlMhbpAction.action = theUrl ;  	
		    }    
	  }
	        
	  document.goHtmlMhbpAction.pageUrl.value = unescape (theUrl);
		document.goHtmlMhbpAction.section.value = unescape (theSection);
		document.goHtmlMhbpAction.subsection.value = unescape (theSubsection);
		document.goHtmlMhbpAction.leftNavHighlight.value = unescape (theLeftNavHighlight);
		document.goHtmlMhbpAction.submit();

	}
	//This function is called when the MOS link is clicked.
	function submitForm(obj) {
	  obj.cltid.value=sGroupCode;
 		obj.submit();
   }

	function fnELECDENT()
	{ 
		openWindow1();
		document.goELECDENT.APP_NAME.value = "DENTAL";
		document.goELECDENT.INET_ID.value=iInetId;
		document.goELECDENT.CLIENT_NAME.value=sClientName;
		document.goELECDENT.SESS_ID.value='1';
		document.goELECDENT.action = "/dentalEd/servlet/PharmacyController";
		document.goELECDENT.submit();
	}
    
    function fnELECPH()
	{
		openWindow1();
		document.goELECPH.APP_NAME.value = "PHARMACY";
		document.goELECPH.INET_ID.value=iInetId;
		document.goELECPH.CLIENT_NAME.value=sClientName;
		document.goELECPH.SESS_ID.value='1';
		document.goELECPH.action = "/pharmacyEd/servlet/PharmacyController";
		document.goELECPH.submit();
	}
	
	function goNetworkLookUP()
	{
		var theurl = "http://"+sUrl+"/UCFM/?ClientID="+sGroupCode;
		popup(theurl,600,800);
	}
	
	function goNetworkLookUPFee()
	{
		var theurl = "http://"+sUrl+"/UCFM/?ClientID="+sGroupCode;
		popup(theurl,600,800);
	}
	 
	
	function popup(theurl, width, height) {
	
	//if(!popup.arguments[1]) { var width = 720; }
	//if(!popup.arguments[2]) { var height = 540; }
	var winWidth = 720;
    var winHeight =	540; 
	var xOffset = (800-720-40)*(1/2);
    var yOffset = (600-540)*(1/2);
    myWindow=window.open(theurl,'myWindow','location=yes,menubar=yes,personalbar=yes,resizable=yes,height='
        			+ winHeight+',width='+winWidth 
        			+',scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,'
        			+ 'innerheight='+winWidth +
        			',innerWidth = '+winHeight+
        			',left=' + xOffset + 
                    ',screenX=' + xOffset + 
                    ',top=' + yOffset + 
                    ',screenY=' + yOffset);  
    myWindow.focus();
}

function healthWisePopup() {
	
	var winWidth = 720;
    var winHeight =	540; 
	var xOffset = (800-720-40)*(1/2);
    var yOffset = (600-540)*(1/2);
    myWindow=window.open('http://www.healthwise.net/firsthlth/Content/CustDocument.aspx?Xml=stub.xml&Xsl=cd.FrontPage.xsl','myWindow','location=yes,menubar=yes,personalbar=yes,resizable=yes,height='
        			+ winHeight+',width='+winWidth 
        			+',scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,'
        			+ 'innerheight='+winWidth +
        			',innerWidth = '+winHeight+
        			',left=' + xOffset + 
                    ',screenX=' + xOffset + 
                    ',top=' + yOffset + 
                    ',screenY=' + yOffset);  
    myWindow.focus();
}



function fnHCH()
{
	openWindow1();
	document.goHCH.submit();
}
function fnHEAM()
{
	openWindow1();
	document.goHEAM.submit();
}
function fnEDHCA()
{
	openWindow1();
	document.goEDHCA.submit();
}

function fnEDHC4()
{
	openWindow1();
	document.goEDHC4.submit();
}

function fnEDHCR()
{
	openWindow1();
	document.goEDHCR.submit();
}

function fnEDHCN()
{
	openWindow1();
	document.goEDHCN.submit();
}

function fnEDHMW()
{
	openWindow1();
	document.goEDHMW.submit();
}
	
function fnHCAHOWTOSERCH()
{
	openWindow1();
	document.goHCAHOWTOSERCH.submit();
}
function fnEDAURORA()
{
    var theUrl="http://www.aurora.org/portals/employees/providers.asp";
    var winWidth = 720;
    var winHeight =	540; 
    var xOffset = (800-720-40)*(1/2);
    var yOffset = (600-540)*(1/2);
    myWindow=window.open(theUrl,'myWindow','location=yes,menubar=yes,personalbar=yes,resizable=yes,height='
        			+ winHeight+',width='+winWidth 
        			+',scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,'
        			+ 'innerheight='+winWidth +
        			',innerWidth = '+winHeight+
        			',left=' + xOffset + 
                    ',screenX=' + xOffset + 
                    ',top=' + yOffset + 
                    ',screenY=' + yOffset);  
    myWindow.focus();	
}

function goCalcMhbpAction(theUrl,theSection,theSubsection,theLeftNavHighlight,theDisclaimer)
{
	document.goCalcMhbpAction.pageUrl.value = unescape (theUrl);
	document.goCalcMhbpAction.section.value = unescape (theSection);
	document.goCalcMhbpAction.subsection.value = unescape (theSubsection);
	document.goCalcMhbpAction.leftNavHighlight.value = unescape (theLeftNavHighlight);
	document.goCalcMhbpAction.disclaimerCode.value = unescape (theDisclaimer);
	document.goCalcMhbpAction.submit();	
}

function goHtmlProAction(theUrl,theSection)
{
	document.goHtmlProAction.pageUrl.value = unescape (theUrl);
	document.goHtmlProAction.section.value = unescape (theSection);
	
	document.goHtmlProAction.submit();	
}

function goCalcAction(theDisclaimerCode)
{
	if (theDisclaimerCode == "1")
	{
		goHtmlMhbpAction("/mhbp/calc/mhbp_calc_1.html","calc","no","Benefits Cost Calculator");
	}
	else if (theDisclaimerCode == "2")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_2.html","calc","no","Benefits Cost Calculator");	
	}
	else if (theDisclaimerCode == "3")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_3.html","calc","no","Benefits Cost Calculator");	
	}
	else if (theDisclaimerCode == "4")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_4.html","calc","no","Benefits Cost Calculator");	
	}
	else if (theDisclaimerCode == "5")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_5.html","calc","no","Benefits Cost Calculator");	
	}
	else if (theDisclaimerCode == "6")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_6.html","calc","no","Benefits Cost Calculator");	
	}
	else if (theDisclaimerCode == "7")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_7.html","calc","no","Benefits Cost Calculator");	
	}
	else if (theDisclaimerCode == "8")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_8.html","calc","no","Benefits Cost Calculator");	
	}
	else if (theDisclaimerCode == "9")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_custom.html","calc","no","Benefits Cost Calculator");
	}
	else if (theDisclaimerCode == "10")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_custom_medicare.html","calc","no","Benefits Cost Calculator");
	}	
		else if (theDisclaimerCode == "11")
	{
		javascript:goHtmlMhbpAction("/mhbp/calc/mhbp_calc_custom_family.html","calc","no","Benefits Cost Calculator");
	}													
		
}

function hospitalCompareTool(edFlag)
{				
											
	var cd = "groupCode="+sGroupCode+"&INET_ID="+iInetId+"&SESS_ID=1&PORTAL_ID="+sPortalId+"&PAGE_ID="+sPageId+"&TARGET_URL=http://"+sUrl+"/medicalEd/servlet/MedicalEdServlet";
	
	var theUrl = "";
	if((sGroupCode.toUpperCase() == "HCB") || (sGroupCode.toUpperCase() == "HMW") ||(sGroupCode.toUpperCase() == "HCN"))
	{
		theUrl = "http://firsthealth.sqctool.com/?f=myfirsthealth&pid=hca";
		//theUrl = "http://test.sqctool.com/?f=myfirsthealth&pid=hca";
	}
	else
	{
		theUrl = "http://firsthealth.sqctool.com/index.aspx?F=myfirsthealth&pid=myfirsthealth";
		//theUrl = "http://test.sqctool.com/?f=myfirsthealth";
	}
	if(edFlag == 1)
	{
		theUrl = theUrl +"&cd="+escape(cd);
	}
	
	var winWidth = 720;
    var winHeight =	540; 
	var xOffset = (800-720-40)*(1/2);
    var yOffset = (600-540)*(1/2);
    myWindow=window.open(theUrl,'myWindow','location=yes,menubar=yes,personalbar=yes,resizable=yes,height='
        			+ winHeight+',width='+winWidth 
        			+',scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,'
        			+ 'innerheight='+winWidth +
        			',innerWidth = '+winHeight+
        			',left=' + xOffset + 
                    ',screenX=' + xOffset + 
                    ',top=' + yOffset + 
                    ',screenY=' + yOffset);  
    myWindow.focus();
}

function fnELECDIRTEMP()
	{
		if(sGroupCode.toUpperCase() == "HCB")
		{
			fnEDHCA();
		}
		else if (sGroupCode.toUpperCase() == "HMW")
		{
			fnEDHMW();
		}
		else if (sGroupCode.toUpperCase() == "HCN")
		{
			fnEDHCN();
		}
		else
		{
            
			document.goELECDIRTEMP.INET_ID.value=iInetId;
			document.goELECDIRTEMP.CLIENT_NAME.value=sClientName;
			document.goELECDIRTEMP.PORTAL_ID.value=sPortalId;
			document.goELECDIRTEMP.PAGE_ID.value=sPageId;
			document.goELECDIRTEMP.submit();
		}
	}
 
//Function has been updated to point link directly to Healthwise site.  See below
/*
function goHtmlHwseDirect(directPage)
	{
		document.goHtmlHwseActionWithId.groupCode.value=sGroupCode;
		document.goHtmlHwseActionWithId.portalId.value=sPortalId;
		document.goHtmlHwseActionWithId.pageId.value=sPageId;
		document.goHtmlHwseActionWithId.HWID.value=directPage;
		document.goHtmlHwseActionWithId.action = 'http://' + sUrl + '/healthwise/servlet/Controller';
		document.goHtmlHwseActionWithId.submit();
	}
*/


//Redirect users to the specific subject in the Healthwise Knowledgebase hosted by Healthwise 
function goHtmlHwseDirect(directPage)
	{
		var doc = directPage.slice(0,directPage.indexOf("-"));
		var sec = directPage.slice((directPage.indexOf("-") +1),directPage.length);
		var groupName ="";
		var url = "";

		if ((sGroupCode == "MHBPTE") || (sGroupCode == "MHB"))
		{
			groupName = "mhbp";
		}
			else
			{
				groupName = "firsthealth";
			};

		//url = "http://www.healthwise.net/" +  groupName + "/Content/StdDocument.aspx?DOCHWID=" + doc + "&SECWID=" + sec;
		url = "http://www.healthwise.net/" +  groupName + "/Content/StdDocument.aspx?HWID=" + doc + "&SECWID=" + sec + "-Header";

		document.frmGTHW.action = url;
		document.frmGTHW.f.value = groupName;
		document.frmGTHW.submit();

	}

//Function has been replaced by a new function that will point directly to the Healthwise Knowlodge base.  See Below.
/* 
function goHtmlHwseAction()
	{   
		document.goHtmlHwseAction.groupCode.value=sGroupCode;
		document.goHtmlHwseAction.portalId.value=sPortalId;
		document.goHtmlHwseAction.pageId.value=sPageId;
		document.goHtmlHwseAction.action = 'http://' + sUrl + '/healthwise/servlet/Controller';
		document.goHtmlHwseAction.submit();
	}
*/

//Redirect users to the Healthwise Knowledgebase hosted by Healthwise 
function goHtmlHwseAction()
	{   

		var groupName ="";
		var url = "";
		
		if ((sGroupCode == "MHBPTE") || (sGroupCode == "MHB"))
		{
			groupName = "mhbp";
		}
			else
			{
			groupName = "firsthealth";
			};

			url = "http://www.healthwise.net/" + groupName + "/default.aspx";

			document.frmGTHW.action = url;
			document.frmGTHW.f.value = groupName;
			document.frmGTHW.submit();

	}

function isWhitespace (s)
{
    return (reWhitespace.test(s));
}

// Check whether string s is empty.
function isEmpty(s)
{   

    return ((s == null) || (s.length == 0))
}

function mhbpEmailValidate(dk)
{
	if ( (isWhitespace(dk.message.value)) || (isEmpty(dk.message.value)) )
    	{
       		 alert(" No message entered");
        	dk.message.focus();
        return false;
    	}
        	   	
    	if (dk.message.value.length > 600)
    	 {
    	 	alert('Message not to exceed 600 characters');
    	 	dk.message.focus();
    	 			return false;	
    	 }
    	    	 
    	 if (dk.state.options[0].selected || dk.state.options[1].selected)
    	 {
    	 	alert('Please enter a state');
	 	dk.state.focus();
				
				return false;	
    	 }
    	 
	if (dk.emailAddress.value.length < 1 || dk.emailAddress.value.indexOf("@",0)== -1)
	 {
	 	alert('Incorrect e-mail format');
	 	dk.emailAddress.focus();
				return false;
	 }
	 
    dk.method="POST";
		dk.action="/afhmd/portalEmail.do";
		dk.submit();
		return;
}

function goDiffLogin()
{
	document.location="http://" + sUrl;
		
}

function prosContactUs(email)
{
	
	document.location.href="mailto:"+email+"?subject=Prospect Site "+sClientName;	
}

function hospitalCompareToolTest(edFlag)
{				
											
	var cd = "groupCode="+sGroupCode+"&INET_ID="+iInetId+"&SESS_ID=1&PORTAL_ID="+sPortalId+"&PAGE_ID="+sPageId+"&TARGET_URL=http://"+sUrl+"/medicalEd/servlet/MedicalEdServlet";
	var theUrl = "";
	if((sGroupCode.toUpperCase() == "HCB") || (sGroupCode.toUpperCase() == "HMW") ||(sGroupCode.toUpperCase() == "HCN"))
	{
		theUrl = "http://test.sqctool.com/?f=MyFirstHealth&pid=hca";
		//theUrl = "http://test.sqctool.com/?f=myfirsthealth&pid=hca";
	}
	else
	{
		theUrl = "http://test.sqctool.com/?f=MyFirstHealth";
		//theUrl = "http://test.sqctool.com/?f=myfirsthealth";
	}

	if(edFlag == 1)
	{
		sGroupCode="FHCC";
		var cd = "groupCode="+sGroupCode+"&INET_ID="+iInetId+"&SESS_ID=1&PORTAL_ID="+sPortalId+"&PAGE_ID="+sPageId+"&TARGET_URL=http://"+sUrl+"/medicalEd/servlet/MedicalEdServlet";
		theUrl = theUrl +"&cd="+escape(cd);
	}
	
	var winWidth = 720;
    var winHeight =	540; 
	var xOffset = (800-720-40)*(1/2);
    var yOffset = (600-540)*(1/2);
    myWindow=window.open(theUrl,'myWindow','location=yes,menubar=yes,personalbar=yes,resizable=yes,height='
        			+ winHeight+',width='+winWidth 
        			+',scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,'
        			+ 'innerheight='+winWidth +
        			',innerWidth = '+winHeight+
        			',left=' + xOffset + 
                    ',screenX=' + xOffset + 
                    ',top=' + yOffset + 
                    ',screenY=' + yOffset);  
    myWindow.focus();
}

function goSpanHealthwise()
{
    var theUrl="https://hwoshg.healthwise.net/firsthealth?f=firsthealth";
    var winWidth = 720;
    var winHeight =	540; 
	var xOffset = (800-720-40)*(1/2);
    var yOffset = (600-540)*(1/2);
    myWindow=window.open(theUrl,'myWindow','location=yes,menubar=yes,personalbar=yes,resizable=yes,height='
        			+ winHeight+',width='+winWidth 
        			+',scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,'
        			+ 'innerheight='+winWidth +
        			',innerWidth = '+winHeight+
        			',left=' + xOffset + 
                    ',screenX=' + xOffset + 
                    ',top=' + yOffset + 
                    ',screenY=' + yOffset);  
    myWindow.focus();
}

function guidResources()
{
	this.open('http://www.guidanceresources.com','_blank');	
}

function caremark()
{
	this.open('http://caremark.com','_blank');	
}	

function coleVisNet()
{
	if((sGroupCode.toUpperCase() == "MWT")||(sGroupCode.toUpperCase() == "MDO"))
	{
	  this.open('https://www.eyemedvisioncare.com/memweb/ProviderLocator?ClientId=30339','_blank');
	}
	else if((sGroupCode.toUpperCase() == "CMG"))
	{
	  this.open('https://www.eyemedvisioncare.com/memweb/ProviderLocator?ClientId=30629','_blank');
	}
	else if((sGroupCode.toUpperCase() == "BMC"))
	{
	  this.open('https://www.eyemedvisioncare.com/memweb/ProviderLocator?ClientId=30652','_blank');
	}
}

function caremark()
{
	this.open('http://www.caremark.com','_blank');	
}

function goHtmlMhbpNavAction(theUrl,theSection,theSubsection,theLeftNavHighlight,flag)
	{
	var mhbpNav="mhbpNav";	
	setCookie(mhbpNav,flag);
	
	document.goCalcMhbpAction.pageUrl.value = unescape (theUrl);
	document.goCalcMhbpAction.section.value = unescape (theSection);
	document.goCalcMhbpAction.subsection.value = unescape (theSubsection);
	document.goCalcMhbpAction.leftNavHighlight.value = unescape (theLeftNavHighlight);
	document.goCalcMhbpAction.submit();	
	}

function getCookie(name)
	{ // use: getCookie("name");
	 var index = bikky.indexOf(name + "="); 
	 if (index == -1) return null;
	 index = bikky.indexOf("=", index) + 1; 
	 var endstr = bikky.indexOf(";", index); 
	 if (endstr == -1) endstr = bikky.length; 
	 return unescape(bikky.substring(index, endstr)); 
	}
	
function setCookie(name, value) 
	{ // use: setCookie("name", value);
	  
	  var today = new Date();
	  var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000); // plus 28 days
	  if (value != null && value != "") 
	  document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
	  bikky= document.cookie; // update bikky
	}
function rx(value)
{
	if (value ==1)
	{
		goHtmlActionWithBreadCrumbs("/s_mfh/manage_my_care/mfh_rxCbk.html","N");
	}
	else
	{
		goHtmlActionWithBreadCrumbs("/s_mfh/provider/mfh_providerCbk.html","N");	
	}
}

function lostIdCardCt(id)
{
	if (sGroupCode.toUpperCase() == "MDO")
	{
	  	var outputValue = "";
		outputValue += '<table border=0 ><tr>          <td><b><a name="a" id="a"></a>How can I replace a lost ID card?</b><br>           ';
		outputValue += 'Contact Caremark at (866) 485-0272</td></tr></table>';
		var out = document.write( outputValue );
		return out;
	}
	else
	{
		if (id == "on")
		{
			var outputValue = "";

			outputValue += '<TABLE cellSpacing=0 cellPadding=0 width=100% border=0>  <TR>     <TD vAlign=top> <P class="hdln';
			outputValue += 'largegold">ID Card Request</P>      <P>If you are a covered member without a card, please <a href=';
			outputValue += '\'JavaScript:goLostCardRequest();\'>      	send us an e-mail         </a>or call us at the toll-fr';
			outputValue += 'ee number provided in your enrollment kit. Once         we verify eligibility, a temporary ID card';
			outputValue += ' can be faxed or e-mailed to         you. A permanent card will be ordered for continued use and w';
			outputValue += 'ill arrive         in 7-10 days. The card(s) are for you and any other family member on your    ';
			outputValue += '     health plan. Cards with individual family member\'s names are not necessary         or provide';
			outputValue += 'd.</p>      <p>If, at the time of your call, eligibility cannot be confirmed, First         Heal';
			outputValue += 'th will follow up with the Eligibility Department and, if necessary,         your employer. As soo';
			outputValue += 'n as your coverage can be confirmed, we will contact         you to send either or both the tempor';
			outputValue += 'ary and/or permanent ID card.</p>      <p><b>Tip</b> - If you have children away at school, you ma';
			outputValue += 'y want to provide them         with an ID card. Covered dependents use the same ID card, making it';
			outputValue += ' easier         to access services. Also, because the toll-free number is listed on the         ';
			outputValue += 'card, they can call us to locate a doctor.<br>      </p>      </p></TD>  </TR>  <TR>     <';
			outputValue += 'TD vAlign=top>&nbsp;</TD>  </TR>  <TR>     <TD vAlign=top bgColor=#ffffff><IMG height=1 src="/';
			outputValue += 's_mfh/images/spacer.gif" width=1></TD>  </TR></TABLE>';

			var out = document.write( outputValue );
			return out;	
		}
		
		var outputValue = "";

		outputValue += '<tr>          <td><b><a name="a" id="a"></a>How can I replace a lost ID card?</b><br>           ';
		outputValue += ' To obtain a replacement for your ID card, you may <a href=\'javascript:goContactUs();\'>send       ';
		outputValue += '      us an e-mail</a> or contact your Human Resources department for the             toll-free nu';
		outputValue += 'mber to call. We try to respond to all e-mails within             48 hours. If you are unsure of t';
		outputValue += 'he card number, please contact your             Human Resources Department. </td>        </tr>';

		var out = document.write( outputValue );
		return out;
	}
}

//function currently not in use
/**
function careSupport()
{
	if (sGroupCode.toUpperCase() == "XXXXX")
	{
		var outputValue = "";

		outputValue += '<table width="500px" border="0px" cellspacing="0px" cellpadding="5px"><tr><td class="te';
		outputValue += 'xt" width="50%"><input type="checkbox" name="condition1" value="Yes" >&nbsp;&nbsp;<b>Asthma</b>';
		outputValue += '</td><td class="text" width="50%"><input type="checkbox" name="condition6" value="Yes" >';
		outputValue += '&nbsp;&nbsp;<b>Heart Attack and/or Angina</b></td></tr><tr><td class="text" width="50%';
		outputValue += '"><input type="checkbox" name="condition2" value="Yes" >&nbsp;&nbsp;<b>Chronic Wounds</b></';
		outputValue += 'td><td class="text" width="50%"><input type="checkbox" name="condition7" value="Yes" >&nbsp';
		outputValue += ';&nbsp;<b>Heart	Failure</b></td></tr><tr><td class="text" width="50%"><input type';
		outputValue += '="checkbox" name="condition3" value="Yes" >&nbsp;&nbsp;<b>End Stage Renal Disease</b></td><t';
		outputValue += 'd class="text" width="50%"><input type="checkbox" name="condition5" value="Yes" >&nbsp;&nbsp;<b';
		outputValue += '>Diabetes</b></td></tr><tr><td class="text" width="50%"><inp';
		outputValue += 'ut type="checkbox" name="condition4" value="Yes" >&nbsp;&nbsp;<b>Depression</b></td><td clas';
		outputValue += 's="text" width="50%"><input type="checkbox" name="condition9" value="Yes" >&nbsp;&nbsp;<b>Pregn';
		outputValue += 'ancy</b></td></tr><tr nowrap><td class="text" width="50%"><input type="checkbox" name="condition8" value=';
		outputValue += '"Yes" >&nbsp;&nbsp;<b>Chronic Obstructive Pulmonary Disease</b>		</td>			</tr></table>';
		var out = document.write( outputValue );
		return out;		
	}
	else
	{
		var outputValue = "";

		outputValue += '<table width="500px" border="0px" cellspacing="0px" cellpadding="5px"><tr><td class="te';
		outputValue += 'xt" width="50%"><input type="checkbox" name="condition1" value="Yes" >&nbsp;&nbsp;<b>Asthma</b>';
		outputValue += '</td><td class="text" width="50%"><input type="checkbox" name="condition6" value="Yes" >';
		outputValue += '&nbsp;&nbsp;<b>Heart Attack and/or Angina</b></td></tr><tr><td class="text" width="50%';
		outputValue += '"><input type="checkbox" name="condition2" value="Yes" >&nbsp;&nbsp;<b>Chronic Wounds</b></';
		outputValue += 'td><td class="text" width="50%"><input type="checkbox" name="condition7" value="Yes" >&nbsp';
		outputValue += ';&nbsp;<b>Heart	Failure</b></td></tr><tr><td class="text" width="50%"><input type';
		outputValue += '="checkbox" name="condition3" value="Yes" >&nbsp;&nbsp;<b>End Stage Renal Disease</b></td><t';
		outputValue += 'd class="text" width="50%"><input type="checkbox" name="condition5" value="Yes" >&nbsp;&nbsp;<b';
		outputValue += '>Diabetes</b></td></tr><tr><td class="text" width="50%"><inp';
		outputValue += 'ut type="checkbox" name="condition4" value="Yes" >&nbsp;&nbsp;<b>Depression</b></td><td clas';
		outputValue += 's="text" width="50%"><input type="checkbox" name="condition9" value="Yes" >&nbsp;&nbsp;<b>Pregn';
		outputValue += 'ancy</b></td></tr><tr nowrap><td class="text" width="50%"><input type="checkbox" name="condition8" value=';
		outputValue += '"Yes" >&nbsp;&nbsp;<b>ChronicObstructive Pulmonary Disease</b>		</td>			</tr></table>';
		var out = document.write( outputValue );
		return out;		
	}	
}
*/

function smfhMdo()
{
	if (sGroupCode.toUpperCase() == "MDO")
	{
		var outputValue = "";
		outputValue += '<td height=18><b><a name="n"></a>Whom do I notify if I change my address, or need to add/delete de';
		outputValue += 'pendents? </b><br>Contact the Service Center at (877) 623-1955.</td>';
		var out = document.write( outputValue );
		return out;
	}
	else
	{
	var outputValue = "";
	outputValue += '<td height=18><b><a name="n"></a>Whom do I notify if I change my address,             or need to';
	outputValue += ' add/delete dependents? </b><br>            Contact your Human Resources Department to update yo';
	outputValue += 'ur address or             add/change dependent status. You may also use an enrollment form to ';
	outputValue += '            update this information. Enrollment forms are available to you in             the ';
	outputValue += '<a href="#">Forms</a> section. Simply print the form, fill out             the necessary section';
	outputValue += 's, and submit it to your employer\'s Human Resources             representative.             ';
	outputValue += '<p>Important note: Address, dependent or coverage change requests               must be submitte';
	outputValue += 'd using the appropriate form, and cannot be accepted               through a submitted claim or ';
	outputValue += 'by phone. </p></td>';
	var out = document.write( outputValue );
	return out;
	}	
}

function eleCov()
{
	if (sGroupCode.toUpperCase() == "SMFH")
	{
		alert("Hello2" + sGroupCode);
		this.open('http://www.google.com','_blank');
	}
	else
	{
		this.open('http://www.firsthealth.com','_blank');
	} 
}

function Caremark()
{
	if (sGroupCode.toUpperCase() == "CMB")
	{
		var outputValue = "";
		outputValue += '<tr><td width=8 height="23" vAlign=top><img height=10 alt="" src="/s_mfh/images/bullet.gif" width=8 border=0></td>';
		outputValue += '<td height=18><a href="/s_mfh/pdf/Caremark_FSA_info.pdf">What expenses are eligible for my FSA account?</a></td></tr>';
		var out = document.write( outputValue );
		return out;
	}
	else
	{
	var outputValue = "";
	outputValue += '<br>';
	var out = document.write( outputValue );
	return out;
	}	
}

function SPD(id)
{
	if (sGroupCode.toUpperCase() == "PLC")
	{
	  	var outputValue = "";
		outputValue += '<table border=0 ><tr> <td><b>Summary Plan Descriptions</b>';
		outputValue += '<ul><li><a href="http://www.firsthealth.com/s_pd/pdf/E5152PeopleaseMedicalDental11012006.pdf">';
		outputValue += 'PeopLease Self-funded Employee Medical and Dental Plan</a></li></td></tr></table><p>';
		var out = document.write( outputValue );
		return out;
	}
	else
	{
		if (id == "on")
		{
			var outputValue = "";
			
			outputValue += '<br>';
			
		var out = document.write( outputValue );
		return out;
}
		
		var outputValue = "";

		outputValue += '<br>';

		var out = document.write( outputValue );
		return out;
	}
}