added passwdhowto and mestgoadm functions
[brisk.git] / web / commons.js
index d04ef6f..1b2ea87 100644 (file)
@@ -322,6 +322,16 @@ function act_help()
     send_mesg("help");
 }
 
+function act_passwdhowto()
+{
+    send_mesg("passwdhowto");
+}
+
+function act_mesgtoadm()
+{
+    send_mesg("mesgtoadm");
+}
+
 function act_tav()
 {
     act_chatt('/tav '+$('txt_in').value); 
@@ -572,6 +582,10 @@ function notify(st, text, tout, butt, w, h)
     this.ancestor.appendChild(box);
     
     this.toutid = setTimeout(function(obj){ obj.unblock(); }, tout, this);
+
+    formsub_hilite(clo);
+    clo.focus();
+
 }
 
 notify.prototype = {
@@ -886,6 +900,25 @@ function topbanner_cb()
     // console.log("A: "+a+"  B: "+b);
 }
 
+function sidebanner_init()
+{
+    setInterval(sidebanner_cb, 666);
+;
+}
+
+function sidebanner_cb()
+{
+    var a, b;
+
+    a = $('sidebanner').style.backgroundColor;
+    b = $('sidebanner').style.borderLeftColor;
+
+    $('sidebanner').style.backgroundColor = b;
+    $('sidebanner').style.borderColor = a+" "+a+" "+a+" "+a;
+
+    // console.log("A: "+a+"  B: "+b);
+}
+
 
 function langtolng(lang)
 {
@@ -894,3 +927,18 @@ function langtolng(lang)
     else
         return ("");
 }
+
+function formtext_hilite(obj)
+{
+    obj.className = 'input_text';
+    addEvent(obj, "focus", function () { this.className = 'input_text_hi'; });
+    addEvent(obj, "blur",  function () { this.className = 'input_text'; });
+}
+
+function formsub_hilite(obj)
+{
+    obj.className = 'input_sub';
+    addEvent(obj, "focus", function () { this.className = 'input_sub_hi'; });
+    addEvent(obj, "blur",  function () { this.className = 'input_sub'; });
+}
+