
var Registration=Class.extend(ComponentBase,{initialize:function(objRegistrationElement,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',18,'initialize:','function(objRegistrationElement, objParentObject, strComponentType, strComponentColumn)',arguments);this.parent(objRegistrationElement,objParentObject,strComponentType,strComponentColumn);this.blnUsernameAlreadyExists=true;this.blnHasSelectedLicenceToPurchase=false;this.intSelectedLicenceTypeId=null;this.intLicenceTypeDuration=null;this.intTotalAmountPayable=null;this.blnButtonLocked=false;},saveAndGoToNextStep:function(strCurrentStep,strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',35,'saveAndGoToNextStep:','function(strCurrentStep, strNextStep)',arguments);switch(strCurrentStep)
{case null:this.goToStep(strNextStep);break;case 1:this.saveSelectedEstablishment(strNextStep);break;case"1a":this.saveCreatedEstablishment(strNextStep);break;case"1b":this.saveEstablishmentType(strNextStep);break;case 2:this.saveUserLogin(strNextStep);break;case 3:this.saveLicence(strNextStep);break;}},searchForEstablishment:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',108,'searchForEstablishment:','function()',arguments);var _this=this;var arrMandatoryFields=[[$j('#establishmentName').get(0)]];if(!checkEmptyFields(arrMandatoryFields,function(){_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.")}))
{return false;}
var strUrl='setSearchCriteria';var objParams={establishmentName:$j('#establishmentName').val()};this.update(strUrl,objParams);return false;},filterByFederation:function(intFederationId)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',150,'filterByFederation:','function(intFederationId)',arguments);var strUrl='filterByFederation';var objParams={intFederationId:intFederationId};this.update(strUrl,objParams);},saveSelectedEstablishment:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',166,'saveSelectedEstablishment:','function(strNextStep)',arguments);if(getSelectedRadioValue("selectedEstablishment")==null)
{this.showNotifcationMessage("Please select an establishment first!");this.setButtonLocked(false);return false;}
var intSelectedEstablishmentId=getSelectedRadioValue("selectedEstablishment");var strUrl='saveSelectedEstablishment';var objParams={intEstablishmentId:intSelectedEstablishmentId};var _this=this;var objOnComplete=function(XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',189,'var objOnComplete =','function(XMLHttpRequest)',arguments);_this.saveSelectedEstablishmentOnComplete(strNextStep,XMLHttpRequest);};this.notify(strUrl,objParams,objOnComplete);},saveSelectedEstablishmentOnComplete:function(strNextStep,XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',198,'saveSelectedEstablishmentOnComplete:','function(strNextStep, XMLHttpRequest)',arguments);var objResponse=$j.evalJSON(XMLHttpRequest.responseText);if(objResponse.blnRequireEstablishmentType)
{var strUrl='showRegistrationStep1b/';this.update(strUrl);return;}
this.goToStep(strNextStep);},saveCreatedEstablishment:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',222,'saveCreatedEstablishment:','function(strNextStep)',arguments);var _this=this;var arrMandatoryFields=[[document.getElementById('schoolDcsfNumberPart1'),document.getElementById('schoolDcsfNumberPart2')],[document.getElementById('name')],[document.getElementById('street')],[document.getElementById('town')],[document.getElementById('county')],[document.getElementById('postcode')],[document.getElementById('telephone')],[document.getElementById('email')],[document.getElementById('establishmentType')],[document.getElementById('localAuthority')]];if(!checkEmptyFields(arrMandatoryFields,function(){_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.")}))
{this.setButtonLocked(false);return false;}
if(!isFieldEmail($j('#email').val()))
{highlightFields([document.getElementById('email')],true);this.showNotifcationMessage("Email address does not appear to be in a valid format! Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('email')]);}
var strUrl='lookupEmailDomain';var objParams={email:$j('#email').val()};var objOnComplete=function(XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',305,'var objOnComplete =','function(XMLHttpRequest)',arguments);_this.saveCreatedEstablishment_PostValidated(strNextStep,XMLHttpRequest);};this.notify(strUrl,objParams,objOnComplete);},saveCreatedEstablishment_PostValidated:function(strNextStep,XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',313,'saveCreatedEstablishment_PostValidated:','function(strNextStep, XMLHttpRequest)',arguments);var _this=this;var objResponse=$j.evalJSON(XMLHttpRequest.responseText);if(!objResponse.valid)
{this.showNotifcationMessage("Email address lookup indicates that '"+$("email").value+"' is not a valid domain! Please try again.");this.setButtonLocked(false);return false;}
var strUrl='createEstablishment';var objParams={};$j.each($j('#create_establishment_form').serializeArray(),function(intKey,objField)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',334,'$j.each($j(\'#create_establishment_form\').serializeArray(),','function(intKey, objField)',arguments);objParams[objField.name]=objField.value;});var objOnComplete=function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',339,'var objOnComplete =','function()',arguments);_this.saveCreatedEstablishmentOnComplete(strNextStep);};this.notify(strUrl,objParams,objOnComplete);},saveCreatedEstablishmentOnComplete:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',348,'saveCreatedEstablishmentOnComplete:','function(strNextStep)',arguments);this.goToStep(strNextStep);},saveEstablishmentType:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',356,'saveEstablishmentType:','function(strNextStep)',arguments);var _this=this;var arrMandatoryFields=[[document.getElementById('establishmentType')]];if(!checkEmptyFields(arrMandatoryFields,function(){_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.")}))
{this.setButtonLocked(false);return false;}
var strUrl='saveEstablishmentType';var objParams={strEstablishmentType:$j('#establishmentType').val()};var objOnComplete=function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',382,'var objOnComplete =','function()',arguments);_this.saveEstablishmentTypeOnComplete(strNextStep);};this.notify(strUrl,objParams,objOnComplete);},saveEstablishmentTypeOnComplete:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',391,'saveEstablishmentTypeOnComplete:','function(strNextStep)',arguments);this.goToStep(strNextStep);},saveUserLogin:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',399,'saveUserLogin:','function(strNextStep)',arguments);var _this=this;var arrMandatoryFields=[[document.getElementById('username')],[document.getElementById('password')],[document.getElementById('passwordConfirm')],[document.getElementById('firstName')],[document.getElementById('lastName')],[document.getElementById('email')],[document.getElementById('emailConfirm')],[document.getElementById('subjectInterests')]];if(!checkEmptyFields(arrMandatoryFields,function(){_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.")}))
{this.setButtonLocked(false);return false;}
if($j('#password').val()!=$j('#passwordConfirm').val())
{highlightFields([document.getElementById('password'),document.getElementById('passwordConfirm')],true);this.showNotifcationMessage("Password values do not match! Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('password'),document.getElementById('passwordConfirm')]);}
if($j('#password').val().length<6)
{highlightFields([document.getElementById('password'),document.getElementById('passwordConfirm')],true);this.showNotifcationMessage("Password is not long enough! Password should be at least 6 characters. Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('password'),document.getElementById('passwordConfirm')]);}
if($j('#email').val()!=$j('#emailConfirm').val())
{highlightFields([document.getElementById('email'),document.getElementById('emailConfirm')],true);this.showNotifcationMessage("Email address values do not match! Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('email'),document.getElementById('emailConfirm')]);}
if(!isFieldEmail($j('#email').val()))
{highlightFields([document.getElementById('email'),document.getElementById('emailConfirm')],true);this.showNotifcationMessage("Email address does not appear to be in a valid format! Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('email'),document.getElementById('emailConfirm')]);}
if($j('#trainee_teacher').attr('checked')===true)
{if(!checkEmptyFields([document.getElementById('name_of_itt_college'),document.getElementById('name_of_college_tutor'),document.getElementById('placement_end_date'),document.getElementById('host_teachers_name'),document.getElementById('host_teachers_email')],function(){_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.")}))
{this.setButtonLocked(false);return false;}
if(!isFieldEmail($j('#host_teachers_email').val()))
{highlightFields([document.getElementById('host_teachers_email')],true);this.showNotifcationMessage("Host teacher's email address does not appear to be in a valid format! Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('host_teachers_email')]);}}
var strUrl='lookupEmailDomainAndUsername';var objParams={email:$j('#email').val(),username:$j('#username').val()};if($j('#trainee_teacher').attr('checked')===true)
{objParams.email_mentor=$j('#host_teachers_email').val();}
var objOnComplete=function(XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',556,'var objOnComplete =','function(XMLHttpRequest)',arguments);_this.saveCreatedUserLogin_PostValidated(strNextStep,XMLHttpRequest)};this.notify(strUrl,objParams,objOnComplete);},saveCreatedUserLogin_PostValidated:function(strNextStep,XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',564,'saveCreatedUserLogin_PostValidated:','function(strNextStep, XMLHttpRequest)',arguments);var _this=this;var objResponse=$j.evalJSON(XMLHttpRequest.responseText);if(!objResponse.validUsername)
{highlightFields([document.getElementById('username')],true);this.showNotifcationMessage("Username is already in use by another user! Please try a different username.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('username')]);}
if(!objResponse.validEmail)
{highlightFields([document.getElementById('email'),document.getElementById('emailConfirm')],true);this.showNotifcationMessage("Email address lookup indicates that '"+$j('#email').val()+"' is not a valid domain! Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('email'),document.getElementById('emailConfirm')]);}
if(!objResponse.validMentorEmail)
{highlightFields([document.getElementById('host_teachers_email')],true);this.showNotifcationMessage("Email address lookup indicates that '"+$j('#host_teachers_email').val()+"' is not a valid domain! Please try again.");this.setButtonLocked(false);return false;}
else
{unHighlightFields([document.getElementById('host_teachers_email')]);}
var strUrl='createUserLogin';var objParams={};$j.each($j('#create_user_login_form').serializeArray(),function(intKey,objField)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',625,'$j.each($j(\'#create_user_login_form\').serializeArray(),','function(intKey, objField)',arguments);objParams[objField.name]=objField.value;});var objOnComplete=function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',630,'var objOnComplete =','function()',arguments);_this.saveCreatedUserLoginOnComplete(strNextStep);};this.notify(strUrl,objParams,objOnComplete);},saveCreatedUserLoginOnComplete:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',639,'saveCreatedUserLoginOnComplete:','function(strNextStep)',arguments);if(typeof(this.monitorUsernamePE)!='undefined')
{this.monitorUsernamePE.stop();}
this.goToStep(strNextStep);},saveLicence:function(strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',653,'saveLicence:','function(strNextStep)',arguments);var _this=this;var strSelectedLicenceValue=getSelectedRadioValue('selectedLicenceType');if(strSelectedLicenceValue=='')
{this.showNotifcationMessage("Please select a licence to use!");this.setButtonLocked(false);return false;}
if(strSelectedLicenceValue=='14_day_free_trial')
{this.saveFreeLicence();return;}
var arrSelectedLicenceValues=strSelectedLicenceValue.split('_');var intLicenceTypeId=arrSelectedLicenceValues[0];var intLicenceTypeDuration=arrSelectedLicenceValues[1];var strIdSelector='#selectedLicenceTypePrice_'+intLicenceTypeId+'_'+intLicenceTypeDuration;var intTotalAmountPayable=$j(strIdSelector.replace(/(:|\.)/g,'\\$1')).val();if(intTotalAmountPayable=='0')
{var arrMandatoryFields=[];}
else
{var arrMandatoryFields=[[document.getElementById('invoice_attention')],[document.getElementById('invoice_address')],[document.getElementById('invoice_email_address')]];}
if(!checkEmptyFields(arrMandatoryFields,function(){_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.")}))
{this.setButtonLocked(false);return false;}
else
{unHighlightFields(arrMandatoryFields);}
var strInvoiceAttention=$j('#invoice_attention').val();var strInvoiceAddress=$j('#invoice_address').val();var strInvoiceEmailAddress=$j('#invoice_email_address').val();var strPON=$j('#purchase_order_number').val();var strPayWithElearningCredits=getSelectedRadioValue('purchase_with_elearningcredits');var strUrl='saveSelectedLicence';var objParams={intSelectedLicenceTypeId:intLicenceTypeId,intLicenceTypeDuration:intLicenceTypeDuration,intTotalAmountPayable:intTotalAmountPayable,strInvoiceAttention:strInvoiceAttention,strInvoiceAddress:strInvoiceAddress,strInvoiceEmailAddress:strInvoiceEmailAddress,strPayWithElearningCredits:strPayWithElearningCredits,strPON:strPON};var objOnComplete=function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',739,'var objOnComplete =','function()',arguments);_this.showRegistrationComplete();};this.notify(strUrl,objParams,objOnComplete);},saveFreeLicence:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',750,'saveFreeLicence:','function()',arguments);var _this=this;var strUrl='saveFreeLicence';var objOnComplete=function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',757,'var objOnComplete =','function()',arguments);_this.showRegistrationComplete();};this.notify(strUrl,{},objOnComplete);},goToStep:function(strStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',768,'goToStep:','function(strStep)',arguments);var strUrl='showRegistrationStep'+strStep+'/';this.update(strUrl);},showRegistration:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',779,'showRegistration:','function()',arguments);var strUrl='showRegistration/';this.update(strUrl);},showRegistrationComplete:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',790,'showRegistrationComplete:','function()',arguments);var strUrl='showRegistrationComplete/';this.update(strUrl);},closeRegistration:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',801,'closeRegistration:','function()',arguments);this.objParentObject.close();Shell.resizeLeftColumnTo33Percent();},monitorEstablishmentName:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',811,'monitorEstablishmentName:','function()',arguments);var strUrl=this.strUrlPrefix+'searchForEstablishment_AutoCompleter';var objOptions={minChars:2,indicator:"establishmentName_Indicator"};new Ajax.Autocompleter("establishmentName","establishmentName_Matches",strUrl,objOptions);},monitorEstablishmentNameKeyDown:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',826,'monitorEstablishmentNameKeyDown:','function()',arguments);new Event.observe($(this.returnElementReference()).down(".establishmentName"),"keypress",function(event){if(event.keyCode=='13'){Registration.searchForEstablishment($(this.returnElementReference()).down(".establishmentName"));}}.bind(this));return false;},focusEstablishmentName:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',836,'focusEstablishmentName:','function()',arguments);$j('#establishmentName').focus();},selectAutoCompleteOption:function(strEstablishmentName)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',841,'selectAutoCompleteOption:','function(strEstablishmentName)',arguments);$j('#establishmentName').val(strEstablishmentName);},monitorUsername:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',849,'monitorUsername:','function()',arguments);var _this=this;this.monitorUsernamePE=new PeriodicalExecuter(function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',853,'this.monitorUsernamePE = new PeriodicalExecuter(','function()',arguments);var strUrl='searchForExistingUsername';var objParams={username:$j('#username').val()};var objOnComplete=function(XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',864,'var objOnComplete =','function(XMLHttpRequest)',arguments);_this.monitorUsernameOnComplete(XMLHttpRequest);};_this.notify(strUrl,objParams,objOnComplete);}.bind(this),3);},monitorUsernameOnComplete:function(XMLHttpRequest)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',875,'monitorUsernameOnComplete:','function(XMLHttpRequest)',arguments);var objResponse=eval("("+XMLHttpRequest.responseText+")");if(!objResponse["blnFoundExisting"])
{this.blnUsernameAlreadyExists=false;}
else
{this.blnUsernameAlreadyExists=true;}
if($("username").value!="")
{if(this.blnUsernameAlreadyExists)
{Element.update("usernameWarning","<span style='color:red'>Username is already in use!</span>");}
else
{Element.update("usernameWarning","<span style='color:green'>Username ok</span>");}}
else
{Element.update("usernameWarning","We will check if the username already exists as you type...");}},showPurchaseAdditionalLicence:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',908,'showPurchaseAdditionalLicence:','function()',arguments);$j('#existingLicences').hide();$j('#purchaseLicenceContainer').show();$j('#registration_existing_licence_button_container').hide();$j('#registration_purchase_licence_button_container').show();this.blnHasSelectedLicenceToPurchase=true;},hidePurchaseAdditionalLicence:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',921,'hidePurchaseAdditionalLicence:','function()',arguments);$j('#purchaseLicenceContainer').hide();$j('#existingLicences').show();$j('#registration_purchase_licence_button_container').hide();$j('#registration_existing_licence_button_container').show();this.hideNotifcationMessage();this.blnHasSelectedLicenceToPurchase=false;},selectLicence:function(intLicenceTypeId,intLicenceTypeDuration)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',937,'selectLicence:','function(intLicenceTypeId, intLicenceTypeDuration)',arguments);var intPrice=$j('selectedLicenceTypePrice_'+intLicenceTypeId+'_'+intLicenceTypeDuration).val();this.blnHasSelectedLicenceToPurchase=true;this.intSelectedLicenceTypeId=intLicenceTypeId;this.intLicenceTypeDuration=intLicenceTypeDuration;this.intTotalAmountPayable=intPrice;},showNotifcationMessage:function(strMessage)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',967,'showNotifcationMessage:','function(strMessage)',arguments);this.parent(strMessage);Shell.scrollToTop();},setPage:function(page)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',975,'setPage:','function(page)',arguments);var strUrl='setPage/'+page;this.update(strUrl);},toggleAccountOptions:function(page)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',986,'toggleAccountOptions:','function(page)',arguments);var blnAdvisorChecked=$j('#advisor').attr('checked');if(blnAdvisorChecked)
{$j('#purchaseOption_1').attr('disabled',true);$j('#purchaseOption_2').attr('disabled',true);$j('#purchaseOption_3').attr('disabled',true);$j('#purchaseOption_1_label').css({opacity:'0.5'});$j('#purchaseOption_2_label').css({opacity:'0.5'});$j('#purchaseOption_3_label').css({opacity:'0.5'});}
else
{$j('#purchaseOption_1').attr('disabled',false);$j('#purchaseOption_2').attr('disabled',false);$j('#purchaseOption_3').attr('disabled',false);$j('#purchaseOption_1_label').css({opacity:'1.0'});$j('#purchaseOption_2_label').css({opacity:'1.0'});$j('#purchaseOption_3_label').css({opacity:'1.0'});}},setButtonLocked:function(blnLock)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1024,'setButtonLocked:','function(blnLock)',arguments);this.blnButtonLocked=blnLock;},getButtonLocked:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1029,'getButtonLocked:','function()',arguments);return this.blnButtonLocked;},shutDown:function()
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1038,'shutDown:','function()',arguments);if(typeof(this.monitorUsernamePE)!='undefined')
{this.monitorUsernamePE.stop();}
Shell.resizeLeftColumnTo33Percent();this.parent();}});Registration.focusEstablishmentName=function(intComponentId)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1056,'Registration.focusEstablishmentName =','function(intComponentId)',arguments);var registration=ComponentBase.getComponentInstanceFromId("registration",intComponentId);registration.focusEstablishmentName();}
Registration.monitorEstablishmentName=function(intComponentId)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1062,'Registration.monitorEstablishmentName =','function(intComponentId)',arguments);var registration=ComponentBase.getComponentInstanceFromId("registration",intComponentId);registration.monitorEstablishmentName();}
Registration.monitorEstablishmentNameKeyDown=function(intComponentId)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1068,'Registration.monitorEstablishmentNameKeyDown =','function(intComponentId)',arguments);var registration=ComponentBase.getComponentInstanceFromId("registration",intComponentId);registration.monitorEstablishmentNameKeyDown();}
Registration.monitorUsername=function(intComponentId)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1074,'Registration.monitorUsername =','function(intComponentId)',arguments);var registration=ComponentBase.getComponentInstanceFromId("registration",intComponentId);registration.monitorUsername();}
Registration.showRegistration=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1080,'Registration.showRegistration =','function(srcElement)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.showRegistration();}
Registration.closeRegistration=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1086,'Registration.closeRegistration =','function(srcElement)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.closeRegistration();}
Registration.goToStep=function(srcElement,strStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1094,'Registration.goToStep =','function(srcElement, strStep)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.goToStep(strStep);}
Registration.saveAndGoToNextStep=function(srcElement,strCurrentStep,strNextStep)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1100,'Registration.saveAndGoToNextStep =','function(srcElement, strCurrentStep, strNextStep)',arguments);if(Registration.getButtonLocked(srcElement))
{alert('You have already pressed this button. Please be patient.');return false;}
Registration.setButtonLocked(srcElement,true);var registration=ComponentBase.getComponentInstance(srcElement);registration.saveAndGoToNextStep(strCurrentStep,strNextStep);}
Registration.searchForEstablishment=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1120,'Registration.searchForEstablishment =','function(srcElement)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.searchForEstablishment();}
Registration.selectAutoCompleteOption=function(srcElement,strValue)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1126,'Registration.selectAutoCompleteOption =','function(srcElement, strValue)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.selectAutoCompleteOption(strValue);}
Registration.saveFreeLicence=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1134,'Registration.saveFreeLicence =','function(srcElement)',arguments);if(Registration.getButtonLocked(srcElement))
{alert('You have already pressed this button. Please be patient.');return false;}
Registration.setButtonLocked(srcElement,true);var registration=ComponentBase.getComponentInstance(srcElement);registration.saveFreeLicence();}
Registration.showPurchaseAdditionalLicence=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1153,'Registration.showPurchaseAdditionalLicence =','function(srcElement)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.showPurchaseAdditionalLicence();}
Registration.hidePurchaseAdditionalLicence=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1159,'Registration.hidePurchaseAdditionalLicence =','function(srcElement)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.hidePurchaseAdditionalLicence();}
Registration.selectLicence=function(srcElement,intLicenceTypeId,intLicenceTypeDuration)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1165,'Registration.selectLicence =','function(srcElement, intLicenceTypeId, intLicenceTypeDuration)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.selectLicence(intLicenceTypeId,intLicenceTypeDuration);}
Registration.setPage=function(srcElement,page){Profiler.profile('view/components/registration/assets/javascript/registration.js',1171,'Registration.setPage =','function(srcElement, page)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.setPage(page);};Registration.toggleAccountOptions=function(srcElement){Profiler.profile('view/components/registration/assets/javascript/registration.js',1176,'Registration.toggleAccountOptions =','function(srcElement)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.toggleAccountOptions();};Registration.setButtonLocked=function(srcElement,blnLock)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1181,'Registration.setButtonLocked =','function(srcElement, blnLock)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);registration.setButtonLocked(blnLock);}
Registration.unlockButtons=function(intComponentId)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1189,'Registration.unlockButtons =','function(intComponentId)',arguments);var registration=ComponentBase.getComponentInstanceFromId("registration",intComponentId);registration.setButtonLocked(false);}
Registration.getButtonLocked=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1197,'Registration.getButtonLocked =','function(srcElement)',arguments);var registration=ComponentBase.getComponentInstance(srcElement);return registration.getButtonLocked();}
Registration.filterByFederation=function(srcElement)
{Profiler.profile('view/components/registration/assets/javascript/registration.js',1205,'Registration.filterByFederation =','function(srcElement)',arguments);var intSelectedFederationId=$j(srcElement).val();var registration=ComponentBase.getComponentInstance(srcElement);registration.filterByFederation(intSelectedFederationId);}
