update infos
[brisk.git] / web / commons.js
index bbeccf1..e305e99 100644 (file)
@@ -140,10 +140,14 @@ function removeEvent(obj,type,fn)
 
 function show_bigpict(obj, act, x, y)
 {
-   var big;
+   var big, sfx;
 
-   // alert("offsetTop: "+obj.offsetTop+"  offsetLeft: "+obj.offsetLeft+"obj.id: "+obj.id);
-   big = $(obj.id+"_big");
+   if (arguments.length > 4)
+       sfx = arguments[4];
+   else
+       sfx = '';
+
+   big = $(obj.id+"_big"+sfx);
    if (act == "over") {
        big.style.left = obj.offsetLeft + x+"px";
        big.style.top  = obj.offsetTop  + y+"px";
@@ -222,12 +226,17 @@ function createXMLHttpRequest() {
 function send_mesg(mesg)
 {
     var xhr_wr = createXMLHttpRequest();
-
+    var is_conn = (sess == "not_connected" ? false : true);
     
-    xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+mesg, true);
+    xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false));
     xhr_wr.onreadystatechange = function() { return; };
     xhr_wr.send(null);
 
+    if (!is_conn) {
+        if (xhr_wr.responseText != null) {
+            eval(xhr_wr.responseText);
+        }
+    }
 }
 
 /* Stat: CHAT and TABLE */