corrects the name in the header
[brisk.git] / web / commons.js
index 2eb5e01..6281dea 100644 (file)
@@ -22,6 +22,7 @@
 
 var PLAYERS_N = 3;
 var EXIT_BAN_TIME = 900;
+var cookiepath = "/brisk/";
 
 function $(id) { return document.getElementById(id); }
 
@@ -174,8 +175,9 @@ function createXMLHttpRequest() {
 function send_mesg(mesg)
 {
     var xhr_wr = createXMLHttpRequest();
-    // xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+encodeURIComponent(mesg), true);
-    xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+mesg, true);
+
+    
+    xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+encodeURIComponent(mesg), true);
     xhr_wr.onreadystatechange = function() { return; };
     xhr_wr.send(null);
 
@@ -267,7 +269,7 @@ function safelogout()
 {
     var res;
     
-    if (g_exitlock < 3
+    if (g_exitlock < 2
        res = window.confirm("Sei sicuro di volere abbandonare la partita?\nATTENZIONE: se esci adesso senza il consenso degli altri giocatori non potrai sederti ai tavoli per "+(Math.floor(EXIT_BAN_TIME/60))+" minuti.");    
     else 
        res = window.confirm("Sei sicuro di volere abbandonare la partita?");