// NOTE:  New Browser detection code, more effecient and allows Netscape 4.0
//        And the new IE 4.0 which now supports image arrays.
//
//  This code is now being used throughout the net, but this is the source
//  you should refer to for updates.  We're modifying it as the net changes.
//
//  Copyright 1996-97 Project Cool, Inc.  Used by the net, with permission but
//  we would appreciate it if you would give us credit in the source or a link
//  from your site. This statement must be included in the webpage.
//  http://www.projectcool.com
//

browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

   if ( browser) {
                  normal = new MakeArray(6)
                  over = new MakeArray(6)
                  picture = new MakeArray(7)
                  blurb = new MakeArray(7)

                  normal[1].src = "/spf/almanac1.gif"
                  normal[2].src = "/spf/products1.gif"
                  normal[3].src = "/spf/order1.gif"
                  normal[4].src = "/spf/search1.gif"
                  normal[5].src = "/spf/contact1.gif"

                  over[1].src = "/spf/almanac2.gif"
                  over[2].src = "/spf/products2.gif"
                  over[3].src = "/spf/order2.gif"
                  over[4].src = "/spf/search2.gif"
                  over[5].src = "/spf/contact2.gif"

                  picture[1].src = "/spf/symptoms3.gif"
                  picture[2].src = "/spf/products3.gif"
                  picture[3].src = "/spf/order3.gif"
                  picture[4].src = "/spf/search3.gif"
                  picture[5].src = "/spf/contact3.gif"
                  picture[6].src = "/spf/blank.gif"


                  blurb[1] = "Herb Almanac helps you find herbs and vitamins specific to your symptoms"
                  blurb[2] = "Look for a specific product name"
                  blurb[3] = "Check your current order"
                  blurb[4] = "Search our entire site"
                  blurb[5] = "Contact Us"
                  blurb[6] = ""
                 }

bg_color = "ffffff";
text_color = "333333";
link_color = "cc0033";
vlink_color = "336633";
alink_color = "333333";


domain_name = "www.1001herbs.com";
hallsiteid = "1001herbs.com";
site_title = "1001herbs.com";
document_url = showlocation()
if (document_url.indexOf("hallshop") > -1){document_url = ""}

   function MakeArray(n) {
                          this.length = n
                          for (var i = 1; i<=n; i++) {
                           this[i] = new Image()
                           }
                          return this
                         }

   function msover(num)  {
                          if (browser) {
                           document.images[num+4].src = over[num+1].src
                           window.status = blurb[num+1]
                           document.images[3].src = picture[num+1].src
                          }
                         }

   function msout(num)   {
                          if (browser) {
                           document.images[num+4].src = normal[num+1].src
                           //document.images[3].src = picture[6].src
                           window.status = blurb[6]
                          }
                         }

function showlocation(){
  var durl = document.URL
  var upos = domain_name.length + 8
  if (durl.indexOf("www.") < 0){upos = upos - 4}
  return durl.substring(upos)
}

function disp_body(){
  document.write ('<body bgcolor='+bg_color+' text='+text_color+' link='+link_color+' vlink='+vlink_color+' alink='+alink_color+'>');
}


function disp_logo(){
  document.write ('<table width=600 border=0 cellpadding=0 cellspacing=0>');
  document.write ('<tr>');
  document.write ('<td width=300><img src="/spacer.gif" vspace=2 alt=""><br>');
  document.write ('<a href="/index.html"><img src="/spf/logosm.gif" width=300 height=145 border=0 alt="1001 Herbs -- For a Healthy Life"></a><br>');
  document.write ('<img src="/spf/spacer.gif" vspace=3 alt=""></td>');
  document.write ('<td width=300><img src="/spf/blank.gif" width=156 height=154 align=left>');
  document.write ('<table width=144 border=0 cellpadding=0 cellspacing=0>');
  document.write ('<tr><td>&nbsp;</td></tr>');
  document.write ('<tr><td><a href="http://www.herbalmanac.com/'+document_url+'" onmouseover="msover(0) ; return true" onmouseout="msout(0)"><img src="/spf/almanac1.gif" border=0 align=right alt="Herb Almanac"></a><br></td></tr>');
  document.write ('<tr><td><a href="/products.html" onmouseover="msover(1) ; return true" onmouseout="msout(1)"><img src="/spf/products1.gif" border=0 align=right alt="Search out entire product database"></a><br></td></tr>');
  document.write ('<tr><td><a href="/cgi-local/hallshop.pl/REVIEW_ORDER" onmouseover="msover(2) ; return true" onmouseout="msout(2)"><img src="/spf/order1.gif" border=0 align=right alt="Check the contents of your shopping bag, or finalize your order"></a><br></td></tr>');
  document.write ('<tr><td><a href="/search.html" onmouseover="msover(3) ; return true" onmouseout="msout(3)"><img src="/spf/search1.gif" border=0 align=right alt="Search our entire site"></a><br></td></tr>');
  document.write ('<tr><td><a href="/spf/contact.html" onmouseover="msover(4) ; return true" onmouseout="msout(4)"><img src="/spf/contact1.gif" border=0 align=right alt="Contact us"></a></td>');
  document.write ('</tr>');
  document.write ('</table>');
  document.write ('</tr>');
  document.write ('</table>');
}

function disp_copyright(){
  document.write ('<center><p><font size=1>&#169;Copyright 2000 <a href="/index.html">1001 Herbs</a>.All rights reserved.<br>Established April 1998.</p></center>');
}

function disp_sitetitle(){
  document.write (site_title);
}

function disp_sitetitle2(){
  document.write (site_title.concat('&#146;s'));
}

function disp_almanaclink(){
  document.write ('<a href="http://www.herbalmanac.com/'+document_url+'">Herb Almanac</a> | ');
}
