var username=0;var password=0;var locale=0;var anonymous=0;var flushGameId=0;var gameOverlayYUI;var currentGame="";var currentVersion="";var gameVersions={};function onStartGameClick(b,a,c){currentGame=b;currentVersion=a;currentFpVersion=c;if(hasOwnProperty(gameVersions,b)){currentVersion=gameVersions[b]}if(session==0){$("#createAnonymousPopup").modal({close:false,overlay:85});return}if(username&&password&&is_anonymous){$("#convertAnonymousPopup").modal({close:false,overlay:85});return}doStartGame(currentGame,currentVersion,currentFpVersion)}function onQuitGame(){window.location="/games?id="+game}function onFlushGame(){}function getUsernameAndPassword(){return'{"username": "'+username+'", "password": "'+password+'"}'}function getLocale(){return'{"locale": "'+locale+'"}'}function doQuitGame(){onQuitGame()}function isHosted(){return"true"}function synchTokens(b){var a=document.getElementById("tokenBalance");a.innerHTML=b}function handleException(a){$.modal.close();var c=new ServerException(null,a.exception);var b='<div class="modal"><div class="modalErrorTitle">';b+=c.data.cls+'</div><div class="modalErrorBody">';b+=c.renderException()+"</div>";b+='<div class="modalOptions"><button id="exceptionOk">OK</button></div>';b+="</div>";$(b).modal({close:false,overlay:85,containerId:"modalErrorContainer"});$("#exceptionOk").click($.modal.close)}function hotSwapLocale(a){window.location.href="/change_locale?locale="+a}function reloadPortal(b,a){gameVersions[b]=a;doStartGame(b,a)};
