//ekran : 1 - maclistesi.jsp var matchNum = 0; /** * Basketbol oranları .Sistem hesaplarken kullanıcaz. */ var basketOranlari =new Array(); basketOranlari[0]=1; basketOranlari[1]=1.7; basketOranlari[2]=2.8; basketOranlari[3]=4.8; basketOranlari[4]=8.0; basketOranlari[5]=14.0; basketOranlari[6]=25.0; basketOranlari[7]=45.0; basketOranlari[8]=80.0; basketOranlari[9]=140.0; basketOranlari[10]=250.0; basketOranlari[11]=450.0; basketOranlari[12]=800.0; basketOranlari[13]=1500.0; basketOranlari[14]=3000.0; basketOranlari[15]=6000.0; var typerk = "0"; var urlerk = ""; function getMaclistesi(){ var maclar=new Array(); try{ maclar =Maclar; }catch(e){ maclar=parent.Maclar; }finally{ return maclar; } } function setMaclistesi(maclistesi){ try{ Maclar =maclistesi; }catch(e){ parent.maclar=maclistesi; } } function getPreviousValidCombinations(){ var combinaitons=new Array(); try{ combinaitons =Combinations; }catch(e){ combinaitons =parent.Combinations; }finally{ return combinaitons; } } function getSistemler(){ var result=new Array(); try{ result =ValidSistemler; }catch(e){ result =parent.ValidSistemler; }finally{ return result; } } function setSistemler(sistemler){ try{ ValidSistemler =sistemler; }catch(e){ parent.ValidSistemler=sistemler; } } function InitializeAll(genismi){ Combinations=new Array(); Sistem=new Array(); var maclistesi=getMaclistesi(); var tbl = document.getElementById('erkut'); for (ix=0;ix700){//Basket oyunları için trx.setAttribute("bgColor","white"); trx.cells[8].setAttribute("bgColor","#ced7d2"); trx.cells[10].setAttribute("bgColor","#ced7d2"); trx.cells[12].setAttribute("bgColor","#ced7d2"); trx.cells[14].setAttribute("bgColor",""); trx.cells[16].setAttribute("bgColor",""); trx.cells[18].setAttribute("bgColor",""); trx.cells[20].setAttribute("bgColor","#ced7d2"); trx.cells[22].setAttribute("bgColor","#ced7d2"); trx.cells[24].setAttribute("bgColor","#ced7d2"); trx.cells[26].setAttribute("bgColor",""); trx.cells[28].setAttribute("bgColor",""); trx.cells[30].setAttribute("bgColor",""); trx.cells[32].setAttribute("bgColor",""); trx.cells[34].setAttribute("bgColor",""); trx.cells[36].setAttribute("bgColor",""); trx.cells[38].setAttribute("bgColor",""); }else {//Diger oyunlar trx.setAttribute("bgColor","white"); trx.cells[8].setAttribute("bgColor","#ced7d2"); trx.cells[10].setAttribute("bgColor","#ced7d2"); trx.cells[12].setAttribute("bgColor","#ced7d2"); trx.cells[14].setAttribute("bgColor",""); trx.cells[16].setAttribute("bgColor",""); trx.cells[18].setAttribute("bgColor",""); trx.cells[20].setAttribute("bgColor","#ced7d2"); trx.cells[22].setAttribute("bgColor","#ced7d2"); trx.cells[24].setAttribute("bgColor","#ced7d2"); trx.cells[26].setAttribute("bgColor",""); trx.cells[28].setAttribute("bgColor",""); trx.cells[30].setAttribute("bgColor","#ced7d2"); trx.cells[32].setAttribute("bgColor","#ced7d2"); trx.cells[34].setAttribute("bgColor","#ced7d2"); trx.cells[36].setAttribute("bgColor","#ced7d2"); } } } } setMaclistesi(new Array()); document.getElementById("maclistesi").style.height=530; document.getElementById("kolonsayisitext").value = ""; document.getElementById("maksimumtutartext").value =""; document.getElementById("toplamorantext").value = ""; document.getElementById("kupontutartext").value = ""; document.getElementById("secilenmactext").value =""; for (ix=0,clength=document.myForm.combinations.length;ix=700){ tbl= document.getElementById('baskettable'); }else { tbl= document.getElementById('erkut'); } if (oTr) { var i = oTr.rowIndex ; tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); if (macKodu<100) tbl.deleteRow(i - 1); } var indexler=getMatchByMatchId(maclistesi,macKodu); var uvmi=false; removeMatch(macKodu) ; if (indexler[0].gameType.startsWith('AP')){ uvmi=true; } if (secilisistemler[0]>matchcount-bankocount) document.myForm.combinations[secilisistemler].checked=false; //Simdi de maclistesindeki kismi temizliyoz. var framexx=frames[0]; var trx; if (!uvmi && (framexx.location.href.indexOf('iddaa/iddaaIYMS_lig.jsp')>-1 || framexx.location.href.indexOf('iddaa/iddaaIYMS_tarih.jsp')>-1 || framexx.location.href.indexOf('iddaa/iddaaMacSkoru_lig.jsp')>-1|| framexx.location.href.indexOf('iddaa/iddaaMacSkoru_tarih.jsp')>-1)) { trx=framexx.document.getElementById("tr_row"+macKodu); trx.setAttribute("bgColor",""); trx=framexx.document.getElementById("tr_table"+macKodu); trx.setAttribute("bgColor",'white'); for (i=0;i15){ //genis ekran for (k=0;k=700){//Basket Oyunları için if (rowindex==8||rowindex==10||rowindex==12||rowindex==20||rowindex==22||rowindex==24) trx.cells[rowindex].setAttribute("bgColor","ced7d2"); else trx.cells[rowindex].setAttribute("bgColor",""); } } } else { for (i=0;i=700){ tbl= document.getElementById('baskettable'); }else { tbl= document.getElementById('erkut'); } if (oTr) { var i = oTr.rowIndex ; tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); if (macKodu<100) tbl.deleteRow(i - 1); } var maclistesi=getMaclistesi(); var bankomaclar=bankoMaclariVer(maclistesi); var nonbankomaclar=NonBankoMaclariVer(maclistesi); var matchcount=getUniqueMatchCount(maclistesi); var bankocount=getUniqueMatchCount(bankomaclar); var secilisistemler=getSystems(); if (secilisistemler[0]>matchcount-bankocount) document.myForm.combinations[secilisistemler].checked=false; //Simdi de maclistesindeki kismi temizliyoz. var framexx=frames[0]; var trx; if (framexx.location.href.indexOf('iddaa/iddaaIYMS_lig.jsp')>-1 || framexx.location.href.indexOf('iddaa/iddaaIYMS_tarih.jsp')>-1 || framexx.location.href.indexOf('iddaa/iddaaMacSkoru_lig.jsp')>-1|| framexx.location.href.indexOf('iddaa/iddaaMacSkoru_tarih.jsp')>-1) { trx=framexx.document.getElementById("tr_row"+macKodu); trx.setAttribute("bgColor",""); trx=framexx.document.getElementById("tr_table"+macKodu); trx.setAttribute("bgColor",'white'); for (i=0;i-1 || framexx.location.href.indexOf('iddaa/iddaaBasketIYMS_tarih.jsp')>-1) { trx=framexx.document.getElementById("tr_row"+macKodu); trx.setAttribute("bgColor",""); trx=framexx.document.getElementById("tr_table"+macKodu); trx.setAttribute("bgColor",'white'); for (i=0;i=700){ trx.cells[8].setAttribute("bgColor","#ced7d2"); trx.cells[10].setAttribute("bgColor","#ced7d2"); trx.cells[12].setAttribute("bgColor","#ced7d2"); trx.cells[14].setAttribute("bgColor",""); trx.cells[16].setAttribute("bgColor",""); trx.cells[18].setAttribute("bgColor",""); trx.cells[20].setAttribute("bgColor","#ced7d2"); trx.cells[22].setAttribute("bgColor","#ced7d2"); trx.cells[24].setAttribute("bgColor","#ced7d2"); trx.cells[26].setAttribute("bgColor",""); trx.cells[28].setAttribute("bgColor",""); trx.cells[30].setAttribute("bgColor",""); trx.cells[32].setAttribute("bgColor",""); trx.cells[34].setAttribute("bgColor",""); trx.cells[36].setAttribute("bgColor",""); } } else { for (i=0;i=0 && isWhitespace(str.charAt(j)) ; j--) ; return str.substring(0,j+1); } function trim(str) { return ltrim(rtrim(str)); } function isWhitespace(charToCheck) { var whitespaceChars = " \t\n\r\f"; return (whitespaceChars.indexOf(charToCheck) != -1); } //******* function rrftsadeceKaldirIYMS(genismi, macKodu,tercih,renklikismiKaldir) { var oTr; tercih=trim(tercih); var i = null; var tbl; if (macKodu>=700){ tbl= document.getElementById('baskettable'); }else { tbl= document.getElementById('erkut'); } var rowssss=tbl.rows; for (i=0;i-1){ oTr=rowssss[i-1]; } } } } if (oTr) { var i = oTr.rowIndex ; tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); tbl.deleteRow(i - 1); if (macKodu<100) tbl.deleteRow(i - 1); } //KUpondan kald?rd?k.??mdi de sol taraftan kald?rcaz. hesapla(); var framex=window.frames[0]; renklikismiKaldir=true; if (renklikismiKaldir){ //Sol taraftaki olaylar? kald?rcaz. if (!genismi){ // BUrda ilk satri amc sonucu /(/burda da kascaz //dar ekran i?in var tr_table =framex.document.getElementById("tr_table"+macKodu); if (macKodu<700){ if (tercih=='1/1'){ tr_table.rows[3].cells[3].setAttribute("bgColor",""); } else if (tercih=='1/X'){ tr_table.rows[3].cells[5].setAttribute("bgColor",""); } else if (tercih=='1/2'){ tr_table.rows[3].cells[7].setAttribute("bgColor",""); } else if (tercih=='X/1'){ tr_table.rows[3].cells[9].setAttribute("bgColor",""); } else if (tercih=='X/X'){ tr_table.rows[3].cells[11].setAttribute("bgColor",""); } else if (tercih=='X/2'){ tr_table.rows[3].cells[13].setAttribute("bgColor",""); } else if (tercih=='2/1'){ tr_table.rows[3].cells[15].setAttribute("bgColor",""); } else if (tercih=='2/X'){ tr_table.rows[3].cells[17].setAttribute("bgColor",""); } else if (tercih=='2/2'){ tr_table.rows[3].cells[19].setAttribute("bgColor",""); } } else if (macKodu>=700){ if (tercih=='1/1'){ tr_table.rows[3].cells[5].setAttribute("bgColor",""); } else if (tercih=='1/2'){ tr_table.rows[3].cells[7].setAttribute("bgColor",""); } else if (tercih=='2/1'){ tr_table.rows[3].cells[9].setAttribute("bgColor",""); } else if (tercih=='2/2'){ tr_table.rows[3].cells[11].setAttribute("bgColor",""); } } } else if (genismi){ var trx=framex.document.getElementById("tr_row"+match.matchid); //Sadece Basket için var. if (tercih=='1/1'){ trx.cells[30].setAttribute("bgColor",""); } else if (tercih=='1/2'){ trx.cells[32].setAttribute("bgColor",""); } else if (tercih=='2/1'){ trx.cells[34].setAttribute("bgColor",""); } else if (tercih=='2/2'){ trx.cells[36].setAttribute("bgColor",""); } } removeMatchByIdAndGuess(macKodu,tercih);//Maclistesinden kald?r?yoz. iYMSleriEnableEt(macKodu); hesapla(); } baskettableCheckRemove(); try { //hata olursa bu commentlenecek oturumaAta(); } catch(e) { } } function removeMatch(matchid){ var secilenMac=getMaclistesi(); var result=new Array(); for (i=0;i= this.length ) { start = this.length; } if ( start < 0 ) { start = this.length + start; } for ( var i=start; i >= 0; --i ) { if ( this[i] === el ) { return i; } } return -1; }; } //7Iterate through the hashtable and find the mbs /*burdaki algoritma simdi sole Once turlere gore3 grupluyoz sonra mbslere gore veeee buluyoz */ function getMbs(maclistesi){ var tablermbs={"1":0,"2":0,"3":0,"4":0}; for (ikj=0,leng=maclistesi.length; ikj-1 && newmatch.odd>oldmatch.odd){ maclistesi[index]=newmatch; maclistesi.push(oldmatch); }else { maclistesi.push(newmatch); } setMaclistesi(maclistesi); hesapla(); } function Combination (mbs,maclar,toplamOran){ this.mbs = mbs; this.maclar=maclar; this.toplamOran=toplamOran; this.valid=0; this.errormessage=""; this.sistem=0; } //gets only one instance of the match function bankoMaclariVer(maclistesi){ var bankomaclar=new Array(); for (i=0,len=maclistesi.length;i1){//Match double ise tekrar insert etcez. returndouyble.push(doublematches[i]); } } return returndouyble; } //gets only one instance of the match function NonBankoMaclariVer(maclistesi){ var nonbankomaclar=new Array(); for (i=0,len=maclistesi.length;i1 && matchlist[i][0].gameType=='SF'){//3 lulerden biri iY/Ms ise threeColonluIYMSTercih=true; } } return threeColonluIYMSTercih; } function generateAllValidCombinations (maclistesi,bankomaclar,bankocount,nonbankomaclar,matchcount,secilisistemler){ //maclistesi Array //Butun olay burda bitiyor. var doublematches=getDoubleMatches(maclistesi); var resultindex=0; var validSistemHashSet =new Array(); validSistemHashSet[0]=false; validSistemHashSet[1]=true; validSistemHashSet[2]=true; validSistemHashSet[3]=true; validSistemHashSet[4]=true; validSistemHashSet[5]=true; validSistemHashSet[6]=true; validSistemHashSet[7]=true; validSistemHashSet[8]=true; validSistemHashSet[9]=true; validSistemHashSet[10]=true; validSistemHashSet[11]=true; validSistemHashSet[12]=true; validSistemHashSet[13]=true; validSistemHashSet[14]=true; validSistemHashSet[15]=true; var isvalid=true; var sistemler=getSystems(); if (sistemler.length==0){ sistemler[sistemler.length]=""+(matchcount-bankocount); } var sonuc=new Array(); //Burda Butun combinasyonlar tutuluyor. var resultindex=0;; for (k = 0,len= nonbankomaclar.length; k <=len; k++) { /* var timeinterval =setInterval(new function (){ Combs(bankomaclar,nonbankomaclar,bankocount,matchcount,sonuc,k,nonbankomaclar, [],validSistemHashSet,sistemler); },0); clearInterval(timeinterval); */ Combs(bankomaclar,nonbankomaclar,bankocount,matchcount,sonuc,k,nonbankomaclar, [],validSistemHashSet,sistemler); } // var sonuc=Combsx(sistemler,bankomaclar,nonbankomaclar,bankocount,matchcount,validSistemHashSet); var bankombs=getMbs(bankomaclar,matchcount); if(secilisistemler.length>0 && getUniqueMatchCount(bankomaclar)>=bankombs ){// validSistemHashSet[0]=true; } if (sistemler.indexOf(0)>-1 && sistemler.length==1 ){ validSistemHashSet[0]=false; } //Burda sistemi, sectikten sonra mac kald�rma Bugün� duzeltiyoz.Tek bir sistem sectiginde oluyor bu bug sadece if (sonuc.length==0 ){ var mbsxx=getMbs(nonbankomaclar); if (mbsxx<=nonbankomaclar.length){ var toplamoranxx=1; totalOran=1; var basketcount=getBasketMatchCount(maclistesi); var basketoran=basketOranlari[basketcount]; for (i=0;i700 && nonbankomaclar[i].gameType=='SF')){ toplamoranxx*=nonbankomaclar[i].odd; } } toplamoranxx*=basketoran; var combinatxx=new Combination(mbsxx,nonbankomaclar,toplamoranxx); combinatxx.valid=1; sonuc[sonuc.length]=combinatxx; } } //---------------------------------------------------------------------------İlk Yarımac sonucu secmisse diger sistemleri disabler ediyoz. var iymsvarmi =isThereIYMSInDoubleMatches(doublematches); if (iymsvarmi){ for (ik=2;ik<15;ik++){ validSistemHashSet[ik]=false; } } //--------------------------------------------------------------------------- //duble olan maclar� eslenigini de koyuyoz sonuclar a //insert into an array //iki deger varmi yokmu //her zaman için ilk eklenen donuyor sonuc ciçinde BUrda hata olab�l�r //topla for (var ik=0,len=doublematches.length;ik<0;ik++){ //kullan�lm�yor san�r�m. var maclar =doublematches[ik]; var clonedsonuc=cloneObject(sonuc); for (ijx=0,clen=0;ijx-1){//o inci var .ikinciye gore yapcaz maclistesi[varmi0]=maclar[1]; clonedsonuc[ijx].maclar=maclistesi; var temptoplamoran=(clonedsonuc[ijx].toplamOran/maclar[0].odd)*maclar[1].odd; uc[ijx].toplamOran=temptoplamoran; } } sonuc.push(clonedsonuc[ijx]); } /** * * SOnuc içindeki herbir kombinasyon için butun duble matchlerin eslenigi için de combinasyonu clone edcez *SOnra kombinasyonun içindeki match ile o matchin eslenigini degistirip butun comb,nasyonlara ekliyoz. * */ if (doublematches.length>0){ //matchid ve toplamo0ran seklinde bir aray a atcaz. var sonTempsonuc=cloneObject(sonuc); /** * Sonuctaki herbir eleman için clone ediyoz.double match say�s�nca. */ for (var jk=0;jk-1){//Mac varsa Yeni bir kombinasyon yarat�p sonTempSonuc'a ekliyoz. var newclonedComb=cloneObject(sonTempsonuc[kl]); newclonedComb.maclar[dublematchindex]=dublematch[di]; newclonedComb.toplamOran=(sonTempsonuc[kl].toplamOran/anamatch.odd)*dublematch[di].odd; sonTempsonuc.push(newclonedComb); } } }//end of herbir duble match deki duble match için } sonuc=sonTempsonuc; } ///Toplam Oran�u buluyoz. var totalOran=0; var MacCodesHash =new Array(); for (ijx=0,len=sonuc.length;ijx=500000) kazanc=500000; var kuponadetvalue=1; var kuponAdet= document.getElementById("KuponAdet"); if (kuponAdet){ kuponadetvalue=kuponAdet.value; } //------------------------------------- var colomncount=validcomb.length; if (valid&& validcomb.length>0){ //Burda bilgileri g?steriyoruz. document.getElementById("kolonsayisitext").value = colomncount; document.getElementById("maksimumtutartext").value =formatValue(kazanc*kuponadetvalue,2) + " TL"; document.getElementById("toplamorantext").value = formatValue(toplamoran,2); document.getElementById("kupontutartext").value = (colomncount* document.myForm.misli.value*kuponadetvalue ) + " TL"; document.getElementById("secilenmactext").value =matchcount; } else { document.getElementById("kolonsayisitext").value = colomncount; document.getElementById("maksimumtutartext").value =formatValue(toplamoran*document.myForm.misli.value,2) + " TL"; document.getElementById("toplamorantext").value = formatValue(toplamoran,2); document.getElementById("kupontutartext").value = "-"; document.getElementById("secilenmactext").value =matchcount; } if ( document.getElementById("basketOrantd")) { document.getElementById("basketOrantd").innerHTML="Basketbol Oranı: "+formatValue(getBasketOranlari(maclistesi),2)+"" ; } Combinations=validcomb; setSistemler(allsistemcomb); Sistemler=secilisistemler; //Burda soldaki ma? listesi framinin boyutunu b?y?t.--------------------------------->>>> oturumaAta(); } function getUniqueMatchCount(maclistesi) { var macset=new Array(); for (i=0,len=maclistesi.length;i -1 ) { str = str.replace( from, to ); idx = str.indexOf( from ); } return str; } //Sistemi hazirlar function sistemiHazirla() { donenSistem = ""; var myform; try{ myform=parent.document.myForm; }catch(e){ myform=document.myForm; } if(myform){ for (var p = 0,len=myform.combinations.length; p < len; p++) { if (myform.combinations[p].checked) { donenSistem = donenSistem + "|" + myform.combinations[p].value; } } } return donenSistem; } function errorCheck() { var maclistesi=getMaclistesi(); var systems=getSystems(); var combinations=Combinations; var bankoSayisi = bankoMaclariVer(maclistesi).length; var sistemSayisi = combinations.length; var doublematches=getDoubleMatches(maclistesi); if (maclistesi.length==0){ alert("Önce maç seçmeniz gerekiyor!"); return false; } if (getUniqueMatchCount(maclistesi)>30){ alert("Bir kuponda en fazla 30 maç seçebilirsiniz!"); return false; } if (bankoSayisi>0 && (systems.length ==0 )){ alert ("Sistem Seçmeden banko oynayamazsınız."); return false; } var kuponadetvalue=1; var kuponAdet= document.getElementById("KuponAdet"); if (kuponAdet){ kuponadetvalue=kuponAdet.value; } var misli= document.myForm.misli.value; var tutar=document.getElementById("kolonsayisitext").value*misli/kuponadetvalue; if (tutar>2500){ //Tutar 2500 liradan daha fazla olamz alert("Bir Kupon tutarı 1000 TL'den daha büyük olamaz."); return false; } var sistem0var=false; var sistem1var=false; for (i=0;i0 && !sistem1var){ alert ("İY/MS oyununda aynı maça birden fazla tercihte bulunmuşsanız sistem 1 veya sistem 0 oynamalısınız."); return false; } if (systems.length>2 && !sistem1var ){ alert ("İY/MS oyununda aynı maça birden fazla tercihte bulunmuşsanız sistem 1 veya sistem 0 dan başka sistem oynayamazsınız."); return false; } } } return true; } function makeBanko(mackodu){ var input=document.getElementById("banko"+mackodu); var secilenMaclar=getMaclistesi(); for (i=0,len=secilenMaclar.length; i=700 ){ var row = tbl.insertRow(tbl.rows.length); var cellLeft = row.insertCell(0); cellLeft.setAttribute("colSpan",6); cellLeft.innerHTML="
"; baskettable= document.getElementById('baskettable'); var row = baskettable.insertRow(0); row.setAttribute("className","v9px"); var cellLeft = row.insertCell(0); cellLeft.setAttribute("colSpan",4); cellLeft=row.insertCell(1); cellLeft.setAttribute("id","basketOrantd"); cellLeft.setAttribute("colSpan",2); cellLeft.setAttribute("className","v9px"); row = baskettable.insertRow(1); if ( document.all ) { var ax = row.insertCell(0); ax.colSpan = 6; ax.innerHTML = "
"; } else { row.innerHTML = "
"; } row = baskettable.insertRow(2); if ( document.all ) { var ax = row.insertCell(0); ax.colSpan = 6; ax.background = 'http://images.bilyoner.com/site/dots_1x3.gif'; ax.innerHTML = "
"; } else { row.innerHTML = "
"; } } if (mackodu>=700){//Basket macları İçin // if there's no header row in the table, then iteration = lastRow + 1 iteration = baskettable.rows.length;; lastRow=baskettable.rows.length; var tblindex=0; //var iteration = document.getElementById('itera').value; for (i=0;i-1 ) { idxx=idxx.substring(2,idxx.length) ; idxx=parseInt(idxx); if (mackodu>idxx){ tblindex=i+4; } } } //
var row = baskettable.insertRow(tblindex); var cellLeft = row.insertCell(0); var textNode = document.createTextNode(iteration); cellLeft.setAttribute('colspan','6'); cellLeft.innerHTML="
"; var row = baskettable.insertRow(tblindex+1); row.setAttribute('id',"tr"+mackodu); var cellLeft = row.insertCell(0); cellLeft.setAttribute('width','22'); cellLeft.innerHTML="
"; //Mac Kodu var cellLeft = row.insertCell(1); cellLeft.setAttribute('width','27'); var textNode = document.createTextNode(mackodu); var yazacak = ""; yazacak =""+mackodu+"
"; cellLeft.innerHTML=yazacak; //Mac Adi var cellLeft = row.insertCell(2); var textNode = document.createTextNode(macadi); cellLeft.setAttribute('colSpan','3'); cellLeft.innerHTML="" + macadi+"
"; //remove.. var cellLeft = row.insertCell(3); cellLeft.setAttribute('width','16'); var sorsde = "http://images.bilyoner.com/site/delete_9x9.gif"; cellLeft.innerHTML = ""; //alert(cellLeft.innerHTML); var row = baskettable.insertRow(tblindex+2); row.setAttribute('id', mackodu + "*"); var cellLeft = row.insertCell(0); cellLeft.setAttribute('width','22'); cellLeft.innerHTML=" "; var cellLeft = row.insertCell(1); cellLeft.setAttribute('align','left'); cellLeft.innerHTML="MBS:"; var cellLeft = row.insertCell(2); cellLeft.setAttribute('width','14'); cellLeft.setAttribute('align','left'); cellLeft.innerHTML=""+MBS+""; //oyuntipi var cellLeft = row.insertCell(3); cellLeft.setAttribute('width','28'); cellLeft.setAttribute('align','center'); var myHint = ""; var imagelink=""; if(oyuntipi=="F") {imagelink = "http://images.bilyoner.com/site/kuponicon_ms.gif"; myHint = "Oyun Tipi : Maç Sonucu"; } else if(oyuntipi=="SF") {imagelink = "http://images.bilyoner.com/site/kuponicon_im.gif"; myHint = "Oyun Tipi : İlk Yarı/Maç Sonucu"; } else if(oyuntipi=="UO" ) {imagelink = "http://images.bilyoner.com/site/kuponicon_ts.gif"; myHint = "Oyun Tipi : Toplam Sayı"; } else if(oyuntipi=="S") {imagelink = "http://images.bilyoner.com/site/kuponicon_iy.gif"; myHint = "Oyun Tipi : İlk Yarı Sonucu"; } oyuntipiStr = "\""
"; cellLeft.innerHTML=oyuntipiStr; //tercih var cellLeft = row.insertCell(4); cellLeft.setAttribute('width','138'); cellLeft.id= mackodu + "K"; cellLeft.setAttribute('className','v9px'); var tercihx=tercih; if (oyuntipi=="UO"){ if (tercih=='1') {tercihx = "Altı";} else if (tercih=='2') {tercihx="Üstü"} } if (oyuntipi=='SF') tercihx+="-"+oran; cellLeft.innerHTML = "" + tercihx + ""; var cellLeft = row.insertCell(5); cellLeft.innerHTML=' '; var row = baskettable.insertRow(tblindex+3); var cellLeft = row.insertCell(0); var textNode = document.createTextNode(iteration); cellLeft.setAttribute("colspan",6); cellLeft.innerHTML="
"; var row = baskettable.insertRow(tblindex+4); if (el){ el.setAttribute("bgColor",myColor); } } else{//Diğer oyunlar için // if there's no header row in the table, then iteration = lastRow + 1 iteration = tbl.rows.length;; var tblindex=0; //var iteration = document.getElementById('itera').value; for (i=0;i-1 ) { idxx=idxx.substring(2,idxx.length) ; idxx=parseInt(idxx); if (mackodu>idxx){ tblindex=i+4; } if (idxx<100){ tblindex++; } } } //
var row = tbl.insertRow(tblindex); var cellLeft = row.insertCell(0); var textNode = document.createTextNode(iteration); cellLeft.setAttribute('colspan','6'); cellLeft.innerHTML="
"; //Sil
var row = tbl.insertRow(tblindex+1); row.setAttribute('id',"tr"+mackodu); var cellLeft = row.insertCell(0); cellLeft.setAttribute('width','22'); cellLeft.innerHTML="
"; //Mac Kodu var cellLeft = row.insertCell(1); cellLeft.setAttribute('width','27'); var textNode = document.createTextNode(mackodu); var yazacak = ""; yazacak =""+mackodu+"
"; cellLeft.innerHTML=yazacak; //Mac Adi if (oyuntipi.startsWith('AP') && eventDesc!='') { var cellLeft = row.insertCell(2); var textNode = document.createTextNode(eventDesc); cellLeft.setAttribute('colSpan','3'); cellLeft.innerHTML="" + eventDesc+"
"; } else if(oyuntipi!='AP'){ var cellLeft = row.insertCell(2); var textNode = document.createTextNode(macadi); cellLeft.setAttribute('colSpan','3'); cellLeft.innerHTML="" + macadi+"
"; } //remove.. var cellLeft = row.insertCell(3); cellLeft.setAttribute('width','16'); var sorsde = "http://images.bilyoner.com/site/delete_9x9.gif"; cellLeft.innerHTML = ""; //alert(cellLeft.innerHTML); var indexcount=0; if (oyuntipi.startsWith('AP') && macadi!='') { var row = tbl.insertRow(tblindex+2); cellLeft = row.insertCell(0); cellLeft.setAttribute('width','22'); cellLeft.innerHTML=" "; cellLeft = row.insertCell(1); cellLeft.setAttribute('align','left'); cellLeft.setAttribute('colSpan','5'); cellLeft.innerHTML=""+macadi+""; indexcount++; } var row = tbl.insertRow(tblindex+indexcount+2); row.setAttribute('id', mackodu + "*"); var cellLeft = row.insertCell(0); cellLeft.setAttribute('width','22'); cellLeft.innerHTML=" "; var cellLeft = row.insertCell(1); cellLeft.setAttribute('align','left'); cellLeft.innerHTML="MBS:"; var cellLeft = row.insertCell(2); cellLeft.setAttribute('width','14'); cellLeft.setAttribute('align','left'); cellLeft.innerHTML=""+MBS+""; //oyuntipi var cellLeft = row.insertCell(3); cellLeft.setAttribute('width','28'); cellLeft.setAttribute('align','center'); var myHint = ""; var imagelink=""; if(oyuntipi=="F") {imagelink = "http://images.bilyoner.com/site/kuponicon_ms.gif"; myHint = "Oyun Tipi : Maç Sonucu"; } else if(oyuntipi=="DC") {imagelink = "http://images.bilyoner.com/site/kuponicon_c.gif"; myHint = "Oyun Tipi : Çifte ?ans"; } else if(oyuntipi=="SF") {imagelink = "http://images.bilyoner.com/site/kuponicon_im.gif"; myHint = "Oyun Tipi : İlk Yarı/Maç Sonucu"; } else if(oyuntipi=="SC") {imagelink = "http://images.bilyoner.com/site/kuponicon_sk.gif"; myHint = "Oyun Tipi : Maç Skoru"; } else if(oyuntipi=="UO") {imagelink = "http://images.bilyoner.com/site/kuponicon_au.gif"; myHint = "Oyun Tipi : Altı Üstü"; } else if(oyuntipi=="GS" ) {imagelink = "http://images.bilyoner.com/site/kuponicon_tg.gif"; myHint = "Oyun Tipi : Toplam Gol"; } else if(oyuntipi=="S") {imagelink = "http://images.bilyoner.com/site/kuponicon_iy.gif"; myHint = "Oyun Tipi : İlk Yarı Sonucu"; } else if(oyuntipi.startsWith("AP")) {imagelink = "http://images.bilyoner.com/site/kuponicon_uv.gif"; myHint = "Oyun Tipi : Uzun Vadeli"; } oyuntipiStr = "\""
"; cellLeft.innerHTML=oyuntipiStr; var tire = " - "; //tercih var cellLeft = row.insertCell(4); cellLeft.setAttribute('width','138'); cellLeft.id= mackodu + "K"; cellLeft.setAttribute('className','v9px'); var tercihx=tercih; if (oyuntipi=="UO"){ if (tercih=='1') {tercihx = "Altı";} else if (tercih=='2') {tercihx="Üstü"} } if (oyuntipi.startsWith('AP')) { tercihx=tercih.replace(';;',':'); } cellLeft.innerHTML = "" + trim(tercihx) + tire + oran + ""; var cellLeft = row.insertCell(5); cellLeft.innerHTML=' '; var row = tbl.insertRow(tblindex+3+indexcount); var cellLeft = row.insertCell(0); var textNode = document.createTextNode(iteration); cellLeft.setAttribute("colspan",6); cellLeft.innerHTML="
"; var row = tbl.insertRow(tblindex+4+indexcount); if ( document.all ) { var ax = row.insertCell(0); ax.colSpan = 6; ax.background = 'http://images.bilyoner.com/site/dots_1x3.gif'; ax.innerHTML = "
"; } else { row.innerHTML = "
"; } if (el){ el.setAttribute("bgColor",myColor); } } kuponAreaAdd(mackodu,oran,oyuntipi,MBS,macadi,tercih,banko,Eventcode); } function addRowToTable(genismi,el,mackodu, macadi,oran,oyuntipi,MBS,tercih,banko,EventCode ,eventDesc ) { var myColor='#aadf68'; var secilenMaclar=getMaclistesi(); var iteration = ""; var SamematchAndGameExists=false; var SamematchExists=false; var SamematchAndGameAndGuessExists=false; var matchForDiffGameExists=false; var matchForSameEventExists=false; //ne var ne yok bak?yoz.... for (i=0,axc=secilenMaclar.length; i=700){//Basket için ikinciyi ekleyemez. alert ("Basketbol oyunu için ikinci tercihte bulunamazsınız."); return; } if ((oyuntipi=='F') && !SamematchAndGameAndGuessExists && !matchForDiffGameExists && mackodu<700) {//ikinciyi ekliyoz.sadece mac sonucu oyunu i?in var trx; if (affid=='') trx=window.parent.document.getElementById(mackodu+"*"); else trx=window.document.getElementById(mackodu+"*"); if (trx){ var tdoran=trx.cells[4]; var result=getMatchByMatchId(secilenMaclar,mackodu); tdoran.innerHTML=""+result[0].guess+"/"+tercih+" - "+result[0].odd+"/"+oran+""; if (result.length==2) //mac listesinden kald?r?yoz. removeMatchByIdAndGuess(result[1].matchid,result[1].guess); if (!genismi){ if (el){ var trx=el.parentNode; //if (result.length)Burda yap beyaza cev?rme ?s?n? if (result.length==2){ if (result[1].guess=='1') trx.cells[8].setAttribute("bgColor",""); else if (result[1].guess=='X') trx.cells[10].setAttribute("bgColor",""); else if (result[1].guess=='2') trx.cells[12].setAttribute("bgColor",""); } if (tercih=='1' ) trx.cells[8].setAttribute("bgColor",myColor); if (tercih=='X') trx.cells[10].setAttribute("bgColor",myColor); if (tercih=='2' ) trx.cells[12].setAttribute("bgColor",myColor); } }else {//gen?s ekran olay? if (el){ var index=8; var trx=el.parentNode; var index=8; var trx=el.parentNode; if (oyuntipi=='F'){ if (result.length==2){ if (result[1].guess=='1') index=8; else if (result[1].guess=='X') index=10; else if (result[1].guess=='2') index=12; if (index==8||index==10||index==12||index==20||index==22||index==32||index==34||index==36 ) trx.cells[index].setAttribute("bgColor","ced7d2"); else trx.cells[index].setAttribute("bgColor",""); } if (tercih=='1' ) trx.cells[8].setAttribute("bgColor",myColor); if (tercih=='X' ) trx.cells[10].setAttribute("bgColor",myColor); if (tercih=='2') trx.cells[12].setAttribute("bgColor",myColor); } if (oyuntipi=='S'){//İlk yarı sonucu if (result.length==2){ if (result[1].guess=='1') index=14; else if (result[1].guess=='X') index=16; else if (result[1].guess=='2') index=18; if (index==8||index==10||index==12||index==20||index==22||index==32||index==34||index==36 ) trx.cells[index].setAttribute("bgColor","ced7d2"); else trx.cells[index].setAttribute("bgColor",""); } if (tercih=='1' ) trx.cells[14].setAttribute("bgColor",myColor); if (tercih=='X' ) trx.cells[16].setAttribute("bgColor",myColor); if (tercih=='2') trx.cells[18].setAttribute("bgColor",myColor); } } } kuponAreaAdd(mackodu,oran,oyuntipi,MBS,macadi,tercih,banko); } } else if (oyuntipi.startsWith('AP')&& !matchForSameEventExists) {//Antepost Oyunu i?in farkl? Evetnlar i?i?n oyun oynayabilir. tabloyaekleAQ(genismi,el,mackodu, macadi,oran,oyuntipi,MBS,tercih,banko,true,EventCode,eventDesc ); } else if (oyuntipi=='SF'&& !SamematchAndGameAndGuessExists && !matchForDiffGameExists) {//ikinciyi ucunucyu ekliyoz.ilk yar? mac sonucu oyunu i?in var trx; if (affid=='') trx=window.parent.document.getElementById(mackodu+"*"); else trx=window.document.getElementById(mackodu+"*"); tabloyaekleAQ(genismi,el,mackodu, macadi,oran,oyuntipi,MBS,tercih,banko,true ,EventCode,eventDesc ); //Burda sistem 1 secenegini aktif hale getircez.Digerlerini kald?rcaz. //Bankodisabled ise daha eski maclari da disable ediyoz. iYMSleriDisableEt(genismi,mackodu); } else if (oyuntipi=='SF'&& SamematchAndGameAndGuessExists && !matchForDiffGameExists) {//DAha onceden sectigini kald?r?yoz. //Burda mac? kald?r?yoz. if (!genismi){ if (el){ el.setAttribute("bgColor",''); } }else {//geni? ise buray? yapiyoz. //cellin imdexine gore renklendirme yapiyoz. var index=el.cellIndex; var trx=el.parentNode; trx.cells[index].setAttribute("bgColor",""); } removeMatchByIdAndGuess(mackodu,tercih); secilenMaclar=getMaclistesi(); rrftsadeceKaldirIYMS(genismi,mackodu,tercih,false); iYMSleriEnableEt(mackodu); } else if ( SamematchAndGameAndGuessExists && !matchForDiffGameExists) {//burda ikinci secilen mac sonucu tercihini kald??ryoruz. //Burda mac? kald?r?yoz. if (!genismi){ if (el){ el.setAttribute("bgColor",''); } }else {//geni? ise buray? yapiyoz. //cellin imdexine gore renklendirme yapiyoz. var index=el.cellIndex; var trx=el.parentNode; if (index==8||index==10||index==12||index==20||index==22||index==32||index==34||index==36 ) trx.cells[index].setAttribute("bgColor","ced7d2"); else trx.cells[index].setAttribute("bgColor",""); } removeMatchByIdAndGuess(mackodu,tercih); secilenMaclar=getMaclistesi(); if (getMatchByMatchId(secilenMaclar,mackodu).length==0){//baska tercihi yoksa amcam?n tr sini de silcez. rrftsadeceKaldir(genismi,mackodu,index); } else {//burda trnin icerigini duzeltiyoz. var trx=parent.document.getElementById(mackodu+"*"); if (trx){ var tdoran=trx.cells[4]; var result=getMatchByMatchId(secilenMaclar,mackodu); tdoran.innerHTML=""+result[0].guess+" - "+result[0].odd+""; } } hesapla(); } else if (oyuntipi!='F' && SamematchAndGameAndGuessExists && !matchForDiffGameExists) {//burda ikinci secilen mac sonucu tercihini kald??ryoruz. alert ("Bu maç için bir tercihiniz bulunmakta.Bu tercihe oynamak için lütfen eski tercihinizi kaldırınız. "); } else if (matchForDiffGameExists){//burda da ilk secileni kald?rcaz ikinci secileni ekliycez. alert ("Bu maç, kuponunuzda zaten ekli durumda.\nBu oyun türünde oynamak için lütfen kuponunuzdan çıkarın."); } } else { return; } } //Gets the given selected Match by matchid function getMatchByMatchId (maclistesi,mackodu){ var result=new Array(); if (maclistesi &&maclistesi.length>0){ for (i=0,len=maclistesi.length;i=700 &&Got[ikj].gameType=='SF' )){ toplamOran *=Got[ikj].odd; } tablermbs[Got[ikj].mbs]++; //toplam? bir art?trd?k } toplamOran*=basketoran; //for other combinations for macsonucu cifet sans and alti ustu for(var ixj in tablermbs ){ if (ixj==3){ if (tablermbs[4]==0) mbs= 3; else mbs= 4; break; } if (tablermbs[ixj]!=0 && ixj <=tablermbs[ixj]) { mbs= ixj; break; } } //------------------------------------------------------------ if (mbs<=Got.length && sistemler.indexOf(""+(Got.length-bankocount))>-1){ result.push(new Combination(mbs,Got,toplamOran)); result[result.length-1].sistem = Got.length; result[result.length-1].valid = 1; } for(var ixj=1,l=ValidSistemsHashSet.length;ixjGot.length) ValidSistemsHashSet[Got.length-bankocount]=false; if (ixj>matchcount-bankocount ) ValidSistemsHashSet[ixj]=false; } } return; } var condition=true; for (var j = 0,lxc= Src.length; j =700 && maclistesi[i].gameType!='SF') counter++; } return counter; } function getBasketMatchCountAll(maclistesi){ //Et bakal?m edebilirsen.Eger basketTable kaldırma Kontrolu için var counter=0; for (i=0;i=700) counter++; } return counter; } function getBasketOranlari(maclistesi){ var toplamOran=1; var basketcount=getBasketMatchCount(maclistesi); var basketoran=basketOranlari[basketcount]; for (ikj=0,len=maclistesi.length; ikj=700 &&maclistesi[ikj].gameType=='SF' )){ toplamOran *=maclistesi[ikj].odd; } } toplamOran*=basketoran; return toplamOran; }