
  //**** Start WAEPA Top Heading ****

   //document.write(" <tr><td colspan=14 bgcolor=#ffffff><IMG SRC=images/WAEPA-web_01.gif WIDTH=1 HEIGHT=4 ></td></tr>")

   document.write(" <tr>")
   document.write("  <td colspan=14 bgcolor=#ffffff nowrap>")

   document.write("      <table cellpadding=0 cellspacing=0 border=0>   ")
   document.write("       <tr>                                          ")
                               //document.write("        <td align=left width=6 height=21><img src=images/tan_button21_L.jpg></td>")
                               //document.write("        <td align=left height=21 background=images/tan_button21_M.jpg nowrap><center><a class=Uline4 href=GetEmail.html title='Click Here to get notified about your Refund'><font style='font-family:Arial; font-size:12px;  color: #ff0000;'><b>&nbsp;&nbsp;Board Announces 25% Refund, &nbsp;&nbsp;Click Here to Make Sure You Get Yours!&nbsp;&nbsp;</b></font></a></center></td>")
                               //document.write("        <td align=left width=6 height=21><img src=images/tan_button21_R.jpg></td>")

                               //document.write("        <td align=left height=50 width=6><img src=images/tan_button50_L.jpg></td>")
                               //document.write("        <td align=left height=50 background=images/tan_button50_M.jpg nowrap><center><a class=Uline4 href=GetEmail.html title='Click Here to get notified about your Refund'><font style='font-family:Arial; font-size:12px;  color: #ff0000;'><b>&nbsp;&nbsp;Board Announces 25% Refund, &nbsp;&nbsp;<br>Click Here to Make Sure You Get Yours!&nbsp;&nbsp; <br>Membership Profile Updater</b></font></a></center></td>")
                               //document.write("        <td align=left height=50 width=6><img src=images/tan_button50_R.jpg></td>")

   document.write("        <td align=left><img src=images/tn_tan_button21_L.jpg></td>")
                                                                               //document.write("        <td align=left background=images/tn_tan_button21_M.jpg nowrap><center><a class=Uline4 href=MemberProfile.html title='Click Here to get notified about your Refund'><font style='font-family:Arial; font-size:12px;  color: #ff0000;'><b>&nbsp;&nbsp;Board Announces 25% Refund, &nbsp;&nbsp;Click Here to Make Sure You Get Yours!&nbsp;&nbsp; <br>Membership Profile Updater</b></font></a></center></td>")
   document.write("        <td align=left background=images/tn_tan_button21_M.jpg nowrap><center><a class=Uline4 href=03_ChangeYourAdress.html title='Membership Profile Updater.  Please make sure WAEPA has your current member address.'><font style='font-family:Arial; font-size:12px;  color: #ff0000;'><b>&nbsp;&nbsp;Membership Profile Updater<br>Please Make Sure WAEPA has your Current Member Address</b></font></a></center></td>")
   document.write("        <td align=left><img src=images/tn_tan_button21_R.jpg></td>")

                              //document.write("        <td align=left width=6 height=21><img src=images/tan_button21_L.jpg></td>")
                              //document.write("        <td align=left height=21 background=images/tan_button21_M.jpg nowrap><center><a class=Uline4 href=GetEmail.html title='Click Here to get notified about your Refund'><font style='font-family:Arial; font-size:12px;  color: #ff0000;'><b>&nbsp;&nbsp;Board Announces 25% Refund, &nbsp;&nbsp;Click Here to Make Sure You Get Yours!&nbsp;&nbsp; &nbsp;Membership Profile Updater&nbsp;&nbsp;</b></font></a></center></td>")
                              //document.write("        <td align=left width=6 height=21><img src=images/tan_button21_R.jpg></td>")


   document.write("       </tr>")
   document.write("      </table>")

   document.write("  </td>")
   document.write(" </tr>")

                           //document.write(" <tr><td colspan=14 bgcolor=#ffffff><IMG SRC=images/WAEPA-web_01.gif WIDTH=1 HEIGHT=10 ></td></tr>")
   document.write(" <tr><td colspan=14 bgcolor=#ffffff><IMG SRC=images/WAEPA-web_01.gif WIDTH=1 HEIGHT=4 ></td></tr>")
   document.write(" <tr>")
   document.write("   <td colspan=14 bgcolor=#ffffff>")
   document.write("       <table cellpadding=0 width=100% border=0 bgcolor=#ffffff>")
   document.write("        <tr>")
   document.write("          <TD width=200><IMG SRC=images/WAEPA-web_01.gif WIDTH=1 HEIGHT=30 ></td>")
   document.write("          <td width=401 height=24 nowrap valign=top align=left>")
   //****************************document.write("              <a href=NEWWAEPAHOME.html><IMG SRC=images/home.jpg title='Go to the WAEPA Home Page' WIDTH=41 HEIGHT=24 border=0></a><a href=09_ContactUs.html><IMG SRC=images/Contact_Us.jpg title='Go to the Contact Us Page' WIDTH=80 HEIGHT=24 border=0></a><a href=05_ReferAFriend.html><IMG SRC=images/Refer_A_Friend.jpg title='Refer A Friend a WAEPA Brochure' WIDTH=102 HEIGHT=24 border=0></a><a href=09_SiteMap.html><IMG SRC=images/Site_Map.jpg title='Go to the Site Map of the website' WIDTH=63 HEIGHT=24 border=0></a>")

//*** start top nav bar ****
document.write(" &nbsp;<font style=\"FONT-SIZE: 12px; COLOR: #4169E1; FONT-FAMILY: Arial,Tahoma; FONT-WEIGHT: bold;\">")
document.write(" <a class=Uline href=\"NEWWAEPAHOME.html\" title=\"Go to the WAEPA home page\"><font style=\"FONT-SIZE: 12px; COLOR: #4169E1; FONT-FAMILY: Arial,Tahoma; FONT-WEIGHT: bold;\">Home</font></a>&nbsp;|&nbsp;")
document.write(" <a class=Uline href=\"FAQ.html\" title=\"Go to the Frequently Asked Questions page\"><font style=\"FONT-SIZE: 12px; COLOR: #4169E1; FONT-FAMILY: Arial,Tahoma; FONT-WEIGHT: bold;\">FAQ</font></a>&nbsp;|&nbsp;")
document.write(" <a class=Uline href=\"HowTo.asp\" title=\"Find out How To accomplish common tasks\"><font style=\"FONT-SIZE: 12px; COLOR: #4169E1; FONT-FAMILY: Arial,Tahoma; FONT-WEIGHT: bold;\">How To</font></a>&nbsp;|&nbsp;")
document.write(" <a class=Uline href=\"09_ContactUs.html\" title=\"How to reach WAEPA\"><font style=\"FONT-SIZE: 12px; COLOR: #4169E1; FONT-FAMILY: Arial,Tahoma; FONT-WEIGHT: bold;\">Contact Us</font></a>&nbsp;|&nbsp;")
document.write(" <a class=Uline href=\"05_ReferAFriend.html\" title=\"Tell your friends about WAEPA\"><font style=\"FONT-SIZE: 12px; COLOR: #4169E1; FONT-FAMILY: Arial,Tahoma; FONT-WEIGHT: bold;\">Refer A Friend</font></a>&nbsp;|&nbsp;")
document.write(" <a class=Uline href=\"09_SiteMap.html\" title=\"Help find your way on this website\"><font style=\"FONT-SIZE: 12px; COLOR: #4169E1; FONT-FAMILY: Arial,Tahoma; FONT-WEIGHT: bold;\">Site Map</font></a>")
document.write("</font>")


function Search_WAEPA() {
   searchterms = document.form1.textfield.value;
   SearchQuery = searchterms.replace(" ","+");

   //alert("Starting Search_WAEPA, search_terms="+searchterms+", SearchQuery="+SearchQuery)
  // URL = "../Search_Results.asp?zoom_query="+SearchQuery+"&zoom_per_page=10&zoom_and=1&zoom_sort=0"
   URL = "Search_Results.asp?zoom_query="+SearchQuery+"&zoom_per_page=10&zoom_and=1&zoom_sort=0"
   window.location=URL
   }         //*** end function



//*** Stop  top nav bar ****
   document.write("          </td>")
   document.write("          <td valign=top  width=200 align=left nowrap><form name=form1 method=post style='margin-top: 0; border-top-width: 0; padding-top: 0; margin-bottom: 0; border-bottom-width: 0; padding-bottom: 0;'>")
   document.write("              <input name=textfield type=text class=style1 size=18 maxlength=100 onKeyPress='return submitenter(this,event)'>&nbsp;<a href='#'  onclick='Search_WAEPA()'   onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('Image58','','images/SEARCH_ON.jpg',1)\"><img src=images/SEARCH.jpg name=Image58 width=52 height=20 border=0 title='Search the website'></a>")
   document.write("            </form>")
   document.write("         </td>")
   document.write("        </tr>")
   document.write("       </table>")
   document.write("   </td>")
   document.write(" </tr>")
   document.write(" <TR>")
   document.write("   <TD height=31 COLSPAN=2><IMG SRC=images/WAEPA-web_05.gif WIDTH=186 HEIGHT=31 ></TD>")
   document.write("   <TD width=122><a href=01_WAEPAvsFEGLI.html onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image54','','images/WAEPA-web_07ON.gif',1)\"><img src=images/WAEPA-web_07.gif name=Image54 width=122 height=31 border=0></a></TD>")
   document.write("   <TD COLSPAN=3><a href=01_WAEPAPremiumCalculator.html onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image55','','images/WAEPA-web_08ON.gif',1)\"><img src=images/WAEPA-web_08.gif name=Image55 width=122 height=31 border=0></a></TD>")
   document.write("   <TD COLSPAN=3><a href=02_WAEPAInsuranceForYourself.html onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image53','','images/WAEPA-web_06ON.gif',1)\"><img src=images/WAEPA-web_06.gif name=Image53 width=122 height=31 border=0></a></TD>")
   document.write("   <TD COLSPAN=4 bgcolor=#FFFFFF><a href=02_WAEPAInsuranceForYourFamily.html onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image56','','images/WAEPA-web_09ON.gif',1)\"><img src=images/WAEPA-web_09.gif name=Image56 width=122 height=31 border=0></a></TD>")
   document.write("   <TD width=126 bgcolor=#FFFFFF><a href=03_ServiceFormsforMembers.html onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image57','','images/WAEPA-web_10ON.gif',1)\"><img src=images/WAEPA-web_10.gif name=Image57 width=126 height=31 border=0></a></TD>")
   document.write("   <td></td>")
   document.write(" </TR>")
 //*** End top nav bar


//************************ Start Search field - Enter key submitted **************************
function submitenter(myfield,e)     /* Used to let user hit Enter to submit a search  */
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   //alert("Submit field")
   Search_WAEPA()
   return false;
   }
else {
   return true;
   //alert("Do not Submit field")
   }
}            /* end function  */
//************************ End   Search field - Enter key submitted **************************


//************************************ Start of highlight.js *********************************************
// ----------------------------------------------------------------------------
// Zoom Search Engine 4.3 (27/6/2006)
// Highlight & auto-scroll script
//
// email: zoom@wrensoft.com
// www: http://www.wrensoft.com
//
// Copyright (C) Wrensoft 2006
// ----------------------------------------------------------------------------
// Use this script to allow your search matches to highlight and scroll to
// the matched word on the actual web page where it was found.
//
// You will need to link to this JS file from each page of your site
// which requires the "highlight/jump to matched word" feature.
//
// For example, you could paste the following HTML in your site's header or
// footer:
//
//   <style>.highlight { background: #FFFF40; }</style>
//   <script type="text/javascript" src="highlight.js"></script>
//
// Note: You will need to specify the correct path to "highlight.js" depending
// on where the file is located.
//
// You will then need to modify the BODY tag on your page to include an "onLoad"
// attribute, such as:
//
//   <body onload="highlight();">
//
// If for some reason you can not modify the body tag of your page, an alternative
// would be to put the following line after the </body> tag of your page:
//
//   <script type="text/javascript">highlight();</script>
//
// For more information, consult the Users Guide and our support website at:
// http://www.wrensoft.com/zoom/support
//
//
// This script is licensed for use with the Zoom Search Engine. Original
// development by Brett Alcock, VBasys Limited. To licence other applications
// email highlight@vbasys.com with the subject "license".

var CatchJSErrors = true;

function catcherror() { return true; }
if (CatchJSErrors)
{
    window.onerror = catcherror;
}

function QueryString(key)
{
    var value = null;
    for (var i=0;i<QueryString.keys.length;i++)
    {
        if (QueryString.keys[i]==key)
        {
            value = QueryString.values[i];
            break;
        }
    }
    return value;
}

function QueryString_Parse()
{
    var query = window.location.search.substring(1);
    var pairs = query.split("&");

    for (var i=0;i<pairs.length;i++)
    {
        var pos = pairs[i].indexOf('=');
        if (pos >= 0)
        {
            var argname = pairs[i].substring(0,pos);
            var value = pairs[i].substring(pos+1);
            QueryString.keys[QueryString.keys.length] = argname;
            QueryString.values[QueryString.values.length] = value;
        }
    }
}

QueryString.keys = new Array();
QueryString.values = new Array();

QueryString_Parse();

function getElement(id)
{
    if (document.getElementById)
        return(document.getElementById(id));
    else if (document.all)
        return(document.all[id]);
}

function findPosY(obj)
{
    var curtop = 0;
    if (obj.offsetParent)
    {
        while (obj.offsetParent)
        {
            curtop += obj.offsetTop
            obj = obj.offsetParent;
        }
    }
    else if (obj.y)
        curtop += obj.y;
    return curtop;
}


// regular expression version
function SearchHiLite(text)
{
    var SearchAsSubstring = 0;
    var hl;

    hl = QueryString("zoom_highlight");
    if (hl == "" || hl == null)
    {
        hl = QueryString("zoom_highlightsub");
        if (hl == "" || hl == null)
            return false;
        else
            SearchAsSubstring = 1;
    }
    if ((document.charset && document.charset == "utf-8") ||
     (document.characterSet && document.characterSet == "UTF-8"))
     hl = decodeURIComponent(hl);
    else
     hl = unescape(hl);
    hl = hl.toLowerCase();

    // create array of terms
    //var term = hl.split("+");
    var re = /\"(.*?)\"|[^\\+\"]+/g;
    var term = hl.match(re);

    // convert terms in regexp patterns
    for (var i=0;i<term.length;i++) // take each term in turn
    {
        if(term[i] != "")
        {
            if (term[i].indexOf("\"") != -1)
            {
                // contains double quotes
                term[i]=term[i].replace(/\"/g,"");
                term[i]=term[i].replace(/\+/g," ");
            }
            else
            {
                term[i]=term[i].replace(/\+/g,"");
            }

            if (term[i].indexOf("*") != -1 || term[i].indexOf("?") != -1)
            {
                // convert wildcard pattern to regexp
                term[i] = term[i].replace(/\\/g, " ");
                term[i] = term[i].replace(/\^/g, " ");

                //term[i] = term[i].replace(/\+/g, " "); // split on this so no point in looking

                term[i] = term[i].replace(/\#/g, " ");
                term[i] = term[i].replace(/\$/g, " ");
                term[i] = term[i].replace(/\./g, " ");

                // check if search term only contains only wildcards
                // if so, we will not attempt to highlight this term
                var wildcards = /\w/;
                if (wildcards.test(term[i]))
                {
                 term[i] = term[i].replace(/\*/g, "[^\\s]*");
                 term[i] = term[i].replace(/\?/g, "[^\\s]"); // insist upon one non whitespace
                }
                else
                 term[i] = "";
            }

   if (term[i] != "")
   {
             if (SearchAsSubstring == 0)
             {
                 term[i] = "(>[\\s]*|>[^<]+[\\b\\W])("+term[i]+")(<|[\\b\\W][^>]*<)";
             }
             else
             {
                 // if term leads with wildcard then allow it to match preceeding text in word
                 var strWB="";
                 if(term[i].substr(0,7)=="[^\\s]*") strWB="\\b";
                 term[i] = "(>|>[^<]+)"+strWB+"("+term[i]+")([^>]*<)";
             }
         }
        }
    }

    text=text.replace(/&amp;/ig, '&');
    text=text.replace(/&nbsp;/ig, '');

    for (var i=0;i<term.length;i++) // take each term in turn
    {
        if(term[i] != "")
        {
            // we need a loop for the main search to catch all between ><
            // and we add  before each found to ignore those done etc
            // todo: develop reliable single pass regexp and dispose of loop
            var l = 0;
            re = new RegExp(term[i], "gi");
            var count = 0; // just incase
            text = ">" + text + "<"; // temporary tag marks
            do
            {
                l=text.length;
                text=text.replace(re, '$1<span style="background:#FFFF40;" class="highlight" id="highlight" name="highlight">$2</span id="highlight">$3');
                count++;
            }
            //while(re.lastIndex>0 && count<100); lastIndex not set properly under netscape
            while(l!=text.length && count<100);
            text = text.substring(1, text.length-1); // remove temporary tags
        }
    }
    text = text.replace(eval("//g"), '');
    text = text.replace(eval("//g"), '&nbsp;');

    return(text);
}

function jumpHL()
{
    var d=getElement("highlight");
    if(d)
    {
        var y=findPosY(d);
        // if element near top of page
        if(y < 100)
            window.scrollTo(0,0); // go to top of page
        else
            window.scrollTo(0,y-50); // show space of 50 above
    }
}

function highlight()
{
    var x = document.body;
    if (x)
    {
        var strHTML=SearchHiLite(x.innerHTML);
        if (strHTML!=false) x.innerHTML = strHTML;
        jumpHL();
    }
}

//************************************ End   of highlight.js *********************************************



  //**** End   WAEPA Top Heading ****


