var dummy="$Id: global.js,v 1.45.8.1 2011-12-09 13:25:06 sgutev Exp $";function unicode_unescape(e){if(e==null){return}var a="";var b=/\\u([0-9A-Fa-f]{4})/g;var d;var f=0;while((d=b.exec(e))!=null){a+=e.substring(f,d.index);var c=d[1];a+=String.fromCharCode(parseInt(c,16));f=b.lastIndex}a+=e.substring(f);return a}function str_trim(h,g){var f="";var a="";var e=false;for(var d=0;d<h.length;d++){var k=h.charAt(d);if(g.indexOf(k)>=0){a+=k}else{if(f.length>0){f+=a}a="";f+=k}}return f}function round_float(d){var c=""+Math.round(d*100)/100;var b=c.indexOf(".");if(b<0){return c+".00"}var a=c.substring(0,b+1)+c.substring(b+1,b+3);if(b+2==c.length){a+="0"}return a}function open_window(b,c,d,l,a,f){var k=window.screen.width;var e=window.screen.height;if(d>k){d=k/2}if(l>e){heigth=e/2}var g=window.open(b,c,"resizable="+a+",scrollbars="+f+",width="+d+",height="+l+",status=yes");g.focus();g.opener=window}function get_cookie(b){var f=document.cookie;if(f.length==0){return""}var d="(^|[\\s;])"+b+"=";var e=f.search(d);if(e==-1){return""}if(e==0){e+=b.length+1}else{e+=b.length+2}var a=f.indexOf(";",e);if(a==-1){a=f.length}return f.substring(e,a)}function set_cookie(c,e,a,g,d,f){if(!d){d=cookie_domain}var b=c+"="+e+((a)?"; expires="+a.toGMTString():"")+((g)?"; path="+g:"")+((d)?"; domain="+d:"")+((f)?"; secure":"");document.cookie=b}function get_pref(b){var f=get_cookie(prefs_cookie_name);for(var d=0;d<prefs_persistent_cookie_params.length;d++){if(prefs_persistent_cookie_params[d]==b){f=get_cookie("P_"+prefs_cookie_name)}}var e=new RegExp("^(?:.*|)?"+b+"=([^|]*)");var a=f.match(e);return(a?a.pop():null)}function set_pref(b,e){var a=prefs_cookie_name;if(prefs_persistent_cookie_params.indexOf(b)!=-1){var a="P_"+prefs_cookie_name;var c=new Date();c.setTime(c.getTime()+31536000)}else{var c=""}var d=get_cookie(a);d=remove_key(d,b);if(e&&e!=""){d=append_key(d,b,e)}if(b!="update"){if(appears_logged_in()){if(a==prefs_cookie_name){d=set_key(d,"update",1)}else{set_cookie(prefs_cookie_name,set_key(get_cookie(prefs_cookie_name),"update",1),c,"/")}}}set_cookie(a,d,c,"/")}function appears_logged_in(){var a=get_cookie(login_cookie_name);if(a!=null&&a!=""){return true}return false}function set_key(d,b,c){var a=remove_key(d,b);a=append_key(a,b,c);return a}function append_key(d,a,b){var c=a+"="+b;return(d.length==0?c:d+"|"+c)}function remove_key(g,c){var f=new RegExp("^(.*|)?"+c+"=[^|]*(.*)$");var b=g;var a=b.match(f);while(a){var e=a[1];var d=a[2];if(e==null||e.length==0){b=d.substring(1)}else{if(d.length==0){b=e.substring(0,e.length-1)}else{b=e+d.substring(1)}}a=b.match(f)}return b}var at=new UserAgent();function UserAgent(){var a=navigator.appName.toUpperCase();if(a=="NETSCAPE"){this.b="ns"}else{if(a=="MICROSOFT INTERNET EXPLORER"){this.b="ie"}else{if(a=="OPERA"){this.b="op"}else{this.b=a}}}this.version=navigator.appVersion;this.v=parseInt(this.version);this.ns=(this.b=="ns"&&this.v>=4);this.ns4=(this.b=="ns"&&this.v==4);this.ns5=(this.b=="ns"&&this.v==5);this.ie=(this.b=="ie"&&this.v>=4);this.ie4=(this.version.indexOf("MSIE 4")>0);this.ie5=(this.version.indexOf("MSIE 5")>0);this.ie55=(this.version.indexOf("MSIE 5.5")>0);this.ie6=(this.version.indexOf("MSIE 6")>0);this.op=(this.b=="op");this.op4=(this.b=="op"&&this.v==4);this.op5=(this.b=="op"&&this.v==5)}function frac_to_dec(a,c){var b=a+"/"+c;if(b=="13/8"){return 2.62}if(b=="15/8"){return 2.87}if(b=="11/8"){return 2.37}if(b=="8/13"){return 1.61}if(b=="2/7"){return 1.28}if(b=="1/8"){return 1.12}if(c>100){return((parseFloat(a)/parseFloat(c))+1).toFixed(3)}else{return((parseFloat(a)/parseFloat(c))+1).toFixed(2)}}function format_price(c,b){if(c==b){return xl_evens}var a=get_pref("PRICE_TYPE");if(a=="DECIMAL"){return frac_to_dec(c,b)}return c+odds_sep+b}function getFormContent(d){var g=document.forms[d];var k=g.elements.length;var c="";var a,e,h;for(var b=0;b<k;b++){h=g.elements[b];a=h.name;e=h.value;if(a==""){continue}if(h.type=="checkbox"&&!h.checked){continue}c=c+a+"="+e+"&"}return c}function ieDropDownFix(){var f=document.getElementsByTagName("ul");var e,a,c,b;var d=f.length-1;if(d==-1){return}do{if(f[d].className=="dd-mkt"||f[d].className=="dd-tv"||f[d].className=="i"){a=f[d].getElementsByTagName("li");a[0].onmouseover=function(){this.className+=" sfhover";this.style.zIndex="99"};a[0].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")};e=a[0].getElementsByTagName("ul");if(!e.length){continue}c=e[0].getElementsByTagName("li");if(c.length>10){e[0].className+=" scroll"}}}while(d--)}function getFlashVersion(){try{try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{a.AllowScriptAccess="always"}catch(b){return"6,0,0"}}catch(b){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(b){}}return"0,0,0"}function check_superbet_no_flash(c,b){var a=document.getElementById("superbetSwf");if(getCookie("OB_Status")!=null){a.innerHTML=c}else{a.innerHTML=b}}function hltRow(c){var b=c.parentNode.getElementsByTagName("td");var a=b.length;do{if(b[a-1].style.backgroundColor==""){b[a-1].style.backgroundColor="#efefef"}else{b[a-1].style.backgroundColor=""}}while(--a)}function hltAttach(){var a=document.getElementById("main");var d=a.getElementsByTagName("table");var b=function(){hltRow(this)};var c=d.length;if(c>0){do{if(d[c-1].className.indexOf("hvr")>-1){var e=d[c-1].getElementsByTagName("td");j=e.length;do{e[j-1].onmouseover=b;e[j-1].onmouseout=b}while(--j)}}while(--c)}}function validateNavCriteria(){var a=document.navSearch.sCriteria.value;if(a==left_nav_dummy||a==""){alert(left_nav_enter)}else{return true}return false}function validateNavCriteriaButton(){if(validateNavCriteria()){document.navSearch.submit()}}function viewAllSettings(){var a=get_cookie(cookie_name);if(appears_logged_in()){html="<a href="+url+">"+output+"</a>"}else{html='<a class="tipper">'+output+'<span class="tip">'+ttip+"</span></a>"}document.getElementById("view_all_settings_span").innerHTML=html}var isIE=document.all;var isMoz=document.getElementById;var isNS4=document.layers;var px=document.layers?"":"px";function getCookie(c){var b=document.cookie;var e=c+"=";var d=b.indexOf("; "+e);if(d==-1){d=b.indexOf(e);if(d!=0){return null}}else{d+=2}var a=document.cookie.indexOf(";",d);if(a==-1){a=b.length}return unescape(b.substring(d+e.length,a))}function deleteCookie(a,c,b){if(getCookie(a)){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}}function drop_poker_download(){if(!getCookie("PP_disp_pok")){return}deleteCookie("PP_disp_pok","/","");if(!isMoz&&!isIE&&!isNS4){return}div_handel=(isMoz)?document.getElementById("dropin").style:isIE?document.all.dropin:document.dropin;div_handel.top=get_page_offset()-250+px;div_handel.visibility=(isMoz||isIE)?"visible":"show";dropstart=setInterval("increment_position()",50)}function increment_position(){if(parseInt(div_handel.top)<50+get_page_offset()){div_handel.top=parseInt(div_handel.top)+40+px}else{clearInterval(dropstart)}}function close_poker_box(){div_handel.visibility="hidden"}function get_page_offset(){if(isIE){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement.scrollTop:document.body.scrollTop}else{return window.pageYOffset}}function poker_popup_fs(){if(document.getElementById("chk_pok_no_shw").checked){window.frames.popup_blocker.document.forms[0].submit()}}function check_login_details(h){var b=document.getElementById("cust_login_body");var a=document.getElementById("guest_login_body");var l=document.getElementById("my_bets_num_bets_div");var e=document.getElementById("cust_username");var f=document.getElementById("loginUID");var c=document.getElementById("prev_req");if(appears_logged_in()){if(h){hide_balance_toggle=get_pref("HIDE_BALANCE")}else{if(hide_balance_toggle!=get_pref("HIDE_BALANCE")){set_pref("HIDE_BALANCE",hide_balance_toggle)}}b.style.display="";a.style.display="none";updateMessageButtons();var k=unicode_unescape(get_pref("MY_BETS_NUM_BETS"));if(l!=null&&k!="-"){l.innerHTML="("+k+")"}if(e){e.innerHTML=unicode_unescape(get_pref("USERNAME"))}displayBalance();if(h){var g=get_pref("balance_pt_cas");if(cas_bal_upd_asap==1&&(!g||g=="")){UpdateCasBalanceAjax()}UpdateBalanceSchedule()}}else{var d=b.style.display==""&&a.style.display=="none"?true:false;b.style.display="none";a.style.display="";f.value=get_cookie(loginuid_cookie_name);if(h){c.value=get_cookie(pre_req_cookie_name)}if(d){window.location.reload(true)}}}function UpdateCasBalanceAjax(){UpdateBalanceAjax(1)}function UpdateAllBalanceAjax(){UpdateBalanceAjax(0)}function UpdateBalanceAjax(c){if(cas_bal_upd_asap){if(appears_logged_in()&&document.location.protocol=="https:"){var b=tld_thirdparty_secure}else{var b=tld_thirdparty}}else{if(appears_logged_in()&&document.location.protocol=="https:"){var b=tld_secure}else{var b=tld}}var b=b+"?action=update_balance_ajax"+tp_source_args;if(c){b=b+"&casino_bal_only=1"}var a={};a.casino_bal_only=c;make_ajax_get_request(b,a,UpdateBalanceCallback)}function UpdateBalanceCallback(c,a,d,b){if(d==true&&b==1&&a.casino_bal_only!=1){UpdateBalanceSchedule()}}function UpdateBalanceSchedule(){var a=120;var b=get_pref("balance_expiry");a=b.split(",")[1];a=parseInt(a);bal_update_timeout=setTimeout(UpdateAllBalanceAjax,a*1000)}function do_customer_logout(){var a=document.getElementById("bsScroller");if(a){if(a.style.display!="none"){}else{var b=window.open("",betslipheader.popup_name,"width=300,scrollbars=1,resizable=1");b.close()}}else{var b=window.open("",betslipheader.popup_name,"width=300,scrollbars=1,resizable=1");b.close()}window.parent.location=parent.tld+"?action=logout&page_mode="+parent.logout_pagemode}function go_betslip(){BS_pop_out()}function updateMessageButtons(){var c=document.getElementById("num_messages_div");var a=document.getElementById("unread_messages_image");var e=document.getElementById("loginMsgA");var b=document.getElementById("myAcctMsgA");var d=get_pref("NUMMESSAGES");got_msg=got_msg.replace("%s",d);var f=-1;if(!isNaN(parseInt(d))){f=parseInt(d)}if(c!=null){c.innerHTML=unicode_unescape(d)}if(a!=null){if(f>0){a.style.display=""}else{a.style.display="None"}}if(e!=null){if(f>0){e.title=got_msg}else{e.title=no_msg}}if(b!=null){if(f>0){b.title=got_msg}else{b.title=no_msg}}}function displayBalance(){if(document.getElementById("login_cust_bal")){return}var q="";if(get_pref("ccy_code")=="EUR"){q="&euro;"}if(get_pref("ccy_code")=="GBP"){q="&pound;"}if(get_pref("HIDE_BALANCE")=="1"){document.getElementById("cust_bal").innerHTML="";document.getElementById("show_bal").style.display="none";document.getElementById("hide_bal").style.display="block"}else{document.getElementById("cust_bal").innerHTML=q+get_pref("balance");document.getElementById("show_bal").style.display="block";document.getElementById("hide_bal").style.display="none"}var a=get_pref("fb_balance");if(a>0){var w=document.getElementById("fb_bal");if(w){w.innerHTML=q+a}var f=document.getElementById("show_fb_bal");if(f){f.style.display="block"}}else{var f=document.getElementById("show_fb_bal");if(f){f.style.display="none"}}var v=get_pref("fb_balance_sports");var m=get_pref("fb_balance_gp");if(v>0){var A=document.getElementById("freebet_sport");if(A){A.style.display="block"}var p=document.getElementById("fb_bal_sport");if(p){p.innerHTML=v;p.style.display="block"}}if(m>0){var n=document.getElementById("freebet_game");if(n){n.style.display="block"}var h=document.getElementById("fb_bal_gp");if(h){h.innerHTML=m;h.style.display="block"}}var r=get_pref("hf_balance");if(r>0){var k=document.getElementById("hf_bal");if(k){k.innerHTML=q+r}var z=document.getElementById("show_hf_bal");if(z){z.style.display="block"}}else{var z=document.getElementById("show_hf_bal");if(z){z.style.display="none"}}var l=get_pref("hf_balance_sports");var y=get_pref("hf_balance_gp");if(l>0){var g=document.getElementById("hf_sport");if(g){g.style.display="block"}var e=document.getElementById("hf_bal_sport");if(e){e.innerHTML=l;e.style.display="block"}}if(y>0){var u=document.getElementById("hf_game");if(u){u.style.display="block"}var x=document.getElementById("hf_bal_gp");if(x){x.innerHTML=y;x.style.display="block"}}var b=get_pref("balance_pt_cas");var c=document.getElementById("ptcascust_bal");var d=document.getElementById("show_ptcasbal");var o=0;if(b&&c&&b!=""){b=b.split(":");for(var t=0;t<b.length;t+=3){if(b[t]=="bonus_balance"||b[t]=="bonus_pending_winnings"||b[t]=="ringfenced_real_balance"){o+=parseFloat(b[t+2])}}o=parseFloat(o);o=formatCurrency(o,0);c.innerHTML=q+o}if(c){if(o!=0){d.style.display="block"}else{d.style.display="none"}}}function toggleBalanceDisplay(){var a=document.getElementById("ptcascust_bal");if(get_pref("HIDE_BALANCE")=="1"){set_pref("HIDE_BALANCE","0");hide_balance_toggle="0";if(a){UpdateBalanceAjax(0)}}else{set_pref("HIDE_BALANCE","1");hide_balance_toggle="1"}displayBalance()}function toggleDisplayAllBal(c,b){var a=document.getElementById("all_bal_"+c);if(a){if(b==true){a.style.display="block"}else{a.style.display="none"}}}function open_wc_window(){var a={};if(appears_logged_in()){a=window.open(wc_video_url+"?ticket="+get_cookie("PP_Login"),"PPWCWin","resizable=yes,scrollbars=no,status=yes,width=835,height=670")}else{a=window.open(wc_guest_video_url,"PPWCWin","resizable=yes,scrollbars=no,status=yes,width=580,height=670")}a.focus()}function genLink(d,b){var a="";var c=parent.tld;var e=document.domain;if(b=="action"){a=c+"?"+d}else{a=e+"/"+c+"?"+d}parent.location.href=a}function open_atr_window(b){var a=video_cgi_url+"?action=go_atr_video_feed&ev_id="+b;var c=window.open(a,"PPATRWin","resizable=no,scrollbars=no,status=yes,width=580,height=480");c.focus()}function open_rp_window(b){var a=video_cgi_url+"?action=go_racing_video_player&ev_id="+b+"&hrplayer=1";var c=window.open(a,"PPRPWin","resizable=no,scrollbars=no,status=yes,width=810,height=620");c.focus()}function open_etote_window(){var a=video_cgi_url+"?action=etote_watch_live_racing";var b=window.open(a,"PPETOTEWin","resizable=no,scrollbars=no,status=yes,width=600,height=500");b.focus()}function toggle_othersports(){if(document.getElementById("othersports_submenu").style.display=="none"){document.getElementById("othersports_header").className="expand";document.getElementById("othersports_submenu").style.display=""}else{document.getElementById("othersports_submenu").style.display="none";document.getElementById("othersports_header").className="last"}}function collapse_leftnav_item(a){if(document.getElementById("selected_submenu").style.display!="none"){document.getElementById("selected_submenu").style.display="none";elements=document.getElementsByClassName("on");for(var b=2;b<elements.length;b++){elements[b].style.backgroundPosition="0px 0px"}}else{window.document.location=a}}function addOnloadEvent(a){if(typeof a=="function"){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",a,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",a,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",a)}else{throw ("browser does not support adding onload function.")}}}}}var ps_connect_push=null;function ps_connect_add_onready(a){_ps_connect_required();if(!_ps_connect_started){_ps_connect_onready_fns.push(a)}else{a()}}function ps_connect_register(c,e,a,b){var d=function(){ps_connect_push.ps_client_register(c,e,a,b)};ps_connect_add_onready(d)}function ps_connect_deregister(a){var b=function(){ps_connect_push.ps_client_deregister(a)};ps_connect_add_onready(b)}function ps_connect_lpad_id(b,a){var b=""+b;if(!a){a=10}while(b.length<a){b="0"+b}return b}var _ps_connect_iframe_id="push_iframe";var _ps_connect_onready_fns=[];var _ps_connect_is_required=false;var _ps_connect_loaded=false;var _ps_connect_ready=false;var _ps_connect_started=false;function _ps_connect_required(){if(_ps_connect_is_required){return}else{_ps_connect_source_iframe();_ps_connect_is_required=true}}function _ps_connect_source_iframe(){var c=document;var a=c.frames?c.frames[_ps_connect_iframe_id]:c.getElementById(_ps_connect_iframe_id);if(!a){window.setTimeout("_ps_connect_source_iframe()",250)}else{var b=push_www_url+"/push_api.html?v="+push_version;if(a.location){a.location.href=b}else{a.src=b}}}function _ps_connect_start(){if(_ps_connect_started){return}if(window.push_auth_token&&push_auth_token.length){ps_connect_push.ps_client_set_auth_token(push_auth_token)}for(var a=0;a<push_servers.length;a+=3){ps_connect_push.ps_client_add_server(push_servers[a+0],push_servers[a+1],push_servers[a+2])}for(var a=0;a<_ps_connect_onready_fns.length;a++){_ps_connect_onready_fns[a]()}ps_connect_push.ps_client_start();_ps_connect_started=true;return}function _ps_connect_onload(){_ps_connect_loaded=true;if(_ps_connect_loaded&&_ps_connect_ready){_ps_connect_start()}}addOnloadEvent(_ps_connect_onload);function push_ready(){var b=document;var a=b.frames?b.frames[_ps_connect_iframe_id]:b.getElementById(_ps_connect_iframe_id);ps_connect_push=a.contentWindow||a;_ps_connect_ready=true;if(_ps_connect_loaded&&_ps_connect_ready){_ps_connect_start()}return}function push_shutdown(){}function lcasino_keepalive(){if(appears_logged_in()){if(document.location.protocol=="http:"){var a=tld+"?action=do_evolution_session_check"}else{var a=tld_secure+"?action=do_evolution_session_check"}make_ajax_get_request(a,{},function(){})}}function showTab(c){var a=document.getElementsByTagName("li");for(var b=0;b<a.length;b++){if(a[b].className=="on"){a[b].className="off"}}document.getElementById(c+"-li").className="on";document.getElementById("skills").style.display="none";document.getElementById("yourRaces").style.display="none";document.getElementById("faqs").style.display="none";document.getElementById(c).style.display="block"}function checkVideoCookie(){var a=appears_logged_in();var d="";try{d=get_cookie("Perform")}catch(c){return}if((d==null||d==""||parseInt(video_curr_time)==parseInt(d))&&(!a||a==video_was_logged_in)){video_was_logged_in=a;return}video_was_logged_in=a;if(d!=null){video_curr_time=d}var e=0;try{if(lb_playing_video!=undefined&&lb_playing_video!=1&&a){e=1}}catch(c){}if(e==0){try{if(hr_player_playing_video!=undefined&&hr_player_playing_video!=1&&a){e=2}}catch(c){}}if(e==0){try{if(lb_vp_playing_video!=undefined&&lb_vp_playing_video!=1&&a){e=3}}catch(c){}}var b=-1;if(e==1){if(typeof _lb_evt_ev_id=="undefined"||_lb_evt_ev_id==null||_lb_evt_ev_id==""){b=lb_evt_ev_id}else{b=_lb_evt_ev_id}_media_center_schedule_reload(b)}else{if(e==2){_hr_player_schedule_reload(hr_player_ev_id)}else{if(e==3){lb_vp_reload_flash(lb_vp_ev_id)}}}}var _hr_player_scheduled_reload=false;function _hr_player_schedule_reload(b){var a=2500;if(_hr_player_scheduled_reload){return}else{_hr_player_scheduled_reload=true}window.setTimeout("_hr_player_reload("+b+")",a)}function _hr_player_reload(c){var b="";if(document.location.protocol=="http:"){b=video_cgi_url+"?action=go_racing_video_player&ev_id="+c+"&refresh=1&hrplayer=1"}else{b=video_scgi_url+"?action=go_racing_video_player&ev_id="+c+"&refresh=1&hrplayer=1"}var a={id:"hr_player"};make_ajax_get_request(b,a,got_ajax_content_updater);_hr_player_scheduled_reload=false}var _media_center_scheduled_reload=false;function _media_center_schedule_reload(b){if(_media_center_scheduled_reload){return}else{_media_center_scheduled_reload=true}var a=2500;window.setTimeout("_media_center_reload("+b+")",a)}function _media_center_reload(c){var b="";var d=0;if(typeof _lb_evt_ev_id!="undefined"&&_lb_evt_ev_id!=null&&_lb_evt_ev_id!=""&&_lb_evt_cfg.bir_sort=="HR"){d=1}if(document.location.protocol=="http:"){b=video_cgi_url+"?action=go_betlive_media_center&ev_id="+c+"&popout=0&hr="+d}else{b=video_scgi_url+"?action=go_betlive_media_center&ev_id="+c+"&popout=0&hr="+d}var a={id:"MP"};make_ajax_get_request(b,a,got_ajax_content_updater);_media_center_scheduled_reload=false}function auto_check_video_cookie(){var a=1000;setInterval("checkVideoCookie()",a)}function time_in_milliseconds(a){return Date.parse(new Date(parseInt(a.substring(0,4),10),(parseInt(a.substring(5,7),10)-1),parseInt(a.substring(8,10),10),parseInt(a.substring(11,13),10),parseInt(a.substring(14,16),10),parseInt(a.substring(17),10)))}function vsize(b,a){if(typeof document.getElementById(b)!="undefined"){document.getElementById(b).style.height=a+"px"}}function bh_level(){var d=$$("div.bh");var g="";for(var a=0;a<d.length;a++){var h=d[a];var c=d[a+1];if(h.className.indexOf("left")>0){c=h.next("div")}if(c&&h.className.indexOf("left")>0&&c.className.indexOf("right")>0){var f=h.getHeight()-c.getHeight();if(f>0){expander=$$("#"+c.id+" .exp")[0]}else{if(f<0){expander=$$("#"+h.id+" .exp")[0]}}if(f!=0){var e=0;expander.style.height=String(expander.getHeight()+Math.abs(f)-e)+"px";expander.style.paddingTop="0";expander.style.paddingBottom="0"}}}}function parse_qstr(e,b){var a="[\\?&]"+b+"=([^&#]*)";var d=new RegExp(a);var c=d.exec(e);if(c==null){return""}return c[1]}function bookmarkpaddy(){title="Paddy Power";url="http://www.paddypower.com/bet?area=bookmark";if(window.sidebar){window.sidebar.addPanel(title,url,"")}else{if(window.external){window.external.AddFavorite(url,title)}else{if(window.opera&&window.print){return true}}}if(typeof(netinsight)!="undefined"){if(netinsight){ntptEventTag("ev=bookmark")}}}var global_eval=function(src){if(window.execScript){window.execScript(src);return}var fn=function(){window.eval.call(window,src)};fn()};function make_ajax_get_request(b,a,f){if(typeof betlive_busy_sem!="undefined"&&betlive_busy_sem==1){setTimeout(function(){make_ajax_get_request(b,a,f)},300);return}betlive_busy_sem=1;var c=null;if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{if(window.ActiveXObject){c=new ActiveXObject("Microsoft.XMLHTTP")}}if(c){c.onreadystatechange=function(){if(c.readyState!=4){return}var g;try{g=c.status}catch(h){g=""}if(g!=200){betlive_busy_sem=0;f(b,a,false,"HTTP")}else{betlive_busy_sem=0;f(b,a,true,c.responseText)}};try{c.open("GET",b,true);c.send(null)}catch(d){betlive_busy_sem=0;f(b,a,false,"UNSUPPORTED")}}else{betlive_busy_sem=0;f(b,a,false,"UNSUPPORTED")}}function got_ajax_content_updater(c,a,d,b){var f=document.getElementById(a.id);if(d){if(b==""){return}var h=parse_script_tags(b);if(f){f.innerHTML=h[0]}if(h[1].length){try{global_eval(h[1])}catch(g){d=false}}}}function parse_script_tags(g){var c="";var e="";var b=0;var d="HTML";var f=new RegExp("<(/?)script([^>]*)>","gi");while((mtch=f.exec(g))!=null){mS=mtch.index;if(d=="HTML"){c+=g.substring(b,mS)}else{e+=g.substring(b,mS)+";\n"}var h=mtch[1];var a=mtch[2];if(h=="/"){d="HTML"}else{if(a.charAt(a.length-1)!="/"&&a.indexOf("src=")==-1){d="JS"}}b=f.lastIndex}if(d=="HTML"){c+=g.substring(b)}else{e+=g.substring(b)}return[c,e]}function poll_betslip_display_check(){setInterval(_determine_betslip_display,1000)}function _determine_betslip_display(){var d=get_pref("BETSLIP_STYLE");if(d=="Detached"){var a=document.getElementById("bsScroller");var b=document.getElementById("bsHeaderLeft");var c=document.getElementById("bsOpenAnchor");if(a!=null){a.style.display="none";if(b){b.style.display="none"}}if(b){b.style.display="block"}if(c){c.style.display="inline"}}}function go_link_unica(a,c,b){if(use_unica_tracking){ntptEventTag("ev="+c+"&button="+b+"&buttonevent=click")}setTimeout(function(){document.location=a},200)}function addExpandedMarketPageCookie(c,e){if(!checkExpandedMarketPageCookie(c,e)){var a=get_cookie("MKTSOFFERED");if(a!=""){a+="|"}var d=a+c+e;while(d.length>4096){var b=d.indexOf("|");d=d.substring(b+1)}set_cookie("MKTSOFFERED",d,"","/")}}function get_social_media_message(f,b,e,a){var d="?action=getSocialMediaMessage&provider="+f+"&location="+b+"&type="+e+"&bet_id="+a;var c;new Ajax.Request(d,{method:"get",onSuccess:function(g){c=g.responseText.replace(/&euro;/g,"€").replace(/&pound/g,"£")},onComplete:function(){betlive_busy_sem=0;if(c=="ERROR"){if(b=="BR"){c=social_media_error_br}else{c=social_media_error_bw}}postSocialMediaMessage(c,f)}})}function removeExpandedMarketPageCookie(b,c){if(checkExpandedMarketPageCookie(b,c)){var a=get_cookie("MKTSOFFERED").split("|");var d=b+c;for(i=0;i<a.length;i++){if(a[i]==d){a.splice(i,1);break}}if(a.length>0){set_cookie("MKTSOFFERED",a.join("|"),"","/")}else{set_cookie("MKTSOFFERED","","","/")}}}function formatCurrency(b,d){var a=parseFloat(b);if(isNaN(a)){a=0}var c="";if(a<0){c="-"}a=Math.abs(a);a=parseInt((a+0.005)*100);a=a/100;s=new String(a);if(s.indexOf(".")<0){s+=".00"}if(s.indexOf(".")==(s.length-2)){s+="0"}s=c+s;if(typeof d=="undefined"||d!=0){return formatComma(s)}else{return s}}function formatComma(f){var c=",";var b=f.split(".",2);var h=b[1];var e=parseInt(b[0]);if(isNaN(e)){return""}var g="";if(e<0){g="-"}e=Math.abs(e);var l=new String(e);var b=[];while(l.length>3){var k=l.substr(l.length-3);b.unshift(k);l=l.substr(0,l.length-3)}if(l.length>0){b.unshift(l)}l=b.join(c);if(h.length<1){f=l}else{f=l+"."+h}f=g+f;return f}function checkExpandedMarketPageCookie(b,c){var a=get_cookie("MKTSOFFERED");var d=b+c;return(a.indexOf(d)!=-1)}var TINY={};function T$(a){return document.getElementById(a)}TINY.box=function(){var a,e,n,l,c,h,g,o,d,k=0;return{show:function(r,m,f,q,b,p){if(!k){a=document.createElement("div");a.id="tinybox";e=document.createElement("div");e.id="tinymask";n=document.createElement("div");n.id="tinycontent";document.body.appendChild(e);document.body.appendChild(a);a.appendChild(n);e.onclick=TINY.box.hide;window.onresize=TINY.box.resize;k=1}if(!b&&!m){a.style.width=f?f+"px":"auto";a.style.height=q?q+"px":"auto";a.style.backgroundImage="none";n.innerHTML=r}else{n.style.display="none";a.style.width=a.style.height="100px"}this.mask();c=r;h=m;g=f;o=q;d=b;this.alpha(e,1,80,3);if(p){setTimeout(function(){TINY.box.hide()},1000*p)}},fill:function(r,p,m,q,f){if(p){a.style.backgroundImage="";var b=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){TINY.box.psh(b.responseText,m,q,f)}};b.open("GET",r,1);b.send(null)}else{this.psh(r,m,q,f)}},psh:function(r,m,p,f){if(f){if(!m||!p){var b=a.style.width,q=a.style.height;n.innerHTML=r;a.style.width=m?m+"px":"";a.style.height=p?p+"px":"";n.style.display="";m=parseInt(n.offsetWidth);p=parseInt(n.offsetHeight);n.style.display="none";a.style.width=b;a.style.height=q}else{n.innerHTML=r}this.size(a,m,p)}else{a.style.backgroundImage="none"}},hide:function(){TINY.box.alpha(a,-1,0,3)},resize:function(){TINY.box.pos();TINY.box.mask()},mask:function(){e.style.height=TINY.page.total(1)+"px";e.style.width="";e.style.width=TINY.page.total(0)+"px"},pos:function(){var b=(TINY.page.height()/2)-(a.offsetHeight/2);b=b<10?10:b;a.style.top=(b+TINY.page.top())+"px";a.style.left=(TINY.page.width()/2)-(a.offsetWidth/2)+"px"},alpha:function(f,m,b){clearInterval(f.ai);if(m==1){f.style.opacity=0;f.style.filter="alpha(opacity=0)";f.style.display="block";this.pos()}f.ai=setInterval(function(){TINY.box.ta(f,b,m)},20)},ta:function(f,b,p){var m=Math.round(f.style.opacity*100);if(m==b){clearInterval(f.ai);if(p==-1){f.style.display="none";f==a?TINY.box.alpha(e,-1,0,2):n.innerHTML=a.style.backgroundImage=""}else{f==e?this.alpha(a,1,100):TINY.box.fill(c,h,g,o,d)}}else{var q=Math.ceil((m+((b-m)*0.5)));q=q==1?0:q;f.style.opacity=q/100;f.style.filter="alpha(opacity="+q+")"}},size:function(q,t,p){q=typeof q=="object"?q:T$(q);clearInterval(q.si);var b=q.offsetWidth,u=q.offsetHeight,r=b-parseInt(q.style.width),v=u-parseInt(q.style.height);var f=b-r>t?0:1,m=(u-v>p)?0:1;q.si=setInterval(function(){TINY.box.ts(q,t,r,f,p,v,m)},20)},ts:function(r,u,t,m,q,x,p){var f=r.offsetWidth-t,v=r.offsetHeight-x;if(f==u&&v==q){clearInterval(r.si);a.style.backgroundImage="none";n.style.display="block"}else{if(f!=u){var b=f+((u-f)*0.5);r.style.width=m?Math.ceil(b)+"px":Math.floor(b)+"px"}if(v!=q){var b=v+((q-v)*0.5);r.style.height=p?Math.ceil(b)+"px":Math.floor(b)+"px"}this.pos()}}}}();TINY.page=function(){return{top:function(){return document.documentElement.scrollTop||document.body.scrollTop},width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},total:function(f){var a=document.body,c=document.documentElement;return f?Math.max(Math.max(a.scrollHeight,c.scrollHeight),Math.max(a.clientHeight,c.clientHeight)):Math.max(Math.max(a.scrollWidth,c.scrollWidth),Math.max(a.clientWidth,c.clientWidth))}}}();var FB_APP_ID="290121857670893";function postSocialMediaMessage(b,a){if(typeof(FB)==="object"&&FB._apiKey===null){FB.init({appId:FB_APP_ID,status:true,cookie:true,oauth:true})}title="Paddy Power Online Betting";url=tld;image="";switch(a){case"fbl":break;case"FB_LIKE":postToFeed(b);ntptEventTag("ev=fb_like&button=fb_like");break;case"FB_SHARE":url="http://www.facebook.com/sharer.php?u="+url+"&t="+b;window.open(url,"Facebook Share","toolbar=0,status=0,width=548,height=325");ntptEventTag("ev=fb_share&button=fb_share");break;case"TWITTER":url="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.paddypower.com%2Fbet&source=tweetbutton&text="+encodeURIComponent(b);window.open(url,"twitter","toolbar=0,status=0,width=548,height=325");ntptEventTag("ev=twitter_share&button=twitter");break;default:url=""}}function postToFeed(b){var a={method:"feed",link:tld,picture:"http://i.ppstatic.com/content/sportsbook/social/pp-thumb.png",name:"Paddy Power",caption:"",description:b};FB.ui(a,fb_callback)}function fb_callback(a){document.getElementById("msg").innerHTML="Post ID: "+a.post_id};
