private void setObstacleField(String str1, String str2, boolean x) {
		if (!(model instanceof MolecularModel))
			return;
		MolecularModel m = (MolecularModel) model;
		if (m.obstacles == null)
			return;
		int lb = str1.indexOf("[");
		int rb = str1.indexOf("]");
		double z = parseMathExpression(str1.substring(lb + 1, rb));
		if (Double.isNaN(z))
			return;
		int i = (int) Math.round(z);
		if (i < 0 || i >= m.obstacles.size()) {
			out(ScriptEvent.FAILED, "Obstacle " + i + " doesn't exisit.");
			return;
		}
		RectangularObstacle obs = m.obstacles.get(i);
		String s = str2.toLowerCase().intern();
		boolean b = true;
		if (s == "visible") {
			obs.setVisible(x);
		} else if (s == "draggable") {
			obs.setDraggable(x);
		} else {
			out(ScriptEvent.FAILED, "Cannot set property: " + str2);
			b = false;
		}
		if (b)
			notifyChange();
	}