var myNavBar = new NavBar(0);
var tempMenu;

myNavBar.setSizes(1, 2, 1);

myNavBar.setColors("#000000", "#ffffff", "#6078b9", "#000000", "#afbbdc", "#808080", "#ffffff", "#000000", "#cccccc");
myNavBar.setFonts("Verdana, Chicago", "plain", "plain", "8pt", "Verdana, Chicago", "plain", "plain", "8pt");
myNavBar.setAlign("left");

tempMenu = new NavBarMenu(40, 120);
tempMenu.addItem(new NavBarMenuItem("<center>目錄</center>", "#")); 
tempMenu.addItem(new NavBarMenuItem("☆回主目錄", "http://www.pans.com.hk/index.html","_blank"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(100, 120);
tempMenu.addItem(new NavBarMenuItem("<center>資訊及價格</center>", "#")); 
tempMenu.addItem(new NavBarMenuItem("☆資訊目錄", "http://www.curtainshop.com.hk/zb5/i-info-index.htm"));
tempMenu.addItem(new NavBarMenuItem("公司介紹", "http://www.curtainshop.com.hk/zb5/M/M-About-us.htm"));
tempMenu.addItem(new NavBarMenuItem("聯絡我們", "http://www.curtainshop.com.hk/zb5/M/Map+Con.htm"));
tempMenu.addItem(new NavBarMenuItem("歡迎查詢", "http://www.curtainshop.com.hk/zb5/M/M-mail.htm"));
tempMenu.addItem(new NavBarMenuItem("選購程序", "http://www.curtainshop.com.hk/zb5/M/M-Pur-Pro.htm"));
tempMenu.addItem(new NavBarMenuItem("選購窗簾注意", "http://www.curtainshop.com.hk/zb5/M/M-WYSK.htm"));
tempMenu.addItem(new NavBarMenuItem("價格詳情", "http://www.curtainshop.com.hk/zb5/M/M-Price.htm"));
tempMenu.addItem(new NavBarMenuItem("對開簾布料用量", "http://www.curtainshop.com.hk/zb5/T/T-matl-drape.htm"));
tempMenu.addItem(new NavBarMenuItem("布料窗簾價格", "http://www.curtainshop.com.hk/zb5/T/T-price-drape.htm"));
tempMenu.addItem(new NavBarMenuItem("羅馬簾布料用量", "http://www.curtainshop.com.hk/zb5/T/T-matl-roman.htm"));
tempMenu.addItem(new NavBarMenuItem("羅馬簾價格", "http://www.curtainshop.com.hk/zb5/T/T-price-roman.htm"));
tempMenu.addItem(new NavBarMenuItem("簾類面積表", "http://www.curtainshop.com.hk/zb5/T/T-area-blind.htm"));
tempMenu.addItem(new NavBarMenuItem("兒童安全-路軌繩", "http://www.curtainshop.com.hk/zb5/M/M-KidSafe.htm"));
tempMenu.addItem(new NavBarMenuItem("如何度呎", "http://www.curtainshop.com.hk/zb5/M/M-htm.htm"));
tempMenu.addItem(new NavBarMenuItem("購物車", "http://www.curtainshop.com.hk/cart/managecart.html"));
tempMenu.addItem(new NavBarMenuItem("☆回主目錄", "http://www.pans.com.hk/index.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(100, 120);
tempMenu.addItem(new NavBarMenuItem("<center>簾類產品</center>", "#"));
tempMenu.addItem(new NavBarMenuItem("☆簾類目錄", "http://www.pans.com.hk/zb5/i-blindex.htm"));
tempMenu.addItem(new NavBarMenuItem("各種簾類簡介", "http://www.curtainshop.com.hk/zb5/i-design-index.htm#about"));
tempMenu.addItem(new NavBarMenuItem("捲簾(德國製造)", "http://www.pans.com.hk/zb5/Brol-SR.htm"));
tempMenu.addItem(new NavBarMenuItem("捲簾(普遍)", "http://www.pans.com.hk/zb5/Brol-MB.htm"));
tempMenu.addItem(new NavBarMenuItem("百葉簾", "http://www.pans.com.hk/zb5/Bven10in-MB.htm"));
tempMenu.addItem(new NavBarMenuItem("木百葉簾(優質)", "http://www.pans.com.hk/zb5/Bwoo10in-ATX.htm"));
tempMenu.addItem(new NavBarMenuItem("木百葉簾(普遍)", "http://www.pans.com.hk/zb5/Bwoo10in-MC-HY.htm"));
tempMenu.addItem(new NavBarMenuItem("垂直簾", "http://www.pans.com.hk/zb5/Bver-MB.htm"));
tempMenu.addItem(new NavBarMenuItem("風琴簾", "http://www.pans.com.hk/zb5/Bhon8-MB.htm"));
tempMenu.addItem(new NavBarMenuItem("雙風琴簾", "http://www.pans.com.hk/zb5/Bhon-double8-NL.htm"));
tempMenu.addItem(new NavBarMenuItem("百摺簾", "http://www.pans.com.hk/zb5/Bple-MB.htm"));
tempMenu.addItem(new NavBarMenuItem("竹簾/木織簾", "http://www.pans.com.hk/zb5/Bbam-MB.htm"));
tempMenu.addItem(new NavBarMenuItem("彩紗簾", "http://www.pans.com.hk/zb5/Brol-MB-sheer.htm"));
tempMenu.addItem(new NavBarMenuItem("柔紗捲簾", "http://www.pans.com.hk/zb5/Bsil-HT.htm"));
tempMenu.addItem(new NavBarMenuItem("天幕簾1", "http://www.curtainshop.com.hk/zb5/J/sky-MB-01.htm"));
tempMenu.addItem(new NavBarMenuItem("天幕簾2", "http://www.curtainshop.com.hk/zb5/J/sky-MB-02.htm"));
tempMenu.addItem(new NavBarMenuItem("電動-捲簾", "http://www.curtainshop.com.hk/zb5/E/EB-rol-01.htm"));
tempMenu.addItem(new NavBarMenuItem("電動-風琴/百摺簾", "http://www.curtainshop.com.hk/zb5/E/EB-ple-hon.htm"));
tempMenu.addItem(new NavBarMenuItem("電動-百葉簾", "http://www.curtainshop.com.hk/zb5/E/EB-vene-01.htm"));
tempMenu.addItem(new NavBarMenuItem("電動-垂直簾", "http://www.curtainshop.com.hk/zb5/E/EB-ver-01.htm"));
tempMenu.addItem(new NavBarMenuItem("☆回主目錄", "http://www.pans.com.hk/index.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(100, 120);
tempMenu.addItem(new NavBarMenuItem("<center>布料產品</center>", "#"));
tempMenu.addItem(new NavBarMenuItem("☆布料總目錄", "http://www.curtainshop.com.hk/zb5/i-fabric-index.htm#fabric"));
tempMenu.addItem(new NavBarMenuItem("布料全面睇", "http://www.curtainshop.com.hk/zb5/F/d/F-d5-pc01.htm#roundtrip"));
tempMenu.addItem(new NavBarMenuItem("布料-經濟-實惠", "http://www.curtainshop.com.hk/zb5/F/F-05-cov-eco.htm"));
tempMenu.addItem(new NavBarMenuItem("布料-普遍-類別", "http://www.curtainshop.com.hk/zb5/F/F-04-cov-ord.htm"));
tempMenu.addItem(new NavBarMenuItem("布料-高等-選擇", "http://www.curtainshop.com.hk/zb5/F/F-03-cov-hi.htm"));
tempMenu.addItem(new NavBarMenuItem("布料-上等-優雅", "http://www.curtainshop.com.hk/zb5/F/F-02-cov-up.htm"));
tempMenu.addItem(new NavBarMenuItem("布料-頭等-品味", "http://www.curtainshop.com.hk/zb5/F/F-01-cov-fir.htm"));
tempMenu.addItem(new NavBarMenuItem("布料類別-織花", "http://www.curtainshop.com.hk/zb5/F/F-00-index-j.htm"));
tempMenu.addItem(new NavBarMenuItem("布料類別-印花", "http://www.curtainshop.com.hk/zb5/F/F-00-index-p.htm"));
tempMenu.addItem(new NavBarMenuItem("布料類別-淨色", "http://www.curtainshop.com.hk/zb5/F/F-00-index-d.htm"));
tempMenu.addItem(new NavBarMenuItem("布料類別-窗紗", "http://www.curtainshop.com.hk/zb5/F/F-00-index-s.htm"));
tempMenu.addItem(new NavBarMenuItem("兒童布料", "http://www.curtainshop.com.hk/zb5/F/F-00-index-k.htm"));
tempMenu.addItem(new NavBarMenuItem("卡通窗簾套裝", "http://www.curtainshop.com.hk/zb5/F/k/F-k4-mickey01.htm"));
tempMenu.addItem(new NavBarMenuItem("遮光布", "http://www.curtainshop.com.hk/zb5/F/z/F-bo-cs-WW.htm"));
tempMenu.addItem(new NavBarMenuItem("布料防火加工", "http://www.curtainshop.com.hk/zb5/M/M-fire-01.htm"));
tempMenu.addItem(new NavBarMenuItem("醫院圍簾", "http://www.curtainshop.com.hk/zb5/C/C-cubicle-01.htm"));
tempMenu.addItem(new NavBarMenuItem("☆回主目錄", "http://www.pans.com.hk/index.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(100, 120);
tempMenu.addItem(new NavBarMenuItem("<center>路軌及配件</center>", "#"));
tempMenu.addItem(new NavBarMenuItem("☆路軌目錄", "http://www.curtainshop.com.hk/zb5/i-rail-index.htm"));
tempMenu.addItem(new NavBarMenuItem("路軌-手拉", "http://www.curtainshop.com.hk/zb5/R/home-hand-01.htm"));
tempMenu.addItem(new NavBarMenuItem("路軌-繩拉", "http://www.curtainshop.com.hk/zb5/R/home-cord-01.htm"));
tempMenu.addItem(new NavBarMenuItem("伸縮路軌", "http://www.curtainshop.com.hk/zb5/R/ext.htm"));
tempMenu.addItem(new NavBarMenuItem("羅馬木通", "http://www.curtainshop.com.hk/zb5/P/wood-HT-01.htm"));
tempMenu.addItem(new NavBarMenuItem("西班牙製木簾桿1", "http://www.curtainshop.com.hk/zb5/P/wood-FG-express-etc.htm"));
tempMenu.addItem(new NavBarMenuItem("西班牙製木簾桿2", "http://www.curtainshop.com.hk/zb5/P/wood-FG-span-class.htm"));
tempMenu.addItem(new NavBarMenuItem("西班牙製木簾桿3", "http://www.curtainshop.com.hk/zb5/P/wood-FG-span-lux.htm"));
tempMenu.addItem(new NavBarMenuItem("注意:羅馬木通安全", "http://www.curtainshop.com.hk/zb5/P/wood-safe.htm"));
tempMenu.addItem(new NavBarMenuItem("西班牙製金屬簾杆", "http://www.curtainshop.com.hk/zb5/P/dec-FG-bola.htm"));
tempMenu.addItem(new NavBarMenuItem("歐洲入口銅製簾杆", "http://www.curtainshop.com.hk/zb5/P/bra-FG-brass.htm"));
tempMenu.addItem(new NavBarMenuItem("伸縮簾通", "http://www.curtainshop.com.hk/zb5/P/ext-FG-mil-excal.htm"));
tempMenu.addItem(new NavBarMenuItem("羅馬通(裝飾) 1", "http://www.curtainshop.com.hk/zb5/P/dec-HT-01.htm"));
tempMenu.addItem(new NavBarMenuItem("羅馬簾路軌", "http://www.curtainshop.com.hk/zb5/R/roman-MB.htm"));
tempMenu.addItem(new NavBarMenuItem("屏風簾路軌", "http://www.curtainshop.com.hk/zb5/R/panel-01.htm"));
tempMenu.addItem(new NavBarMenuItem("簾勾", "http://www.curtainshop.com.hk/zb5/H/hook-ord-WW.htm"));
tempMenu.addItem(new NavBarMenuItem("簾帶", "http://www.curtainshop.com.hk/zb5/H/tassel-first-CS.htm"));
tempMenu.addItem(new NavBarMenuItem("電動路軌產品1", "http://www.curtainshop.com.hk/zb5/E/ER-motor-01.htm"));
tempMenu.addItem(new NavBarMenuItem("電動路軌產品2", "http://www.curtainshop.com.hk/zb5/E/ER-motor-02.htm"));
tempMenu.addItem(new NavBarMenuItem("☆回主目錄", "http://www.pans.com.hk/index.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(100, 120);
tempMenu.addItem(new NavBarMenuItem("<center>設計 款式</center>", "#"));
tempMenu.addItem(new NavBarMenuItem("☆設計目錄", "http://www.curtainshop.com.hk/zb5/i-design-index.htm"));
tempMenu.addItem(new NavBarMenuItem("窗簾 款式", "http://www.curtainshop.com.hk/zb5/S/sew01.htm"));
tempMenu.addItem(new NavBarMenuItem("簾頭 款式1", "http://www.curtainshop.com.hk/zb5/S/style-01.htm"));
tempMenu.addItem(new NavBarMenuItem("簾頭 款式2", "http://www.curtainshop.com.hk/zb5/S/style-02.htm"));
tempMenu.addItem(new NavBarMenuItem("簾頭 款式3", "http://www.curtainshop.com.hk/zb5/S/style-03.htm"));
tempMenu.addItem(new NavBarMenuItem("布窗簾 款式", "http://www.curtainshop.com.hk/zb5/S/fina-drape.htm"));
tempMenu.addItem(new NavBarMenuItem("羅馬簾 款式", "http://www.curtainshop.com.hk/zb5/S/fina-rom1.htm"));
tempMenu.addItem(new NavBarMenuItem("天窗羅馬簾", "http://www.curtainshop.com.hk/zb5/J/sky-roman-fina-01.htm"));
tempMenu.addItem(new NavBarMenuItem("各房間窗簾", "http://www.curtainshop.com.hk/zb5/W/W-apt.htm"));
tempMenu.addItem(new NavBarMenuItem("兒童房間窗簾", "http://www.curtainshop.com.hk/zb5/W/W-kid.htm"));
tempMenu.addItem(new NavBarMenuItem("窗簾縫製標準", "http://www.curtainshop.com.hk/zb5/M/M-Standard.htm"));
tempMenu.addItem(new NavBarMenuItem("路軌安裝標準", "http://www.curtainshop.com.hk/zb5/M/M-Standard.htm#rail"));
tempMenu.addItem(new NavBarMenuItem("床罩款式", "http://www.curtainshop.com.hk/zb5/S/bed-cov-01.htm"));
tempMenu.addItem(new NavBarMenuItem("工程-辦公室", "http://www.curtainshop.com.hk/zb5/S/fina-office.htm"));
tempMenu.addItem(new NavBarMenuItem("工程-學校課室", "http://www.curtainshop.com.hk/zb5/S/fina-sch-class.htm"));
tempMenu.addItem(new NavBarMenuItem("工程-學校禮堂", "http://www.curtainshop.com.hk/zb5/S/fina-sch-hall.htm"));
tempMenu.addItem(new NavBarMenuItem("工程-日式餐廳", "http://www.curtainshop.com.hk/zb5/S/fina-wood.htm"));
tempMenu.addItem(new NavBarMenuItem("工程-片場...", "http://www.curtainshop.com.hk/zb5/S/fina-bamboo.htm"));
tempMenu.addItem(new NavBarMenuItem("布藝梳化 款式", "http://www.curtainshop.com.hk/zb5/U/U-sofa01.htm"));
tempMenu.addItem(new NavBarMenuItem("☆回主目錄", "http://www.pans.com.hk/index.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(100, 120);
tempMenu.addItem(new NavBarMenuItem("<center>品牌 目錄</center>", "#"));
tempMenu.addItem(new NavBarMenuItem("☆品牌目錄", "http://www.curtainshop.com.hk/zb5/i-brand-index.htm"));
tempMenu.addItem(new NavBarMenuItem("Antex木百葉簾", "http://www.pans.com.hk/zb5/B-00-ATX-products.htm"));
tempMenu.addItem(new NavBarMenuItem("米奇窗簾套裝", "http://www.curtainshop.com.hk/zb5/F-k4-mickey01.htm"));
tempMenu.addItem(new NavBarMenuItem("樂庭麗 產品", "http://www.pans.com.hk/zb5/B-00-NL-products.htm"));
tempMenu.addItem(new NavBarMenuItem("萬利 產品", "http://www.pans.com.hk/zb5/B-00-MB-products.htm"));
tempMenu.addItem(new NavBarMenuItem("日美 產品", "http://www.pans.com.hk/zb5/B-00-YM-products.htm"));
tempMenu.addItem(new NavBarMenuItem("青木 產品", "http://www.pans.com.hk/zb5/B-00-GW-products.htm"));
tempMenu.addItem(new NavBarMenuItem("至平價品牌", "http://www.pans.com.hk/zb5/Bven10in-LG.htm#cheap"));
tempMenu.addItem(new NavBarMenuItem("☆回主目錄", "http://www.pans.com.hk/index.html"));
myNavBar.addMenu(tempMenu);

tempMenu = new NavBarMenu(40, 120);
tempMenu.addItem(new NavBarMenuItem("<center>English</center>", "#"));
tempMenu.addItem(new NavBarMenuItem("☆回中文主目錄", "http://www.pans.com.hk/index.html"));
tempMenu.addItem(new NavBarMenuItem("☆English Home Page", "http://www.pans.com.hk/index-en.htm"));
myNavBar.addMenu(tempMenu);

window.onload = init;

function init() {

  myNavBar.resize(getWindowWidth());
  myNavBar.create();
  updatePosition();
}

function updatePosition() {

  var viewTop, viewBottom;
  var dy;

  viewTop = getPageScrollY();
  viewBottom = viewTop + getWindowHeight();

  if (myNavBar.bottom < viewTop)
    myNavBar.moveTo(0, viewTop - myNavBar.height);
  if (myNavBar.top > viewBottom)
    myNavBar.moveTo(0, viewBottom);

  dy = Math.round(Math.abs(viewTop - myNavBar.y) / 2);
  if (viewTop < myNavBar.y)
    dy = -dy;

  myNavBar.moveBy(0, dy);
  setTimeout('updatePosition()', 25);
}