function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function preloadAll() {
	MM_preloadImages('images/menubar/menubar_b1_over.gif','images/menubar/menubar_b2_over.gif','images/menubar/menubar_b3_over.gif','images/menubar/menubar_b4_over.gif')
}

function writeHeader() {
	//This is done rather than in an SSI because I could not get Contribute to work correctly with an included PHP file.
	//If you have no more need for Contribute access, then feel free to set it up as an included file. - Mike, 17/08/2006
document.write('<table class="main" align="center">');
document.write('<tr>');
document.write('<td>');
document.write('<div align="center"><a href="index.php"><img src="images/header.gif" alt="Herbal Secrets" width="750" height="100" border="0"></a></div>');
document.write('<table border="0" cellpadding="0" cellspacing="0" align="center" width="750" style="background-image:url(images/menubar/line.gif);background-repeat:repeat-x;">');
document.write('<tr>');
document.write('<td>&nbsp;</td>');
document.write('<td width="30"><img src="images/menubar/menubar_left.gif" width="30" height="25" /></td>');
document.write('<td width="55"><a href="intro.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'home\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'home\',\'images/menubar/menubar_b1_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b1.gif" alt="Home" name="home" width="55" height="25" id="home" onload="" /></a></td>');
document.write('<td width="69"><a href="products.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'about\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'about\',\'images/menubar/menubar_b2_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b2.gif" alt="About Herbal Secrets" name="about" width="69" height="25" id="about" onload="" /></a></td>');
document.write('<td width="81"><a href="ingredients.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'products\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'products\',\'images/menubar/menubar_b3_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b3.gif" alt="Products" name="products" width="81" height="25" id="products" onload="" /></a></td>');
document.write('<td width="82"><a href="usage.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'usage\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'usage\',\'images/menubar/menubar_b4_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b4.gif" alt="Ingredients" name="usage" width="82" height="25" id="usage" onload="" /></a></td>');
document.write('<td width="87"><a href="testimonials.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'testimonials\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'testimonials\',\'images/menubar/menubar_b5_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b5.gif" alt="Contact Us" name="testimonials" width="87" height="25" id="testimonials" onload="" /></a></td>');
document.write('<td width="87"><a href="news.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'news\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'news\',\'images/menubar/menubar_b6_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b6.gif" alt="Frequently Asked Questions" name="news" width="87" height="25" id="news" onload="" /></a></td>');
document.write('<td width="63"><a href="contact.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'contact\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'contact\',\'images/menubar/menubar_b7_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b7.gif" alt="Frequently Asked Questions" name="contact" width="63" height="25" id="contact" onload="" /></a></td>');
document.write('<td width="47"><a href="faq.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'faq\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'faq\',\'images/menubar/menubar_b8_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b8.gif" alt="Frequently Asked Questions" name="faq" width="47" height="25" id="faq" onload="" /></a></td>');
document.write('<td width="50"><a href="links.php" target="_top" onclick="MM_nbGroup(\'down\',\'group1\',\'links\',\'\',1)" onmouseover="MM_nbGroup(\'over\',\'links\',\'images/menubar/menubar_b9_over.gif\',\'\',1)" onmouseout="MM_nbGroup(\'out\')"><img src="images/menubar/menubar_b9.gif" alt="Links" name="links" width="50" height="25" id="links" onload="" /></a></td>');
document.write('<td width="30"><img src="images/menubar/menubar_right.gif" width="30" height="25" /></td>');
document.write('<td>&nbsp;</td>');
document.write('</tr>');
document.write('</table>');
}

function writeFooter() {
	//See writeHeader;
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('<p class="footer"><a href="intro.php">About</a> | <a href="products.php">Products</a> | <a href="ingredients.php">Ingredients</a> | <a href="usage.php">Instructions</a> | <a href="testimonials.php">Testimonials</a> | <a href="news.php">Latest News</a> | <a href="contact.php">Contact</a> | <a href="faq.php">Frequently Asked Questions</a><br />');
document.write('<span class="copyright">&copy; 2006 Herbal Secrets Ltd</a> | <a href="tandcs.php">Terms and Conditions</a></span></p>');
document.write('</body>');
document.write('</html>');
}