 <!--Copyright 2006 - 2009 - All rights reserved - S.Vandevelde - pick3stats.com-->

 <!--Modification of this script is an extreme violation of international copyright laws.-->

 

 var bang=0;

 var i=0;

 var a=0;

 var b=0;

 var c=0;

 var v;

 var w;

 var x=0;

 var y=0;

 var z=0;

 var f=0;

 var s=0;

 var t=0;

 var ff=0;

 var ss=0;

 var tt=0;

 var waarde;





 var Mxx;

 var Myy;

 var Slo;

 var Shi;

 var Sno;

 var kleur="FFFF00";

 var roekie="";

 var sloekie="";

 var finalkie="";

 var finalkies="";

 var trios = new Array(250);

 var his;

 var pairs = new Array(250);

 var itali = new Array(1000);

 var recorder = new Array(1000);

 var record=0;

 var recordtype = new Array(1000);

 var TTT=0;

 var draw=0;

 var adigit1;

 var adigit2;

 var apair1;

 var apair2;

 var apairxx1;

 var apairxx2;

 var apairxy1;

 var apairxy2;

 var atriple1;

 var adouble1;

 var asingle1;

 var atriple2;

 var adouble2;

 var asingle2;

 var adoueo1;

 var adoueo2;

 var atrieo1;

 var atrieo2;

 var aabc1;

 var aabc2;

 var aaab1;

 var aaab2;

 var root1;

 var root2;

 var lds1;

 var lds2;

 var lengte;

 var outp;

 var play=0;

 var makesum;

 var makeroot;

 var makelds;

 var testset="";

 var settest="";

 var sortU=1;

 var sortD=7;

 var sortParU="ABC";

 var sortParD="AO";

 var lengtekeuze=0;

 var realv=0;

 var keepbang=0;

 var totalkeep=10;

 var orders=0;

 var invertor="";

 var investor="";

 var ripley=0;

 var startserie="";

 var switchkeuze=0;

 var skippar=0;

 var randomstring = "";

 var randomseries = "";

 var rnum=0;

 var chars = "0123456789";

 var simufinalkie="";

 var simufinalkies="";

 var simulengte;

 var topo;

 var checker=0;

 var wins=0;

 var winb=0;

 var wint=0;

 var startcheck=0;

 var hittype="";

 var playtype="";

 var oldball=0;

 var newball=0;



 var thcheck="";

 var wager=1;

 



schc=[,0,0];

chv=[,0,0,0,0,0,0,0,0,0,0];

sdtv=[,0,0,0];

eov=[,0,0,0,0];

lhv=[,0,0,0,0];

maskdi=[0,0,0,0,0,0,0,0,0,0];

coloro=[4,4,4,4,4,4,4,4,4,4];

keeper=[1,1,1,1,1,1,1,1,1,1];

sumavg=[1,3,6,10,15,21,28,36,45,55,63,69,73,75,75,73,69,63,55,45,36,28,21,15,10,6,3,1];

sumavg1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

sumavg2=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

digits=[,"T","D","D","D","D","D","D","D","D","D","S","S","S","S","S","S","S","S","D","D","D","D","D","D","D","D","D","T","D","S","S","S","S","S","S","S","S","S","S","S","S","S","D","S","S","S","S","S","S","S","S","D","T","D","S","S","S","S","S","S","S","S","S","D","S","S","D","S","S","S","S","S","D","T","D","D","D","S","S","S","S","S","D","S","S","S","S","S","D","D","D","D","D","D","D","D","D","D","S","D","D","S","S","S","D","S","S","S","S","S","D","D","S","S","D","D","D","S","S","S","S","S","S","S","S","S","S","S","T","D","S","S","S","S","S","D","S","S","D","S","S","D","D","T","D","S","S","S","S","S","D","S","S","S","D","S","S","D","D","D","S","D","D","S","S","D","S","D","D","D","D","D","D","D","S","S","D","S","S","S","D","D","S","S","S","S","S","D","S","D","S","S","T","D","S","D","D","S","D","S","D","T","D","D","D","S","S","D","D","D","D","S","D","D","S","D","T","D","D","T"];



sums=[,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,7,8,9,10,11,12,13,14,15,16,17,18,19,20,8,9,10,11,12,13,14,15,16,17,18,19,8,9,10,11,12,13,14,15,16,17,18,19,9,10,11,12,13,14,15,16,17,18,9,10,11,12,13,14,15,16,17,18,10,11,12,13,14,15,16,17,11,12,13,14,15,16,12,13,14,15,]



summer=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]



eo=[,6,5,6,5,6,5,6,5,6,5,4,5,4,5,4,5,4,5,4,3,4,3,4,3,4,3,4,3,4,5,4,5,4,5,4,5,6,5,6,5,6,5,6,3,4,5,4,5,4,5,4,5,3,6,5,6,5,6,5,4,5,4,5,4,3,4,5,4,3,4,3,4,3,6,4,3,4,5,4,5,6,5,6,3,4,5,4,5,6,5,6,5,6,5,5,4,3,6,5,4,3,4,5,4,3,4,5,4,5,4,5,4,4,5,4,3,4,5,4,3,4,5,6,3,4,5,4,5,6,3,4,5,4,3,4,5,4,5,4,5,4,3,6,3,5,4,3,4,5,4,5,6,5,4,3,6,5,4,6,5,4,3,6,5,4,3,4,5,4,3,4,5,6,5,4,5,6,5,4,5,4,5,5,4,5,6,5,4,3,6,5,4,3,6,5,4,3,4,5,4,3,6,4,3,4,5,4,5,6,5,5,4,3,6,5,4,6,5,4,3];



lh=[,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,6,3,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,3,3,3,3,4,4,4,5,5,4,4,5,5,5,5,5,5,6,6,6,3,3,4,3,4,5,4,4,4,5,5,5,5,5,5,6,6,6,3,3,4,4,4,4,4,5,5,4,5,5,5,5,6,6,3,3,4,4,4,4,4,5,4,5,5,5,5,6,6,6,3,3,4,4,4,5,4,4,5,4,5,5,6,6,3,3,4,5,4,4,5,4,5,4,5,6,3,4,4,4,4,4,5,4,5,5,6,6,3,4,4,4,5,4,5,4,5,6,3,3,4,5,4,4,5,5,6,6,3,4,4,4,5,4,5,6,3,4,5,4,5,6,3,4,5,6];


sales=["Switch To Pick3stats Pro >>","Switch To Pick3stats Pro >>","Switch To Pick3stats Pro >>","Switch To Pick3stats Pro >>","Switch To Pick3stats Pro >>","Switch To Pick3stats Pro >>","Switch To Visual Mode >>","Engage The Pick 3 Simulator >>","Enable Hot-Cold Wheeling Engine >>", "Show Lowest Statistical Averages >>", "Explore Skip Values >>", "Playback Entered Draw Results >>","Enable Root Values >>", "Show Last Digit Of The Sum >>", "Track All Pairs >>", "Open The Data-Grabber >>", "Show Payout Plan Simulation >>"];

var randosales;




 function ChangeText() {

 play=0;

 testset="";

 tang=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

 tangh=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

 for (i=1; i<=220; i++){

   

   kleur="C0FFC0";

   waarde=trios[i];

   

   

   hallos();

   

   

   



   

   if (sdtv[1]==1 && digits[i]=="S"){kleur="5B5B5B"};

   if (sdtv[2]==1 && digits[i]=="D"){kleur="5B5B5B"};

   if (sdtv[3]==1 && digits[i]=="T"){kleur="5B5B5B"};

   

   if (eov[1]==1 && eo[i]==3){kleur="5B5B5B"};

   if (eov[2]==1 && eo[i]==6){kleur="5B5B5B"};

   if (eov[3]==1 && eo[i]==4){kleur="5B5B5B"};

   if (eov[4]==1 && eo[i]==5){kleur="5B5B5B"};

   

   if (lhv[1]==1 && lh[i]==3){kleur="5B5B5B"};

   if (lhv[2]==1 && lh[i]==6){kleur="5B5B5B"};

   if (lhv[3]==1 && lh[i]==4){kleur="5B5B5B"};

   if (lhv[4]==1 && lh[i]==5){kleur="5B5B5B"};

   

   for (x=0; x<=27; x++){

   if (summer[x]==1 && sums[i]==x){kleur="5B5B5B"};

   }

   

   if (his==1 && itali[waarde]=="y"){kleur="5B5B5B"};

   

   for (x=1; x<=3; x++){

   if (maskdi[waarde.substring(x-1,x)]==1){kleur="5B5B5B"};

   }

   if (keepbang==3 && totalkeep<10){kleur="5B5B5B"};

   

   if (pairs[i]=="y"){

   if(kleur=="FFFED1"){kleur="f1ee03"};

   if(kleur=="C0FFC0"){kleur="1df774"};

   if(kleur=="FFD1D1"){kleur="f46464"};

   if(schc[2]==1){kleur="5B5B5B"};

   } else {if(schc[1]==1){kleur="5B5B5B"}}

   

   document.getElementById("resultat"+i).style.backgroundColor=kleur;

   if (kleur!="5B5B5B" && bang<=15){testset=testset+waarde;play=play+1;if (pairs[i]=="y"){tangh[bang]=tangh[bang]+1}else{tang[bang]=tang[bang]+1}}

   }

   



   SortOutput();

   
  if(lengte>0){
  randosales = (Math.floor(Math.random()*16)+1);
  document.forms[0].salesmes.value=sales[randosales];
  }
  else{document.forms[0].salesmes.value=sales[0];}
  }

  

 function keep(v){

 totalkeep=0;

 if(keeper[v]==0){keeper[v]=1}else{keeper[v]=0};

 for (x=0; x<=9; x++){totalkeep=totalkeep+keeper[x]};

 ChangeText();

 }

 



 

 

 function Sort(v){

 if (v<7){sortU=v} else {sortD=v};

 if (sortU==1){sortParU="ABC"};

 if (sortU==2){sortParU="ACB"};

 if (sortU==3){sortParU="BAC"};

 if (sortU==4){sortParU="BCA"};

 if (sortU==5){sortParU="CAB"};

 if (sortU==6){sortParU="CBA"};

 

 if (sortD==7){sortParD="AO"};

 if (sortD==8){sortParD="SO"};

 if (sortD==9){sortParD="DO"};

 

 SortOutput();

 }

 

 function SortOutput(){

 for (x=0; x<=9; x++){

 	for (y=0; y<=9; y++){

		for (z=0; z<=9; z++){

		recorder[x+""+y+""+z]=0;

		recordtype[x+""+y+""+z]=0;

		}

	}

}

 settest="";

 outp="";

 for (x=1; x<=testset.length; x+=3){

 if (testset.substring(x-1,x)<testset.substring(x,x+1) && testset.substring(x,x+1)<testset.substring(x+1,x+2)){



 recorder[testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2)]=6;

 recorder[testset.substring(x-1,x)+testset.substring(x+1,x+2)+testset.substring(x,x+1)]=6;

 recorder[testset.substring(x,x+1)+testset.substring(x-1,x)+testset.substring(x+1,x+2)]=6;

 recorder[testset.substring(x,x+1)+testset.substring(x+1,x+2)+testset.substring(x-1,x)]=6;

 recorder[testset.substring(x+1,x+2)+testset.substring(x-1,x)+testset.substring(x,x+1)]=6;

 recorder[testset.substring(x+1,x+2)+testset.substring(x,x+1)+testset.substring(x-1,x)]=6;

 

 if (sortU==1){settest=settest+testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2)}

 if (sortU==2){settest=settest+testset.substring(x-1,x)+testset.substring(x+1,x+2)+testset.substring(x,x+1)}

 if (sortU==3){settest=settest+testset.substring(x,x+1)+testset.substring(x-1,x)+testset.substring(x+1,x+2)}

 if (sortU==4){settest=settest+testset.substring(x,x+1)+testset.substring(x+1,x+2)+testset.substring(x-1,x)}

 if (sortU==5){settest=settest+testset.substring(x+1,x+2)+testset.substring(x-1,x)+testset.substring(x,x+1)}

 if (sortU==6){settest=settest+testset.substring(x+1,x+2)+testset.substring(x,x+1)+testset.substring(x-1,x)}

 }

 

 

 

 

 

 if (testset.substring(x-1,x)==testset.substring(x,x+1) && testset.substring(x,x+1)<testset.substring(x+1,x+2)){

 

 recorder[testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2)]=3;

 recorder[testset.substring(x-1,x)+testset.substring(x+1,x+2)+testset.substring(x,x+1)]=3;

 recorder[testset.substring(x+1,x+2)+testset.substring(x-1,x)+testset.substring(x,x+1)]=3;

 

 if (sortD==7){settest=settest+testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2)}

 if (sortD==8){settest=settest+testset.substring(x-1,x)+testset.substring(x+1,x+2)+testset.substring(x,x+1)}

 if (sortD==9){settest=settest+testset.substring(x+1,x+2)+testset.substring(x-1,x)+testset.substring(x,x+1)}

 }

 if (testset.substring(x,x+1)==testset.substring(x+1,x+2) && testset.substring(x-1,x)<testset.substring(x+1,x+2)){

 

 recorder[testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2)]=3;

 recorder[testset.substring(x,x+1)+testset.substring(x-1,x)+testset.substring(x+1,x+2)]=3;

 recorder[testset.substring(x,x+1)+testset.substring(x+1,x+2)+testset.substring(x-1,x)]=3;

 

 if (sortD==7){settest=settest+testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2)}

 if (sortD==8){settest=settest+testset.substring(x,x+1)+testset.substring(x-1,x)+testset.substring(x+1,x+2)}

 if (sortD==9){settest=settest+testset.substring(x,x+1)+testset.substring(x+1,x+2)+testset.substring(x-1,x)}

 }

 if (testset.substring(x-1,x)==testset.substring(x,x+1) && testset.substring(x,x+1)==testset.substring(x+1,x+2)){

 settest=settest+testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2);

 recorder[testset.substring(x-1,x)+testset.substring(x,x+1)+testset.substring(x+1,x+2)]=1;

 }

 settest=settest+" ";

 record=settest.substring(((settest.length)-4),((settest.length)-1));

 recordtype[record]=1;

 }

 for (x=0; x<=9; x++){

 	for (y=0; y<=9; y++){

		for (z=0; z<=9; z++){

		if (recordtype[x+""+y+""+z]==1){outp=outp+x+""+y+""+z+" "}

		}

	}

}



 document.forms[0].output.value="OUTPUT ("+sortParU+" & "+sortParD+") : "+play+" combo(s)"+"\n"+outp;

 

 

 }

 

 function Hist(){

 if(document.getElementById("DH").style.backgroundColor==Mxx){document.getElementById("DH").style.backgroundColor=Myy;his=1}else{document.getElementById("DH").style.backgroundColor=Mxx;his=0};

 ChangeText();

 }

 

 

 

 function hallos(){

 bang=0;

 keepbang=0;

 for (x=1; x<=3; x++){

 if (keeper[waarde.substring(x-1,x)]==1){keepbang=keepbang+1};

 for (y=0; y<=9; y++){

 if (waarde.substring(x-1,x)==y){bang=bang+coloro[y]};

 }

 }

 if(bang!=12){startcheck=1};

 }

 

 function maskSDT(v){

 if(document.getElementById("SDT"+v).style.backgroundColor==Mxx){document.getElementById("SDT"+v).style.backgroundColor=Myy;sdtv[v]=1}else{document.getElementById("SDT"+v).style.backgroundColor=Mxx;sdtv[v]=0};

ChangeText();

 }

 function maskEO(v){

 if(document.getElementById("EO"+v).style.backgroundColor==Mxx){document.getElementById("EO"+v).style.backgroundColor=Myy;eov[v]=1}else{document.getElementById("EO"+v).style.backgroundColor=Mxx;eov[v]=0};

ChangeText();

 }

 function maskLH(v){

 if(document.getElementById("LH"+v).style.backgroundColor==Mxx){document.getElementById("LH"+v).style.backgroundColor=Myy;lhv[v]=1}else{document.getElementById("LH"+v).style.backgroundColor=Mxx;lhv[v]=0};

ChangeText();

 }

 

 

 

 function mask(v){

 if(document.getElementById("D"+v).style.backgroundColor==Mxx){document.getElementById("D"+v).style.backgroundColor=Myy;maskdi[v]=1}else{document.getElementById("D"+v).style.backgroundColor=Mxx;maskdi[v]=0};

 ChangeText();

 }

 
function maskSUM(v){

if(document.getElementById("SUM"+v).style.backgroundColor==Mxx){document.getElementById("SUM"+v).style.backgroundColor=Myy;summer[v]=1}else{document.getElementById("SUM"+v).style.backgroundColor=Mxx;summer[v]=0};
ChangeText();

 }

 
function starten(){

 topo=location.href;

 if (topo.indexOf('http://')<0){window.location.href="http://www.pick3stats.com"};

 if(navigator.userAgent.indexOf("Firefox")!=-1){

 document.forms[0].series.style.width="94%";
 
 document.forms[0].salesmes.style.width="94%";

 document.forms[0].resetst.style.width="30%";

 document.forms[0].resma.style.width="34%";

 document.forms[0].last.style.width="30%";

 document.forms[0].output.style.width="94%";

 }

 Mxx=document.getElementById("Mxx").style.backgroundColor;

 Myy=document.getElementById("Myy").style.backgroundColor;

 Slo=document.getElementById("low").style.color;

 Shi=document.getElementById("hig").style.color;

 Sno=document.getElementById("nor").style.color;

 for (i=1; i<=220; i++){trios[i] = document.getElementById("resultat"+i).firstChild.nodeValue};

 Stats0();

 Graph0();

 document.forms[0].series.value = "Enter Draw Results ...";


 }




function setURL(){
window.location.href="members.html";
}

 function Graph0(){

 

summer=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

chv=[,0,0,0,0,0,0,0,0,0,0];

sdtv=[,0,0,0];

eov=[,0,0,0,0];

lhv=[,0,0,0,0];

maskdi=[0,0,0,0,0,0,0,0,0,0];

schc=[,0,0];

keeper=[1,1,1,1,1,1,1,1,1,1];

totalkeep=10;

 document.forms[0].digit0.checked=false;

 document.forms[0].digit1.checked=false;

 document.forms[0].digit2.checked=false;

 document.forms[0].digit3.checked=false;

 document.forms[0].digit4.checked=false;

 document.forms[0].digit5.checked=false;

 document.forms[0].digit6.checked=false;

 document.forms[0].digit7.checked=false;

 document.forms[0].digit8.checked=false;

 document.forms[0].digit9.checked=false;



document.getElementById("DH").style.backgroundColor=Mxx;his=0;





 

 for (x=0; x<=27; x++){

 document.getElementById("SUM"+x).style.backgroundColor=Mxx;

 }


 for (x=0; x<=9; x++){

 	  

      if (x>0 && x<4){document.getElementById("SDT"+x).style.backgroundColor=Mxx};

	  if (x>0 && x<5){document.getElementById("EO"+x).style.backgroundColor=Mxx;document.getElementById("LH"+x).style.backgroundColor=Mxx};

      document.getElementById("D"+x).style.backgroundColor=Mxx;

      

   }



 

 for (y=1; y<=220; y++){pairs[y]="n"}

 

 

 ChangeText();

 }

 

 function Stats0(){

 coloro=[4,4,4,4,4,4,4,4,4,4];

 randomseries = "";

 

 

 document.forms[0].series.value = "";

 allzero();

 testor();

 test();

 if(his==1 || startcheck==1){startcheck=0;ChangeText()};

 }

 

 function allzero(){

 for (x=1; x<=220; x++){waarde=trios[x];itali[waarde]="n"};



   

   document.getElementById("stat").firstChild.nodeValue="Draws: 0";

   

   

   for (x=1; x<=3; x++){

   document.getElementById("OOO"+x).style.color=Sno;

   document.getElementById("EEE"+x).style.color=Sno;

   document.getElementById("OOE"+x).style.color=Sno;

   document.getElementById("EEO"+x).style.color=Sno;

   document.getElementById("LLL"+x).style.color=Sno;

   document.getElementById("HHH"+x).style.color=Sno;

   document.getElementById("LLH"+x).style.color=Sno;

   document.getElementById("LHH"+x).style.color=Sno;

   document.getElementById("OOO"+x).firstChild.nodeValue="-";

   document.getElementById("EEE"+x).firstChild.nodeValue="-";

   document.getElementById("OOE"+x).firstChild.nodeValue="-";

   document.getElementById("EEO"+x).firstChild.nodeValue="-";

   document.getElementById("LLL"+x).firstChild.nodeValue="-";

   document.getElementById("HHH"+x).firstChild.nodeValue="-";

   document.getElementById("LLH"+x).firstChild.nodeValue="-";

   document.getElementById("LHH"+x).firstChild.nodeValue="-";

   }

   document.getElementById("OOE3").firstChild.nodeValue="";

   document.getElementById("EEO3").firstChild.nodeValue="";

   document.getElementById("LLH3").firstChild.nodeValue="";

   document.getElementById("LHH3").firstChild.nodeValue="";

   for (x=0; x<=27; x++){

   document.getElementById("SUM"+x).firstChild.nodeValue="-";

   document.getElementById("SUM"+x).style.color=Sno;

   }

   

   

   for (x=1; x<=9; x++){

   document.getElementById("ABC"+x).firstChild.nodeValue="-";

   document.getElementById("ABC"+x).style.color=Sno;

   }

   

   for (x=0; x<=9; x++){


   document.getElementById("DT"+x).style.color=Sno;

   document.getElementById("DT"+x).firstChild.nodeValue="-";

   }

   

   

   for (x=1; x<=3; x++){

   document.getElementById("TSDT"+x).style.color=Sno;

   document.getElementById("TSDT"+x).firstChild.nodeValue="-";

   }

 }

 



 

 

 

 function setDraw(v){

 ripley=0;

 if (lengtekeuze>0){

 if (v==1){lengtekeuze=lengtekeuze-3};

 if (v==2){lengtekeuze=lengtekeuze+3};

 if (v==10){lengtekeuze=lengtekeuze-30};

 if (v==20){lengtekeuze=lengtekeuze+30};

 if (lengtekeuze>lengte){lengtekeuze=lengte};

 if (lengtekeuze<3){lengtekeuze=3};

 }

 tellen();

 }

 

 function test(){

 

 lengtekeuze=0;

 changeinput();

 }

 

 function testor(){

 

 document.forms[0].last.value="GO";

 







 




 }



 

 function changeinput(){

 finalkie="";

 

 document.forms[0].series.value=document.forms[0].series.value.replace(/[^\d]+/g, ''); 

 lengte=parseInt(document.forms[0].series.value.length/3)*3;


 finalkies=document.forms[0].series.value;

 for (x=1; x<=lengte; x+=3){

   finalkie=finalkie+finalkies.substring(x-1,x+2)+" ";

   }

 document.forms[0].series.value=finalkie;

 }

 

 function tellen(){

 

 for (x=1; x<=220; x++){waarde=trios[x];itali[waarde]="n"};

 roekie="";

 sloekie="";

 

 draw=0;

 TTT=0;

 skippar=0;

 sdt=[0,0,0,0];

 sum=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

 root=[0,0,0,0,0,0,0,0,0,0];

 lds=[0,0,0,0,0,0,0,0,0,0];

 EEOO=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

 LLHH=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

 tel=[0,0,0,0,0,0,0,0,0,0];

 pp0=[0,0,0,0,0,0,0,0,0,0];

 pp1=[0,0,0,0,0,0,0,0,0,0];

 pp2=[0,0,0,0,0,0,0,0,0,0];

 pp3=[0,0,0,0,0,0,0,0,0,0];

 pp4=[0,0,0,0,0,0,0,0,0,0];

 pp5=[0,0,0,0,0,0,0,0,0,0];

 pp6=[0,0,0,0,0,0,0,0,0,0];

 pp7=[0,0,0,0,0,0,0,0,0,0];

 pp8=[0,0,0,0,0,0,0,0,0,0];

 pp9=[0,0,0,0,0,0,0,0,0,0];

 order=[0,0,0,0,0,0,0,0,0,0];

 skipdigit=[0,0,0,0,0,0,0,0,0,0];

 skipsum=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

 skiproot=[0,0,0,0,0,0,0,0,0,0];

 skiplds=[0,0,0,0,0,0,0,0,0,0];

 pp0skip=[0,0,0,0,0,0,0,0,0,0];

 pp1skip=[0,0,0,0,0,0,0,0,0,0];

 pp2skip=[0,0,0,0,0,0,0,0,0,0];

 pp3skip=[0,0,0,0,0,0,0,0,0,0];

 pp4skip=[0,0,0,0,0,0,0,0,0,0];

 pp5skip=[0,0,0,0,0,0,0,0,0,0];

 pp6skip=[0,0,0,0,0,0,0,0,0,0];

 pp7skip=[0,0,0,0,0,0,0,0,0,0];

 pp8skip=[0,0,0,0,0,0,0,0,0,0];

 pp9skip=[0,0,0,0,0,0,0,0,0,0];

 skipsdt=[0,0,0,0];

 skipEEOO=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

 skipLLHH=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

 skiporder=[0,0,0,0,0,0,0,0,0,0];

 

 

 

 for (x=1; x<=lengte; x++){

 y=finalkies.substring(x-1,x);

 roekie=roekie+y;

 }

 

 if (lengtekeuze==0){lengtekeuze=lengte};

 

 for (x=1; x<=roekie.length; x+=3){

 

 for (y=0; y<=9; y++){

 if (y==roekie.substring(x-1,x)){sloekie=sloekie+y}

 if (y==roekie.substring(x,x+1)){sloekie=sloekie+y}

 if (y==roekie.substring(x+1,x+2)){sloekie=sloekie+y}

 }

 }

 

 invertor="";

 investor="";

 startserie=roekie;

 switchkeuze=lengtekeuze;

   for (x=lengtekeuze; x>=3;x-=3){

   invertor=invertor+roekie.substring(x-3,x);

   investor=investor+sloekie.substring(x-3,x);

   }

 if(ripley>0){roekie=invertor;sloekie=investor;lengtekeuze=ripley*3};

 if (lengtekeuze>switchkeuze){ripley=ripley-1;lengtekeuze=switchkeuze};

 if(ripley>0){

 invertor="";

 investor="";

 for (x=lengtekeuze; x>=3;x-=3){

   invertor=invertor+roekie.substring(x-3,x);

   investor=investor+sloekie.substring(x-3,x);

   }

   roekie=invertor;

   sloekie=investor;

 }

 

 

 skippar=lengtekeuze/3;

 

 for (x=0; x<=9; x++){

 skipdigit[x]=skippar;

 skiproot[x]=skippar;

 skiplds[x]=skippar;

 skiporder[x]=skippar;

 pp0skip[x]=skippar;

 pp1skip[x]=skippar;

 pp2skip[x]=skippar;

 pp3skip[x]=skippar;

 pp4skip[x]=skippar;

 pp5skip[x]=skippar;

 pp6skip[x]=skippar;

 pp7skip[x]=skippar;

 pp8skip[x]=skippar;

 pp9skip[x]=skippar;

 

 }

 

 for (x=1; x<=3; x++){

 skipsdt[x]=skippar;

 }

      

 for (x=1; x<=21; x++){

 skipEEOO[x]=skippar;

 skipLLHH[x]=skippar;

 }

 

 

 for (x=0; x<=27; x++){

 skipsum[x]=skippar;

 }

 

 for (x=1; x<=lengtekeuze; x+=3){

 draw=draw+1;

 

 f=sloekie.substring(x-1,x);

 s=sloekie.substring(x,x+1);

 t=sloekie.substring(x+1,x+2);

 if(skipdigit[f]==skippar){skipdigit[f]=draw-1}

 if(skipdigit[s]==skippar){skipdigit[s]=draw-1}

 if(skipdigit[t]==skippar){skipdigit[t]=draw-1}

 tel[f]=tel[f]+1;

 tel[s]=tel[s]+1;

 tel[t]=tel[t]+1;

 ff=roekie.substring(x-1,x);

 ss=roekie.substring(x,x+1);

 tt=roekie.substring(x+1,x+2);

 

 itali[f+s+t]="y";

 makesum=(f*1)+(s*1)+(t*1);

 sum[makesum]=sum[makesum]+1;

 if(skipsum[makesum]==skippar){skipsum[makesum]=draw-1}

 if(makesum>9){makeroot=(String(makesum).substring(0,1)*1)+(String(makesum).substring(1,2)*1)}else{makeroot=makesum};

 if(makeroot==10){makeroot=1};

 if(skiproot[makeroot]==skippar){skiproot[makeroot]=draw-1}

 root[makeroot]=root[makeroot]+1;

 if(makesum>9){if (makesum>19){makelds=makesum-20}else{makelds=makesum-10}}else{makelds=makesum};

 lds[makelds]=lds[makelds]+1;

 if(skiplds[makelds]==skippar){skiplds[makelds]=draw-1}

 

 a=(f/2)-parseInt(f/2);

 b=(s/2)-parseInt(s/2);

 c=(t/2)-parseInt(t/2);

 if (f==0){pp0[s]=pp0[s]+1;pp0[t]=pp0[t]+1;if(pp0skip[s]==skippar){pp0skip[s]=draw-1};if(pp0skip[t]==skippar){pp0skip[t]=draw-1}};

 if (f==1){pp1[s]=pp1[s]+1;pp1[t]=pp1[t]+1;if(pp1skip[s]==skippar){pp1skip[s]=draw-1};if(pp1skip[t]==skippar){pp1skip[t]=draw-1}};

 if (f==2){pp2[s]=pp2[s]+1;pp2[t]=pp2[t]+1;if(pp2skip[s]==skippar){pp2skip[s]=draw-1};if(pp2skip[t]==skippar){pp2skip[t]=draw-1}};

 if (f==3){pp3[s]=pp3[s]+1;pp3[t]=pp3[t]+1;if(pp3skip[s]==skippar){pp3skip[s]=draw-1};if(pp3skip[t]==skippar){pp3skip[t]=draw-1}};

 if (f==4){pp4[s]=pp4[s]+1;pp4[t]=pp4[t]+1;if(pp4skip[s]==skippar){pp4skip[s]=draw-1};if(pp4skip[t]==skippar){pp4skip[t]=draw-1}};

 if (f==5){pp5[s]=pp5[s]+1;pp5[t]=pp5[t]+1;if(pp5skip[s]==skippar){pp5skip[s]=draw-1};if(pp5skip[t]==skippar){pp5skip[t]=draw-1}};

 if (f==6){pp6[s]=pp6[s]+1;pp6[t]=pp6[t]+1;if(pp6skip[s]==skippar){pp6skip[s]=draw-1};if(pp6skip[t]==skippar){pp6skip[t]=draw-1}};

 if (f==7){pp7[s]=pp7[s]+1;pp7[t]=pp7[t]+1;if(pp7skip[s]==skippar){pp7skip[s]=draw-1};if(pp7skip[t]==skippar){pp7skip[t]=draw-1}};

 if (f==8){pp8[s]=pp8[s]+1;pp8[t]=pp8[t]+1;if(pp8skip[s]==skippar){pp8skip[s]=draw-1};if(pp8skip[t]==skippar){pp8skip[t]=draw-1}};

 if (f==9){pp9[s]=pp9[s]+1;pp9[t]=pp9[t]+1;if(pp9skip[s]==skippar){pp9skip[s]=draw-1};if(pp9skip[t]==skippar){pp9skip[t]=draw-1}};

 if (s==0){pp0[t]=pp0[t]+1;if(pp0skip[t]==skippar){pp0skip[t]=draw-1}};

 if (s==1){pp1[t]=pp1[t]+1;if(pp1skip[t]==skippar){pp1skip[t]=draw-1}};

 if (s==2){pp2[t]=pp2[t]+1;if(pp2skip[t]==skippar){pp2skip[t]=draw-1}};

 if (s==3){pp3[t]=pp3[t]+1;if(pp3skip[t]==skippar){pp3skip[t]=draw-1}};

 if (s==4){pp4[t]=pp4[t]+1;if(pp4skip[t]==skippar){pp4skip[t]=draw-1}};

 if (s==5){pp5[t]=pp5[t]+1;if(pp5skip[t]==skippar){pp5skip[t]=draw-1}};

 if (s==6){pp6[t]=pp6[t]+1;if(pp6skip[t]==skippar){pp6skip[t]=draw-1}};

 if (s==7){pp7[t]=pp7[t]+1;if(pp7skip[t]==skippar){pp7skip[t]=draw-1}};

 if (s==8){pp8[t]=pp8[t]+1;if(pp8skip[t]==skippar){pp8skip[t]=draw-1}};

 if (s==9){pp9[t]=pp9[t]+1;if(pp9skip[t]==skippar){pp9skip[t]=draw-1}};

 if (f==s){if(f==t){sdt[3]=sdt[3]+1;TTT=3}else{sdt[2]=sdt[2]+1;TTT=2}}else{if(f==t || s==t){sdt[2]=sdt[2]+1;TTT=2}else{sdt[1]=sdt[1]+1;TTT=1}};

 if(skipsdt[TTT]==skippar){skipsdt[TTT]=draw-1}

 if (a+b+c==0){EEOO[TTT*4]=EEOO[TTT*4]+1;if(skipEEOO[TTT*4]==skippar){skipEEOO[TTT*4]=draw-1}};

 if (a+b+c==0.5){EEOO[TTT*7]=EEOO[TTT*7]+1;if(skipEEOO[TTT*7]==skippar){skipEEOO[TTT*7]=draw-1}};

 if (a+b+c==1){EEOO[TTT*5]=EEOO[TTT*5]+1;if(skipEEOO[TTT*5]==skippar){skipEEOO[TTT*5]=draw-1}};

 if (a+b+c==1.5){EEOO[TTT]=EEOO[TTT]+1;if(skipEEOO[TTT]==skippar){skipEEOO[TTT]=draw-1}};

 orders=0;

 if (TTT==1){

 	if (f==ff){if(s==ss){order[1]=order[1]+1;orders=1}else{order[2]=order[2]+1;orders=2}};

	if (s==ff){if(f==ss){order[3]=order[3]+1;orders=3}else{order[4]=order[4]+1;orders=4}};

	if (t==ff){if(f==ss){order[5]=order[5]+1;orders=5}else{order[6]=order[6]+1;orders=6}};

 

 }

 

 if (TTT==2){

 	if (f==s){

		if (t==tt){order[7]=order[7]+1;orders=7};

		if (t==ss){order[8]=order[8]+1;orders=8};

		if (t==ff){order[9]=order[9]+1;orders=9};

	} else {

	if (f==ff){order[7]=order[7]+1;orders=7};

	if (f==ss){order[8]=order[8]+1;orders=8};

	if (f==tt){order[9]=order[9]+1;orders=9};

 	}

 }

 

 if(skiporder[orders]==skippar){skiporder[orders]=draw-1}

 

 if (f<5){a=1}else{a=2};

 if (s<5){b=1}else{b=2};

 if (t<5){c=1}else{c=2};

 if (a+b+c==3){LLHH[TTT]=LLHH[TTT]+1;if(skipLLHH[TTT]==skippar){skipLLHH[TTT]=draw-1}};

 if (a+b+c==6){LLHH[TTT*4]=LLHH[TTT*4]+1;if(skipLLHH[TTT*4]==skippar){skipLLHH[TTT*4]=draw-1}};

 if (a+b+c==4){LLHH[TTT*5]=LLHH[TTT*5]+1;if(skipLLHH[TTT*5]==skippar){skipLLHH[TTT*5]=draw-1}};

 if (a+b+c==5){LLHH[TTT*7]=LLHH[TTT*7]+1;if(skipLLHH[TTT*7]==skippar){skipLLHH[TTT*7]=draw-1}};

 

 

 }

 

 

   gemiddeld();

   

   

   lengtekeuze=switchkeuze;

   

   

   document.getElementById("stat").firstChild.nodeValue="Draws: "+draw;

   document.forms[0].last.value=(switchkeuze/3)+" draw(s)";

  

 











   for (x=1; x<=9; x++){

   document.getElementById("ABC"+x).style.color=Sno;

   if (realv==0){

   document.getElementById("ABC"+x).firstChild.nodeValue=order[x];

   if (x<=6){

   	if(order[x]<aabc1){document.getElementById("ABC"+x).style.color=Slo};

   	if(order[x]>aabc2){document.getElementById("ABC"+x).style.color=Shi}} else{

	if(order[x]<aaab1){document.getElementById("ABC"+x).style.color=Slo};

    if(order[x]>aaab2){document.getElementById("ABC"+x).style.color=Shi}}}

	

   if (realv==1){if (x<=6){document.getElementById("ABC"+x).firstChild.nodeValue=aabc1}else{document.getElementById("ABC"+x).firstChild.nodeValue=aaab1}}

   }

   if (realv==2){

   

   for (x=1; x<=9; x++){

   document.getElementById("ABC"+x).style.color="#990000";

   if (skiporder[x]==draw){skiporder[x]="-"};

   document.getElementById("ABC"+x).firstChild.nodeValue=skiporder[x]

   }

   

   }

   

   for (x=1; x<=3; x++){

   document.getElementById("OOO"+x).style.color=Sno;

   document.getElementById("EEE"+x).style.color=Sno;

   document.getElementById("OOE"+x).style.color=Sno;

   document.getElementById("EEO"+x).style.color=Sno;

   document.getElementById("LLL"+x).style.color=Sno;

   document.getElementById("HHH"+x).style.color=Sno;

   document.getElementById("LLH"+x).style.color=Sno;

   document.getElementById("LHH"+x).style.color=Sno;

   if (realv==0){

   document.getElementById("OOO"+x).firstChild.nodeValue=EEOO[x*1];

   document.getElementById("EEE"+x).firstChild.nodeValue=EEOO[x*4];

   document.getElementById("OOE"+x).firstChild.nodeValue=EEOO[x*5];

   document.getElementById("EEO"+x).firstChild.nodeValue=EEOO[x*7];

   document.getElementById("LLL"+x).firstChild.nodeValue=LLHH[x*1];

   document.getElementById("HHH"+x).firstChild.nodeValue=LLHH[x*4];

   document.getElementById("LLH"+x).firstChild.nodeValue=LLHH[x*5];

   document.getElementById("LHH"+x).firstChild.nodeValue=LLHH[x*7];

   if(EEOO[1]<apairxy1){document.getElementById("OOO1").style.color=Slo};

   if(EEOO[1]>apairxy2){document.getElementById("OOO1").style.color=Shi};

   if(EEOO[4]<apairxy1){document.getElementById("EEE1").style.color=Slo};

   if(EEOO[4]>apairxy2){document.getElementById("EEE1").style.color=Shi};

   if(EEOO[5]<adigit1){document.getElementById("OOE1").style.color=Slo};

   if(EEOO[5]>adigit2){document.getElementById("OOE1").style.color=Shi};

   if(EEOO[7]<adigit1){document.getElementById("EEO1").style.color=Slo};

   if(EEOO[7]>adigit2){document.getElementById("EEO1").style.color=Shi};

   if(EEOO[2]<apairxy1){document.getElementById("OOO2").style.color=Slo};

   if(EEOO[2]>apairxy2){document.getElementById("OOO2").style.color=Shi};

   if(EEOO[8]<apairxy1){document.getElementById("EEE2").style.color=Slo};

   if(EEOO[8]>apairxy2){document.getElementById("EEE2").style.color=Shi};

   if(EEOO[10]<adoueo1){document.getElementById("OOE2").style.color=Slo};

   if(EEOO[10]>adoueo2){document.getElementById("OOE2").style.color=Shi};

   if(EEOO[14]<adoueo1){document.getElementById("EEO2").style.color=Slo};

   if(EEOO[14]>adoueo2){document.getElementById("EEO2").style.color=Shi};

   if(EEOO[3]<atrieo1){document.getElementById("OOO3").style.color=Slo};

   if(EEOO[3]>atrieo2){document.getElementById("OOO3").style.color=Shi};

   if(EEOO[12]<atrieo1){document.getElementById("EEE3").style.color=Slo};

   if(EEOO[12]>atrieo2){document.getElementById("EEE3").style.color=Shi};

   

   if(LLHH[1]<apairxy1){document.getElementById("LLL1").style.color=Slo};

   if(LLHH[1]>apairxy2){document.getElementById("LLL1").style.color=Shi};

   if(LLHH[4]<apairxy1){document.getElementById("HHH1").style.color=Slo};

   if(LLHH[4]>apairxy2){document.getElementById("HHH1").style.color=Shi};

   if(LLHH[5]<adigit1){document.getElementById("LLH1").style.color=Slo};

   if(LLHH[5]>adigit2){document.getElementById("LLH1").style.color=Shi};

   if(LLHH[7]<adigit1){document.getElementById("LHH1").style.color=Slo};

   if(LLHH[7]>adigit2){document.getElementById("LHH1").style.color=Shi};

   if(LLHH[2]<apairxy1){document.getElementById("LLL2").style.color=Slo};

   if(LLHH[2]>apairxy2){document.getElementById("LLL2").style.color=Shi};

   if(LLHH[8]<apairxy1){document.getElementById("HHH2").style.color=Slo};

   if(LLHH[8]>apairxy2){document.getElementById("HHH2").style.color=Shi};

   if(LLHH[10]<adoueo1){document.getElementById("LLH2").style.color=Slo};

   if(LLHH[10]>adoueo2){document.getElementById("LLH2").style.color=Shi};

   if(LLHH[14]<adoueo1){document.getElementById("LHH2").style.color=Slo};

   if(LLHH[14]>adoueo2){document.getElementById("LHH2").style.color=Shi};

   if(LLHH[3]<atrieo1){document.getElementById("LLL3").style.color=Slo};

   if(LLHH[3]>atrieo2){document.getElementById("LLL3").style.color=Shi};

   if(LLHH[12]<atrieo1){document.getElementById("HHH3").style.color=Slo};

   if(LLHH[12]>atrieo2){document.getElementById("HHH3").style.color=Shi};

   }

   }

   

   if (realv==1){

   

   document.getElementById("OOO1").firstChild.nodeValue=apairxy1;

   document.getElementById("EEE1").firstChild.nodeValue=apairxy1;

   document.getElementById("OOE1").firstChild.nodeValue=adigit1;

   document.getElementById("EEO1").firstChild.nodeValue=adigit1;

   document.getElementById("LLL1").firstChild.nodeValue=apairxy1;

   document.getElementById("HHH1").firstChild.nodeValue=apairxy1;

   document.getElementById("LLH1").firstChild.nodeValue=adigit1;

   document.getElementById("LHH1").firstChild.nodeValue=adigit1;



   document.getElementById("OOO2").firstChild.nodeValue=apairxy1;

   document.getElementById("EEE2").firstChild.nodeValue=apairxy1;

   document.getElementById("OOE2").firstChild.nodeValue=adoueo1;

   document.getElementById("EEO2").firstChild.nodeValue=adoueo1;

   document.getElementById("LLL2").firstChild.nodeValue=apairxy1;

   document.getElementById("HHH2").firstChild.nodeValue=apairxy1;

   document.getElementById("LLH2").firstChild.nodeValue=adoueo1;

   document.getElementById("LHH2").firstChild.nodeValue=adoueo1;

   

   document.getElementById("OOO3").firstChild.nodeValue=atrieo1;

   document.getElementById("EEE3").firstChild.nodeValue=atrieo1;

   document.getElementById("LLL3").firstChild.nodeValue=atrieo1;

   document.getElementById("HHH3").firstChild.nodeValue=atrieo1;

   }

   

   if (realv==2){

   for (x=0; x<=21; x++){

   if (skipEEOO[x]==draw){skipEEOO[x]="-"};

   if (skipLLHH[x]==draw){skipLLHH[x]="-"};

   }

   for (x=1; x<=3; x++){

   document.getElementById("OOO"+x).style.color="#990000";

   document.getElementById("EEE"+x).style.color="#990000";

   document.getElementById("OOE"+x).style.color="#990000";

   document.getElementById("EEO"+x).style.color="#990000";

   document.getElementById("LLL"+x).style.color="#990000";

   document.getElementById("HHH"+x).style.color="#990000";

   document.getElementById("LLH"+x).style.color="#990000";

   document.getElementById("LHH"+x).style.color="#990000";

   document.getElementById("OOO"+x).firstChild.nodeValue=skipEEOO[x*1];

   document.getElementById("EEE"+x).firstChild.nodeValue=skipEEOO[x*4];

   document.getElementById("OOE"+x).firstChild.nodeValue=skipEEOO[x*5];

   document.getElementById("EEO"+x).firstChild.nodeValue=skipEEOO[x*7];

   document.getElementById("LLL"+x).firstChild.nodeValue=skipLLHH[x*1];

   document.getElementById("HHH"+x).firstChild.nodeValue=skipLLHH[x*4];

   document.getElementById("LLH"+x).firstChild.nodeValue=skipLLHH[x*5];

   document.getElementById("LHH"+x).firstChild.nodeValue=skipLLHH[x*7];

   }

   }

   document.getElementById("OOE3").firstChild.nodeValue="";

   document.getElementById("EEO3").firstChild.nodeValue="";

   document.getElementById("LLH3").firstChild.nodeValue="";

   document.getElementById("LHH3").firstChild.nodeValue="";

   

   

   for (x=0; x<=27; x++){

   document.getElementById("SUM"+x).style.color=Sno;

   if (realv==0){document.getElementById("SUM"+x).firstChild.nodeValue=sum[x];if(sum[x]<sumavg1[x]){document.getElementById("SUM"+x).style.color=Slo};

   if(sum[x]>sumavg2[x]){document.getElementById("SUM"+x).style.color=Shi}};

   if (realv==1){document.getElementById("SUM"+x).firstChild.nodeValue=sumavg1[x]};

   if (realv==2){if (skipsum[x]==draw){skipsum[x]="-"};document.getElementById("SUM"+x).style.color="#990000";document.getElementById("SUM"+x).firstChild.nodeValue=skipsum[x]};

   }

   

   for (x=0; x<=9; x++){



   

   

  





   

   

   

   

   

   

   document.getElementById("DT"+x).style.color=Sno;

   if (realv==0){document.getElementById("DT"+x).firstChild.nodeValue=tel[x];

   coloro[x]=4;if(tel[x]<adigit1){document.getElementById("DT"+x).style.color=Slo;coloro[x]=1};

   if(tel[x]>adigit2){document.getElementById("DT"+x).style.color=Shi;coloro[x]=5}};

   if (realv==1){document.getElementById("DT"+x).firstChild.nodeValue=adigit1};

   if(realv==2){if (skipdigit[x]==draw){skipdigit[x]="-"};document.getElementById("DT"+x).style.color="#990000";document.getElementById("DT"+x).firstChild.nodeValue=skipdigit[x]}

   }

   



   

   

   

   if(realv==0){

   for (x=1; x<=3; x++){

   document.getElementById("TSDT"+x).style.color=Sno;

   document.getElementById("TSDT"+x).firstChild.nodeValue=sdt[x];

   }

   if (sdt[1]<asingle1){document.getElementById("TSDT1").style.color=Slo};

   if (sdt[1]>asingle2){document.getElementById("TSDT1").style.color=Shi};

   

   if (sdt[2]<adouble1){document.getElementById("TSDT2").style.color=Slo};

   if (sdt[2]>adouble2){document.getElementById("TSDT2").style.color=Shi};

   

   if (sdt[3]<atriple1){document.getElementById("TSDT3").style.color=Slo};

   if (sdt[3]>atriple2){document.getElementById("TSDT3").style.color=Shi};

   }

   

   if(realv==1){

   for (x=1; x<=3; x++){

   document.getElementById("TSDT"+x).style.color=Sno;

   }

   document.getElementById("TSDT1").firstChild.nodeValue=asingle1;

   document.getElementById("TSDT2").firstChild.nodeValue=adouble1;

   document.getElementById("TSDT3").firstChild.nodeValue=atriple1;

   }

   

   if(realv==2){

   for (x=1; x<=3; x++){

   document.getElementById("TSDT"+x).style.color="#990000";

   if (skipsdt[x]==draw){skipsdt[x]="-"};

   }

   document.getElementById("TSDT1").firstChild.nodeValue=skipsdt[1];

   document.getElementById("TSDT2").firstChild.nodeValue=skipsdt[2];

   document.getElementById("TSDT3").firstChild.nodeValue=skipsdt[3];

   }

   realv=0;

   ChangeText();

   

 }

 

 function gemiddeld(){

 

 for (x=0; x<=27; x++){

   sumavg1[x]=parseInt(draw*sumavg[x]/1000);

   if((draw*sumavg[x]/1000)-sumavg1[x]==0){sumavg2[x]=sumavg1[x]}else{sumavg2[x]=sumavg1[x]+1};

   }

 

 lds1=parseInt(draw*1/10);

 if((draw*1/10)-lds1==0){lds2=lds1}else{lds2=lds1+1};

 

 root1=parseInt(draw*111/1000);

 if((draw*111/1000)-root1==0){root2=root1}else{root2=root1+1};

 

 adigit1=parseInt(draw*3/10);

 if((draw*3/10)-adigit1==0){adigit2=adigit1}else{adigit2=adigit1+1};

 

 apairxy1=parseInt(draw*6/100);

 apairxx1=parseInt(draw*3/100);

 if((draw*6/100)-apairxy1==0){apairxy2=apairxy1}else{apairxy2=apairxy1+1};

 if((draw*3/100)-apairxx1==0){apairxx2=apairxx1}else{apairxx2=apairxx1+1};

 

 asingle1=parseInt(draw*72/100);

 if((draw*72/100)-asingle1==0){asingle2=asingle1}else{asingle2=asingle1+1};

 

 adouble1=parseInt(draw*27/100);

 if((draw*27/100)-adouble1==0){adouble2=adouble1}else{adouble2=adouble1+1};

 

 atriple1=parseInt(draw/100);

 if((draw/100)-atriple1==0){atriple2=atriple1}else{atriple2=atriple1+1};

 

 adoueo1=parseInt(draw*75/1000);

 if((draw*75/1000)-adoueo1==0){adoueo2=adoueo1}else{adoueo2=adoueo1+1};

 

 atrieo1=parseInt(draw*5/1000);

 if((draw*5/1000)-atrieo1==0){atrieo2=atrieo1}else{atrieo2=atrieo1+1};

 

 aabc1=parseInt(sdt[1]/6);

 if((sdt[1]/6)-aabc1==0){aabc2=aabc1}else{aabc2=aabc1+1};

 

 aaab1=parseInt(sdt[2]/3);

 if((sdt[2]/3)-aaab1==0){aaab2=aaab1}else{aaab2=aaab1+1};

 

 }

 

 
 



 

 



 



 



 

 

 

 function drawprofit(){

 wins=0;

 winb=0;

 wint=0;

 if(recorder[randomstring]>0){

 

 if(recordtype[randomstring]==1){wins=900*wager};

 if(recorder[randomstring]>1){winb=(900/recorder[randomstring])*wager};

 



 wint=((winb+wins)/2);

 if(recordtype[randomstring]==1 && recorder[randomstring]==1){wint=900*wager}

 }

 if(recordtype[randomstring]==0 && recorder[randomstring]>1){hittype="Boxed HIT "};

 if(recordtype[randomstring]==1){hittype="Straight HIT "};

 if(recorder[randomstring]==0){hittype="No Hit "};

 playtype="- Played Boxed+Straight = $";

 if(recordtype[randomstring]==1 && recorder[randomstring]==1){playtype="- Played Straight = $"};

 }

 

 
 

 
 

 

 

 function SortString(){

 waarde="";

 for (y=0; y<=9; y++){

 if (y==randomstring.substring(0,1)){waarde=waarde+y}

 if (y==randomstring.substring(1,2)){waarde=waarde+y}

 if (y==randomstring.substring(2,3)){waarde=waarde+y}

 }

 }

 

 