GUI: Javascript cleanup and additional utility functions.

Change-Id: Ia16dd7eecedfd116e9d0a65d60d724657e87b8d3
diff --git a/web/gui/src/main/webapp/app/fw/layer/flash.js b/web/gui/src/main/webapp/app/fw/layer/flash.js
index 0d95b77..3139f2c 100644
--- a/web/gui/src/main/webapp/app/fw/layer/flash.js
+++ b/web/gui/src/main/webapp/app/fw/layer/flash.js
@@ -143,6 +143,13 @@
         enabled = !!b;
     }
 
+    function tempDiv(ms) {
+        var div = d3.select('body').append('div').classed('centered', true),
+            delay = (ms === undefined || ms < 100) ? 3000 : ms;
+        $timeout(function () { div.remove(); }, delay);
+        return div;
+    }
+
     angular.module('onosLayer')
         .factory('FlashService', ['$log', '$timeout',
         function (_$log_, _$timeout_) {
@@ -158,7 +165,8 @@
             return {
                 initFlash: initFlash,
                 flash: flash,
-                enable: enable
+                enable: enable,
+                tempDiv: tempDiv
             };
         }]);