/*
File:			cdw_dropdowndata.js
Author:			Corti Designworks LLC
Use:			AssetWorld Site 
Purpose:	`	Holds the data values for the top horizontal drop down menu.
				Relies on code in cdw_dropdownsrc.js.  
				Note that this has only been tested at a 2 levels deep hierarchy.
Mods:		
*/


// Declare common variables
var menu_items 	= new Array();		/*  An array of menu objects.  
										Each object holds properties controlling one menu item or entry.
										*/
var tempM							= "";
var tempO							= "";
var cdw_totalmenuitems_count 		= -1;	// must be -1
var cdw_topmenu_count				= 0;	// must be 0
var cdw_submenu_count 				= 0;	// must be 0

/*	--------	Function definitions ------------ */
function newTopItemInit(){
	cdw_totalmenuitems_count 				= cdw_totalmenuitems_count + 1;
	cdw_submenu_count 						= 0;
	menu_items[cdw_totalmenuitems_count]	= new Object();
	tempM 									= menu_items[cdw_totalmenuitems_count];
}

function newSubItemInit(){
	cdw_totalmenuitems_count 				= cdw_totalmenuitems_count + 1;
	cdw_submenu_count 						= cdw_submenu_count + 1;
	menu_items[cdw_totalmenuitems_count]	= new Object();
	tempM									= menu_items[cdw_totalmenuitems_count];
}

function newTopItemInitA(){
	cdw_totalmenuitems_count 				= cdw_totalmenuitems_count + 1;
	cdw_submenu_count 						= 0;
}
function newTopItemInitB(){
	tempM 									= menu_items[cdw_totalmenuitems_count];
	tempM.name								= 'Top' + cdw_topmenu_count;
	tempM.parent							= '';
}

function newSubItemInitA(){
	cdw_totalmenuitems_count 				= cdw_totalmenuitems_count + 1;
	cdw_submenu_count 						= cdw_submenu_count + 1;
}

function newSubItemInitB(){
	tempM									= menu_items[cdw_totalmenuitems_count];
	menu_items[cdw_totalmenuitems_count].name		= 'Sub' + cdw_topmenu_count + '-' + cdw_submenu_count;
	menu_items[cdw_totalmenuitems_count].parent		= 'Top' + cdw_topmenu_count;
	// tempM.name								= 'Sub' + cdw_topmenu_count + '-' + cdw_submenu_count;
	// tempM.parent							= 'Top' + cdw_topmenu_count;
}

function makeMenuEntry()  {  // 
	/* purpose:		wrapper on oCMenu.makeMenu() to allow for more maintainable
					menu data through object naming
	*/
	oCMenu.makeMenu(this.name, this.parent, this.text, this.link, this.target, this.width, this.height, this.img1, this.img2, this.bgcoloroff, this.bgcoloron, this.textcolor, this.hovercolor, this.onclick, this.onmouseover, this.onmouseout);
}

/*  Test and Guideline Data, using menu object parameters
	samples use text for menu values, use of images will require testing
	these values (e.g. for textcolor) override defaults set in dropdownsrc.js
	(e.g. oCMenu.level[0].textcolor='#cccccc')

	menu_items[0]	= new Object();
	tempM			= menu_items[0];
		tempM.make			= makeMenuEntry;	// only valid value
		tempM.name			= 'Top1';			// html name of this div area
		tempM.parent		= '';				// html name of parent div area (if there is one)
		tempM.text			= CenterNS('First top item','108'); 	// opt: CenterNS(title,width)
		tempM.link			= './top1-page.html';					// HREF of link
		tempM.target		= '';									// if there is an in-page target
		tempM.width			= '108';			// menu entry display width
		tempM.height		= '20';				// menu entry display height
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '#666666';		// color of text
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="top1-page";';
		tempM.onmouseout	= 'status="";';


	menu_items[1]	= new Object();
	tempM			= menu_items[1];
		tempM.make			= makeMenuEntry;
		tempM.name			= 'Sub1-1';
		tempM.parent		= 'Top1';
		tempM.text			= 'First sub menu entry';
		tempM.link			= './sub1-1-page.html';
		tempM.target		= '';
		tempM.width			= '130';
		tempM.height		= '20';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="sub1-1-page";';
		tempM.onmouseout	= 'status="";';

		
	menu_items[2]	= new Object();
	tempM			= menu_items[2];
		tempM.make			= makeMenuEntry;
		tempM.name			= 'Sub1-2';
		tempM.parent		= 'Top1';
		tempM.text			= 'Second sub menu entry';
		tempM.link			= './sub1-2-page.html';
		tempM.target		= '';
		tempM.width			= '130';
		tempM.height		= '20';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="sub1-2-page";';
		tempM.onmouseout	= 'status="";';

	Alternate Test data - using literal parameters
 	note that the "cm_makeMenu" function in src performs oCMenu.makeMenu

oCMenu.makeMenu('Top1','',CenterNS('First top item','108'),'./top1-page.html','','108','20','','','','','#666666','','','status="top1-page";','status="";');

 oCMenu.makeMenu('Sub1-1','Top1','First sub menu entry',"./sub1-1-page.html",'','130','20','','','','','','','','status="sub1-1-page";','status="";');

 oCMenu.makeMenu('Sub1-2','Top1',"'Second sub menu entry","./sub1-2-page.html",'','130','20','','','','','','','','status="sub1-2-page";','status="";'); 
*/

/************* BEGIN Menu data section - edit for menu updates ******************************************
	
Editing guidelines:
1. 	The "tempM.link" property, page URL names MUST have "./" in front of it,
    OR this script will FAIL
*/


   // -----------------------
   // ----- top menu 1 ------
   // -----------------------
newTopItemInit()
		tempM.make			= makeMenuEntry;
		tempM.name			= 'Top1';
		tempM.parent		= '';
		tempM.text			= 'Home';
		tempM.link			= oCDW_pagestate.maximusserver_prefix + '../pages/home' + oCDW_pagestate.extname;
		tempM.target		= '';
		tempM.width			= '';
		tempM.height		= '';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="Home";';
		tempM.onmouseout	= 'status="";';


   // -----------------------
   // ----- top menu 2 ------
   // -----------------------
// newTopItemInitA(); menu_items[cdw_totalmenuitems_count]	= new Object(); newTopItemInitB();
newTopItemInit()
var sWidthSub2	= '160';
		tempM.make			= makeMenuEntry;
		/*  */
		tempM.name			= 'Top2';
		tempM.parent		= '';
		 
		tempM.text			= 'Registration'; 
		tempM.link			= oCDW_pagestate.maximusserver_prefix + '../pages/registration' + oCDW_pagestate.extname;
		tempM.target		= '';
		tempM.width			= '';
		tempM.height		= '';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="Registration";';
		tempM.onmouseout	= 'status="";';


		
   // -----------------------
   // ----- top menu 3 ------
   // -----------------------
newTopItemInit()
var sWidthSub3	= '160';
		tempM.make			= makeMenuEntry;
		tempM.name			= 'Top3';
		tempM.parent		= '';
		tempM.text			= 'Agenda';
//		tempM.link			= oCDW_pagestate.maximusserver_prefix + 'agenda' + oCDW_pagestate.extname;
		tempM.target		= '';
		tempM.width			= '';
		tempM.height		= '';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="Agenda";';
		tempM.onmouseout	= 'status="";';

newSubItemInit()
		tempM.make			= makeMenuEntry;
		tempM.name			= 'Sub3-1'; + cdw_submenu_count;
		tempM.parent		= 'Top3';
		tempM.text			= 'Conference Agenda';
		tempM.link			= oCDW_pagestate.maximusserver_prefix + '../pages/agenda' + oCDW_pagestate.extname;
		tempM.target		= '';
		tempM.width			= sWidthSub3;
		tempM.height		= '';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="Conference Agenda";';
		tempM.onmouseout	= 'status="";';		
		
	
		
	// -----------------------
   // ----- top menu 4 ------
   // -----------------------
newTopItemInit()
var sWidthSub4	= '200';
		tempM.make			= makeMenuEntry;
		tempM.name			= 'Top4';
		tempM.parent		= '';
		tempM.text			= 'Discover Albuquerque'; 
		tempM.link			= oCDW_pagestate.maximusserver_prefix + '../pages/touristinfo' + oCDW_pagestate.extname;
		tempM.target		= '';
		tempM.width			= '';
		tempM.height		= '';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="Tourist Info";';
		tempM.onmouseout	= 'status="";';

   // -----------------------
   // ----- top menu 5 ------
   // -----------------------
   

newTopItemInit()
var sWidthSub5	= '150';
		tempM.make			= makeMenuEntry;
		tempM.name			= 'Top5';
		tempM.parent		= '';
		tempM.text			= 'Pictures'; 
		tempM.link			= oCDW_pagestate.maximusserver_prefix + '../pages/photos' + oCDW_pagestate.extname;
		tempM.target		= '';
		tempM.width			= '';
		tempM.height		= '';
		tempM.img1			= '';
		tempM.img2			= '';
		tempM.bgcoloroff	= '';
		tempM.bgcoloron		= '';
		tempM.textcolor		= '';
		tempM.hovercolor	= '';
		tempM.onclick		= '';
		tempM.onmouseover	= 'status="Pictures";';
		tempM.onmouseout	= 'status="";';
	

		
		
/********************  END Menu data section ***********************************/


