var toolTipText = new Array(); toolTipText[0] = ""; toolTipText[1] = "What is high blood pressure?"; toolTipText[2] = "What health problems are associated with high blood pressure?"; toolTipText[3] = "What causes high blood pressure?"; toolTipText[4] = "What is my target blood pressure goal?"; toolTipText[5] = "Why is this number my target goal?"; toolTipText[6] = "What lifestyle changes do you recommend I make?"; toolTipText[7] = "Are my current blood pressure readings meeting my goal?"; toolTipText[8] = "What can I do to improve my high blood pressure control?"; toolTipText[9] = "What are my treatment options?"; toolTipText[10] = "Why do different people require different treatments plans?"; toolTipText[11] = "Do different high blood pressure medications work differently?"; toolTipText[12] = "What are the side effects of high blood pressure medications?"; toolTipText[13] = "If I\'m taking medication for high blood pressure and still not at goal, will you increase my dose, switch me to another medication, or add on another medication?"; toolTipText[14] = "(If you are self-monitoring your blood pressure.) When is a good time to take my blood pressure reading?"; toolTipText[15] = "What is MICARDIS 80 mg and could it help me?"; toolTipText[16] = "Am I at risk for heart disease, stroke, and kidney disease?"; toolTipText[17] = "Should I get checked for any of the complications of high blood pressure?"; toolTipText[18] = "What is my systolic blood pressure?"; toolTipText[19] = "What is my diastolic blood pressure?"; toolTipText[20] = "What is my blood pressure goal?"; toolTipText[21] = "What is hypertension?"; toolTipText[22] = "What factors do you think may contribute to my high blood pressure?"; toolTipText[23] = "I need help quitting smoking. What do you recommend?"; toolTipText[24] = "How do I know if I'm drinking too much?"; toolTipText[25] = "Am I overweight?"; toolTipText[26] = "How much exercise do I need?"; toolTipText[27] = "Is the amount of stress in my life normal? Or, do I need to do something about it?"; toolTipText[28] = "What health problems are associated with high blood pressure?"; toolTipText[29] = "I need help quitting smoking, or cutting back. What do you recommend?"; toolTipText[30] = "How can I reduce the amount of sodium in my diet?"; toolTipText[31] = "What is the DASH diet?"; toolTipText[32] = "Which kinds of high blood pressure medication have I tried?"; toolTipText[33] = "Which kinds of high blood pressure medication do you think may be appropriate for me?"; toolTipText[34] = "What is the benefit of being on more than one high blood pressure medication?"; toolTipText[34] = "What is MICARDIS 80 mg?"; toolTipText[35] = "Could MICARDIS 80 mg help me?"; toolTipText[36] = "How does MICARDIS 80 mg work?"; toolTipText[37] = "Does MICARDIS 80 mg work in a way that could be right for me?"; toolTipText[38] = "Am I at high risk for cardiovascular events like heart attack and stroke?"; toolTipText[39] = "Could MICARDIS 80 mg help to reduce my cardiovascular risk?"; toolTipText[40] = "How do health conditions such as high blood pressure, high cholesterol, and diabetes affect my cardiovascular risk?"; toolTipText[41] = "How long will I need to take medication for high blood pressure?"; toolTipText[42] = "Am I taking any prescription drugs that impact the way my high blood pressure medication works?"; toolTipText[43] = "Which over-the-counter drugs impact the way my high blood pressure medication works?"; toolTipText[51] = "If I have had a procedure like cardiac bypass surgery or angioplasty, how does that affect my risk?"; toolTipText[52] = "I did not watch my diet or exercise when I was younger. Does that put me at high risk?"; toolTipText[53] = "What lifestyle changes should I make to reduce my risk?"; toolTipText[54] = "I\'m already taking other medicines, can MICARDIS 80 mg do more to lower my risk?"; toolTipText[55] = "If I had a heart attack, stroke, or mini stroke, am I at high risk?"; toolTipText[56] = "What is MICARDIS 80 mg and how can it help me?"; toolTipText[57] = "With all the meds I\'m taking, will MICARDIS 80 mg cause a drug interaction?"; toolTipText[58] = "What side effects does MICARDIS 80 mg cause?"; toolTipText[59] = "I\'m living with stable angina, so is MICARDIS 80 mg a medicine I should take?"; toolTipText[60] = "I\'ve already had a heart attack. Can MICARDIS 80 mg reduce my risk of another?"; toolTipText[61] = "With the history of stroke in my family, should I begin taking MICARDIS 80 mg?"; var alreadyText = "This question is already in your Question Keeper."; var addText = "Click here to add this question to your Question Keeper."; $(document).ready(function() { /*$("a.doublelink").mouseover( function(e) { var currTip = $(this).attr("name"); $(this).append("
"); buildTooltip(currTip, e); }); $("a.doublelink").mousemove( function(e) { positionTooltip(e); }); $("a.doublelink").mouseout( function(e) { $(this).children("div#tooltip").remove(); $("#tooltip").hide(); });*/ $("a.doublelink").click( function(e) { var currTip = $(this).attr("name"); if (questionExists(currTip) == false) { addQuestion(currTip); markToolTipSeen(); } else { if ( questionIsSelected(currTip) == false) { selectQuestion(currTip); markToolTipSeen(); } } }); function buildTooltip(tipID, e) { // load the tooltip text $("li#tool1question").text(toolTipText[tipID]); // set the add this or already added text. if (questionExists(tipID) == true) { if (questionIsSelected(tipID) == true) { $("div#toolalready").text(alreadyText); } else { $("div#toolalready").text(addText); } } else { $("div#toolalready").text(addText); } // position the tooltip positionTooltip(e); // show the tooltip $("#tooltip").show(); } function positionTooltip(e) { // position the tooltip var yOffset = $("#tooltip").height() + 15; var xOffset = 20; $("#tooltip").css("top", e.pageY - yOffset); $("#tooltip").css("left", e.pageX - xOffset); $("#tooltip").css("z-index", 500); } // when the user clicks on a link to add an item to the list, the tooltip message should change to already added. function markToolTipSeen() { $("div#toolalready").text(alreadyText); } function addQuestion(questionID) { // add cookie document.cookie = "qCookie" + questionID + "=" + toolTipText[questionID]; document.cookie = "qSelected" + questionID + "=yes"; // add to div as selected var divEnd = ""; var containerStart = "
"; var questionText = "

" + toolTipText[questionID] + "

" + divEnd; var buttonText = "
" + divEnd; var clearDiv = "
"; var totalText = containerStart + questionText + buttonText + clearDiv + divEnd; // add new div $("div#questionsMainQuestions").append(totalText); // then add the click event to turn it on and off. $("div#questionsMainQuestions div[rel=qCookie" + questionID + "]").live('click', function(e) { var tempVariable = $("div[rel=" + "qCookie" + questionID + "]"); var currNumber = $(tempVariable).attr("rel").substr(7); if (!$(tempVariable).children(".questionLineText").hasClass("isSelected")) { $(tempVariable).children(".questionLineText").css("font-weight", "bold"); $(tempVariable).children(".questionLineText").addClass("isSelected"); $(tempVariable).children(".questionLineButton").children("img").attr("src", "images/questions/questionline_button_on.gif"); writeClickCookie(currNumber); } else { $(tempVariable).children(".questionLineText").css("font-weight", "normal"); $(tempVariable).children(".questionLineText").removeClass("isSelected"); $(tempVariable).children(".questionLineButton").children("img").attr("src", "images/questions/questionline_button.png"); deleteClickCookie(currNumber); } }); // write to the sidebar as well. $("div#questions_body").show(); // explictly show the div just in case. $(".overview").append("

" + toolTipText[questionID] + "

"); // update the scrollbar var oScrollbar = $('#scrollbar1'); oScrollbar.tinyscrollbar(); oScrollbar.update(); var alt = -1; $("#questionsMainQuestions > div").each( function(e) { alt = alt * -1; if (alt < 0) { $(this).removeClass("questionLineContainer").addClass("questionLineContainerAlt"); } }); } // here we just mark the question as selected. function selectQuestion(questionID) { document.cookie = "qSelected" + questionID + "=yes"; $("div[rel=qCookie" + questionID + "]").children(".questionLineText").css("font-weight", "bold"); $("div[rel=qCookie" + questionID + "]").children(".questionLineText").addClass("isSelected"); $("div[rel=qCookie" + questionID + "]").children(".questionLineButton").children("img").attr("src", "images/questions/questionline_button_on.gif"); // write to the sidebar as well. $("div#questions_body").show(); // explictly show the div just in case. $(".overview").append("

" + toolTipText[questionID] + "

"); // update the scrollbar var oScrollbar = $('#scrollbar1'); oScrollbar.tinyscrollbar(); oScrollbar.update(); } }); /* ******* Cookie Value Search Functions *********** */ function questionExists( questionID ) { var isExists = false; var currentQuestion = "qCookie" + questionID + "="; if (document.cookie.indexOf(currentQuestion) >= 0) { isExists = true; return isExists; } return isExists; } function questionIsSelected( questionID) { var isSelected = false; var currentSelection = "qSelected" + questionID + "="; if (document.cookie.indexOf(currentSelection) >= 0) { isSelected = true; return isSelected; } return isSelected; }