         var server="http://jonos.tip4fun.de/";
         if (location.href.substring(0,16)== "http://localhost")
             var server="http://localhost/bl/TippApp/gruppen/JoNo/";
function call(slink) {
         call0="http://"+slink;
         IDFensterhdl = window.open(call0, "LIFenster");
         IDFensterhdl.focus();
}
function show_runde(ts, runde) {
//			Server oder localhost ggf. oben umsetzen
//         var server="http://jonos.tip4fun.de/";
         if (typeof(runde)=="undefined") runde="";
         //alert (runde);
         //alert ("z.Zt. in index_scripts.js eingestellter Server ist: "+server);
         //alert (location.href.substring(0,16));
//         if (location.href.substring(0,16)== "http://localhost")
//             var server="http://localhost/bl/TippApp/gruppen/JoNo/";
         call0=server+ts+"/call.php?CALL=r3/prog/welcome.php&GUSR=Besucher&GPWD=gast&SetRnd="+runde;
         if (ts=="bl02") call0="http://www.root.tip4fun.de/BL_0203/JoNo/call.php?CALL=../prog/welcome.php&GUSR=GAST&GPWD=gast"
         if (ts=="wm02") call0="http://www.root.tip4fun.de/WM_02/call.php?CALL=welcome.php&GUSR=GAST&GPWD=gast"
         IDFensterhdl = window.open(call0, "TSFenster" ,"width=900, height=700, scrollbars=yes, resizable=yes");
         IDFensterhdl.focus();
}
function run_game(game) {
         plr = prompt("Name ?","");
         while (plr=="") plr = prompt("Bitte gew. Spieler-Namen angeben ?","");
             if (plr==null) {   // Abbrechen
                 return;
             }
//         call0="http://jonos.tip4fun.de/bl04/call.php?CALL=r3/spiele/"+game+".php&moff=1&popup=1&USERID=3&USER="+plr;
         call0="http://gruppen.tip4fun.de/call.php?CALL=r3/spiele/"+game+".php&moff=1&popup=1&USERID=3&USER="+plr;
         CBFensterhdl = window.open(call0, "CBFenster","width=800, height=550, scrollbars=no, resizable=yes");
         CBFensterhdl.focus();
}

function StBlatt(ts, spieltag, newwin) {
//			Server oder localhost ggf. oben umsetzen
//         var server="http://jonos.tip4fun.de/";
//       var server="http://localhost/bl/TippApp/gruppen/JoNo/";
         call0=server+ts+"/call.php?CALL=r3/prog/stadion.php&GUSR=BESUCHER&GPWD=gast&stillopen=1";
         if (spieltag>0) call0 = call0+"&SPIELTAG="+spieltag;
         if (typeof(newwin)=="undefined") newwin=0;
         if (!newwin) {
         	 	   call0 = call0+"&moff=1&shbcklnk=1&nores=1";
               CBFensterhdl = window.open(call0, "C21");
         }else CBFensterhdl = window.open(call0, "new");
}
function ShowTab(ts, abspt, spieltag, newwin) {
//			Server oder localhost ggf. oben umsetzen
		 //window.name="TabWin";	//wird in neuem Browserfenster angezeigt.
         call0=server+ts+"/call.php?CALL=r3/prog/show_tabelle.php&GUSR=BESUCHER&GPWD=gast&cSELUSER=Besucher";
         if (spieltag>0) call0 = call0+"&SPIELTAG="+spieltag;
         if (abspt>0) call0 = call0+"&abSPIELTAG="+abspt;
         //alert (typeof(newwin));
         if (typeof(newwin)=="undefined") newwin=0;
         if (!newwin) {
         	 	   call0 = call0+"&moff=1&shbcklnk=1&nores=1";
               CBFensterhdl = window.open(call0, "C21");
         }else CBFensterhdl = window.open(call0, "new");
}

function ShowSpt(ts, spieltag, newwin) {
//			Server oder localhost ggf. oben umsetzen
//CALL=r3/prog/insert_tipps.php&UIN=5489a2b0751bdcf1a06014c125702ad3&moff=1&showpopup=1&SHOW_USER=305&SPIELTAG=13
         call0=server+ts+"/call.php?CALL=r3/prog/insert_tipps.php&GUSR=BESUCHER&GPWD=gast";
		 call0=call0+"&showpopup=1&SHOW_USER=4";
         if (spieltag>0) call0 = call0+"&SPIELTAG="+spieltag;
         //alert (typeof(newwin));
         if (typeof(newwin)=="undefined") newwin=0;
         if (!newwin) {
         	 	   call0 = call0+"&moff=1&shbcklnk=1&nores=1";
               CBFensterhdl = window.open(call0, "C21");
         }else CBFensterhdl = window.open(call0, "new");
}

function setPointer(theRow, thePointerColor, theNormalBgColor)
{
    var theCells = null;

    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    var currentColor = null;
    var newColor     = null;
    // für Opera hier ausgeschaltet (bgcolor='' geht nicht /JH)
//    if  (  typeof(window.opera) != 'undefined' )
//           return false;

    // Opera does not return valid values with "getAttribute"
    if  ( typeof(window.opera) == 'undefined' &&
        typeof(theCells[0].getAttribute) != 'undefined' &&
        typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].setAttribute('bgcolor', newColor, 0);
        } // end for
    }
    else {
        currentColor = theCells[0].style.backgroundColor;
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++) {
        // if (newColor=='') { theCells[c].style.removeAttribute('bgcolor','false'); } else
            theCells[c].style.backgroundColor = newColor;
        }
    }

    return true;
}
