///*****************************************************************************
// Creation of navigation menu
//*****************************************************************************

var mainNavBar, Menu;

mainNavBar = new NavBar(0);
mainNavBar.setSizes(1, 3, 1);
mainNavBar.setColors("#ffffff",
  "#ffffff", "#5DAE2E", "#450061", "#5DAE2E",
  "#000000", "#DFEFD5", "#ffffff", "#777777");
mainNavBar.setFonts("Arial, Helvetica", "plain", "bold", "12px",
  "Arial, Helvetica", "plain", "plain", "12px");

Menu = new NavBarMenu(60, 0);
Menu.addItem(new NavBarMenuItem("Home", "../intro/home.htm"));
mainNavBar.addMenu(Menu);

Menu = new NavBarMenu(140, 0);
Menu.addItem(new NavBarMenuItem("Seminar Details"));
Menu.addItem(new NavBarMenuItem("Boston Program", "../intro/Boston.htm"));
Menu.addItem(new NavBarMenuItem("Philadelphia Program", "../intro/Philadelphia.htm"));
Menu.addItem(new NavBarMenuItem("Speaker bio and company profiles", "../intro/speaker.htm"));
Menu.addItem(new NavBarMenuItem("Supporting Organizations", "../intro/Organizations.htm"));

mainNavBar.addMenu(Menu);

//Menu = new NavBarMenu(130, 0);
//Menu.addItem(new NavBarMenuItem("Registration"));
//Menu.addItem(new NavBarMenuItem("Boston", "../reg/reg_Boston.htm"));
//Menu.addItem(new NavBarMenuItem("Philadelphia", "../reg/reg_Philadelphia.htm"));
//mainNavBar.addMenu(Menu);


Menu = new NavBarMenu(150, 0);
Menu.addItem(new NavBarMenuItem("HK Service Providers", "../service/service.htm"));
mainNavBar.addMenu(Menu);


Menu = new NavBarMenu(140, 0);
Menu.addItem(new NavBarMenuItem("Post Seminar"));
Menu.addItem(new NavBarMenuItem("Presentations and Webcasts", "../post/webcast.htm"));
Menu.addItem(new NavBarMenuItem("Photos <br>(Boston Seminar)", "../post/boston.htm"));
Menu.addItem(new NavBarMenuItem("Photos <br>(Philadelphia Seminar)", "../post/philadelphia.htm"));
Menu.addItem(new NavBarMenuItem("Hong Kong Photos", "http://my.tdctrade.com/photolib/hkidx.asp"));
mainNavBar.addMenu(Menu);


Menu = new NavBarMenu(120, 0);
Menu.addItem(new NavBarMenuItem("Useful Links"));
Menu.addItem(new NavBarMenuItem("Media Reports", "../report/report.htm"));
Menu.addItem(new NavBarMenuItem("Success Stories", "../Stories/Stories.htm"));
Menu.addItem(new NavBarMenuItem("Useful Links", "../Stories/Links.htm"));
mainNavBar.addMenu(Menu);

Menu = new NavBarMenu(85, 0);
Menu.addItem(new NavBarMenuItem("Contact Us", "../contact/contact.htm"));
mainNavBar.addMenu(Menu);


function init() {

  var img,fullWidth;

  mainNavBar.create();

  // Find the position of the embedded image and move bar accordingly, note
  // that we have to adjust for the table's cell padding.
  fullWidth = getWindowWidth() - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
  //mainNavBar.resize(fullWidth);
  mainNavBar.resize(700);
  //mainNavBar.setAlign('center');

  img = getImage("placeholder");
  mainNavBar.moveTo(getImagePageLeft(img) - 2, getImagePageTop(img) - 2);
}

//*****************************************************************************
//  Link to other fair websites in pull down menu
//*****************************************************************************

function GoURL(s, restore) {
	if (s.selectedIndex == 1)
		parent.location.href = document.location;	
	else
		parent.location = s.options[s.selectedIndex].value;
	if (restore) s.selectedIndex=0;
}

//*****************************************************************************
// Make a new window
//*****************************************************************************

function openWindow(url,w,h)
{
    feature = 'scrollbars=1,menubar=0,location=0,toolbar=0,resizable=1,width=' + w + ',height=' + h;
    newWindow = window.open(url, 'HKTDC', feature);
}