var _topmenu = new Array(
  0,
  "home","index.htm",
  "featured lace","feature.htm",
  "blog","blog/",
  "gallery","zp/",
  "lace to purchase","zc/",
  "lace on ebay","ebay.htm",
  "contact","contact.htm"
);
var _contactmenu = new Array(
  540,
  "about us","about.htm",
  "sign up","mail/?p=subscribe&id=1"
);

var _featuremenu = new Array(
  160,
  "alencon","alencon.htm"
);

function popUp(URL,x,y) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'windowname=0,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + x + ",height=" + y + "');");
}
function Repeat(str, count) {
  while (count-- > 0)
    document.write(str);
}

function GetDocLevel() {
  var doclevel = 0; // directory level relative to the domain root
  var index = 0;    // character index within the path
  var path = location.pathname;
  // IE uses some (but not all) backslashes; replace them
  if (path.charAt(3) == '\\')
    path = path.replace(/\\/g, "/");
  // count the number of slashes in the path (excluding the first)
  while ((index = path.indexOf("/", index+1)) >= 0)
    doclevel++;
  // if it's a file:// then remove /D:/data/PM
  if (doclevel >= 3)
    doclevel -= 3;
  if (doclevel <= 0)
    return '';
  if (doclevel == 2)
    return '../../';
  return '../';
}

function ShowMenu(menu, current) {
  doclevel = GetDocLevel();
  lead = menu[0]
  var width = 805;
  document.write("<table class=\"page\" align=center width=805 cellpadding=0 cellspacing=0 border=0><tr>");
  if (lead)
  {
    document.write("<td width=",
    lead,
    " height=10>&nbsp;</td>");
    width -= lead;
  }
  for (var i = 1; i < menu.length; i += 2)
  {
    if (menu[i] == current)
    {
      document.write("<td class=sel width=114 height=10 align=center valign=top><img src=",
      doclevel,"image/top114x.gif width=114 height=6><br>",
      menu[i],
      "</td>",
      "<td width=1><img src=",
      doclevel,"image/1x1.gif width=1 height=1></td>");
    }
    else
    {
      document.write("<td class=tab width=114 height=10 align=center valign=top><img src=",
      doclevel,"image/top114.gif align=top width=114 height=6><br>",
      "<a class=toplink href=",
      doclevel,menu[i+1],
      ">",
      menu[i],
      "</a></td>",
      "<td width=1><img src=",
      doclevel,"image/1x1.gif width=1 height=1></td>");
    }
    width -= 115;
  }
  if (width > 0)
  {
    document.write("<td width=",
    width,
    " height=10>&nbsp;</td>");
  }
  document.write("</tr></table>");
}

function ShowFoot() {
  document.write("<table align=center border=0 cellspacing=0 cellpadding=10><tr><td class=footer nowrap>Copyright &copy; 2005 Antique and Collectible Linen and Lace &nbsp;All rights reserved.&nbsp;&nbsp;</td></tr></table>");
}

function ShowLogo() {
  doclevel = GetDocLevel();
  document.write("<div class=\"mmlogo\" >",
  "<img src=",
  doclevel,"image/rose.gif alt=\"Logo\" width=\"45\" height=\"45\" align=\"absmiddle\">",
  "<span class=\"title1\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Antique and Collectible Linen and Lace</span>",
  "</div>"
  );
}

function popupZcWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=640,height=480,screenX=150,screenY=150,top=100,left=100')
}
var i=0;
function resizeZc() {
  if (navigator.appName == 'Netscape') i=10;
  if (document.images[0]) {
  imgHeight = document.images[0].height+45-i;
  imgWidth = document.images[0].width+30;
//  var height = screen.height;
//  var width = screen.width;
//  var leftpos = width / 2 - imgWidth / 2;
//  var toppos = height / 2 - imgHeight / 2;
//  window.moveTo(leftpos, toppos);
  window.resizeTo(imgWidth, imgHeight);
  }
  self.focus();
}

