/*
  ------------------------------------------------------------------------------
   MENU DEFINITIONS for the Gateway Public Site
    g.mcleod 2005.10.24 
      2005.10.24 - Alpha release, subject to client review.  Most items not linked
      2005.11.01 - Minor menu text edits and addition of items
                 - menu entries linked to actual files -- more links to happen
                 - still subject to client acceptance.
      2005.11.25 - Various major and minor edits for appearance over several days.
                 - InfoCenter link disconnected from root as no longer needed.
  ------------------------------------------------------------------------------ 
*/

var thisRoot = "/gateway/";   // hack to make moving site easier -- may be able to improve this by detecting root

var defWidth = 162;
//162;  // default width (width of root menu) to base other widths and offsets on

// STYLES
   // style used for root menu
var myStyle = new ItemStyle(20, 1, '<img src="' + thisRoot + 'images/bullet_transparent.gif">', -7, 3, '30#FFE3AA', '30#FFCC66', 'mylowText', 'myhighText', null, null, null, null, 'hand', 'default');
// style used for sub-menus
var subMenuStyle = new ItemStyle(20, 0, '<img src="' + thisRoot + 'images/bullet_transparent.gif">', -15, 3, '30#FFE3AA', '30#FFCC66', 'sublowText', 'subhighText', null, null, null, null, 'hand', 'default'); 

var subMenuStyle_disabled = new ItemStyle(20, 0, '<img src="' + thisRoot + 'images/bullet_transparent.gif">', -15, 3, '30#FFE3AA', '30#FFCC66', 'sublowText_disabled', 'subhighText_disabled', null, null, null, null, 'hand', 'default'); 


var pMenu = new PopupMenu('pMenu');

function Data() {
with (pMenu) {

// ROOT menu

startMenu('root', true, 'window.page.elmPos("menuarea").x+16', 'window.page.elmPos("menuarea").y+10', defWidth, myStyle, '', false);
addItem('Home&nbsp;&nbsp;&nbsp;&nbsp;', thisRoot + 'index.htm', '', myStyle, 20);
addItem('Program Overview&nbsp;&nbsp;&nbsp;', 'mGateway', 'sm:', myStyle, 20);
addItem('Media&nbsp;&nbsp;&nbsp;', 'mMedia', 'sm:', myStyle, 20);
addItem('Gateway Transit&nbsp;&nbsp;&nbsp;', thisRoot + 'transit/transit.htm', '', myStyle, 20);
addItem('Port Mann / Highway 1&nbsp;&nbsp;&nbsp;', '', '', myStyle, 20);
// addItem('Port Mann / Highway 1&nbsp;&nbsp;&nbsp;', 'mPortMann', 'sm:', myStyle, 20);
addItem('South Fraser&nbsp;&nbsp;&nbsp;<br>Perimeter Road&nbsp;&nbsp;&nbsp;', 'mSouthFraser', 'sm:', myStyle, 35);
addItem('Pitt River Bridge and&nbsp;&nbsp;&nbsp;<br>Mary Hill Interchange&nbsp;&nbsp;&nbsp;', 'mPittRiver', 'sm:', myStyle, 35);
addItem('North Fraser&nbsp;&nbsp;&nbsp;<br>Perimeter Road&nbsp;&nbsp;&nbsp;', 'mNorthFraser', 'sm:', myStyle, 35);
addItem('Related Links&nbsp;&nbsp;&nbsp;&nbsp;', thisRoot + 'links.htm', '', myStyle, 20);
addItem('Contact&nbsp;&nbsp;&nbsp;', thisRoot + '8_contact.htm', '', myStyle, 20);


  // Program Overview Sub-Menu
  startMenu('mGateway', true, defWidth, 0, defWidth, subBlank, '', false);
  addItem('Program Description', thisRoot + '1_program.htm', '', subMenuStyle);
  addItem('Why Now?', thisRoot + 'program/why_now.htm', '', subMenuStyle);
  addItem('Property Acquisition&nbsp;&nbsp;&nbsp;&nbsp;', 'mPropertyAcquisition', 'sm:', subMenuStyle);
  addItem('Community Consultation&nbsp;&nbsp;&nbsp;', thisRoot + '6_communityconsultation.htm', '', subMenuStyle);


    //	Gateway -> Property Acquisition Sub-Menu
    startMenu('mPropertyAcquisition', true, defWidth, 0, defWidth, subBlank, '', false);
    addItem('Property Acquisition', thisRoot + 'property_acquisition/property_acquisition.htm', '', subMenuStyle);
    addItem('Property Acquisition FAQs', thisRoot + 'property_acquisition/prop_acq_faq.htm', '', subMenuStyle);

  // Media Sub-Menu
  startMenu('mMedia', true, defWidth, 0, defWidth-35, subBlank, '', false);
  addItem('Fact Sheets', thisRoot + 'factsheets.htm', '', subMenuStyle);
  addItem('Gateway Program&nbsp;&nbsp;<br />&nbsp;&nbsp;FAQs&nbsp;&nbsp;&nbsp;&nbsp;', thisRoot + 'info_centre/FAQs.htm', '', subMenuStyle, 35);
  addItem('Project Media&nbsp;&nbsp;<br />&nbsp;&nbsp;Rooms&nbsp;&nbsp;&nbsp;', thisRoot + 'info_centre/media_rooms.htm', '', subMenuStyle, 35);
  addItem('Multimedia&nbsp;&nbsp;&nbsp;&nbsp;', 'mMultimedia', 'sm:', subMenuStyle);
  addItem('Reports&nbsp;&nbsp;&nbsp;&nbsp;', thisRoot + 'reports.htm', '', subMenuStyle);

    // Media -> Multimedia Sub-Menu
    startMenu('mMultimedia', true, defWidth-50, 0, defWidth-50, subBlank, '', false);
    addItem('Photo Galleries', thisRoot + 'info_centre/photogallery.htm', '', subMenuStyle);
    addItem('Video', thisRoot + 'info_centre/multimedia.htm', '', subMenuStyle);
    addItem('Presentations', thisRoot + 'info_centre/ppoint_presntns.htm', '', subMenuStyle);


	// Port Mann/Hwy1 Sub-Menu
	startMenu('mPortMann', true, defWidth, 0, defWidth+10, subBlank, '', false);
	addItem('Project Description', thisRoot + 'PMH1/PMH1.htm', '', subMenuStyle);
	addItem('Project Schedule', thisRoot + 'PMH1/schedule.htm', '', subMenuStyle);
	addItem('Traffic and Marine Updates', 'mPMH1TrafficMarrine', 'sm:', subMenuStyle);
	addItem('Construction Notifications', thisRoot + 'PMH1/construction_schedule.htm', '', subMenuStyle);
	addItem('Community Consultation', thisRoot + 'PMH1/consultation.htm', '', subMenuStyle);
	addItem('Environmental Assessment', thisRoot + 'PMH1/env_assessment.htm', '', subMenuStyle);
	addItem('Contractor Selection', thisRoot + 'PMH1/contrctr_select.htm', '', subMenuStyle);
	addItem('Information Centre&nbsp;&nbsp;&nbsp;', 'mPMH1InformationCentre', 'sm:', subMenuStyle);
	
		// PMH1 -> Traffic and Marine Sub menu
		startMenu('mPMH1TrafficMarrine', true, defWidth, 0, defWidth, subBlank, '', false);
		addItem('Traffic Updates', thisRoot + 'PMH1/traffic_updates.htm', '', subMenuStyle);
		addItem('Marine Updates', thisRoot + 'PMH1/marine_updates/marine_updates.htm', '', subMenuStyle);

		// PMH1 -> Info Centre Sub Menu
		startMenu('mPMH1InformationCentre', true, defWidth, 0, defWidth, subBlank, '', false);
		addItem('Reports', thisRoot + 'PMH1/reports.htm', '', subMenuStyle);
		addItem('Community Relations', thisRoot + 'PMH1/commnty_rltns.htm', '', subMenuStyle);
		addItem('Photo Gallery', thisRoot + 'PMH1/photo_gallery.htm', '', subMenuStyle);
		addItem('PMH1 Media Room', thisRoot + 'PMH1/media.htm', '', subMenuStyle);
		addItem('PMH1 FAQs', thisRoot + 'PMH1/faqs.htm', '', subMenuStyle);


	// South Fraser  Sub-Menu
	startMenu('mSouthFraser', true, defWidth, 0, defWidth+5, subBlank, '', false);
	addItem('Project Description', thisRoot + 'SFPR/sfpr.htm', '', subMenuStyle);
	addItem('Project Schedule', thisRoot + 'SFPR/schedule.htm', '', subMenuStyle);
	addItem('Community Consultation', thisRoot + 'SFPR/consultation.htm', '', subMenuStyle);
	addItem('Traffic Management<br>Consultation ', thisRoot + 'SFPR/stakeholder_feedback.htm', '', subMenuStyle, 35);
	addItem('Traffic Updates ', thisRoot + 'SFPR/traffic_updates/traffic_updates.htm', '', subMenuStyle);
	addItem('Construction Notifications ', thisRoot + 'SFPR/traffic_updates/construction.htm', '', subMenuStyle);
	addItem('Environmental Commitments', thisRoot + 'SFPR/env_commitments.htm', '', subMenuStyle);
	addItem('Contractor Selection', thisRoot + 'SFPR/contrctr_select.htm', '', subMenuStyle);
	addItem('Information Centre&nbsp;&nbsp;&nbsp;', 'mSFPRInformationCentre', 'sm:', subMenuStyle);
	
		// SFPR -> Info Centre Sub Menu
		startMenu('mSFPRInformationCentre', true, defWidth, 0, defWidth, subBlank, '', false);
		addItem('Reports', thisRoot + 'SFPR/reports.htm', '', subMenuStyle);
		addItem('Community Relations', thisRoot + 'SFPR/commnty_rltns.htm', '', subMenuStyle);
		addItem('Photo Gallery', thisRoot + 'SFPR/photo_gallery.htm', '', subMenuStyle);
		addItem('SFPR Media Room', thisRoot + 'SFPR/media.htm', '', subMenuStyle);
		addItem('SFPR FAQs', thisRoot + 'SFPR/faqs.htm', '', subMenuStyle);


	// Pitt River Sub-Menu
	startMenu('mPittRiver', true, defWidth, 0, defWidth, subBlank, '', false);
	addItem('Project Description', thisRoot + 'prb-maryhill/prb.htm', '', subMenuStyle);
	addItem('Project Schedule', thisRoot + 'prb-maryhill/schedule.htm', '', subMenuStyle);
	addItem('Traffic and Marine Updates', thisRoot + 'prb-maryhill/traffic_marine.htm', '', subMenuStyle);
	addItem('Construction Schedule', thisRoot + 'prb-maryhill/construction_sched.htm', '', subMenuStyle);
	addItem('Construction Cameras', thisRoot + 'prb-maryhill/construction_cams.htm', '', subMenuStyle);
	addItem('Consultation', thisRoot + 'prb-maryhill/consultation.htm', '', subMenuStyle);
	addItem('Environmental Assessment', thisRoot + 'prb-maryhill/environment_assessmnt.htm', '', subMenuStyle);
	addItem('Contractor Selection', thisRoot + 'prb-maryhill/contractor.htm', '', subMenuStyle);
	addItem('Information Centre&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'PR_InfoCentre', 'sm:', subMenuStyle);
	
		// PRB -> Info Centre sub-menu
		startMenu('PR_InfoCentre', true, defWidth, 0, defWidth-25, subBlank, '', false);
		addItem('Reports', thisRoot + 'prb-maryhill/reports.htm', '', subMenuStyle);
		addItem('Community Relations', thisRoot + 'prb-maryhill/commnty_rltns.htm', '', subMenuStyle);
		addItem('Photo Gallery', thisRoot + 'prb-maryhill/photo_gallery.htm','', subMenuStyle);
		addItem('PRB Media Room', thisRoot + 'prb-maryhill/media.htm', '', subMenuStyle);
		addItem('PRB FAQs', thisRoot + 'prb-maryhill/faqs.htm', '', subMenuStyle);
	
	// North Fraser Sub-Menu
	startMenu('mNorthFraser', true, defWidth, 0, defWidth, subBlank, '', false);
	addItem('Project Description', thisRoot + 'NFPR/NFPR.htm', '', subMenuStyle);
	addItem('Project Schedule', thisRoot + 'NFPR/project_schedule.htm', '', subMenuStyle);


}

// The following is code to add onclick events to any menu item
pMenu.onclick = function(mN, iN) { 
   with (this) {
       // Do actions depending on the item that the mouse was over at the time of the click.
       // You may wish to use nested IFs or 'switch' statements etc. if you're familiar with JS.
       if (mN == 'root')
       {
         // if (iN == 2) location.href = thisRoot + '1_program.htm';
         if (iN == 5) //location.href = thisRoot + 'PMH1/PMH1.htm';
					window.open('http://www.pmh1project.com/');
         if (iN == 6) location.href = thisRoot + 'SFPR/sfpr.htm';
         if (iN == 7) location.href = thisRoot + 'prb-maryhill/prb.htm';
         if (iN == 8) location.href = thisRoot + 'NFPR/NFPR.htm';
         //  if (iN == 8) location.href = nowhere from here;     //ALREADY LINKED in root
         //  if (iN == 9) location.href = thisRoot + '7_infocentre.htm'; // no longer any need for this link / 25.11.2005
        
       }
   }
}
}
