function Menu(items) {
	//private properties
	this.type		= 'Menu';
	//public properties
	this.container	= null;
	this.isParent	= true;
	this.menuItems	= items || new MenuItemCollection(this);
}
function MenuItemCollection(owner) {
	//private properties
	this.owner	= owner;
	this.type	= 'MenuItemCollection';
	//public properties
	this.count	= 0;
	//public methods
	this.add	= MenuItemCollection_add;
}
function MenuItemCollection_add(item) {
	var m;
	switch(typeof(item)) {
		case 'string':
			m			= new MenuItem(item);
			m.index		= this.count;
			m.parent 	= this.owner;
			this[this.count] = m;
			this.count++;
			break;
		default:
			m			= item;
			m.index		= this.count;
			m.parent 	= this.owner;
			this[this.count] = m;
			this.count++;
			break;
	}
}
///////////////////////////////////////////////////////////////////////////////////////////

function createMenuID() {
	var v;
	do {
		v = 'id' + Math.random().toString().substr(2, 16);
	}while(document.getElementById(v))
	return v;
}

var explorer = navigator.appVersion.substr((navigator.appVersion.indexOf('MSIE') + 7), 3);
