JMenu createColorMenu(boolean popup) {

		JMenu menu;
		JMenu subMenu;

		if (popup) {
			colorMenu2 = new JMenu("Color");
			menu = colorMenu2;
			atomColorMenu2 = new JMenu("Atoms");
			subMenu = atomColorMenu2;
		}
		else {
			colorMenu1 = new JMenu("Color");
			menu = colorMenu1;
			atomColorMenu1 = new JMenu("Atoms");
			subMenu = atomColorMenu1;
		}

		String s = getInternationalText("Color");
		if (s != null)
			menu.setText(s);

		s = getInternationalText("Atom");
		if (s != null)
			subMenu.setText(s);

		menu.add(subMenu);

		/* color atoms */

		ButtonGroup bg = new ButtonGroup();

		s = getInternationalText("ByElement");
		JMenuItem menuItem = new JRadioButtonMenuItem(s != null ? s : "By Element");
		menuItem.setSelected(true);
		menuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				jmolContainer.setAtomColoring(JmolContainer.COLOR_ATOM_BY_ELEMENT);
				jmolContainer.notifyChange();
			}
		});
		subMenu.add(menuItem);
		bg.add(menuItem);

		s = getInternationalText("ByAminoAcid");
		menuItem = new JRadioButtonMenuItem(s != null ? s : "By Amino Acid");
		menuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				jmolContainer.setAtomColoring(JmolContainer.COLOR_ATOM_BY_AMINO_ACID);
				jmolContainer.notifyChange();
			}
		});
		subMenu.add(menuItem);
		bg.add(menuItem);

		s = getInternationalText("BySecondaryStructure");
		menuItem = new JRadioButtonMenuItem(s != null ? s : "By Secondary Structure");
		menuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				jmolContainer.setAtomColoring(JmolContainer.COLOR_ATOM_BY_STRUCTURE);
				jmolContainer.notifyChange();
			}
		});
		subMenu.add(menuItem);
		bg.add(menuItem);

		s = getInternationalText("ByChain");
		menuItem = new JRadioButtonMenuItem(s != null ? s : "By Chain");
		menuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				jmolContainer.setAtomColoring(JmolContainer.COLOR_ATOM_BY_CHAIN);
				jmolContainer.notifyChange();
			}
		});
		subMenu.add(menuItem);
		bg.add(menuItem);

		s = getInternationalText("ByFormalCharge");
		menuItem = new JRadioButtonMenuItem(s != null ? s : "By Formal Charge");
		menuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				jmolContainer.setAtomColoring(JmolContainer.COLOR_ATOM_BY_FORMAL_CHARGE);
				jmolContainer.notifyChange();
			}
		});
		subMenu.add(menuItem);
		bg.add(menuItem);

		s = getInternationalText("ByPartialCharge");
		menuItem = new JRadioButtonMenuItem(s != null ? s : "By Partial Charge");
		menuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				jmolContainer.setAtomColoring(JmolContainer.COLOR_ATOM_BY_PARTIAL_CHARGE);
				jmolContainer.notifyChange();
			}
		});
		subMenu.add(menuItem);
		bg.add(menuItem);

		atomSingleColorMenuItem = new JRadioButtonMenuItem();
		bg.add(atomSingleColorMenuItem);

		/* color bonds */

		if (popup) {
			bondColorMenu2 = new JMenu("Bonds");
			menu.add(bondColorMenu2);
			subMenu = bondColorMenu2;
		}
		else {
			bondColorMenu1 = new JMenu("Bonds");
			menu.add(bondColorMenu1);
			subMenu = bondColorMenu1;
		}

		s = getInternationalText("Bond");
		if (s != null)
			subMenu.setText(s);

		s = getInternationalText("BondColorInherit");
		bondColorInheritMenuItem = new JCheckBoxMenuItem(s != null ? s : "Inherit");
		bondColorInheritMenuItem.setSelected(true);
		bondColorInheritMenuItem.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				if (e.getStateChange() == ItemEvent.SELECTED)
					jmolContainer.jmol.viewer.runScriptImmediatelyWithoutThread("color bonds none;");
			}
		});
		subMenu.add(bondColorInheritMenuItem);

		/* color hbonds */

		if (popup) {
			hbondColorMenu2 = new JMenu("Hydrogen Bonds");
			menu.add(hbondColorMenu2);
			subMenu = hbondColorMenu2;
		}
		else {
			hbondColorMenu1 = new JMenu("Hydrogen Bonds");
			menu.add(hbondColorMenu1);
			subMenu = hbondColorMenu1;
		}

		s = getInternationalText("HydrogenBond");
		if (s != null)
			subMenu.setText(s);

		s = getInternationalText("HydrogenBondColorInherit");
		hbondColorInheritMenuItem = new JCheckBoxMenuItem(s != null ? s : "Inherit");
		hbondColorInheritMenuItem.setSelected(true);
		hbondColorInheritMenuItem.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				if (e.getStateChange() == ItemEvent.SELECTED)
					jmolContainer.jmol.viewer.runScriptImmediatelyWithoutThread("color hbonds none;");
			}
		});
		subMenu.add(hbondColorInheritMenuItem);

		/* color ssbonds */

		if (popup) {
			ssbondColorMenu2 = new JMenu("Disulfide Bonds");
			menu.add(ssbondColorMenu2);
			subMenu = ssbondColorMenu2;
		}
		else {
			ssbondColorMenu1 = new JMenu("Disulfide Bonds");
			menu.add(ssbondColorMenu1);
			subMenu = ssbondColorMenu1;
		}

		s = getInternationalText("SSBond");
		if (s != null)
			subMenu.setText(s);

		s = getInternationalText("SSBondColorInherit");
		ssbondColorInheritMenuItem = new JCheckBoxMenuItem(s != null ? s : "Inherit");
		ssbondColorInheritMenuItem.setSelected(true);
		ssbondColorInheritMenuItem.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				if (e.getStateChange() == ItemEvent.SELECTED)
					jmolContainer.jmol.viewer.runScriptImmediatelyWithoutThread("color ssbonds none;");
			}
		});
		subMenu.add(ssbondColorInheritMenuItem);

		return menu;

	}