
function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)
endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function getCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)
return getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return null;}
function showAd(placement){if(getCookie("popupads")>-1){var tile,width,height,dcoptStr;var ord=Math.floor(Math.random()*10000000000000000);switch(placement){case"leaderboard":case"banner":width=728;height=90;break;case"ploader":case"mrec":width=300;height=250;break;case"tallBan":width=160;height=600;break;case"blockSmall":case"blockSmallb":width=120;height=90;break;}
var size=width+'x'+height;if(typeof(showAd.tile)=="undefined"){showAd.tile=1;}else{++showAd.tile;}
showAd.dcoptStr=(typeof(showAd.dcoptStr)=="undefined")?'dcopt=ist;':'';showAd.dexQS=(typeof(dexQS)!=="undefined"&&dexQS.length>0)?dexQS:'';document.write('<!-- begin ad tag (tile='+showAd.tile+') -->');document.write('<script type="text/javascript" src="http://ad.doubleclick.net/adj/dmd.'+domain+'/ROS;'+showAd.dexQS+'tile='+showAd.tile+';'+showAd.dcoptStr+'sz='+size+';ord='+ord+'?"><\/script>');document.write('<noscript>');document.write('<a href="http://ad.doubleclick.net/jump/dmd.'+domain+'/ROS;tile='+showAd.tile+';sz='+size+';ord='+ord+'?" target="_blank">');document.write('<img src="http://ad.doubleclick.net/ad/dmd.'+domain+'/ROS;tile='+showAd.tile+';sz='+size+';ord='+ord+'?" width="'+width+'" height="'+height+'" border="0" alt="">');document.write('</a>');document.write('</noscript>');document.write('<!-- End ad tag -->');}}
function placeLB(){showAd("leaderboard");}
function placeBN(){showAd("banner");}
function placePL(){showAd("ploader");}
function placeMR(){showAd("mrec");}
function placeTALL(){showAd("tallBan");}
function placeBlockSmall(){showAd("blockSmall");}
function placeBlockSmallb(){showAd("blockSmallb");}
var domain,demdexId;var pattern=new RegExp("myleague\.com");if(!document.domain.match(pattern)){domain='casesladder';demdexId=26;}else{domain='myleague';demdexId=35;}
var dexBaseURL=(("https:"==document.location.protocol)?"https://a248.e.akamai.net/demdex.download.akamai.com/dm/"+demdexId+"/":"http://cdn.demdex.net/dm/"+demdexId+"/");document.write(unescape("%3Cscript src='"+dexBaseURL+"demdex.js' type='text/javascript' %3E%3C/script%3E"));
