var maxConfigWizard={};maxConfigWizard.activePage=0;$langDefaultSection="ConfigWizard";maxConfigWizard.init=function(){document.title=$lang("title");maxConfig.setActiveFile("$main",true);maxConfigWizard.showPage(0)};maxConfigWizard.close=function(){external.max_closeTab("")};maxConfigWizard.showPage=function(A){if(A<0||A>(maxConfigWizard.pages.length-1)){return}var C=maxConfig.ui.buildItems(maxConfigWizard.pages[A].items);C+="<br/><br/>";var E=$id("contentWrapper");E.innerHTML=C;var G=$id("btnPrevious");if(A==0){G.style.color="#A89B80"}else{G.style.color=""}var F=$id("btnNext");if(A==(maxConfigWizard.pages.length-1)){F.style.color="#A89B80"}else{F.style.color=""}var F=$id("btnNext");var B=$id("btnFinish");maxConfigWizard.activePage=A;try{maxConfigWizard.pages[A].init()}catch(D){if(!((D.number&65535)==438)){alert("maxConfigWizard.pages["+A+"].init()\n"+(D.number&65535)+" : "+D.message);throw (D)}}};maxConfigWizard.nextPage=function(){maxConfigWizard.showPage(maxConfigWizard.activePage+1)};maxConfigWizard.previousPage=function(){maxConfigWizard.showPage(maxConfigWizard.activePage-1)};maxConfigWizard.setSkin=function(A){if(A){external.max_invoke("ChangeStyle","custom")}else{external.max_invoke("ChangeStyle","system")}};maxConfigWizard.setLayout=function(B){try{external.max_invoke("BackupLayout");external.max_invoke("ChangeLayout",B);if(!confirm($lang("keep_layout"))){external.max_invoke("RestoreLayout");window.event.returnValue=false}}catch(A){alert(A.description)}};maxConfigWizard.setAdhunter=function(A){maxConfig.ini.setValue("AdHunter","PopupBlocker","0");maxConfig.ini.setValue("AdHunter","ContentBlocker","0");maxConfig.ini.setValue("AdHunter","UseTextFilter","0");if(A>2){maxConfig.ini.setValue("AdHunter","UseTextFilter","1")}if(A>1){maxConfig.ini.setValue("AdHunter","ContentBlocker","1")}if(A>0){maxConfig.ini.setValue("AdHunter","PopupBlocker","1")}maxConfig.save()};