var speed=3;var scrollDownControl;var scrollUpControl;var crossobj;var contentheight;var MAX_SCREENSHOTS=4;var BACKSTORY_MINHEIGHT=322;var _currentScreenshot=1;var screenShotRotationMS=3000;var screenShotRotation;var paused=false;var screenShotLargeID=null;var playButtonAnimatedMS=5000;function playButtonAnimation(){var A=GetElement("ctl00_pageAreaContent_playButton").src;A=A.replace("button_big_play.gif","button_big_play_animated.gif");GetElement("ctl00_pageAreaContent_playButton").src=A}function resetButtonAnimation(){var A=GetElement("ctl00_pageAreaContent_playButton").src;A=A.replace("_animated","");GetElement("ctl00_pageAreaContent_playButton").src=A}function scrollingSetup(){crossobj=document.getElementById("descriptionScroller");contentheight=crossobj.offsetHeight;if((parseInt(crossobj.style.top,10)>=((-1)*(contentheight-210)))){document.getElementById("scrollUp").style.visibility="visible";document.getElementById("scrollDown").style.visibility="visible"}else{GetElement("descriptionTextContainer").style.width="215px"}}function stopScrolling(){clearTimeout(scrollDownControl);clearTimeout(scrollUpControl)}function scrollDown(){clearTimeout(scrollUpControl);if(parseInt(crossobj.style.top,10)>=((-1)*(contentheight-210))){crossobj.style.top=parseInt(crossobj.style.top,10)-speed+"px"}scrollDownControl=setTimeout("scrollDown()",10)}function scrollUp(){clearTimeout(scrollDownControl);if(parseInt(crossobj.style.top,10)<0){crossobj.style.top=parseInt(crossobj.style.top,10)+speed+"px"}scrollUpControl=setTimeout("scrollUp()",10)}function GoToScreenShot(A){A-=_currentScreenshot;SwitchScreenshot(A);PauseScreenshot()}function SwitchScreenshot(B){clearTimeout(screenShotRotation);GetElement("screenShotDescr"+_currentScreenshot).style.display="none";GetElement("ScreenShot"+_currentScreenshot).style.backgroundPosition="0 0";if((_currentScreenshot+B)<=0){_currentScreenshot=MAX_SCREENSHOTS}else{if((_currentScreenshot+B)>MAX_SCREENSHOTS){_currentScreenshot=1}else{_currentScreenshot=_currentScreenshot+B}}if(screenShotLargeID===null){var C=document.getElementsByTagName("img");for(var A=0;A<C.length;A++){if(C[A].id.indexOf("screenShotLarge")!==-1){screenShotLargeID=C[A].id;break}}}GetElement(screenShotLargeID).src=_screenshotLocation.replace("{0}",_currentScreenshot);GetElement("screenShotDescr"+_currentScreenshot).style.display="block";GetElement("ScreenShot"+_currentScreenshot).style.backgroundPosition="0 13px";if(!paused){screenShotRotation=setTimeout("SwitchScreenshot(1);",screenShotRotationMS)}return false}function PauseScreenshot(){clearTimeout(screenShotRotation);if(paused){screenShotRotation=setTimeout("SwitchScreenshot(1);",screenShotRotationMS)}else{}paused=!paused;return false}function HighlightTab(A){ResetTabs();GetElement(A).src=GetElement(A).src.replace(".gif","_o.gif");switch(A){case _tabScreenshotsId:GetElement("tabContentScreenshots").style.visibility="visible";GetElement("tabContentScreenshots").style.display="block";break;case _tabBackstoryId:GetElement("tabContentBackstory").style.visibility="visible";GetElement("tabContentBackstory").style.display="block";break;case _tabTopScoresId:GetElement("tabContentTopScores").style.visibility="visible";GetElement("tabContentTopScores").style.display="block";break;case _tabForumsId:GetElement("tabContentForums").style.visibility="visible";GetElement("tabContentForums").style.display="block";break}}function ResetTabs(){GetElement(_tabScreenshotsId).src=GetElement(_tabScreenshotsId).src.replace("_o.gif",".gif");GetElement(_tabBackstoryId).src=GetElement(_tabBackstoryId).src.replace("_o.gif",".gif");GetElement(_tabTopScoresId).src=GetElement(_tabTopScoresId).src.replace("_o.gif",".gif");GetElement(_tabForumsId).src=GetElement(_tabForumsId).src.replace("_o.gif",".gif");GetElement("tabContentScreenshots").style.visibility="hidden";GetElement("tabContentScreenshots").style.display="none";GetElement("tabContentBackstory").style.visibility="hidden";GetElement("tabContentBackstory").style.display="none";GetElement("tabContentTopScores").style.visibility="hidden";GetElement("tabContentTopScores").style.display="none";GetElement("tabContentForums").style.visibility="hidden";GetElement("tabContentForums").style.display="none"}function ShowSystemReqs(){document.getElementById("viewSystemReqsLink").style.display="none";document.getElementById("systemRequirementsContainer").style.display="block";return false}function ShowRelatedGameHover(J,H){if(!H){H=window.event}var A=H.clientY;var K=140;var C=200;var D=(window.ActiveXObject)?-35:-88;var B=J.href.substring(J.href.lastIndexOf("/")+1)+"-hover";var F=document.getElementById(B);var I=D-(C-(screen.availHeight-(H.clientY+K)));if(I<=-120){I=D-100;D=100;F.style.marginTop=I.toString()+"px"}else{if(I<=-95){I=D-60;D=60;F.style.marginTop=I.toString()+"px"}else{if(H.clientY<=90){I=D+35;D=-35;F.style.marginTop=I.toString()+"px"}else{F.style.marginTop="";D=0}}}var G=F.getElementsByTagName("img");for(var E=0;E<G.length;E++){if((G[E].className==="hoverTop")&&(!(window.ActiveXObject))){G[E].src="/Skins/default/img/hover-top.png"}else{if((G[E].className==="hoverBottom")&&(!(window.ActiveXObject))){G[E].src="/Skins/default/img/hover-bottom.png"}else{if(G[E].className==="hoverArrow"){if(!(window.ActiveXObject)){G[E].src="/Skins/default/img/hover-arrow.png"}I=50+D;G[E].style.marginTop=I.toString()+"px"}}}}F.style.visibility="visible";FadeIn(F.id)}function HideRelatedGameHover(A){var C=A.href.substring(A.href.lastIndexOf("/")+1)+"-hover";var B=document.getElementById(C);B.style.visibility="hidden";FadeClear(B.id)}function OnWindowLoad(){screenShotRotation=setTimeout("SwitchScreenshot(1);",screenShotRotationMS)}function FadeIn(C){var B=0;for(var A=0;A<=100;A++){setTimeout("FadeTo('"+A+"','"+C+"');",(B*2));B++}}function FadeTo(A,C){var B=document.getElementById(C);B.style.opacity=(A/100);B.style.MozOpacity=(A/100);B.style.filter="alpha(opacity="+A+")"}function FadeClear(B){var A=document.getElementById(B);A.style.opacity=0;A.style.MozOpacity=0;A.style.filter="alpha(opacity="+0+")"};