/*====================================================*
  menu.js
  Simple menu script written by Landi le Roux
 *====================================================*/

/* (text, directory, filename) */
Menu00 = new Array("HOME",                 "index.htm");
Menu01 = new Array("CONTACT US",           "contactus.htm");

var NoOfFirstLineMenus = 2;

//Get email
//http://www.dynamicdrive.com/emailriddler/
function GetEmailContactUs()
{
  var emailriddlerarray=[113,117,101,114,121,64,111,114,116,104,111,115,111,108,118,101,46,99,111,46,122,97]
  var encryptedemail_id68='' //variable to contain encrypted email 
  for (var i=0; i<emailriddlerarray.length; i++)
   encryptedemail_id68+=String.fromCharCode(emailriddlerarray[i])
  
  document.write('<a href="mailto:'+encryptedemail_id68+'?subject=Website Query">contact us</a>')
}
function GetEmail()
{
var emailriddlerarray=[113,117,101,114,121,64,111,114,116,104,111,115,111,108,118,101,46,99,111,46,122,97]
var encryptedemail_id67='' //variable to contain encrypted email 
for (var i=0; i<emailriddlerarray.length; i++)
 encryptedemail_id67+=String.fromCharCode(emailriddlerarray[i])

document.write('<a href="mailto:'+encryptedemail_id67+'?subject=Website Query">query@orthosolve.co.za</a>')
}


//Custom Function to create the footer on every page.
function PlaceFooter() {
  var newstring = '';
  newstring += '<div class="footerleft">';
  newstring += 'Copyright &copy;<a href="http:\/\/www.orthosolve.co.za">OrthoSolve<\/a><\/div>';
  newstring += '<div class="footerright">';
  newstring += 'Designed and hand coded by <a href="http:\/\/www.funkypixel.co.za">Funky Pixel<\/a><\/div><\/div>';
  document.write(newstring);
}

/* This function is called to create the MainMenu.
   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   = '<span class="divider">&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;</span>';
  var relative  = '';
  var spanclass = '';
  
  for(i=0; i<NoOfFirstLineMenus; i++)
  {
    arrayname = eval("Menu0"+i);  
    if (i == 0)
      //First
      {newstring += "<br /><br />";}
    else if (i == (NoOfFirstLineMenus - 1))  
      //Last
      {newstring += divider;}  
    else
      //Other
      {newstring += divider;}  
      
    if (selected == arrayname[0]) 
      {newstring += arrayname[0];}
    else
      {newstring += '<a title="' + arrayname[0] + '" href="' + arrayname[1] + ' ">' + arrayname[0] + '<\/a>';}
  } 
  document.write(newstring);
}

