   var helpWin = "";
   var editWin = "";
   var submitting = 0;
   var button_source = 1;
   var helpCThref = "javascript:openerHelp('help/1.htm');";
   var helpPThref = "javascript:openerHelp('help/1c.htm');";
   var helpPShref = "javascript:openerHelp('help/annual.htm');";
   var helpJThref = "javascript:openerHelp('help/firsttodie.htm');";
   var type = "joint";
 
 function openerEdit(url,type)  {
   if (type == "tobacco_use" || type == "tobacco_use2")  {
     editWin = window.open('','','dependent=yes,scrollbars=yes,resizable=yes,width=500,height=350,screenX=10,screenY=10,Left=10,Top=10');
 
     if (type == "tobacco_use") openerTobacco(editWin);
     else if (type == "tobacco_use2") openerTobacco2(editWin);
 
   }
   editWin.focus();
 };
 // when new edit page is displayed or a page is unloaded, close edit window (if any open)
 function closeEdit()  {
   if (NS4)  {
     if (editWin.closed == "false")  {
       editWin.close();
     }
   }
   else if (IE4 ||DHTML)  {
     if (editWin)  {
       editWin.close();
     }
   }
   editWin = "";
 };
 
 function openerTobacco(winObj) {
 
    winObj.document.writeln("<html><head>");
    winObj.document.writeln("  <style type=\"text/css\">");
    winObj.document.writeln("table  {  font-family:Arial; font-color:#000000; font-style:normal; font-weight:normal; font-size:9pt; background-color:white; border:1px lightgreen outset; }");
    winObj.document.writeln("select {  font-family:Arial; font-color:#000000; font-style:normal; font-weight:normal; font-size:9pt; }");
    winObj.document.writeln("</style>");
    winObj.document.writeln("<title>Ascertain Tobacco Use</title>");
    winObj.document.writeln("</head>");
    winObj.document.writeln("<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#FFFFFF scroll=auto onload='opener.tobaccoSetup(document.tobacco_use_form);' onunload=''>");
    winObj.document.writeln('<form name="tobacco_use_form" method="POST">');
    winObj.document.writeln('<table border=0 cellspacing=0 cellpadding=0 width=400>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap colspan="2" nowrap><h4>Past or Present Tobacco, nicotine, or related products use?</h4></td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap><span style="text-decoration:underline">Product</span></td> <td align=left valign=center nowrap><span style="text-decoration:underline">Most Recent Use</span></td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Cigarette</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_cigarette" size="1" onchange="opener.document.wq.fp_smoker_cigarette.value=document.tobacco_use_form.fp_smoker_cigarette.options[document.tobacco_use_form.fp_smoker_cigarette.selectedIndex].value;"><option selected value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Cigar</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_cigar" size="1" onchange="opener.document.wq.fp_smoker_cigar.value=document.tobacco_use_form.fp_smoker_cigar.options[document.tobacco_use_form.fp_smoker_cigar.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Cigarello</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_cigarello" size="1" onchange="opener.document.wq.fp_smoker_cigarello.value=document.tobacco_use_form.fp_smoker_cigarello.options[document.tobacco_use_form.fp_smoker_cigarello.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Pipe Tobacco</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_pipe" size="1" onchange="opener.document.wq.fp_smoker_pipe.value=document.tobacco_use_form.fp_smoker_pipe.options[document.tobacco_use_form.fp_smoker_pipe.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Chewing Tobacco</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_chew" size="1" onchange="opener.document.wq.fp_smoker_chew.value=document.tobacco_use_form.fp_smoker_chew.options[document.tobacco_use_form.fp_smoker_chew.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Nicotine Prescriptions</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_prescribe" size="1" onchange="opener.document.wq.fp_smoker_prescribe.value=document.tobacco_use_form.fp_smoker_prescribe.options[document.tobacco_use_form.fp_smoker_prescribe.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Marijuana</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_marijuana" size="1" onchange="opener.document.wq.fp_smoker_marijuana.value=document.tobacco_use_form.fp_smoker_marijuana.options[document.tobacco_use_form.fp_smoker_marijuana.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Smoking Work Environment</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_work" size="1" onchange="opener.document.wq.fp_smoker_work.value=document.tobacco_use_form.fp_smoker_work.options[document.tobacco_use_form.fp_smoker_work.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Smoking Home Environment</td> <td align=left valign=center nowrap>Within the last <select name="fp_smoker_home" size="1" onchange="opener.document.wq.fp_smoker_home.value=document.tobacco_use_form.fp_smoker_home.options[document.tobacco_use_form.fp_smoker_home.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td colspan=3 align=middle valign=center nowrap> <input type=button value="Proceed" onclick="return opener.mc_tu();"> </td> </tr>');
    winObj.document.writeln("</table>");
    winObj.document.writeln("</form>");
    winObj.document.writeln("</body>");
    winObj.document.writeln("</html>");
    winObj.document.close();
 
 }
 // validates any selections, close this page
 function mc_tu()  {
   if (document.wq.fp_smoker_cigarette.value == 0 &&
       document.wq.fp_smoker_cigar.value == 0 &&
       document.wq.fp_smoker_cigarello.value == 0 &&
       document.wq.fp_smoker_pipe.value == 0 &&
       document.wq.fp_smoker_chew.value == 0 &&
       document.wq.fp_smoker_prescribe.value == 0 &&
       document.wq.fp_smoker_marijuana.value == 0 &&
       document.wq.fp_smoker_work.value == 0 &&
       document.wq.fp_smoker_home.value == 0 &&
       document.wq["First Client Tobacco Use"][1].checked)  {
 
     document.wq["First Client Tobacco Use"][0].checked = true;
     alert("The answer to the question with respect to tobacco use has been re-set to 'No'. This means 'Never' since no form of tobacco use has been indicated in the tobacco use pop-up window.\n\n" +
           "If there has been tobacco or related substance use during the lifetime of the prospective life to be insured, click on 'Yes' for the tobacco use question.  Then, in the pop-up window, indicate the use and then click on 'Proceed' in the same window.\n\nThank you.");
   }
   document.wq.target = "_self";
   editWin.close();
   return true;
 
 }
 // loads in current values if any and selects them
 function tobaccoSetup(obj) {
   for (i =0; i < obj.fp_smoker_cigarette.length; i++)  {
     if (obj.fp_smoker_cigarette[i].value == document.wq.fp_smoker_cigarette.value)
       obj.fp_smoker_cigarette[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_cigar.length; i++)  {
     if (obj.fp_smoker_cigar[i].value == document.wq.fp_smoker_cigar.value)
       obj.fp_smoker_cigar[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_cigarello.length; i++)  {
     if (obj.fp_smoker_cigarello[i].value == document.wq.fp_smoker_cigarello.value)
       obj.fp_smoker_cigarello[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_pipe.length; i++)   {
     if (obj.fp_smoker_pipe[i].value == document.wq.fp_smoker_pipe.value)
       obj.fp_smoker_pipe[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_chew.length; i++)   {
     if (obj.fp_smoker_chew[i].value == document.wq.fp_smoker_chew.value)
       obj.fp_smoker_chew[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_prescribe.length; i++)  {
     if (obj.fp_smoker_prescribe[i].value == document.wq.fp_smoker_prescribe.value)
       obj.fp_smoker_prescribe[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_marijuana.length; i++)  {
     if (obj.fp_smoker_marijuana[i].value == document.wq.fp_smoker_marijuana.value)
       obj.fp_smoker_marijuana[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_work.length; i++)   {
     if (obj.fp_smoker_work[i].value == document.wq.fp_smoker_work.value)
       obj.fp_smoker_work[i].selected = true;
   }
   for (i =0; i < obj.fp_smoker_home.length; i++)   {
     if (obj.fp_smoker_home[i].value == document.wq.fp_smoker_home.value)
       obj.fp_smoker_home[i].selected = true;
   }
 }
 
 function clear_tobacco_use()  {
   document.wq.fp_smoker_cigarette.value = 0;
   document.wq.fp_smoker_cigar.value = 0;
   document.wq.fp_smoker_cigarello.value = 0;
   document.wq.fp_smoker_pipe.value = 0;
   document.wq.fp_smoker_chew.value = 0;
   document.wq.fp_smoker_prescribe.value = 0;
   document.wq.fp_smoker_marijuana.value = 0;
   document.wq.fp_smoker_work.value = 0;
   document.wq.fp_smoker_home.value = 0;
   document.wq["First Client Tobacco Use"][0].checked = true;
 }
 
 function openerTobacco2(winObj)    {
 
    winObj.document.writeln("<html><head>");
    winObj.document.writeln("  <style type=\"text/css\">");
    winObj.document.writeln("table  {  font-family:Arial; font-color:#000000; font-style:normal; font-weight:normal; font-size:9pt; background-color:white; border:1px lightgreen outset; }");
    winObj.document.writeln("select {  font-family:Arial; font-color:#000000; font-style:normal; font-weight:normal; font-size:9pt; }");
    winObj.document.writeln("</style>");
    winObj.document.writeln("<title>Ascertain Tobacco Use</title>");
    winObj.document.writeln("</head>");
    winObj.document.writeln("<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#FFFFFF scroll=auto onload='opener.tobaccoSetup2(document.tobacco_use_form);' onunload=''>");
    winObj.document.writeln('<form name="tobacco_use_form" method="POST">');
    winObj.document.writeln('<table border=0 cellspacing=0 cellpadding=0 width=400>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap colspan="2" nowrap><h4>Past or Present Tobacco, nicotine, or related products use?</h4></td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap><span style="text-decoration:underline">Product</span></td> <td align=left valign=center nowrap><span style="text-decoration:underline">Most Recent Use</span></td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Cigarette</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_cigarette" size="1" onchange="opener.document.wq.sp_smoker_cigarette.value=document.tobacco_use_form.sp_smoker_cigarette.options[document.tobacco_use_form.sp_smoker_cigarette.selectedIndex].value;"><option selected value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Cigar</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_cigar" size="1" onchange="opener.document.wq.sp_smoker_cigar.value=document.tobacco_use_form.sp_smoker_cigar.options[document.tobacco_use_form.sp_smoker_cigar.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Cigarello</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_cigarello" size="1" onchange="opener.document.wq.sp_smoker_cigarello.value=document.tobacco_use_form.sp_smoker_cigarello.options[document.tobacco_use_form.sp_smoker_cigarello.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Pipe Tobacco</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_pipe" size="1" onchange="opener.document.wq.sp_smoker_pipe.value=document.tobacco_use_form.sp_smoker_pipe.options[document.tobacco_use_form.sp_smoker_pipe.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Chewing Tobacco</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_chew" size="1" onchange="opener.document.wq.sp_smoker_chew.value=document.tobacco_use_form.sp_smoker_chew.options[document.tobacco_use_form.sp_smoker_chew.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Nicotine Prescriptions</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_prescribe" size="1" onchange="opener.document.wq.sp_smoker_prescribe.value=document.tobacco_use_form.sp_smoker_prescribe.options[document.tobacco_use_form.sp_smoker_prescribe.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Marijuana</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_marijuana" size="1" onchange="opener.document.wq.sp_smoker_marijuana.value=document.tobacco_use_form.sp_smoker_marijuana.options[document.tobacco_use_form.sp_smoker_marijuana.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Smoking Work Environment</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_work" size="1" onchange="opener.document.wq.sp_smoker_work.value=document.tobacco_use_form.sp_smoker_work.options[document.tobacco_use_form.sp_smoker_work.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td width="10%">&nbsp;</td> <td align=left valign=center nowrap>Smoking Home Environment</td> <td align=left valign=center nowrap>Within the last <select name="sp_smoker_home" size="1" onchange="opener.document.wq.sp_smoker_home.value=document.tobacco_use_form.sp_smoker_home.options[document.tobacco_use_form.sp_smoker_home.selectedIndex].value;"><option value="0">Never <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 </select> years</td> </tr>');
    winObj.document.writeln('<tr> <td colspan=3 align=middle valign=center nowrap> <input type=button value="Proceed" onclick="return opener.mc_tu2();"> </td> </tr>');
    winObj.document.writeln("</table>");
    winObj.document.writeln("</form>");
    winObj.document.writeln("</body>");
    winObj.document.writeln("</html>");
    winObj.document.close();
 
 }
 // validates any selections, close this page
 function mc_tu2()  {
   if (document.wq.sp_smoker_cigarette.value == 0 &&
       document.wq.sp_smoker_cigar.value == 0 &&
       document.wq.sp_smoker_cigarello.value == 0 &&
       document.wq.sp_smoker_pipe.value == 0 &&
       document.wq.sp_smoker_chew.value == 0 &&
       document.wq.sp_smoker_prescribe.value == 0 &&
       document.wq.sp_smoker_marijuana.value == 0 &&
       document.wq.sp_smoker_work.value == 0 &&
       document.wq.sp_smoker_home.value == 0 &&
       document.wq["Second Client Tobacco Use"][1].checked) {
 
     document.wq["Second Client Tobacco Use"][0].checked = true;
     alert("The answer to the question with respect to tobacco use has been re-set to 'No'. This means 'Never' since no form of tobacco use has been indicated in the tobacco use pop-up window.\n\n" +
           "If there has been tobacco or related substance use during the lifetime of the prospective life to be insured, click on 'Yes' for the tobacco use question.  Then, in the pop-up window, indicate the use and then click on 'Proceed' in the same window.\n\nThank you.");
   }
   document.wq.target = "_self";
   editWin.close();
   return true;
 
 }
 // loads in current values if any and selects them
 function tobaccoSetup2(obj)    {
   for (i =0; i < obj.sp_smoker_cigarette.length; i++)  {
     if (obj.sp_smoker_cigarette[i].value == document.wq.sp_smoker_cigarette.value)
       obj.sp_smoker_cigarette[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_cigar.length; i++)  {
     if (obj.sp_smoker_cigar[i].value == document.wq.sp_smoker_cigar.value)
       obj.sp_smoker_cigar[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_cigarello.length; i++)  {
     if (obj.sp_smoker_cigarello[i].value == document.wq.sp_smoker_cigarello.value)
       obj.sp_smoker_cigarello[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_pipe.length; i++)   {
     if (obj.sp_smoker_pipe[i].value == document.wq.sp_smoker_pipe.value)
       obj.sp_smoker_pipe[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_chew.length; i++)   {
     if (obj.sp_smoker_chew[i].value == document.wq.sp_smoker_chew.value)
       obj.sp_smoker_chew[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_prescribe.length; i++)  {
     if (obj.sp_smoker_prescribe[i].value == document.wq.sp_smoker_prescribe.value)
       obj.sp_smoker_prescribe[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_marijuana.length; i++)  {
     if (obj.sp_smoker_marijuana[i].value == document.wq.sp_smoker_marijuana.value)
       obj.sp_smoker_marijuana[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_work.length; i++)   {
     if (obj.sp_smoker_work[i].value == document.wq.sp_smoker_work.value)
       obj.sp_smoker_work[i].selected = true;
   }
   for (i =0; i < obj.sp_smoker_home.length; i++)   {
     if (obj.sp_smoker_home[i].value == document.wq.sp_smoker_home.value)
       obj.sp_smoker_home[i].selected = true;
   }
 }
 
 
 function clear_tobacco_use2()  {
     if(document.wq.sp_smoker_cigarette) {
         document.wq.sp_smoker_cigarette.value = 0;
         document.wq.sp_smoker_cigar.value = 0;
         document.wq.sp_smoker_cigarello.value = 0;
         document.wq.sp_smoker_pipe.value = 0;
         document.wq.sp_smoker_chew.value = 0;
         document.wq.sp_smoker_prescribe.value = 0;
         document.wq.sp_smoker_marijuana.value = 0;
         document.wq.sp_smoker_work.value = 0;
         document.wq.sp_smoker_home.value = 0;
         document.wq["Second Client Tobacco Use"][0].checked = true;
     }
 }
 function setup_plan_type(obj)  {
 // if not changing to 'Coverage Type'
   if (obj != 0)  {
     ptArray = eval(obj);
 // remove what is there
     for (selectCount = 0; selectCount < document.wq.First_Client_Plan_Type.options.length;)  {
       if (IE4 || IE_DHTML)
         document.wq.First_Client_Plan_Type.options.remove(selectCount);
       else if (NS4 || NS_DHTML)
         document.wq.First_Client_Plan_Type.options[selectCount] = null;
     }
 // add in what was requested
     if (ptArray)  {
       for (selectCount = 0; selectCount < ptArray.length; selectCount++)    {
         if (IE4 || IE_DHTML)      {
           addFund = document.createElement('OPTION');
           addFund.text = ptArray[selectCount][1];
           addFund.value = ptArray[selectCount][0];
           document.wq.First_Client_Plan_Type.options.add(addFund);
         }
         else if (NS4 || NS_DHTML)      {
           optionLength = document.wq.First_Client_Plan_Type.options.length;
           document.wq.First_Client_Plan_Type.options[optionLength] = new Option( ptArray[selectCount][1], ptArray[selectCount][0], 0, 0);
         }
       }
     }
 // select the proper default plan type
    if ( document.wq["First_Client_Coverage_Type"].options[document.wq["First_Client_Coverage_Type"].selectedIndex].value.search("term100") != -1)
        document.wq.First_Client_Plan_Type.options[0].selected = true;
    else if ( document.wq["First_Client_Coverage_Type"].options[document.wq["First_Client_Coverage_Type"].selectedIndex].value.search("term") != -1)
        document.wq.First_Client_Plan_Type.options[2].selected = true;
    else if ( document.wq["First_Client_Coverage_Type"].options[document.wq["First_Client_Coverage_Type"].selectedIndex].value.search("ci") != -1)
        document.wq.First_Client_Plan_Type.options[5].selected = true;
    else
        document.wq.First_Client_Plan_Type.options[0].selected = true;
 // setup help link
     if (document.wq.First_Client_Coverage_Type.selectedIndex > 0 && document.wq.First_Client_Coverage_Type.selectedIndex < 4)
       helpCThref = "javascript:openerHelp('help/" + document.wq.First_Client_Coverage_Type.selectedIndex + ".htm');";
 
     else if (document.wq.First_Client_Coverage_Type.selectedIndex > 3 && document.wq.First_Client_Coverage_Type.selectedIndex < 7)
       helpCThref = "javascript:openerHelp('help/" + document.wq["First_Client_Coverage_Type"].options[document.wq["First_Client_Coverage_Type"].selectedIndex].value + ".htm');";
 
     else if (document.wq.First_Client_Coverage_Type.selectedIndex == 0)
       helpCThref = "javascript:openerHelp('help/ct.htm');";
 
 // put first plan type value client into term
 /*
     document.wq["First Client Term"].value = ptArray[0][0];
     helpPThref = "javascript:openerHelp('help/" +  ptArray[0][0] + ".htm')";
 */
 // setup plan type & help file value
    make_a_change_pt();
   }
   else  {
     helpCThref = "javascript:openerHelp('help/ct.htm');";
   }
   return true;
 }
 function check_needs_value()  {
 //alert("document.wq.ca_analysis.value.length"+document.wq.ca_analysis.value.length);
 //  if (document.wq.ca_analysis.value > 0)  {
   if (document.wq.ca_analysis.value.length > 0)  {
 //selection text
     var tmpCovAmountText= document.wq.ca_analysis.value;
 //selection value
     var tmpCovAmountValue= document.wq.ca_analysis.value.replace(/\$/, "");
     if (IE4 || IE_DHTML)  {
       addCovAmount = document.createElement('OPTION');
       addCovAmount.text = tmpCovAmountText;
       addCovAmount.value = tmpCovAmountValue;
       document.wq["First Client Premium"].options.add(addCovAmount);
       document.wq["First Client Premium"].options[document.wq["First Client Premium"].length-1].selected = true;
       return true;
     }
     else if (NS4)  {
       optionLength = document.wq["First Client Premium"].options.length;
       document.wq["First Client Premium"].options[optionLength] = new Option(tmpCovAmountText, tmpCovAmountValue, true, true);
       document.wq["First Client Premium"].options[document.wq["First Client Premium"].length-1].selected = true;
       return true;
     }
     else if (NS_DHTML)  {
       optionLength = document.wq["First Client Premium"].options.length;
       document.wq["First Client Premium"].options[optionLength] = new Option(tmpCovAmountText, tmpCovAmountValue, true, true);
       document.wq["First Client Premium"].options[document.wq["First Client Premium"].length-1].selected = true;
       return true;
     }
   }
 }
 
 function make_a_change_pt()  {
   document.wq["First Client Term"].value = document.wq.First_Client_Plan_Type.options[document.wq.First_Client_Plan_Type.selectedIndex].value;
   helpPThref = "javascript:openerHelp('help/" + document.wq.First_Client_Plan_Type.options[document.wq.First_Client_Plan_Type.selectedIndex].value + ".htm')";
   document.wq["First Client Sufficiency Filter"].value = "";
 }
 function make_a_change_ps()  {
   var helpFile = "";
   if (document.wq["Payment Schedule"].options[document.wq["Payment Schedule"].selectedIndex].value == "A")
     helpFile = "annual";
   else if (document.wq["Payment Schedule"].options[document.wq["Payment Schedule"].selectedIndex].value == "S")
     helpFile = "semiannual";
   else if (document.wq["Payment Schedule"].options[document.wq["Payment Schedule"].selectedIndex].value == "Q")
     helpFile = "quarterly";
   else if (document.wq["Payment Schedule"].options[document.wq["Payment Schedule"].selectedIndex].value == "M")
     helpFile = "monthly";
 
   helpPShref = "javascript:openerHelp('help/" + helpFile + ".htm')";
 }
 function make_a_change_jt()  {
   var helpFile = "";
   if (document.wq["Joint Type"].options[document.wq["Joint Type"].selectedIndex].value == "A")
     helpFile = "firsttodie";
   else if (document.wq["Joint Type"].options[document.wq["Joint Type"].selectedIndex].value == "B")
     helpFile = "lasttodie1";
   else if (document.wq["Joint Type"].options[document.wq["Joint Type"].selectedIndex].value == "C")
     helpFile = "lasttodie2";
   else
     helpFile = "firsttodie";
   helpJThref = "javascript:openerHelp('help/" + helpFile + ".htm')";
 }
 function val_ca_ct_ps()  {
 //check for a selected coverage amount - 1st client
   if (document.wq["First Client Premium"].options[document.wq["First Client Premium"].selectedIndex].value == 0)  {
     alert("You must select a 'Coverage Amount' to proceed.");
     document.wq["First Client Premium"].focus();
     return false;
   }
 //check coverage term
   if (document.wq.First_Client_Plan_Type.options[document.wq.First_Client_Plan_Type.selectedIndex].value == 0)  {
     alert("You must select a 'Plan Type' to proceed.");
     document.wq.First_Client_Coverage_Type.focus();
     return false;
   }
 // check payment schedule
   if (document.wq["Payment Schedule"].options[document.wq["Payment Schedule"].selectedIndex].value == 0)  {
     alert("You must select a 'Payment Schedule' to proceed.");
     document.wq["Payment Schedule"].focus();
     return false;
   }
 //check joint type
   if (document.wq["Joint Type"] && document.wq["Joint Type"].options[document.wq["Joint Type"].selectedIndex].value == 0)  {
     alert("You must select a 'Type of Joint-Life Coverage to Research' to proceed.");
     document.wq["Joint Type"].focus();
     return false;
   }
 // check if tobacco use was 'Y' but all products == 0
   if (document.wq["First Client Tobacco Use"][1].checked)  {
     if (document.wq.fp_smoker_cigarette.value == 0 &&
         document.wq.fp_smoker_cigar.value == 0 &&
         document.wq.fp_smoker_cigarello.value == 0 &&
         document.wq.fp_smoker_pipe.value == 0 &&
         document.wq.fp_smoker_chew.value == 0 &&
         document.wq.fp_smoker_prescribe.value == 0 &&
         document.wq.fp_smoker_marijuana.value == 0 &&
         document.wq.fp_smoker_work.value == 0 &&
         document.wq.fp_smoker_home.value == 0)  {
 //      alert("You have answered Yes to using Tobacco Products. But you have not selected any products.\n\nPlease select the 'Yes' option again and enter some Tobacco Product Use or select 'No' to Tobacco Use.");
       if ( confirm("You have answered Yes to using Tobacco Products. But you have not selected any products.\n\nPlease press 'Ok' to process this survey without Tobacco Use.\n Press Cancel to return and choose some Tobacco Products.") )  {
         clear_tobacco_use();
         return true;
       }
       document.wq["First Client Tobacco Use"][1].focus();
       openerEdit('ssi/tobacco_use.htm','tobacco_use');
       return false;
     }
   }    else
    clear_tobacco_use();
   if (document.wq["Second Client Tobacco Use"] && document.wq["Second Client Tobacco Use"][1].checked)  {
     if (document.wq.sp_smoker_cigarette.value == 0 &&
         document.wq.sp_smoker_cigar.value == 0 &&
         document.wq.sp_smoker_cigarello.value == 0 &&
         document.wq.sp_smoker_pipe.value == 0 &&
         document.wq.sp_smoker_chew.value == 0 &&
         document.wq.sp_smoker_prescribe.value == 0 &&
         document.wq.sp_smoker_marijuana.value == 0 &&
         document.wq.sp_smoker_work.value == 0 &&
         document.wq.sp_smoker_home.value == 0)  {
 //      alert("You have answered Yes to using Tobacco Products. But you have not selected any products.\n\nPlease select the 'Yes' option again and enter some Tobacco Product Use or select 'No' to Tobacco Use.");
       if ( confirm("You have answered Yes to using Tobacco Products. But you have not selected any products.\n\nPlease press 'Ok' to process this survey without Tobacco Use.\n Press Cancel to return and choose some Tobacco Products.") )  {
         clear_tobacco_use2();
         return true;
       }
       document.wq["Second Client Tobacco Use"][1].focus();
       openerEdit('ssi/tobacco_use2.htm','tobacco_use2');
       return false;
     }
   }    else
    clear_tobacco_use2();
 
   return true;
 }
 
 function ready_submit(obj)  {
   submitting = 1;
   ret = fc_val_date(document.wq);
   if (ret)  {
     ret = sc_val_date(document.wq)
   }
   return ret;
 }

