/* Menu Scripting for Gregory J. Rheams site
The Menu object is created with with the following parameters:
Menu
	(	label,							//A text label to identify the parent menu
		menuWidth, 				//Width of the menu in pixels (integer)
		menuItemHeight, 			//Height of the menu in pixels (interger)
		fontFamily, 					//Font to use for the menu text (font families)
		fontSize, 						//Font size (integer)
		fontColor, 					//Font color in hex (string)
		fontColorHilite, 				//Font color in hex (string)
		menuItemBgColor, 		//Font color in hex (string)
		menuHiliteBgColor, 		//Font color in hex (string)
		menuItemHAlign, 			//Menu text alignment, like 'left' or 'middle' (string)
		menuItemVAlign, 			//Menu text alignment, like 'bottom' or 'middle' (string)
		menuItemPadding, 		//size in pixels (integer)
		menuItemSpacing, 		//size in pixels (integer)
		hideTimeout, 				//How long to wait to hide after mouseout (integer)
		submenuXOffset, 			//Horizontal offset for submenu in pixels (integer)
		submenuYOffset, 			//Vertical offset for submenu in pixels (integer)
		submenuRelativeToItem,	//Position submenu relative to item? (boolean)
		menuBgOpaque, 			//Opaque menu background? (boolean)
		vertical, 						//Menu laid out vertically? (boolean)
		menuItemIndent, 			//how much to indent the items (integer)
		aw, 							//Unused (boolean)
		ah)							//Unused (boolean)
*/

// These are constants used to define the parameters for menu items.
menu_FontFamily = 'verdana, sans-serif';
menu_FontSize = 10;
menu_FontColor = '#000000';
menu_FontColorHilite = '#000000';
menu_ItemBgColor = 'white';
menu_HiliteBgColor = 'dddddd';
menu_Timeout = 500;
menu_yoffset = 110;
menu_LiteBgColor = 'white';
menu_BorderBgColor = '#999999';
menu_BgColor = 'ffcc00';
menu_xoffset = 0;



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function mmLoadMenus() {
	if (window.mm_menu_ggr0) return;
	
	window.mm_menu_ggr0 = new Menu("root",200,18,menu_FontFamily,menu_FontSize,menu_FontColor,menu_FontColorHilite,menu_ItemBgColor,menu_HiliteBgColor,"left","middle",3,0,menu_Timeout,0,0,true,true,true,0,true,true);
	mm_menu_ggr0.addMenuItem("Who Are We?","location='about_who.html'");
	mm_menu_ggr0.addMenuItem("Our Vision","location='about_vision.html'");
	mm_menu_ggr0.addMenuItem("Our Mission","location='about_mission.html'");
	mm_menu_ggr0.addMenuItem("Program Areas","location='about_program.html'");
	mm_menu_ggr0.addMenuItem("Advocating for the Information Poor","location='about_advocating.html'");
	mm_menu_ggr0.addMenuItem("Organization and Staff","location='about_organization.html'");
	mm_menu_ggr0.addMenuItem("A Brief History About CTC","location='about_history.html'");
	mm_menu_ggr0.addMenuItem("Celebrating the 5th Anniversary","location='about_anniversary.html'");
	mm_menu_ggr0.fontWeight="normal";
	mm_menu_ggr0.hideOnMouseOut=true;
	mm_menu_ggr0.menuBorder=0;
	mm_menu_ggr0.menuLiteBgColor=menu_LiteBgColor;
	mm_menu_ggr0.menuBorderBgColor=menu_BorderBgColor;
	mm_menu_ggr0.bgColor=menu_BgColor;


	
	window.mm_menu_ggr1 = new Menu("root",225,18,menu_FontFamily,menu_FontSize,menu_FontColor,menu_FontColorHilite,menu_ItemBgColor,menu_HiliteBgColor,"left","middle",3,0,menu_Timeout,0,0,true,true,true,0,true,true);
	mm_menu_ggr1.addMenuItem("How to Contact CTC","location='contact_ctc.html'");
	mm_menu_ggr1.addMenuItem("Webmaster (email)","location='mailto:info@ctcglobal.net'");
	mm_menu_ggr1.addMenuItem("How to Contribute","location='contact_contribute.html'");
	mm_menu_ggr1.addMenuItem("Corporate Funding and Donation Policy","location='contact_donation.html'");
	mm_menu_ggr1.fontWeight="normal";
	mm_menu_ggr1.hideOnMouseOut=true;
	mm_menu_ggr1.menuBorder=0;
	mm_menu_ggr1.menuLiteBgColor=menu_LiteBgColor;
	mm_menu_ggr1.menuBorderBgColor=menu_BorderBgColor;
	mm_menu_ggr1.bgColor=menu_BgColor;
	
	
	window.mm_menu_ggr3 = new Menu("root",200,18,menu_FontFamily,menu_FontSize,menu_FontColor,menu_FontColorHilite,menu_ItemBgColor,menu_HiliteBgColor,"left","middle",3,0,menu_Timeout,0,0,true,true,true,0,true,true);
	mm_menu_ggr3.addMenuItem("eWaste Recycling Project","location='projects_ewaste.html'");
	mm_menu_ggr3.addMenuItem("Closing the Digital Divide","location='projects_divide.html'");
	mm_menu_ggr3.fontWeight="normal";
	mm_menu_ggr3.hideOnMouseOut=true;
	mm_menu_ggr3.menuBorder=0;
	mm_menu_ggr3.menuLiteBgColor=menu_LiteBgColor;
	mm_menu_ggr3.menuBorderBgColor=menu_BorderBgColor;
	mm_menu_ggr3.bgColor=menu_BgColor;
		
	window.mm_menu_ggr4 = new Menu("root",200,18,menu_FontFamily,menu_FontSize,menu_FontColor,menu_FontColorHilite,menu_ItemBgColor,menu_HiliteBgColor,"left","middle",3,0,menu_Timeout,0,0,true,true,true,0,true,true);
	mm_menu_ggr4.addMenuItem("Philippines","location='network_philippines.html'");
	mm_menu_ggr4.addMenuItem("Paraguay","location='network_paraguay.html'");
	mm_menu_ggr4.addMenuItem("Ethiopia","location='network_ethiopia.html'");
	mm_menu_ggr4.addMenuItem("Kenya","location='network_kenya.html'");
	mm_menu_ggr4.addMenuItem("Mozambique","location='network_mozambique.html'");
	mm_menu_ggr4.fontWeight="normal";
	mm_menu_ggr4.hideOnMouseOut=true;
	mm_menu_ggr4.menuBorder=0;
	mm_menu_ggr4.menuLiteBgColor=menu_LiteBgColor;
	mm_menu_ggr4.menuBorderBgColor=menu_BorderBgColor;
	mm_menu_ggr4.bgColor=menu_BgColor;

	mm_menu_ggr4.writeMenus();
}