function getMenuWidth() {
	//main ul of main menu
	var topLevel = new Array();
	//li elements of first level of menu
	var menuItems = new Array();
	//arrays of item number/width values for the sub level menus
	var secLevel =  new Array();
	//used for the class name of current list element to check if it's a parent with submenu
	var cName = new String();
	var itemNum = new String();
	var m = document.getElementById('menuBar');
	if(m.hasChildNodes()) {
		//set class to remove the preset width and set width with javascript also change class to only javascript class - this might need to move outside the function because it's acting screwy, set it "yesJSMenu" if using the class
		m.className=m.className.replace(new RegExp("noJSMenu"), "");
		topLevel = m.getElementsByTagName('ul');
		if(topLevel[0].getAttribute('class') == 'menu') {
			//alert('it is the top level menu div');
			var t = topLevel[0];
			//now get all the li elements and if they have a class of parent use the class item number to set the width of the child ul element
			menuItems = t.getElementsByTagName('li');
			//iterate over each ul element to see if they are parent items
			for (i=0; i<menuItems.length; i++) {
				cName = menuItems[i].getAttribute('class');
				rExp = new RegExp('parent','i');
				if (cName.match(rExp)) {
					//get width of widest sublevel li element in the next first level drop down
						su = menuItems[i].getElementsByTagName('ul');
						for (a=0; a<su.length; a++) {	
							if (su[a].parentNode.getAttribute('class') == menuItems[i].getAttribute('class')) {
								//alert(su[a].childNodes);
								width = 0;
								for (h=0; h<su[a].childNodes.length; h++) {
									w = su[a].childNodes[h].offsetWidth;
									if (w > width) {
										width = w;
									}
								}
							}
							//get width in ems, 16px:1em scale
							width = (width/15.5);
							su[a].style.width = (width.toString()+'em');
							
							/*
							ty = su[a].getProperty('class');
							ty += ' jsTweak';
							su[a].setProperty('class') = ty;
							*/
						}
					/*
					//get item Number
					gc = cName.split(' ');
					for (s=0; s<gc.length; s++) {
						r = new RegExp('item','i')
						if (gc[s].match(r)) {
							//make sure we are on the first level before we store the data
							//if (menuItems[i].parentNode.getAttribute('class') == 'menu') {
								s2 = new Array(gc[s], width);
								secLevel.push(s2);
							//}
						}
					}
					*/
					
				}
			}
			//alert(secLevel[3][0]);
			
		}
	} else {
		return false;
	}
}