var urlCount=0;var urlPos=0;var urlHistory=[];var iPhoneApps=[];addressBarStatus=true;function Safari_Refresh(a){goActive();var b=document.getElementById('safari_window').src;if(b!=''){document.getElementById('safari_window').src=b}return false}function Safari_Back(a){goOn();if(urlHistory.length>0&&urlPos>1){document.getElementById('safari_window').src=urlHistory[urlPos-2];document.getElementById('safari_location').value=urlHistory[urlPos-2];urlPos--}return false}function Safari_Forward(a){goOn();if(urlHistory.length>0&&urlPos<urlHistory.length){document.getElementById('safari_window').src=urlHistory[urlPos];document.getElementById('safari_location').value=urlHistory[urlPos];urlPos++}return false}function Rotate_Phone(a){hand=document.getElementById('wrapper');if(hand.className=="tall"){hand.className="wide"}else{hand.className="tall"}swapAddressBar(addressBarStatus);document.getElementById('safari_location').focus();return false}function setScrolling(a){var z=document.getElementById('safari_window');z.scrolling=a}function fixWebSite(){}function loadFromList(a){document.getElementById('safari_window').src=iPhoneApps[a];document.getElementById('safari_location').value=iPhoneApps[a];return false}iPhoneDate="";xyz=0;var datenow;function UpdateStatus(){datenow=new Date();iHour=datenow.getHours();iMinute=datenow.getMinutes();iSecond=datenow.getSeconds();if(iHour<12){ampm="AM"}else{ampm="PM";iHour=iHour-12}if(iHour<10){iHour="0"+iHour}if(iHour==0){iHour="12"}if(iMinute<10){iMinute="0"+iMinute}iPhoneDate=iHour+":"+iMinute+" "+ampm;x=document.getElementById("iphone_bars");if(xyz>0){document.getElementById("iphone_time").innerHTML=iPhoneDate;if((iSecond*iMinute%5)==0){x.className="none"}else{x.className="full"}}xyz=1;window.setTimeout(UpdateStatus,30000)}UpdateStatus();function goActive(){locationObj1.className='loadingAact';locationObj2.className='loadingBact';locationObj3.className='loadingCact';setTimeout(goOff,350)}function goOff(){locationObj1.className='loadingAoff';locationObj2.className='loadingBoff';locationObj3.className='loadingCoff';xyz=0}function goON(){locationObj1.className='loadingAon';locationObj2.className='loadingBon';locationObj3.className='loadingCon'}function getParameter(a,b){var b=b+"=";if(a.length>0){begin=a.indexOf(b);if(begin!=-1){begin+=b.length;end=a.indexOf("&",begin);if(end==-1){end=a.length}return unescape(a.substring(begin,end))}return"null"}}function correctPNG(){var a=navigator.appVersion.split("MSIE");var b=parseFloat(a[1]);if((b>=5.5&&b<7)&&(document.body.filters)){for(var i=0;i<document.images.length;i++){var c=document.images[i];var d=c.src.toUpperCase();if(d.substring(d.length-3,d.length)=="PNG"){var e=(c.id)?"id='"+c.id+"' ":"";var f=(c.className)?"class='"+c.className+"' ":"";var g=(c.title)?"title='"+c.title+"' ":"title='"+c.alt+"' ";var h="display:inline-block;"+c.style.cssText;if(c.align=="left")h="float:left;"+h;if(c.align=="right")h="float:right;"+h;if(c.parentElement.href)h="cursor:hand;"+h;var j="<span "+e+f+g+" style=\""+"width:"+c.width+"px; height:"+c.height+"px;"+h+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src=\'"+c.src+"\', sizingMethod='scale');\"></span>";c.outerHTML=j;i=i-1}}}}$(document).ready(function(){locationObj1=document.getElementById("safari_addressbglt");locationObj2=document.getElementById("safari_input");locationObj3=document.getElementById("safari_addressbgrt");$('#safari_location').focus(function(){$(this).select();locationObj1.className='loadingAon';locationObj2.className='loadingBon';locationObj3.className='loadingCon'});$('#safari_location').blur(function(){locationObj1.className='loadingAoff';locationObj2.className='loadingBoff';locationObj3.className='loadingCoff'});$('#tips_head').click(function(){$('#tips').toggle('fast')});$('#faq_head').click(function(){$('#faq').toggle('fast')});$('#apps_head').click(function(){$('#apps').toggle('fast')});$("html").keypress(function(e){if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;if(keycode==32){Rotate_Phone(null);return false}});if(document.images){img1=new Image();img2=new Image();img3=new Image();img4=new Image();img5=new Image();img6=new Image();img7=new Image();img1.src="http://cdn.livescore.com/i/simulator/UIRoundedTextFieldLeft.png";img2.src="http://cdn.livescore.com/i/simulator/UIRoundedTextFieldMiddle.png";img3.src="http://cdn.livescore.com/i/simulator/UIRoundedTextFieldRight.png";img4.src="http://cdn.livescore.com/i/simulator/UIRoundedTextFieldProgressLeft.png";img5.src="http://cdn.livescore.com/i/simulator/UIRoundedTextFieldProgressMiddle.png";img6.src="http://cdn.livescore.com/i/simulator/UIRoundedTextFieldProgressRight.png";img7.src="http://cdn.livescore.com/i/simulator/iphone_hor.png"}});function handler(a){alert(a.keyCode);alert(a.which);alert(a.type);alert(a.target)}function changeBG(a){document.getElementById("docbody").style.backgroundColor="#"+a}function swapAddressBar(a){if(a){if(document.getElementById('wrapper').className=="wide"){document.getElementById('safari_address').style.display="block";document.getElementById('safari_window').style.height="200px";document.getElementById('safari_window').style.top="111px"}else if(document.getElementById('wrapper').className=="tall"){document.getElementById('safari_address').style.display="block";document.getElementById('safari_window').style.height="365px";document.getElementById('safari_window').style.top="210px"}}else{if(document.getElementById('wrapper').className=="wide"){document.getElementById('safari_address').style.display="none";document.getElementById('safari_window').style.height="260px";document.getElementById('safari_window').style.top="51px"}else if(document.getElementById('wrapper').className=="tall"){document.getElementById('safari_address').style.display="none";document.getElementById('safari_window').style.height="425px";document.getElementById('safari_window').style.top="150px"}}}
