Index: /trunk/FACT++/scripts/doc/Database.js
===================================================================
--- /trunk/FACT++/scripts/doc/Database.js	(revision 14695)
+++ /trunk/FACT++/scripts/doc/Database.js	(revision 14696)
@@ -78,5 +78,5 @@
      *    for (var row=0; row&lt;table.length; row++)
      *        for (var col in table.cols)
-     *            dim.out("table["+row+"]['"+col+"']="+table[row][col]);
+     *            console.out("table["+row+"]['"+col+"']="+table[row][col]);
      *
      */
Index: /trunk/FACT++/scripts/doc/Moon.js
===================================================================
--- /trunk/FACT++/scripts/doc/Moon.js	(revision 14695)
+++ /trunk/FACT++/scripts/doc/Moon.js	(revision 14696)
@@ -69,4 +69,6 @@
 
 /**
+ * Calculates the illuminated fraction of the moon's disk.
+ *
  * Calculates the illuminated fraction of the moon's disk for the
  * provided time. If no time is provided, the current system time
@@ -85,2 +87,30 @@
  */
 Moon.disk = function() { /* [native code] */ }
+
+/**
+ * Calculate moon rise, set and transit times.
+ *
+ * Calculates the moon rise and set time, above and below horizon,
+ * and the time of culmination (transit time) for the given time.
+ * The calculation is done using libnova's ln_get_lunar_rst and is
+ * always performed for the FACT site at La Palma.
+ *
+ * @param {Date} [time=new Date()]
+ *    Date for which the times should be calculated. Note that the date
+ *    is converted to UTC and the times are calculated such that the
+ *    Date (yy/mm/dd) is identical for all returned values.
+ *
+ * @type {Object}
+ *
+ * @returns
+ *    An object with the following properties is returned: time {Date}
+ *    the provided time; rise, transit, set {Date} times of rise, set and
+ *    transit; isUp {Boolean} whether the moon is above or below horizon
+ *    at the provided time. If the moon does not rise or set, the properties
+ *    rise, transit and set will be undefined.
+ *
+ * @example
+ *    var date = new Date("2012-10-25 16:30 GMT"); // Date in UTC
+ *    console.out(JSON.stringify(Moon.horizon(date));
+ */
+Moon.horizon = function() { /* [native code] */ }
Index: /trunk/FACT++/scripts/doc/Subscription.js
===================================================================
--- /trunk/FACT++/scripts/doc/Subscription.js	(revision 14695)
+++ /trunk/FACT++/scripts/doc/Subscription.js	(revision 14696)
@@ -39,5 +39,5 @@
  * @example
  *    var handle1 = new Subscription("MAGIC_WEATHER/DATA");
- *    var handle2 = new Subscription("TNG_WEATHER/DATA", function(evt) { dim.out(JSON.stringify(evt)); });
+ *    var handle2 = new Subscription("TNG_WEATHER/DATA", function(evt) { console.out(JSON.stringify(evt)); });
  *    ...
  *    handle2.close();
@@ -78,5 +78,5 @@
      *
      * @example
-     *     handle.onchange = function(event) { dim.out(JSON.stringify(event); };
+     *     handle.onchange = function(event) { console.out(JSON.stringify(event); };
      *
      */
Index: /trunk/FACT++/scripts/doc/Thread.js
===================================================================
--- /trunk/FACT++/scripts/doc/Thread.js	(revision 14695)
+++ /trunk/FACT++/scripts/doc/Thread.js	(revision 14696)
@@ -33,5 +33,5 @@
  *
  * @example
- *    var handle = new Thread(100, function() { dim.out("Hello world!"); });
+ *    var handle = new Thread(100, function() { console.out("Hello world!"); });
  *    ...
  *    handle.kill();
Index: /trunk/FACT++/scripts/doc/_global_.js
===================================================================
--- /trunk/FACT++/scripts/doc/_global_.js	(revision 14695)
+++ /trunk/FACT++/scripts/doc/_global_.js	(revision 14696)
@@ -33,5 +33,5 @@
  * @example
  *    for (var key in args)
- *        dim.out("args["+key+"]="+args[key]);
+ *        console.out("args["+key+"]="+args[key]);
  */
 _global_.arg = [];
Index: /trunk/FACT++/scripts/doc/dim.js
===================================================================
--- /trunk/FACT++/scripts/doc/dim.js	(revision 14695)
+++ /trunk/FACT++/scripts/doc/dim.js	(revision 14696)
@@ -13,16 +13,4 @@
  */
 var dim = { };
-
-/**
- * Sleep for a while. This can be used to just wait or give time
- * back to the operating system to produce less CPU load if the
- * main purpose of a loop is, e.g., to wait for something to happen.
- *
- * @param {Integer} [milliseconds=0]
- *     Number of millliseconds to sleep. Note that even 0 will always
- *     sleep at least one millisecond.
- *
- */
-dim.sleep = function() { /* [native code] */ }
 
 /**
@@ -67,26 +55,8 @@
  * @example
  *     dim.alarm("Alarm for 30 seconds!");
- *     dim.sleep(30000);
+ *     v8.sleep(30000);
  *     dim.alarm();
  */
 dim.alarm = function() { /* [native code] */ }
-
-/**
- *
- * Displays a message on the local console (only).
- *
- * @param argument
- *     Any kind of argument can be given. If it is not a String, it
- *     is converted using the toString() member function.
- *
- * @param [. . .]
- *     Any number of additional arguments. Each argument will appear in
- *     a new line.
- *
- * @example
- *     dim.out("Five="+5, "--- new line ---");
- *
- */
-dim.out = function() { /* [native code] */ }
 
 /**
@@ -187,6 +157,6 @@
  *
  * @example
- *     dim.onchange['*'] = function(state) { dim.out("State change from "+state.name+" received"); }
- *     dim.onchange['DIM_CONTROL'] = function(state) { dim.out(JSON.stringify(state); }
+ *     dim.onchange['*'] = function(state) { console.out("State change from "+state.name+" received"); }
+ *     dim.onchange['DIM_CONTROL'] = function(state) { console.out(JSON.stringify(state); }
  *     ...
  *     delete dim.onchange['DIM_CONTROL']; // to remove the callback
@@ -194,2 +164,10 @@
  */
 dim.onchange = [];
+
+/**
+ * DIM version number
+ *
+ * @constant
+ * @type Integer
+ */
+dim.version = 0;
Index: /trunk/FACT++/scripts/doc/dimctrl.js
===================================================================
--- /trunk/FACT++/scripts/doc/dimctrl.js	(revision 14695)
+++ /trunk/FACT++/scripts/doc/dimctrl.js	(revision 14696)
@@ -48,7 +48,7 @@
  *
  * @example
- *     dim.newState(10, "StateTen", "This is state number ten");
+ *     dim.defineState(10, "StateTen", "This is state number ten");
  */
-dimctrl.newState = function() { /* [native code] */ }
+dimctrl.defineState = function() { /* [native code] */ }
 
 /**
@@ -88,5 +88,5 @@
  * @example
  *     var state = dim.getState();
- *     dim.out(JSON.stringify(state));
+ *     console.out(JSON.stringify(state));
  */
 dimctrl.getState = function() { /* [native code] */ }
