var objTimeOut = window.setInterval("timeOut()", 3600000); function timeOut(){ objTimeOut = window.clearInterval(objTimeOut); logout(); //window.location = "/cav4/timeout_" + strVersion + ".htm"; window.location = "/cav4/app/hcboexp/DocumentServer/timeout.htm?TemplocaleId=en"; } function myClearInterval(){ //alert( objTimeOut ); objTimeOut = window.clearInterval(objTimeOut); //alert( objTimeOut ); } var myCurrentPage = "Undefined"; var strVersion="core"; //////////////////This is for easy transfer from client to server///////////////// var DIRECTORY = "/cav4"; //This is used for each link on the page because the page naming scheme was diff on server templates and on the // client htm pages // NO LONGER RELEVENT, BUT VERY DEEPLY ENTRENCHED... function getLink( myLink ) // { // var newLink = "CoverageAdvisor?Action="; // if(myLink=="welcome.htm") // { // newLink += "Welcome"; // } // else if(myLink=="1.htm") // { // newLink += "CreateHealthProfile"; // } // else if(myLink=="1a.htm") // { // newLink += "HealthcareNeeds"; // } // /*Modified by VL on 7th June for Prescription Drugs */ else if(myLink=="1b.htm") // { // newLink += "PrescriptionDrugs"; // } // // /*Modified by VL on 10th June for new pages */ else if(myLink=="2.htm") // { // newLink += "PrescriptionDrugUse"; // } else if(myLink=="2a.htm") // { // newLink += "PlannedMedicalCare"; // } else if(myLink=="2b.htm") // { // newLink += "EstimatedMedicalCare"; // } // else if(myLink=="3.htm") // { // newLink += "YourPlan"; // } else if(myLink=="3a.htm") // { // newLink += "YourPlanCore"; // } else if(myLink=="3b.htm") // { // newLink += "QuestionsForYourBenefitsManager"; // } // else if(myLink=="4.htm") // { // newLink += "DetailedPlanInformation"; // } // /*Added by VL on 5th June 2006 for new pages*/ else if(myLink=="4a.htm") // { // newLink += "SpendingAccounts"; // } else if(myLink=="4b.htm") // { // newLink += "HealthSavingsAccount"; // } /*End of VL code*/ else if(myLink=="4c.htm") // { // newLink += "ModelAccountContributions"; // } else if(myLink=="5a.htm") // { // newLink += "HSAFinancialProjectionCalulatorSavings"; // } // else if(myLink=="5b.htm") // { // newLink += "HSAFinancialProjectionCalulator"; // } else { newLink += myLink; } // return newLink; // } // ////////////////////////////////////////////////////////////////////////////////// //This function submits a form function doSubmit(location) { document.forms.serverInputForm.submit(); } //creates the hidden input field for the tax value //this is used on the estimate heathcare use page function createServerTaxInput() { var strOut = ""; strOut += "
"; if ( document.getElementById( "taxForm" ) ) document.getElementById("taxForm").innerHTML = strOut; } // a special-purpose helper to translate special relationships to standard cases // for the backend; cannot simply repeat the standard cases, since it confuses // the reselection code (the first of the identical series is always selected). function translateRelationship(strDetailedRelationship) { if (strDetailedRelationship == "Partner") { return "Spouse"; } return strDetailedRelationship; } //this creates the hidden input fields on the summary page of all of the updated profiles function createServerInput(location, processAction){ try{ document.getElementById("buttons").style.visibility = "hidden"; }catch(x){} var strOut = ""; strOut += "

"; strOut += "\n"; if (processAction) { strOut += "\n"; } var profileIdList = new Array(); for( var i = 0; i < objActionArray.length; i++ ){ // objActionArray[i][0] can be: new, edit, and delete if( objActionArray[i][0] == "delete"){ var numProfileId = objActionArray[i][1] //strOut += ""; strOut += ""; strOut += ""; profileIdList.push(numProfileId); } if( objActionArray[i][0] != "delete"){ var objCurrentPerson; var numFromPersonArray = 0; for( var j = 0; j < objPersonArray.length; j++ ){ document.getElementById("serverForm").innerHTML += objPersonArray[j].strUniqueDate + "-"+ objActionArray[i][2] + "\n"; if( objPersonArray[j].strUniqueDate == objActionArray[i][2] ){ objCurrentPerson = objPersonArray[j]; numFromPersonArray = objActionArray[i][1]; } } strOut += ""; strOut += ""; // this can be: new,edit, and delete profileIdList.push(numFromPersonArray); strOut += ""; strOut += ""; strOut += ""; strOut += ""; strOut += ""; //alert("Zip code sent to server: " + objCurrentPerson.strZipCode); strOut += ""; strOut += ""; // tax rate is only valid / useful for the Employee (first profile) if (i == 0) { if( objCurrentPerson.numTaxRate == "" ){ objCurrentPerson.numTaxRate = 25; } strOut += ""; } strOut += ""; // Added by VL on 19 May for creating a hidden field for preventive medical care strOut += ""; //End /* property condition utilziationReasonId con0 Asthma 10 con1 Cancer 11 con2 Diabetes 12 con3 Heart Disease 13 con4 Hypertension 14 con5 Mental Health 15 con6 Pregnancy 16 con7 Sinusitis 17 */ // Added by VL on 20th July if(objCurrentPerson.con0=="true"){ strOut += ""; } if(objCurrentPerson.con1=="true"){ strOut += ""; } if(objCurrentPerson.con2=="true"){ strOut += ""; } if(objCurrentPerson.con3=="true"){ strOut += ""; } if(objCurrentPerson.con4=="true"){ strOut += ""; } if(objCurrentPerson.con5=="true"){ strOut += ""; } if(objCurrentPerson.con6=="true"){ strOut += ""; } if(objCurrentPerson.con7=="true"){ strOut += ""; } strOut += "\n"; //End of VL Code // handle planned prescriptions... list of munged elements, // each is prescriptionId_purchaseType_fillMethod var currentDrugList = objCurrentPerson.arrDrugInfo; for(var j=0; j < currentDrugList.length; j++) { strOut += "\n"; } } } strOut += ""; strOut += "
"; document.getElementById("serverForm").innerHTML = strOut; deleteActionArray(); savePeopleInfo(); //strOut = ""; //x = window.open(); //x.document.write( strOut ); doSubmit(); } document.onmousemove = captureMousePosition; var mouseX = 0; var mouseY = 0; //This function is used the get the X and Y pos of the mouse pointer function captureMousePosition(e){ if(!e){ e = window.event; } if (typeof e.pageY == 'number'){ mouseY = e.pageY; mouseX = e.pageX; }else{ mouseY = e.clientY; mouseX = e.clientX; } objTimeOut = window.clearInterval(objTimeOut); objTimeOut = window.setInterval("timeOut()", 3600000); } // This function pops up a little def box next to certain names on the webpage that may need further definition function showDef( strDef ){ showDefPositioned( strDef, mouseX + 5, mouseY + 5 ); } // used for the core version's rollover helper comments on the model costs page... function showDefAboveElement(strDef) { showDefPositioned(strDef, 25, mouseY - 45 ); } // More general purpose version of the .css popup; used to allow more exact // positioning on the core version's rollover. function showDefPositioned( strDef, atX, atY ) { if (!document.getElementById("defFloater")) { return; } document.getElementById("defFloater").innerHTML = strDef; document.getElementById("defFloater").style.display = "block" var offset = 0; var x,y; if (self.pageYOffset){ //offset = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop){ offset = document.documentElement.scrollTop; } else if (document.body){ offset = document.body.scrollTop; } document.getElementById("defFloater").style.top = atY + offset; document.getElementById("defFloater").style.left = atX ; } //Hides the deff popups (look at showDef(...)) function hideDef( strDef ){ if (document.getElementById("defFloater")) { document.getElementById("defFloater").innerHTML = ""; document.getElementById("defFloater").style.display = "none" } } //Used to close the current window function closeWindow(){ window.open('','_parent',''); window.close(); } function navOver( strNavID ){ document.getElementById(strNavID).style.backgroundColor = '#000099'; document.getElementById(strNavID).style.color = '#FFFFFF'; } function navOut( strNavID ){ document.getElementById(strNavID).style.backgroundColor = '#0099FF'; document.getElementById(strNavID).style.color = '#FFFFFF'; } //This function populates the conditions of each profile on the Summary page function populateConditionList(){ var strOut = ""; for( var i = 0; i < objPersonArray.length; i++ ){ var ct = 0; if(objPersonArray[i].con0 == "true"){ct++;} if(objPersonArray[i].con1 == "true"){ct++;} if(objPersonArray[i].con2 == "true"){ct++;} if(objPersonArray[i].con3 == "true"){ct++;} if(objPersonArray[i].con4 == "true"){ct++;} if(objPersonArray[i].con5 == "true"){ct++;} if(objPersonArray[i].con6 == "true"){ct++;} if(objPersonArray[i].con7 == "true"){ct++;} if( ct > 0 ){ strOut += "Confirm Health Status: " + objPersonArray[i].strName + "

You have indicated that " + objPersonArray[i].strName + " has and is regularly treated for the following conditions or is taking the following prescription drugs:

"; if(objPersonArray[i].con0 == "true"){strOut += "Asthma
"} if(objPersonArray[i].con1 == "true"){strOut += "Cancer
";} if(objPersonArray[i].con2 == "true"){strOut += "Diabetes
";} if(objPersonArray[i].con3 == "true"){strOut += "Heart Disease
";} if(objPersonArray[i].con4 == "true"){strOut += "High Blood Pressure
";} if(objPersonArray[i].con5 == "true"){strOut += "Mental Health Conditions
";} if(objPersonArray[i].con6 == "true"){strOut += "Pregnancy/Expecting to deliver
a child in the next year
";} if(objPersonArray[i].con7 == "true"){strOut += "Sinusitis/Rhinitis
";} document.getElementById("conditionList").innerHTML = strOut; return; } } } // used to pop up explanation windows function popUp (URL) { day = new Date(); id = day.getTime(); eval ("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=400,left=100,top=100' );"); } //Pop-up to show HSA Calculator function hsaPopUp (URL) { day = new Date(); id = day.getTime(); eval ("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=820,height=800,left=100,top=100' );"); }