function createXmlHttpRequest(){if (window.XMLHttpRequest) {return new XMLHttpRequest();} else if (window.ActiveXObject) {try {return new ActiveXObject('Msxml2.XMLHTTP');} catch (e) {try {return new ActiveXObject('Microsoft.XMLHTTP');} catch (e) {}}}else alert("Sie benutzen einen Browser der leider keine Ajax-Anwendung anzeigt!");}function startRequest(c){if(globStatus != L_ARR_S[1])return false;globStatus = 0;csession = csession == null ? getcoCount() : csession;if(csession == null){alert("Fehler beim erzeugen des Cookies!");return false;}else{++chkTimer;xmlHttp = createXmlHttpRequest();var ru = getURL(c);xmlHttp.open("POST", "updater?"+ru+L_LMOD ,true);xmlHttp.onreadystatechange=handleStateChange;if(!xmlHttp)return false;xmlHttp.setRequestHeader("Content-Type", "text/javascript; charset=UTF-8");xmlHttp.setRequestHeader("Pragma", "no-cache");xmlHttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0");xmlHttp.setRequestHeader("If-Modified-Since", document.lastModified);xmlHttp.send("" +Math.random());}return true;}function setNewReload(){window.setTimeout("document.location.href=document.location.href;",300000);}function handleStateChange(){var isReload= false;var isUpdate= true;var isTorUpdate= false;if(!xmlHttp)return false;if(xmlHttp.readyState==L_ARR_S[0]){if(xmlHttp.status==L_ARR_S[1]){globStatus = xmlHttp.status;eval(xmlHttp.responseText);xmlHttp.abort();xmlHttp = null;startUpdateTimer();if(timt == null)getAlleDaten();if(isUpdate)loadDaten();checkBG();setMinus1();isFavo();}}return true;}function startUpdateTimer(){relTimer = window.setTimeout("startRequest(1);", L_SEKUNDE_2);}function runGlobCount(){if(globCount > 9 && globCount < 14 && globStatus != L_ARR_S[1]){window.clearTimeout(relTimer);globStatus = 200;startUpdateTimer();}if(globCount == 0){setNewReload();globCount = 20;}--globCount;if(globTimer == null)globTimer = window.setInterval("runGlobCount();",30000);}function getZeitAnzeige(t1,t2){if(t2.search("^"+I_STATUS[0]+"+") != -1 || t2.search("^"+I_STATUS[1]+"+") != -1)return "-1";return t1;}function isTorVorhanden(id){var tle = tarr.length;for(var i=0;i<tle;i++)if(tarr[i].wettnummer == id)return true;return false;}function torVorhanden(id,stda){var tle = tarr.length;for(var i=0;i<tle;i++){if(tarr[i].wettnummer == id){if(tarr[i].tore == stda)return -1;return i;}}tarr[tle] = new TorboxInhalt();return tle;}function setKarten(r,t1r,t1g,t2r,t2g){var a31 = getTypeOfDocument("rkarte1_"+r);var a32 = getTypeOfDocument("gkarte1_"+r);var a41 = getTypeOfDocument("rkarte2_"+r);var a42 = getTypeOfDocument("gkarte2_"+r);if(a31)setKartenElement(a31,"rot",t1r);if(a32)setKartenElement(a32,"gelb",t1g);if(a41)setKartenElement(a41,"rot",t2r);if(a42)setKartenElement(a42,"gelb",t2g);}function setKartenElement(elm,farbe,zah){while(elm.firstChild != null)elm.removeChild(elm.firstChild);if(zah > 0){var imgsetkarte= document.createElement("img");var imgclass = document.createAttribute("class");imgclass.nodeValue = "kaimg";imgsetkarte.setAttributeNode(imgclass);imgsetkarte.src = "karteimage?f="+farbe+"&a="+zah;elm.appendChild(imgsetkarte);}}function setDatenElemente(w,z,ht,at,s,f,h,e,x){if(!daObj[w])  daObj[w] = new DatenObject();daObj[w].wnr = w;daObj[w].zte = getZeitAnzeige(z,s);daObj[w].ztf = statusFarben[Number(f)];daObj[w].hts = h;daObj[w].ext = e;daObj[w].stat = Number(x);daObj[w].neu = true;setAktuelleTore(w,new Array(ht,at));if(ht != "-" && at != "-")setWerVorne(w,ht,at);}function loadDaten(){for(var wettnr in daObj) {updateLfdSpiele(wettnr,daObj[wettnr].zte,daObj[wettnr].ztf,daObj[wettnr].hts,daObj[wettnr].ext,daObj[wettnr].stat,daObj[wettnr].neu);daObj[wettnr].neu = false;}if(relTimer == null && tstarter == true){tstarter = false;window.setTimeout("startUpdateTimer();", 5000);}if(daObj.length > 0)daObj = new Array();}function checkBG(){for(var nr in elmBG){if(!isTorVorhanden(elmBG[nr][1])){setBackgroundMannschaft(elmBG[nr][1],'3');}else if(elmBG[nr][0] <= 0){setBackgroundMannschaft(elmBG[nr][1],'3');}}}function setMinus1(){for(var nr in elmBG){elmBG[nr][0] -= 1;}}function getAlleDaten(){loeschenAll('torboxinhalt');if(!isTorboxAn())return false;var posmarker = 0;var gross = tarr.length;if(!tarr || gross == 0)return false;var ntora = new Array();var mz = 0;for(var v=0;v<gross;v++){if(tarr[v].start > 0){ntora[mz] = tarr[v];++mz;}}var bbnc = getTypeOfDocument("torbox");tarr = ntora;for(var x = tarr.length - 1; x>=0 ; x--){if(!tarr[x])continue ;var winner = new Array();if(tarr[x].tore)winner= tarr[x].tore.split(/#/);var status= winner[1].replace(/ /,"");if(bbnc && !isIE5())erzeugen(x);else if(tarr[x].start == L_TWAIT && isSoundOn)getTorboxInfo(tarr[x].wettnummer,status);--tarr[x].start;}var tanz = tarr.length;if(bbnc && !isIE5()){if(tanz > 15){bbnc.style.height = "280px";bbnc.style.overflow = "auto";}else{bbnc.style.height = "";bbnc.style.overflow = "hidden";}}if(timt == null)timt = window.setInterval("getAlleDaten();",L_SEKUNDE);return true;}function delTarr(pos){tarr.splice(pos,1);}function setTW(p,i,w,s,t,e1,e2){tarr[p].wettnummer = i;tarr[p].start = 150;tarr[p].spieltype = s;tarr[p].tore = t;tarr[p].team1 = e1;tarr[p].team2 = e2;tarr[p].wnr = w;}function erzeugen(pos){var wnr = tarr[pos].wettnummer;var winner = new Array("-:-","");if(tarr[pos].tore)winner= tarr[pos].tore.split(/#/);var status= winner[1].replace(/ /,"");var tore= winner[0].split(/:/);var tor1= tore[0].replace(/ /,"");var tor2= tore[1].replace(/ /,"");var team1= tarr[pos].team1;var team2= tarr[pos].team2;var stype= tarr[pos].spieltype;var zeit= tarr[pos].start;var isGoal = (zeit >= (L_TWAIT - 20));var updTore= true;if(!status || !tore || !tor1 || !tor2 || winner[0] == "-:-")return false;if(status == "3")updTore = false;if(zeit == L_TWAIT){ if(updTore){setAktuelleTore(wnr,tore);setWerVorne(wnr,tor1,tor2);}setBackgroundMannschaft(wnr,status);if(isSoundOn)getTorboxInfo(wnr,status);}var torfarbe1 = "#FFFFFF";var torfarbe2 = "#FFFFFF";var textfarbe = "#FFFFFF";if(!isGoal){textfarbe = "#202020";torfarbe1 = textfarbe;torfarbe2 = textfarbe;}if(status == "1"){if(isGoal)torfarbe1 = "#0000FF";else torfarbe1 = "#A00000";}else if(status == "2"){if(isGoal)torfarbe2 = "#0000FF";else torfarbe2 = "#A00000";}getTypeOfDocument("torboxtbl").style.display = "block";var far1 = document.createElement('font');far1.setAttribute("color",torfarbe1);far1.appendChild(document.createTextNode(tor1));var dpp = document.createElement("font");dpp.setAttribute("color",textfarbe);dpp.appendChild(document.createTextNode(" : "));var far2 = document.createElement('font');far2.setAttribute("color",torfarbe2);far2.appendChild(document.createTextNode(tor2));far1.appendChild(dpp);far1.appendChild(far2);var newTr = document.createElement("tr");var ctr = document.createAttribute("id");var table = document.getElementById('torboxinhalt');var td = document.createElement('td');var cl = document.createAttribute("class");var gro = document.createAttribute("width");var hoc         = document.createAttribute("height");var hsty        = document.createAttribute("style");var okl= document.createAttribute("onclick");var clwa = "torboxfarbe";ctr.nodeValue= "t_" + wnr;newTr.setAttributeNode(ctr);hsty.nodeValue= "cursor:pointer;";newTr.setAttributeNode(hsty);okl.nodeValue= "document.location.href='#spi_"+wnr+"'";newTr.setAttributeNode(okl);hoc.nodeValue   = "10px";newTr.setAttributeNode(hoc);if(isGoal)clwa += "neu";cl.nodeValue= clwa;td.setAttributeNode(cl);gro.nodeValue = isIE() ? "50px" : "80px";td.setAttributeNode(gro);td.appendChild(document.createTextNode(tarr[pos].wnr));newTr.appendChild(td.cloneNode(true));gro.nodeValue = isIE() ? "80px" : "100px";td.replaceChild(document.createTextNode(stype),td.firstChild);newTr.appendChild(td.cloneNode(true));gro.nodeValue = isIE() ? "200px" : "260px";td.replaceChild(document.createTextNode(team1),td.firstChild);newTr.appendChild(td.cloneNode(true));td.replaceChild(document.createTextNode(team2),td.firstChild);newTr.appendChild(td.cloneNode(true));gro.nodeValue = isIE() ? "60px" : "90px";td.replaceChild(far1,td.firstChild);newTr.appendChild(td);table.appendChild(newTr);return true;}function getTorboxInfo(wnr,status){window.setTimeout('getSound()',L_HALBSEK);}function loeschenAll(target){var oldtr = document.getElementById(target);if(oldtr && oldtr.hasChildNodes){var anz = oldtr.childNodes.length;for(var x=0;x<anz;x++){oldtr.removeChild(oldtr.childNodes[0]);}}var ttbl = getTypeOfDocument("torboxtbl");if(tarr.length == 0 && ttbl)ttbl.style.display = "none";return true;}function getSound(){loeschenAll("tboxsound");buildSound();return true;}function setWerVorne(r,t1,t2){var a3 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_MANN1+r);var a4 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_MANN2+r);var x1 = Number(t1);var x2 = Number(t2);if(!a3 || !a4)return ;if(x1 > x2){a3.style.fontWeight = "bold";a4.style.fontWeight = "normal";}else if(x1 < x2){a4.style.fontWeight = "bold";a3.style.fontWeight = "normal";}else {a3.style.fontWeight = "normal";a4.style.fontWeight = "normal";}}function posBG(nr){for(i=0;i<elmBG.length;i++){if(elmBG[i][1] == nr) return i;}return elmBG.length;}function setBackgroundMannschaft(r,status){var a3 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_MANN1+r);var a4 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_MANN2+r);if(!a3 || !a4)return false;var el = posBG(r);if(status=="1"){a3.style.backgroundColor = "#A686DD";a4.style.backgroundColor = "#D9D9D9";elmBG[el] = new Array();elmBG[el][0] = 10;elmBG[el][1] = r;}else if(status=="2"){a4.style.backgroundColor = "#A686DD";a3.style.backgroundColor = "#D9D9D9";elmBG[el] = new Array();elmBG[el][0] = 10;elmBG[el][1] = r;}else{a3.style.backgroundColor = "#D9D9D9";a4.style.backgroundColor = "#D9D9D9";elmBG.splice(el,1);}return true;}function setAktuelleTore(r,tor){var a5 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_ENDSTAND+r);if(a5){while(a5.firstChild != null)a5.removeChild(a5.firstChild);a5.appendChild(document.createTextNode(tor[0]+":"+tor[1]));}else{a5 = getTypeOfDocument(IDNAME_TD_TBLUNTEREINANDER_ENDSTAND+r);if(a5){while(a5.firstChild != null)a5.removeChild(a5.firstChild);a5.appendChild(document.createTextNode(tor[0]));a5.appendChild(document.createElement("br"));a5.appendChild(document.createTextNode(tor[1]));}}if(a5)setFontBig(a5);}function getTore(nr){var a5 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_ENDSTAND+nr);if(!a5)a5 = getTypeOfDocument(IDNAME_TD_TBLUNTEREINANDER_ENDSTAND+nr);if(a5){var fc = a5.firstChild.nodeValue;if(fc == "-" || fc == "-:-")return new Array("-","-");if(fc.search(/:/) == -1)fc += ":"+a5.lastChild.nodeValue;var tx = fc.split(/:/);return tx;}return new Array("-","-");}function isFavo(){var gco = document.cookie;if(gco){gco = gco.split(/;/);for(var i=0;i<gco.length;i++){if(gco[i].search(/.*?favowahl.*/) != -1){var s1 = gco[i].replace(/.*?\=/, "").split(/#/);var c = 0;for(var c=0;c<s1.length;c++){var ss = s1[c].split(/\|/);var st = ss[0];var so = ss[1];var sh = ss[2];var jn = ss[3];var s2 = st ? st.split(/_/) : new Array("0","x","x","x");var s3 = sh ? sh.split(/_/) : new Array("xxx","0","0");var no2 = s2[0];var tor = getTore(no2);if(s2.length == 4)setFavoriten(no2,tor,s2,so,s3,jn);}break;}}}}function setFavoriten(r,tor,w,o,h,jn){var a7 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_EXTRAS+r);if(!a7)a7 = getTypeOfDocument(IDNAME_TD_TBLUNTEREINANDER_EXTRAS+r);if(!a7)return ;var minh = a7.firstChild;if(minh != null)minh = minh.nodeValue;else minh = "";while(a7.firstChild != null)a7.removeChild(a7.firstChild);if(typeof(minh) == "string")a7.appendChild(document.createTextNode(minh));if(tor[0].indexOf("-") != -1)return false;if((w[1]+w[2]+w[3]) == "xxx" &&   o == "2.5_xx" &&   (h[0]+"_"+h[1]+"_"+h[2]) == "xxx_0_0" &&   jn == "xx")return false;var imgsetfavo= document.createElement("img");var imgalt = document.createAttribute("title");imgalt.nodeValue = "1.Winner  2.Over/Under  3.Handicap  4.Tor ja/nein";imgsetfavo.setAttributeNode(imgalt);imgsetfavo.src = "favoimage?w="+w[1]+w[2]+w[3]+"&o="+o+"&h="+h[0]+"_"+h[1]+"_"+h[2]+"&j="+jn+"&t1="+tor[0]+"&t2="+tor[1];a7.appendChild(imgsetfavo);return true;}function setFontBig(elm){if(!elm)return ;elm.style.fontWeight = "bold";}function setUpdateInfo(elm,far){var val = "#D9D9D9";var fcol = "";if(far == "sphalbzeit"){val = "#000000";fcol = "yellow";}else if(far == "spende"){val = "#B0B0FF";fcol = "red";}else if(far == "spende"){val = "#D9D9D9";fcol = "black";}elm.style.backgroundColor = val;elm.style.color = fcol;}function setUpdateZeit(nr,elm,zeit,sta,status){if(zeit != ""){setUpdateInfo(elm,status);while(elm.firstChild != null)elm.removeChild(elm.firstChild);if(zeit == "0")zeit = "1";if(zeit == "HT" || zeit == "FT" || zeit == "ET" || zeit == "PN")isFTDel(IDNAME_TD_TBLNEBENEINANDER_ZEIT+nr);if(zeit.indexOf(":") != -1){elm.style.color = "#000000";elm.appendChild(document.createTextNode(zeit));isFTDel(IDNAME_TD_TBLNEBENEINANDER_ZEIT+nr);}else if(zeit.search(/^\d{1,3}$/) != -1 || zeit == "-1"){var xnr = IDNAME_TD_TBLNEBENEINANDER_ZEIT+nr;var xze = isNaN(Number(zeit)) ? -1 : Number(zeit);var xst = sta;addZeitlauf(xnr,xze,xst);if(xze == -1)zeit = "";else zeit += "'";elm.appendChild(document.createTextNode(zeit));}else elm.appendChild(document.createTextNode(zeit));setFontBig(elm);}if(timeZeit == null){timeZeit = window.setInterval("setUZWert()",L_MINUTE);}}function getZeitIndex(xn){if(!oZeit)return 0;for(var b=0;b<oZeit.length;b++){if(oZeit[b].id == xn)return b;}return oZeit.length;}function addZeitlauf(xn,xz,xs){var fiid = getZeitIndex(xn);if(fiid == -1)return ;if(fiid == oZeit.length)oZeit[fiid] = new ZeitObjekt();oZeit[fiid].id     = xn;oZeit[fiid].zeit   = xz;oZeit[fiid].status = xs;}function isFTDel(nr){for(var b=0;b<oZeit.length;b++){if(oZeit[b].id == nr){oZeit.splice(b,1);break;}}}function setUpdateHTS(elm,harr,isN){while(elm.firstChild != null)elm.removeChild(elm.firstChild);if(harr != "-")if(isN){elm.appendChild(document.createTextNode(harr));elm.style.fontWeight = "normal";}else{var se = harr.split(/:/);if(se[0] && se[1]){var texn = document.createTextNode(se[0]);var cbr = document.createElement("br");var texu = document.createTextNode(se[1]);elm.appendChild(texn);elm.appendChild(cbr);elm.appendChild(texu);elm.style.fontWeight = "normal";}}}function setUpdateExt(elm,ext){if((elm && elm.firstChild && elm.firstChild.nodeValue == ext) || !ext || !elm)return false;var te = "";if(elm.firstChild != null)te = elm.firstChild.nodeValue;if(te.length > 0 && typeof(te) == "string")elm.removeChild(elm.firstChild);if(ext.length > 1){elm.appendChild(document.createTextNode(ext));setFontBig(elm);}return true;}function updateLfdSpiele(nr,zt,zf,h,x,k,nw){if(getTypeOfDocument(IDNAME_TR_TBLNEBENEINANDER+nr)){var a1 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_WETTNUMMER+nr);if(a1)setFontBig(a1);var a2 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_ZEIT+nr);if(a2 && nw)setUpdateZeit(nr,a2,zt,k,zf);var a6 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_HTS+nr);if(a6 && h != "")setUpdateHTS(a6,h,true);var a7 = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_EXTRAS+nr);if(a7)setUpdateExt(a7,x);}if(getTypeOfDocument(IDNAME_TR_TBLUNTEREINANDER+nr)){var a1 = getTypeOfDocument(IDNAME_TD_TBLUNTEREINANDER_WETTNUMMER+nr);if(a1)setFontBig(a1);var a2 = getTypeOfDocument(IDNAME_TD_TBLUNTEREINANDER_ZEIT+nr);if(a2)setUpdateZeit(nr,a2,zt,k,zf);var a6 = null;var ht = h.split(/,/);for(var l=0;l<ht.length;l++){a6 = getTypeOfDocument(IDNAME_TD_TBLUNTEREINANDER_HTS+l+nr);if(a6)setUpdateHTS(a6,ht[l],false);}var a7 = getTypeOfDocument(IDNAME_TD_TBLUNTEREINANDER_EXTRAS+nr);if(a7)setUpdateExt(a7,x);}}function loadBStatistik(isMatch,ilg,id) {var rest = '';if(isMatch) {rest = betma[L_TV].replace(/\[LG\]/,ilg).replace(/\[MID\]/,id);} else {rest = betta[L_TV].replace(/\[LG\]/,ilg).replace(/\[TID\]/,id);}if(rest.length > 0)window.open(rest,'stat','top=0,left=0,width=850,height=600,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no');return false;}function markpos(obj){if(obj)obj.style.backgroundColor = "#ACB2B2";}function demarkpos(obj){if(obj)obj.style.backgroundColor = "";}function setUZWert(){for(var la=0;la<oZeit.length;la++){var xdid = getTypeOfDocument(oZeit[la].id);var xmin = oZeit[la].zeit;var xsta = oZeit[la].status;if(xdid){if(xmin == -1)xdid.firstChild.nodeValue = "";else{if((xsta == "1" && xmin <= L_ARR[0]) ||   (xsta == "2" && xmin <= L_ARR[1]) ||   (xsta == "3" && (xmin <= L_ARR[2] || xmin <= L_ARR[3]))){xdid.firstChild.nodeValue = getMinute(xsta,xmin)+"'";++oZeit[la].zeit;}else if((xsta == '4' && xmin <= L_ARR[4]) || (xsta == '5' && xmin <= L_ARR[5])) {xdid.firstChild.nodeValue = getMinute(xsta,xmin)+"'";++oZeit[la].zeit;}else xdid.firstChild.nodeValue = (--xmin)+"'+";}}}}function getMinute(stat,zeit){switch(zeit){case L_ARR[0]:if(stat == "2")return ++zeit;else return zeit;default:return zeit;}}function blinker(anz,jn,isok){/* var xxx = getTypeOfDocument(IDNAME_TD_TBLNEBENEINANDER_ZEIT+anz);if(isok && xxx){xxx.style.color = jn ? "" : "#FF0000";window.setTimeout("blinker('"+anz+"',"+(!jn)+","+isok+")",(L_SEKUNDE + 303));}*/}function schliessFeiertag(){var ft = getTypeOfDocument("feiertag");while(ft.firstChild != null)ft.removeChild(ft.firstChild);getTypeOfDocument("feiertag").style.visibility = "hidden";setCookieVisitBanner();return false;}/*function schliessUntermenue(obj){if(obj){obj.style.display = "none";obj.style.visibility = "hidden";}}*/function oeffneFavoWahl(qstri){window.open("favo?"+qstri,"fg","top=0,left=0,width=1000px,height=500,location=no,menubar=yes,resizable=no,scrollbars=yes,status=no,toolbar=no");return false;}function oeffneStatistik(mann1,mann2,isShow){var b = 0;var infd = getTypeOfDocument("spielinfoz");if(!infd){infd = getTypeOfDocument("spielinfozMobil");b = 1;}var infif = getTypeOfDocument("spielinfozif");if(infd){var name1 = getTypeOfDocument("infoteam1");var name2 = getTypeOfDocument("infoteam2");if(name1 && name2){if(!isShow){name1.style.border = "0";name2.style.border = "0";}else if(mann1 && mann2){name1.style.border = "1px solid black";name2.style.border = "1px solid black";if(name1.firstChild)name1.firstChild.nodeValue = mann1;if(name2.firstChild)name2.firstChild.nodeValue = mann2;}}infd.style.display = "inline";infd.style.top = "100px";infd.style.width = "530px";infd.style.height = "300px";infif.style.display = "inline";infif.style.width = "480px";if(b==1){infd.style.top='300px';infd.style.left='80px';}}return false;}function schliesseStatistik(){var infd = getTypeOfDocument("spielinfoz");if(!infd)infd = getTypeOfDocument("spielinfozMobil");var infif = getTypeOfDocument("spielinfozif");if(infd){infd.style.display = "none";infd.style.width = "0px";infd.style.height = "0px";infif.style.display = "none";infif.style.width = "0px";window.frames["meldfenster"].document.location.replace("about:blank");}var te1 = getTypeOfDocument("infoteam1");var te2 = getTypeOfDocument("infoteam2");if(te1)te1.firstChild.nodeValue = "";if(te2)te2.firstChild.nodeValue = "";return false;}function setSound(obj,m){if(m == 0){obj.src = ((!isSoundOn)?soundBild[1].src:soundBild[0].src);}else{obj.src = ((!isSoundOn)?soundBild[0].src:soundBild[1].src);isSoundOn = !isSoundOn;document.cookie = "soundon="+isSoundOn;}}function torboxOFF(obj,z){var ffg = getTypeOfDocument("tbstyle");var ffh = getTypeOfDocument("tbxsound");if(z == 0){obj.firstChild.nodeValue = !isTorboxAn() ? "ON" : "OFF";}else{obj.firstChild.nodeValue = isTorboxAn() ? "ON" : "OFF";document.cookie = "tboxon="+ (isTorboxAn() ? "N" : "Y");}if(isTorboxAn()){ffg.style.textDecoration = "";ffh.style.display = "inline";}else{ffg.style.textDecoration = "line-through";ffh.style.display = "none";}return false;}function setCookieVisitBanner(){document.cookie = "visitBanner=true; expires="+getLifeTimeCookie(300);}function coSpiele(spiele){document.cookie = "spielnr="+spiele.replace(/#$/,'')+";";}function coFavos(favos){document.cookie = "favowahl="+favos.replace(/#$/,'')+";";}function coTbox(tbox){document.cookie = "tbopt="+tbox+";";}function coCount(){var bbb = getcoCount();if(!bbb || bbb.search(/\d+/) == -1){document.location.reload();return false;}document.cookie = "count="+bbb+"; expires="+getLifeTimeCookie(5);return true;}function getLifeTimeCookie(m){var zti = new Date();var infm = zti.getTime() + (m*60*1000);zti.setTime(infm);return zti.toGMTString();}function getcoCount(){var coo = document.cookie;if(coo){var trc = coo.split(";");for(var i=0;i<trc.length;i++){if(trc[i].search(/.*?count.*/) != -1)return trc[i].replace(/.*?count.*?(\d+).*/,"$1");}}return null;}function changeCookie(na,wert){document.cookie = na+"="+wert+";";}function isTorboxAn(){var cna = document.cookie;if(cna){var trc = cna.split(";");for(var i=0;i<trc.length;i++){if(trc[i].search(/.*?tboxon.*/) != -1){var nva = trc[i].replace(/(.*?\=)|tboxon/,"");return nva == "Y";}}}return true;}function addValueCookies(liste,ttb){var yo  = false;var nrs = liste.split(",");for(var i=0;i<nrs.length;i++){if(setSpieleCookie(nrs[i]))yo = true;}if(yo)    alert("ADD ("+ttb+") TO '" + TEXT_ADD + "'");return false;}function addValueCookie(nr,ttb){if(setSpieleCookie(nr))    alert("ADD ("+ttb+") TO '" + TEXT_ADD + "'");return false;}function setSpieleCookie(w){var cna = document.cookie;var isv = false;var istb = false;var meldung = false;if(cna){var trc = cna.split(";");for(var i=0;i<trc.length;i++){if(trc[i].search(/.*?spielnr.*/) != -1){isv = true;var bvv = new Array();var nva = trc[i].replace(/(.*?\=)|spielnr/,"");if(nva.search(/.*?#.*/) == -1)bvv[0] = nva;else bvv = nva.split("#");var isd = false;for(var l=0;l<bvv.length;l++){if(bvv[l].replace(/ {1,}/g,"") == w){isd = true;break;}}if(isd)break;if(nva.replace(/ {1,}/g,"").length > 0)nva += "#";document.cookie = "spielnr="+nva+w+";";meldung = true;break;}}for(var i=0;i<trc.length;i++){if(trc[i].search(/.*?tbopt.*/) != -1){istb = true;var tbw = trc[i].split("=");if(tbw.length == 1 || (tbw.length == 2 && tbw[1].replace(/ {1,}/g,"") == ""))coTbox("auswahl");break;}}}if(!isv){document.cookie = "spielnr="+w+";";meldung = true;}if(!istb)document.cookie = "tbopt=auswahl;";if(meldung)return true;return false;}function openArchivInfo(name){var objm = getTypeOfDocument(name);var isKK = objm.style.display == "none" ? "block" : "none";objm.style.display = isKK;objm.style.textAlign = "center";return false;}var xmlHttpNews = null;function handleStateChangeNews(){getTypeOfDocument("news").innerHTML = "<br><br><img src='./img/wait.gif' width='16px' height='16px'><font color='#000000'>Load...</font>";if(xmlHttpNews.readyState==L_ARR_S[0]){if(xmlHttpNews.status==L_ARR_S[1]){getTypeOfDocument("news").innerHTML  = xmlHttpNews.responseText;xmlHttpNews.abort();}}}function loadNews(zeit){xmlHttpNews = createXmlHttpRequest();xmlHttpNews.open("POST", "news-archiv?z="+zeit ,true);xmlHttpNews.onreadystatechange=handleStateChangeNews;if(!xmlHttpNews)return false;xmlHttpNews.setRequestHeader("Content-Type", "text/html; charset=UTF-8");xmlHttpNews.setRequestHeader("Pragma", "no-cache");xmlHttpNews.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0");xmlHttpNews.setRequestHeader("If-Modified-Since", document.lastModified);xmlHttpNews.send("" +Math.random());return false;}
