+
+function onunload_cb_old () {
+ var u = 0;
+
+ // if (nonunload == true)
+ // return true;
+
+ if (onunload_times == 0) {
+ // MLANG " Vuoi veramente abbandonare la briscola ?\n(clicca annulla o cancel se vuoi ricaricare la briscola)"
+ var res = window.confirm(mlang_commons['brileav'][g_lang]);
+ if (res == true) {
+ the_end = true;
+ act_shutdown();
+ // while (1)
+ // u++;
+ }
+ else {
+ try {
+ document.location.href = self.location; // = self.location;
+ // alert ("passiamo di qui"+self.location);
+ return (false);
+ } catch (e) {
+ // MLANG "Ripristino della briscola fallito, per non perdere la sessione ricaricare la pagina manualmente."
+ alert(mlang_commons['brireco'][g_lang]);
+ }
+ }
+ onunload_times++;
+ }
+
+ return(false);
+}
+
+function onunload_cb () {
+
+ the_end = true;
+
+ act_shutdown();
+
+ return(false);
+}
+
+
+function room_checkspace(emme,tables,inpe)
+{
+ nome = "<b>";
+ for (i = 0 ; i < emme ; i++)
+ nome += "m";
+ nome += "</b>";
+
+ alta = "";
+ for (i = 0 ; i < 5 ; i++)
+ alta += nome+"<br>";
+
+ for (i = 0 ; i < tables ; i++) {
+ $("table"+i).innerHTML = alta;
+ // MLANG Mi siedo.
+ $("table_act"+i).innerHTML = "<input type=\"button\" class=\"button\" name=\"xhenter"+i+"\" value=\""+mlang_commons['btn_sit'][g_lang]+"\" onclick=\"act_sitdown(1);\">";
+ }
+
+ stand = "<table class=\"table_standup\"><tbody><tr>";
+ for (i = 0 ; i < inpe ; i++) {
+ stand += "<td>"+nome+"</td>";
+ if ((i+1) % 4 == 0) {
+ stand += "</tr><tr>";
+ }
+ }
+ stand += "</tr>";
+ $("standup").innerHTML = stand;
+
+ // VERIFY: what is this button ?
+ // MLANG Esco.
+ $("esco").innerHTML = "<input class=\"button\" name=\"logout\" type=\"button\" value=\""+mlang_commons['btn_exit'][g_lang]+"\" onclick=\"act_logout();\" type=\"button\">";
+}
+
+function unescapeHTML(cont) {
+ var div = document.createElement('div');
+ var memo = "";
+ var i;
+
+ div.innerHTML = cont;
+ if (div.childNodes[0]) {
+ if (div.childNodes.length > 1) {
+ if (div.childNodes.toArray)
+ alert("si puo");
+ else {
+ var length = div.childNodes.length, results = new Array(length);
+ while (length--)
+ results[length] = div.childNodes[length];
+
+ for (i=0 ; i<results.length ; i++)
+ memo = memo + results[i].nodeValue;
+ }
+
+ return (memo);
+ }
+ else {
+ return (div.childNodes[0].nodeValue);
+ }
+ }
+ else {
+ return ('');
+ }
+}
+
+function playsound(tag, sound) {
+ // g_withflash is a global var
+ if (g_withflash) {
+ $(tag).innerHTML = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+
+'codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="mysound" WIDTH=1 HEIGHT=1>' +
+'<PARAM NAME="movie" VALUE="../playsound.swf"><PARAM NAME="PLAY" VALUE="true"><PARAM NAME="LOOP" VALUE="false">' +
+'<PARAM NAME=FlashVars VALUE="streamUrl='+sound+'">' +
+'<EMBED swliveconnect="true" name="mysound" src="../playsound.swf" FlashVars="streamUrl='+sound+'" PLAY="true" LOOP="false" '+
+' WIDTH=1 HEIGHT=1 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></OBJECT>';
+ }
+}
+
+function topbanner_init()
+{
+ setInterval(topbanner_cb, 666);
+;
+}
+
+function topbanner_cb()
+{
+ var a, b;
+
+ a = $('topbanner').style.backgroundColor;
+ b = $('topbanner').style.borderLeftColor;
+
+ $('topbanner').style.backgroundColor = b;
+ $('topbanner').style.borderColor = a+" "+a+" "+a+" "+a;
+
+ // console.log("A: "+a+" B: "+b);
+}
+
+function sidebanner_init()
+{
+ setInterval(sidebanner_cb, 666);
+}
+
+function sidebanner2_init()
+{
+ setInterval(sidebanner2_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 sidebanner2_cb()
+{
+ var a, b;
+
+ a = $('sidebanner2').style.backgroundColor;
+ b = $('sidebanner2').style.borderLeftColor;
+
+ $('sidebanner2').style.backgroundColor = b;
+ $('sidebanner2').style.borderColor = a+" "+a+" "+a+" "+a;
+
+ // console.log("A: "+a+" B: "+b);
+}
+
+
+function langtolng(lang)
+{
+ if (lang == "en")
+ return ("-en");
+ 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'; });
+}
+