/*====================================================*
  menu.js
  Simple menu script written by Landi le Roux
 *====================================================*/

/* (text, directory, filename) */
Menu00 = new Array("Home",            "",               "index.htm");
Menu01 = new Array("Powerplate",      "powerplate",     "powerplate.htm");
Menu02 = new Array("Physiotherapy",   "physiotherapy",  "physiotherapy.htm");
Menu03 = new Array("Health Products", "healthproducts", "index.htm");
Menu04 = new Array("Price Structure", "pricestructure", "index.htm");
Menu05 = new Array("Staff",           "staff",          "index.htm");
Menu06 = new Array("Contact Us",      "contactus",      "index.htm");

var NoOfFirstLineMenus = 7;
var LowBackground      = "#C0C0C0";   //Background color when mouse is not over
var LowFont            = "#000000";   //Font color when mouse is not over
var CurrentPageFont    = "#FFFFFF";   //Font when current page
var ImgString          = "";          //If empty use | else in format '<IMG height=14 src="images\/grey.gif" width=1>';


//=========================================================================
//Custom Function to create the footer on every page.
//=========================================================================
function PlaceFooter(currentlevel) {
  var newstring = '';
    if (currentlevel == "1")
      {relative = '../';}
    else  
      {relative = '';}
  newstring += '<table width="100%" cellspacing="1" cellpadding="1"><tr><td style="background-image: url(' + relative + 'images/imgButton.jpg);"><div class="floatleft">';
  newstring += ' &copy;Copyright <a href="http:\/\/www.funkypixel.co.za">Funky Pixel<\/a> 2008<\/div>';
  newstring += '<div class="floatright">';
  newstring += 'Tel: (021) 851 1690 Email: <a href="mailto:info@lerienvanzyl.co.za">info@lerienvanzyl.co.za<\/a><\/div><\/td><\/tr><\/table>';
  document.write(newstring);
}


//=========================================================================
//Main Menu
//Selected     = Find page name in first column of Menu array
//CurrentLevel = Number of subdirectories down.  Start at 0 for main page. 
//=========================================================================
function MenuMain(selected, currentlevel) {
  var newstring = '';
  var arrayname = '';
  var divider   = '';
  var relative  = '';

  newstring += '<table cellspacing="1" cellpadding="1"><tr>';
  for(i=0; i<NoOfFirstLineMenus; i++)
 {
    arrayname = eval("Menu0"+i);  //style="color: white"
    if (currentlevel == "1")
      {relative = '../';}
    else  
      {relative = '';}
    newstring += '<td style="background-image: url(' + relative + 'images/imgButton.jpg); color: gray; text-align: center;" width="127px">';
    if (selected == arrayname[0]) 
      {newstring += arrayname[0];}
    else
      {newstring += '<a href="' + relative + arrayname[1] + '\/' + arrayname[2] + '">' + arrayname[0] + '<\/a>';}
    newstring += '<\/td>';
  } 
  newstring += "<\/tr><\/table>";
  document.write(newstring);
}