


function XXX(val) 
{
   var sURL = document.location;
   var thisDomain = location.protocol+"//"+location.host;
   if( val != thisDomain){
      thisDomain = val;
   }
   var query1 = this.location+"";
   if (query1.indexOf("?") > 0) query1 = query1.replace("?","&");
   var logomesg = thisDomain+"/quotesmith/redir"+"?url="+query1;
	document.write('<IMG src="'+logomesg+'">');
}


function popupSurvey(fromPage, toPage, refid, windowprops, popNow){
   if(windowprops==null){
      windowprops = "width=515,height=260,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes";
   }

   var winleft = (screen.width / 2) - (515 / 2);
   var wintop = (screen.height / 2) - (260 / 2);
   windowprops=windowprops+",top="+wintop+",left="+winleft;

   if (document.all) {
      var top=self.screenTop;
      if (top>9000 || popNow) {
         window.open(toPage+"?FROM_PAGE="+fromPage+"&REF_ID="+refid, "popSale", windowprops);
      }
   }
   else {
      var top = window.outerWidth;
      if (top==0 || popNow) {
         window.open(toPage+"?FROM_PAGE="+fromPage+"&REF_ID="+refid, "popSale", windowprops);
      }
   }
}

function bodyUnload(){
   var currentURL = document.location;
   var devIP = /10.1.1.200/;
   var testIP = /pc071099/;
   var darienURL = /darien/;
   var insureURL = /insure.com/;
   var quotesmithURL = /quotesmith.com/;

   var localPC=/pc.*|demo.*/;

   if(localPC.test(currentURL) || devIP.test(currentURL) || testIP.test(currentURL) || darienURL.test(currentURL) || insureURL.test(currentURL)){
//         popupSurvey('TERM-qstermindex', '/quotesmith/Surveys','12345');
   }
}





var baseURL = 'https://www.insure.com';

var linkURL = 'http://www.insure.com';


var tabsName=new Array();
var tabs=new Array();
var myTarget='';
// force ref code
/*var query = location.search.substring(1);
var testRef=/REF=/;
if (query.length > 0) query="&"+query;
var ref = "";
if (!testRef.test(query)) ref="&REF=99998";
if (testRef.test(query)) ref=query;
*/
var searchString=location.search;
var refIndex=searchString.indexOf("REF=");
var ref="19000";
if(refIndex>0){
   var ref=searchString.substring(refIndex+4, refIndex+9);
}  

function getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber){

  getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, null, null, null, null,null,null,null)

}

function getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, target, hideTabs, hideRightSpace, shiftTabBy){

  getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, target, hideTabs, hideRightSpace, shiftTabBy,null,null,null)

}


function getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, target, hideTabs, hideRightSpace, shiftTabBy,tabArray,ibaseURL,ilinkURL){
   var currentURL = document.location;
   var devIP = /10.1.1.200/;
   var testIP = /pc071099/;
   var darienURL = /darien/;
   var localPC=/pc.*|demo.*|localhost.*/;
   var secureprotocol = "https://";
   var protocol = "http://";
   

   if(shiftTabBy==null){
      shiftTabBy=67;
   }



   var baseURL = 'www.insure.com';

   var linkURL = 'www.insure.com';

   
   
//   baseURL = 'localhost:8080';
//   linkURL = 'localhost:8080';

   // allow overide of baseURL
   if(ibaseURL!=null){
      baseURL=ibaseURL;
   }

   // allow overide of linkURL
   if(ilinkURL!=null){
      linkURL=ilinkURL;
   }
   
   var secureBase = location.href;
   if(secureBase.indexOf('https:') < 0){
      baseURL = protocol+baseURL;
   }
    else
   {
      baseURL = secureprotocol+baseURL;
   }
   linkURL = protocol+linkURL; // protocol should be passed as well
 
   if (devIP.test(currentURL)){
      linkURL = 'http://10.1.1.200';
      baseURL=linkURL;
   }
   else if (testIP.test(currentURL)){
      linkURL = 'http://pc071099';
      baseURL=linkURL;
   }
   else if (darienURL.test(currentURL)){
      linkURL = 'http://darien.quotesmith.com:8090';
      baseURL=linkURL;
   }
//   else if (localPC.test(currentURL)){
//      linkURL = '';
//      baseURL=linkURL;
//   }

   var myTarget='';
   if(target!=null){
      myTarget=' target="'+target+'"';
   }


   tabsName=new Array();
   tabsName["homepage"]=2;
   tabsName["auto"]=3;
   tabsName["life"]=4;

   tabsName["home"]=6;

   tabsName["business"]=7;
   //tabsName["travel"]=8;
   tabsName["health"]=5;


  tabsName["dental"]=8;
 

   tabsName["sellyourpolicy"]=9;

   tabsName["sitemap"]=13;

   var selectedTab=tabsName[selectedTabName];

   
   tabs=new Array(
      new Array('<a href="'+linkURL+'/"'+myTarget+'><img border="0" src="'+baseURL+'/images/common/insureLogo.gif" alt="Insure.com"></a>'),
    //  new Array('<a href="'+linkURL+'/"'+myTarget+'><img border="0" src="'+baseURL+'/images/common/insure_winter_bottom.gif" alt="Insure.com"></a>'),

      new Array('<a href="'+linkURL+'/"'+myTarget+'><img src="'+baseURL+'/images/common/homepage_', '.gif" border="0" alt="Home page"></a>'),

	  new Array('<a href="'+linkURL+'/redirect.jsp?qs_pageID=62&REF=48237&qs_type=auto"'+myTarget+'><img src="'+baseURL+'/images/common/auto_', '.gif" border="0" alt="Auto"></a>'),

      new Array('<a href="'+linkURL+'/articles/lifeinsurance/?REF='+ref+'"'+myTarget+'><img src="'+baseURL+'/images/common/life_', '.gif" border="0" alt="Life"></a>'),
	        new Array('<a href="'+linkURL+'/healthinsurance_redir.html"'+myTarget+'><img src="'+baseURL+'/images/common/health_', '.gif" border="0" alt="Health"></a>'),
      new Array('<a href="'+linkURL+'/horedir.html"'+myTarget+'><img src="'+baseURL+'/images/common/home_', '.gif" border="0" alt="Home"></a>'),
      new Array('<a href="'+linkURL+'/Business_redir.html"'+myTarget+'><img src="'+baseURL+'/images/common/business_', '.gif" border="0" alt="Business"></a>'),
 //    new Array('<a href="'+linkURL+'/redirect.jsp?REF=46783&qs_pageID=9&qs_type=travel"'+myTarget+'><img src="'+baseURL+'/images/common/travel_', '.gif" border="0" alt="Travel"></a>'),
//	new Array('<a href="'+linkURL+'/redirect.jsp?qs_pageID=2&REF=46783&qs_type=travel"'+myTarget+'><img src="'+baseURL+'/images/common/travel_', '.gif" border="0" alt="Travel"></a>'),


//      new Array('<a href="'+linkURL+'/rentersredir.html"'+myTarget+'><img src="'+baseURL+'/images/common/renter_', '.gif" border="0" alt="Renter\'s"></a>'),
      new Array('<a href="'+linkURL+'/dentalplans_redir.html"'+myTarget+'><img src="'+baseURL+'/images/common/dental_', '.gif" border="0" alt="Dental"></a>')

 // flip the next 2 lines for the Winter Scene 

 //     new Array('<img border="0" src="'+baseURL+'/images/common/point_click.gif" alt="Insure.com">', null),


//    new Array('<a href="'+linkURL+'/cgi/indmed/qsindmedindex"'+myTarget+'><img src="'+baseURL+'/images/common/health_', '.gif" border="0" alt="Health"></a>'),
   );

   // allow overide of tabs
   if(tabArray!=null){
      tabs=tabArray;
   }
  document.write('<center>');       

/* NEW WAY FOR WINTER SCENE */




/*
//----------------------------------------------------------
// SAVE FOR CHRISTMAS / WINTER SCENE
//----------------------------------------------------------
*/
/*
   document.write('<table border="0" cellpadding="0" cellspacing="0" width="760">');
   document.write('<tr>');
   document.write('<td width="760">');


       document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%" valign="bottom">');
       document.write('<tr>');

       document.write('<td>');

  // XXX(baseURL);

          document.write('<table border="0" cellpadding="0" cellspacing="0" width="760" valign="bottom">');

               document.write('<tr>');
                  document.write('<td width="760" align="center" valign="top">');
				  
                 document.write('<img src="'+baseURL+'/images/common/insure_winter_750x42.gif"  border="0" alt="Home">');
                  document.write('</td>');
               document.write('</tr>');


               document.write('<tr>');
                  document.write('<td align="center" valign="bottom" colspan="2">');

                  document.write('<table border="0" width="760" cellpadding="0" cellspacing="0" valign="bottom">');
                      document.write('<tr>');
                      document.write('<td valign="bottom" colspan="2">');

                  if(!hideTabs){
                     document.write('<table border="0" cellspacing="0" cellpadding="0">');
                        document.write('<tr>');
                           document.write('<td valign="bottom"><img src="'+baseURL+'/images/common/insure_winter_bottom.gif"  border="0" alt="Home"></td>');
                           document.write('<td ><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(2, selectedTab)+'</td>');
                           document.write('<td ><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(3, selectedTab)+'</td>');
                           document.write('<td ><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(4, selectedTab)+'</td>');
                           document.write('<td ><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(5, selectedTab)+'</td>');
                           document.write('<td ><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
						   document.write('<td valign="bottom">'+getImageTab(6, selectedTab)+'</td>');
                           document.write('<td ><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(7, selectedTab)+'</td>');
                           document.write('<td><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(8, selectedTab)+'</td>');
                           document.write('<td><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                      //     document.write('<td><img width="34" height="40" src="'+baseURL+'/images/tree5.gif" ></td><td><img src="'+baseURL+'/images/common/clear.gif" width="5">	</td>');
                      //    document.write('<td valign="bottom">'+getImageTab(9, selectedTab)+'</td>');
                     //      document.write('<td><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           if(shiftTabBy>0){
                  document.write('<td><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           }

                        document.write('</tr>');
                     document.write('</table>');

                  }
                  else{
                     document.write('&nbsp;');
                  }
                        document.write('</td>');
                        document.write('</tr>');
                   document.write('</table>');
                   document.write('</td>');
                   document.write('</tr>');

   document.write('</table>');
   document.write('</td>');
//document.write('<td align="center" valign="bottom"><img src="'+baseURL+'/images/common/clear.gif" width="15"><img src="'+baseURL+'/images/tree5.gif" ></td>');

            document.write('</tr>');
            document.write('</table>');
   document.write('</td></tr></table>');

*/

//----------------------------------------------------------
// END of CHRISTMAS SCENE
//----------------------------------------------------------

  /* THIS THE START POINT FOR REPLACEMENT OF WINTER SCENE */

  /* This is the 2009 and before old html */

  /* document.write('<table border="0" cellpadding="0" cellspacing="0" width="1000">');
      document.write('<tr>');
         document.write('<td width="1000" valign="bottom">');
  // XXX(baseURL);
            document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%" valign="bottom">');
              document.write('<tr>');
                  document.write('<td align="center" valign="bottom" colspan="2">');
                  if(!hideTabs){
                     document.write('<table border="0" cellspacing="0" cellpadding="0">');
                            //(******************** note:  imagename_1 is selected, imagename_0 is not
                          document.write('<tr>');
                           document.write('<td rowspan="2" valign="bottom">'+getImageTab(1, selectedTab)+'</td>');
                           document.write('<td rowspan="2"><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');

						   // document.write('<td rowspan="2" valign="bottom">'+getImageTab(9, selectedTab)+'</td>');	

                           document.write('<td rowspan="2" valign="bottom">'+getImageTab(2, selectedTab)+'</td>');
                           document.write('<td rowspan="2"> <img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td rowspan="2" valign="bottom">'+getImageTab(3, selectedTab)+'</td>');
                           document.write('<td rowspan="2"><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td rowspan="2" valign="bottom">'+getImageTab(4, selectedTab)+'</td>');
                           document.write('<td rowspan="2"><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td rowspan="2" valign="bottom">'+getImageTab(5, selectedTab)+'</td>');
                           document.write('<td rowspan="2"><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                          // document.write('<td valign="bottom" colspan="10">&nbsp;&nbsp;'+getYourAccount(hideYourAccount)+'</td>');
                        document.write('</tr>');
                        document.write('<tr>');
                           document.write('<td rowspan="2" valign="bottom">'+getImageTab(6, selectedTab)+'</td>');
                           document.write('<td rowspan="2"><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(7, selectedTab)+'</td>');
                           document.write('<td><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
                           document.write('<td valign="bottom">'+getImageTab(8, selectedTab)+'</td>');
						   document.write('<td rowspan="2"><img src="'+baseURL+'/images/common/clear.gif"  width="1" border="0"></td>');
						   document.write('<td valign="bottom"><img src="'+baseURL+'/images/common/25-years.gif" border="0"></td>');
						   document.write('<td rowspan="2"><img src="' + baseURL + '/images/common/clear.gif"  width="1" border="0"></td>');
						   
						   
						  // document.write('<td rowspan="2" valign="bottom"><img src="'+baseURL+'/images/pumpkin.gif" border="0"></td>');
                           //document.write('<td>&nbsp;</td>');
                           //document.write('<td valign="bottom">'+getImageTab(9, selectedTab)+'</td>');
						   //  do not change the image name, just move the image into the name !!!!!!!
					//	   document.write('<td align="right" valign="bottom"><img src="'+baseURL+'/images/common/clear.gif" width="5"><img src="'+baseURL+'/images/headerTabs_holiday.gif" ></td>');
						// document.write('<td align="right" valign="bottom"><img src="'+baseURL+'/images/common/clear.gif" width="5">	<img src="'+baseURL+'/images/tree5.gif" ></td>');
						//  do not change the image name, just move the image into the name !!!!!!!
						   //document.write('<td>&nbsp;');
						   //XXX(baseURL);
							//document.write('</td>');
						   //  mini-pumpkin has christmas tree in it
						   //document.write('<td align="right" valign="bottom"><img src="'+baseURL+'/images/common/clear.gif" width="25"><img src="'+baseURL+'/images/pumpkin.gif" ></td>');
                         //document.write('<td rowspan="2" valign="bottom"><img src="'+baseURL+'/images/common/clear.gif">&nbsp;&nbsp;&nbsp;&nbsp;<img //src="'+baseURL+'/images/common/turkey.gif" ></td>');
                          // if(shiftTabBy>0){
                           //   document.write('<td><img src="'+baseURL+'/images/common/clear.gif" width="'+shiftTabBy+'" height="1"></td>');
                           //}

                        document.write('</tr>');
                     document.write('</table>');
                  }
                  else{
                     document.write('&nbsp;');
                  }
                           document.write('</td></tr></table></td></tr></table>');
				document.write('</td></tr></table>');
*/

  /* This is the new >2009 header tabs */
    
  //first lets do the css.  note:  there is not a universal .css file in all pages so its best kept here inline

  document.write("<style type=\"text\/css\">");
  document.write("  .jtopnav      { text-align: center;");
  document.write("				    border:1px solid #D4D4D4; ");
  document.write("				    background-image: url('"+baseURL+"\/images\/common\/topnavback.gif'); ");
  document.write("              	background-position:50%;");
  document.write("                }   ");
  document.write("  .navbutton  { font-family: Arial; ");
  document.write("					color: #36578C; ");
  document.write("					font-size: 9pt; ");
  document.write("					font-weight: bold;");

  document.write("					margin: 0 5 0 5; ");
  document.write("					white-space:nowrap ;");

  document.write("			    }");



  document.write("a:active.navbutton { font-family: Arial; color: #36578C; font-size: 9pt; font-weight: bold }");

  document.write("a:link.navbutton { font-family: Arial; color: #36578C; text-decoration: none; font-size: 9pt; font-weight: bold }");

  document.write("a:visited.navbutton { font-family: Arial; color: #36578C; text-decoration: none; font-size: 9pt; font-weight: bold }");

  document.write("a:hover.navbutton { font-family: Arial; color: #fe0000; font-size: 9pt; font-weight: bold}");


  
  document.write(" <\/style>");




  document.write("<table border=\"0\" cellSpacing=\"0\" width=\"1000\" valign=\"bottom\">");

  /* This first group is the first line, logo...*/
  
  document.write("    <tr>");
  document.write("      <td vAlign=\"bottom\" align=\"middle\">");
  document.write("      <table style=\"border-collapse: collapse\" border=\"0\" cellSpacing=\"0\" width=\"100%\" height=\"48\">");
  document.write("          <tr>");
  document.write("            <td height=\"100%\" width=\"666\" align=\"left\">");
  document.write("            <table style=\"border-collapse: collapse\" id=\"AutoNumber1\" border=\"0\" cellSpacing=\"0\" width=\"100%\">");
  document.write("              <tbody>");
  document.write("                <tr>");
  document.write("                  <td width=\"38%\" >"+getImageTab(1, selectedTab));
  document.write("                  <td width=\"62%\" >");
  document.write("                  <p style=\"MARGIN-TOP: 3px\">");
  document.write("                  <font color=\"#336699\" size=\"2\" face=\"Arial\">");
  document.write("                  <b>&nbsp;<\/b><\/font><\/p>");
  document.write("                  <\/td>");
  document.write("                <\/tr>");
  document.write("            <\/table>");
  document.write("            <\/td>");
  document.write("            <td height=\"100%\" align=\"right\">");
  document.write("            <p align=\"left\"><img border=\"0\" align=\"right\" src=\""+baseURL+"\/images\/common\/25-years.gif\"  width=\"190\" height=\"35\"><\/p>");
  document.write("            <\/td>");
  document.write("            <td height=\"100%\" align=\"right\">");
  //document.write("            <p align=\"left\"><img border=\"0\" align=\"left\" src=\""+baseURL+"\/images\/pumpkin.gif\"  width=\"35\" height=\"35\"><\/p>");
  document.write("            <\/td>");
  document.write("          <\/tr>");
  document.write("      <\/table>");
  document.write("      <\/td>");
  document.write("    <\/tr>");





  /* this group is the first row of tabs--notice the if statement for no-tabs.  Also there is an old legacy strategy for active page style utilizing the gettabs function.
  i used the legacy concept and just added a new function--gethomecolor() to change color of the text instead of swapping an image.  I'm not sure if but i think there is a
  reason for the myTarget and linkURL variables--perhaps a partner can set them in a url string.  In production i noticed linkURL was set to www.insure.com which in my
  opinion would open discrete connections for each image.  Perhaps relative urls are better setting linkURL to null...  But i'm not sure so i cant change it with confidense--Jim V*/
  
  document.write("    <tr>");
  document.write("      <td vAlign=\"bottom\" align=\"middle\">");
  
  
  /* This if statement gives partners (or others) the option of not displaying the header tabs */

  if (!hideTabs) {


      document.write("      <table \" border=\"0\" cellSpacing=\"0\" width=\"100%\" height=\"30\">");
      document.write("          <tr>");

      document.write("            <td class=\"jtopnav\" width=\"6%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\"");

      document.write(gethomecolor(2, selectedTab) + ">HOME<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"8%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/articles/lifeinsurance/\"");

      document.write(gethomecolor(4, selectedTab) + ">LIFE INSURANCE<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"8%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/car-insurance/\"");

      document.write(gethomecolor(3, selectedTab) + ">AUTO INSURANCE<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"8%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/articles/healthinsurance/\"");

      document.write(gethomecolor(5, selectedTab) + ">HEALTH INSURANCE<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"8%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/articles/homeinsurance/\"");

      document.write(gethomecolor(6, selectedTab) + ">HOME INSURANCE<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"10%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/Business_redir.html\"");

      document.write(gethomecolor(7, selectedTab) + ">BUSINESS INSURANCE<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"8%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/dentalplans_redir.html\"");

      document.write(gethomecolor(8, selectedTab) + ">DENTAL INSURANCE<\/a><\/h1><\/td>");
      document.write("          <\/tr>");
      document.write("      <\/table>");

  }
  /* This is the second row of tabs.  It used to be called the horizontal line.  This if statement was in the origianl code.  Partners (and others) apparently have the option of turning it off as well */

  if (!hideHorizontalLine) {

      document.write("      <table border=\"0\" cellSpacing=\"0\" width=\"100%\" height=\"30\">");
      document.write("          <tr>");

      document.write("            <td class=\"jtopnav\" width=\"8%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/sellyourpolicy\"");

      document.write(gethomecolor(9, selectedTab) + ">LIFE SETTLEMENT<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"6%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + "href=\"" + linkURL + "\/disability_redir.html\"");

      document.write(gethomecolor(10, selectedTab) + ">DISABILITY<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"12%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/ltc_redir.html\"");

      document.write(gethomecolor(11, selectedTab) + ">LONG-TERM CARE INSURANCE<\/a><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"8%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/idtheft_redir.html\"");

      document.write(gethomecolor(12, selectedTab) + ">IDENTITY THEFT<\/a><\/h1><\/td>");

      document.write("            <td class=\"jtopnav\" width=\"6%\"><h1 class=\"navbutton\"><a class=\"navbutton\" " + myTarget + "href=\"" + linkURL + "\/sitemap.html\"");

      document.write(gethomecolor(13, selectedTab) + ">SITE MAP<\/a><\/h1><\/td>");
      document.write("            <td style=\"HEIGHT: 30px\" class=\"jtopnav\" height=\"30\" width=\"16%\" noWrap>");
      document.write("             <form name=\"search\" action=\""+baseURL+"\/articlesearch\/articleSearch.jsp?page=header\" style=\"margin:0\" method=\"post\">");
      document.write("              <input type=\"text\" style=\"width: 140px; font-size: 10px\" name=\"queryHeader\"  id=\"queryHeader\" size=\"20\">&nbsp;");
      document.write("              <input style=\"position: relative; top: 3px\" alt=\"Search Articles\" src=\""+baseURL+"\/images\/common\/search.gif\" type=\"image\" name=\"I1\" width=\"116\" height=\"20\"><\/form>");
      document.write("            <\/td>");
      document.write("          <\/tr>");
      document.write("      <\/table>");
      document.write("");
  }
 document.write("       <\/td>");
 document.write("    <\/tr>");


  var customCarePhone = "";
  if (customCareNumber != null) {
      customCarePhone = customCareNumber;
  }
  
  document.write("<\/table>");




  /* THIS THE END POINT FOR REPLACEMENT OF WINTER SCENE */

  /* This is the tan horizontal line from <2009 design 

   if(!hideHorizontalLine){
         document.write('<style>');
         document.write('<!--');
            document.write('td.headerBar1 a{color: #000000}');
            document.write('td.headerBar1 a:active {color: #0000FF}');
            document.write('td.headerBar1 a:visited {color: #000000}');
            document.write('td.headerBar1 a:hover{color: #ff0033}');
            document.write('td.headerBar1 a:visited:hover {color: #ff0033}');
            document.write('td.headerBar1{');
               document.write('background-color: #F7EFD6;');
               document.write('text-align: center;');
               document.write('font-family: Arial, Helvetica;');
               document.write('font-size: 9pt;');
               document.write('font-weight: normal;');
            document.write('}');
         document.write('-->');
         document.write('</style>');
      document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
      document.write('<tr height="30">');
         document.write('<td class="headerBar1"> <form name="search" action="http://www.insure.com/articleSearch.jsp" style="padding:0; margin:0" method="post">');
         if(isAgent=="1"){
            document.write('<b><font color=black>Your QuotesmithPro&#153; Customer Care Rep is Eric Young, CLU, ChFC, CPCU    Always toll-free 1-800-556-9393, ext. 248</font></b>')
         }
         else{
            //over ride
            var customCarePhone="";
            if(customCareNumber!=null){
               customCarePhone=customCareNumber;
            }

            //var customCarePhone=""
            //if(customCareNumber!=null){
            //   customCarePhone=customCareNumber;
            //}

            //document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">Updated daily &nbsp;&nbsp;&nbsp;&nbsp;');
            //document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif"><a href="'+linkURL+'/irredir.html"'+myTarget+'>About us</a> &nbsp;&nbsp;&nbsp;&nbsp;');
            //document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">Buy online or call '+customCarePhone+' &nbsp;&nbsp;&nbsp;&nbsp;');
            //document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif"><a href="'+linkURL+'/privacy_statement.html"'+myTarget+'>The best privacy policy</a>');
            writeBottomLinks(baseURL, linkURL, customCarePhone, myTarget);
            //if(!hideRightSpace){
            //   document.write('<img src="'+baseURL+'/images/common/clear.gif" width="61" height="1">');
            //}
         }
         document.write('</form></td>');
      document.write('</td>');
      document.write('</table>');
   

   
   }
   
      */
   document.write('</center>');
}





function writeBottomLinks(baseURL, linkURL, customCarePhone, myTarget){
//   document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	 // document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/noMed_redir.html" class="pageLink"><font color=blue>No-Exam Life Insurance</font></a>&nbsp;&nbsp;&nbsp;&nbsp;');
   document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/sellyourpolicy" class="pageLink"><font color=blue>Life Settlement</font></a> &nbsp;&nbsp;&nbsp;&nbsp;');
// document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/EIAnnuity_redir.html" class="pageLink"><font color=blue>Index Annuities</font></a> &nbsp;&nbsp;&nbsp;&nbsp;');
 //document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/redirect.jsp?qs_pageID=3&qs_type=motorcycle&qs_field1=43493" class="pageLink"><font color=blue>Motorcycle</font></a> &nbsp;&nbsp;&nbsp;&nbsp;');-->
   document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/disability_redir.html" class="pageLink"><font color=blue>Disability</font></a> &nbsp;&nbsp;&nbsp;&nbsp;');
   document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/ltc_redir.html" class="pageLink"><font color=blue>Long-Term Care Insurance</font></a>&nbsp;&nbsp;&nbsp;&nbsp;');
 //  document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">Buy online or call '+customCarePhone+' &nbsp;&nbsp;&nbsp;&nbsp;');
 //  document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/dentalplans_redir.html" class="pageLink"><font color=blue>Dental Plans</font></a>&nbsp;&nbsp;&nbsp;&nbsp;');
//   document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/quotesmith/controller?reqid=equityindexannuity" class="pageLink"><font color=blue>Index Annuities</font></a>&nbsp;&nbsp;&nbsp;&nbsp;');
      document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="/idtheft_redir.html" class="pageLink"><font color=blue>Identity Theft</font></a>&nbsp;&nbsp;&nbsp;&nbsp;');

document.write('<img border="0" src="'+baseURL+'/images/common/blueArrow.gif">&nbsp;<a href="http://www.insure.com/sitemap.html" class="pageLink"><font color=blue>Site Map</font></a>&nbsp;&nbsp;&nbsp;&nbsp;');
document.write('<input type="text" name="query" style="font-size:10px;width=140">&nbsp;&nbsp;<input type="image" src="'+baseURL+'/images/common/search.gif"  alt="Search" style="position:relative;top:3px"></a>&nbsp;&nbsp;&nbsp;&nbsp;');
}



function getYourAccount(hide){
   if(hide){
      return "&nbsp;";
   }
   else{
      //return '<img height="1" width="52" src="/images/common/clear.gif"><a href="'+baseURL+'/apr.html"'+myTarget+'><img border="0" src="'+baseURL+'/images/common/your_account.gif" alt="Your Account"></a>';
      return "&nbsp;"; // TR 5659
   }
}

function getImageTab(tabIndex, selectIndex){
   var result=tabs[tabIndex-1][0];
   if(tabs[tabIndex-1][1]!=null){
      if(selectIndex==tabIndex){
         result+='1';
      }
      else{
         result+='0';
      }
      result+=tabs[tabIndex-1][1];
   }
   return result;

}

/* This function sets the color of the active page tab to red. --jim v.*/


function gethomecolor(tabIndex, selectIndex) {

    var result = "";
        if (selectIndex == tabIndex) {

            result += 'style="text-decoration: none"><font color="#FE0000"';
          
        }
        else {
            result = '';
        }
       
   
    return result;
}

function getFooter(width){
   document.write('<style>\n');
   document.write('<!--\n');
   document.write('td.bpleftcol, td.bprightcol {\n');
   document.write('  width: 3px;\n');
   document.write('  background-color: #cccc99;\n');
   document.write('}\n');

   document.write('td.boilerplate {\n');
   document.write('  font-family: Arial,Univers,Helvetica ;\n');
   document.write('  font-size: 12px ;\n');
   document.write('  color: black ;\n');
   document.write('  text-align: justify;\n');
   document.write('  padding: 0px 4px ;\n');
   document.write('}\n');
   document.write('-->\n');
   document.write('</style>\n');

   document.write('<table bgcolor=#FFFFFF width="'+width+'" border="0" cellspacing="0" cellpadding="0" align="center">');
   document.write('        <TR>');
   document.write('          <TD>');
   document.write('            <table width="'+width+'" border="0" cellspacing="0" cellpadding="0" align="center">');
   document.write('              <TBODY>');
   document.write('                <TR>');
   document.write('                  <TD class=bpleftcol>&nbsp;</TD>');
   document.write('                  <TD class=boilerplate><span style=\'FONT-SIZE: 8pt; FONT-FAMILY: Verdana\'> <B>Copyright &copy; 1984-2009 Quinstreet, Inc.</B></span></TD>');
   document.write('                  <TD class=bprightcol>&nbsp;</TD>');
   document.write('                </TR>');
   document.write('              </TBODY>');
   document.write('            </TABLE>');
   document.write('          </TD>');
   document.write('        </TR>');
   document.write('    </TABLE>');
}
//window.onunload=bodyUnload;




