
/*

if (!(document.all))
{
   if (document.layers)
   {
      window.location.replace("NNMenus.htm");
   }
   else
   {
      window.location.replace("NoMenus.htm");
   }
}

*/

var woodMenuItems = new Array();
woodMenuItems[0] = new Array();

woodMenuItems[0][0] = "mk11r";
woodMenuItems[0][1] = "aboutus.php";
woodMenuItems[0][2] = "About us";

woodMenuItems[1] = new Array();
woodMenuItems[1][0] = "mk12l";
woodMenuItems[1][1] = "delivery.php";
woodMenuItems[1][2] = "Delivery";

woodMenuItems[2] = new Array();
woodMenuItems[2][0] = "mk18l";
woodMenuItems[2][1] = "terms.php";
woodMenuItems[2][2] = "Terms";

woodMenuItems[3] = new Array();
woodMenuItems[3][0] = "mk18l";
woodMenuItems[3][1] = "affiliate.php";
woodMenuItems[3][2] = "Affiliates";


function createMenu(menuName, menuItems)
{
   var divHTML = '<DIV ID="' + menuName + 'MenuDiv" CLASS="DivMenu"';
   divHTML = divHTML + ' onmouseout="return hideMenu(this)">';

   var tableHTML = '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1 ID="'
      + menuName + 'Table">';
   var tableRowHTML = "";
   var rowCount;
   var totalNoRows = menuItems.length;
   for (rowCount = 0; rowCount < totalNoRows; rowCount++)
   {
      tableRowHTML = tableRowHTML + '<TR><TD ID="' +
         menuName + menuItems[rowCount][0] +
        '" RollOver RollOut';
      tableRowHTML = tableRowHTML + ' onclick="goPage(\''
         + menuItems[rowCount][1] + '\')"';
      tableRowHTML = tableRowHTML
         + 'CLASS="TDMenu">' + menuItems[rowCount][2]
         + '</TD></TR>';
   }

   return divHTML + tableHTML + tableRowHTML + '</TABLE></DIV>';
}


function showMenu(menuToShow)
{
   var srcElement = event.srcElement;
   var xPos = parseInt(srcElement.offsetLeft);
   var yPos = parseInt(srcElement.offsetTop);

   menuToShow.style.left = xPos;
   menuToShow.style.top = yPos + (srcElement.height) - 3;
}

function hideMenu(menuToHide)
{
   if (event.toElement != menuToHide &&
      menuToHide.contains(event.toElement) == false)
   {
      menuToHide.style.left = -200;
      menuToHide.style.top = -1000;
   }
}

function document_onmouseover()
{
   var srcElement = event.srcElement;

   if (srcElement.tagName == "TD" && typeof(srcElement.RollOver) != "undefined")
   {
      srcElement.style.color = "white";
      srcElement.style.backgroundColor ="#666666";
   }
}

function document_onmouseout()
{
   var srcElement = event.srcElement;
   if (srcElement.tagName == "TD" && typeof(srcElement.RollOut) != "undefined")
   {
      srcElement.style.color = "white";
      srcElement.style.backgroundColor = "#333333";
   }
}

function goPage(src)
{
   window.location.href = src;
}

document.onmouseover = document_onmouseover;
document.onmouseout = document_onmouseout;

