
﻿
var TEMPTROBJCOLOR;var TEMPTROBJ;function HLon(obj)
{if(TEMPTROBJ!=null)
{TEMPTROBJ.style.backgroundColor=TEMPTROBJCOLOR;}
TEMPTROBJ=obj;TEMPTROBJCOLOR=obj.style.backgroundColor;obj.style.backgroundColor='#FFE57E';}
function HLoff()
{if(TEMPTROBJ!=null)
{TEMPTROBJ.style.backgroundColor=TEMPTROBJCOLOR;}}
function parseFloat2(str){if(str.length==0)
return 0;if(parseFloat("4,5")==4)
str=str.replace(",",".");f=parseFloat(str);return f;}
function putpoint(str){if(str.length==0)
return 0;return str.replace(",",".");}
function replaceTurkish(str){var str2=str;str2=str2.replace("Ç",'C');str2=str2.replace("Ğ",'G');str2=str2.replace("İ",'I');str2=str2.replace("Ü",'U');str2=str2.replace("Ö",'O');str2=str2.replace("Ş",'S');str2=str2.replace("ç",'c');str2=str2.replace("ğ",'g');str2=str2.replace("ü",'u');str2=str2.replace("ö",'o');str2=str2.replace("ş",'s');str2=str2.toLowerCase();return str2;}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function openWin(strURL,arg1,arg2,arg3)
{var argLen=arguments.length;var intX,intY,strUrl;if(argLen<3){intX='780';intY='550';}else{intX=arg2;intY=arg3;}
oWin=window.open(strURL,'',"toolbar=no, menubar=no, location=no, status=no, width="+intX+", height="+intY+",left=0, top=0, scrollbars=yes, resizable=yes");oWin.focus();}
var dateValid
var OK="1"
function isDate(inStr){Tarih=inStr;if(Tarih.length==0)
{return false;}
if(Tarih.indexOf("/")<0&&Tarih.indexOf("-")<0&&Tarih.indexOf(".")<0)
{return false;}
if(Tarih.indexOf("/")>0)
{Ayirach="/"}
else if(Tarih.indexOf("-")>0)
{Ayirach="-"}
else
{Ayirach="."}
FirstPart=Tarih.substring(0,Tarih.indexOf(Ayirach))
Tarih=Tarih.substring(Tarih.indexOf(Ayirach)+1,Tarih.length)
SecondPart=Tarih.substring(0,Tarih.indexOf(Ayirach))
ThirdPart=Tarih.substring(Tarih.indexOf(Ayirach)+1,Tarih.length)
OK="1"
validateNum(FirstPart)
validateNum(SecondPart)
validateNum(ThirdPart)
if(OK=="0")
{return false;}
if(SecondPart<1||SecondPart>12)
{return false;}
if(ThirdPart.length!=2&&ThirdPart.length!=4)
{return false;}
if(ThirdPart.length==2)
{if(ThirdPart=='00')
{ThirdPart='2000'}
else
{var BugunTarih=new Date()
var BuYil=BugunTarih.getFullYear()
var BuYilStr=String(BuYil)
ThirdPart=BuYilStr.substring(0,2)+ThirdPart}
datefld.value=FirstPart+Ayirach+SecondPart+Ayirach+ThirdPart}
var days
month=SecondPart
if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)days=31
else if(month==4||month==6||month==9||month==11)days=30
else if(month==2)
{if(isLeapYear(ThirdPart))days=29
else days=28}
if(FirstPart<1||FirstPart>days)
{return false;}
return true;}
function validateNum(Num){var CharSet="0123456789"
var temp=""
for(var i=0;i<Num.length;i++){temp=""+Num.substring(i,i+1)
if(CharSet.indexOf(temp)=="-1")OK="0"}}
function isLeapYear(Year)
{if(((Year%4)==0)&&((Year%100)!=0)||((Year%400)==0))
{return(true);}
else
{return(false)}}
function PrevStandings_onclick(LigName,LigID,LigType)
{openWin("/gecmis_puan_durumu/"+replaceChars(LigName)+"/"+LigID+"/"+LigType+"/");}
function Tc(TeamId,SubGroupId,TeamName)
{openWin("/takim/"+replaceChars(TeamName)+"/"+TeamId+"/"+SubGroupId,'',1000,700);}
function TcExchange(TeamId,SubGroupId,TeamName)
{openWin("/takim/"+replaceChars(TeamName)+"/"+TeamId+"/"+SubGroupId,'',1000,700);}
function MSc(MatchID,team1,team2)
{openWin("/mac_sonucu/"+replaceChars(team1)+"-"+replaceChars(team2)+"/"+MatchID,'',1000,700);}
function BBMSc(MatchID)
{openWin(variables.mackolikDomain+"/Basketball/Match/BasketMatch.aspx?id="+MatchID,'',1000,750);}
function MScExchange(MatchID,team1,team2)
{openWin("http://www.sahadan.com/mac_sonucu/"+replaceChars(team1)+"-"+replaceChars(team2)+"/"+MatchID,'',1000,700);openWin(variables.mackolikDomain+"/Match/Default.aspx?id="+MatchID,'',1000,750);}
function Kc(MatchId,Team1ID,Team2ID,SeasonID,LeagueID,Team1Name,Team2Name)
{openWin("/takim_karsilastirma/"+replaceChars(Team1Name)+"-"+replaceChars(Team2Name)+"/"+MatchId+"/"+Team1ID+"/"+Team2ID+"/"+SeasonID+"/"+LeagueID,'',1000,700);}
function KcExchange(MatchId,Team1ID,Team2ID,SeasonID,LeagueID,Team1Name,Team2Name)
{openWin("/takim_karsilastirma/"+replaceChars(Team1Name)+"-"+replaceChars(Team2Name)+"/"+MatchId+"/"+Team1ID+"/"+Team2ID+"/"+SeasonID+"/"+LeagueID,'',1000,700);}
function OpenForum(id)
{openWin(variables.mackolikDomain+"/ForumDetails/Default.aspx?id="+id,'',800,600);}
function PDc(LigID,altGEleme,ligName)
{openWin("/puan_durumu/"+replaceChars(ligName)+"/"+LigID+"/"+altGEleme,'',1000,700);}
function Tahmin(newsId)
{openWin("http://www.tahminkolik.com/Newsdetails.aspx?id="+newsId,'',1000,700);}
function PDcExchange(LigID,altGEleme,ligName)
{openWin("/puan_durumu/"+replaceChars(ligName)+"/"+LigID+"/"+altGEleme,'',1000,700);}
function KPc(couponId)
{openWin("/iddaa/tahmin/"+couponId);}
function replaceChars(str)
{str=str.replace(/[Ü,ü]/g,'u');str=str.replace(/[Ö,ö]/g,'o');str=str.replace(/[Ğ,ğ]/g,'g');str=str.replace(/[İ,ı]/g,'i');str=str.replace(/[Ş,ş]/g,'s');str=str.replace(/[Ç,ç]/g,'c');str=str.replace(/\./g,'_');str=str.replace(/\&/g,'_');str=str.replace(/\s+/g,'_');return str;}
function blinkIt(){if(!document.all)return;else{var elements=document.getElementsByTagName('blink');for(i=0,n=elements.length;i<n;i++){s=elements[i];s.style.color=(s.style.color=='#090')?'#f0f0f4':'#090';}}}
function getElementsById(tagName,whichId){var objs=document.getElementsByTagName(tagName);var returnArray=[];for(var i=0,n=objs.length;i<n;i++){if(objs[i].id==whichId){returnArray[returnArray.length]=objs[i];}}
return returnArray;}
function rgb2Hex(rgbColour){try{var rgbValues=rgbColour.substring(4,rgbColour.indexOf(")"));var rgbArray=rgbValues.split(", ");var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);var hexColour="#"+IntToHex(red)+IntToHex(green)+IntToHex(blue);}
catch(e){}
return hexColour.toLowerCase();}
function IntToHex(strNum){base=strNum/16;rem=strNum%16;base=base-(rem/16);baseS=MakeHex(base);remS=MakeHex(rem);return baseS+''+remS;}
function MakeHex(x){if((x>=0)&&(x<=9))
{return x;}
else
{switch(x)
{case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F";}}}
setInterval('blinkIt()',800);function getCookie(name){var cname=name+"=";var dc=document.cookie;if(dc.length>0){begin=dc.indexOf(cname);if(begin!=-1){begin+=cname.length;end=dc.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin,end));}}
return null;}
function setCookie(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+
((expires==null)?"":"; expires="+expires.toGMTString())+
((path==null)?"":"; path="+path)+
((domain==null)?"":"; domain="+domain)+
((secure==null)?"":"; secure");}
function $(id)
{return document.getElementById(id);}
var variables={jsPath:null,cssPath:null,imagePath:null,mackolikDomain:null};var cookieVariables={lc:null,le:null,st:null,gs:null,se:null,cm:null,fs:null,ff:null,rn:null,lsr:null,csr:null,ols:null,setValue:function(prop,value){eval('this.'+prop+' = value;');var expiration=new Date();expiration.setTime(expiration.getTime()+(365*24*60*60*1000));setCookie("setting",generateCookieString(),expiration);}};function getValueWithQuote(value){if(value||value==0)
return'"'+value+'"';else return'null';}
function generateCookieString(){var cookieStr='({lc:'+getValueWithQuote(cookieVariables.lc)+',';cookieStr+='le:'+getValueWithQuote(cookieVariables.le)+',';cookieStr+='st:'+getValueWithQuote(cookieVariables.st)+',';cookieStr+='gs:'+getValueWithQuote(cookieVariables.gs)+',';cookieStr+='cm:'+getValueWithQuote(cookieVariables.cm)+',';cookieStr+='fs:'+getValueWithQuote(cookieVariables.fs)+',';cookieStr+='ff:'+getValueWithQuote(cookieVariables.ff)+',';cookieStr+='rn:'+getValueWithQuote(cookieVariables.rn)+',';cookieStr+='lsr:'+getValueWithQuote(cookieVariables.lsr)+',';cookieStr+='csr:'+getValueWithQuote(cookieVariables.csr)+',';cookieStr+='ols:'+getValueWithQuote(cookieVariables.ols)+',';cookieStr+='se:'+getValueWithQuote(cookieVariables.se)+'})';return cookieStr;}
function getGeneralCookie(){cookieVariablesX=eval(getCookie("setting"));if(cookieVariablesX){if(cookieVariablesX.lc)cookieVariables.lc=cookieVariablesX.lc;if(cookieVariablesX.le)cookieVariables.le=cookieVariablesX.le;if(cookieVariablesX.st)cookieVariables.st=cookieVariablesX.st;if(cookieVariablesX.gs)cookieVariables.gs=cookieVariablesX.gs;if(cookieVariablesX.se)cookieVariables.se=cookieVariablesX.se;if(cookieVariablesX.ff)cookieVariables.ff=cookieVariablesX.ff;if(cookieVariablesX.rn)cookieVariables.rn=cookieVariablesX.rn;if(cookieVariablesX.lsr)cookieVariables.lsr=cookieVariablesX.lsr;if(cookieVariablesX.csr)cookieVariables.csr=cookieVariablesX.csr;if(cookieVariablesX.ols)cookieVariables.ols=cookieVariablesX.ols;if(cookieVariablesX.fs)cookieVariables.fs=cookieVariablesX.fs;}}
getGeneralCookie();function rollObj()
{var xIncrement=21;var tIncrement=10;var rollIntervalId=0;var divId="";var targetHeight=0;this.startRelativeRoll=function(Div,Height)
{divId=Div;targetHeight=Height;rollIntervalId=setInterval(relativeRoll,tIncrement);};var relativeRoll=function()
{var divObj=document.getElementById(divId);var currentHeight=parseInt(divObj.style.height.replace('px',''));if(currentHeight<targetHeight)
divObj.style.height=document.all?(currentHeight+xIncrement).toString():(currentHeight+xIncrement).toString()+"px";else if(currentHeight>targetHeight)
divObj.style.height=document.all?(currentHeight-xIncrement).toString():(currentHeight-xIncrement).toString()+'px';else
clearInterval(rollIntervalId);};}
var myRollObj=new rollObj();function cumulativeOffset(element){var valueT=0
var valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}
while(element);return[valueL,valueT];}
function relocateBanner(placeHolder,container){var ph=document.getElementById(placeHolder);if(ph){ph.style.display=document.all?'inline':'table-row';var b=document.getElementById(container);var offset=cumulativeOffset(ph);bTop=offset[1];bLeft=offset[0];b.style.left=bLeft+'px';b.style.top=bTop+'px';b.style.display='block';ph.style.height=(b.offsetHeight+1)+'px';}}
function openOddLink(iddaaId){window.open("http://run.admost.com/adx/goto.ashx?pbk=4628-4048-957&redir="+escape("http://www.tuttur.com/landing/?refid=aac1dba2-7945-45ed-813f-a06cc391dec9&iddaa="+iddaaId));}