document.Keno_state = nullfunction Keno_initializeOnLoad() {	document.Keno_state = new KenoState();	document.Keno_state.load(MM_findObj("state"))	document.Keno_state.spielscheinnummer = Keno_Plus5_quicktipp() 	document.Keno_state.draw()		NDS_helpStatic("Standard")}function Keno_plus5Teilnahme(bool) {	document.Keno_state.plus5_teilnahme = bool;		document.Keno_state.drawPlus5();	document.Keno_state.drawScheinEinsatz();}function Keno_anzahlZiehungen(anzahl) {	document.Keno_state.anzahl_ziehungen = anzahl;		document.Keno_state.drawAnzahlZiehungen();	document.Keno_state.drawScheinEinsatz();}function Keno_einsatz(anzahl) {	document.Keno_state.einsatz = anzahl;	document.Keno_state.drawEinsatz();	document.Keno_state.drawScheinEinsatz();		if(document.Keno_tempKasten) {		var k = document.Keno_tempKasten		k.drawClose()	}	document.Keno_state.drawPlus5();}function Keno_plus5_change(nr, wert) { 	var ziffer = parseInt(document.Keno_state.spielscheinnummer.substr(nr - 1, 1));		ziffer += wert;		if (ziffer == 10) {		ziffer = 0;	}	if (ziffer == -1) {		ziffer = 9;	}	var nummer = "";		for(var i = 0; i < 5; i++) {		if (i + 1 == nr) {			nummer += String(ziffer);		} else {			nummer += String(document.Keno_state.spielscheinnummer.substr(i, 1));		}	}		document.Keno_state.spielscheinnummer = nummer;	document.Keno_state.drawPlus5();}function Keno_Plus5_quicktipp() {	var number = "";		for(var i = 0; i < 5; i++) {		number += Math.floor(Math.random() * 10);	}		return number}function Keno_submit() {	if (document.Keno_state.anzahlFelder() > 0) {		MM_showHideLayers("bundesland_popup", '', 'show');	} else {		alert("Bitte füllen Sie mindestens ein Feld aus.")	}}function Keno_forward(to) {	var form = MM_findObj("state");	document.to = to;	MM_showHideLayers("bundesland_popup", '', 'hide');	document.Keno_state.save(form);	form.submit();}function Keno_makeFeldMap() {	var html = '<map name="FeldMap"> ';		for(var n = 0; n < 70; n++) {		var col = n % 7;		var row = Math.floor(n / 7);				var x1  = 27 + 19 * col;		var y1  = 42 + 20 * row;				var x2  = x1 + 14;		var y2  = y1 + 17;  				html += '<area shape="rect" coords="'+x1+','+y1+','+x2+','+y2+'" href="javascript:Keno_checkNumberOnCurrentField('+n+')" onFocus="if(this.blur)this.blur()">';			}		html += '</map>'		document.write(html)	}function Keno_Horoskop_OK() {	var hor = Keno_Horoskop_horoskopTipp()		var k   = new KenoKasten()	k.copyKasten(hor.kasten)	k.deleteAfter(document.Keno_tempKasten.should_typ)		document.Keno_tempKasten = k;	document.Keno_tempKasten.drawClose()	Keno_hideHoroskop()	}function Keno_showHoroskop() {	NDS_helpStatic("HoroskopFormat", "info")	NDS_showLayers(document.Keno_horoskopLayer)}function Keno_hideHoroskop() {	NDS_hideLayers(document.Keno_horoskopLayer)}function Keno_showSub(which) {	document.Keno_cur = which;				document.Keno_tempKasten = new KenoKasten();	document.Keno_tempKasten.copyKasten(document.Keno_state.kasten[which].kasten)	document.Keno_tempKasten.drawClose()		var obj1 = document.getElementById('e100');	var obj2 = document.getElementById('e200');	var obj3 = document.getElementById('e500');	var obj4 = document.getElementById('e1000');		if (obj1) {		obj1.style.top="346"		obj1.style.left="563"		obj2.style.top="346"		obj2.style.left="596"		obj3.style.top="346"		obj3.style.left="628"		obj4.style.top="346"		obj4.style.left="661"	}		NDS_showLayers(document.Keno_subLayer)		Keno_tippHelp()}function Keno_tippHelp() {	var obj = MM_findObj("Kreuze");		if(document.Keno_tempKasten.isComplete()) {		obj.style.display = 'none';	} else {		obj.style.display = '';	}}function Keno_hideSub() {	document.Keno_tempKasten = null	document.Keno_cur = null	document.Keno_state.draw()		var obj1 = document.getElementById('e100');	var obj2 = document.getElementById('e200');	var obj3 = document.getElementById('e500');	var obj4 = document.getElementById('e1000');	if (obj1) {		obj1.style.top="357"		obj1.style.left="261"		obj2.style.top="357"		obj2.style.left="294"		obj3.style.top="357"		obj3.style.left="326"		obj4.style.top="357"		obj4.style.left="359"	}	NDS_showLayers(["spielscheinnummerLayer"])	NDS_showLayers(document.Keno_mainLayer)	NDS_hideLayers(document.Keno_subLayer)	NDS_hideLayers(document.Keno_subXLayer)	Keno_hideHoroskop()			NDS_helpStatic("Standard")}function Keno_abort() {		Keno_hideSub()}function Keno_saveTemp() {	document.Keno_state.kasten[document.Keno_cur] = document.Keno_tempKasten;		Keno_hideSub()}function Keno_deleteAll() {	if(confirm("Wollen Sie wirklich alle Kreuze löschen?")) {		document.Keno_state.clear();		if (!document.Keno_tempKasten) {			document.Keno_tempKasten = new KenoKasten();			document.Keno_tempKasten.copyKasten(document.Keno_state.kasten[0].kasten)			document.Keno_tempKasten.drawClose();		}	}	document.Keno_state.draw()}function Keno_quicktippAll() {		Keno_hideHoroskop()		document.Keno_state.quicktipp(document.Keno_tempKasten.should_typ);		Keno_showSub(document.Keno_cur)		NDS_helpStatic("Quicktipp")}function Keno_quicktipp(typ) {	MM_showHideLayers("quicktip", '', 'hide');		var anz = document.quicktipp;	var k;		for(var i = 0; i< Keno_anzahlFelder; i++) {		if (anz > 0 && document.Keno_state.kasten[i].length == 0) {			k = new KenoKasten();			k.should_typ = typ			k.quicktipp();				document.Keno_state.kasten[i] = k;			anz--;		}	}	Keno_hideSub()}function Keno_quicktipp_sub(typ) {	document.Keno_tempKasten = new KenoKasten();	document.Keno_tempKasten.should_typ = typ;	document.Keno_tempKasten.quicktipp();	document.Keno_tempKasten.drawClose();}function Keno_quicktipp_popup(anz) {	document.quicktipp = anz;		MM_showHideLayers("quicktip", '', 'show');}function Keno_checkNumberOnCurrentField(n) { // n is zero based	var k = document.Keno_tempKasten;	k.addX(n+1);	k.drawClose();//	document.Keno_state.kasten[document.Keno_cur] = document.Keno_tempKasten;document.Keno_state.drawScheinEinsatz();	}function Keno_uncheckX(n) {	var k = document.Keno_tempKasten;		k.delNthX(n);	k.drawClose()//	document.Keno_state.kasten[document.Keno_cur] = document.Keno_tempKasten; document.Keno_state.drawScheinEinsatz();	}function Keno_typ(n) {	var k = document.Keno_tempKasten;		if(n < k.length) {		k.deleteAfter(n)	}		k.should_typ = n;	k.drawClose()}function Keno_plus5InfoPopup() {	var win = window.open('../../info_popups/plus5.html','plus5Info','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=281,height=310')	win.focus()}document.Keno_gewinnplaene = [];document.Keno_gewinnplaene[10] = [	[10, "100.000", "200.000", "500.000", "1.000.000", '1 : 2.147.181'],     [9,  "1.000",  "2.000",   "5.000"  , "10.000", '1 : 47.238'],                                               	[8,  "100",    "200",     "500"    , "1.000", '1 : 2.571'],                   	[7,  "15",     "30",      "75"     , "150", '1 : 261'],        	[6,  "5",      "10",      "25"     , "50", '1 : 44'],        	[5,  "2",      "4",       "10"     , "20", '1 : 12'],	[0,  "2",      "4",       "10"     , "20", '1 : 39']];document.Keno_gewinnplaene[9] = [	[9, "50.000", "100.000", "250.000", "500.000", '1 : 387.197'],                                                	[8, "1.000",  "2.000",   "5.000"  , "10.000", '1 : 10.325'],                   	[7, "20",     "40",      "100"    , "200", '1 : 685'],        	[6, "5",      "10",      "25"     , "50", '1 : 86'],        	[5, "2",      "4",       "10"     , "20", '1 : 18'],	[0,	"2",      "4",       "10"      , "20", '1 : 26']];document.Keno_gewinnplaene[8] = [	[8, "10.000", "20.000", "50.000", "100.000", '1 : 74.941'],                                                	[7, "100", "200",    "500"   , "1.000", '1 : 2.436'],                   	[6, "15",  "30",     "75"    , "150", '1 : 199'],        	[5, "2",   "4",      "10"    , "20", '1 : 31'],        	[4, "1",   "2",      "5"     , "10", '1 : 8'],	[0, "1",   "2",      "5"     , "10", '1 : 18']];document.Keno_gewinnplaene[7] = [	[7, "1.000", "2.000", "5.000" , "10.000", '1 : 15.464'],                                                	[6, "100",   "200",   "500"   , "1.000", '1 : 619'],                   	[5, "12",    "24",    "60"    , "120", '1 : 63'],        	[4, "1",     "2",     "5"     , "10", '1 : 13']        ];document.Keno_gewinnplaene[6] = [	[6, "500", "1.000", "2.500", "5.000", '1 : 3.383'],                                                	[5, "15",  "30",    "75"   , "150", '1 : 169'],                   	[4, "2",   "4",     "10"   , "20", '1 : 22'],        	[3, "1",   "2",     "5"   , "10", '1 : 6']        ];document.Keno_gewinnplaene[5] = [	[5, "100", "200", "500" , "1.000", '1 : 781'],                                                	[4, "7",   "14",  "35"  , "70", '1 : 50'],                   	[3, "2",   "4",   "10"  , "20", '1 : 9']  ];document.Keno_gewinnplaene[4] = [	[4, "22", "44", "110", "220", '1 : 189'],                                                	[3, "2",  "4",  "10" , "20", '1 : 16'],                   	[2, "1",  "2",  "5"  , "10", '1 : 4']        ];document.Keno_gewinnplaene[3] = [	[3, "16", "32", "80" , "160", '1 : 48'],                                                	[2, "1",  "2",  "5"  , "10", '1 : 6']                   ];document.Keno_gewinnplaene[2] = [	[2, "6", "12", "30" , "60", '1 : 13']                                                      ];document.Keno_mainLayer = [	"scheinAbgebenBTNLayer",	"scheinPersSpeichernBTNLayer",	"scheinPersLadenBTNLayer",	"spezialInfoLayer"];document.Keno_horoskopLayer = [	"horoskopFeldLayer",	"horoskopMenuLayer",	"horoskopInputLayer"];document.Keno_banditLayer = [	"banditLayer",	"banditHiderLayer",	//"banditDownLayer",	"banditNummerLayer",	"banditSpeichernBTNLayer",	"banditAbbrechenBTNLayer"];document.Keno_subLayer = [	"subLayer",	"subKenotyp2Layer",	"subKenotyp3Layer",	"subKenotyp4Layer",	"subKenotyp5Layer",	"subKenotyp6Layer",	"subKenotyp7Layer",	"subKenotyp8Layer",	"subKenotyp9Layer",	"subKenotyp10Layer",	"subGewinnplanAnzahlLayer",	"KreuzeNeu", 	"subGewinnplanQuoteLayer",	"subWahrscheinlichkeitLayer"];document.Keno_subXLayer = [	"subX0",	"subX1",	"subX2",	"subX3",	"subX4",	"subX5",	"subX6",	"subX7",	"subX8",	"subX9"];document.Keno_persSaveLayer = [	"persSaveBGLayer",	"persSaveNameLayer",	"persHiderLayer"];document.Keno_persLoadLayer = [	"persLoadLayer",	"persHiderLayer"];