// Author: Kevin Kelley
// Menu Object - Array of MenuItems//
// Used for Main Menus or Sub Menus //
function Menu() {
    // init - Creates array to hold menu items
    this.tMenu = new Array();
    // methods
    this.add = addMenuItem;
    this.get = getMenuItem;
    this.size = getSize;
}
function getSize() {
    return this.tMenu.length;
}
function addMenuItem(name,text,url,width,target,submenu) {
    this.tMenu[this.tMenu.length] = new MenuItem(name,text,url,width,target,submenu);
}
function getMenuItem(index) {
    return this.tMenu[index];
}
// MenuItem Object - Contains Properties of a Menu Item //
function MenuItem(name,text,url,width,target,submenu) {
    // properties
    this.hasSubMenu = false;
    this.SubMenu = null;
    this.text = text;
    this.name = name;
    this.url = url;
    this.width = width;
    this.target = (target=="") ? "_self" : target;
    // methods
    
    // init()
    if(submenu!=null) {
	this.SubMenu = submenu;
	this.hasSubMenu = true;
    }
}

