var objTimeOut = window.setInterval("timeOut()", 3600000); function timeOut(){ objTimeOut = window.clearInterval(objTimeOut); logout(); //window.location = "/ca/timeout_" + strVersion + ".htm"; window.location = "/ca/app/bcbslacore/DocumentServer/timeout.htm"; } 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 CLIENT_SIDE = false; var DIRECTORY = ""; if(CLIENT_SIDE) { // DIRECTORY = "/ca"; } // else // { // DIRECTORY = "/ca"; // } // //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 // function getLink( myLink ) // { // if(CLIENT_SIDE) // { // return myLink; // } // else // { // var newLink = "CoverageAdvisor?Action="; // if(myLink=="welcome.htm") // { // newLink += "Welcome"; // } // else if(myLink=="1.htm") // { // newLink += "CreateHealthProfile"; // } // else if(myLink=="1a.htm") // { // newLink += "HealthcareNeeds"; // } // else if(myLink=="1b.htm") // { // newLink += "PrescriptionDrugUse"; // } // else if(myLink=="1c.htm") // { // newLink += "Summary"; // } // else if(myLink=="2.htm") // { // newLink += "EstimateHealthcareUse"; // } // else if(myLink=="3.htm") // { // newLink += "ChoosePlansToCompare"; // } else if(myLink=="3a.htm") // { // newLink += "ModelOutOfPocketCosts"; // } else if(myLink=="3b.htm") // { // newLink += "QuestionsForYourBenefitsManager"; // } // else if(myLink=="4.htm") // { // newLink += "OutOfPocketExpenses"; // } // else if(myLink=="4a.htm") // { // newLink += "DetailedPlanInformation"; // } // else if(myLink=="4b.htm") // { // newLink += "ModelAccountContributions"; // } // else if(myLink=="5.htm") // { // newLink += "HSAFinancialProjectionCalulatorIntro"; // } // else if(myLink=="5a.htm") // { // newLink += "HSAFinancialProjectionCalulator"; // } // else if(myLink=="5b.htm") // { // newLink += "HSAFinancialProjectionCalulatorSavings"; // } // return newLink; // } // } // // ////////////////////////////////////////////////////////////////////////////////// //This function submits a form if it is running on //the server side and simply moves you to that page if you are in the client side function doSubmit(location) { //We only want to submit if there is a server to submit it to :) if(!CLIENT_SIDE) { document.forms.serverInputForm.submit(); } else { document.location=getLink(location); } } //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){ try{ document.getElementById("buttons").style.visibility = "hidden"; }catch(x){} var strOut = ""; strOut += "

"; strOut += "
"; strOut += "
"; for( var i = 0; i < objActionArray.length; i++ ){ if( objActionArray[i][0] == "delete"){ strOut += ""; // this can be: new,edit, and delete } 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 strOut += ""; strOut += ""; strOut += ""; strOut += ""; strOut += ""; //alert("Zip code sent to server: " + objCurrentPerson.strZipCode); strOut += ""; if( Number(objCurrentPerson.numTaxRate) == 0 ){ objCurrentPerson.numTaxRate = 25; } strOut += ""; strOut += ""; 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 += ""; } if(objCurrentPerson.con8=="true"){ strOut += ""; } if(objCurrentPerson.d0=="true"){ strOut += ""; } if(objCurrentPerson.d1=="true"){ strOut += ""; } if(objCurrentPerson.d2=="true"){ strOut += ""; } if(objCurrentPerson.d3=="true"){ strOut += ""; } strOut += "
"; } } document.getElementById("serverForm").innerHTML = strOut; deleteActionArray(); savePeopleInfo(); //strOut = ""; //x = window.open(); //x.document.write( strOut ); doSubmit(location); } 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 ){ document.getElementById("defFloater").innerHTML = ""; document.getElementById("defFloater").style.display = "none" } //Used to close the current window function closeWindow(){ window.close(); } function navOver( strNavID ){ document.getElementById(strNavID).style.backgroundColor = "#CC6633"; document.getElementById(strNavID).style.color = "#FFFFFF"; } function navOut( strNavID ){ document.getElementById(strNavID).style.backgroundColor = "#DEE490"; document.getElementById(strNavID).style.color = "#666600"; } //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' );"); }