4 * Copyright (C) 2006-2008 Matteo Nastasi
5 * mailto: nastasi@alternativeoutput.it
6 * matteo.nastasi@milug.org
7 * web: http://www.alternativeoutput.it
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. You should have received a
18 * copy of the GNU General Public License along with this program; if
19 * not, write to the Free Software Foundation, Inc, 59 Temple Place -
20 * Suite 330, Boston, MA 02111-1307, USA.
27 var EXIT_BAN_TIME = 900;
28 var cookiepath = "/brisk/";
30 function $(id) { return document.getElementById(id); }
32 function getStyle(x,IEstyleProp, MozStyleProp)
35 var y = x.currentStyle[IEstyleProp];
36 } else if (window.getComputedStyle) {
37 var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(MozStyleProp);
42 /* replacement of setInterval on IE */
44 /*if not IE, do nothing*/
45 if(!document.uniqueID){return;};
47 /*Copy the default setInterval behavior*/
48 var nativeSetInterval = window.setInterval;
49 window.setInterval = function(fn,ms) {
51 if(arguments.length <= 2) {
52 return nativeSetInterval(fn,ms);
55 for(var i=2;i<arguments.length;i+=1) {
56 param[i-2] = arguments[i];
60 if(typeof(fn)=='function') {
62 return (function (fn,ms,param) {
63 var fo = function () {
64 fn.apply(window,param);
66 return nativeSetInterval(fo,ms);
69 else if(typeof(fn)=='string')
71 return nativeSetInterval(fn,ms);
75 throw Error('setInterval Error\nInvalid function type');
79 /*Copy the default setTimeout behavior*/
80 var nativeSetTimeout = window.setTimeout;
81 window.setTimeout = function(fn,ms) {
83 if(arguments.length <= 2) {
84 return nativeSetTimeout(fn,ms);
87 for(var i=2;i<arguments.length;i+=1) {
88 param[i-2] = arguments[i];
92 if(typeof(fn)=='function') {
94 return (function (fn,ms,param) {
95 var fo = function () {
96 fn.apply(window,param);
98 return nativeSetTimeout(fo,ms);
101 else if(typeof(fn)=='string')
103 return nativeSetTimeout(fn,ms);
107 throw Error('setTimeout Error\nInvalid function type');
113 function addEvent(obj,type,fn)
115 if (obj.addEventListener) {
116 obj.addEventListener( type, fn, false);
118 else if (obj.attachEvent) {
119 obj["e"+type+fn] = fn;
120 obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
121 obj.attachEvent( "on"+type, obj[type+fn] );
124 throw new Error("Event registration not supported");
127 function removeEvent(obj,type,fn)
129 if (obj.removeEventListener) {
130 obj.removeEventListener( type, fn, false );
132 else if (obj.detachEvent) {
133 obj.detachEvent( "on"+type, obj[type+fn] );
135 obj["e"+type+fn] = null;
139 // var card_pos = RANGE 0 <= x < cards_ea_n
141 function show_bigpict(obj, act, x, y)
145 if (arguments.length > 4)
150 big = $(obj.id+"_big"+sfx);
152 big.style.left = obj.offsetLeft + x+"px";
153 big.style.top = obj.offsetTop + y+"px";
154 big.style.visibility = "visible";
157 big.style.visibility = "hidden";
161 function rnd_int(min, max) {
162 return Math.floor(Math.random() * (max - min + 1) + min);
165 function error_images()
170 function abort_images()
172 alert("ABORTAIMAGES");
175 function unload_images()
177 alert("ABORTAIMAGES");
180 function reset_images()
182 alert("ABORTAIMAGES");
185 function update_images()
187 // if (g_imgct % 10 == 0) alert("g_imgct: "+g_imgct+" xx "+g_preload_img_arr[g_imgct]);
188 $("imgct").innerHTML = "Immagini caricate "+g_preload_imgsz_arr[g_imgct]+"%.";
189 if (g_imgct+1 < g_preload_img_arr.length) {
191 setTimeout(preload_images, 100, g_preload_img_arr, g_imgct-1);
193 // $("imgct").innerHTML += "U";
196 function preload_images(arr,idx)
200 // $("imgct").innerHTML = "Stiamo caricando "+arr[idx]+"%.<br>";
201 im.onload = update_images;
202 im.onerror = error_images;
203 im.onabort = abort_images;
204 im.onunload = unload_images;
205 im.onreset = reset_images;
207 // $("imgct").innerHTML += "P";
210 function safestatus(a)
218 function createXMLHttpRequest() {
219 try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}
220 try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
221 try { return new XMLHttpRequest(); } catch(e) {}
222 alert("XMLHttpRequest not supported");
226 function send_mesg(mesg)
228 var xhr_wr = createXMLHttpRequest();
229 var is_conn = (sess == "not_connected" ? false : true);
231 // alert("xhr_wr: "+xhr_wr+" is_conn: "+is_conn);
232 xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false));
233 xhr_wr.onreadystatechange = function() { return; };
237 if (xhr_wr.responseText != null) {
238 eval(xhr_wr.responseText);
243 function server_request(mesg)
245 var xhr_wr = createXMLHttpRequest();
247 var is_conn = (sess == "not_connected" ? false : true);
249 // console.log("server_request:preresp: "+xhr_wr.responseText);
251 xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, false);
252 xhr_wr.onreadystatechange = function() { return; };
255 if (xhr_wr.responseText != null) {
256 // console.log("server_request:resp: "+xhr_wr.responseText);
257 return (xhr_wr.responseText);
263 /* Stat: CHAT and TABLE */
265 function chatt_checksend(obj,e)
271 if(window.event) { // IE
274 else if(e.which) { // Netscape/Firefox/Opera
277 // alert("OBJ: "+obj);
278 if (keynum == 13 && obj.value != "") { // Enter
279 act_chatt(obj.value);
283 function act_chatt(value)
285 send_mesg("chatt|"+encodeURIComponent(value));
289 obj.disabled = false;
296 function act_sitdown(table)
298 send_mesg("sitdown|"+table);
301 function act_wakeup()
306 /* Stat: TABLE Subst: ASTA */
307 function act_asta(card,pnt)
309 send_mesg("asta|"+card+"|"+pnt);
312 function act_choose(card)
315 send_mesg("choose|"+card);
318 /* Stat: TABLE Subst: GAME */
319 function act_play(card,x,y)
322 send_mesg("play|"+card+"|"+x+"|"+y);
325 function act_tableinfo()
327 send_mesg("tableinfo");
337 act_chatt('/tav '+$('txt_in').value);
338 $('txt_in').value = '';
346 function act_roadmap()
348 send_mesg("roadmap");
351 function act_whysupport()
353 send_mesg("whysupport");
356 function act_exitlock()
358 send_mesg("exitlock");
361 function safelogout()
366 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.");
368 res = window.confirm("Sei sicuro di volere abbandonare la partita?");
370 act_logout(g_exitlock);
373 function act_lascio()
378 function safelascio()
382 res = window.confirm("Sei sicuro di volere lasciare questa mano?");
387 function act_logout(exitlock)
389 send_mesg("logout|"+exitlock);
393 function act_reload()
395 window.onunload = null;
396 window.onbeforeunload = null;
397 document.location.reload();
400 function act_shutdown()
404 send_mesg("shutdown");
405 // while (xhr_wr.readyState != 4)
409 function postact_logout()
411 // alert("postact_logout");
416 // eraseCookie("sess");
417 document.location.assign("index.php");
421 function slowimg(img,x1,y1,deltat,free,action,srcend)
423 x1,y1 - destination coords
424 deltat - time for each frame (in msec)
425 free - when the release the local block for other operations (range: 0 - 1)
426 action - function to run when the image is moved
427 srcend - image to switch when the image is moved
430 function sleep(st, delay)
432 // alert("LOC_NEW PRE: "+st.st_loc_new);
436 setTimeout(function(obj){ if (obj.st_loc_new > obj.st_loc) { obj.st_loc++; }},
440 function slowimg(img,x1,y1,deltat,free,action,srcend) {
443 // this.x0 = parseInt(document.defaultView.getComputedStyle(this.img, "").getPropertyValue("left"));
444 this.x0 = parseInt(getStyle(this.img,"left", "left"));
445 // alert("img.x0 = "+this.x0);
446 // this.y0 = parseInt(document.defaultView.getComputedStyle(this.img, "").getPropertyValue("top"));
447 this.y0 = parseInt(getStyle(this.img,"top", "top"));
450 this.deltat = deltat;
452 this.action = action;
453 this.srcend = srcend;
456 slowimg.prototype = {
475 setstart: function(x0,y0)
481 setaction: function(act)
487 settime: function(time)
489 this.time = (time < this.deltat ? this.deltat : time);
490 this.step_n = parseInt(this.time / this.deltat);
491 this.dx = (this.x1 - this.x0) / this.step_n;
492 this.dy = (this.y1 - this.y0) / this.step_n;
493 if (this.step_n * this.deltat == this.time) {
497 this.step_free = parseInt(this.step_n * this.free);
503 // $("logz").innerHTML += " xxxxxxxxxxxxxxxxxxxxxSTART<br>";
505 this.st.st_loc_new++;
507 this.img.style.visibility = "visible";
508 setTimeout(function(obj){ obj.animate(); }, this.deltat, this);
513 // $("log").innerHTML = "Val " + this.step_cur + " N: " + this.step_n + "<br>";
514 if (this.step_cur == 0) {
515 var date = new Date();
516 // $("logz").innerHTML = "Timestart: " + date + "<br>";
518 if (this.step_cur <= this.step_n) {
519 this.img.style.left = this.x0 + this.dx * this.step_cur;
520 this.img.style.top = this.y0 + this.dy * this.step_cur;
522 setTimeout(function(obj){ obj.animate(); }, this.deltat, this);
523 if (this.step_cur == this.step_free && this.st != null) {
524 if (this.st.st_loc < this.st.st_loc_new) {
525 // alert("QUI1 " + this.step_cur + " ZZ "+ this.step_free);
532 this.img.style.left = this.x1;
533 this.img.style.top = this.y1;
534 // $("logz").innerHTML += "xxxxxxxxxxxxxxxCLEAR<br>";
535 var date = new Date();
536 // $("logz").innerHTML += "Timestop: " + date + "<br>";
538 if (this.action != null) {
542 if (this.st != null && this.st.st_loc < this.st.st_loc_new) {
547 if (this.srcend != null) {
548 this.img.src = this.srcend;
554 var asta_xarr = new Array(0,66,132);
556 /* TODO: impostare gli onclick */
557 function dispose_asta(idx, pnt, nopoint)
562 for (i = 0 ; i < 10 ; i++) {
565 btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
566 btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
570 btn.src = "img/asta"+i+(pnt >= 0 ? "" : "_ro")+".png";
571 btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
575 btn.style.left = asta_xarr[i % 3];
577 btn.style.left = asta_xarr[(i+1) % 3];
579 btn.style.top = parseInt(i / 3) * 50 + (i == 9 ? 0 : 1);
582 eval("btn.onclick = function () { act_asta("+pass+",61); }");
583 btn.style.cursor = "pointer";
587 btn.style.cursor = "default";
592 btn = $("astaptdiv");
593 btn.style.left = asta_xarr[i % 3];
594 btn.style.top = parseInt(i / 3) * 50 - 2;
595 // btn.style.visibility = "visible";
598 var rpnt = (pnt < 0 ? -pnt : pnt);
599 btn.value = (rpnt < 61 ? 61 : (rpnt > 120 ? 120 : rpnt));
601 btn = $("astaptsub");
602 btn.style.left = asta_xarr[i % 3];
603 btn.style.top = 25 + parseInt(i / 3) * 50 - 1;
604 btn.src = "img/astaptsub"+(pnt >= 0 ? "" : "_ro")+".png";
605 btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
607 btn.onclick = function () { act_asta(9,$("astapt").value); };
608 btn.style.cursor = "pointer";
612 btn.style.cursor = "default";
617 btn = $("astapasso");
618 btn.style.left = asta_xarr[i % 3];
619 btn.style.top = parseInt(i / 3) * 50;
620 btn.src = "img/astapashalf"+(pnt >= 0 ? "" : "_ro")+".png";
621 btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
623 btn.onclick = function () { act_asta(-1,0); };
629 btn = $("astalascio");
630 btn.style.left = asta_xarr[i % 3];
631 btn.style.top = parseInt(i / 3) * 50 + 24;
632 btn.src = "img/astalascio.png";
633 btn.style.visibility = "visible";
634 btn.onclick = function () { safelascio(); };
637 btn = $("astapasso");
638 btn.style.left = asta_xarr[i % 3];
639 btn.style.top = parseInt(i / 3) * 50;;
640 btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
641 btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
643 btn.onclick = function () { act_asta(-1,0); };
649 btn = $("astalascio");
650 btn.style.visibility = "hidden";
653 // btn.style.visibility = "visible";
654 $("asta").style.visibility = "visible";
657 function asta_pnt_set(pnt)
660 var rpnt = (pnt < 0 ? -pnt : pnt);
661 btn.value = (rpnt < 61 ? 61 : (rpnt > 120 ? 120 : rpnt));
666 $("asta").style.visibility = "hidden";
670 function notify(st, text, tout, butt, w, h)
677 this.ancestor = document.body;
679 this.st.st_loc_new++;
681 clo = document.createElement("input");
683 clo.className = "button";
684 clo.style.bottom = "4px";
687 clo.onclick = this.input_hide;
689 clodiv = document.createElement("div");
690 clodiv.className = "notify_clo";
691 clodiv.appendChild(clo);
693 box = document.createElement("div");
694 box.className = "notify";
695 box.innerHTML = text;
696 box.style.zIndex = 200;
697 box.style.width = w+"px";
698 box.style.marginLeft = -parseInt(w/2)+"px";
699 box.style.height = h+"px";
700 box.style.top = parseInt((document.body.clientHeight - h) / 2) + document.body.scrollTop;
701 box.appendChild(clodiv);
702 box.style.visibility = "visible";
706 this.ancestor.appendChild(box);
708 this.toutid = setTimeout(function(obj){ obj.unblock(); }, tout, this);
719 if (this.st.st_loc < this.st.st_loc_new) {
726 clearTimeout(this.toutid);
727 this.ancestor.removeChild(this.notitag);
731 input_hide: function()
733 clearTimeout(this.obj.toutid);
734 this.obj.ancestor.removeChild(this.obj.notitag);
741 return document.getElementById(id);
747 this.st_loc_new = -1;
748 this.comms = new Array;
753 function remark_step()
755 var ct = $("remark").l_remct;
761 $("remark").className = "remark"+ct;
762 $("remark").l_remct = ct;
763 setTimeout(remark_step,500);
766 $("remark").className = "remark0";
773 if ($("remark").l_remct == 0) {
774 $("remark").l_remct = 1;
775 setTimeout(remark_step,500);
779 function remark_off()
781 $("remark").l_remct = 0;
782 $("remark").className = "remark0";
786 function choose_seed(card)
790 $("chooseed").style.visibility = "visible";
791 for (i = 0 ; i < 4 ; i++) {
792 $("seed"+i).src = "img/"+i+""+card+".png";
794 eval("seed.onclick = function () { act_choose("+i+""+card+"); };");
798 function set_names(so,ea,ne,nw,we)
801 $("name").innerHTML = so;
802 $("name").title = unescapeHTML(so);
803 $("name_ea").innerHTML = ea;
804 $("name_ea").title = unescapeHTML(ea);
805 $("name_ne").innerHTML = ne;
806 $("name_ne").title = unescapeHTML(ne);
807 $("name_nw").innerHTML = nw;
808 $("name_nw").title = unescapeHTML(nw);
809 $("name_we").innerHTML = we;
810 $("name_we").title = unescapeHTML(we);
815 var astat_suffix = new Array("","_ea","_ne","_nw","_we");
817 function show_astat(zer,uno,due,tre,qua)
819 var astat = new Array(zer,uno,due,tre,qua);
821 for (i = 0 ; i < PLAYERS_N ; i++) {
822 idx = (PLAYERS_N + i - table_pos) % PLAYERS_N;
824 if (astat[i] == -2) {
825 $("public"+astat_suffix[idx]).style.visibility = "hidden";
827 else if (astat[i] == -1) {
828 $("public"+astat_suffix[idx]).style.visibility = "visible";
829 $("pubacard"+astat_suffix[idx]).src = "img/astapasso.png";
830 $("pubapnt"+astat_suffix[idx]).innerHTML = "";
831 $("pubapnt"+astat_suffix[idx]).style.visibility = "hidden";
833 else if (astat[i] <= 10) {
834 $("public"+astat_suffix[idx]).style.visibility = "visible";
835 $("pubacard"+astat_suffix[idx]).src = "img/asta"+astat[i]+".png";
836 $("pubapnt"+astat_suffix[idx]).style.visibility = "hidden";
838 else if (astat[i] <= 120) {
839 $("public"+astat_suffix[idx]).style.visibility = "visible";
840 $("pubacard"+astat_suffix[idx]).src = "img/asta9.png";
841 $("pubapnt"+astat_suffix[idx]).style.visibility = "inherit"; // XXX VISIBLE
842 $("pubapnt"+astat_suffix[idx]).innerHTML = astat[i];
847 function exitlock_show(num, islock)
851 num = (num < 3 ? num : 3);
852 $("exitlock").src = "img/exitlock"+num+(islock ? "n" : "y")+".png";
853 // alert("EXITLOCK: "+$("exitlock").src);
854 $("exitlock").style.visibility = "visible";
859 // exitlock_show(0, true);
861 function table_init() {
862 var sux = new Array("", "_ea", "_ne", "_nw", "_we");
864 // console.log("table_init");
867 $("asta").style.visibility = "hidden";
868 $("caller").style.visibility = "hidden";
869 show_astat(-2,-2,-2,-2,-2);
870 for (i=0 ; i < 8 ; i++) {
871 Drag.init($("card" + i), card_mouseup_cb);
872 for (e = 0 ; e < PLAYERS_N ; e++)
873 $("card"+sux[e]+i).style.visibility = "hidden";
875 for (i=0 ; i < PLAYERS_N ; i++) {
876 // console.log("shut: "+"takes"+sux[i]);
877 $("takes"+sux[i]).style.visibility = "hidden";
880 for (i = 0 ; i < 8 ; i++) {
892 var chatt_lines = new Array();
893 var chatt_lines_n = 0;
895 var CHATT_MAXLINES = 40;
898 function chatt_sub(name,str)
900 var must_scroll = false;
902 // alert ($("txt").scrollTop + parseInt(getStyle($("txt"),"height", "height")) - $("txt").scrollHeight);
904 if ($("txt").scrollTop + parseInt(getStyle($("txt"),"height", "height")) - $("txt").scrollHeight >= 0)
907 // alert("ARRIVA NAME: "+ name + " STR:"+str);
908 if (chatt_lines_n == CHATT_MAXLINES) {
909 $("txt").innerHTML = "";
910 for (i = 0 ; i < (CHATT_MAXLINES - 1) ; i++) {
911 chatt_lines[i] = chatt_lines[i+1];
912 $("txt").innerHTML += chatt_lines[i];
914 chatt_lines[i] = "<b>"+name+"</b> "+str+ "<br>";
915 $("txt").innerHTML += chatt_lines[i];
918 chatt_lines[chatt_lines_n] = "<b>"+name+"</b> "+str+ "<br>";
919 $("txt").innerHTML += chatt_lines[chatt_lines_n];
922 // $("txt").innerHTML;
926 $("txt").scrollTop = 10000000;
928 // alert("scTOP "+$("txt").scrollTop+" scHEIGHT: "+$("txt").scrollHeight+" HEIGHT: "+getStyle($("txt"),"height", "height") );
932 * GESTIONE DEI COOKIES
934 function createCookie(name,value,hours,path) {
936 var date = new Date();
937 date.setTime(date.getTime()+(hours*60*60*1000));
938 var expires = "; expires="+date.toGMTString();
940 else var expires = "";
941 document.cookie = name+"="+value+expires+"; path="+path;
944 function readCookie(name) {
945 var nameEQ = name + "=";
946 var ca = document.cookie.split(';');
947 for(var i=0;i < ca.length;i++) {
949 while (c.charAt(0)==' ') c = c.substring(1,c.length);
950 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
955 function eraseCookie(name) {
956 createCookie(name,"",-1);
959 var onunload_times = 0;
962 function onbeforeunload_cb () {
966 function onunload_cb_old () {
969 // if (nonunload == true)
972 if (onunload_times == 0) {
973 var res = window.confirm(" Vuoi veramente abbandonare la briscola ?\n(clicca annulla o cancel se vuoi ricaricare la briscola)");
982 document.location.href = self.location; // = self.location;
983 // alert ("passiamo di qui"+self.location);
986 alert("Ripristino della briscola fallito, per non perdere la sessione ricaricare la pagina manualmente.");
995 function onunload_cb () {
1005 function room_checkspace(emme,tables,inpe)
1008 for (i = 0 ; i < emme ; i++)
1013 for (i = 0 ; i < 5 ; i++)
1014 alta += nome+"<br>";
1016 for (i = 0 ; i < tables ; i++) {
1017 $("table"+i).innerHTML = alta;
1018 $("table_act"+i).innerHTML = "<input type=\"button\" class=\"button\" name=\"xhenter"+i+"\" value=\"Mi siedo.\" onclick=\"act_sitdown(1);\">";
1021 stand = "<table class=\"table_standup\"><tbody><tr>";
1022 for (i = 0 ; i < inpe ; i++) {
1023 stand += "<td>"+nome+"</td>";
1024 if ((i+1) % 4 == 0) {
1025 stand += "</tr><tr>";
1029 $("standup").innerHTML = stand;
1031 // VERIFY: what is this button ?
1032 $("esco").innerHTML = "<input class=\"button\" name=\"logout\" type=\"button\" value=\"Esco.\" onclick=\"act_logout();\" type=\"button\">";
1035 function unescapeHTML(cont) {
1036 var div = document.createElement('div');
1040 div.innerHTML = cont;
1041 if (div.childNodes[0]) {
1042 if (div.childNodes.length > 1) {
1043 if (div.childNodes.toArray)
1046 var length = div.childNodes.length, results = new Array(length);
1048 results[length] = div.childNodes[length];
1050 for (i=0 ; i<results.length ; i++)
1051 memo = memo + results[i].nodeValue;
1057 return (div.childNodes[0].nodeValue);
1065 function playsound(tag, sound) {
1066 // g_withflash is a global var
1068 $(tag).innerHTML = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+
1069 'codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="mysound" WIDTH=1 HEIGHT=1>' +
1070 '<PARAM NAME="movie" VALUE="../playsound.swf"><PARAM NAME="PLAY" VALUE="true"><PARAM NAME="LOOP" VALUE="false">' +
1071 '<PARAM NAME=FlashVars VALUE="streamUrl='+sound+'">' +
1072 '<EMBED swliveconnect="true" name="mysound" src="../playsound.swf" FlashVars="streamUrl='+sound+'" PLAY="true" LOOP="false" '+
1073 ' WIDTH=1 HEIGHT=1 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></OBJECT>';
1077 function topbanner_init()
1079 // setInterval(topbanner_cb, 666);
1083 function topbanner_cb()
1087 a = $('topbanner').style.backgroundColor;
1088 b = $('topbanner').style.borderLeftColor;
1090 $('topbanner').style.backgroundColor = b;
1091 $('topbanner').style.borderColor = a+" "+a+" "+a+" "+a;
1093 // console.log("A: "+a+" B: "+b);