var ERROR_GETTING_DATA='<div class="errormsg">'+'Wystąpił błąd przy pobieraniu danych z serwera. Naciśnij CTRL+F5, aby odświeżyć stronę.';var ERROR_NO_ITEMS='<br /><div class="infomsg">'+'Brak elementów do wyświetlenia na wybranym poziomie. Wybierz inny poziom.'+'</div>';var ERROR_USER_LIMIT_EXCEEDED='<br /><span class="red"><b>'+'Przekroczono limit szybkości wykonywania ćwiczeń.'+'</b> '+'Prosimy zrobić sobie chwilę przerwy :).'+'</span>';var ERROR_USER_LIMIT_EXCEEDED_REPETITIONS='<span class="red"><b>'+'Przekroczono limit szybkości wykonywania powtórek.'+'</b> '+'Prosimy zrobić sobie chwilę przerwy :).'+'</span>';var AJAX_LOADER_IMG='<img src="/images/ajax-loader.gif" width="16" height="16" alt="'+'Proszę czekać...'+'" class="absmiddle" />';var isIE=navigator.userAgent.indexOf("IE")!=-1;var isMozilla=navigator.userAgent.indexOf("Gecko")!=-1;var isOpera=navigator.userAgent.indexOf("Opera")!=-1;function GetElement(e){return document.getElementById(e)}function ElementExists(e){return GetElement(e)}function SetDisplay(e,v){GetElement(e).style.display=v}function SetVisibility(e,v){GetElement(e).style.visibility=v}function SetEnabled(e,v){GetElement(e).disabled=!v}function SetInnerHTML(e,html){GetElement(e).innerHTML=html}function SetColor(e,color){GetElement(e).style.color=color}function SetBackground(e,color){GetElement(e).style.background=color}function SetBorderColor(e,color){GetElement(e).style.borderColor=color}function SetTextFieldBorderColor(e,color){SetBorderColor(e,color);GetElement(e).style.borderStyle='solid';GetElement(e).style.borderWidth='2'}function ResetBorderStyle(e){GetElement(e).style.borderStyle='';GetElement(e).style.borderWidth='';GetElement(e).style.borderColor=''}function SetWidth(e,width){GetElement(e).style.width=width+"px"}function SetHeight(e,height){GetElement(e).style.height=height+"px"}function SetTop(e,top){GetElement(e).style.top=top+"px"}function SetLeft(e,left){GetElement(e).style.left=left+"px"}function GetValue(e){return GetElement(e).value}function SetValue(e,value){GetElement(e).value=value}function IsChecked(c){return GetElement(c).checked}function SetChecked(c,checked){GetElement(c).checked=checked}function IsSelected(c){return GetElement(c).selected}function SetSelected(c,selected){GetElement(c).selected=selected}function SelectItem(i){GetElement(i).checked=true}function SubmitForm(f){GetElement(f).submit()}function FocusElement(e){GetElement(e).focus()}function GetDocumentTitle(){return document.title}function SetDocumentTitle(title){document.title=title}function Trim(str){return(""+str).replace(/^\s*|\s*$/g,"")}function SingleSpaces(str){return Trim(str).replace(/\s+/g," ")}function SplitIntoLines(str){return Trim(str).replace(/\r\n/g,"\n").split("\n")}function SplitIntoWords(str){str=Trim(str);if(str=='')return new Array();return str.replace(/\s+/g,' ').split(' ')}function Htmlspecialchars(str){if(str==undefined||str==null){return''}str=(''+str);str=str.replace(/&/g,'&amp;');str=str.replace(/'/g,'&#039;');str=str.replace(/"/g,'&quot;');str=str.replace(/</g,'&lt;');str=str.replace(/>/g,'&gt;');str=str.replace(/\//g,'&#x2F;');return str}function Htmlspecialchars_decode(str){if(str==undefined||str==null){return''}str=(''+str);str=str.replace(/&#x2F;/g,'/');str=str.replace(/&gt;/g,'>');str=str.replace(/&lt;/g,'<');str=str.replace(/&quot;/g,'"');str=str.replace(/&#0*39;/g,"'");str=str.replace(/&#x27;/g,"'");str=str.replace(/&amp;/g,'&');return str}function UrlEscape(str){if(encodeURIComponent){return encodeURIComponent(str)}else{return escape(str)}}function LoadPage(url){window.location.assign(url)}function ReloadPage(){LoadPage(window.location.href)}function RandomString(){var chars="0123456789abcdefghijklmnopqrstuvwxyz";var result="";for(var i=1;i<=6;i++){result+=chars.charAt(Math.floor(Math.random()*chars.length))}return result}function ArrayRandom(a){return a[Math.floor(Math.random()*a.length)]}function InArray(arr,obj){var len=arr.length;for(var x=0;x<=len;x++){if(arr[x]==obj)return true}return false}function preloadImage(url){var img=new Image();img.src=url}function _t(text){return text}function KeyboardApi(){this.startCapture=function(){document.onkeydown=function(evt){return KeyboardApiInstance.handlekeydown(evt)};document.onkeypress=function(evt){return KeyboardApiInstance.handlekeypress(evt)};document.onkeyup=function(evt){return KeyboardApiInstance.handlekeyup(evt)};this.captureEnabled=true};this.setCaptureEnabled=function(a){this.captureEnabled=a};this.setFocusInLockCaptureField=function(a){this.focusInLockCaptureField=a};this.setCtrlCaptureEnabled=function(a){this.ctrlCaptureEnabled=a};this.addKeyDownListener=function(a){this.onkeydown=a};this.addKeyUpListener=function(a){this.onkeyup=a};this.isCtrlPressed=function(){return this.ctrlPressed};this.isShiftPressed=function(){return this.shiftPressed};this.isAltPressed=function(){return this.altPressed};this.resetLockKeyPressesCounter=function(){if(isOpera){this.lockKeyPressesCounter=0}else{this.lockKeyPressesCounter=-1}};this.captureEnabled=false;this.focusInLockCaptureField=false;this.ctrlCaptureEnabled=false;this.ctrlPressed=false;this.shiftPressed=false;this.altPressed=false;this.lockKeyPressesCounter=0;function getEvent(evt){return(evt?evt:window.event)};this.handlekeydown=function(evt){evt=getEvent(evt);var keyCode=evt.keyCode;this.ctrlPressed=(keyCode==Keys.CTRL||(evt.ctrlKey&&!evt.altKey));this.shiftPressed=(keyCode==Keys.SHIFT||evt.shiftKey);this.altPressed=(keyCode==Keys.ALT||evt.altKey);if(keyCode==Keys.CTRL){return true}if(this.onkeydown!=null&&(!this.ctrlPressed||this.ctrlCaptureEnabled)&&this.captureEnabled&&!this.focusInLockCaptureField){var result=this.onkeydown(keyCode);if(!result){this.lockKeyPressesCounter++}return result}else{return true}};this.handlekeypress=function(evt){if(this.lockKeyPressesCounter>0&&(!this.ctrlPressed||this.ctrlCaptureEnabled)){this.lockKeyPressesCounter--;return false}else{return true}};this.handlekeyup=function(evt){KeyboardApiInstance.handlekeypress(evt);evt=getEvent(evt);var keyCode=evt.keyCode;this.ctrlPressed=(keyCode!=Keys.CTRL&&(evt.ctrlKey&&!evt.altKey));this.shiftPressed=(keyCode!=Keys.SHIFT&&evt.shiftKey);this.altPressed=(keyCode!=Keys.ALT&&evt.altKey);if(keyCode==Keys.CTRL){return true}if(this.onkeyup!=null&&(!this.ctrlPressed||this.ctrlCaptureEnabled)&&this.captureEnabled&&!this.focusInLockCaptureField){return this.onkeyup(keyCode)}else{return true}};this.onkeydown=null;this.onkeyup=null}if(typeof jQuery!='undefined'){$(document).ready(function(){$('.disableKeyboardCaptureOnFocus').live('focus',function(){KeyboardApiInstance.setFocusInLockCaptureField(true)});$('.disableKeyboardCaptureOnFocus').live('blur',function(){KeyboardApiInstance.setFocusInLockCaptureField(false)})})}function Keys(){}Keys.ENTER=13;Keys.ESC=27;Keys.SPACE=32;Keys.BACKSPACE=8;Keys.TAB=9;Keys.CTRL=17;Keys.ALT_LEFT=18;Keys.LEFT=37;Keys.UP=38;Keys.RIGHT=39;Keys.DOWN=40;Keys.INSERT=45;Keys.DELETE=46;Keys.HOME=36;Keys.END=35;Keys.PAGEUP=33;Keys.PAGEDOWN=34;Keys.A=65;Keys.B=66;Keys.C=67;Keys.D=68;Keys.E=69;Keys.F=70;Keys.G=71;Keys.H=72;Keys.I=73;Keys.J=74;Keys.K=75;Keys.L=76;Keys.M=77;Keys.N=78;Keys.O=79;Keys.P=80;Keys.Q=81;Keys.R=82;Keys.S=83;Keys.T=84;Keys.U=85;Keys.V=86;Keys.W=87;Keys.X=88;Keys.Y=89;Keys.Z=90;Keys.N0=48;Keys.N1=49;Keys.N2=50;Keys.N3=51;Keys.N4=52;Keys.N5=53;Keys.N6=54;Keys.N7=55;Keys.N8=56;Keys.N9=57;Keys.NUMPAD0=96;Keys.NUMPAD1=97;Keys.NUMPAD2=98;Keys.NUMPAD3=99;Keys.NUMPAD4=100;Keys.NUMPAD5=101;Keys.NUMPAD6=102;Keys.NUMPAD7=103;Keys.NUMPAD8=104;Keys.NUMPAD9=105;Keys.DASH=109;Keys.LEFTBRACE=219;Keys.RIGHTBRACE=221;Keys.SEMICOLON=59;Keys.APOSTROPHE=222;Keys.COMMA=188;Keys.FULLSTOP=190;Keys.SHIFT=16;Keys.CTRL=17;Keys.ALT=18;var KeyboardApiInstance=new KeyboardApi();function LockManager(){}LockManager.locks=new Array();LockManager.setLock=function(token,timeValidMs){LockManager.locks[token]=new Date().getTime()+timeValidMs};LockManager.isLockSet=function(token){return(LockManager.locks[token]&&LockManager.locks[token]>new Date().getTime())};

